Crossfire Server, Trunk  R22047
AssetsManager Class Reference

#include <AssetsManager.h>

+ Collaboration diagram for AssetsManager:

Public Member Functions

AllAnimationsanimations ()
 
Archetypesarchetypes ()
 
 AssetsManager ()
 
size_t dumpUndefined ()
 
Facesfaces ()
 
Facesetsfacesets ()
 
Messagesmessages ()
 
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
 
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 27 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, 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 48 of file AssetsManager.h.

References m_animations.

Referenced by animations_for_each(), assets_collect(), assets_number_of_animations(), assets_pack(), CREResourcesWindow::fillAnimations(), find_animation(), CREMainWindow::onReportDuplicate(), 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 40 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 64 of file AssetsManager.cpp.

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

Referenced by assets_dump_undefined(), and facesets().

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

◆ faces()

◆ facesets()

Facesets* AssetsManager::facesets ( )
inline

Get facesets.

Returns
facesets;

Definition at line 64 of file AssetsManager.h.

References dumpUndefined(), and m_facesets.

Referenced by assets_pack(), facesets_for_each(), find_faceset(), CREPixmap::init(), FacesetLoader::load(), PngLoader::load(), and pack_images().

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

◆ messages()

Messages* AssetsManager::messages ( )
inline

Get messages.

Returns
messages.

Definition at line 58 of file AssetsManager.h.

References m_messages.

Referenced by assets_collect(), assets_pack(), CREResourcesWindow::fillGeneralMessages(), get_message_from_identifier(), get_random_message(), and CREFacePanel::setItem().

+ Here is the caller graph for this function:

◆ treasures()

Treasures* AssetsManager::treasures ( )
inline

Get treasures.

Returns
treasures.

Definition at line 53 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 CRETreasurePanel::setItem().

+ Here is the caller graph for this function:

Field Documentation

◆ m_animations

AllAnimations AssetsManager::m_animations
protected

Animations.

Definition at line 77 of file AssetsManager.h.

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

◆ m_archetypes

Archetypes AssetsManager::m_archetypes
protected

Archetypes.

Definition at line 75 of file AssetsManager.h.

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

◆ m_faces

Faces AssetsManager::m_faces
protected

Faces.

Definition at line 74 of file AssetsManager.h.

Referenced by AssetsManager(), faces(), and ~AssetsManager().

◆ m_facesets

Facesets AssetsManager::m_facesets
protected

Cilent image variants.

Definition at line 80 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 76 of file AssetsManager.h.

Referenced by AssetsManager().

◆ m_messages

Messages AssetsManager::m_messages
protected

Messages.

Definition at line 79 of file AssetsManager.h.

Referenced by messages(), and ~AssetsManager().

◆ m_treasures

Treasures AssetsManager::m_treasures
protected

Treasures.

Definition at line 78 of file AssetsManager.h.

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


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