diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -425,10 +425,10 @@ draw_logo() { | |||
425 | int main(void) { | 425 | int main(void) { |
426 | // Configure the display in mode 0 to show OBJs, where tile memory is | 426 | // Configure the display in mode 0 to show OBJs, where tile memory is |
427 | // sequential. | 427 | // sequential. |
428 | DISP_CTRL = DISP_MODE_0 | DISP_OBJ | DISP_OBJ_1D; | 428 | DISP_CTRL = DISP_MODE_3 | DISP_OBJ | DISP_OBJ_1D | DISP_BG_2; |
429 | 429 | ||
430 | // Create two 4bpp tiles, one filled with color 1 and another with color 2. | 430 | // Create two 4bpp tiles, one filled with color 1 and another with color 2. |
431 | Tile *tile_mem = &TILE_MEM[4][0]; | 431 | Tile *tile_mem = &TILE_MEM[4][512]; |
432 | size_t n_tiles = 8; | 432 | size_t n_tiles = 8; |
433 | u32 colors[] = { | 433 | u32 colors[] = { |
434 | 0x11111111, | 434 | 0x11111111, |
@@ -459,10 +459,10 @@ int main(void) { | |||
459 | 459 | ||
460 | int x_a = 100; | 460 | int x_a = 100; |
461 | int y_a = 100; | 461 | int y_a = 100; |
462 | int tile_id_a = 0; | 462 | int tile_id_a = 512; |
463 | int x_b = 50; | 463 | int x_b = 50; |
464 | int y_b = 50; | 464 | int y_b = 50; |
465 | int tile_id_b = 1; | 465 | int tile_id_b = 513; |
466 | 466 | ||
467 | // Initialize all attributes by disabling rendering. If we don't do this, | 467 | // Initialize all attributes by disabling rendering. If we don't do this, |
468 | // glitches may appear. | 468 | // glitches may appear. |
@@ -478,6 +478,8 @@ int main(void) { | |||
478 | OBJ_ATTR_1(1) = x_b; | 478 | OBJ_ATTR_1(1) = x_b; |
479 | OBJ_ATTR_2(1) = tile_id_b; | 479 | OBJ_ATTR_2(1) = tile_id_b; |
480 | 480 | ||
481 | draw_logo(); | ||
482 | |||
481 | int frame_counter = 0; | 483 | int frame_counter = 0; |
482 | int active_sprite = 0; | 484 | int active_sprite = 0; |
483 | while(true) { | 485 | while(true) { |