1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Identify fade sprites

This commit is contained in:
Marijn van der Werf
2016-08-01 19:28:22 +02:00
parent 7befcd3649
commit cd00c0de31
2 changed files with 25 additions and 4 deletions

View File

@@ -31,6 +31,17 @@ rct_gx g2;
rct_g1_element *g1Elements = (rct_g1_element*)RCT2_ADDRESS_G1_ELEMENTS;
#endif
static const uint32 fadeSprites[] = {
SPR_NONE,
SPR_FADE_1,
SPR_FADE_2,
SPR_FADE_3,
SPR_FADE_4,
SPR_FADE_5,
SPR_FADE_6,
SPR_FADE_7,
};
static void read_and_convert_gxdat(SDL_RWops *file, size_t count, rct_g1_element *elements)
{
rct_g1_element_32bit *g1Elements32 = calloc(count, sizeof(rct_g1_element_32bit));
@@ -179,9 +190,13 @@ int gfx_load_g2()
*/
void sub_68371D()
{
unk_9E3CE4[0] = NULL;
for (int i = 1; i < 8; i++) {
unk_9E3CE4[i] = g1Elements[23199 + i].offset;
for (int i = 0; i < countof(fadeSprites); i++) {
const uint32 spriteId = fadeSprites[i];
if (spriteId == SPR_NONE) {
unk_9E3CE4[i] = NULL;
} else {
unk_9E3CE4[i] = g1Elements[fadeSprites[i]].offset;
}
}
}

View File

@@ -665,7 +665,13 @@ enum {
SPR_RATING_LOW = 23197,
SPR_RATING_HIGH = 23198,
SPR_MENU_CHECKMARK = 23199,
SPR_FADE_1 = 23200,
SPR_FADE_2 = 23201,
SPR_FADE_3 = 23202,
SPR_FADE_4 = 23203,
SPR_FADE_5 = 23204,
SPR_FADE_6 = 23205,
SPR_FADE_7 = 23206,
SPR_MENU_NEW_GAME = 23207,
SPR_MENU_LOAD_GAME = 23208,
SPR_MENU_TUTORIAL = 23209,