Couple of random suggestions.
- In the "SETTINGS" submenu, after choosing "BACK", still have "SETTINGS" (re)selected.
- In menu.c, change "QUICKSAVE" and "QUICKLOAD" to respectively "QUICKSAVE (F6)" and "QUICKLOAD (F9)".
- If the above suggestion is accepted, in seg000.c, change
-----
#ifdef USE_QUICKSAVE
"To quick save/load, press F6/F9 in-game.\n"
"\n"
#endif
-----
to
-----
"In-game, the Esc key opens a settings menu.\n"
"\n"
-----
Or something similar, e.g.
"In-game, Esc and Backspace open a menu.\n"
"In-game, Esc opens a settings/quicksave menu.\n"
etc.
(The crux of the idea being that if the menu already includes quicksaving entries and explains its shortcuts, the splash screen is more informative if it mentions the menu.)
- For consistency, in menu.c, edit "Fix quick save in feather mode" to say quicksave (without the space).
- Feedback from gcc 11.3.0. In options.c, function load_dos_exe_modifications(), opcode - interestingly, for the "else if" - may be used uninitialized.
- Feedback from "cppcheck --force --language=c":
Code: Select all
lighting.c:42:96: error: Signed integer overflow for expression '0xFF<<24'. [integerOverflow]
screen_overlay = SDL_CreateRGBSurface(0, 320, 192, 32, 0xFF << 0, 0xFF << 8, 0xFF << 16, 0xFF << 24);
^
replay.c:212:4: error: Common realloc mistake: 'replay_list' nulled but not freed upon failure [memleakOnRealloc]
replay_list = realloc( replay_list, max_replay_files * sizeof( replay_info_type ) );
^
screenshot.c:581:113: error: Signed integer overflow for expression '0xFF<<24'. [integerOverflow]
SDL_Surface* map_surface = SDL_CreateRGBSurface(0, image_width, image_height, 32, 0xFF, 0xFF<<8, 0xFF<<16, 0xFF<<24);
^
seg000.c:2083:6: error: Used file that is not opened. [useClosedFile]
if (fwrite(&rem_tick, 1, 2, handle) != 2) goto loc_1D9B;
^
seg000.c:2084:6: error: Used file that is not opened. [useClosedFile]
if (fwrite(¤t_level, 1, 2, handle) != 2) goto loc_1D9B;
^
seg000.c:2085:6: error: Used file that is not opened. [useClosedFile]
if (fwrite(&hitp_beg_lev, 1, 2, handle) != 2) goto loc_1D9B;
^
seg009.c:2435:93: error: Signed integer overflow for expression '0xFF<<24'. [integerOverflow]
overlay_surface = SDL_CreateRGBSurface(0, 320, 200, 32, 0xFF, 0xFF << 8, 0xFF << 16, 0xFF << 24) ;
^
seg009.c:921:93: error: Signed integer overflow for expression '0xFF<<24'. [integerOverflow]
return SDL_CreateRGBSurface(0, rect->right, rect->bottom, 32, 0xFF, 0xFF<<8, 0xFF<<16, 0xFF<<24);
^
seg009.c:1733:139: error: Signed integer overflow for expression '0xFF<<24'. [integerOverflow]
SDL_Surface* peel_surface = SDL_CreateRGBSurface(0, rect->right - rect->left, rect->bottom - rect->top, 32, 0xFF, 0xFF<<8, 0xFF<<16, 0xFF<<24);
^
stb_vorbis.c:5411:0: error: failed to expand 'realloc', Wrong number of parameters for macro 'realloc'. [preprocessorErrorDirective]
data2 = (short *) realloc(data, total * sizeof(*data));
^
- SDLPoP's Makefile uses -std=gnu99, while apoplexy's Makefile uses -std=c99. My thinking for picking c99 was that gnu99 may decrease cross-platform compatibility. Simply because "gnu" is probably "GNU", which is mostly the Unix-like arena. But
I'm not sure if my reasoning was correct. It says
here that "-std=gnu99 (for C99 with GNU extensions)", which would make c99 a subset of gnu99, and thus c99 might be more widely supported. SDLPoP's Makefile seems to work fine with -std=c99, so you may consider looking into using that, to make it less likely that coders will ever unknowingly use GNU extensions.