convert line ends
[canaan.git] / prj / cam / src / framewrk / dbfile.h
blobef41692753f6541f67144af70303b2f1c3cbe749
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/framewrk/dbfile.h,v 1.10 2000/01/29 13:20:34 adurant Exp $
7 #pragma once
9 #ifndef __DBFILE_H
10 #define __DBFILE_H
11 #include <dbtype.h>
14 // Functions for saving and loading
16 // both use the save_dir config variable
17 // Load uses the load_path variable as well.
19 // Takes the mask of which database components to save/load,
20 // returns the mask of the ones successfully saved/loaded
22 // (see dbtype.h)
27 EXTERN edbFiletype dbSave(const char* filename, edbFiletype filemask); // Save the database
28 EXTERN edbFiletype dbLoad(const char* filename, edbFiletype filemask); // Load the database
30 EXTERN edbFiletype dbMergeLoad(const char* filename, edbFiletype filemask); // Merge-in a database.
33 // Find a file in the db path
35 EXTERN BOOL dbFind(const char* filename, char* filebuf);
38 // Fill out the buffer with the current filename
40 EXTERN void dbCurrentFile(char *buf, int len);
41 EXTERN void dbSetCurrentFile(char *buf);
44 // Get the current file number since the last reset
46 EXTERN int dbCurrentFilenum();
49 // Reset the database
52 EXTERN void dbReset(void);
55 // Build the "default" database
58 EXTERN void dbBuildDefault(void);
60 #define DB_FILE_SUFFIX "COW"
61 #define DB_MISSION_SUFFIX "MIS"
62 #define DB_MAP_SUFFIX "MAP"
63 #define DB_GAMESYS_SUFFIX "GAM"
64 #define DB_FILE_DIR_VAR "save_dir"
66 EXTERN void dbfile_setup_commands(void);
69 #endif // __DBFILE_H