hal.h
changeset 4223 0f9535dda7ed
parent 4221 bb06fe8dcce2
child 5167 2b9d61386688
equal deleted inserted replaced
4222:951fbf19b1ad 4223:0f9535dda7ed
    42 	MUSIC_DRIVER = 2,
    42 	MUSIC_DRIVER = 2,
    43 };
    43 };
    44 
    44 
    45 void GameLoop(void);
    45 void GameLoop(void);
    46 
    46 
    47 
       
    48 // Deals with finding savegames
       
    49 typedef struct {
       
    50 	byte type;
       
    51 	uint64 mtime;
       
    52 	char title[64];
       
    53 	char name[256-12-64];
       
    54 } FiosItem;
       
    55 
       
    56 enum {
       
    57 	FIOS_TYPE_DRIVE = 0,
       
    58 	FIOS_TYPE_PARENT = 1,
       
    59 	FIOS_TYPE_DIR = 2,
       
    60 	FIOS_TYPE_FILE = 3,
       
    61 	FIOS_TYPE_OLDFILE = 4,
       
    62 	FIOS_TYPE_SCENARIO = 5,
       
    63 	FIOS_TYPE_OLD_SCENARIO = 6,
       
    64 	FIOS_TYPE_DIRECT = 7,
       
    65 	FIOS_TYPE_INVALID = 255,
       
    66 };
       
    67 
       
    68 
       
    69 // Variables to display file lists
       
    70 FiosItem *_fios_list;
       
    71 int _fios_num;
       
    72 int _saveload_mode;
       
    73 
       
    74 // get the name of an oldstyle savegame
       
    75 void GetOldSaveGameName(char *title, const char *path, const char *file);
       
    76 
       
    77 // Get a list of savegames
       
    78 FiosItem *FiosGetSavegameList(int *num, int mode);
       
    79 // Get a list of scenarios
       
    80 FiosItem *FiosGetScenarioList(int *num, int mode);
       
    81 // Free the list of savegames
       
    82 void FiosFreeSavegameList(void);
       
    83 // Browse to. Returns a filename w/path if we reached a file.
       
    84 char *FiosBrowseTo(const FiosItem *item);
       
    85 // Return path, free space and stringID
       
    86 StringID FiosGetDescText(const char **path, uint32 *tot);
       
    87 // Delete a name
       
    88 bool FiosDelete(const char *name);
       
    89 // Make a filename from a name
       
    90 void FiosMakeSavegameName(char *buf, const char *name, size_t size);
       
    91 // Allocate a new FiosItem
       
    92 FiosItem *FiosAlloc(void);
       
    93 
       
    94 int CDECL compare_FiosItems(const void *a, const void *b);
       
    95 
       
    96 void CreateConsole(void);
    47 void CreateConsole(void);
    97 
    48 
    98 #if defined(WIN32) || defined(WIN64) || defined(__WATCOMC__)
    49 #if defined(WIN32) || defined(WIN64) || defined(__WATCOMC__)
    99 # define FS2OTTD(name) name
    50 # define FS2OTTD(name) name
   100 # define OTTD2FS(name) name
    51 # define OTTD2FS(name) name