Mercurial > molko
comparison libmlk-rpg/rpg/selection.c @ 316:1a6125ffebff
misc: fix many warnings and build on macOS
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 22 Sep 2021 12:57:55 +0200 |
parents | d01e83210ca2 |
children |
comparison
equal
deleted
inserted
replaced
315:3bfaaf5342a9 | 316:1a6125ffebff |
---|---|
25 #include "selection.h" | 25 #include "selection.h" |
26 | 26 |
27 static void | 27 static void |
28 random(struct selection *slt, const struct battle *bt, const struct battle_entity *entities, size_t entitiesz) | 28 random(struct selection *slt, const struct battle *bt, const struct battle_entity *entities, size_t entitiesz) |
29 { | 29 { |
30 (void)bt; | |
31 | |
30 struct { | 32 struct { |
31 const struct battle_entity *entity; | 33 const struct battle_entity *entity; |
32 size_t position; | 34 size_t position; |
33 } table[BATTLE_ENTITY_MAX] = {0}; | 35 } table[BATTLE_ENTITY_MAX] = {0}; |
34 | 36 |
49 } | 51 } |
50 | 52 |
51 static void | 53 static void |
52 first(struct selection *slt, const struct battle *bt, const struct battle_entity *entities, size_t entitiesz) | 54 first(struct selection *slt, const struct battle *bt, const struct battle_entity *entities, size_t entitiesz) |
53 { | 55 { |
56 (void)bt; | |
57 | |
54 for (size_t i = 0; i < entitiesz; ++i) { | 58 for (size_t i = 0; i < entitiesz; ++i) { |
55 if (battle_entity_ok(&entities[i])) { | 59 if (battle_entity_ok(&entities[i])) { |
56 slt->index_character = i; | 60 slt->index_character = i; |
57 break; | 61 break; |
58 } | 62 } |