diff --git a/.gitmodules b/.gitmodules index e4ba078..92059c0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,5 +2,5 @@ path = submodule/milsko url = https://gitea.nishi.boats/pyrite-dev/milsko [submodule "submodule/ode"] - path = submodule/ode + path = engine/submodule/ode url = https://github.com/thomasmarsh/ODE diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec17c0..b1edafa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,8 @@ include(GNUInstallDirs) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -include_directories(external/stb) - set(MW_INSTALL_HEADERS OFF) -add_subdirectory(external/lz4) -add_subdirectory(external/ode) add_subdirectory(submodule/milsko) # Since Milsko provides CMake, we just use it add_subdirectory(engine) diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 8c1d0bf..ea0b2a4 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -14,6 +14,10 @@ macro(install_target name) ) endmacro() +add_subdirectory(external/lz4) +add_subdirectory(external/ode) +include_directories(external/stb) + file(GLOB GearSrc_SRC src/*.c) add_library(GearSrc SHARED ${GearSrc_SRC}) diff --git a/external/lz4/CMakeLists.txt b/engine/external/lz4/CMakeLists.txt similarity index 100% rename from external/lz4/CMakeLists.txt rename to engine/external/lz4/CMakeLists.txt diff --git a/external/lz4/LICENSE b/engine/external/lz4/LICENSE similarity index 100% rename from external/lz4/LICENSE rename to engine/external/lz4/LICENSE diff --git a/external/lz4/lz4.c b/engine/external/lz4/lz4.c similarity index 100% rename from external/lz4/lz4.c rename to engine/external/lz4/lz4.c diff --git a/external/lz4/lz4.h b/engine/external/lz4/lz4.h similarity index 100% rename from external/lz4/lz4.h rename to engine/external/lz4/lz4.h diff --git a/external/lz4/lz4file.c b/engine/external/lz4/lz4file.c similarity index 100% rename from external/lz4/lz4file.c rename to engine/external/lz4/lz4file.c diff --git a/external/lz4/lz4file.h b/engine/external/lz4/lz4file.h similarity index 100% rename from external/lz4/lz4file.h rename to engine/external/lz4/lz4file.h diff --git a/external/lz4/lz4frame.c b/engine/external/lz4/lz4frame.c similarity index 100% rename from external/lz4/lz4frame.c rename to engine/external/lz4/lz4frame.c diff --git a/external/lz4/lz4frame.h b/engine/external/lz4/lz4frame.h similarity index 100% rename from external/lz4/lz4frame.h rename to engine/external/lz4/lz4frame.h diff --git a/external/lz4/lz4frame_static.h b/engine/external/lz4/lz4frame_static.h similarity index 100% rename from external/lz4/lz4frame_static.h rename to engine/external/lz4/lz4frame_static.h diff --git a/external/lz4/lz4hc.c b/engine/external/lz4/lz4hc.c similarity index 100% rename from external/lz4/lz4hc.c rename to engine/external/lz4/lz4hc.c diff --git a/external/lz4/lz4hc.h b/engine/external/lz4/lz4hc.h similarity index 100% rename from external/lz4/lz4hc.h rename to engine/external/lz4/lz4hc.h diff --git a/external/lz4/xxhash.c b/engine/external/lz4/xxhash.c similarity index 100% rename from external/lz4/xxhash.c rename to engine/external/lz4/xxhash.c diff --git a/external/lz4/xxhash.h b/engine/external/lz4/xxhash.h similarity index 100% rename from external/lz4/xxhash.h rename to engine/external/lz4/xxhash.h diff --git a/external/ode/CMakeLists.txt b/engine/external/ode/CMakeLists.txt similarity index 100% rename from external/ode/CMakeLists.txt rename to engine/external/ode/CMakeLists.txt diff --git a/external/ode/config.h.in b/engine/external/ode/config.h.in similarity index 100% rename from external/ode/config.h.in rename to engine/external/ode/config.h.in diff --git a/external/stb/stb_ds.h b/engine/external/stb/stb_ds.h similarity index 100% rename from external/stb/stb_ds.h rename to engine/external/stb/stb_ds.h diff --git a/external/stb/stb_image.h b/engine/external/stb/stb_image.h similarity index 100% rename from external/stb/stb_image.h rename to engine/external/stb/stb_image.h diff --git a/external/stb/stb_image_write.h b/engine/external/stb/stb_image_write.h similarity index 100% rename from external/stb/stb_image_write.h rename to engine/external/stb/stb_image_write.h diff --git a/engine/src/client.c b/engine/src/client.c index 35ea400..e35031e 100644 --- a/engine/src/client.c +++ b/engine/src/client.c @@ -14,7 +14,7 @@ GSClient GSClientCreate(GSEngine engine) { client->engine = engine; client->camera[0] = 0; - client->camera[1] = 2; + client->camera[1] = 0; client->camera[2] = 5; client->look_at[0] = 0; @@ -43,33 +43,7 @@ void GSClientDestroy(GSClient client) { GSLog(GSLogInfo, "Destroyed client"); } -GSModel m = NULL; - static void scene(GSClient client) { - static double r = 0; - GSVector3 pos = {0, 0, 0}; - GSVector3 rot = {0, 0, 0}; - int i; - int a = 1; - - if(m == NULL) m = GSModelOpen(client->engine, "game:/mdl/crate.gsm"); - - rot[1] = r; - for(i = -a; i <= a; i++) { - int j; - - pos[0] = i * 1.5; - for(j = -a; j <= a; j++) { - pos[2] = j * 1.5; - - GSGLPushMatrix(client->gl); - GSGLSetPosition(client->gl, pos); - GSGLSetRotation(client->gl, rot); - GSModelDraw(m); - GSGLPopMatrix(client->gl); - } - } - r++; } void GSClientStep(GSClient client) { diff --git a/submodule/ode b/engine/submodule/ode similarity index 100% rename from submodule/ode rename to engine/submodule/ode