Crossfire Server, Trunk
FaceLoader Class Reference

#include <FaceLoader.h>

+ Inheritance diagram for FaceLoader:
+ Collaboration diagram for FaceLoader:

Public Member Functions

 FaceLoader (Faces *faces, AllAnimations *animations, AssetsTracker *tracker)
 
virtual void load (BufferReader *reader, const std::string &filename) override
 
virtual bool willLoad (const std::string &filename) override
 
- Public Member Functions inherited from AssetLoader
virtual ~AssetLoader ()
 

Private Member Functions

void loadAnimationBlock (BufferReader *reader, const std::string &full_path, const char *animation_name)
 

Private Attributes

AllAnimationsm_animations
 
Facesm_faces
 
AssetsTrackerm_tracker
 

Detailed Description

Definition at line 23 of file FaceLoader.h.

Constructor & Destructor Documentation

◆ FaceLoader()

FaceLoader::FaceLoader ( Faces faces,
AllAnimations animations,
AssetsTracker tracker 
)

Definition at line 22 of file FaceLoader.cpp.

Member Function Documentation

◆ load()

void FaceLoader::load ( BufferReader reader,
const std::string &  filename 
)
overridevirtual

Load assets from the specified reader.

Parameters
readerreader.
filenamefull filename.

Implements AssetLoader.

Definition at line 77 of file FaceLoader.cpp.

References add_string(), AssetsTracker::assetDefined(), buf, bufferreader_next_line(), AssetsCollection< T, Key >::define(), FACE_FLOOR, npc_dialog::filename, find_color(), free_string(), AssetsCollection< T, Key >::get(), llevError, loadAnimationBlock(), LOG(), m_faces, m_tracker, Face::magicmap, Face::name, Face::smoothface, autojail::value, and Face::visibility.

+ Here is the call graph for this function:

◆ loadAnimationBlock()

void FaceLoader::loadAnimationBlock ( BufferReader reader,
const std::string &  full_path,
const char *  animation_name 
)
private

Definition at line 27 of file FaceLoader.cpp.

References add_string(), animate::anim, AssetsTracker::assetDefined(), buf, bufferreader_next_line(), AssetsCollection< T, Key >::define(), dragon_attune::faces, find_face(), if(), llevDebug, LOG(), m_animations, m_tracker, and MAX_ANIMATIONS.

Referenced by load().

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

◆ willLoad()

virtual bool FaceLoader::willLoad ( const std::string &  filename)
inlineoverridevirtual

Whether this instance will process or not the specified file.

Parameters
filenamefull file path.
Returns
true if processFile() should be called, false else.

Implements AssetLoader.

Definition at line 27 of file FaceLoader.h.

References Utils::endsWith(), and npc_dialog::filename.

+ Here is the call graph for this function:

Field Documentation

◆ m_animations

AllAnimations* FaceLoader::m_animations
private

Definition at line 35 of file FaceLoader.h.

Referenced by loadAnimationBlock().

◆ m_faces

Faces* FaceLoader::m_faces
private

Definition at line 34 of file FaceLoader.h.

Referenced by load().

◆ m_tracker

AssetsTracker* FaceLoader::m_tracker
private

Definition at line 36 of file FaceLoader.h.

Referenced by load(), and loadAnimationBlock().


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