Merge pull request #212 from marcotc/rain

Implemented draw_rain_animation
This commit is contained in:
Ted John 2014-07-19 11:12:30 +01:00
commit 01e62c1769
1 changed files with 22 additions and 1 deletions

View File

@ -69,6 +69,27 @@ void update_water_animation()
RCT2_CALLPROC_EBPSAFE(0x006838BD);
}
/**
*
* rct2: 0x00684266
*/
void draw_rain_animation(uint32 eax)
{
RCT2_GLOBAL(0x00EE7850, uint32) = eax;
rct_drawpixelinfo *screenDPI = RCT2_ADDRESS(RCT2_ADDRESS_SCREEN_DPI, rct_drawpixelinfo);
short left = screenDPI->x;
short right = left + screenDPI->width;
short top = screenDPI->y;
short bottom = top + screenDPI->height;
rct_window* newWindow = (RCT2_GLOBAL(RCT2_ADDRESS_NEW_WINDOW_PTR, rct_window*));
for (rct_window* w = g_window_list; w < newWindow; w++) {
RCT2_CALLPROC_X(0x006842AF, left, top, 0, right, (int)w, 0, bottom);
}
}
/**
*
* rct2: 0x00684218
@ -91,7 +112,7 @@ void update_rain_animation()
// 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);
draw_rain_animation(eax);
}
void game_update()