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)
 
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
 

Detailed Description

Definition at line 22 of file FaceLoader.h.

Constructor & Destructor Documentation

◆ FaceLoader()

FaceLoader::FaceLoader ( Faces faces,
AllAnimations animations 
)

Definition at line 23 of file FaceLoader.cpp.

Member Function Documentation

◆ load()

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

Load assets from the specified reader. Must be implemented.

Parameters
readerreader.
filenamefull filename.

Implements AssetLoader.

Definition at line 75 of file FaceLoader.cpp.

References add_string(), buf, bufferreader_next_line(), AssetsCollection< T, Key >::define(), FACE_FLOOR, npc_dialog::filename, find_color(), free_string(), AssetsCollection< T, Key >::get(), llevDebug, llevError, loadAnimationBlock(), LOG(), m_faces, 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 28 of file FaceLoader.cpp.

References add_string(), animate::anim, buf, bufferreader_next_line(), AssetsCollection< T, Key >::define(), dragon_attune::faces, find_face(), if(), llevDebug, LOG(), m_animations, 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 26 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 34 of file FaceLoader.h.

Referenced by loadAnimationBlock().

◆ m_faces

Faces* FaceLoader::m_faces
private

Definition at line 33 of file FaceLoader.h.

Referenced by load().


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