1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Merge branch 'master' into ride-window

Conflicts:
	src/string_ids.h
This commit is contained in:
IntelOrca
2014-09-09 00:11:03 +01:00
21 changed files with 1451 additions and 33 deletions

1
build.bat Normal file
View File

@@ -0,0 +1 @@
msbuild .\projects\openrct2.vcxproj /p:Configuration=Release /p:Platform=x86

View File

@@ -44,6 +44,7 @@
<ClInclude Include="..\src\ride_ratings.h" />
<ClInclude Include="..\src\sawyercoding.h" />
<ClInclude Include="..\src\scenario.h" />
<ClInclude Include="..\src\scenery.h" />
<ClInclude Include="..\src\screenshot.h" />
<ClInclude Include="..\src\sprite.h" />
<ClInclude Include="..\src\sprites.h" />
@@ -58,6 +59,7 @@
<ClInclude Include="..\src\window.h" />
<ClInclude Include="..\src\window_dropdown.h" />
<ClInclude Include="..\src\window_error.h" />
<ClInclude Include="..\src\window_scenery.h" />
<ClInclude Include="..\src\window_tooltip.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="..\src\staff.h" />
@@ -137,6 +139,7 @@
<ClCompile Include="..\src\window_tooltip.c" />
<ClCompile Include="..\src\window_water.c" />
<ClCompile Include="..\src\staff.c" />
<ClCompile Include="..\src\window_scenery.c" />
</ItemGroup>
<ItemGroup>
<None Include="..\openrct2.exe" />

View File

@@ -162,6 +162,12 @@
<ClInclude Include="..\src\input.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\scenery.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\window_scenery.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\game.c">
@@ -380,6 +386,9 @@
<ClCompile Include="..\src\staff.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\window_scenery.c">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="..\src\input.c">
<Filter>Source Files</Filter>
</ClCompile>

View File

@@ -184,6 +184,13 @@
#define RCT2_ADDRESS_G1_ELEMENTS 0x009EBD28
#define RCT2_ADDRESS_PATH_TYPES 0x009ADA14
#define RCT2_ADDRESS_SMALL_SCENERY_ENTRIES 0x009AD1A4
#define RCT2_ADDRESS_LARGE_SCENERY_ENTRIES 0x009AD594
#define RCT2_ADDRESS_WALL_SCENERY_ENTRIES 0x009AD794
#define RCT2_ADDRESS_BANNER_SCENERY_ENTRIES 0x009AD994
#define RCT2_ADDRESS_PATH_BIT_SCENERY_ENTRIES 0x009ADA54
#define RCT2_ADDRESS_SCENERY_SET_ENTRIES 0x009ADA90
//Every pixel changed by rain is stored.
//32bit (pixel_offset 24 bit)(pixel_colour 8 bit)

View File

@@ -515,7 +515,6 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int *
if (!(flags & 0x20)) {
// Update money balance
finance_payment(cost, RCT2_GLOBAL(0x0141F56C, uint8));
RCT2_CALLPROC_X(0x0069C674, 0, cost, 0, 0, 0, 0, 0);
if (RCT2_GLOBAL(0x0141F568, uint8) == RCT2_GLOBAL(0x013CA740, uint8)) {
// Create a +/- money text effect
if (cost != 0)

View File

@@ -66,7 +66,7 @@ void peep_update_all()
peep_update(peep);
} else {
RCT2_CALLPROC_X(0x0068F41A, 0, 0, 0, i, (int)peep, 0, 0);
if (peep->var_08 == 4)
if (peep->linked_list_type_offset == SPRITE_LINKEDLIST_OFFSET_PEEP)
peep_update(peep);
}

View File

@@ -308,7 +308,7 @@ typedef struct {
uint16 var_02; // 0x02
uint16 next; // 0x04
uint16 previous; // 0x06
uint8 var_08;
uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_...
uint8 var_09; // 0x09
uint16 sprite_index; // 0x0A
uint16 var_0C;

View File

@@ -185,7 +185,7 @@ void ride_update_favourited_stat()
ride->guests_favourite = 0;
FOR_ALL_PEEPS(spriteIndex, peep) {
if (peep->var_08 != 4)
if (peep->linked_list_type_offset != SPRITE_LINKEDLIST_OFFSET_PEEP)
return;
if (peep->favourite_ride != 0xff) {
ride = &g_ride_list[peep->favourite_ride];
@@ -547,4 +547,4 @@ int ride_get_total_length(rct_ride *ride)
for (i = 0; i < ride->num_stations; i++)
totalLength += ride->length[i];
return totalLength;
}
}

130
src/scenery.h Normal file
View File

@@ -0,0 +1,130 @@
/*****************************************************************************
* Copyright (c) 2014 Dániel Tar
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* This file is part of OpenRCT2.
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#ifndef _SCENERY_H_
#define _SCENERY_H_
#include "rct2.h"
#include "string_ids.h"
typedef struct {
uint32 flags; // 0x06
uint8 height; // 0x0A
uint8 tool_id; // 0x0B
uint16 price; // 0x0C
uint8 pad_0E[12];
uint8 scenery_tab_id; // 0x1A
} rct_small_scenery_entry;
typedef enum {
SMALL_SCENERY_FLAG1 = (1 << 0), // 0x1
SMALL_SCENERY_FLAG2 = (1 << 1), // 0x2
SMALL_SCENERY_FLAG3 = (1 << 2), // 0x4
SMALL_SCENERY_FLAG4 = (1 << 3), // 0x8
SMALL_SCENERY_FLAG5 = (1 << 4), // 0x10
SMALL_SCENERY_FLAG6 = (1 << 5), // 0x20
SMALL_SCENERY_FLAG7 = (1 << 6), // 0x40
SMALL_SCENERY_FLAG8 = (1 << 7), // 0x80
SMALL_SCENERY_FLAG9 = (1 << 8), // 0x100
SMALL_SCENERY_FLAG10 = (1 << 9), // 0x200
SMALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 10), // 0x400
SMALL_SCENERY_FLAG12 = (1 << 11), // 0x800
SMALL_SCENERY_FLAG13 = (1 << 12), // 0x1000
SMALL_SCENERY_FLAG14 = (1 << 13), // 0x2000
SMALL_SCENERY_FLAG15 = (1 << 14), // 0x4000
SMALL_SCENERY_FLAG16 = (1 << 15), // 0x8000
SMALL_SCENERY_FLAG17 = (1 << 16), // 0x10000
SMALL_SCENERY_FLAG18 = (1 << 17), // 0x20000
SMALL_SCENERY_FLAG19 = (1 << 18), // 0x40000
SMALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 19), // 0x80000
} SMALL_SCENERY_FLAGS;
typedef struct {
uint8 tool_id; // 0x06
uint8 flags; // 0x07
uint16 price; // 0x08
uint8 pad_0A[6];
uint8 scenery_tab_id; // 0x10
} rct_large_scenery_entry;
typedef struct {
uint8 tool_id; // 0x06
uint8 flags; // 0x07
uint8 height; // 0x08
uint8 flags2; // 0x09
uint16 price; // 0x0A
uint8 scenery_tab_id; // 0x0C
} rct_wall_scenery_entry;
typedef enum {
WALL_SCENERY_FLAG1 = (1 << 0), // 0x1
WALL_SCENERY_FLAG2 = (1 << 1), // 0x2
WALL_SCENERY_FLAG3 = (1 << 2), // 0x4
WALL_SCENERY_FLAG4 = (1 << 3), // 0x8
WALL_SCENERY_FLAG5 = (1 << 4), // 0x10
WALL_SCENERY_FLAG6 = (1 << 5), // 0x20
WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40
WALL_SCENERY_HAS_TERNARY_COLOUR = (1 << 7), // 0x80
} WALL_SCENERY_FLAGS;
typedef struct {
uint8 pad_02[3];
uint8 tool_id; // 0x09
uint16 price; // 0x0A
uint8 scenery_tab_id; // 0x0C
} rct_path_bit_scenery_entry;
typedef struct {
uint8 var_06;
uint8 flags; // 0x07
uint16 price; // 0x08
uint8 scenery_tab_id; // 0x0A
} rct_banner_scenery_entry;
typedef struct {
rct_string_id name; // 0x00
uint32 image; // 0x02
union {
rct_small_scenery_entry small_scenery;
rct_large_scenery_entry large_scenery;
rct_wall_scenery_entry wall;
rct_path_bit_scenery_entry path_bit;
rct_banner_scenery_entry banner;
};
} rct_scenery_entry;
typedef struct {
rct_string_id name; // 0x00
uint32 image; // 0x02
uint16 scenery_entries[0x80]; // 0x06
uint8 entry_count; // 0x106
uint8 pad_107;
uint8 var_108; // 0x108, order?
} rct_scenery_set_entry;
#define g_smallSceneryEntries RCT2_ADDRESS(RCT2_ADDRESS_SMALL_SCENERY_ENTRIES, rct_scenery_entry*)
#define g_largeSceneryEntries RCT2_ADDRESS(RCT2_ADDRESS_LARGE_SCENERY_ENTRIES, rct_scenery_entry*)
#define g_wallSceneryEntries RCT2_ADDRESS(RCT2_ADDRESS_WALL_SCENERY_ENTRIES, rct_scenery_entry*)
#define g_bannerSceneryEntries RCT2_ADDRESS(RCT2_ADDRESS_BANNER_SCENERY_ENTRIES, rct_scenery_entry*)
#define g_pathBitSceneryEntries RCT2_ADDRESS(RCT2_ADDRESS_PATH_BIT_SCENERY_ENTRIES, rct_scenery_entry*)
#define g_scenerySetEntries RCT2_ADDRESS(RCT2_ADDRESS_SCENERY_SET_ENTRIES, rct_scenery_set_entry*)
#endif

View File

@@ -53,7 +53,7 @@ void reset_sprite_list(){
spr->unknown.sprite_identifier = 0xFF;
spr->unknown.sprite_index = i;
spr->unknown.next = SPRITE_INDEX_NULL;
spr->unknown.var_08 = 0;
spr->unknown.linked_list_type_offset = 0;
if (previous_spr != (rct_sprite*)SPRITE_INDEX_NULL){
spr->unknown.previous = previous_spr->unknown.sprite_index;
@@ -108,11 +108,11 @@ void reset_0x69EBE4(){
/*
* rct2: 0x0069EC6B
* bl: unclear what this does
* bl: if bl & 2 > 0, the sprite ends up in the FLOATING_TEXT linked list.
*/
rct_sprite *create_sprite(uint8 bl)
{
int ecx = 0xA;
SPRITE_LINKEDLIST_OFFSET linkedListTypeOffset = SPRITE_LINKEDLIST_OFFSET_UNKNOWN; // cl
if ((bl & 2) != 0)
{
@@ -123,7 +123,7 @@ rct_sprite *create_sprite(uint8 bl)
return NULL;
}
ecx = 6;
linkedListTypeOffset = SPRITE_LINKEDLIST_OFFSET_FLOATING_TEXT;
}
else if (RCT2_GLOBAL(0x13573C8, uint16) <= 0)
{
@@ -132,7 +132,7 @@ rct_sprite *create_sprite(uint8 bl)
rct_unk_sprite *sprite = &(g_sprite_list[RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX, uint16)]).unknown;
RCT2_CALLPROC_X(0x0069ED0B, 0, 0, ecx, 0, (int)sprite, 0, 0);
move_sprite_to_list((rct_sprite *)sprite, (uint8)linkedListTypeOffset);
sprite->x = SPRITE_LOCATION_NULL;
sprite->y = SPRITE_LOCATION_NULL;
@@ -148,4 +148,56 @@ rct_sprite *create_sprite(uint8 bl)
RCT2_GLOBAL(0xF3EF60, uint16) = sprite->sprite_index;
return (rct_sprite*)sprite;
}
/*
* rct2: 0x0069ED0B
* This function moves a sprite to the specified sprite linked list.
* There are 5/6 of those, and cl specifies a pointer offset
* of the desired linked list in a uint16 array. Known valid values are
* 2, 4, 6, 8 or 10 (SPRITE_LINKEDLIST_OFFSET_...)
*/
void move_sprite_to_list(rct_sprite *sprite, uint8 cl)
{
rct_unk_sprite *unkSprite = &sprite->unknown;
// No need to move if the sprite is already in the desired list
if (unkSprite->linked_list_type_offset == cl)
return;
// If the sprite is currently the head of the list, the
// sprite following this one becomes the new head of the list.
if (unkSprite->previous == SPRITE_INDEX_NULL)
{
RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX + unkSprite->linked_list_type_offset, uint16) = unkSprite->next;
}
else
{
// Hook up sprite->previous->next to sprite->next, removing the sprite from its old list
g_sprite_list[unkSprite->previous].unknown.next = unkSprite->next;
}
// Similarly, hook up sprite->next->previous to sprite->previous
if (unkSprite->next != SPRITE_INDEX_NULL)
{
g_sprite_list[unkSprite->next].unknown.previous = unkSprite->previous;
}
int oldListTypeOffset = unkSprite->linked_list_type_offset;
unkSprite->previous = SPRITE_INDEX_NULL; // We become the new head of the target list, so there's no previous sprite
unkSprite->linked_list_type_offset = cl;
unkSprite->next = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX + cl, uint16); // This sprite's next sprite is the old head, since we're the new head
RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX + cl, uint16) = unkSprite->sprite_index; // Store this sprite's index as head of its new list
if (unkSprite->next != SPRITE_INDEX_NULL)
{
// Fix the chain by settings sprite->next->previous to sprite_index
g_sprite_list[unkSprite->next].unknown.previous = unkSprite->sprite_index;
}
// These globals are probably counters for each sprite list?
// Decrement old list counter, increment new list counter.
--(RCT2_GLOBAL(0x13573C8 + oldListTypeOffset, uint16));
++(RCT2_GLOBAL(0x13573C8 + cl, uint16));
}

View File

@@ -36,13 +36,21 @@ enum SPRITE_IDENTIFIER{
SPRITE_IDENTIFIER_LITTER = 3,
};
typedef enum {
SPRITE_LINKEDLIST_OFFSET_VEHICLE = 2,
SPRITE_LINKEDLIST_OFFSET_PEEP = 4,
SPRITE_LINKEDLIST_OFFSET_FLOATING_TEXT = 6,
SPRITE_LINKEDLIST_OFFSET_FLOATING_LITTER = 8,
SPRITE_LINKEDLIST_OFFSET_UNKNOWN = 10
} SPRITE_LINKEDLIST_OFFSET;
typedef struct {
uint8 sprite_identifier; // 0x00
uint8 pad_01;
uint16 var_02;
uint16 next; // 0x04
uint16 previous; // 0x06
uint8 var_08;
uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_...
uint8 pad_09;
uint16 sprite_index; // 0x0A
uint8 pad_0C[2];
@@ -66,7 +74,7 @@ typedef struct {
uint16 var_02; // 0x02
uint16 next; // 0x04
uint16 previous; // 0x06
uint8 var_08;
uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_...
uint8 pad_09;
uint16 sprite_index; // 0x0A
uint8 pad_0B[0x19];
@@ -92,5 +100,6 @@ void create_balloon(int x, int y, int z, int colour);
rct_sprite *create_sprite(uint8 bl);
void reset_sprite_list();
void reset_0x69EBE4();
void move_sprite_to_list(rct_sprite *sprite, uint8 cl);
#endif

View File

@@ -127,7 +127,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx,
RCT2_CALLPROC_X(0x0069EDB6, 0, 0, _ecx, 0, (int)newPeep, 0, 0);
}
else {
RCT2_CALLPROC_X(0x0069ED0B, 0, 0, 4, 0, (int)newPeep, 0, 0);
move_sprite_to_list((rct_sprite *)newPeep, SPRITE_LINKEDLIST_OFFSET_PEEP);
newPeep->sprite_identifier = 1;
newPeep->var_09 = 0x0F;

View File

@@ -433,7 +433,7 @@ enum {
STR_GUESTS = 1463,
STR_STAFF = 1468,
STR_EXCITEMENT_RATING = 1473,
STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE = 1474,
STR_INTENSITY_RATING = 1475,
@@ -585,7 +585,7 @@ enum {
STR_NEVER = 1885,
STR_INSPECTING_RIDE = 1886,
STR_TIME_SINCE_LAST_INSPECTION_MINUTES = 1887,
STR_TIME_SINCE_LAST_INSPECTION_MORE_THAN_4_HOURS = 1888,
STR_DOWN_TIME_LABEL_1889 = 1889,
@@ -1018,6 +1018,10 @@ enum {
STR_SAME_PRICE_THROUGHOUT_PARK = 3071,
STR_SAME_PRICE_THROUGHOUT_PARK_TIP = 3072,
STR_SELECT_COLOUR = 3099,
STR_SELECT_SECONDARY_COLOUR = 3100,
STR_SELECT_TERNARY_COLOUR = 3101,
STR_LIST_RIDES_TIP = 3104,
STR_LIST_SHOPS_AND_STALLS_TIP = 3105,
STR_LIST_KIOSKS_AND_FACILITIES_TIP = 3106,

View File

@@ -36,7 +36,7 @@ typedef struct {
uint8 pad_01[0x03];
uint16 next; // 0x04
uint16 previous; // 0x06
uint8 var_08;
uint8 linked_list_type_offset; // 0x08 Valid values are SPRITE_LINKEDLIST_OFFSET_...
uint8 pad_09;
uint16 sprite_index; // 0x0A
uint8 pad_0C[2];

View File

@@ -163,6 +163,11 @@ typedef struct {
sint32 var_486;
} ride_variables;
typedef struct {
sint16 selected_scenery_id;
sint16 hover_counter;
} scenery_variables;
/**
* Window structure
* size: 0x4C0
@@ -200,6 +205,7 @@ typedef struct rct_window {
news_variables news;
map_variables map;
ride_variables ride;
scenery_variables scenery;
};
sint16 page; // 0x48A
sint16 var_48C;
@@ -459,6 +465,7 @@ void window_new_ride_open();
void window_banner_open();
void window_cheats_open();
void window_research_open();
void window_scenery_open();
void window_guest_list_init_vars_a();
void window_guest_list_init_vars_b();

View File

@@ -259,7 +259,8 @@ static void window_game_top_toolbar_mouseup()
case WIDX_SCENERY:
if (!tool_set(w, WIDX_SCENERY, 0)) {
RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6);
RCT2_CALLPROC_EBPSAFE(0x006E0FEF);
window_scenery_open();
//RCT2_CALLPROC_EBPSAFE(0x006E0FEF);
}
break;
case WIDX_PATH:

View File

@@ -25,6 +25,7 @@
#include "news_item.h"
#include "ride.h"
#include "string_ids.h"
#include "scenery.h"
#include "track.h"
#include "widget.h"
#include "window.h"
@@ -761,8 +762,7 @@ static void window_new_ride_paint()
rideEntry->name :
(typeId & 0xFF00) + 2;
} else {
uint8 *sceneryEntry = RCT2_GLOBAL(0x009ADA90 + (typeId & 0xFFFF) * 4, uint8*);
stringId = RCT2_GLOBAL(sceneryEntry, uint16);
stringId = g_scenerySetEntries[typeId]->name;
}
}
}
@@ -798,8 +798,7 @@ static void window_new_ride_paint()
rideEntry->name :
(typeId & 0xFF00) + 2;
} else {
uint8 *sceneryEntry = RCT2_GLOBAL(0x009ADA90 + (typeId & 0xFFFF) * 4, uint8*);
stringId = RCT2_GLOBAL(sceneryEntry, uint16);
stringId = g_scenerySetEntries[typeId]->name;
}
gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, STR_RESEARCH_RIDE_LABEL, 0);
}

View File

@@ -23,6 +23,7 @@
#include "game.h"
#include "news_item.h"
#include "ride.h"
#include "scenery.h"
#include "string_ids.h"
#include "sprites.h"
#include "widget.h"
@@ -348,8 +349,7 @@ static void window_research_development_paint()
rideEntry->name :
((typeId >> 8) & 0xFF) + 2;
} else {
uint8 *sceneryEntry = RCT2_GLOBAL(0x009ADA90 + (typeId & 0xFFFF) * 4, uint8*);
stringId = RCT2_GLOBAL(sceneryEntry, uint16);
stringId = g_scenerySetEntries[typeId]->name;
}
}
}
@@ -388,8 +388,7 @@ static void window_research_development_paint()
lastDevelopmentFormat = STR_RESEARCH_RIDE_LABEL;
} else {
uint8 *sceneryEntry = RCT2_GLOBAL(0x009ADA90 + (typeId & 0xFFFF) * 4, uint8*);
stringId = RCT2_GLOBAL(sceneryEntry, uint16);
stringId = g_scenerySetEntries[typeId]->name;
lastDevelopmentFormat = STR_RESEARCH_SCENERY_LABEL;
}
gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, lastDevelopmentFormat, 0);

1163
src/window_scenery.c Normal file

File diff suppressed because it is too large Load Diff

39
src/window_scenery.h Normal file
View File

@@ -0,0 +1,39 @@
/*****************************************************************************
* Copyright (c) 2014 Dániel Tar
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* This file is part of OpenRCT2.
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#ifndef _WINDOW_SCENERY_H_
#define _WINDOW_SCENERY_H_
#define WINDOW_SCENERY_WIDTH 0x27A
#define WINDOW_SCENERY_HEIGHT 0x8E
#define SCENERY_BUTTON_WIDTH 66
#define SCENERY_BUTTON_HEIGHT 80
#define SCENERY_ENTRIES_BY_TAB 128
#define window_scenery_active_tab_index RCT2_GLOBAL(0x00F64EDC, uint8)
#define window_scenery_selected_scenery_by_tab RCT2_ADDRESS(0x00F64EDD, sint16)
#define window_scenery_is_build_cluster_tool_on RCT2_GLOBAL(0x00F64F1A, uint8)
#define window_scenery_is_repaint_scenery_tool_on RCT2_GLOBAL(0x00F64F19, uint8)
#define window_scenery_rotation RCT2_GLOBAL(0x00F64F05, uint8)
#define window_scenery_primary_colour RCT2_GLOBAL(0x00F64F06, uint8)
#define window_scenery_secondary_colour RCT2_GLOBAL(0x00F64F07, uint8)
#define window_scenery_tertiary_colour RCT2_GLOBAL(0x00F64F08, uint8)
#endif

View File

@@ -1,5 +1,5 @@
/*****************************************************************************
* Copyright (c) 2014 Maciek Baron, Daniel Tar
/*****************************************************************************
* Copyright (c) 2014 Maciek Baron, Dániel Tar
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* This file is part of OpenRCT2.
@@ -171,11 +171,7 @@ void window_staff_open()
window->colours[2] = 4;
}
void window_staff_cancel_tools() {
rct_window *w;
window_get_register(w);
void window_staff_cancel_tools(rct_window *w) {
int toolWindowClassification = RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass);
int toolWindowNumber = RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber);
if (RCT2_GLOBAL(0x009DE518, uint32) & (1 << 3))
@@ -264,7 +260,7 @@ static void window_staff_resize()
*
* rct2: 0x006BD971
*/
static void window_staff_mousedown(int widgetIndex, rct_window*w, rct_widget* widget)
static void window_staff_mousedown(int widgetIndex, rct_window* w, rct_widget* widget)
{
short newSelectedTab;
int eax;