|
@@ -258,7 +258,7 @@ void win_name_draw(uint16_t name, uint8_t is_black, uint8_t pos) BANKED {
|
258
|
258
|
(pos == 2) ? !is_black : is_black);
|
259
|
259
|
}
|
260
|
260
|
|
261
|
|
-uint8_t win_game_draw(int32_t score) BANKED {
|
|
261
|
+uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
262
|
262
|
uint8_t is_black = 0;
|
263
|
263
|
if (score < 0) {
|
264
|
264
|
score = -score;
|
|
@@ -266,16 +266,21 @@ uint8_t win_game_draw(int32_t score) BANKED {
|
266
|
266
|
}
|
267
|
267
|
|
268
|
268
|
if ((_cpu == CGB_TYPE) && (conf_get()->debug_flags)) {
|
269
|
|
- // TODO hard-coded black bg tile
|
270
|
|
- fill_win(0, 0, 20, 2, 0x80, BKGF_CGB_PAL3);
|
|
269
|
+ static int32_t prev_score = 0;
|
|
270
|
+ if (initial || (score != prev_score)) {
|
|
271
|
+ prev_score = score;
|
|
272
|
+
|
|
273
|
+ // TODO hard-coded black bg tile
|
|
274
|
+ fill_win(0, 0, 20, 2, 0x80, BKGF_CGB_PAL3);
|
|
275
|
+ }
|
271
|
276
|
|
272
|
277
|
uint8_t x_off = number(score, 0, 0, is_black) >> 3;
|
273
|
278
|
|
274
|
279
|
sprintf(str_buff, get_string(STR_PRINTF_FRAMES), (uint16_t)game_get_framecount());
|
275
|
|
- str_ascii(str_buff, x_off + 1, 0, 1);
|
|
280
|
+ str_ascii(str_buff, x_off, 0, 1);
|
276
|
281
|
|
277
|
282
|
sprintf(str_buff, get_string(STR_PRINTF_TIMER), (uint16_t)timer_get());
|
278
|
|
- str_ascii(str_buff, x_off + 1, 1, 1);
|
|
283
|
+ str_ascii(str_buff, x_off, 1, 1);
|
279
|
284
|
|
280
|
285
|
return DEVICE_SCREEN_PX_WIDTH;
|
281
|
286
|
} else {
|