#include <global.h>
Inheritance diagram for hoa_global::GameGlobal:


Public Member Functions | |
| void | AddDrunes (uint32 amount) |
| |
| uint32 | AverageActivePartyExperienceLevel () const |
| Calculates the average experience level of members in the active party. | |
| void | ClearAllData () |
| Deletes all data stored within the GameGlobal class object This function is meant to be called when the user quits the current game instance and returns to the boot screen. It will delete all characters, inventory, and other data relevant to the current game. | |
| bool | LoadGame (const std::string &filename) |
| Loads all global data from a saved game file. | |
| bool | SaveGame (std::string &filename) |
| Saves all global data to a saved game file. | |
| void | SetLocation (const hoa_utils::ustring &location_name, const std::string &location_graphic_filename) |
| Sets the name and graphic for the current location. | |
| bool | SingletonInitialize () |
| A method for the inheriting class to implement, which initializes the class. | |
| void | SubtractDrunes (uint32 amount) |
| |
| ~GameGlobal () | |
Character Functions | |
| void | AddCharacter (GlobalCharacter *ch) |
| Adds a new pre-initialized character to the party. | |
| void | AddCharacter (uint32 id) |
| Adds a new character to the party with its initial settings. | |
| GlobalCharacter * | GetCharacter (uint32 id) |
| Returns a pointer to a character currently in the party. | |
| bool | IsCharacterInParty (uint32 id) |
| Checks whether or not a character is in the party. | |
| void | RemoveCharacter (uint32 id) |
| Removes a character from the party. | |
Event Group Methods | |
| void | AddNewEventGroup (const std::string &group_name) |
| Adds a new event group for the class to manage. | |
| bool | DoesEventExist (const std::string &group_name, const std::string &event_name) const |
| Determines if an event of a given name exists within a given group. | |
| bool | DoesEventGroupExist (const std::string &group_name) const |
| Queries whether or not an event group of a given name exists. | |
| GlobalEventGroup * | GetEventGroup (const std::string &group_name) const |
| Returns a pointer to an event group of the specified name. | |
| int32 | GetEventValue (const std::string &group_name, const std::string &event_name) const |
| Returns the value of an event inside of a specified group. | |
| uint32 | GetNumberEventGroups () const |
| Returns the number of event groups stored in the class. | |
| uint32 | GetNumberEvents (const std::string &group_name) const |
| Returns the number of events for a specified group name. | |
Inventory Methods | |
| void | AddToInventory (GlobalObject *object) |
| Adds a new object to the inventory. | |
| void | AddToInventory (uint32 obj_id, uint32 obj_count=1) |
| Adds a new object to the inventory. | |
| void | DecrementObjectCount (uint32 obj_id, uint32 obj_count=1) |
| Decrements the number (count) of an object in the inventory. | |
| void | IncrementObjectCount (uint32 obj_id, uint32 obj_count=1) |
| Increments the number (count) of an object in the inventory. | |
| bool | IsObjectInInventory (uint32 id) |
| Checks whether or a given object is currently stored in the inventory. | |
| void | RemoveFromInventory (uint32 obj_id) |
| Removes an object from the inventory. | |
| GlobalObject * | RetrieveFromInventory (uint32 obj_id, bool all_counts=false) |
| Retries a single copy of an object from the inventory. | |
Class Member Access Functions | |
| GlobalParty * | GetActiveParty () |
| std::vector< GlobalCharacter * > * | GetCharacterOrder () |
| uint32 | GetDrunes () const |
| std::map< uint32, GlobalObject * > * | GetInventory () |
| std::vector< GlobalArmor * > * | GetInventoryArmArmor () |
| std::vector< GlobalArmor * > * | GetInventoryHeadArmor () |
| std::vector< GlobalItem * > * | GetInventoryItems () |
| std::vector< GlobalKeyItem * > * | GetInventoryKeyItems () |
| std::vector< GlobalArmor * > * | GetInventoryLegArmor () |
| std::vector< GlobalShard * > * | GetInventoryShards () |
| std::vector< GlobalArmor * > * | GetInventoryTorsoArmor () |
| std::vector< GlobalWeapon * > * | GetInventoryWeapons () |
| hoa_video::StillImage & | GetLocationGraphic () |
| hoa_utils::ustring & | GetLocationName () |
| void | SetDrunes (uint32 amount) |
Private Member Functions | |
| void | _LoadCharacter (hoa_script::ReadScriptDescriptor &file, uint32 id) |
| A helper function to GameGlobal::LoadGame() that loads a saved game character and adds it to the party. | |
| void | _LoadEvents (hoa_script::ReadScriptDescriptor &file, const std::string &group_name) |
| A helper function to GameGlobal::LoadGame() that loads a group of game events from a saved game file. | |
| void | _LoadInventory (hoa_script::ReadScriptDescriptor &file, std::string category_name) |
| A helper function to GameGlobal::LoadGame() that restores the contents of the inventory from a saved game file. | |
| template<class T> | |
| bool | _RemoveFromInventory (uint32 obj_id, std::vector< T * > &inv) |
| A helper template function that finds and removes an object from the inventory. | |
| template<class T> | |
| T * | _RetrieveFromInventory (uint32 obj_id, std::vector< T * > &inv, bool all_counts) |
| A helper template function that finds and returns a copy of an object from the inventory. | |
| void | _SaveCharacter (hoa_script::WriteScriptDescriptor &file, GlobalCharacter *character, bool last) |
| A helper function to GameGlobal::SaveGame() that writes character data to the saved game file. | |
| void | _SaveEvents (hoa_script::WriteScriptDescriptor &file, GlobalEventGroup *event_group) |
| A helper function to GameGlobal::SaveGame() that writes a group of event data to the saved game file. | |
| template<class T> | |
| void | _SaveInventory (hoa_script::WriteScriptDescriptor &file, std::string name, std::vector< T * > &inv) |
| A helper function to GameGlobal::SaveGame() that stores the contents of a type of inventory to the saved game file. | |
| GameGlobal () | |
Private Attributes | |
| GlobalParty | _active_party |
| The active party of characters The active party contains the group of characters that will fight when a battle begins. This party can be up to four characters, and should always contain at least one character. | |
| std::vector< GlobalCharacter * > | _character_order |
| A vector whose purpose is to maintain the order of characters The first four characters in this vector are in the active party; the rest are in reserve. | |
| std::map< uint32, GlobalCharacter * > | _characters |
| A map containing all characters that the player has discovered This map contains all characters that the player has met with, regardless of whether or not they are in the active party. The map key is the character's unique ID number. | |
| uint32 | _drunes |
| The amount of financial resources (drunes) that the party currently has. | |
| std::map< std::string, GlobalEventGroup * > | _event_groups |
| The container which stores all of the groups of events that have occured in the game The name of the GlobalEventGroup serves as its key in this map data structure. | |
| std::map< uint32, GlobalObject * > | _inventory |
| Retains a list of all of the objects currently stored in the player's inventory This map is used to quickly check if an item is in the inventory or not. The key to the map is the object's identification number. When an object is added to the inventory, if it already exists then the object counter is simply increased instead of adding an entire new class object. When the object count becomes zero, the object is removed from the inventory. Duplicates of all objects are retained in the various inventory containers below. | |
| hoa_video::StillImage | _location_graphic |
| The graphical image which represents the current location. | |
| hoa_utils::ustring | _location_name |
| The name of the map that the current party is on. | |
| hoa_script::ReadScriptDescriptor | _arm_armor_script |
| hoa_script::ReadScriptDescriptor | _attack_skills_script |
| hoa_script::ReadScriptDescriptor | _defend_skills_script |
| hoa_script::ReadScriptDescriptor | _head_armor_script |
| hoa_script::ReadScriptDescriptor | _items_script |
| Script files that retain data for various global constructs. | |
| hoa_script::ReadScriptDescriptor | _leg_armor_script |
| hoa_script::ReadScriptDescriptor | _support_skills_script |
| hoa_script::ReadScriptDescriptor | _torso_armor_script |
| hoa_script::ReadScriptDescriptor | _weapons_script |
| std::vector< GlobalArmor * > | _inventory_arm_armor |
| std::vector< GlobalArmor * > | _inventory_head_armor |
| std::vector< GlobalItem * > | _inventory_items |
| Inventory containers These vectors contain the inventory of the entire party. The vectors are sorted according to the user's personal preferences. When a new object is added to the inventory, by default it will be placed at the end of the vector. | |
| std::vector< GlobalKeyItem * > | _inventory_key_items |
| std::vector< GlobalArmor * > | _inventory_leg_armor |
| std::vector< GlobalShard * > | _inventory_shards |
| std::vector< GlobalArmor * > | _inventory_torso_armor |
| std::vector< GlobalWeapon * > | _inventory_weapons |
Friends | |
| class | GlobalArmor |
| class | GlobalItem |
| class | GlobalSkill |
| class | GlobalWeapon |
| class | hoa_utils::Singleton< GameGlobal > |
****************************************************************************
This class is a resource manager for the current state of the game that is being played. It retains all of the characters in the player's party, the party's inventory, etc. This class assists the various game modes by allowing them to share data with each other on a "global" basis.
Definition at line 147 of file global.h.
| hoa_global::GameGlobal::~GameGlobal | ( | ) |
Definition at line 93 of file global.cpp.
References _arm_armor_script, _attack_skills_script, _head_armor_script, _items_script, _leg_armor_script, _torso_armor_script, _weapons_script, ClearAllData(), hoa_script::ReadScriptDescriptor::CloseFile(), hoa_script::ReadScriptDescriptor::CloseTable(), and hoa_global::GLOBAL_DEBUG.
Here is the call graph for this function:

| hoa_global::GameGlobal::GameGlobal | ( | ) | [private] |
| void hoa_global::GameGlobal::_LoadCharacter | ( | hoa_script::ReadScriptDescriptor & | file, | |
| uint32 | id | |||
| ) | [private] |
A helper function to GameGlobal::LoadGame() that loads a saved game character and adds it to the party.
| file | A reference to the open and valid file from where to read the character from | |
| id | The character's integer ID, used to find and restore the character data |
Definition at line 880 of file global.cpp.
References AddCharacter(), hoa_global::GlobalCharacter::AddSkill(), hoa_script::ReadScriptDescriptor::CloseTable(), hoa_global::GlobalCharacter::EquipArmArmor(), hoa_global::GlobalCharacter::EquipHeadArmor(), hoa_global::GlobalCharacter::EquipLegArmor(), hoa_global::GlobalCharacter::EquipTorsoArmor(), hoa_global::GlobalActor::EquipWeapon(), GlobalArmor, GlobalWeapon, hoa_script::ScriptDescriptor::IsFileOpen(), hoa_script::ReadScriptDescriptor::OpenTable(), hoa_script::ReadScriptDescriptor::ReadUInt(), hoa_script::ReadScriptDescriptor::ReadUIntVector(), hoa_global::GlobalActor::SetAgility(), hoa_global::GlobalActor::SetEvade(), hoa_global::GlobalActor::SetExperienceLevel(), hoa_global::GlobalActor::SetExperiencePoints(), hoa_global::GlobalActor::SetFortitude(), hoa_global::GlobalActor::SetHitPoints(), hoa_global::GlobalActor::SetMaxHitPoints(), hoa_global::GlobalActor::SetMaxSkillPoints(), hoa_global::GlobalActor::SetProtection(), hoa_global::GlobalActor::SetSkillPoints(), hoa_global::GlobalActor::SetStrength(), and hoa_global::GlobalActor::SetVigor().
Here is the call graph for this function:

| void hoa_global::GameGlobal::_LoadEvents | ( | hoa_script::ReadScriptDescriptor & | file, | |
| const std::string & | group_name | |||
| ) | [private] |
A helper function to GameGlobal::LoadGame() that loads a group of game events from a saved game file.
| file | A reference to the open and valid file from where to read the event data from | |
| group_name | The name of the event group to load |
Definition at line 972 of file global.cpp.
References hoa_global::GlobalEventGroup::AddNewEvent(), AddNewEventGroup(), hoa_script::ReadScriptDescriptor::CloseTable(), GetEventGroup(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_script::ReadScriptDescriptor::OpenTable(), hoa_script::ReadScriptDescriptor::ReadInt(), and hoa_script::ReadScriptDescriptor::ReadTableKeys().
Here is the call graph for this function:

| void hoa_global::GameGlobal::_LoadInventory | ( | hoa_script::ReadScriptDescriptor & | file, | |
| std::string | category_name | |||
| ) | [private] |
A helper function to GameGlobal::LoadGame() that restores the contents of the inventory from a saved game file.
| file | A reference to the open and valid file from where to read the inventory list | |
| category_name | The name of the table in the file that should contain the inventory for a specific category |
Definition at line 860 of file global.cpp.
References AddToInventory(), hoa_script::ReadScriptDescriptor::CloseTable(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_script::ReadScriptDescriptor::OpenTable(), hoa_script::ReadScriptDescriptor::ReadTableKeys(), and hoa_script::ReadScriptDescriptor::ReadUInt().
Here is the call graph for this function:

| bool hoa_global::GameGlobal::_RemoveFromInventory | ( | uint32 | obj_id, | |
| std::vector< T * > & | inv | |||
| ) | [private] |
A helper template function that finds and removes an object from the inventory.
| obj_id | The ID of the object to remove from the inventory | |
| inv | The vector container of the appropriate inventory type |
Definition at line 559 of file global.h.
References _inventory.
Referenced by RemoveFromInventory().
| T * hoa_global::GameGlobal::_RetrieveFromInventory | ( | uint32 | obj_id, | |
| std::vector< T * > & | inv, | |||
| bool | all_counts | |||
| ) | [private] |
A helper template function that finds and returns a copy of an object from the inventory.
| obj_id | The ID of the object to remove from the inventory | |
| inv | The vector container of the appropriate inventory type | |
| all_counts | If false the object's count is decremented by one from the inventory, otherwise all counts are removed completely |
Definition at line 574 of file global.h.
References _inventory.
Referenced by RetrieveFromInventory().
| void hoa_global::GameGlobal::_SaveCharacter | ( | hoa_script::WriteScriptDescriptor & | file, | |
| GlobalCharacter * | character, | |||
| bool | last | |||
| ) | [private] |
A helper function to GameGlobal::SaveGame() that writes character data to the saved game file.
| file | A reference to the open and valid file where to write the character data | |
| objects | A ponter to the character whose data should be saved | |
| last | Set to true if this is the final character that needs to be saved This method will need to be called once for each character in the player's party |
Definition at line 718 of file global.cpp.
References hoa_global::GlobalActor::GetAgility(), hoa_global::GlobalCharacter::GetArmArmorEquipped(), hoa_global::GlobalCharacter::GetAttackSkills(), hoa_global::GlobalCharacter::GetDefenseSkills(), hoa_global::GlobalActor::GetEvade(), hoa_global::GlobalCharacter::GetExperienceForNextLevel(), hoa_global::GlobalActor::GetExperienceLevel(), hoa_global::GlobalActor::GetExperiencePoints(), hoa_global::GlobalActor::GetFortitude(), hoa_global::GlobalCharacter::GetHeadArmorEquipped(), hoa_global::GlobalActor::GetHitPoints(), hoa_global::GlobalObject::GetID(), hoa_global::GlobalActor::GetID(), hoa_global::GlobalCharacter::GetLegArmorEquipped(), hoa_global::GlobalActor::GetMaxHitPoints(), hoa_global::GlobalActor::GetMaxSkillPoints(), hoa_global::GlobalActor::GetProtection(), hoa_global::GlobalActor::GetSkillPoints(), hoa_global::GlobalActor::GetStrength(), hoa_global::GlobalCharacter::GetSupportSkills(), hoa_global::GlobalCharacter::GetTorsoArmorEquipped(), hoa_global::GlobalActor::GetVigor(), hoa_global::GlobalActor::GetWeaponEquipped(), hoa_script::WriteScriptDescriptor::InsertNewLine(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_utils::NumberToString(), and hoa_script::WriteScriptDescriptor::WriteLine().
Here is the call graph for this function:

| void hoa_global::GameGlobal::_SaveEvents | ( | hoa_script::WriteScriptDescriptor & | file, | |
| GlobalEventGroup * | event_group | |||
| ) | [private] |
A helper function to GameGlobal::SaveGame() that writes a group of event data to the saved game file.
| file | A reference to the open and valid file where to write the event data | |
| event_group | A pointer to the group of events to store This method will need to be called once for each GlobalEventGroup contained by this class. |
Definition at line 833 of file global.cpp.
References hoa_global::GlobalEventGroup::_events, hoa_global::GlobalEventGroup::GetGroupName(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_utils::NumberToString(), and hoa_script::WriteScriptDescriptor::WriteLine().
Here is the call graph for this function:

| void hoa_global::GameGlobal::_SaveInventory | ( | hoa_script::WriteScriptDescriptor & | file, | |
| std::string | name, | |||
| std::vector< T * > & | inv | |||
| ) | [private] |
A helper function to GameGlobal::SaveGame() that stores the contents of a type of inventory to the saved game file.
| file | A reference to the open and valid file where to write the inventory list | |
| name | The name under which this set of inventory data should be categorized (ie "items", "weapons", etc) | |
| inv | A reference to the inventory vector to store |
Definition at line 597 of file global.h.
References hoa_global::GLOBAL_DEBUG, hoa_script::WriteScriptDescriptor::InsertNewLine(), hoa_script::ScriptDescriptor::IsFileOpen(), hoa_utils::NumberToString(), and hoa_script::WriteScriptDescriptor::WriteLine().
Here is the call graph for this function:

| void hoa_global::GameGlobal::AddCharacter | ( | GlobalCharacter * | ch | ) |
Adds a new pre-initialized character to the party.
| ch | A pointer to the initialized GlobalCharacter object to add |
Definition at line 214 of file global.cpp.
References _active_party, _character_order, _characters, hoa_global::GlobalParty::AddActor(), hoa_global::GlobalActor::GetID(), and hoa_global::GLOBAL_DEBUG.
Here is the call graph for this function:

| void hoa_global::GameGlobal::AddCharacter | ( | uint32 | id | ) |
Adds a new character to the party with its initial settings.
| id | The ID number of the character to add to the party. |
Definition at line 195 of file global.cpp.
References _active_party, _character_order, _characters, hoa_global::GlobalParty::AddActor(), and hoa_global::GLOBAL_DEBUG.
Referenced by _LoadCharacter(), hoa_boot::BootMode::_OnBattleDebug(), hoa_boot::BootMode::_OnMenuDebug(), and hoa_boot::BootMode::_OnNewGame().
Here is the call graph for this function:

| void hoa_global::GameGlobal::AddDrunes | ( | uint32 | amount | ) | [inline] |
Definition at line 344 of file global.h.
References _drunes.
Referenced by hoa_boot::BootMode::_OnShopDebug(), hoa_battle::BattleMode::PlayerVictory(), and hoa_shop::private_shop::ConfirmWindow::Update().
| void hoa_global::GameGlobal::AddNewEventGroup | ( | const std::string & | group_name | ) |
Adds a new event group for the class to manage.
| group_name | The name of the new event group to add |
Definition at line 524 of file global.cpp.
References _event_groups, DoesEventGroupExist(), and hoa_global::GLOBAL_DEBUG.
Referenced by _LoadEvents().
Here is the call graph for this function:

| void hoa_global::GameGlobal::AddToInventory | ( | GlobalObject * | object | ) |
Adds a new object to the inventory.
| object | A pointer to the pre-created GlobalObject-type class to add |
Definition at line 324 of file global.cpp.
References _inventory, _inventory_arm_armor, _inventory_head_armor, _inventory_items, _inventory_leg_armor, _inventory_torso_armor, _inventory_weapons, hoa_global::GlobalObject::GetCount(), hoa_global::GlobalObject::GetID(), hoa_global::GLOBAL_DEBUG, hoa_global::private_global::MAX_ARM_ARMOR_ID, hoa_global::private_global::MAX_HEAD_ARMOR_ID, hoa_global::private_global::MAX_ITEM_ID, hoa_global::private_global::MAX_KEY_ITEM_ID, hoa_global::private_global::MAX_LEG_ARMOR_ID, hoa_global::private_global::MAX_SHARD_ID, hoa_global::private_global::MAX_TORSO_ARMOR_ID, and hoa_global::private_global::MAX_WEAPON_ID.
Here is the call graph for this function:

Adds a new object to the inventory.
| obj_id | The identifier value of the object to add | |
| obj_count | The number of instances of the object to add (default == 1) If the item already exists in the inventory, then instead the GlobalObject::_count member is used to increment the count of the stored item. |
Definition at line 275 of file global.cpp.
References _inventory, _inventory_arm_armor, _inventory_head_armor, _inventory_items, _inventory_leg_armor, _inventory_torso_armor, _inventory_weapons, GlobalArmor, GlobalItem, GlobalWeapon, hoa_global::private_global::MAX_ARM_ARMOR_ID, hoa_global::private_global::MAX_HEAD_ARMOR_ID, hoa_global::private_global::MAX_ITEM_ID, hoa_global::private_global::MAX_KEY_ITEM_ID, hoa_global::private_global::MAX_LEG_ARMOR_ID, hoa_global::private_global::MAX_SHARD_ID, hoa_global::private_global::MAX_TORSO_ARMOR_ID, and hoa_global::private_global::MAX_WEAPON_ID.
Referenced by _LoadInventory(), hoa_boot::BootMode::_OnNewGame(), and hoa_shop::private_shop::ConfirmWindow::Update().
| uint32 hoa_global::GameGlobal::AverageActivePartyExperienceLevel | ( | ) | const [inline] |
Calculates the average experience level of members in the active party.
Definition at line 355 of file global.h.
References _active_party, and hoa_global::GlobalParty::AverageExperienceLevel().
Referenced by hoa_battle::BattleMode::AddEnemy().
Here is the call graph for this function:

| void hoa_global::GameGlobal::ClearAllData | ( | ) |
Deletes all data stored within the GameGlobal class object This function is meant to be called when the user quits the current game instance and returns to the boot screen. It will delete all characters, inventory, and other data relevant to the current game.
Definition at line 161 of file global.cpp.
References _active_party, _character_order, _characters, _event_groups, _inventory, _inventory_arm_armor, _inventory_head_armor, _inventory_items, _inventory_key_items, _inventory_leg_armor, _inventory_shards, _inventory_torso_armor, _inventory_weapons, and hoa_global::GlobalParty::RemoveAllActors().
Referenced by hoa_boot::BootMode::Reset(), and ~GameGlobal().
Here is the call graph for this function:

Decrements the number (count) of an object in the inventory.
| item_id | The integer identifier of the item that will have its count decremented | |
| count | The amount to decrease the object's count by (default value == 1) |
Definition at line 488 of file global.cpp.
References _inventory, hoa_global::GLOBAL_DEBUG, and RemoveFromInventory().
Referenced by hoa_shop::private_shop::ConfirmWindow::Update().
Here is the call graph for this function:

| bool hoa_global::GameGlobal::DoesEventExist | ( | const std::string & | group_name, | |
| const std::string & | event_name | |||
| ) | const |
Determines if an event of a given name exists within a given group.
| group_name | The name of the event group where the event to check is contained | |
| event_name | The name of the event to check for |
| bool hoa_global::GameGlobal::DoesEventGroupExist | ( | const std::string & | group_name | ) | const [inline] |
Queries whether or not an event group of a given name exists.
| group_name | The name of the event group to check for |
Definition at line 294 of file global.h.
References _event_groups.
Referenced by AddNewEventGroup().
| GlobalParty* hoa_global::GameGlobal::GetActiveParty | ( | ) | [inline] |
Definition at line 393 of file global.h.
References _active_party.
Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_battle::BattleMode::_Initialize(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_menu::private_menu::SkillsWindow::_UpdateSkillList(), hoa_battle::BattleMode::_UpdateTargetSelection(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::EquipWindow::EquipWindow(), hoa_menu::private_menu::StatusWindow::StatusWindow(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::private_menu::StatusWindow::~StatusWindow().
| GlobalCharacter * hoa_global::GameGlobal::GetCharacter | ( | uint32 | id | ) |
Returns a pointer to a character currently in the party.
| id | The ID number of the character to retrieve. |
Definition at line 259 of file global.cpp.
References _characters, and hoa_global::GLOBAL_DEBUG.
Referenced by hoa_menu::private_menu::CharacterWindow::Draw().
| std::vector<GlobalCharacter*>* hoa_global::GameGlobal::GetCharacterOrder | ( | ) | [inline] |
| uint32 hoa_global::GameGlobal::GetDrunes | ( | ) | const [inline] |
Definition at line 381 of file global.h.
References _drunes.
Referenced by hoa_menu::MenuMode::_DrawBottomMenu(), hoa_shop::ShopMode::GetTotalRemaining(), and hoa_shop::private_shop::ShopActionWindow::UpdateFinanceText().
| GlobalEventGroup * hoa_global::GameGlobal::GetEventGroup | ( | const std::string & | group_name | ) | const |
Returns a pointer to an event group of the specified name.
| group_name | The name of the event group to retreive |
Definition at line 538 of file global.cpp.
References _event_groups, and hoa_global::GLOBAL_DEBUG.
Referenced by _LoadEvents().
| int32 hoa_global::GameGlobal::GetEventValue | ( | const std::string & | group_name, | |
| const std::string & | event_name | |||
| ) | const |
Returns the value of an event inside of a specified group.
| group_name | The name of the event group where the event is contained | |
| event_name | The name of the event whose value should be retrieved |
Definition at line 550 of file global.cpp.
References _event_groups, and hoa_global::GLOBAL_BAD_EVENT.
| std::map<uint32, GlobalObject*>* hoa_global::GameGlobal::GetInventory | ( | ) | [inline] |
Definition at line 396 of file global.h.
References _inventory.
Referenced by hoa_menu::MenuMode::_HandleInventoryMenu(), hoa_menu::private_menu::InventoryWindow::_UpdateItemText(), hoa_shop::ShopMode::Reset(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_shop::private_shop::ObjectSellListWindow::UpdateSellList().
| std::vector<GlobalArmor*>* hoa_global::GameGlobal::GetInventoryArmArmor | ( | ) | [inline] |
Definition at line 411 of file global.h.
References _inventory_arm_armor.
Referenced by hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), and hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| std::vector<GlobalArmor*>* hoa_global::GameGlobal::GetInventoryHeadArmor | ( | ) | [inline] |
Definition at line 405 of file global.h.
References _inventory_head_armor.
Referenced by hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), and hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| std::vector<GlobalItem*>* hoa_global::GameGlobal::GetInventoryItems | ( | ) | [inline] |
Definition at line 399 of file global.h.
References _inventory_items.
Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_menu::private_menu::InventoryWindow::_UpdateItemText(), and hoa_battle::private_battle::ActionWindow::Initialize().
| std::vector<GlobalKeyItem*>* hoa_global::GameGlobal::GetInventoryKeyItems | ( | ) | [inline] |
Definition at line 420 of file global.h.
References _inventory_key_items.
Referenced by hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| std::vector<GlobalArmor*>* hoa_global::GameGlobal::GetInventoryLegArmor | ( | ) | [inline] |
Definition at line 414 of file global.h.
References _inventory_leg_armor.
Referenced by hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), and hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| std::vector<GlobalShard*>* hoa_global::GameGlobal::GetInventoryShards | ( | ) | [inline] |
| std::vector<GlobalArmor*>* hoa_global::GameGlobal::GetInventoryTorsoArmor | ( | ) | [inline] |
Definition at line 408 of file global.h.
References _inventory_torso_armor.
Referenced by hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), and hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| std::vector<GlobalWeapon*>* hoa_global::GameGlobal::GetInventoryWeapons | ( | ) | [inline] |
Definition at line 402 of file global.h.
References _inventory_weapons.
Referenced by hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), and hoa_menu::private_menu::InventoryWindow::_UpdateItemText().
| hoa_video::StillImage& hoa_global::GameGlobal::GetLocationGraphic | ( | ) | [inline] |
| hoa_utils::ustring& hoa_global::GameGlobal::GetLocationName | ( | ) | [inline] |
| uint32 hoa_global::GameGlobal::GetNumberEventGroups | ( | ) | const [inline] |
Returns the number of event groups stored in the class.
Definition at line 333 of file global.h.
References _event_groups.
| uint32 hoa_global::GameGlobal::GetNumberEvents | ( | const std::string & | group_name | ) | const |
Returns the number of events for a specified group name.
| group_name | The name of the event group to retrieve the number of events for |
Increments the number (count) of an object in the inventory.
| item_id | The integer identifier of the item that will have its count incremented | |
| count | The amount to increase the object's count by (default value == 1) |
Definition at line 475 of file global.cpp.
References _inventory, and hoa_global::GLOBAL_DEBUG.
| bool hoa_global::GameGlobal::IsCharacterInParty | ( | uint32 | id | ) | [inline] |
Checks whether or not a character is in the party.
| id | The id of the character to check for |
Definition at line 209 of file global.h.
References _characters.
| bool hoa_global::GameGlobal::IsObjectInInventory | ( | uint32 | id | ) | [inline] |
Checks whether or a given object is currently stored in the inventory.
| id | The id of the object (item, weapon, armor, etc.) to check for |
Definition at line 284 of file global.h.
References _inventory.
| bool hoa_global::GameGlobal::LoadGame | ( | const std::string & | filename | ) |
Loads all global data from a saved game file.
| filename | The filename of the saved game file where to read the data from |
Referenced by hoa_boot::BootMode::_OnLoadGame().
| void hoa_global::GameGlobal::RemoveCharacter | ( | uint32 | id | ) |
Removes a character from the party.
| id | The ID number of the character to remove from the party. |
Definition at line 232 of file global.cpp.
References _active_party, _character_order, _characters, hoa_global::GlobalParty::AddActor(), hoa_global::GLOBAL_DEBUG, and hoa_global::GlobalParty::RemoveAllActors().
Here is the call graph for this function:

| void hoa_global::GameGlobal::RemoveFromInventory | ( | uint32 | obj_id | ) |
Removes an object from the inventory.
| obj_id | The identifier value of the object to remove |
Definition at line 385 of file global.cpp.
References _inventory, _inventory_arm_armor, _inventory_head_armor, _inventory_items, _inventory_key_items, _inventory_leg_armor, _inventory_shards, _inventory_torso_armor, _inventory_weapons, _RemoveFromInventory(), hoa_global::GLOBAL_DEBUG, hoa_global::private_global::MAX_ARM_ARMOR_ID, hoa_global::private_global::MAX_HEAD_ARMOR_ID, hoa_global::private_global::MAX_ITEM_ID, hoa_global::private_global::MAX_KEY_ITEM_ID, hoa_global::private_global::MAX_LEG_ARMOR_ID, hoa_global::private_global::MAX_SHARD_ID, hoa_global::private_global::MAX_TORSO_ARMOR_ID, and hoa_global::private_global::MAX_WEAPON_ID.
Referenced by DecrementObjectCount(), hoa_battle::private_battle::ScriptEvent::RunScript(), and hoa_menu::private_menu::InventoryWindow::Update().
Here is the call graph for this function:

| GlobalObject * hoa_global::GameGlobal::RetrieveFromInventory | ( | uint32 | obj_id, | |
| bool | all_counts = false | |||
| ) |
Retries a single copy of an object from the inventory.
| obj_id | The identifier value of the item to remove | |
| all_counts | If set to true, all counts of the object will be removed from the inventory (default value == false) |
Definition at line 424 of file global.cpp.
References _inventory, _inventory_arm_armor, _inventory_head_armor, _inventory_items, _inventory_key_items, _inventory_leg_armor, _inventory_shards, _inventory_torso_armor, _inventory_weapons, _RetrieveFromInventory(), hoa_global::GLOBAL_DEBUG, hoa_global::private_global::MAX_ARM_ARMOR_ID, hoa_global::private_global::MAX_HEAD_ARMOR_ID, hoa_global::private_global::MAX_ITEM_ID, hoa_global::private_global::MAX_KEY_ITEM_ID, hoa_global::private_global::MAX_LEG_ARMOR_ID, hoa_global::private_global::MAX_SHARD_ID, hoa_global::private_global::MAX_TORSO_ARMOR_ID, and hoa_global::private_global::MAX_WEAPON_ID.
Here is the call graph for this function:

| bool hoa_global::GameGlobal::SaveGame | ( | std::string & | filename | ) |
Saves all global data to a saved game file.
| filename | The filename of the saved game file where to write the data to |
Referenced by hoa_menu::MenuMode::_HandleSaveMenu(), and hoa_menu::private_menu::FormationWindow::FormationWindow().
| void hoa_global::GameGlobal::SetDrunes | ( | uint32 | amount | ) | [inline] |
Definition at line 378 of file global.h.
References _drunes.
Referenced by hoa_boot::BootMode::_OnNewGame().
| void hoa_global::GameGlobal::SetLocation | ( | const hoa_utils::ustring & | location_name, | |
| const std::string & | location_graphic_filename | |||
| ) |
Sets the name and graphic for the current location.
| location_name | The ustring that contains the name of the current map | |
| location_graphic_filename | The filename of the graphic image that represents this location |
Definition at line 576 of file global.cpp.
References _location_graphic, _location_name, hoa_video::GameVideo::DeleteImage(), hoa_global::GLOBAL_DEBUG, hoa_video::GameVideo::LoadImage(), hoa_video::StillImage::SetFilename(), and hoa_video::VideoManager.
Here is the call graph for this function:

| bool hoa_global::GameGlobal::SingletonInitialize | ( | ) | [virtual] |
A method for the inheriting class to implement, which initializes the class.
Implements hoa_utils::Singleton< T >.
Definition at line 119 of file global.cpp.
References _arm_armor_script, _attack_skills_script, _head_armor_script, _items_script, _leg_armor_script, _torso_armor_script, _weapons_script, hoa_script::ReadScriptDescriptor::OpenFile(), and hoa_script::ReadScriptDescriptor::OpenTable().
Referenced by InitializeEngine().
Here is the call graph for this function:

| void hoa_global::GameGlobal::SubtractDrunes | ( | uint32 | amount | ) | [inline] |
Definition at line 348 of file global.h.
References _drunes.
Referenced by hoa_shop::private_shop::ConfirmWindow::Update().
friend class GlobalArmor [friend] |
friend class GlobalItem [friend] |
friend class GlobalSkill [friend] |
friend class GlobalWeapon [friend] |
friend class hoa_utils::Singleton< GameGlobal > [friend] |
The active party of characters The active party contains the group of characters that will fight when a battle begins. This party can be up to four characters, and should always contain at least one character.
Definition at line 451 of file global.h.
Referenced by AddCharacter(), AverageActivePartyExperienceLevel(), ClearAllData(), GetActiveParty(), and RemoveCharacter().
Definition at line 482 of file global.h.
Referenced by hoa_global::GlobalArmor::GlobalArmor(), SingletonInitialize(), and ~GameGlobal().
Definition at line 486 of file global.h.
Referenced by hoa_global::GlobalSkill::GlobalSkill(), SingletonInitialize(), and ~GameGlobal().
std::vector<GlobalCharacter*> hoa_global::GameGlobal::_character_order [private] |
A vector whose purpose is to maintain the order of characters The first four characters in this vector are in the active party; the rest are in reserve.
Definition at line 445 of file global.h.
Referenced by AddCharacter(), ClearAllData(), GetCharacterOrder(), and RemoveCharacter().
std::map<uint32, GlobalCharacter*> hoa_global::GameGlobal::_characters [private] |
A map containing all characters that the player has discovered This map contains all characters that the player has met with, regardless of whether or not they are in the active party. The map key is the character's unique ID number.
Definition at line 440 of file global.h.
Referenced by AddCharacter(), ClearAllData(), GetCharacter(), IsCharacterInParty(), and RemoveCharacter().
uint32 hoa_global::GameGlobal::_drunes [private] |
The amount of financial resources (drunes) that the party currently has.
Definition at line 428 of file global.h.
Referenced by AddDrunes(), GetDrunes(), SetDrunes(), and SubtractDrunes().
std::map<std::string, GlobalEventGroup*> hoa_global::GameGlobal::_event_groups [private] |
The container which stores all of the groups of events that have occured in the game The name of the GlobalEventGroup serves as its key in this map data structure.
Definition at line 494 of file global.h.
Referenced by AddNewEventGroup(), ClearAllData(), DoesEventGroupExist(), GetEventGroup(), GetEventValue(), and GetNumberEventGroups().
Definition at line 480 of file global.h.
Referenced by hoa_global::GlobalArmor::GlobalArmor(), SingletonInitialize(), and ~GameGlobal().
std::map<uint32, GlobalObject*> hoa_global::GameGlobal::_inventory [private] |
Retains a list of all of the objects currently stored in the player's inventory This map is used to quickly check if an item is in the inventory or not. The key to the map is the object's identification number. When an object is added to the inventory, if it already exists then the object counter is simply increased instead of adding an entire new class object. When the object count becomes zero, the object is removed from the inventory. Duplicates of all objects are retained in the various inventory containers below.
Definition at line 459 of file global.h.
Referenced by _RemoveFromInventory(), _RetrieveFromInventory(), AddToInventory(), ClearAllData(), DecrementObjectCount(), GetInventory(), IncrementObjectCount(), IsObjectInInventory(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalArmor*> hoa_global::GameGlobal::_inventory_arm_armor [private] |
Definition at line 470 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryArmArmor(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalArmor*> hoa_global::GameGlobal::_inventory_head_armor [private] |
Definition at line 468 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryHeadArmor(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalItem*> hoa_global::GameGlobal::_inventory_items [private] |
Inventory containers These vectors contain the inventory of the entire party. The vectors are sorted according to the user's personal preferences. When a new object is added to the inventory, by default it will be placed at the end of the vector.
Definition at line 466 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryItems(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalKeyItem*> hoa_global::GameGlobal::_inventory_key_items [private] |
Definition at line 473 of file global.h.
Referenced by ClearAllData(), GetInventoryKeyItems(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalArmor*> hoa_global::GameGlobal::_inventory_leg_armor [private] |
Definition at line 471 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryLegArmor(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalShard*> hoa_global::GameGlobal::_inventory_shards [private] |
Definition at line 472 of file global.h.
Referenced by ClearAllData(), GetInventoryShards(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalArmor*> hoa_global::GameGlobal::_inventory_torso_armor [private] |
Definition at line 469 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryTorsoArmor(), RemoveFromInventory(), and RetrieveFromInventory().
std::vector<GlobalWeapon*> hoa_global::GameGlobal::_inventory_weapons [private] |
Definition at line 467 of file global.h.
Referenced by AddToInventory(), ClearAllData(), GetInventoryWeapons(), RemoveFromInventory(), and RetrieveFromInventory().
Script files that retain data for various global constructs.
Definition at line 478 of file global.h.
Referenced by hoa_global::GlobalItem::GlobalItem(), SingletonInitialize(), and ~GameGlobal().
Definition at line 483 of file global.h.
Referenced by hoa_global::GlobalArmor::GlobalArmor(), SingletonInitialize(), and ~GameGlobal().
The graphical image which represents the current location.
Definition at line 434 of file global.h.
Referenced by GetLocationGraphic(), and SetLocation().
The name of the map that the current party is on.
Definition at line 431 of file global.h.
Referenced by GetLocationName(), and SetLocation().
Definition at line 481 of file global.h.
Referenced by hoa_global::GlobalArmor::GlobalArmor(), SingletonInitialize(), and ~GameGlobal().
Definition at line 479 of file global.h.
Referenced by hoa_global::GlobalWeapon::GlobalWeapon(), SingletonInitialize(), and ~GameGlobal().
1.5.1