title screen

This commit is contained in:
KikooDX 2021-11-12 17:12:13 +01:00
parent 198aa97c7c
commit 2a35702b4c
4 changed files with 15 additions and 0 deletions

View File

@ -38,6 +38,7 @@ set(ASSETS
res/tileset.png
res/shatter.png
res/player.png
res/title.png
${LEVELS}
)

View File

@ -7,3 +7,7 @@ shatter.png:
player.png:
type: bopti-image
name: bimg_player
title.png:
type: bopti-image
name: bimg_title
profile: p4

BIN
res/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -8,6 +8,7 @@
#include "vec.h"
#include <gint/cpu.h>
#include <gint/display.h>
#include <gint/keyboard.h>
#include <gint/timer.h>
#include <stdlib.h>
@ -21,6 +22,7 @@ main(void)
int timer;
int frameskip = 1;
volatile int has_ticked = 0;
extern bopti_image_t bimg_title;
srand(1337);
timer = timer_configure(TIMER_ANY, 1000000 / TARGET_FPS,
@ -31,6 +33,14 @@ main(void)
level_load(0);
camera_init(player_pos());
dimage(0, 0, &bimg_title);
dupdate();
getkey();
has_ticked = 0;
while (!has_ticked)
;
has_ticked = 0;
while (!input_down(K_EXIT)) {
int i;
draw();