mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Name / define RCT2 addresses
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "hook.h"
|
||||
#include "PaintIntercept.hpp"
|
||||
#include "FunctionCall.hpp"
|
||||
#include "TestPaint.hpp"
|
||||
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/interface/viewport.h>
|
||||
@@ -279,9 +280,9 @@ namespace PaintIntercept {
|
||||
}
|
||||
|
||||
LocationXYZ16 boundOffset = {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Y, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Z, sint16)
|
||||
RCT2_PaintBoundBoxOffsetX,
|
||||
RCT2_PaintBoundBoxOffsetY,
|
||||
RCT2_PaintBoundBoxOffsetZ
|
||||
};
|
||||
|
||||
paint_struct *out = PaintFull(
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace TestPaint
|
||||
|
||||
rct_drawpixelinfo dpi = { 0 };
|
||||
dpi.zoom_level = 1;
|
||||
RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo *) = &dpi;
|
||||
RCT2_Unk140E9A8 = &dpi;
|
||||
gPaintSession.Unk140E9A8 = &dpi;
|
||||
|
||||
Ride ride = {0};
|
||||
@@ -59,7 +59,7 @@ namespace TestPaint
|
||||
rideEntry.vehicles[0] = vehicleEntry;
|
||||
|
||||
gRideList[0] = ride;
|
||||
RCT2_ADDRESS(0x013628F8, Ride)[0] = ride;
|
||||
RCT2_Rides[0] = ride;
|
||||
|
||||
gRideEntries[0] = &rideEntry;
|
||||
|
||||
@@ -67,10 +67,10 @@ namespace TestPaint
|
||||
gPaintSession.Unk141E9DB = G141E9DB_FLAG_1 | G141E9DB_FLAG_2;
|
||||
|
||||
gCurrentViewportFlags = 0;
|
||||
RCT2_GLOBAL(0x0141E9E4, uint32) = 0;
|
||||
RCT2_CurrentViewportFlags = 0;
|
||||
|
||||
gScenarioTicks = 0;
|
||||
RCT2_GLOBAL(0x00F663AC, uint32) = 0;
|
||||
RCT2_ScenarioTicks = 0;
|
||||
}
|
||||
|
||||
void ResetTunnels() {
|
||||
|
||||
@@ -52,8 +52,14 @@ extern "C"
|
||||
#define g141E9DB RCT2_GLOBAL(0x0141E9DB, uint8)
|
||||
#define gUnk141E9DC RCT2_GLOBAL(0x0141E9DC, uint16)
|
||||
#define gTrackColours RCT2_ADDRESS(0x00F44198, uint32)
|
||||
|
||||
#define RCT2_CurrentViewportFlags RCT2_GLOBAL(0x0141E9E4, uint32)
|
||||
#define RCT2_CurrentRotation RCT2_GLOBAL(0x0141E9E0, uint8)
|
||||
#define RCT2_ScenarioTicks RCT2_GLOBAL(0x00F663AC, uint32)
|
||||
#define RCT2_Rides RCT2_ADDRESS(0x013628F8, Ride)
|
||||
#define RCT2_Unk140E9A8 RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo *)
|
||||
#define RCT2_PaintBoundBoxOffsetX RCT2_GLOBAL(0x009DEA52, sint16)
|
||||
#define RCT2_PaintBoundBoxOffsetY RCT2_GLOBAL(0x009DEA54, sint16)
|
||||
#define RCT2_PaintBoundBoxOffsetZ RCT2_GLOBAL(0x009DEA56, sint16)
|
||||
|
||||
enum {
|
||||
TEST_SUCCESS,
|
||||
|
||||
@@ -166,9 +166,7 @@ public:
|
||||
Ride *ride, rct_ride_entry *rideEntry
|
||||
) override {
|
||||
ride->entrance_style = variant;
|
||||
|
||||
Ride * rct2ride = RCT2_ADDRESS(0x013628F8, Ride);
|
||||
rct2ride->entrance_style = variant;
|
||||
RCT2_Rides[0].entrance_style = variant;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,14 +35,6 @@
|
||||
#define RCT2_ADDRESS(address, type) ((type*)(GOOD_PLACE_FOR_DATA_SEGMENT - 0x8a4000 + (address)))
|
||||
#define RCT2_GLOBAL(address, type) (*((type*)(GOOD_PLACE_FOR_DATA_SEGMENT - 0x8a4000 + (address))))
|
||||
|
||||
#define RCT2_ADDRESS_RIDE_ENTRIES 0x009ACFA4
|
||||
#define RCT2_ADDRESS_CURRENT_ROTATION 0x0141E9E0
|
||||
#define RCT2_ADDRESS_SPRITE_LIST 0x010E63BC
|
||||
#define RCT2_ADDRESS_CURRENT_SUPPORT_SEGMENTS 0x0141E9B4
|
||||
#define RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_X 0x009DEA52
|
||||
#define RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Y 0x009DEA54
|
||||
#define RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Z 0x009DEA56
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
#include <openrct2/ride/ride.h>
|
||||
#include "addresses.h"
|
||||
|
||||
#define gRideEntries RCT2_ADDRESS(RCT2_ADDRESS_RIDE_ENTRIES, rct_ride_entry*)
|
||||
#define gTileElementTilePointers RCT2_ADDRESS(0x013CE9A4, rct_tile_element*)
|
||||
#define gRideEntries RCT2_ADDRESS(0x009ACFA4, rct_ride_entry *)
|
||||
#define gTileElementTilePointers RCT2_ADDRESS(0x013CE9A4, rct_tile_element *)
|
||||
rct_sprite *sprite_list = RCT2_ADDRESS(0x010E63BC, rct_sprite);
|
||||
|
||||
Ride gRideList[MAX_RIDES];
|
||||
rct_sprite *sprite_list = RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite);
|
||||
sint16 gMapSizeUnits;
|
||||
sint16 gMapBaseZ;
|
||||
bool gTrackDesignSaveMode = false;
|
||||
|
||||
Reference in New Issue
Block a user