Mercurial > molko
comparison src/libmlk-rpg/rpg/battle-bar-default.c @ 401:df5e1fea1d2e
ui: gridmenu should be fully constified
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 16 Mar 2022 13:37:56 +0100 |
parents | 14ce7c4871e3 |
children | d74f53299252 |
comparison
equal
deleted
inserted
replaced
400:4fb0ce06a43a | 401:df5e1fea1d2e |
---|---|
553 { | 553 { |
554 assert(bar); | 554 assert(bar); |
555 assert(bt); | 555 assert(bt); |
556 assert(ch); | 556 assert(ch); |
557 | 557 |
558 bar->items = bar->grid.items = alloc_rearray0(bar->items, bar->itemsz, | 558 bar->items = alloc_rearray0(bar->items, bar->itemsz, |
559 CHARACTER_SPELL_MAX, sizeof (*bar->items)); | 559 CHARACTER_SPELL_MAX, sizeof (*bar->items)); |
560 bar->itemsz = bar->grid.itemsz = CHARACTER_SPELL_MAX; | 560 bar->itemsz = CHARACTER_SPELL_MAX; |
561 bar->state = BATTLE_BAR_DEFAULT_STATE_GRID; | 561 bar->state = BATTLE_BAR_DEFAULT_STATE_GRID; |
562 | 562 |
563 for (size_t i = 0; i < CHARACTER_SPELL_MAX; ++i) | 563 for (size_t i = 0; i < CHARACTER_SPELL_MAX; ++i) |
564 if (ch->spells[i]) | 564 if (ch->spells[i]) |
565 bar->grid.items[i] = ch->spells[i]->name; | 565 bar->items[i] = ch->spells[i]->name; |
566 | |
567 bar->grid.items = bar->items; | |
568 bar->grid.itemsz = bar->itemsz; | |
566 } | 569 } |
567 | 570 |
568 void | 571 void |
569 battle_bar_default_open_item(struct battle_bar_default *bar, const struct battle *bt) | 572 battle_bar_default_open_item(struct battle_bar_default *bar, const struct battle *bt) |
570 { | 573 { |