mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
refactor map size
This commit is contained in:
@@ -686,7 +686,7 @@ int backup_map(){
|
||||
uint8* backup_info = RCT2_GLOBAL(0xF440F5, uint8*);
|
||||
*(uint32*)backup_info = RCT2_GLOBAL(0x0140E9A4, uint32);
|
||||
*(uint16*)(backup_info + 4) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16);
|
||||
*(uint16*)(backup_info + 6) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAXIMUM_X_Y, uint16);
|
||||
*(uint16*)(backup_info + 6) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, uint16);
|
||||
*(uint16*)(backup_info + 8) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16);
|
||||
*(uint32*)(backup_info + 10) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32);
|
||||
return 1;
|
||||
@@ -703,7 +703,7 @@ void reload_map_backup(){
|
||||
uint8* backup_info = RCT2_GLOBAL(0xF440F5, uint8*);
|
||||
RCT2_GLOBAL(0x0140E9A4, uint32) = *(uint32*)backup_info;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16) = *(uint16*)(backup_info + 4);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAXIMUM_X_Y, uint16) = *(uint16*)(backup_info + 6);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, uint16) = *(uint16*)(backup_info + 6);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) = *(uint16*)(backup_info + 8);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32) = *(uint32*)(backup_info + 10);
|
||||
|
||||
@@ -718,7 +718,7 @@ void blank_map(){
|
||||
// These values were previously allocated in backup map but
|
||||
// it seems more fitting to place in this function
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16) = 0x1FE0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAXIMUM_X_Y, uint16) = 0x20FE;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, uint16) = 0x20FE;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) = 0x100;
|
||||
|
||||
rct_map_element* map_element;
|
||||
|
||||
Reference in New Issue
Block a user