Crossfire Server, Trunk
PngLoader.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2020-2021 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef PNGLOADER_H
14 #define PNGLOADER_H
15 
16 #include "AssetLoader.h"
17 #include "Utils.h"
18 
19 class Faces;
20 class Facesets;
21 
22 class PngLoader : public AssetLoader {
23 public:
24  PngLoader(Faces *faces, Facesets *facesets);
25 
26  virtual bool willLoad(const std::string &filename) override {
27  return Utils::endsWith(filename.c_str(), ".png");
28  }
29 
30  virtual void load(BufferReader *reader, const std::string &filename) override;
31 protected:
34 };
35 
36 #endif /* PNGLOADER_H */
37 
PngLoader::m_facesets
Facesets * m_facesets
Definition: PngLoader.h:33
PngLoader::m_faces
Faces * m_faces
Definition: PngLoader.h:32
Facesets
Definition: Facesets.h:23
AssetLoader
Definition: AssetLoader.h:24
npc_dialog.filename
filename
Definition: npc_dialog.py:99
Utils.h
PngLoader::willLoad
virtual bool willLoad(const std::string &filename) override
Definition: PngLoader.h:26
Faces
Definition: Faces.h:19
PngLoader::load
virtual void load(BufferReader *reader, const std::string &filename) override
Definition: PngLoader.cpp:25
PngLoader::PngLoader
PngLoader(Faces *faces, Facesets *facesets)
Definition: PngLoader.cpp:22
dragon_attune.faces
dictionary faces
Definition: dragon_attune.py:31
PngLoader
Definition: PngLoader.h:22
BufferReader
Definition: bufferreader.cpp:21
Utils::endsWith
static bool endsWith(const char *const str, const char *const with)
Definition: Utils.cpp:16
AssetLoader.h