mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add some max constants for RCT1
This commit is contained in:
parent
3037e6fb59
commit
9c11b051ee
|
@ -26,6 +26,9 @@
|
||||||
#include "world/map.h"
|
#include "world/map.h"
|
||||||
#include "world/sprite.h"
|
#include "world/sprite.h"
|
||||||
|
|
||||||
|
#define RCT1_MAX_MAP_ELEMENTS 0xC000
|
||||||
|
#define RCT1_MAX_SPRITES 5000
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
typedef struct rct1_entrance {
|
typedef struct rct1_entrance {
|
||||||
uint16 x;
|
uint16 x;
|
||||||
|
@ -414,9 +417,9 @@ typedef struct rct1_s4 {
|
||||||
uint32 ticks;
|
uint32 ticks;
|
||||||
uint32 random_a;
|
uint32 random_a;
|
||||||
uint32 random_b;
|
uint32 random_b;
|
||||||
rct_map_element map_elements[0xC000];
|
rct_map_element map_elements[RCT1_MAX_MAP_ELEMENTS];
|
||||||
uint32 unk_counter;
|
uint32 unk_counter;
|
||||||
rct1_sprite sprites[5000];
|
rct1_sprite sprites[RCT1_MAX_SPRITES];
|
||||||
uint16 next_sprite_index;
|
uint16 next_sprite_index;
|
||||||
uint16 first_vehicle_sprite_index;
|
uint16 first_vehicle_sprite_index;
|
||||||
uint16 first_peep_sprite_index;
|
uint16 first_peep_sprite_index;
|
||||||
|
|
|
@ -789,7 +789,7 @@ private:
|
||||||
|
|
||||||
void ImportPeeps()
|
void ImportPeeps()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < RCT1_MAX_SPRITES; i++)
|
||||||
{
|
{
|
||||||
if (_s4.sprites[i].unknown.sprite_identifier == SPRITE_IDENTIFIER_PEEP)
|
if (_s4.sprites[i].unknown.sprite_identifier == SPRITE_IDENTIFIER_PEEP)
|
||||||
{
|
{
|
||||||
|
@ -941,7 +941,7 @@ private:
|
||||||
|
|
||||||
void ImportLitter()
|
void ImportLitter()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < RCT1_MAX_SPRITES; i++)
|
||||||
{
|
{
|
||||||
if (_s4.sprites[i].unknown.sprite_identifier == SPRITE_IDENTIFIER_LITTER) {
|
if (_s4.sprites[i].unknown.sprite_identifier == SPRITE_IDENTIFIER_LITTER) {
|
||||||
rct_litter *srcLitter = &_s4.sprites[i].litter;
|
rct_litter *srcLitter = &_s4.sprites[i].litter;
|
||||||
|
@ -1076,7 +1076,7 @@ private:
|
||||||
|
|
||||||
void ImportMapElements()
|
void ImportMapElements()
|
||||||
{
|
{
|
||||||
memcpy(gMapElements, _s4.map_elements, 0xC000 * sizeof(rct_map_element));
|
memcpy(gMapElements, _s4.map_elements, RCT1_MAX_MAP_ELEMENTS * sizeof(rct_map_element));
|
||||||
ClearExtraTileEntries();
|
ClearExtraTileEntries();
|
||||||
FixColours();
|
FixColours();
|
||||||
FixZ();
|
FixZ();
|
||||||
|
|
Loading…
Reference in New Issue