crocparty/game/game.c

38 lines
615 B
C
Raw Normal View History

2024-02-27 23:57:37 +00:00
#include "art/game_player.h"
2024-02-27 23:09:51 +00:00
#include "art/game_tiles.h"
2024-02-26 00:40:33 +00:00
#include "device/device.h"
2024-02-27 04:19:22 +00:00
#include "map/game_map.h"
2024-02-25 03:00:23 +00:00
#include "game.h"
#include "sys/sys.h"
2024-02-25 03:00:23 +00:00
uint32_t game_frame;
const char* game_title() {
return "Croc Party!";
}
2024-02-25 03:00:23 +00:00
void game_init() {
sys_init();
2024-02-27 23:57:37 +00:00
game_palette_init();
}
void game_destroy() {
sys_destroy();
2024-02-25 03:00:23 +00:00
}
void game_update() {
2024-02-27 23:57:37 +00:00
game_frame += 1;
2024-02-25 03:00:23 +00:00
}
void game_draw() {
2024-02-27 23:57:37 +00:00
sys_cls(9);
sys_map_draw(map_game_map, spr_game_tiles, 0, 0, 0, 0, 32, 18);
sys_sprite_draw_ext(
spr_game_player,
2024-02-27 23:57:37 +00:00
(game_frame / 8) % 4 * 2, 144, 88, 2, 2,
false, false
);
2024-02-25 03:00:23 +00:00
}