Mercurial > molko
comparison src/libmlk-rpg/rpg/battle-state-victory.c @ 398:14ce7c4871e3
rpg: overhaul of battle bar
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 27 Feb 2022 10:08:51 +0100 |
parents | 9334b420c975 |
children | d74f53299252 |
comparison
equal
deleted
inserted
replaced
397:73eabfd50410 | 398:14ce7c4871e3 |
---|---|
53 static void | 53 static void |
54 draw(const struct battle_state *st, const struct battle *bt) | 54 draw(const struct battle_state *st, const struct battle *bt) |
55 { | 55 { |
56 (void)bt; | 56 (void)bt; |
57 | 57 |
58 battle_state_victory_draw(st->data); | 58 battle_state_victory_draw(st->data, bt); |
59 } | 59 } |
60 | 60 |
61 void | 61 void |
62 battle_state_victory_init(struct battle_state_victory *vic, struct battle *bt) | 62 battle_state_victory_init(struct battle_state_victory *vic, struct battle *bt) |
63 { | 63 { |
99 battle_state_victory_update(struct battle_state_victory *vic, struct battle *bt, unsigned int ticks) | 99 battle_state_victory_update(struct battle_state_victory *vic, struct battle *bt, unsigned int ticks) |
100 { | 100 { |
101 assert(vic); | 101 assert(vic); |
102 assert(bt); | 102 assert(bt); |
103 | 103 |
104 battle_update_component(bt, BATTLE_COMPONENT_ALL, ticks); | |
105 | |
104 if (message_update(&vic->msg, ticks)) | 106 if (message_update(&vic->msg, ticks)) |
105 battle_state_closing(bt); | 107 battle_state_closing(bt); |
106 | 108 |
107 return 0; | 109 return 0; |
108 } | 110 } |
109 | 111 |
110 void | 112 void |
111 battle_state_victory_draw(const struct battle_state_victory *vic) | 113 battle_state_victory_draw(const struct battle_state_victory *vic, const struct battle *bt) |
112 { | 114 { |
113 assert(vic); | 115 assert(vic); |
114 | 116 |
117 battle_draw_component(bt, BATTLE_COMPONENT_ALL); | |
115 message_draw(&vic->msg); | 118 message_draw(&vic->msg); |
116 } | 119 } |
117 | 120 |
118 void | 121 void |
119 battle_state_victory(struct battle *bt) | 122 battle_state_victory(struct battle *bt) |