Conversation
…ors without having to (re-)allocate the romdata which can fail. update to use menu mutex and to make images spans instead of vectors for better memory performance
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new doom component along with several improvements to memory management and emulator functionality. Key changes include the addition of multiple doom-related source files, performance‐oriented adjustments to SD card/USB memory allocation parameters in BoxEmu, and an improved interface for palette handling alongside a new pool allocator component.
Reviewed Changes
Copilot reviewed 214 out of 221 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| components/doom/prboom/d_think.h | New file providing thinker definitions for Doom. |
| components/doom/prboom/d_player.h | Adds player state structures for Doom gameplay. |
| components/doom/prboom/d_net.h | Implements networking structures and functions for Doom. |
| components/doom/prboom/d_main.h | Adds main startup routines and event handling for Doom. |
| components/doom/prboom/d_items.h & d_items.c | Introduces weapon info and sprite frame definitions. |
| components/doom/prboom/d_event.h | Adds event structures to handle Doom-specific events. |
| components/doom/prboom/config.h | Updates configuration and version information. |
| components/doom/prboom/am_map.h | Implements the automap module for Doom. |
| components/doom/include/doom.hpp | Exposes new API functions for Doom (init, run, video buffer). |
| components/box-emu/src/box-emu.cpp | Updates memory allocation sizes and introduces deinitialization support. |
| components/box-emu/include/box-emu.hpp | Adds pool allocator support and refines palette API. |
| components/doom/prboom/COPYING | Adds the GPL license file. |
Files not reviewed (7)
- CMakeLists.txt: Language not supported
- boxart/source/resize.bash: Language not supported
- components/box-emu/CMakeLists.txt: Language not supported
- components/doom/CMakeLists.txt: Language not supported
- components/doom/linker.lf: Language not supported
- components/doom/prboom/AUTHORS: Language not supported
- components/doom/prboom/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (2)
components/box-emu/src/box-emu.cpp:117
- The allocation unit size was reduced from 16 * 1024 to 2 * 1024. This change can improve performance for small file writes but may degrade overall read/write throughput for larger file operations. Please verify that this trade-off meets the desired performance requirements.
mount_config.allocation_unit_size = 2 * 1024;
components/box-emu/src/box-emu.cpp:139
- The max_transfer_sz parameter has been reduced from 8192 to 4096, which may affect the speed of high-volume data transfers. Consider confirming that the updated value satisfies the performance expectations for the targeted workloads.
bus_cfg.max_transfer_sz = 4096;
|
⚡ Static analysis result ⚡ 🔴 cppcheck found 231 issues! Click here to see details.Lines 300 to 305 in 7a41159 !Line: 300 - style: Virtual function 'get_paused_image_path' is called from constructor 'Cart(const Config&config)' at line 59. Dynamic binding is not used. [virtualCallInConstructor]
!Line: 59 - note: Calling get_paused_image_path
!Line: 300 - note: get_paused_image_path is a virtual functionesp-box-emu/components/shared_memory/src/shared_memory.c Lines 72 to 77 in 7a41159 !Line: 72 - portability: %d in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint]
esp-box-emu/components/pool_allocator/src/pool_allocator.c Lines 31 to 36 in 7a41159 !Line: 31 - style: Parameter 'ptr' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/src/doom.cpp Lines 246 to 251 in 7a41159 !Line: 246 - style: Variable 'audioBufferEnd' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/m_fixed.h Lines 203 to 208 in 7a41159 !Line: 203 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/m_fixed.h Lines 180 to 185 in 7a41159 !Line: 180 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/m_fixed.h Lines 193 to 198 in 7a41159 !Line: 193 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/m_fixed.h Lines 73 to 78 in 7a41159 !Line: 73 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/p_user.c Lines 255 to 260 in 7a41159 !Line: 255 - style: The scope of the variable 'angle' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_user.c Lines 256 to 261 in 7a41159 !Line: 256 - style: The scope of the variable 'delta' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_user.c Lines 312 to 317 in 7a41159 !Line: 312 - style: The scope of the variable 'newweapon' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_user.c Lines 197 to 202 in 7a41159 !Line: 197 - style: Variable 'cmd' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/d_client.c Lines 493 to 498 in 7a41159 !Line: 493 - style: Condition 'runtics--' is always false [knownConditionTrueFalse]
!Line: 459 - note: Assuming that condition '!runtics' is not redundant
!Line: 493 - note: Condition 'runtics--' is always falseesp-box-emu/components/doom/prboom/d_client.c Lines 467 to 472 in 7a41159 !Line: 467 - error: syntax error [syntaxError]
esp-box-emu/components/doom/prboom/d_server.c Lines 213 to 218 in 7a41159 !Line: 213 - warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
esp-box-emu/components/doom/prboom/d_server.c Lines 573 to 578 in 7a41159 !Line: 573 - warning: %d in format string (no. 2) requires 'int' but the argument type is 'signed long'. [invalidPrintfArgType_sint]
esp-box-emu/components/doom/prboom/d_server.c Lines 591 to 596 in 7a41159 !Line: 591 - warning: %d in format string (no. 2) requires 'int' but the argument type is 'signed long'. [invalidPrintfArgType_sint]
esp-box-emu/components/doom/prboom/d_server.c Lines 418 to 423 in 7a41159 !Line: 418 - error: Common realloc mistake: 'wadname' nulled but not freed upon failure [memleakOnRealloc]
esp-box-emu/components/doom/prboom/d_server.c Lines 419 to 424 in 7a41159 !Line: 419 - error: Common realloc mistake: 'wadget' nulled but not freed upon failure [memleakOnRealloc]
esp-box-emu/components/doom/prboom/d_server.c Lines 608 to 613 in 7a41159 !Line: 608 - style: The scope of the variable 'reply' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/d_server.c Lines 724 to 729 in 7a41159 !Line: 724 - style: Local variable 'packet' shadows outer variable [shadowVariable]
!Line: 478 - note: Shadowed declaration
!Line: 724 - note: Shadow variableesp-box-emu/components/doom/prboom/d_server.c Lines 311 to 316 in 7a41159 !Line: 311 - style: Parameter 'p' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/d_server.c Lines 560 to 565 in 7a41159 !Line: 560 - style: Variable 'newtic' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/r_patch.c Lines 136 to 141 in 7a41159 !Line: 136 - style: Condition 'spot>=column->topdelta' is always true [knownConditionTrueFalse]
!Line: 135 - note: Assuming condition 'spot<column->topdelta' is false
!Line: 136 - note: Condition 'spot>=column->topdelta' is always trueesp-box-emu/components/doom/prboom/r_patch.c Lines 270 to 275 in 7a41159 !Line: 270 - style: Condition '1||patch->isNotTileable' is always true [knownConditionTrueFalse]
esp-box-emu/components/doom/prboom/r_patch.c Lines 582 to 587 in 7a41159 !Line: 582 - style: Condition '1||composite_patch->isNotTileable' is always true [knownConditionTrueFalse]
esp-box-emu/components/doom/prboom/r_patch.c Lines 104 to 109 in 7a41159 !Line: 104 - style: The scope of the variable 'numPosts' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_patch.c Lines 563 to 568 in 7a41159 !Line: 563 - style: The scope of the variable 'length' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_patch.c Lines 346 to 351 in 7a41159 !Line: 346 - style: Variable 'post2' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/r_patch.c Lines 358 to 363 in 7a41159 !Line: 358 - style: Variable 'texpatch' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/d_server.c Lines 149 to 154 in 7a41159 !Line: 149 - style: The scope of the variable 'ret' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/d_server.c Lines 146 to 151 in 7a41159 !Line: 146 - style: Local variable '__progname' shadows outer variable [shadowVariable]
!Line: 134 - note: Shadowed declaration
!Line: 146 - note: Shadow variableesp-box-emu/components/doom/prboom/p_spec.c Lines 1101 to 1106 in 7a41159 !Line: 1101 - style: The scope of the variable 'ok' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 2613 to 2618 in 7a41159 !Line: 2613 - style: The scope of the variable 'thing' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 2849 to 2854 in 7a41159 !Line: 2849 - style: The scope of the variable 'thing' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3099 to 3104 in 7a41159 !Line: 3099 - style: The scope of the variable 'pushangle' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3148 to 3153 in 7a41159 !Line: 3148 - style: The scope of the variable 'thing' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'xl' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'xh' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'yl' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'yh' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'bx' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3151 to 3156 in 7a41159 !Line: 3151 - style: The scope of the variable 'by' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 3152 to 3157 in 7a41159 !Line: 3152 - style: The scope of the variable 'radius' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_spec.c Lines 948 to 953 in 7a41159 !Line: 948 - style: inconclusive: Function 'P_SectorActive' argument 2 names different: declaration 's' definition 'sec'. [funcArgNamesDifferent]
!Line: 854 - note: Function 'P_SectorActive' argument 2 names different: declaration 's' definition 'sec'.
!Line: 948 - note: Function 'P_SectorActive' argument 2 names different: declaration 's' definition 'sec'.esp-box-emu/components/doom/prboom/p_spec.c Lines 255 to 260 in 7a41159 !Line: 255 - style: Parameter 'sec' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 287 to 292 in 7a41159 !Line: 287 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 318 to 323 in 7a41159 !Line: 318 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 353 to 358 in 7a41159 !Line: 353 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 388 to 393 in 7a41159 !Line: 388 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 419 to 424 in 7a41159 !Line: 419 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 450 to 455 in 7a41159 !Line: 450 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 482 to 487 in 7a41159 !Line: 482 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 516 to 521 in 7a41159 !Line: 516 - style: Variable 'other' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 553 to 558 in 7a41159 !Line: 553 - style: Variable 'side' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 555 to 560 in 7a41159 !Line: 555 - style: Variable 'sec' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 592 to 597 in 7a41159 !Line: 592 - style: Variable 'side' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 594 to 599 in 7a41159 !Line: 594 - style: Variable 'sec' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 768 to 773 in 7a41159 !Line: 768 - style: Variable 'check' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 799 to 804 in 7a41159 !Line: 799 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 978 to 983 in 7a41159 !Line: 978 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_spec.c Lines 2846 to 2851 in 7a41159 !Line: 2846 - style: Parameter 'f' can be declared as pointer to const. However it seems that 'T_Friction' is a callback function, if 'f' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 2832 - note: You might need to cast the function pointer here
!Line: 2846 - note: Parameter 'f' can be declared as pointer to constesp-box-emu/components/doom/prboom/p_spec.c Lines 2711 to 2716 in 7a41159 !Line: 2711 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/m_cheat.c Lines 712 to 717 in 7a41159 !Line: 712 - style: Local variable 'key' shadows outer argument [shadowArgument]
!Line: 677 - note: Shadowed declaration
!Line: 712 - note: Shadow variableesp-box-emu/components/doom/prboom/m_cheat.c Lines 267 to 272 in 7a41159 !Line: 267 - style: Parameter 'buf' can be declared as const array. However it seems that 'cheat_mus' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 114 - note: You might need to cast the function pointer here
!Line: 267 - note: Parameter 'buf' can be declared as const arrayesp-box-emu/components/doom/prboom/m_cheat.c Lines 423 to 428 in 7a41159 !Line: 423 - style: Parameter 'buf' can be declared as const array. However it seems that 'cheat_clev' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 167 - note: You might need to cast the function pointer here
!Line: 423 - note: Parameter 'buf' can be declared as const arrayesp-box-emu/components/doom/prboom/m_cheat.c Lines 606 to 611 in 7a41159 !Line: 606 - style: Parameter 'buf' can be declared as const array. However it seems that 'cheat_tntweapx' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 224 - note: You might need to cast the function pointer here
!Line: 606 - note: Parameter 'buf' can be declared as const arrayesp-box-emu/components/doom/prboom/m_cheat.c Lines 636 to 641 in 7a41159 !Line: 636 - style: Parameter 'buf' can be declared as const array. However it seems that 'cheat_tntammox' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 249 - note: You might need to cast the function pointer here
!Line: 636 - note: Parameter 'buf' can be declared as const arrayesp-box-emu/components/doom/prboom/opl.c Lines 155 to 160 in 7a41159 !Line: 155 - style: The scope of the variable 'tics' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl.c Lines 250 to 255 in 7a41159 !Line: 250 - style: The scope of the variable 'sampval' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl.c Lines 286 to 291 in 7a41159 !Line: 286 - style: The scope of the variable 'next_callback_time' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl.c Lines 98 to 103 in 7a41159 !Line: 98 - style: inconclusive: Function 'OPL_Init' argument 1 names different: declaration 'port_base' definition 'rate'. [funcArgNamesDifferent]
!Line: 67 - note: Function 'OPL_Init' argument 1 names different: declaration 'port_base' definition 'rate'.
!Line: 98 - note: Function 'OPL_Init' argument 1 names different: declaration 'port_base' definition 'rate'.esp-box-emu/components/doom/prboom/opl.c Lines 273 to 278 in 7a41159 !Line: 273 - style: inconclusive: Function 'OPL_Render_Samples' argument 2 names different: declaration 'nsamp' definition 'buffer_len'. [funcArgNamesDifferent]
!Line: 115 - note: Function 'OPL_Render_Samples' argument 2 names different: declaration 'nsamp' definition 'buffer_len'.
!Line: 273 - note: Function 'OPL_Render_Samples' argument 2 names different: declaration 'nsamp' definition 'buffer_len'.esp-box-emu/components/doom/prboom/opl_queue.c Lines 78 to 83 in 7a41159 !Line: 78 - style: The scope of the variable 'parent_id' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 126 to 131 in 7a41159 !Line: 126 - style: The scope of the variable 'child1' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 126 to 131 in 7a41159 !Line: 126 - style: The scope of the variable 'child2' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 63 to 68 in 7a41159 !Line: 63 - style: Parameter 'queue' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 125 to 130 in 7a41159 !Line: 125 - style: Variable 'entry' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 230 to 235 in 7a41159 !Line: 230 - warning: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
esp-box-emu/components/doom/prboom/opl_queue.c Lines 253 to 258 in 7a41159 !Line: 253 - style: The scope of the variable 'newtime' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/d_main.c Lines 576 to 581 in 7a41159 !Line: 576 - warning: Either the condition '!iwad' is redundant or there is possible null pointer dereference: iwad. [nullPointerRedundantCheck]
!Line: 573 - note: Assuming that condition '!iwad' is not redundant
!Line: 576 - note: Null pointer dereferenceesp-box-emu/components/doom/prboom/d_main.c Lines 659 to 664 in 7a41159 !Line: 659 - style: The scope of the variable 'i' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/d_main.c Lines 660 to 665 in 7a41159 !Line: 660 - style: The scope of the variable 'pos' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/d_main.c Lines 596 to 601 in 7a41159 !Line: 596 - portability: 'iwad->data' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
esp-box-emu/components/doom/prboom/d_main.c Lines 878 to 883 in 7a41159 !Line: 878 - error: Signed integer overflow for expression '(8-viewangleoffset)*0x20000000'. [integerOverflow]
!Line: 877 - note: Assignment 'viewangleoffset=viewangleoffset<0?0:(viewangleoffset>7?7:viewangleoffset)', assigned value is 0
!Line: 878 - note: Integer overflowesp-box-emu/components/doom/prboom/dbopl.c Lines 1400 to 1405 in 7a41159 !Line: 1400 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1402 to 1407 in 7a41159 !Line: 1402 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1404 to 1409 in 7a41159 !Line: 1404 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1407 to 1412 in 7a41159 !Line: 1407 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1409 to 1414 in 7a41159 !Line: 1409 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1411 to 1416 in 7a41159 !Line: 1411 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
esp-box-emu/components/doom/prboom/dbopl.c Lines 783 to 788 in 7a41159 !Line: 783 - style: The scope of the variable 'synth' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1345 to 1350 in 7a41159 !Line: 1345 - style: Local variable 'original' shadows outer variable [shadowVariable]
!Line: 1304 - note: Shadowed declaration
!Line: 1345 - note: Shadow variableesp-box-emu/components/doom/prboom/dbopl.c Lines 583 to 588 in 7a41159 !Line: 583 - style: Parameter 'self' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/dbopl.c Lines 799 to 804 in 7a41159 !Line: 799 - style: Variable 'chan1' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/dbopl.c Lines 1256 to 1261 in 7a41159 !Line: 1256 - style: Parameter 'self' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_plats.c Lines 368 to 373 in 7a41159 !Line: 368 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_ceilng.c Lines 428 to 433 in 7a41159 !Line: 428 - style: inconclusive: Function 'P_AddActiveCeiling' argument 1 names different: declaration 'c' definition 'ceiling'. [funcArgNamesDifferent]
!Line: 1134 - note: Function 'P_AddActiveCeiling' argument 1 names different: declaration 'c' definition 'ceiling'.
!Line: 428 - note: Function 'P_AddActiveCeiling' argument 1 names different: declaration 'c' definition 'ceiling'.esp-box-emu/components/doom/prboom/p_ceilng.c Lines 374 to 379 in 7a41159 !Line: 374 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_ceilng.c Lines 401 to 406 in 7a41159 !Line: 401 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_pspr.c Lines 796 to 801 in 7a41159 !Line: 796 - style: inconclusive: Function 'P_SetupPsprites' argument 1 names different: declaration 'curplayer' definition 'player'. [funcArgNamesDifferent]
!Line: 91 - note: Function 'P_SetupPsprites' argument 1 names different: declaration 'curplayer' definition 'player'.
!Line: 796 - note: Function 'P_SetupPsprites' argument 1 names different: declaration 'curplayer' definition 'player'.esp-box-emu/components/doom/prboom/p_pspr.c Lines 814 to 819 in 7a41159 !Line: 814 - style: inconclusive: Function 'P_MovePsprites' argument 1 names different: declaration 'curplayer' definition 'player'. [funcArgNamesDifferent]
!Line: 92 - note: Function 'P_MovePsprites' argument 1 names different: declaration 'curplayer' definition 'player'.
!Line: 814 - note: Function 'P_MovePsprites' argument 1 names different: declaration 'curplayer' definition 'player'.esp-box-emu/components/doom/prboom/p_pspr.c Lines 156 to 161 in 7a41159 !Line: 156 - style: Parameter 'player' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_pspr.c Lines 714 to 719 in 7a41159 !Line: 714 - style: Parameter 'psp' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_pspr.c Lines 553 to 558 in 7a41159 !Line: 553 - error: Signed integer overflow for expression '-0x40000000/20'. [integerOverflow]
esp-box-emu/components/doom/prboom/m_misc.c Lines 742 to 747 in 7a41159 !Line: 742 - warning: %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
esp-box-emu/components/doom/prboom/m_misc.c Lines 730 to 735 in 7a41159 !Line: 730 - warning: fscanf() without field width limits can crash with huge input data. [invalidscanf]
esp-box-emu/components/doom/prboom/m_misc.c Lines 708 to 713 in 7a41159 !Line: 708 - style: inconclusive: Statements following 'return' will never be executed. [unreachableCode]
esp-box-emu/components/doom/prboom/m_misc.c Lines 79 to 84 in 7a41159 !Line: 79 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/lprintf.c Lines 52 to 57 in 7a41159 !Line: 52 - style: inconclusive: Function 'lprintf' argument 1 names different: declaration 'pri' definition 'lvl'. [funcArgNamesDifferent]
!Line: 48 - note: Function 'lprintf' argument 1 names different: declaration 'pri' definition 'lvl'.
!Line: 52 - note: Function 'lprintf' argument 1 names different: declaration 'pri' definition 'lvl'.esp-box-emu/components/doom/prboom/lprintf.c Lines 52 to 57 in 7a41159 !Line: 52 - style: inconclusive: Function 'lprintf' argument 2 names different: declaration 'fmt' definition 's'. [funcArgNamesDifferent]
!Line: 48 - note: Function 'lprintf' argument 2 names different: declaration 'fmt' definition 's'.
!Line: 52 - note: Function 'lprintf' argument 2 names different: declaration 'fmt' definition 's'.esp-box-emu/components/doom/prboom/p_floor.c Lines 968 to 973 in 7a41159 !Line: 968 - style: inconclusive: Function 'EV_DoElevator' argument 2 names different: declaration 'type' definition 'elevtype'. [funcArgNamesDifferent]
!Line: 960 - note: Function 'EV_DoElevator' argument 2 names different: declaration 'type' definition 'elevtype'.
!Line: 968 - note: Function 'EV_DoElevator' argument 2 names different: declaration 'type' definition 'elevtype'.esp-box-emu/components/doom/prboom/p_floor.c Lines 568 to 573 in 7a41159 !Line: 568 - style: Variable 'side' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_floor.c Lines 655 to 660 in 7a41159 !Line: 655 - style: Variable 'secm' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_floor.c Lines 714 to 719 in 7a41159 !Line: 714 - style: Parameter 'l' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_floor.c Lines 879 to 884 in 7a41159 !Line: 879 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_floor.c Lines 883 to 888 in 7a41159 !Line: 883 - style: Variable 's3' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_floor.c Lines 211 to 216 in 7a41159 !Line: 211 - style: Variable 'lastpos' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/p_floor.c Lines 213 to 218 in 7a41159 !Line: 213 - style: Variable 'flag' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_fps.c Lines 320 to 325 in 7a41159 !Line: 320 - style: The scope of the variable 'i' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_fps.c Lines 258 to 263 in 7a41159 !Line: 258 - style: Parameter 'posptr' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/w_wad.c Lines 402 to 407 in 7a41159 !Line: 402 - portability: 'wad->data' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
esp-box-emu/components/doom/prboom/w_wad.c Lines 457 to 462 in 7a41159 !Line: 457 - portability: 'l->wadfile->data' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
esp-box-emu/components/doom/prboom/p_genlin.c Lines 375 to 380 in 7a41159 !Line: 375 - portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]
esp-box-emu/components/doom/prboom/p_genlin.c Lines 189 to 194 in 7a41159 !Line: 189 - style: Local variable 'sec' shadows outer variable [shadowVariable]
!Line: 66 - note: Shadowed declaration
!Line: 189 - note: Shadow variableesp-box-emu/components/doom/prboom/p_genlin.c Lines 396 to 401 in 7a41159 !Line: 396 - style: Local variable 'sec' shadows outer variable [shadowVariable]
!Line: 269 - note: Shadowed declaration
!Line: 396 - note: Shadow variableesp-box-emu/components/doom/prboom/p_genlin.c Lines 189 to 194 in 7a41159 !Line: 189 - style: Variable 'sec' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_genlin.c Lines 396 to 401 in 7a41159 !Line: 396 - style: Variable 'sec' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/r_things.c Lines 408 to 413 in 7a41159 !Line: 408 - portability: Undefined behaviour, pointer arithmetic 'translationtables-256' is out of bounds. [pointerOutOfBounds]
esp-box-emu/components/doom/prboom/r_things.c Lines 329 to 334 in 7a41159 !Line: 329 - style: The scope of the variable 'topscreen' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_things.c Lines 330 to 335 in 7a41159 !Line: 330 - style: The scope of the variable 'bottomscreen' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_things.c Lines 377 to 382 in 7a41159 !Line: 377 - style: The scope of the variable 'texturecolumn' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/r_things.c Lines 194 to 199 in 7a41159 !Line: 194 - style: Variable 'lump' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/r_things.c Lines 375 to 380 in 7a41159 !Line: 375 - style: Parameter 'vis' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/r_things.c Lines 504 to 509 in 7a41159 !Line: 504 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/r_draw.c Lines 1110 to 1115 in 7a41159 !Line: 1110 - style: Condition 'side>0' is always false [knownConditionTrueFalse]
!Line: 1108 - note: Assignment 'side=(SCREENWIDTH-SCREENWIDTH)/2', assigned value is 0
!Line: 1110 - note: Condition 'side>0' is always falseesp-box-emu/components/doom/prboom/r_drawspan.inl Lines 79 to 84 in 7a41159 !Line: 79 - style: Parameter 'dsvars' can be declared as pointer to const. However it seems that 'R_DrawSpan8_PointUV_PointZ' is a callback function, if 'dsvars' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 889 - note: You might need to cast the function pointer here
!Line: 79 - note: Parameter 'dsvars' can be declared as pointer to constesp-box-emu/components/doom/prboom/r_drawspan.inl Lines 84 to 89 in 7a41159 !Line: 84 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/r_drawspan.inl Lines 85 to 90 in 7a41159 !Line: 85 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 108 to 113 in 7a41159 !Line: 108 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 127 to 132 in 7a41159 !Line: 127 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 155 to 160 in 7a41159 !Line: 155 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 175 to 180 in 7a41159 !Line: 175 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 183 to 188 in 7a41159 !Line: 183 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 203 to 208 in 7a41159 !Line: 203 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 213 to 218 in 7a41159 !Line: 213 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawflush.inl Lines 248 to 253 in 7a41159 !Line: 248 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 252 to 257 in 7a41159 !Line: 252 - style: Variable 'colormap' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 253 to 258 in 7a41159 !Line: 253 - style: Variable 'translation' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 320 to 325 in 7a41159 !Line: 320 - style: Variable 'nextfrac' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 318 to 323 in 7a41159 !Line: 318 - style: Variable 'y' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 251 to 256 in 7a41159 !Line: 251 - style: Variable 'source' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 256 to 261 in 7a41159 !Line: 256 - style: Variable 'x' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 171 to 176 in 7a41159 !Line: 171 - style: Variable 'frac' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 184 to 189 in 7a41159 !Line: 184 - style: Variable 'frac' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 191 to 196 in 7a41159 !Line: 191 - style: Variable 'frac' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 233 to 238 in 7a41159 !Line: 233 - style: Variable 'dest' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 243 to 248 in 7a41159 !Line: 243 - style: Variable 'dest' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawcolumn.inl Lines 169 to 174 in 7a41159 !Line: 169 - style: Variable 'frac' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_drawspan.inl Lines 99 to 104 in 7a41159 !Line: 99 - style: Variable 'colormap' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/r_draw.c Lines 1011 to 1016 in 7a41159 !Line: 1011 - style: Variable 'i' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/doom/prboom/p_lights.c Lines 305 to 310 in 7a41159 !Line: 305 - style: The scope of the variable 'sec' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_lights.c Lines 373 to 378 in 7a41159 !Line: 373 - style: The scope of the variable 'j' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_lights.c Lines 302 to 307 in 7a41159 !Line: 302 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 331 to 336 in 7a41159 !Line: 331 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 340 to 345 in 7a41159 !Line: 340 - style: Variable 'tsec' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 363 to 368 in 7a41159 !Line: 363 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 372 to 377 in 7a41159 !Line: 372 - style: Variable 'temp' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 405 to 410 in 7a41159 !Line: 405 - style: Parameter 'line' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_lights.c Lines 417 to 422 in 7a41159 !Line: 417 - style: Variable 'temp' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2592 to 2597 in 7a41159 !Line: 2592 - error: Address of local auto-variable assigned to a function parameter. [autoVariables]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 962 to 967 in 7a41159 !Line: 962 - style: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1055 to 1060 in 7a41159 !Line: 1055 - style: Redundant initialization for 'targ'. The initialized value is overwritten before it is read. [redundantInitialization]
!Line: 1044 - note: targ is initialized
!Line: 1055 - note: targ is overwrittenesp-box-emu/components/doom/prboom/p_enemy.c Lines 257 to 262 in 7a41159 !Line: 257 - style: The scope of the variable 'l' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 293 to 298 in 7a41159 !Line: 293 - style: The scope of the variable 'cl' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1638 to 1643 in 7a41159 !Line: 1638 - style: The scope of the variable 'xl' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1638 to 1643 in 7a41159 !Line: 1638 - style: The scope of the variable 'xh' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1639 to 1644 in 7a41159 !Line: 1639 - style: The scope of the variable 'yl' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1639 to 1644 in 7a41159 !Line: 1639 - style: The scope of the variable 'yh' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1640 to 1645 in 7a41159 !Line: 1640 - style: The scope of the variable 'bx' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1640 to 1645 in 7a41159 !Line: 1640 - style: The scope of the variable 'by' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 126 to 131 in 7a41159 !Line: 126 - style: inconclusive: Function 'P_NoiseAlert' argument 2 names different: declaration 'emmiter' definition 'emitter'. [funcArgNamesDifferent]
!Line: 41 - note: Function 'P_NoiseAlert' argument 2 names different: declaration 'emmiter' definition 'emitter'.
!Line: 126 - note: Function 'P_NoiseAlert' argument 2 names different: declaration 'emmiter' definition 'emitter'.esp-box-emu/components/doom/prboom/p_enemy.c Lines 761 to 766 in 7a41159 !Line: 761 - style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 897 to 902 in 7a41159 !Line: 897 - style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 961 to 966 in 7a41159 !Line: 961 - style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 984 to 989 in 7a41159 !Line: 984 - style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 290 to 295 in 7a41159 !Line: 290 - style: Parameter 'actor' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 609 to 614 in 7a41159 !Line: 609 - style: Parameter 'actor' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 639 to 644 in 7a41159 !Line: 639 - style: Variable 'target' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1023 to 1028 in 7a41159 !Line: 1023 - style: Variable 'mo2' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1464 to 1469 in 7a41159 !Line: 1464 - style: Variable 'dest' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1665 to 1670 in 7a41159 !Line: 1665 - style: Variable 'info' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1911 to 1916 in 7a41159 !Line: 1911 - style: Variable 'dest' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2105 to 2110 in 7a41159 !Line: 2105 - style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2208 to 2213 in 7a41159 !Line: 2208 - style: Variable 'mo2' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2345 to 2350 in 7a41159 !Line: 2345 - style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2362 to 2367 in 7a41159 !Line: 2362 - style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2376 to 2381 in 7a41159 !Line: 2376 - style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2421 to 2426 in 7a41159 !Line: 2421 - style: Variable 'targ' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 2540 to 2545 in 7a41159 !Line: 2540 - style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 529 to 534 in 7a41159 !Line: 529 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/p_enemy.c Lines 1588 to 1593 in 7a41159 !Line: 1588 - error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
esp-box-emu/components/doom/prboom/g_game.c Lines 2443 to 2448 in 7a41159 !Line: 2443 - warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
esp-box-emu/components/doom/prboom/g_game.c Lines 1063 to 1068 in 7a41159 !Line: 1063 - warning: Either the switch case 'case -1024' is redundant or the array 'finesine[10240]' is accessed at index -1024, which is out of bounds. [negativeIndex]
!Line: 1076 - note: case -1024: an is -1024 here.
!Line: 1063 - note: Negative array indexesp-box-emu/components/doom/prboom/hu_stuff.c Lines 995 to 1000 in 7a41159 !Line: 995 - warning: Either the condition 'weaponinfo[w].ammo==am_noammo' is redundant or the array 'plr->ammo[4]' is accessed at index 5, which is out of bounds. [arrayIndexOutOfBoundsCond]
!Line: 1007 - note: Assuming that condition 'weaponinfo[w].ammo==am_noammo' is not redundant
!Line: 995 - note: Array index out of boundsesp-box-emu/components/doom/prboom/hu_stuff.c Lines 996 to 1001 in 7a41159 !Line: 996 - warning: Either the condition 'weaponinfo[w].ammo==am_noammo' is redundant or the array 'plr->maxammo[4]' is accessed at index 5, which is out of bounds. [arrayIndexOutOfBoundsCond]
!Line: 1007 - note: Assuming that condition 'weaponinfo[w].ammo==am_noammo' is not redundant
!Line: 996 - note: Array index out of boundsesp-box-emu/components/doom/prboom/g_game.c Lines 2642 to 2647 in 7a41159 !Line: 2642 - style: Condition 'demover>=0' is always true [knownConditionTrueFalse]
!Line: 2634 - note: Assignment 'demover=*demo_p++', assigned value is greater than -1
!Line: 2642 - note: Condition 'demover>=0' is always trueesp-box-emu/components/doom/prboom/g_game.c Lines 478 to 483 in 7a41159 !Line: 478 - style: Same expression on both sides of '&' because 'BTS_RESTARTLEVEL' and 'BT_SPECIALMASK' represent the same value. [duplicateExpression]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 737 to 742 in 7a41159 !Line: 737 - style: The scope of the variable 'ammostr' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 738 to 743 in 7a41159 !Line: 738 - style: The scope of the variable 'healthstr' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 739 to 744 in 7a41159 !Line: 739 - style: The scope of the variable 'armorstr' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 740 to 745 in 7a41159 !Line: 740 - style: The scope of the variable 'i' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 740 to 745 in 7a41159 !Line: 740 - style: The scope of the variable 'doit' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 1308 to 1313 in 7a41159 !Line: 1308 - style: The scope of the variable 'i' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 1308 to 1313 in 7a41159 !Line: 1308 - style: The scope of the variable 'rc' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 1309 to 1314 in 7a41159 !Line: 1309 - style: The scope of the variable 'c' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 736 to 741 in 7a41159 !Line: 736 - style: Local variable 'plr' shadows outer variable [shadowVariable]
!Line: 162 - note: Shadowed declaration
!Line: 736 - note: Shadow variableesp-box-emu/components/doom/prboom/hu_stuff.c Lines 575 to 580 in 7a41159 !Line: 575 - style: Argument '1+0*hu_font['A'-'!'].height' to function HUlib_initTextLine is always 1. Constant literal calculation disable/hide variable expression 'hu_font['A'-'!'].height'. [knownArgumentHiddenVariableExpression]
esp-box-emu/components/doom/prboom/g_game.c Lines 1406 to 1411 in 7a41159 !Line: 1406 - style: The scope of the variable 'name' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/g_game.c Lines 1407 to 1412 in 7a41159 !Line: 1407 - style: The scope of the variable 'episode' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/g_game.c Lines 1407 to 1412 in 7a41159 !Line: 1407 - style: The scope of the variable 'map' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/g_game.c Lines 2066 to 2071 in 7a41159 !Line: 2066 - style: The scope of the variable 'i' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/g_game.c Lines 2160 to 2165 in 7a41159 !Line: 2160 - style: The scope of the variable 'at' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 735 to 740 in 7a41159 !Line: 735 - style: Variable 's' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/doom/prboom/hu_stuff.c Lines 1448 to 1453 in 7a41159 !Line: 1448 - style: Parameter 'ev' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/doom/prboom/g_game.c Lines 2585 to 2590 in 7a41159 !Line: 2585 - style: The scope of the variable 'lev' can be reduced. [variableScope]
esp-box-emu/components/doom/prboom/g_game.c Lines 1437 to 1442 in 7a41159 !Line: 1437 - style: inconclusive: Function 'G_LoadGame' argument 2 names different: declaration 'is_command' definition 'command'. [funcArgNamesDifferent]
!Line: 56 - note: Function 'G_LoadGame' argument 2 names different: declaration 'is_command' definition 'command'.
!Line: 1437 - note: Function 'G_LoadGame' argument 2 names different: declaration 'is_command' definition 'command'.esp-box-emu/components/doom/prboom/g_game.c Lines 2574 to 2579 in 7a41159 !Line: 2574 - style: inconclusive: Function 'G_DeferedPlayDemo' argument 1 names different: declaration 'demo' definition 'name'. [funcArgNamesDifferent]
!Line: 55 - note: Function 'G_DeferedPlayDemo' argument 1 names different: declaration 'demo' definition 'name'.
!Line: 2574 - note: Function 'G_DeferedPlayDemo' argument 1 names different: declaration 'demo' definition 'name'.esp-box-emu/components/doom/prboom/g_game.c Lines 1761 to 1766 in 7a41159 !Line: 1761 - style: Local variable 'i' shadows outer variable [shadowVariable]
!Line: 1716 - note: Shadowed declaration
!Line: 1761 - note: Shadow variableesp-box-emu/components/doom/prboom/g_game.c Lines 2458 to 2463 in 7a41159 !Line: 2458 - style: Local variable 'demo_p' shadows outer variable [shadowVariable]
!Line: 97 - note: Shadowed declaration
!Line: 2458 - note: Shadow variableesp-box-emu/components/doom/prboom/g_game.c Lines 997 to 1002 in 7a41159 !Line: 997 - style: Parameter 'mthing' can be declared as pointer to const [constParameterPointer]
!Maximum character count per GitHub comment has been reached! Not all warnings/errors has been parsed! |
…d; update to have menu / game perform better (doom) by adding appropriate sleeps in the main loop and audio task; update pool to be able to query if pointer is in pool or not
…ves/loads while still in menu
Description
Motivation and Context
Doom and the associated games are a lot of fun and are open-source so we should try to run them as well :)
They're also more graphically demanding and require more memory so they are a good test of the architecture and the memory management.
Note: doom, like the emulators, had to be heavily modified so that it did not declare a bunch of state variables on the stack (which would go into D/IRAM), but instead are pointers which we can allocate where we like (shared memory in D/IRAM, memory pool in romdata, or regular heap).
How has this been tested?
Build and run
mainon Box-Emu and Box-3-Emu. Test all the emulators and ensure they work. Test Doom and Ultimate Doom to ensure they work.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
doom_test-compressed.mp4
Doom:




Doom II:
Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.