mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2026-01-09 02:23:05 +11:00
Begin writing code to update the tiles
This commit is contained in:
parent
26e94d2957
commit
78604e6f7d
5 changed files with 55 additions and 14 deletions
|
|
@ -54,6 +54,7 @@ void main(void) {
|
|||
dlog_data *gad = (dlog_data *)(shared_page->module_data);
|
||||
|
||||
// Make sure the buffers are pointing to the correct memory and are clear
|
||||
vdp_hide_sprites();
|
||||
vdp_clear_gamegrid();
|
||||
vdp_switch_nt(0); // Make sure VDP shows the gamegrid
|
||||
|
||||
|
|
@ -90,7 +91,7 @@ void main(void) {
|
|||
|
||||
vdp_draw_joystick(JS_POS_CENTER); // Center the joystick
|
||||
|
||||
vdp_redraw_tiles();
|
||||
vdp_redraw_tiles(get_front_grid());
|
||||
|
||||
__enable_interrupts();
|
||||
|
||||
|
|
@ -167,7 +168,6 @@ void main(void) {
|
|||
decbuf_to_ascii(6, text_buf);
|
||||
__disable_interrupts();
|
||||
vdp_print_string(0, SCORE_TEXT_X, SCORE_TEXT_Y, (char*)text_buf);
|
||||
__enable_interrupts();
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -186,17 +186,18 @@ void main(void) {
|
|||
decbuf_to_ascii(6, text_buf);
|
||||
__disable_interrupts();
|
||||
vdp_print_string(0, SCORE_TEXT_X, SCORE_TEXT_Y, (char*)text_buf);
|
||||
vdp_redraw_tiles();
|
||||
vdp_redraw_tiles(get_front_grid());
|
||||
__enable_interrupts();
|
||||
}
|
||||
|
||||
dld->mode = (done > 0) ? DLOG_MODE_WIN : DLOG_MODE_LOSE;
|
||||
dld->score = score;
|
||||
|
||||
vdp_redraw_tiles(get_front_grid());
|
||||
|
||||
WAIT(0xFF);
|
||||
|
||||
__disable_interrupts();
|
||||
|
||||
// One last update to the tiles
|
||||
vdp_redraw_tiles();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue