0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 15:53:42 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Freezarite
1faa02f775
Merge b490e2dc1747b5a0ab8c8f3ff33437bc1e32fd12 into a8052b4bbbbaa72b5832bdd4e689bdeb14c41edf 2024-12-01 20:26:16 +01:00
freezarite
b490e2dc17 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
2024-12-01 20:25:31 +01:00
7 changed files with 5 additions and 19 deletions

4
.gitmodules vendored
View File

@ -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

View File

@ -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 +0,0 @@
Subproject commit a72a0536c716fdef4f029fb43e1fd7e7b3d9ac9b

View File

@ -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:

View File

@ -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.
*/

View File

@ -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;

View File

@ -3,7 +3,6 @@
#include <SDL_timer.h>
#include <cstring>
#include <memory>
#include <magic_enum/magic_enum.hpp>
#include "AnimationHandler.h"
#include "Direction.h"