X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=497a39585cd8091f30ac48d491cec08371072c21;hb=b13dc8e30a0c07bea53bf168ae6d1017394d3c22;hp=68a540b3e9b293c259874e2b018498f55e7895ba;hpb=838825e11f7e4af0947bf9d40061defd4e499017;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 68a540b3..497a3958 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -131,6 +131,9 @@ /* default text for non-existant artwork */ #define NOT_AVAILABLE "(not available)" +/* default value for undefined filename */ +#define UNDEFINED_FILENAME "[NONE]" + /* default name for new levels */ #define NAMELESS_LEVEL_NAME "nameless level" @@ -358,10 +361,14 @@ struct SetupInfo }; #define TREE_TYPE_GENERIC 0 -#define TREE_TYPE_LEVEL_DIR 1 -#define TREE_TYPE_GRAPHICS_DIR 2 -#define TREE_TYPE_SOUNDS_DIR 3 -#define TREE_TYPE_MUSIC_DIR 4 +#define TREE_TYPE_GRAPHICS_DIR 1 +#define TREE_TYPE_SOUNDS_DIR 2 +#define TREE_TYPE_MUSIC_DIR 3 +#define TREE_TYPE_LEVEL_DIR 4 + +#define ARTWORK_TYPE_GRAPHICS TREE_TYPE_GRAPHICS_DIR +#define ARTWORK_TYPE_SOUNDS TREE_TYPE_SOUNDS_DIR +#define ARTWORK_TYPE_MUSIC TREE_TYPE_MUSIC_DIR struct TreeInfo { @@ -386,6 +393,13 @@ struct TreeInfo char *author; /* level or artwork author name */ char *imported_from; /* optional comment for imported levels or artwork */ + char *graphics_set; /* optional custom graphics set (level tree only) */ + char *sounds_set; /* optional custom sounds set (level tree only) */ + char *music_set; /* optional custom music set (level tree only) */ + char *graphics_path; /* path to optional custom graphics set (level only) */ + char *sounds_path; /* path to optional custom sounds set (level only) */ + char *music_path; /* path to optional custom music set (level only) */ + int levels; /* number of levels in level series */ int first_level; /* first level number (to allow start with 0 or 1) */ int last_level; /* last level number (automatically calculated) */ @@ -422,6 +436,47 @@ struct ArtworkInfo char *mus_current_identifier; }; +struct ConfigInfo +{ + char *token; + char *value; +}; + +struct FileInfo +{ + char *token; + + char *default_filename; + char *filename; + + int *default_parameter; /* array of file parameters */ + int *parameter; /* array of file parameters */ +}; + +struct ListNodeInfo +{ + char *source_filename; /* primary key for node list */ + int num_references; +}; + +struct ArtworkListInfo +{ + int type; /* type of artwork */ + + int num_file_list_entries; + int num_suffix_list_entries; + + struct FileInfo *file_list; /* static artwork file array */ + char **suffix_list; /* parameter suffixes array */ + + struct ListNodeInfo **artwork_list; /* static artwork node array */ + + struct ListNode *content_list; /* dynamic artwork node list */ + + void *(*load_artwork)(char *); /* constructor function */ + void (*free_artwork)(void *); /* destructor function */ +}; + /* ========================================================================= */ /* exported variables */