mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-05-28 22:45:20 +02:00
Ran clang-format
This commit is contained in:
parent
fe824d7340
commit
a27ad9a14f
2 changed files with 68 additions and 73 deletions
|
@ -10,15 +10,8 @@ extern bopti_image_t selected_img;
|
|||
extern bopti_image_t player_male_inv_img;
|
||||
extern bopti_image_t player_female_inv_img;
|
||||
|
||||
char item_types[I_AMOUNT] = {
|
||||
IT_NONE,
|
||||
IT_ARMOR,
|
||||
IT_WEAPON,
|
||||
IT_WEAPON,
|
||||
IT_FOOD,
|
||||
IT_FOOD,
|
||||
IT_TALISMAN
|
||||
};
|
||||
char item_types[I_AMOUNT] = {IT_NONE, IT_ARMOR, IT_WEAPON, IT_WEAPON,
|
||||
IT_FOOD, IT_FOOD, IT_TALISMAN};
|
||||
|
||||
void inventory_init(Inventory *inventory) {
|
||||
inventory->open = 0;
|
||||
|
@ -75,7 +68,8 @@ char inventory_add(Inventory *inventory, Item item) {
|
|||
}
|
||||
|
||||
void inventory_move_from_selected(Inventory *inventory) {
|
||||
if(inventory->selected < 0) return;
|
||||
if(inventory->selected < 0)
|
||||
return;
|
||||
Slot current = inventory->slots[inventory->selection];
|
||||
Slot new = inventory->slots[inventory->selected];
|
||||
inventory->slots[inventory->selection] = new;
|
||||
|
@ -105,7 +99,8 @@ void inventory_use(Inventory *inventory, Player *player) {
|
|||
}
|
||||
|
||||
void inventory_unequip(Inventory *inventory, ItemType type) {
|
||||
if(inventory->slots[inventory->selection].i) return;
|
||||
if(inventory->slots[inventory->selection].i)
|
||||
return;
|
||||
switch(type) {
|
||||
case IT_TALISMAN:
|
||||
inventory->slots[inventory->selection] = inventory->equipped[0];
|
||||
|
|
Loading…
Add table
Reference in a new issue