X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=2d4e61d632948ed15d5d25e509c683bec6c6efa3;hb=e4b2e4f943c20af98956d30fd3014888e9f75416;hp=9c669ca6a6d563f98bf2ec3f0074f0958102855a;hpb=f5548497f854106cbd0aec58642649c94d91f6e3;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 9c669ca6..2d4e61d6 100644 --- a/src/main.h +++ b/src/main.h @@ -331,6 +331,11 @@ #define CH_SIDE_TOP_BOTTOM MV_VERTICAL #define CH_SIDE_ANY MV_ANY_DIRECTION +#define CH_SIDE_FROM_BUTTON(b) ((b) == MB_LEFTBUTTON ? CH_SIDE_LEFT : \ + (b) == MB_RIGHTBUTTON ? CH_SIDE_RIGHT : \ + (b) == MB_MIDDLEBUTTON ? CH_SIDE_TOP_BOTTOM : \ + CH_SIDE_NONE) + // values for change player for custom elements #define CH_PLAYER_NONE PLAYER_BITS_NONE #define CH_PLAYER_1 PLAYER_BITS_1 @@ -2570,7 +2575,7 @@ enum // program information and versioning definitions #define PROGRAM_VERSION_SUPER 4 #define PROGRAM_VERSION_MAJOR 2 -#define PROGRAM_VERSION_MINOR 2 +#define PROGRAM_VERSION_MINOR 3 #define PROGRAM_VERSION_PATCH 2 #define PROGRAM_VERSION_EXTRA "" @@ -3033,10 +3038,26 @@ struct ViewportInfo struct RectWithBorder door_2[NUM_SPECIAL_GFX_ARGS]; }; -struct HiScore +struct ScoreEntry +{ + char tape_basename[MAX_FILENAME_LEN + 1]; + char name[MAX_PLAYER_NAME_LEN + 1]; + int score; + int time; // time (in frames) or steps played +}; + +struct ScoreInfo { - char Name[MAX_PLAYER_NAME_LEN + 1]; - int Score; + int file_version; // file format version the score is stored with + int game_version; // game release version the score was created with + + char level_identifier[MAX_FILENAME_LEN + 1]; + int level_nr; + + int num_entries; + int last_added; + + struct ScoreEntry entry[MAX_SCORE_ENTRIES]; }; struct Content @@ -3102,6 +3123,7 @@ struct LevelInfo int time; // available time (seconds) int gems_needed; boolean auto_count_gems; + boolean rate_time_over_score; char name[MAX_LEVEL_NAME_LEN + 1]; char author[MAX_LEVEL_AUTHOR_LEN + 1]; @@ -3744,7 +3766,7 @@ extern boolean network_player_action_received; extern int graphics_action_mapping[]; extern struct LevelInfo level, level_template; -extern struct HiScore highscore[]; +extern struct ScoreInfo scores, server_scores; extern struct TapeInfo tape; extern struct GlobalInfo global; extern struct BorderInfo border;