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

Conditionally integrate sprite list so original drawing still works

This commit is contained in:
Ted John
2016-09-12 18:56:52 +01:00
parent 9f61321308
commit aa310f6544
5 changed files with 18 additions and 5 deletions

0
' Normal file
View File

0
a Normal file
View File

View File

@@ -212,6 +212,10 @@
#define RCT2_ADDRESS_RIDE_FLAGS 0x0097CF40
#define RCT2_ADDRESS_SPRITE_LIST 0x010E63BC
#define RCT2_ADDRESS_SPRITE_LISTS_HEAD 0x013573BC
#define RCT2_ADDRESS_SPRITE_LISTS_COUNT 0x013573C8
//How many ticks the scenario has existed for
#define RCT2_ADDRESS_SAVED_VIEW_X 0x0138869A
#define RCT2_ADDRESS_SAVED_VIEW_Y 0x0138869C
@@ -514,9 +518,6 @@
#define RCT2_ADDRESS_PARK_NAME 0x013573D4
#define RCT2_ADDRESS_PARK_NAME_ARGS 0x013573D8
#define RCT2_ADDRESS_PEEP_WARNING_THROTTLE 0x01358750
#define RCT2_ADDRESS_SPRITE_LIST 0x010E63BC
#define RCT2_ADDRESS_SPRITE_LISTS_HEAD 0x013573BC
#define RCT2_ADDRESS_SPRITE_LISTS_COUNT 0x013573C8
#define RCT2_ADDRESS_PARK_FLAGS 0x013573E4
#define RCT2_ADDRESS_PARK_ENTRANCE_FEE 0x013573E8
#define RCT2_ADDRESS_GUESTS_IN_PARK 0x01357844

View File

@@ -26,11 +26,17 @@
#include "fountain.h"
#include "sprite.h"
#if NO_RCT2
uint16 gSpriteListHead[6];
uint16 gSpriteListCount[6];
uint16 gSpriteSpatialIndex[0x10001];
static rct_sprite _spriteList[MAX_SPRITES];
#else
uint16 *gSpriteListHead = RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LISTS_HEAD, uint16);
uint16 *gSpriteListCount = RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LISTS_COUNT, uint16);
static rct_sprite *_spriteList = RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite);
#endif
uint16 gSpriteSpatialIndex[0x10001];
rct_sprite *get_sprite(size_t sprite_idx)
{

View File

@@ -404,8 +404,14 @@ rct_sprite *get_sprite(size_t sprite_idx);
// rct2: 0x00982708
extern rct_sprite_entry g_sprite_entries[48];
#if NO_RCT2
extern uint16 gSpriteListHead[6];
extern uint16 gSpriteListCount[6];
#else
extern uint16 *gSpriteListHead;
extern uint16 *gSpriteListCount;
#endif
extern uint16 gSpriteSpatialIndex[0x10001];
rct_sprite *create_sprite(uint8 bl);