generated from 32blit/32blit-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
32blox.hpp
54 lines (40 loc) · 1.01 KB
/
32blox.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* 32blox.hpp - part of 32Blox (revised edition!)
*
* Copyright (C) 2020 Pete Favelle <[email protected]>
*
* This file is released under the MIT License; see LICENSE for details
*
* This file declares common structures and constants across the project.
*/
#ifndef _32BLOX_HPP_
#define _32BLOX_HPP_
/* Constants. */
#define GAME_DATAFILE_HISCORE ".gamedata/32blox/hiscores.txt"
#define SPRITE_ROW_BRICK 0
#define SPRITE_ROW_BALL 2
#define SPRITE_ROW_BAT 3
#define SPRITE_ROW_POWERUP 4
#define SAVE_SLOT_HISCORE 0
#define SAVE_SLOT_OUTPUT 1
/* Enums. */
typedef enum
{
STATE_NONE,
STATE_SPLASH,
STATE_GAME,
STATE_DEATH,
STATE_HISCORE,
STATE_MAX
} gamestate_t;
/* Interfaces. */
class GameStateInterface
{
public:
virtual gamestate_t update( uint32_t ) = 0;
virtual void render( uint32_t ) = 0;
virtual void init( GameStateInterface * ) = 0;
virtual void fini( GameStateInterface * ) = 0;
};
#endif /* _32BLOX_HPP_ */
/* End of 32blox.hpp */