OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
game.h
Go to the documentation of this file.
1
6#ifndef SHARD_DASH_GAME_H
7#define SHARD_DASH_GAME_H
8
9#include <snes.h>
10
13#define VRAM_BG1_MAP 0x0000
14#define VRAM_BG2_MAP 0x0400
15#define VRAM_BG3_MAP 0x0800
16#define VRAM_BG1_GFX 0x1000
17#define VRAM_BG2_GFX 0x2000
18#define VRAM_BG3_FONT 0x3000
19#define SPR_VRAM 0x4000
21
24#define GOAL 5
25#define TIME_LIMIT 1800
26#define RESULT_WAIT 900
28
31#define SCREEN_TITLE 0
32#define SCREEN_PLAY 1
33#define SCREEN_RESULT 2
35
37extern u8 game_screen;
39extern u16 pump_frames;
41extern u8 run_won;
43extern u16 run_time;
45extern u8 run_new_best;
46
48void titleRun(void);
50void playRun(void);
52void resultRun(void);
53
54#endif
u8 run_won
The last round: 1 if the goal was reached before the clock.
Definition main.c:64
u16 pump_frames
Frames the pump ran since power-on: it runs in fades, waits and loads too.
Definition main.c:63
u16 run_time
The last round: frames from the start to the last shard (or TIME_LIMIT).
Definition main.c:65
void resultRun(void)
The result screen: saves a win, shows it, returns on START or after RESULT_WAIT.
Definition result.c:17
void playRun(void)
One round: returns when the goal is reached or the clock is out.
Definition play.c:123
u8 run_new_best
The last round: 1 if it beat the saved best.
Definition main.c:66
void titleRun(void)
The title screen: returns when START is pressed.
Definition title.c:16
u8 game_screen
Which screen runs (the tests read it by name).
Definition main.c:62
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:53
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:47
OpenSNES common-case master header.