Mercurial > molko
changeset 282:a15f77eda9a4
adventure: rename functions
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 20 Dec 2020 11:04:41 +0100 |
parents | 87b8c7510717 |
children | b5139fcb0832 |
files | libmlk-adventure/adventure/molko.c libmlk-adventure/adventure/state/continue.c libmlk-adventure/adventure/state/continue.h libmlk-adventure/adventure/state/mainmenu.c libmlk-adventure/adventure/state/mainmenu.h libmlk-adventure/adventure/state/map.c libmlk-adventure/adventure/state/map.h libmlk-adventure/adventure/state/panic.c libmlk-adventure/adventure/state/panic.h libmlk-adventure/adventure/state/splashscreen.c libmlk-adventure/adventure/state/splashscreen.h |
diffstat | 11 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libmlk-adventure/adventure/molko.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/molko.c Sun Dec 20 11:04:41 2020 +0100 @@ -78,7 +78,7 @@ */ /* Init unrecoverable panic state. */ - molko.panic = panic_state_new(); + molko.panic = state_panic_new(); panic_handler = crash; trace_handler = trace_hud_handler; @@ -88,9 +88,9 @@ /* Start to splash. */ #if 0 // TODO: put back this. - game_switch(splashscreen_state_new(), true); + game_switch(state_splashscreen_ne(), true); #else - game_switch(mainmenu_state_new(), true); + game_switch(state_mainmenu_new(), true); #endif } @@ -113,7 +113,7 @@ void molko_teleport(const char *map, int origin_x, int origin_y) { - game_switch(map_state_new(map, origin_x, origin_y), false); + game_switch(state_map_new(map, origin_x, origin_y), false); game.inhibit = INHIBIT_NONE; }
--- a/libmlk-adventure/adventure/state/continue.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/continue.c Sun Dec 20 11:04:41 2020 +0100 @@ -52,7 +52,7 @@ break; case EVENT_KEYDOWN: if (ev->key.key == KEY_ESCAPE) - game_switch(mainmenu_state_new(), false); + game_switch(state_mainmenu_new(), false); else selected = dialog_save_handle(&self->dialog, ev); break; @@ -93,7 +93,7 @@ } struct state * -continue_state_new(void) +state_continue_new(void) { struct self *self;
--- a/libmlk-adventure/adventure/state/continue.h Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/continue.h Sun Dec 20 11:04:41 2020 +0100 @@ -16,12 +16,12 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef MOLKO_ADVENTURE_CONTINUE_H -#define MOLKO_ADVENTURE_CONTINUE_H +#ifndef MOLKO_ADVENTURE_STATE_CONTINUE_H +#define MOLKO_ADVENTURE_STATE_CONTINUE_H struct state; struct state * -continue_state_new(void); +state_continue_new(void); -#endif /* !MOLKO_ADVENTURE_CONTINUE_H */ +#endif /* !MOLKO_ADVENTURE_STATE_CONTINUE_H */
--- a/libmlk-adventure/adventure/state/mainmenu.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/mainmenu.c Sun Dec 20 11:04:41 2020 +0100 @@ -64,7 +64,7 @@ static void resume(void) { - game_switch(continue_state_new(), false); + game_switch(state_continue_new(), false); } static void @@ -201,7 +201,7 @@ } struct state * -mainmenu_state_new(void) +state_mainmenu_new(void) { struct self *self;
--- a/libmlk-adventure/adventure/state/mainmenu.h Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/mainmenu.h Sun Dec 20 11:04:41 2020 +0100 @@ -22,6 +22,6 @@ struct state; struct state * -mainmenu_state_new(void); +state_mainmenu_new(void); -#endif /* !MOLKO_ADVENTURE_STATE_PANIC_H */ +#endif /* !MOLKO_ADVENTURE_STATE_MAINMENU_H */
--- a/libmlk-adventure/adventure/state/map.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/map.c Sun Dec 20 11:04:41 2020 +0100 @@ -117,7 +117,7 @@ } struct state * -map_state_new(const char *name, int origin_x, int origin_y) +state_map_new(const char *name, int origin_x, int origin_y) { (void)origin_x; (void)origin_y;
--- a/libmlk-adventure/adventure/state/map.h Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/map.h Sun Dec 20 11:04:41 2020 +0100 @@ -22,7 +22,7 @@ struct state; struct state * -map_state_new(const char *, int, int); +state_map_new(const char *, int, int); #endif /* !MOLKO_ADVENTURE_STATE_MAP_H */
--- a/libmlk-adventure/adventure/state/panic.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/panic.c Sun Dec 20 11:04:41 2020 +0100 @@ -194,7 +194,7 @@ } struct state * -panic_state_new(void) +state_panic_new(void) { struct self *self;
--- a/libmlk-adventure/adventure/state/panic.h Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/panic.h Sun Dec 20 11:04:41 2020 +0100 @@ -22,6 +22,6 @@ struct state; struct state * -panic_state_new(void); +state_panic_new(void); #endif /* !MOLKO_ADVENTURE_STATE_PANIC_H */
--- a/libmlk-adventure/adventure/state/splashscreen.c Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/splashscreen.c Sun Dec 20 11:04:41 2020 +0100 @@ -75,7 +75,7 @@ self->elapsed += ticks; if (self->elapsed >= DELAY) - game_switch(mainmenu_state_new(), false); + game_switch(state_mainmenu_new(), false); } static void @@ -100,7 +100,7 @@ } struct state * -splashscreen_state_new(void) +state_splashscreen_new(void) { struct self *self;
--- a/libmlk-adventure/adventure/state/splashscreen.h Sun Dec 20 10:55:53 2020 +0100 +++ b/libmlk-adventure/adventure/state/splashscreen.h Sun Dec 20 11:04:41 2020 +0100 @@ -22,6 +22,6 @@ struct state; struct state * -splashscreen_state_new(void); +state_splashscreen_new(void); #endif /* !MOLKO_ADVENTURE_STATE_SPLASHSCREEN_H */