Crossfire Server, Trunk
AssetsManager Class Reference

#include <AssetsManager.h>

+ Collaboration diagram for AssetsManager:

Public Member Functions

AllAnimationsanimations ()
 
Archetypesarchetypes ()
 
 AssetsManager ()
 
size_t dumpUndefined ()
 
Facesfaces ()
 
Facesetsfacesets ()
 
Messagesmessages ()
 
Questsquests ()
 
Treasurestreasures ()
 
virtual ~AssetsManager ()
 

Protected Member Functions

void archetypeUpdated (archetype *existing, archetype *update)
 

Protected Attributes

AllAnimations m_animations
 
Archetypes m_archetypes
 
Faces m_faces
 
Facesets m_facesets
 
Archetypes::updateListener m_listener
 
Messages m_messages
 
Quests m_quests
 
Treasures m_treasures
 

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 20 of file AssetsManager.cpp.

References archetypeUpdated(), animations_struct::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 30 of file AssetsManager.cpp.

References AssetsCollection< T, Key >::clear(), Archetypes::clearReplaceListener(), m_animations, m_archetypes, m_faces, m_facesets, m_messages, m_quests, and m_treasures.

+ 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 animations_for_each(), assets_collect(), assets_number_of_animations(), assets_pack(), CREResourcesWindow::fillAnimations(), find_animation(), CREFacePanel::setItem(), 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 41 of file AssetsManager.cpp.

References first_artifactlist, artifactliststruct::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 65 of file AssetsManager.cpp.

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

Referenced by assets_dump_undefined().

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

◆ faces()

◆ facesets()

Facesets* AssetsManager::facesets ( )
inline

◆ 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(), CREResourcesWindow::fillGeneralMessages(), get_message_from_identifier(), and get_random_message().

+ Here is the caller graph for this function:

◆ quests()

◆ treasures()

Treasures* AssetsManager::treasures ( )
inline

Get treasures.

Returns
treasures.

Definition at line 54 of file AssetsManager.h.

References m_treasures.

Referenced by ResourcesManager::archetypeUse(), assets_collect(), assets_end_load(), assets_number_of_treasurelists(), assets_pack(), CREResourcesWindow::fillTreasures(), find_treasurelist(), and treasureContains().

+ 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(), dumpUndefined(), and ~AssetsManager().

◆ 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(), faces(), and ~AssetsManager().

◆ m_facesets

Facesets AssetsManager::m_facesets
protected

Cilent image variants.

Definition at line 87 of file AssetsManager.h.

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

◆ 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(), and ~AssetsManager().

◆ m_quests

Quests AssetsManager::m_quests
protected

Quests.

Definition at line 88 of file AssetsManager.h.

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

◆ m_treasures

Treasures AssetsManager::m_treasures
protected

Treasures.

Definition at line 85 of file AssetsManager.h.

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


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