The game now boots into a menu (Start Game, Hard Mode toggle, Music toggle) navigated with Up/Down and A/Start, instead of dropping straight into a match. B returns to the menu from a paused or game-over state.
27 lines
741 B
C
27 lines
741 B
C
#ifndef GAME_RENDER_H
|
|
#define GAME_RENDER_H
|
|
|
|
#include <nds.h>
|
|
|
|
#include "game_state.h"
|
|
|
|
struct RenderAssets {
|
|
PrintConsole *topScreen = nullptr;
|
|
PrintConsole *bottomScreen = nullptr;
|
|
|
|
u16 *gfx_segment = nullptr;
|
|
u16 *gfx_segment_small = nullptr;
|
|
u16 *gfx_head = nullptr;
|
|
u16 *gfx_apple = nullptr;
|
|
u16 *gfx_tail = nullptr;
|
|
u16 *gfx_apple_rotten = nullptr;
|
|
u16 *gfx_apple_cursed = nullptr;
|
|
};
|
|
|
|
void draw_game(const GameState &state, const RenderAssets &assets);
|
|
void draw_stats(const GameState &state, bool internals, bool musicEnabled, uint8_t frame);
|
|
void draw_menu(const GameState &state, const RenderAssets &assets, bool musicEnabled);
|
|
void blink_apples(const GameState &state, u16 *gfx_apple);
|
|
|
|
#endif
|