Compare commits
3
Commits
b927c3a639
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9722e8930e | ||
|
|
458c462bb8 | ||
|
|
56ada226f4 |
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
# Specify filepatterns you want git to ignore.
|
# Specify filepatterns you want git to ignore.
|
||||||
.idea
|
.idea
|
||||||
|
.DS_Store
|
||||||
+6
-6
@@ -104,20 +104,20 @@ file(GLOB_RECURSE ASSET_FILES "assets/*")
|
|||||||
set(ASSET_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/assets")
|
set(ASSET_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/assets")
|
||||||
set(ALL_COPIED_ASSETS "")
|
set(ALL_COPIED_ASSETS "")
|
||||||
|
|
||||||
# 2. Create a specific copy command for every file
|
|
||||||
foreach(ASSET_PATH ${ASSET_FILES})
|
foreach(ASSET_PATH ${ASSET_FILES})
|
||||||
# Get the relative path so we can recreate the folder structure
|
# Get the relative path so we can recreate the folder structure
|
||||||
file(RELATIVE_PATH REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets" ${ASSET_PATH})
|
file(RELATIVE_PATH REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets" "${ASSET_PATH}")
|
||||||
set(DEST_PATH "${ASSET_OUTPUT_DIR}/${REL_PATH}")
|
set(DEST_PATH "${ASSET_OUTPUT_DIR}/${REL_PATH}")
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${DEST_PATH}
|
OUTPUT "${DEST_PATH}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${ASSET_PATH} ${DEST_PATH}
|
COMMAND ${CMAKE_COMMAND} -E copy "${ASSET_PATH}" "${DEST_PATH}"
|
||||||
DEPENDS ${ASSET_PATH}
|
DEPENDS "${ASSET_PATH}"
|
||||||
COMMENT "Syncing ${REL_PATH}"
|
COMMENT "Syncing ${REL_PATH}"
|
||||||
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND ALL_COPIED_ASSETS ${DEST_PATH})
|
list(APPEND ALL_COPIED_ASSETS "${DEST_PATH}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# 3. Create a "dummy" target that the game depends on
|
# 3. Create a "dummy" target that the game depends on
|
||||||
|
|||||||
+3
-1
@@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
#include <print>
|
#include <print>
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
#include <external/fix_win32_compatibility.h>
|
#include <external/fix_win32_compatibility.h>
|
||||||
|
#endif
|
||||||
#include <freetype/freetype.h>
|
#include <freetype/freetype.h>
|
||||||
#include <hb.h>
|
#include <hb.h>
|
||||||
#include <enet/enet.h>
|
#include <enet/enet.h>
|
||||||
@@ -42,7 +44,7 @@ int main() {
|
|||||||
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
|
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
|
||||||
InitWindow(screenwidth, screenheight, "raylib");
|
InitWindow(screenwidth, screenheight, "raylib");
|
||||||
|
|
||||||
MyFont vollkorn("assets/fonts/Vollkorn/static/Vollkorn-Regular.ttf", 60);
|
MyFont vollkorn("assets/fonts/Vollkorn/static/Vollkorn-Regular.ttf", 24);
|
||||||
MyFont arabic("assets/fonts/Amiri/Amiri-Regular.ttf", 28);
|
MyFont arabic("assets/fonts/Amiri/Amiri-Regular.ttf", 28);
|
||||||
shader = LoadShader(nullptr, "assets/text.frag");
|
shader = LoadShader(nullptr, "assets/text.frag");
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user