Crossfire Server, Trunk  1.75.0
AssetsManager Class Reference

Represents all assets of the game. More...

#include <AssetsManager.h>

+ Collaboration diagram for AssetsManager:

Public Member Functions

AllAnimationsanimations ()
 Get animations. More...
 
Archetypesarchetypes ()
 Get archetypes. More...
 
 AssetsManager ()
 Constructor. More...
 
size_t dumpUndefined ()
 Dump through LOG undefined assets (except faces), and return the total number of referenced but not defined assets (except faces). More...
 
Facesfaces ()
 Get faces. More...
 
Facesetsfacesets ()
 Get facesets. More...
 
Messagesmessages ()
 Get messages. More...
 
Questsquests ()
 Get quests. More...
 
Treasurestreasures ()
 Get treasures. More...
 
virtual ~AssetsManager ()
 Destructor. More...
 

Protected Member Functions

void archetypeUpdated (archetype *existing, archetype *update)
 Update artifacts if needed when an archetype changes. More...
 

Protected Attributes

AllAnimations m_animations
 Animations. More...
 
Archetypes m_archetypes
 Archetypes. More...
 
Faces m_faces
 Faces. More...
 
Facesets m_facesets
 Cilent image variants. More...
 
Archetypes::updateListener m_listener
 Listener to archetypes changes. More...
 
Messages m_messages
 Messages. More...
 
Quests m_quests
 Quests. More...
 
Treasures m_treasures
 Treasures. More...
 

Detailed Description

Represents all assets of the game.

It will listen to archetype changes to correctly update artifacts if needed.

Definition at line 28 of file AssetsManager.h.

Constructor & Destructor Documentation

◆ AssetsManager()

AssetsManager::AssetsManager ( )

Constructor.

Definition at line 18 of file AssetsManager.cpp.

References archetypeUpdated(), Animations::faces, AssetsCollection< T, Key >::get(), m_animations, m_archetypes, m_faces, m_listener, and Archetypes::setReplaceListener().

+ Here is the call graph for this function:

◆ ~AssetsManager()

AssetsManager::~AssetsManager ( )
virtual

Destructor.

Definition at line 28 of file AssetsManager.cpp.

References Archetypes::clearReplaceListener(), and m_archetypes.

+ Here is the call graph for this function:

Member Function Documentation

◆ animations()

AllAnimations* AssetsManager::animations ( )
inline

Get animations.

Returns
animations.

Definition at line 49 of file AssetsManager.h.

References m_animations.

Referenced by assets_collect(), assets_pack(), dump_animations(), find_animation(), malloc_info(), and try_find_animation().

+ Here is the caller graph for this function:

◆ archetypes()

◆ archetypeUpdated()

void AssetsManager::archetypeUpdated ( archetype existing,
archetype update 
)
protected

Update artifacts if needed when an archetype changes.

Parameters
existingarchetype being changed.
updatenew values of the archetype.

Definition at line 32 of file AssetsManager.cpp.

References artifacts, first_artifactlist, treasurelist::items, and Archetypes::recursive_update().

Referenced by AssetsManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dumpUndefined()

size_t AssetsManager::dumpUndefined ( )

Dump through LOG undefined assets (except faces), and return the total number of referenced but not defined assets (except faces).

Returns
count of undefined assets.

Definition at line 52 of file AssetsManager.cpp.

References dump(), m_animations, m_archetypes, m_facesets, m_quests, m_treasures, and AssetsCollection< T, Key >::undefined().

+ Here is the call graph for this function:

◆ faces()

Faces* AssetsManager::faces ( )
inline

Get faces.

Returns
faces.

Definition at line 39 of file AssetsManager.h.

References m_faces.

Referenced by assets_collect(), assets_pack(), dump_faces(), faces_for_each(), find_face(), get_face_by_id(), get_faces_count(), pack_images(), and try_find_face().

+ Here is the caller graph for this function:

◆ facesets()

Facesets* AssetsManager::facesets ( )
inline

Get facesets.

Returns
facesets;

Definition at line 65 of file AssetsManager.h.

References m_facesets.

Referenced by assets_collect(), assets_pack(), find_faceset(), pack_images(), and send_image_info().

+ Here is the caller graph for this function:

◆ messages()

Messages* AssetsManager::messages ( )
inline

Get messages.

Returns
messages.

Definition at line 59 of file AssetsManager.h.

References m_messages.

Referenced by assets_collect(), assets_pack(), get_message_from_identifier(), and msgfile_msg().

+ Here is the caller graph for this function:

◆ quests()

Quests* AssetsManager::quests ( )
inline

Get quests.

Returns
quests.

Definition at line 71 of file AssetsManager.h.

References m_quests.

Referenced by assets_collect(), assets_pack(), quest_for_each(), quest_get_by_code(), and quests_count().

+ Here is the caller graph for this function:

◆ treasures()

Treasures* AssetsManager::treasures ( )
inline

Get treasures.

Returns
treasures.

Definition at line 54 of file AssetsManager.h.

References m_treasures.

Referenced by assets_collect(), assets_end_load(), assets_number_of_treasurelists(), assets_pack(), and find_treasurelist().

+ Here is the caller graph for this function:

Field Documentation

◆ m_animations

AllAnimations AssetsManager::m_animations
protected

Animations.

Definition at line 84 of file AssetsManager.h.

Referenced by animations(), AssetsManager(), and dumpUndefined().

◆ m_archetypes

Archetypes AssetsManager::m_archetypes
protected

Archetypes.

Definition at line 82 of file AssetsManager.h.

Referenced by archetypes(), AssetsManager(), dumpUndefined(), and ~AssetsManager().

◆ m_faces

Faces AssetsManager::m_faces
protected

Faces.

Definition at line 81 of file AssetsManager.h.

Referenced by AssetsManager(), and faces().

◆ m_facesets

Facesets AssetsManager::m_facesets
protected

Cilent image variants.

Definition at line 87 of file AssetsManager.h.

Referenced by dumpUndefined(), and facesets().

◆ m_listener

Archetypes::updateListener AssetsManager::m_listener
protected

Listener to archetypes changes.

Definition at line 83 of file AssetsManager.h.

Referenced by AssetsManager().

◆ m_messages

Messages AssetsManager::m_messages
protected

Messages.

Definition at line 86 of file AssetsManager.h.

Referenced by messages().

◆ m_quests

Quests AssetsManager::m_quests
protected

Quests.

Definition at line 88 of file AssetsManager.h.

Referenced by dumpUndefined(), and quests().

◆ m_treasures

Treasures AssetsManager::m_treasures
protected

Treasures.

Definition at line 85 of file AssetsManager.h.

Referenced by dumpUndefined(), and treasures().


The documentation for this class was generated from the following files: