123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * 2D Game Engine
- * LevelLoader.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 28/02/2021.
- */
- #ifndef IMGUI_SOURCE_INCLUDE_LEVELLOADER_H
- #define IMGUI_SOURCE_INCLUDE_LEVELLOADER_H
- #include <memory>
- #include <SDL.h>
- #include <ECS.h>
- #include <AssetStore.h>
- struct LevelLoader
- {
- private:
- void loadAssetTable(sol::table &assetsTable,
- const std::unique_ptr<AssetStore> &assetStore,
- SDL_Renderer *renderer);
- void loadTileMap(sol::table &tileMap,
- const std::unique_ptr<Registry> ®istry);
- void loadEntities(sol::table &entitiesTable,
- const std::unique_ptr<Registry> ®istry);
- public:
- LevelLoader();
- ~LevelLoader();
- void LoadLevel(sol::state &lua,
- const std::unique_ptr<Registry> ®istry,
- const std::unique_ptr<AssetStore> &assetStore,
- SDL_Renderer *renderer,
- int levelNumber);
- };
- #endif /* IMGUI_SOURCE_INCLUDE_LEVELLOADER_H */
|