From: Holger Schemel Date: Sat, 20 May 2017 18:46:02 +0000 (+0200) Subject: added support for separate animations for 'old' (entered from main menu) and 'new... X-Git-Tag: 4.0.1.0~41 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b59d111d850aa928e2a839ba026adde64927d5a5;p=rocksndiamonds.git added support for separate animations for 'old' (entered from main menu) and 'new' (entered after successfully played game) scores screen --- diff --git a/src/anim.c b/src/anim.c index 7464637d..37c7193c 100644 --- a/src/anim.c +++ b/src/anim.c @@ -29,20 +29,25 @@ #define ANIM_CLASS_BIT_TITLE_INITIAL 0 #define ANIM_CLASS_BIT_TITLE 1 #define ANIM_CLASS_BIT_MAIN 2 -#define ANIM_CLASS_BIT_SUBMENU 3 -#define ANIM_CLASS_BIT_MENU 4 -#define ANIM_CLASS_BIT_TOONS 5 +#define ANIM_CLASS_BIT_SCORES 3 +#define ANIM_CLASS_BIT_SUBMENU 4 +#define ANIM_CLASS_BIT_MENU 5 +#define ANIM_CLASS_BIT_TOONS 6 -#define NUM_ANIM_CLASSES 6 +#define NUM_ANIM_CLASSES 7 #define ANIM_CLASS_NONE 0 #define ANIM_CLASS_TITLE_INITIAL (1 << ANIM_CLASS_BIT_TITLE_INITIAL) #define ANIM_CLASS_TITLE (1 << ANIM_CLASS_BIT_TITLE) #define ANIM_CLASS_MAIN (1 << ANIM_CLASS_BIT_MAIN) +#define ANIM_CLASS_SCORES (1 << ANIM_CLASS_BIT_SCORES) #define ANIM_CLASS_SUBMENU (1 << ANIM_CLASS_BIT_SUBMENU) #define ANIM_CLASS_MENU (1 << ANIM_CLASS_BIT_MENU) #define ANIM_CLASS_TOONS (1 << ANIM_CLASS_BIT_TOONS) +#define ANIM_CLASS_TOONS_SCORES (ANIM_CLASS_TOONS | \ + ANIM_CLASS_SCORES) + #define ANIM_CLASS_TOONS_MENU_MAIN (ANIM_CLASS_TOONS | \ ANIM_CLASS_MENU | \ ANIM_CLASS_MAIN) @@ -165,7 +170,8 @@ struct GameModeAnimClass { GAME_MODE_SETUP, ANIM_CLASS_TOONS_MENU_SUBMENU }, { GAME_MODE_PSEUDO_MAINONLY, ANIM_CLASS_TOONS_MENU_MAIN }, { GAME_MODE_PSEUDO_TYPENAME, ANIM_CLASS_TOONS_MENU_MAIN }, - { GAME_MODE_SCORES, ANIM_CLASS_TOONS }, + { GAME_MODE_PSEUDO_SCORESOLD, ANIM_CLASS_TOONS_SCORES }, + { GAME_MODE_PSEUDO_SCORESNEW, ANIM_CLASS_TOONS_SCORES }, { -1, -1 } }; @@ -179,6 +185,7 @@ struct AnimClassGameMode { ANIM_CLASS_BIT_TITLE_INITIAL, GAME_MODE_TITLE_INITIAL }, { ANIM_CLASS_BIT_TITLE, GAME_MODE_TITLE }, { ANIM_CLASS_BIT_MAIN, GAME_MODE_MAIN }, + { ANIM_CLASS_BIT_SCORES, GAME_MODE_SCORES }, { ANIM_CLASS_BIT_SUBMENU, GAME_MODE_PSEUDO_SUBMENU }, { ANIM_CLASS_BIT_MENU, GAME_MODE_PSEUDO_MENU }, { ANIM_CLASS_BIT_TOONS, GAME_MODE_PSEUDO_TOONS }, diff --git a/src/main.c b/src/main.c index e24e0b73..690296dd 100644 --- a/src/main.c +++ b/src/main.c @@ -5534,6 +5534,8 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { ".SUBMENU", GFX_SPECIAL_ARG_SUBMENU, }, { ".MENU", GFX_SPECIAL_ARG_MENU, }, { ".TOONS", GFX_SPECIAL_ARG_TOONS, }, + { ".SCORESOLD", GFX_SPECIAL_ARG_SCORESOLD, }, + { ".SCORESNEW", GFX_SPECIAL_ARG_SCORESNEW, }, { ".FADING", GFX_SPECIAL_ARG_FADING, }, { ".QUIT", GFX_SPECIAL_ARG_QUIT, }, diff --git a/src/main.h b/src/main.h index e55f4c19..e93b5126 100644 --- a/src/main.h +++ b/src/main.h @@ -1838,10 +1838,12 @@ #define GFX_SPECIAL_ARG_SUBMENU 29 #define GFX_SPECIAL_ARG_MENU 30 #define GFX_SPECIAL_ARG_TOONS 31 -#define GFX_SPECIAL_ARG_FADING 32 -#define GFX_SPECIAL_ARG_QUIT 33 +#define GFX_SPECIAL_ARG_SCORESOLD 32 +#define GFX_SPECIAL_ARG_SCORESNEW 33 +#define GFX_SPECIAL_ARG_FADING 34 +#define GFX_SPECIAL_ARG_QUIT 35 -#define NUM_SPECIAL_GFX_ARGS 34 +#define NUM_SPECIAL_GFX_ARGS 36 /* these additional definitions are currently only used for draw offsets */ #define GFX_SPECIAL_ARG_INFO_MAIN 0 @@ -2058,10 +2060,12 @@ #define GAME_MODE_PSEUDO_SUBMENU 29 #define GAME_MODE_PSEUDO_MENU 30 #define GAME_MODE_PSEUDO_TOONS 31 -#define GAME_MODE_PSEUDO_FADING 32 -#define GAME_MODE_QUIT 33 +#define GAME_MODE_PSEUDO_SCORESOLD 32 +#define GAME_MODE_PSEUDO_SCORESNEW 33 +#define GAME_MODE_PSEUDO_FADING 34 +#define GAME_MODE_QUIT 35 -#define NUM_GAME_MODES 34 +#define NUM_GAME_MODES 36 /* special definitions currently only used for custom artwork configuration */ #define MUSIC_PREFIX_BACKGROUND 0 diff --git a/src/screens.c b/src/screens.c index 0f47d876..3703935f 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4198,6 +4198,8 @@ void DrawHallOfFame(int highlight_position) if (highlight_position < 0) LoadScore(level_nr); + else + SetAnimStatus(GAME_MODE_PSEUDO_SCORESNEW); FadeSetEnterScreen(); diff --git a/src/tools.c b/src/tools.c index e0e7985c..f907d5dd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -8547,6 +8547,8 @@ void SetAnimStatus(int anim_status_new) { if (anim_status_new == GAME_MODE_MAIN) anim_status_new = GAME_MODE_PSEUDO_MAINONLY; + else if (anim_status_new == GAME_MODE_SCORES) + anim_status_new = GAME_MODE_PSEUDO_SCORESOLD; global.anim_status_next = anim_status_new;