Skip to content

Commit d052842

Browse files
committed
feat: add installation of game directory and improve CPack configuration; refactor Vector rotation constant to be const
1 parent d7bf0b0 commit d052842

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ install(FILES ${CMAKE_BINARY_DIR}/config.h DESTINATION include/Flakkari)
198198
install(FILES ${HEADER_LIB_LOGGER} DESTINATION include/Flakkari/Logger)
199199
install(FILES ${HEADER_LIB_NETWORK} DESTINATION include/Flakkari/Network)
200200
install(FILES ${HEADER_LIB_PROTOCOL} DESTINATION include/Flakkari/Protocol)
201+
install(DIRECTORY ${FLAKKARI_GAME_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX})
201202

202203
# Packaging:
203204
set(CPACK_PACKAGE_NAME "flakkari")
@@ -226,16 +227,11 @@ if (WIN32)
226227
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/docs/Images/icon.ico")
227228
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "bin")
228229
set(CPACK_PACKAGE_FILE_NAME "flakkari-win64")
230+
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Flakkari.lnk' '$INSTDIR\\\\bin\\\\flakkari.exe'")
229231
elseif (APPLE)
230232
set(CPACK_GENERATOR "DragNDrop")
231233
set(CPACK_DMG_FORMAT "UDBZ")
232-
set(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/.DS_Store")
233-
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/background.png")
234-
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_SOURCE_DIR}/DS_Store.sh")
235-
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_PERMISSIONS "0775")
236-
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_EXECUTABLE ON)
237-
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_NAME "DS_Store.sh")
238-
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_DESTINATION ".background")
234+
set(CPACK_DMG_DS_STORE "")
239235
set(CPACK_PACKAGE_FILE_NAME "flakkari-macos")
240236
else()
241237
set(CPACK_GENERATOR "DEB;RPM")

Flakkari/Engine/Math/Vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ template <typename Type> struct Vector {
326326
*/
327327
void rotate(const Vector<Type> &axis, float angleDegrees)
328328
{
329-
double _pi = 3.14159265358979323846;
329+
const double _pi = 3.14159265358979323846;
330330
double angleRadians = (angleDegrees * _pi / 180) / 2.0;
331331
double sinHalfAngle = sin(angleRadians);
332332
auto normalizedAxis = axis.normalized();

Flakkari/Server/Game/Game.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void Game::loadSystems(Engine::ECS::Registry &registry, const std::string &scene
4848
registry.add_system(
4949
[this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::apply_movable(r, _deltaTime); });
5050

51-
if (sysName == "spawn_enemy")
51+
else if (sysName == "spawn_enemy")
5252
registry.add_system([this, sceneName](Engine::ECS::Registry &r) {
5353
std::string templateName;
5454
Engine::ECS::Entity entity;

0 commit comments

Comments
 (0)