summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-25 13:33:18 +0300
committerHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-25 13:33:18 +0300
commit3febad74e46d3485f079108b2d30bcde1f6ce58b (patch)
tree2c12173ca6fbf31956ab74c16ffbfc098248da7e
parent192d71918917ad12063ca6682372dfbc34d06d2c (diff)
downloadgamejam-slgj-2024-3febad74e46d3485f079108b2d30bcde1f6ce58b.tar.gz
gamejam-slgj-2024-3febad74e46d3485f079108b2d30bcde1f6ce58b.tar.bz2
gamejam-slgj-2024-3febad74e46d3485f079108b2d30bcde1f6ce58b.zip
simplifying test
-rw-r--r--CMakeLists.txt15
-rw-r--r--sources/main.c6
2 files changed, 8 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2933807..58f137f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,9 +32,9 @@ target_link_libraries(${PROJECT_NAME} PRIVATE raylib)
# Checks if OSX and links appropriate frameworks (Only required on MacOS)
if (APPLE)
- target_link_libraries(${PROJECT_NAME} PRIVATE "-framework IOKit")
- target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
- target_link_libraries(${PROJECT_NAME} PRIVATE "-framework OpenGL")
+ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework IOKit")
+ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
+ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework OpenGL")
endif()
# Web Configurations
@@ -44,15 +44,10 @@ if (${PLATFORM} STREQUAL "Web")
endif()
if (EMSCRIPTEN)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY -s GL_ENABLE_GET_PROC_ADDRESS=1")
- set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it.
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s GL_ENABLE_GET_PROC_ADDRESS=1")
+ set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it.
endif ()
# Setting ASSETS_PATH
target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="./assets/")
target_compile_definitions(${PROJECT_NAME} PUBLIC SCRIPTS_PATH="./scripts/")
-
-# add_custom_command(
-# TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
-# COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>/${CMAKE_PROJECT_NAME} ${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}
-# )
diff --git a/sources/main.c b/sources/main.c
index ee07e0b..4d5497c 100644
--- a/sources/main.c
+++ b/sources/main.c
@@ -20,8 +20,8 @@ EM_BOOL main_loop_web(double time, void* userData) {
s7_call(s7, s7_update_fn, s7_list(s7, 0));
BeginDrawing();
- ClearBackground(RAYWHITE);
- s7_call(s7, s7_draw_fn, s7_list(s7, 0));
+ ClearBackground(BLUE);
+ //s7_call(s7, s7_draw_fn, s7_list(s7, 0));
EndDrawing();
return EM_TRUE;
}
@@ -40,7 +40,7 @@ void main_loop(){
int main(int argc, char* argv[]) {
s7 = s7_init();
- // rl_text_define_methods(s7);
+ rl_text_define_methods(s7);
const int screen_width = 800;
const int screen_height = 600;