What the screens of shard_dash share: the layout, the rules, the run's result. More...
#include <snes.h>Go to the source code of this file.
Macros | |
VRAM (word addresses): three maps, then each layer's tiles on a $1000 boundary | |
| #define | SPR_VRAM 0x4000 |
| #define | VRAM_BG1_GFX 0x1000 |
| #define | VRAM_BG1_MAP 0x0000 |
| #define | VRAM_BG2_GFX 0x2000 |
| #define | VRAM_BG2_MAP 0x0400 |
| #define | VRAM_BG3_FONT 0x3000 |
| #define | VRAM_BG3_MAP 0x0800 |
The rules | |
| #define | GOAL 5 |
| #define | RESULT_WAIT 900 |
| #define | TIME_LIMIT 1800 |
Values of game_screen | |
| #define | SCREEN_PLAY 1 |
| #define | SCREEN_RESULT 2 |
| #define | SCREEN_TITLE 0 |
Functions | |
| void | playRun (void) |
| One round: returns when the goal is reached or the clock is out. | |
| void | resultRun (void) |
| The result screen: saves a win, shows it, returns on START or after RESULT_WAIT. | |
| void | titleRun (void) |
| The title screen: returns when START is pressed. | |
Variables | |
| u8 | game_screen |
| Which screen runs (the tests read it by name). | |
| u16 | pump_frames |
| Frames the pump ran since power-on: it runs in fades, waits and loads too. | |
| u8 | run_new_best |
| The last round: 1 if it beat the saved best. | |
| u16 | run_time |
| The last round: frames from the start to the last shard (or TIME_LIMIT). | |
| u8 | run_won |
| The last round: 1 if the goal was reached before the clock. | |
What the screens of shard_dash share: the layout, the rules, the run's result.
| #define GOAL 5 |
shards to collect
| #define RESULT_WAIT 900 |
frames the result stays before the title returns
| #define SCREEN_PLAY 1 |
| #define SCREEN_RESULT 2 |
| #define SCREEN_TITLE 0 |
| #define SPR_VRAM 0x4000 |
sprite tiles
| #define TIME_LIMIT 1800 |
frames on the clock: 30 s at 60 Hz
| #define VRAM_BG1_GFX 0x1000 |
| #define VRAM_BG1_MAP 0x0000 |
the play square
| #define VRAM_BG2_GFX 0x2000 |
| #define VRAM_BG2_MAP 0x0400 |
the logo
| #define VRAM_BG3_FONT 0x3000 |
| #define VRAM_BG3_MAP 0x0800 |
the text
| void playRun | ( | void | ) |
One round: returns when the goal is reached or the clock is out.
< the play square
< frames on the clock: 30 s at 60 Hz
< Kit walking down: frames 0-4
< shards to collect
< frames on the clock: 30 s at 60 Hz
< shards to collect
| void resultRun | ( | void | ) |
The result screen: saves a win, shows it, returns on START or after RESULT_WAIT.
< the logo
< frames the result stays before the title returns
| void titleRun | ( | void | ) |
The title screen: returns when START is pressed.
< the logo
|
extern |
Which screen runs (the tests read it by name).
|
extern |
Frames the pump ran since power-on: it runs in fades, waits and loads too.
|
extern |
The last round: 1 if it beat the saved best.
|
extern |
The last round: frames from the start to the last shard (or TIME_LIMIT).
|
extern |
The last round: 1 if the goal was reached before the clock.