123456789101112131415161718192021222324252627282930313233 |
- /*
- * 2D Game Engine
- * AssetStore.h:
- * Based on pikuma.com 2D game engine in C++ and Lua course
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 12/02/2021.
- */
- #ifndef GAMEENGINE_ASSETSTORE_H
- #define GAMEENGINE_ASSETSTORE_H
- #include <SDL.h>
- #include <string>
- #include <map>
- class AssetStore
- {
- private:
- std::map<std::string, SDL_Texture *> textures;
- // Fonts
- // Sounds
- public:
- AssetStore() = default;
- ~AssetStore() = default;
- void clearStore();
- void addTexture(SDL_Renderer *renderer, const std::string &assetId, const std::string &filePath);
- SDL_Texture *getTexture(const std::string &assetId);
- };
- #endif /* GAMEENGINE_ASSETSTORE_H */
|