diff --git a/CMakeLists.txt b/CMakeLists.txt index 6415d39d24..fddedcabc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,12 +153,8 @@ function(add_lego_libraries NAME) target_link_libraries(roi${ARG_SUFFIX} PRIVATE viewmanager${ARG_SUFFIX} Vec::Vec) add_library(geom${ARG_SUFFIX} STATIC - LEGO1/lego/sources/geom/legobox.cpp LEGO1/lego/sources/geom/legoedge.cpp - LEGO1/lego/sources/geom/legomesh.cpp - LEGO1/lego/sources/geom/legosphere.cpp LEGO1/lego/sources/geom/legounkown100db7f4.cpp - LEGO1/lego/sources/geom/legovertex.cpp LEGO1/lego/sources/geom/legoweedge.cpp LEGO1/lego/sources/geom/legowegedge.cpp ) @@ -167,6 +163,18 @@ function(add_lego_libraries NAME) target_include_directories(geom${ARG_SUFFIX} PRIVATE "${PROJECT_SOURCE_DIR}/LEGO1/omni/include" "${PROJECT_SOURCE_DIR}/LEGO1" "${PROJECT_SOURCE_DIR}/LEGO1/lego/sources" "${PROJECT_SOURCE_DIR}/util") target_link_libraries(geom${ARG_SUFFIX} PRIVATE) + add_library(shape${ARG_SUFFIX} STATIC + LEGO1/lego/sources/shape/legocolor.cpp + LEGO1/lego/sources/shape/legobox.cpp + LEGO1/lego/sources/shape/legomesh.cpp + LEGO1/lego/sources/shape/legosphere.cpp + LEGO1/lego/sources/shape/legovertex.cpp + ) + list(APPEND list_targets shape${ARG_SUFFIX}) + set_property(TARGET shape${ARG_SUFFIX} PROPERTY ARCHIVE_OUTPUT_NAME "shape$<$:d>${ARG_SUFFIX}") + target_include_directories(shape${ARG_SUFFIX} PRIVATE "${PROJECT_SOURCE_DIR}/LEGO1/omni/include" "${PROJECT_SOURCE_DIR}/LEGO1" "${PROJECT_SOURCE_DIR}/LEGO1/lego/sources" "${PROJECT_SOURCE_DIR}/util") + target_link_libraries(shape${ARG_SUFFIX} PRIVATE) + add_library(anim${ARG_SUFFIX} STATIC LEGO1/lego/sources/anim/legoanim.cpp ) @@ -175,7 +183,6 @@ function(add_lego_libraries NAME) target_include_directories(anim${ARG_SUFFIX} PRIVATE "${PROJECT_SOURCE_DIR}/LEGO1/omni/include" "${PROJECT_SOURCE_DIR}/LEGO1" "${PROJECT_SOURCE_DIR}/LEGO1/lego/sources" "${PROJECT_SOURCE_DIR}/util") add_library(misc${ARG_SUFFIX} STATIC - LEGO1/lego/sources/misc/legocolor.cpp LEGO1/lego/sources/misc/legocontainer.cpp LEGO1/lego/sources/misc/legoimage.cpp LEGO1/lego/sources/misc/legostorage.cpp @@ -422,7 +429,22 @@ function(add_lego_libraries NAME) target_include_directories(${NAME} PUBLIC "${PROJECT_SOURCE_DIR}/LEGO1/lego/legoomni/include/actions") # Link libraries - target_link_libraries(${NAME} PRIVATE tglrl${ARG_SUFFIX} viewmanager${ARG_SUFFIX} realtime${ARG_SUFFIX} mxdirectx${ARG_SUFFIX} roi${ARG_SUFFIX} geom${ARG_SUFFIX} anim${ARG_SUFFIX} Vec::Vec dinput dxguid misc${ARG_SUFFIX} 3dmanager${ARG_SUFFIX} omni${ARG_SUFFIX}) + target_link_libraries(${NAME} PRIVATE + tglrl${ARG_SUFFIX} + viewmanager${ARG_SUFFIX} + realtime${ARG_SUFFIX} + mxdirectx${ARG_SUFFIX} + roi${ARG_SUFFIX} + geom${ARG_SUFFIX} + anim${ARG_SUFFIX} + Vec::Vec + dinput + dxguid + misc${ARG_SUFFIX} + 3dmanager${ARG_SUFFIX} + omni${ARG_SUFFIX} + shape${ARG_SUFFIX} + ) foreach(tgt IN LISTS list_targets) target_link_libraries(${tgt} PRIVATE ${ARG_LINK_LIBRARIES}) diff --git a/LEGO1/lego/sources/roi/legolod.cpp b/LEGO1/lego/sources/roi/legolod.cpp index 45f0f8640f..7db2a0a99e 100644 --- a/LEGO1/lego/sources/roi/legolod.cpp +++ b/LEGO1/lego/sources/roi/legolod.cpp @@ -1,10 +1,10 @@ #include "legolod.h" -#include "geom/legomesh.h" #include "legoroi.h" #include "misc/legocontainer.h" #include "misc/legostorage.h" +#include "shape/legomesh.h" #include "tgl/d3drm/impl.h" DECOMP_SIZE_ASSERT(LODObject, 0x04) diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index f9a8549bd8..50a2611371 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -1,12 +1,12 @@ #include "legoroi.h" #include "anim/legoanim.h" -#include "geom/legobox.h" -#include "geom/legosphere.h" #include "legolod.h" #include "misc/legocontainer.h" #include "misc/legostorage.h" #include "realtime/realtime.h" +#include "shape/legobox.h" +#include "shape/legosphere.h" #include #include diff --git a/LEGO1/lego/sources/geom/legobox.cpp b/LEGO1/lego/sources/shape/legobox.cpp similarity index 92% rename from LEGO1/lego/sources/geom/legobox.cpp rename to LEGO1/lego/sources/shape/legobox.cpp index 0a5f2bdb3e..0f7654d64f 100644 --- a/LEGO1/lego/sources/geom/legobox.cpp +++ b/LEGO1/lego/sources/shape/legobox.cpp @@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(LegoBox, 0x18) // FUNCTION: LEGO1 0x100d3740 +// FUNCTION: BETA10 0x1018f83c LegoResult LegoBox::Read(LegoStorage* p_storage) { LegoResult result; diff --git a/LEGO1/lego/sources/geom/legobox.h b/LEGO1/lego/sources/shape/legobox.h similarity index 100% rename from LEGO1/lego/sources/geom/legobox.h rename to LEGO1/lego/sources/shape/legobox.h diff --git a/LEGO1/lego/sources/misc/legocolor.cpp b/LEGO1/lego/sources/shape/legocolor.cpp similarity index 94% rename from LEGO1/lego/sources/misc/legocolor.cpp rename to LEGO1/lego/sources/shape/legocolor.cpp index 1dc1dce46c..146e8818e0 100644 --- a/LEGO1/lego/sources/misc/legocolor.cpp +++ b/LEGO1/lego/sources/shape/legocolor.cpp @@ -1,7 +1,7 @@ #include "legocolor.h" #include "decomp.h" -#include "legostorage.h" +#include "misc/legostorage.h" DECOMP_SIZE_ASSERT(LegoColor, 0x03) diff --git a/LEGO1/lego/sources/misc/legocolor.h b/LEGO1/lego/sources/shape/legocolor.h similarity index 95% rename from LEGO1/lego/sources/misc/legocolor.h rename to LEGO1/lego/sources/shape/legocolor.h index 027362cee9..ac0f2ec075 100644 --- a/LEGO1/lego/sources/misc/legocolor.h +++ b/LEGO1/lego/sources/shape/legocolor.h @@ -1,7 +1,7 @@ #ifndef __LEGOCOLOR_H #define __LEGOCOLOR_H -#include "legotypes.h" +#include "misc/legotypes.h" class LegoStorage; diff --git a/LEGO1/lego/sources/geom/legomesh.cpp b/LEGO1/lego/sources/shape/legomesh.cpp similarity index 100% rename from LEGO1/lego/sources/geom/legomesh.cpp rename to LEGO1/lego/sources/shape/legomesh.cpp diff --git a/LEGO1/lego/sources/geom/legomesh.h b/LEGO1/lego/sources/shape/legomesh.h similarity index 98% rename from LEGO1/lego/sources/geom/legomesh.h rename to LEGO1/lego/sources/shape/legomesh.h index 1832ae7b81..da1b1a2764 100644 --- a/LEGO1/lego/sources/geom/legomesh.h +++ b/LEGO1/lego/sources/shape/legomesh.h @@ -2,7 +2,7 @@ #define __LEGOMESH_H #include "decomp.h" -#include "misc/legocolor.h" +#include "legocolor.h" #include "misc/legotypes.h" class LegoStorage; diff --git a/LEGO1/lego/sources/geom/legosphere.cpp b/LEGO1/lego/sources/shape/legosphere.cpp similarity index 100% rename from LEGO1/lego/sources/geom/legosphere.cpp rename to LEGO1/lego/sources/shape/legosphere.cpp diff --git a/LEGO1/lego/sources/geom/legosphere.h b/LEGO1/lego/sources/shape/legosphere.h similarity index 100% rename from LEGO1/lego/sources/geom/legosphere.h rename to LEGO1/lego/sources/shape/legosphere.h diff --git a/LEGO1/lego/sources/geom/legovertex.cpp b/LEGO1/lego/sources/shape/legovertex.cpp similarity index 100% rename from LEGO1/lego/sources/geom/legovertex.cpp rename to LEGO1/lego/sources/shape/legovertex.cpp diff --git a/LEGO1/lego/sources/geom/legovertex.h b/LEGO1/lego/sources/shape/legovertex.h similarity index 100% rename from LEGO1/lego/sources/geom/legovertex.h rename to LEGO1/lego/sources/shape/legovertex.h