Merge branch 'master' of https://github.com/duncanspumpkin/OpenRCT2 into duncanspumpkin-master

This commit is contained in:
IntelOrca 2014-05-08 19:47:47 +01:00
commit 62df9a91bd
2 changed files with 71 additions and 12 deletions

View File

@ -388,7 +388,9 @@ typedef struct {
uint8 no_of_food; // 0xEC uint8 no_of_food; // 0xEC
uint8 no_of_drinks; // 0xED uint8 no_of_drinks; // 0xED
uint8 no_of_souvenirs; // 0xEE uint8 no_of_souvenirs; // 0xEE
uint8 pad_EF[0x07]; uint8 pad_EF[0x04];
uint8 var_F3;
uint8 pad_F4[0x02];
uint8 balloon_colour; // 0xF6 uint8 balloon_colour; // 0xF6
uint8 umbrella_colour; // 0xF7 uint8 umbrella_colour; // 0xF7
uint8 hat_colour; // 0xF8 uint8 hat_colour; // 0xF8

View File

@ -130,7 +130,8 @@ static uint8 _window_guest_list_groups_guest_faces[240 * 58];
static int window_guest_list_is_peep_in_filter(rct_peep* peep); static int window_guest_list_is_peep_in_filter(rct_peep* peep);
static void window_guest_list_find_groups(); static void window_guest_list_find_groups();
static int get_guest_face_sprite(rct_peep *peep); static int get_guest_face_sprite_small(rct_peep *peep);
static int get_guest_face_sprite_large(rct_peep *peep);
/** /**
* *
@ -649,7 +650,7 @@ static void window_guest_list_scrollpaint()
switch (_window_guest_list_selected_view) { switch (_window_guest_list_selected_view) {
case VIEW_ACTIONS: case VIEW_ACTIONS:
// Guest face // Guest face
gfx_draw_sprite(dpi, get_guest_face_sprite(peep), 118, y); gfx_draw_sprite(dpi, get_guest_face_sprite_small(peep), 118, y);
// Tracking icon // Tracking icon
if (peep->flags & PEEP_FLAGS_TRACKING) if (peep->flags & PEEP_FLAGS_TRACKING)
@ -856,7 +857,7 @@ static void window_guest_list_find_groups()
_window_guest_list_groups_argument_2[groupIndex] = RCT2_GLOBAL(0x013CE952 + 2, uint32); _window_guest_list_groups_argument_2[groupIndex] = RCT2_GLOBAL(0x013CE952 + 2, uint32);
RCT2_ADDRESS(0x00F1AF26, uint8)[groupIndex] = groupIndex; RCT2_ADDRESS(0x00F1AF26, uint8)[groupIndex] = groupIndex;
faceIndex = groupIndex * 56; faceIndex = groupIndex * 56;
_window_guest_list_groups_guest_faces[faceIndex++] = get_guest_face_sprite(peep) - 5486; _window_guest_list_groups_guest_faces[faceIndex++] = get_guest_face_sprite_small(peep) - 5486;
// Find more peeps that belong to same group // Find more peeps that belong to same group
spriteIdx2 = peep->next; spriteIdx2 = peep->next;
@ -880,7 +881,7 @@ static void window_guest_list_find_groups()
// Add face sprite, cap at 56 though // Add face sprite, cap at 56 though
if (_window_guest_list_groups_num_guests[groupIndex] < 56) if (_window_guest_list_groups_num_guests[groupIndex] < 56)
continue; continue;
_window_guest_list_groups_guest_faces[faceIndex++] = get_guest_face_sprite(peep2) - 5486; _window_guest_list_groups_guest_faces[faceIndex++] = get_guest_face_sprite_small(peep2) - 5486;
} }
if (RCT2_GLOBAL(0x00F1EDF6, uint16) == 0) { if (RCT2_GLOBAL(0x00F1EDF6, uint16) == 0) {
@ -927,14 +928,70 @@ static void window_guest_list_find_groups()
} }
/** /**
* * Function split into large and small sprite
* rct2: 0x00698721 * rct2: 0x00698721
*/ */
static int get_guest_face_sprite(rct_peep *peep) static int get_guest_face_sprite_small(rct_peep *peep)
{ {
int eax, ebx, ecx, edx, esi, edi, ebp; int sprite;
esi = peep; sprite = 0x157A;
ebp = 999;
RCT2_CALLFUNC_X(0x00698721, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); if (peep->var_F3) return sprite;
return ebp;
sprite = 0x1579;
if (peep->nausea > 200) return sprite;
sprite--;
if (peep->nausea > 170) return sprite;
sprite--;
if (peep->nausea > 140) return sprite;
sprite = 0x1576;
if (peep->energy < 46) return sprite;
sprite--;
if (peep->energy < 70) return sprite;
sprite = 0x156E;
for (int i = 37; peep->happiness >= i; i += 37)
{
sprite++;
}
return sprite;
}
/**
* Function split into large and small sprite
* rct2: 0x00698721
*/
static int get_guest_face_sprite_large(rct_peep* peep){
int sprite;
sprite = 5314;
if (peep->var_F3) return sprite;
sprite = 5298;
if (peep->nausea > 200) return sprite;
sprite = 0x14AE;
if (peep->nausea > 170) return sprite;
sprite = 0x14AD;
if (peep->nausea > 140) return sprite;
sprite = 0x14AC;
if (peep->energy < 46) return sprite;
sprite--;
if (peep->energy < 70) return sprite;
sprite = 0x14A4;
for (int i = 37; peep->happiness >= i; i += 37)
{
sprite++;
}
return sprite;
} }