comparison libmlk-adventure/adventure/molko.h @ 259:16be1ad3ddba

adventure: start working on maps and teleport
author David Demelier <markand@malikania.fr>
date Sun, 06 Dec 2020 11:22:03 +0100
parents 71b3b7036de7
children cd5bdb995052
comparison
equal deleted inserted replaced
258:f978fa0137ce 259:16be1ad3ddba
20 #define MOLKO_MOLKO_H 20 #define MOLKO_MOLKO_H
21 21
22 #include <core/game.h> 22 #include <core/game.h>
23 #include <core/texture.h> 23 #include <core/texture.h>
24 #include <core/sprite.h> 24 #include <core/sprite.h>
25 #include <core/state.h>
26
27 #include <rpg/map-file.h>
28 #include <rpg/map.h>
29
30 enum molko_state {
31 MOLKO_STATE_SPLASH,
32 MOLKO_STATE_MAINMENU,
33 MOLKO_STATE_PANIC,
34 MOLKO_STATE_MAP,
35 MOLKO_STATE_NUM
36 };
37 25
38 struct molko { 26 struct molko {
39 struct game engine; 27 struct game engine;
40 struct state states[MOLKO_STATE_NUM]; 28 struct state *panic;
41 29
42 /* MOLKO_STATE_MAP. */ 30 /* For map state. */
43 struct texture map_player_texture; 31 struct texture map_player_texture;
44 struct sprite map_player_sprite; 32 struct sprite map_player_sprite;
45 struct map_file map_file;
46 struct map map;
47 }; 33 };
48 34
49 extern struct molko molko; 35 extern struct molko molko;
50 36
51 void 37 void
53 39
54 void 40 void
55 molko_run(void); 41 molko_run(void);
56 42
57 void 43 void
44 molko_teleport(const char *map, int origin_x, int origin_y);
45
46 const char *
47 molko_path(const char *file);
48
49 void
58 molko_finish(void); 50 molko_finish(void);
59 51
60 #endif /* !MOLKO_MOLKO_H */ 52 #endif /* !MOLKO_MOLKO_H */