mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
add global macro: gGrassSceneryTileLoopPosition
This commit is contained in:
@@ -326,7 +326,7 @@ void map_init(int size)
|
||||
map_element_set_terrain_edge(map_element, TERRAIN_EDGE_ROCK);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GRASS_SCENERY_TILEPOS, sint16) = 0;
|
||||
gGrassSceneryTileLoopPosition = 0;
|
||||
gWidePathTileLoopX = 0;
|
||||
gWidePathTileLoopY = 0;
|
||||
gMapSizeUnits = size * 32 - 32;
|
||||
@@ -4232,7 +4232,7 @@ void map_update_tiles()
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
uint16 interleaved_xy = RCT2_GLOBAL(RCT2_ADDRESS_GRASS_SCENERY_TILEPOS, sint16);
|
||||
uint16 interleaved_xy = gGrassSceneryTileLoopPosition;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
x = (x << 1) | (interleaved_xy & 1);
|
||||
interleaved_xy >>= 1;
|
||||
@@ -4246,8 +4246,8 @@ void map_update_tiles()
|
||||
scenery_update_tile(x * 32, y * 32);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GRASS_SCENERY_TILEPOS, sint16)++;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GRASS_SCENERY_TILEPOS, sint16) &= 0xFFFF;
|
||||
gGrassSceneryTileLoopPosition++;
|
||||
gGrassSceneryTileLoopPosition &= 0xFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,8 +267,9 @@ typedef struct {
|
||||
|
||||
extern const rct_xy16 TileDirectionDelta[];
|
||||
|
||||
#define gWidePathTileLoopX RCT2_GLOBAL(0x013CE774, uint16)
|
||||
#define gWidePathTileLoopY RCT2_GLOBAL(0x013CE776, uint16)
|
||||
#define gWidePathTileLoopX RCT2_GLOBAL(0x013CE774, uint16)
|
||||
#define gWidePathTileLoopY RCT2_GLOBAL(0x013CE776, uint16)
|
||||
#define gGrassSceneryTileLoopPosition RCT2_GLOBAL(RCT2_ADDRESS_GRASS_SCENERY_TILEPOS, uint16)
|
||||
|
||||
#define gMapSizeUnits RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)
|
||||
#define gMapSizeMinus2 RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, sint16)
|
||||
|
||||
Reference in New Issue
Block a user