fp: Add inventory and consume coins on building purchase

This commit is contained in:
2023-10-07 15:04:37 +11:00
parent 4628731bef
commit fd0612ac1c
3 changed files with 116 additions and 57 deletions
+14 -1
View File
@@ -133,6 +133,19 @@ struct FP_GameRenderSprite
uint64_t started_at_clock_ms;
};
struct FP_GameInventory
{
uint32_t airports_base_price;
uint32_t clubs_base_price;
uint32_t kennels_base_price;
uint32_t churchs_base_price;
uint8_t airports;
uint8_t clubs;
uint8_t kennels;
uint8_t churchs;
};
struct FP_GameEntity
{
FP_GameEntity *next;
@@ -198,6 +211,7 @@ struct FP_GameEntity
Dqn_usize terry_mobile_data_plan_cap;
Dqn_usize coins;
FP_GameInventory inventory;
};
struct FP_GameEntityIterator
@@ -286,7 +300,6 @@ struct FP_Game
FP_GameActiveMenu active_menu;
bool build_mode_can_place_building;
Dqn_usize build_mode_building_index;
};
struct FP_GameAStarNode