fix picked-up staff and rain drawing

This commit is contained in:
IntelOrca 2014-05-28 18:11:33 +01:00
parent 32cfe28081
commit e489b999f3
2 changed files with 43 additions and 2 deletions

View File

@ -111,6 +111,10 @@
#define RCT2_ADDRESS_CURRENT_TOOL 0x009DE545
#define RCT2_ADDRESS_TOOL_WIDGETINDEX 0x009DE546
#define RCT2_ADDRESS_PICKEDUP_PEEP_SPRITE 0x009DE550
#define RCT2_ADDRESS_PICKEDUP_PEEP_X 0x009DE554
#define RCT2_ADDRESS_PICKEDUP_PEEP_Y 0x009DE556
#define RCT2_ADDRESS_CURSOR_OVER_WINDOWCLASS 0x009DE55C
#define RCT2_ADDRESS_CURSOR_OVER_WINDOWNUMBER 0x009DE55E
#define RCT2_ADDRESS_CURSOR_OVER_WIDGETINDEX 0x009DE560

View File

@ -59,10 +59,47 @@ void game_create_windows()
RCT2_CALLPROC_EBPSAFE(0x0066B905);
}
/**
*
* rct2: 0x006838BD
*/
void update_water_animation()
{
RCT2_CALLPROC_EBPSAFE(0x006838BD);
}
/**
*
* rct2: 0x00684218
*/
void update_rain_animation()
{
if (RCT2_GLOBAL(0x009ABDF2, uint8) == 0)
return;
// Draw picked-up peep
if (RCT2_GLOBAL(0x009DE550, uint32) != 0xFFFFFFFF) {
gfx_draw_sprite(
(rct_drawpixelinfo*)RCT2_ADDRESS_SCREEN_DPI,
RCT2_GLOBAL(RCT2_ADDRESS_PICKEDUP_PEEP_SPRITE, uint32),
RCT2_GLOBAL(RCT2_ADDRESS_PICKEDUP_PEEP_X, sint16),
RCT2_GLOBAL(RCT2_ADDRESS_PICKEDUP_PEEP_Y, sint16)
);
}
// Get rain draw function and draw rain
uint32 eax = RCT2_ADDRESS(0x009AC058, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RAIN_LEVEL, uint8)];
if (eax != 0xFFFFFFFF && !(RCT2_GLOBAL(0x009DEA6F, uint8) & 1))
RCT2_CALLPROC_X(0x00684266, eax, 0, 0, 0, 0, 0, 0);
}
void game_update()
{
int eax, tmp;
// Handles picked-up peep and rain redraw
RCT2_CALLPROC_EBPSAFE(0x006843DC);
// 0x006E3AEC // screen_game_process_mouse_input();
// RCT2_CALLPROC_EBPSAFE(0x006E3AEC); // screen_game_process_keyboard_input();
screenshot_check();
@ -124,8 +161,8 @@ void game_update()
RCT2_GLOBAL(0x0141F568, uint8) = RCT2_GLOBAL(0x0013CA740, uint8);
game_handle_input();
RCT2_CALLPROC_EBPSAFE(0x006838BD);
RCT2_CALLPROC_EBPSAFE(0x00684218);
update_water_animation();
update_rain_animation();
if (RCT2_GLOBAL(0x009AAC73, uint8) != 255) {
RCT2_GLOBAL(0x009AAC73, uint8)++;