mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Clean up animated object limit and import
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "world/banner.h"
|
||||
#include "world/map.h"
|
||||
#include "world/sprite.h"
|
||||
#include "world/map_animation.h"
|
||||
|
||||
#define RCT1_MAX_MAP_ELEMENTS 0xC000
|
||||
#define RCT1_MAX_SPRITES 5000
|
||||
@@ -33,6 +34,7 @@
|
||||
#define RCT1_MAX_RIDES_IN_PARK 128
|
||||
#define RCT1_MAX_STAFF 116
|
||||
#define RCT1_RESEARCH_FLAGS_SEPARATOR 0xFF
|
||||
#define RCT1_MAX_ANIMATED_OBJECTS 1000
|
||||
|
||||
typedef struct ParkLoadResult ParkLoadResult;
|
||||
|
||||
@@ -712,7 +714,7 @@ typedef struct rct1_s4 {
|
||||
uint16 view_y;
|
||||
uint8 view_zoom;
|
||||
uint8 view_rotation;
|
||||
uint8 map_animations[6000];
|
||||
rct_map_animation map_animations[RCT1_MAX_ANIMATED_OBJECTS];
|
||||
uint32 num_map_animations;
|
||||
uint8 unk_1CADBC[12];
|
||||
uint16 scrolling_text_step;
|
||||
|
||||
@@ -1702,8 +1702,8 @@ private:
|
||||
void ImportMapAnimations()
|
||||
{
|
||||
// This is sketchy, ideally we should try to re-create them
|
||||
rct_map_animation * s4Animations = (rct_map_animation*)_s4.map_animations;
|
||||
for (size_t i = 0; i < 1000; i++)
|
||||
rct_map_animation * s4Animations = _s4.map_animations;
|
||||
for (size_t i = 0; i < RCT1_MAX_ANIMATED_OBJECTS; i++)
|
||||
{
|
||||
gAnimatedObjects[i] = s4Animations[i];
|
||||
gAnimatedObjects[i].baseZ /= 2;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define RCT2_CUSTOMER_HISTORY_SIZE 10
|
||||
#define RCT2_MAX_SPRITES 10000
|
||||
#define RCT2_MAX_MAP_ELEMENTS 0x30000
|
||||
#define RCT2_MAX_ANIMATED_OBJECTS 2000
|
||||
|
||||
|
||||
typedef struct rct2_install_info {
|
||||
|
||||
@@ -358,7 +358,11 @@ public:
|
||||
gSavedViewY = _s6.saved_view_y;
|
||||
gSavedViewZoom = _s6.saved_view_zoom;
|
||||
gSavedViewRotation = _s6.saved_view_rotation;
|
||||
memcpy(gAnimatedObjects, _s6.map_animations, sizeof(_s6.map_animations));
|
||||
|
||||
for (size_t i = 0; i < RCT2_MAX_ANIMATED_OBJECTS; i++)
|
||||
{
|
||||
gAnimatedObjects[i] = _s6.map_animations[i];
|
||||
}
|
||||
gNumMapAnimations = _s6.num_map_animations;
|
||||
// pad_0138B582
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ typedef struct rct_s6_data {
|
||||
uint16 saved_view_y;
|
||||
uint8 saved_view_zoom;
|
||||
uint8 saved_view_rotation;
|
||||
rct_map_animation map_animations[2000];
|
||||
rct_map_animation map_animations[RCT2_MAX_ANIMATED_OBJECTS];
|
||||
uint16 num_map_animations;
|
||||
uint8 pad_0138B582[2];
|
||||
rct_ride_rating_calc_data ride_ratings_calc_data;
|
||||
|
||||
Reference in New Issue
Block a user