mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Integrate animation objects
This commit is contained in:
@@ -250,7 +250,6 @@
|
||||
#define RCT2_ADDRESS_SAVED_VIEW_ZOOM 0x0138869E
|
||||
#define RCT2_ADDRESS_SAVED_VIEW_ROTATION 0x0138869F
|
||||
#define RCT2_ADDRESS_SCENARIO_COMPLETED_BY 0x013587D8
|
||||
#define RCT2_ADDRESS_NUM_MAP_ANIMATIONS 0x0138B580
|
||||
#define RCT2_ADDRESS_RIDE_MEASUREMENTS 0x0138B60C
|
||||
|
||||
#define RCT2_ADDRESS_GRASS_SCENERY_TILEPOS 0x013B0E70
|
||||
@@ -589,6 +588,7 @@
|
||||
#define RCT2_ADDRESS_PARK_SIZE 0x013580EA
|
||||
#define RCT2_ADDRESS_LAND_COST 0x01358770
|
||||
#define RCT2_ADDRESS_CONSTRUCTION_RIGHTS_COST 0x01358772
|
||||
#define RCT2_ADDRESS_NUM_MAP_ANIMATIONS 0x0138B580
|
||||
|
||||
#define RCT2_ADDRESS_CLIMATE 0x013CA746
|
||||
#define RCT2_ADDRESS_CURRENT_WEATHER 0x013CA74A
|
||||
|
||||
@@ -393,7 +393,6 @@ void S6Exporter::Export()
|
||||
_s6.saved_view_zoom = gSavedViewZoom;
|
||||
_s6.saved_view_rotation = gSavedViewRotation;
|
||||
memcpy(_s6.map_animations, gAnimatedObjects, sizeof(_s6.map_animations));
|
||||
// rct1_map_animations
|
||||
_s6.num_map_animations = gNumMapAnimations;
|
||||
// pad_0138B582
|
||||
|
||||
|
||||
@@ -311,7 +311,6 @@ void S6Importer::Import()
|
||||
gSavedViewZoom = _s6.saved_view_zoom;
|
||||
gSavedViewRotation = _s6.saved_view_rotation;
|
||||
memcpy(gAnimatedObjects, _s6.map_animations, sizeof(_s6.map_animations));
|
||||
// rct1_map_animations
|
||||
gNumMapAnimations = _s6.num_map_animations;
|
||||
// pad_0138B582
|
||||
|
||||
|
||||
@@ -293,8 +293,7 @@ typedef struct rct_s6_data {
|
||||
uint16 saved_view_y;
|
||||
uint8 saved_view_zoom;
|
||||
uint8 saved_view_rotation;
|
||||
rct_map_animation map_animations[1000];
|
||||
rct_map_animation rct1_map_animations[1000];
|
||||
rct_map_animation map_animations[2000];
|
||||
uint16 num_map_animations;
|
||||
uint8 pad_0138B582[2];
|
||||
rct_ride_rating_calc_data ride_ratings_calc_data;
|
||||
|
||||
@@ -31,7 +31,8 @@ static bool map_animation_invalidate(rct_map_animation *obj);
|
||||
|
||||
static const map_animation_invalidate_event_handler _animatedObjectEventHandlers[MAP_ANIMATION_TYPE_COUNT];
|
||||
|
||||
rct_map_animation *gAnimatedObjects = RCT2_ADDRESS(0x013886A0, rct_map_animation);
|
||||
uint16 gNumMapAnimations;
|
||||
rct_map_animation gAnimatedObjects[MAX_ANIMATED_OBJECTS];
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -46,7 +47,7 @@ void map_animation_create(int type, int x, int y, int z)
|
||||
{
|
||||
rct_map_animation *aobj = &gAnimatedObjects[0];
|
||||
int numAnimatedObjects = gNumMapAnimations;
|
||||
if (numAnimatedObjects >= 2000) {
|
||||
if (numAnimatedObjects >= MAX_ANIMATED_OBJECTS) {
|
||||
log_error("Exceeded the maximum number of animations");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,10 @@ enum {
|
||||
MAP_ANIMATION_TYPE_COUNT
|
||||
};
|
||||
|
||||
#define gNumMapAnimations RCT2_GLOBAL(RCT2_ADDRESS_NUM_MAP_ANIMATIONS, uint16)
|
||||
#define MAX_ANIMATED_OBJECTS 2000
|
||||
|
||||
extern rct_map_animation *gAnimatedObjects;
|
||||
extern uint16 gNumMapAnimations;
|
||||
extern rct_map_animation gAnimatedObjects[MAX_ANIMATED_OBJECTS];
|
||||
|
||||
void map_animation_create(int type, int x, int y, int z);
|
||||
void map_animation_invalidate_all();
|
||||
|
||||
Reference in New Issue
Block a user