Mercurial > molko
comparison libmlk-adventure/adventure/molko.c @ 286:3991779aaba9
adventure: initial test of spawn
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 23 Dec 2020 15:37:48 +0100 |
parents | a15f77eda9a4 |
children | 63d9fb56c609 |
comparison
equal
deleted
inserted
replaced
285:c43e39745cd8 | 286:3991779aaba9 |
---|---|
35 | 35 |
36 #include <ui/ui.h> | 36 #include <ui/ui.h> |
37 | 37 |
38 #include <rpg/rpg.h> | 38 #include <rpg/rpg.h> |
39 | 39 |
40 #include <adventure/state/battle.h> | |
40 #include <adventure/state/panic.h> | 41 #include <adventure/state/panic.h> |
41 #include <adventure/state/splashscreen.h> | 42 #include <adventure/state/splashscreen.h> |
42 #include <adventure/state/mainmenu.h> | 43 #include <adventure/state/mainmenu.h> |
43 #include <adventure/state/map.h> | 44 #include <adventure/state/map.h> |
44 | 45 |
111 } | 112 } |
112 | 113 |
113 void | 114 void |
114 molko_teleport(const char *map, int origin_x, int origin_y) | 115 molko_teleport(const char *map, int origin_x, int origin_y) |
115 { | 116 { |
117 molko.state = MOLKO_STATE_MAP; | |
118 | |
116 game_switch(state_map_new(map, origin_x, origin_y), false); | 119 game_switch(state_map_new(map, origin_x, origin_y), false); |
117 game.inhibit = INHIBIT_NONE; | 120 game.inhibit = INHIBIT_NONE; |
121 } | |
122 | |
123 void | |
124 molko_fight(struct battle *bt) | |
125 { | |
126 molko.state = MOLKO_STATE_BATTLE; | |
127 | |
128 game_switch(state_battle_new(bt), false); | |
118 } | 129 } |
119 | 130 |
120 const char * | 131 const char * |
121 molko_path(const char *file) | 132 molko_path(const char *file) |
122 { | 133 { |