Added game speed button sprites

Also added empty.png to resources to fill in g2 sprites reserved by
other contributors.
This commit is contained in:
Robert Jordan 2015-05-19 11:51:59 -04:00
parent 20057ef46c
commit 0a71b633c7
7 changed files with 13 additions and 11 deletions

Binary file not shown.

BIN
resources/g2/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
resources/g2/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

BIN
resources/g2/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

BIN
resources/g2/empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

View File

@ -348,7 +348,10 @@ enum {
SPR_G2_BEGIN = 324288,
SPR_G2_LOGO = SPR_G2_BEGIN + 0,
SPR_G2_TITLE = SPR_G2_BEGIN + 1
SPR_G2_TITLE = SPR_G2_BEGIN + 1,
SPR_G2_FASTFORWARD = SPR_G2_BEGIN + 2,
SPR_G2_SPEED_ARROW = SPR_G2_BEGIN + 3,
SPR_G2_HYPER_ARROWS = SPR_G2_BEGIN + 4
};
#endif

View File

@ -640,17 +640,16 @@ static void window_top_toolbar_paint()
y = w->y + window_top_toolbar_widgets[WIDX_FASTFORWARD].top + 0;
if (widget_is_pressed(w, WIDX_FASTFORWARD))
y++;
//imgId = 5229;//SPR_NEXT;
//gfx_draw_sprite(dpi, imgId, x - 1, y - 2, 0);
imgId = SPR_NEXT;
gfx_draw_sprite(dpi, imgId, x + 4, y, 0);
imgId = SPR_G2_FASTFORWARD;
gfx_draw_sprite(dpi, imgId, x + 6, y + 3, 0);
char speedStr[] = { FORMAT_MEDIUMFONT, FORMAT_OUTLINE,
(gGameSpeed >= 5 ? FORMAT_YELLOW : FORMAT_GREEN),
175, (gGameSpeed >= 2 ? 175 : '\0'), (gGameSpeed >= 3 ? 175 : '\0'), (gGameSpeed >= 4 ? 175 : '\0'), '\0'
};
format_string_raw(RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char), speedStr, NULL);
gfx_draw_string(dpi, speedStr, 0, x + 5, y + 14);
for (int i = 0; i < gGameSpeed && gGameSpeed <= 4; i++) {
gfx_draw_sprite(dpi, SPR_G2_SPEED_ARROW, x + 5 + i * 5, y + 15, 0);
}
if (gGameSpeed == 8) {
gfx_draw_sprite(dpi, SPR_G2_HYPER_ARROWS, x + 5, y + 15, 0);
}
}
// Draw cheats button