mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 13:43:41 +00:00
removed magic enum and documentation improvements
since getName is no longer used from the TileComponent.h we no longer need magic_enum for the enum to string conversion also some minor documentation changes
This commit is contained in:
parent
dadf846470
commit
b490e2dc17
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -20,6 +20,4 @@
|
||||
[submodule "docs/doxygen-awesome-css"]
|
||||
path = docs/doxygen-awesome-css
|
||||
url = https://github.com/jothepro/doxygen-awesome-css.git
|
||||
[submodule "extern/magic_enum"]
|
||||
path = extern/magic_enum
|
||||
url = https://github.com/Neargye/magic_enum.git
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ add_subdirectory(extern/SDL_image EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(extern/SDL_mixer EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(extern/SDL_ttf EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(extern/tmxlite/tmxlite EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(extern/magic_enum EXCLUDE_FROM_ALL)
|
||||
|
||||
|
||||
file(GLOB_RECURSE SOURCES ${ENGINE_SOURCE_DIR}/src/*.cpp)
|
||||
add_library(${PROJECT_NAME} ${SOURCES})
|
||||
@ -37,7 +37,6 @@ target_link_libraries(${PROJECT_NAME} PUBLIC # should be private when all SDL fu
|
||||
SDL2_image::SDL2_image-static
|
||||
SDL2_mixer::SDL2_mixer-static
|
||||
SDL2_ttf::SDL2_ttf-static
|
||||
magic_enum::magic_enum
|
||||
tmxlite
|
||||
)
|
||||
|
||||
|
||||
1
extern/magic_enum
vendored
1
extern/magic_enum
vendored
@ -1 +0,0 @@
|
||||
Subproject commit a72a0536c716fdef4f029fb43e1fd7e7b3d9ac9b
|
||||
@ -35,8 +35,8 @@ private:
|
||||
int textureXOffset;
|
||||
int textureYOffset;
|
||||
|
||||
//might be a better solution as this variable is only used for the loading of the tmx map
|
||||
//TODO: improve this in the future
|
||||
//there should be a better solution as this variable is only used for the loading of the tmx map
|
||||
//TODO: improve this in the future and also remove it from the scope of the developer
|
||||
const char* path; //empty string if texture has a texture enum value, otherwise the path of the texture
|
||||
|
||||
public:
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* and rendering in the engine. It provides functions to add, load, and draw textures
|
||||
* from files, as well as manage sprite sheets.
|
||||
*
|
||||
* \sa \ref Textures "Textures" are used to identify textures within the engine.
|
||||
* \sa Textures "Textures" are used to identify textures within the engine.
|
||||
* It is expected that they are implemented within the games scope.
|
||||
*/
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
#include <SDL.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
|
||||
#include "Component.h"
|
||||
#include "Textures.h"
|
||||
@ -31,14 +30,6 @@ public:
|
||||
return this->collision;
|
||||
}
|
||||
|
||||
std::string getName() {
|
||||
#ifdef TEXTURE_ENUM_DEFINED
|
||||
return std::string(magic_enum::enum_name(this->texture));
|
||||
#else
|
||||
return "Undefined Enum";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
bool collision;
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
#include <SDL_timer.h>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
|
||||
#include "AnimationHandler.h"
|
||||
#include "Direction.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user