TODO:
DOCS: UNKNOWN: Add links to definitions of stuff
CODE: UNKNOWN: Fill in/remove remaining stub functions in game.c
CODE: UNKNOWN: Error handling when loading stuff is dodgy? Game may crash when trying to load again
DOCS: LONG: Design highscores system
MUST-CODE: MED: Loading bar on loading screen? Will probably need some form of progress indicator for map generation, etc. LOADING command can specify number of LOAD* commands that will follow, and bar can be split into appropriate number of sections. Each LOAD command will first count how many files match the wildcard, thus splitting bar further and advancing one stage per file
CODE: UNKNOWN: Remove UI path, as suggested in initial design doc?
CODE: MED: Cause errors for mistakes in ped/car type files, simpscript failing to find an INCLUDE, etc.
MUST-CODE: QUICK: Config UI for altering message_speed value
MUST-CODE: MED: Better error handling. Return to wimp, display error message (just generic or actual error text?), etc. Maybe move the error handler out of sndbuf and make it handle everything.
DOCS: UNKNOWN: Work out stderr solution. Leaving it unredirected fools game into thinking it's not in the wimp; disabling startup message will produce screen spam due to debug messages. Redirecting to file/null causes WIMP error boxes to be supressed when an uncaught error occurs. So just disable debug output for all builds that don't redirect stderr? Maybe introduce command line switch to enable debug output? Or use improved error handler to trigger error message for us? etc.
DOCS: UNKNOWN: Possible to use AppAcc for something? http://homepage.ntlworld.com/rik.griffin/appacc.html
DOCS: UNKNOWN: There's a lot of definition files (cars, peds, zones, etc.) that all share similar code for loading & storing. Maybe write generic manager code that handles all that stuff? Can have one big structure containing a cache of all the files, a type flag for each file, and getter functions that return the file of the right type & name, optionally loading it or calling a callback function, callback functions to deal with loading the file in the first place, etc. i.e.:
#ifndef _RES_H
#define _RES_H
typedef struct {
int flags; /* Can force load, etc. */
int path; /* Path type number */
int (*canflush)(void *ptr); /* True if we can flush this */
void (*free)(void *ptr); /* Delete this */
void (*load)(char *path,char *leaf); /* Load file */
} restype;
void res_reset(); /* Get rid of everything */
void res_flush(); /* Get rid of what can be gotten rid of */
void red_load(int type,char *path,char *leaf); /* Load a file */
void *res_get(int type,char *name); /* Get ptr to loaded file (possibly loading it if not loaded already) Possibly increasing refs, if supported */
void res_free(int type,void *ptr); /* Decrease refs for file */
void res_add(int type,char *name,void *ptr); /* Callback for use by resource type code; adds an entry to the res list */
#endif
MUST-CODE: MED: Cardefs aren't getting reloaded when starting a new game? Possible resource leak? Game was trying to use bad sound effects one time, so probably cardefs to blame.
MUST-CODE: UNKNOWN: Memory leak somewhere in gameplay?
MUST-CODE: MED: Check for any instances where chars are used to store map coords - there's no reason to limit the engine to 256x256!
MUST-CODE: MED: Fix bugs to do with starting new games
MUST-DOCS: LONG: Improve stronghelp doc pages to have better layouts (add more sub-pages to list cardef/peddef/etc. attribute details instead of listing them all on the main pages?)
MUST-CODE: MED: Code to handle running out of memory!
???
Profit!