mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Replace RCT2_GLOBAL magic numbers with address identifiers and string ids
This commit is contained in:
@@ -35,7 +35,7 @@ static void graph_draw_months_uint8(rct_drawpixelinfo *dpi, uint8 *history, int
|
||||
for (i = count - 1; i >= 0; i--) {
|
||||
if (history[i] != 0 && history[i] != 255 && yearOver32 % 4 == 0) {
|
||||
// Draw month text
|
||||
RCT2_GLOBAL(0x013CE952, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR;
|
||||
gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, (void*)0x013CE952);
|
||||
|
||||
// Draw month mark
|
||||
|
||||
@@ -55,8 +55,8 @@ void screenshot_check()
|
||||
rct_string_id stringId = 3165;
|
||||
sprintf((char*)language_get_string(stringId), "SCR%d%s", screenshotIndex, _screenshot_format_extension[gConfigGeneral.screenshot_format]);
|
||||
|
||||
RCT2_GLOBAL(0x013CE952, uint16) = stringId;
|
||||
// RCT2_GLOBAL(0x013CE952, uint16) = STR_SCR_BMP;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
|
||||
// RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_SCR_BMP;
|
||||
// RCT2_GLOBAL(0x013CE952 + 2, uint16) = screenshotIndex;
|
||||
RCT2_GLOBAL(0x009A8C29, uint8) |= 1;
|
||||
|
||||
@@ -83,7 +83,7 @@ static int screenshot_get_next_path(char *path, int format)
|
||||
|
||||
int i;
|
||||
for (i = 1; i < 1000; i++) {
|
||||
RCT2_GLOBAL(0x013CE952, uint16) = i;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = i;
|
||||
|
||||
// Glue together path and filename
|
||||
sprintf(path, "%sSCR%d%s", screenshotPath, i, _screenshot_format_extension[format]);
|
||||
|
||||
@@ -1390,7 +1390,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
|
||||
if (RCT2_ADDRESS(0x00999694, uint32)[trackType] & (1 << trackSequence)) {
|
||||
uint16 ax = RCT2_GLOBAL(0x0097D21A + (ride->type * 8), uint8);
|
||||
uint32 ebx = 0x20381689 + (height + 8) / 16;
|
||||
ebx += RCT2_GLOBAL(0x009AACBD, uint16);
|
||||
ebx += RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, uint16);
|
||||
ebx -= RCT2_GLOBAL(0x01359208, uint16);
|
||||
RCT2_GLOBAL(0x009DEA52, uint16) = 1000;
|
||||
RCT2_GLOBAL(0x009DEA54, uint16) = 1000;
|
||||
@@ -1411,7 +1411,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
|
||||
RCT2_GLOBAL(0x00F441A4, uint32) = 0x21600000;
|
||||
}
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) {
|
||||
uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[RCT2_GLOBAL(0x009AACBF, uint8)];
|
||||
uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)];
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F44198, uint32) = ghost_id;
|
||||
RCT2_GLOBAL(0x00F4419C, uint32) = ghost_id;
|
||||
|
||||
@@ -2425,7 +2425,7 @@ void textinput_cancel()
|
||||
#else
|
||||
log_warning("there should be something called here (0x0040701D)");
|
||||
#endif // _WIN32
|
||||
if (RCT2_GLOBAL(0x009DEB8C, uint8) != 255) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_TEXTINPUT_WINDOWCLASS, uint8) != 255) {
|
||||
RCT2_CALLPROC_EBPSAFE(0x006EE4E2);
|
||||
w = window_find_by_number(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TEXTINPUT_WINDOWCLASS, rct_windowclass),
|
||||
|
||||
Reference in New Issue
Block a user