World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
AssetsManager.h
См. документацию.
1 #pragma once
2 
3 #include <map>
4 
5 #include "Engine/Strings.h"
6 
7 class Image;
8 class Texture;
9 
11  public:
13 
14  bool ReleaseAllImages();
15 
16  bool ReleaseImage(const String &name);
17 
18  Texture *GetImage_ColorKey(const String &name, uint16_t colorkey);
21 
25 
26  Texture *GetBitmap(const String &name);
27  Texture *GetSprite(const String &name, unsigned int palette_id,
28  unsigned int lod_sprite_id);
29 
30  protected:
31  std::map<String, Texture *> bitmaps;
32  std::map<String, Texture *> sprites;
33  std::map<String, Texture *> images;
34 };
35 
36 extern AssetsManager *assets;
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
AssetsManager::GetImage_PCXFromNewLOD
Texture * GetImage_PCXFromNewLOD(const String &name)
Definition: AssetsManager.cpp:96
AssetsManager
Definition: AssetsManager.h:10
AssetsManager::GetImage_Solid
Texture * GetImage_Solid(const String &name)
Definition: AssetsManager.cpp:51
AssetsManager::images
std::map< String, Texture * > images
Definition: AssetsManager.h:33
AssetsManager::sprites
std::map< String, Texture * > sprites
Definition: AssetsManager.h:32
Texture
Definition: Texture.h:4
AssetsManager::ReleaseAllImages
bool ReleaseAllImages()
Definition: AssetsManager.cpp:14
AssetsManager::GetImage_PCXFromIconsLOD
Texture * GetImage_PCXFromIconsLOD(const String &name)
Definition: AssetsManager.cpp:81
AssetsManager::GetImage_PCXFromFile
Texture * GetImage_PCXFromFile(const String &name)
Definition: AssetsManager.cpp:111
Image
Definition: Image.h:19
AssetsManager::bitmaps
std::map< String, Texture * > bitmaps
Definition: AssetsManager.h:31
AssetsManager::GetSprite
Texture * GetSprite(const String &name, unsigned int palette_id, unsigned int lod_sprite_id)
Definition: AssetsManager.cpp:141
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
AssetsManager::GetBitmap
Texture * GetBitmap(const String &name)
Definition: AssetsManager.cpp:126
AssetsManager::AssetsManager
AssetsManager()
Definition: AssetsManager.h:12
AssetsManager::ReleaseImage
bool ReleaseImage(const String &name)
Definition: AssetsManager.cpp:16
name
EGLImageKHR EGLint * name
Definition: SDL_egl.h:1497
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
String
std::string String
Definition: Strings.h:10
Strings.h