Decompiled game_command_set_park_entrance_fee

This commit is contained in:
adrian17 2014-08-29 11:37:32 +02:00
parent 4d9caf9f41
commit 6473da43b2
3 changed files with 40 additions and 1 deletions

View File

@ -29,6 +29,7 @@
#include "news_item.h"
#include "object.h"
#include "osinterface.h"
#include "park.h"
#include "peep.h"
#include "sawyercoding.h"
#include "scenario.h"
@ -942,7 +943,7 @@ static uint32 game_do_command_table[58] = {
0x006666E7,
0x00666A63,
0x006CD8CE,
0x00669E30,
(uint32)game_command_set_park_entrance_fee,
(uint32)game_command_update_staff_colour, // 40
0x006E519A,
0x006E5597,

View File

@ -581,4 +581,40 @@ uint8 calculate_guest_initial_happiness(uint8 percentage) {
void park_update_histories()
{
RCT2_CALLPROC_EBPSAFE(0x0066A231);
}
/**
*
* rct2: 0x00669E30
*/
void game_command_set_park_entrance_fee()
{
uint8 _bl;
uint16 new_fee;
#ifdef _MSC_VER
__asm mov _bl, bl
#else
__asm__("mov %[_bl], bl " : [_bl] "+m" (_bl));
#endif
#ifdef _MSC_VER
__asm mov new_fee, di
#else
__asm__("mov %[new_fee], di " : [new_fee] "+m" (new_fee));
#endif
RCT2_GLOBAL(0x0141F56C, uint8) = 0x10;
if (_bl & 1){
RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16) = new_fee;
window_invalidate_by_id(WC_PARK_INFORMATION, 0);
}
#ifdef _MSC_VER
__asm mov ebx, 0
#else
__asm__("mov ebx, 0 ");
#endif
}

View File

@ -59,4 +59,6 @@ void park_update_histories();
uint8 calculate_guest_initial_happiness(uint8 percentage);
void game_command_set_park_entrance_fee();
#endif