From 7835de639d3f70145ed744b56be501e2620b5f1a Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 8 Jul 2015 20:40:55 -1000 Subject: [PATCH] removed qt files; updated for atdna --- DataSpec/CMakeLists.txt | 11 +++++++++++ DataSpec/DNACommon/CMakeLists.txt | 3 +++ DataSpec/DNACommon/DNACommon.pri | 2 -- DataSpec/DNAMP1/CMakeLists.txt | 8 ++++++-- DataSpec/DNAMP1/DNAMP1.pri | 6 ------ DataSpec/DNAMP1/MLVL.hpp | 22 +++++++++++----------- DataSpec/DNAMP2/DNAMP2.pri | 2 -- DataSpec/DNAMP3/CMakeLists.txt | 7 +++++-- DataSpec/DNAMP3/DNAMP3.pri | 5 ----- DataSpec/DataSpec.pro | 26 -------------------------- NODLib | 2 +- RetroCommon.pro | 6 ------ 12 files changed, 37 insertions(+), 63 deletions(-) delete mode 100644 DataSpec/DNACommon/DNACommon.pri delete mode 100644 DataSpec/DNAMP1/DNAMP1.pri delete mode 100644 DataSpec/DNAMP2/DNAMP2.pri delete mode 100644 DataSpec/DNAMP3/DNAMP3.pri delete mode 100644 DataSpec/DataSpec.pro delete mode 100644 RetroCommon.pro diff --git a/DataSpec/CMakeLists.txt b/DataSpec/CMakeLists.txt index 9394449b6..4f4850b16 100644 --- a/DataSpec/CMakeLists.txt +++ b/DataSpec/CMakeLists.txt @@ -1,6 +1,17 @@ include_directories(${HECL_INCLUDE_DIR} ${NOD_LIB_INCLUDE_DIR}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +# Magic ingredient +find_package(atdna REQUIRED) + +# Assembles a source/header pair list for use in a DNA library +macro(make_dnalist outlist inlist) +foreach(type ${inlist}) + atdna(${type}.cpp ${type}.hpp) + list(APPEND ${outlist} ${type}.cpp ${type}.hpp) +endforeach() +endmacro() + add_subdirectory(DNACommon) add_subdirectory(DNAMP1) add_subdirectory(DNAMP2) diff --git a/DataSpec/DNACommon/CMakeLists.txt b/DataSpec/DNACommon/CMakeLists.txt index e69de29bb..e9ac42213 100644 --- a/DataSpec/DNACommon/CMakeLists.txt +++ b/DataSpec/DNACommon/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(DNACommon + DNACommon.hpp + DNACommon.cpp) diff --git a/DataSpec/DNACommon/DNACommon.pri b/DataSpec/DNACommon/DNACommon.pri deleted file mode 100644 index eff19b8b3..000000000 --- a/DataSpec/DNACommon/DNACommon.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += \ - $$PWD/DNACommon.hpp diff --git a/DataSpec/DNAMP1/CMakeLists.txt b/DataSpec/DNAMP1/CMakeLists.txt index 9302569b1..cae2b6d79 100644 --- a/DataSpec/DNAMP1/CMakeLists.txt +++ b/DataSpec/DNAMP1/CMakeLists.txt @@ -1,2 +1,6 @@ -add_library(DNAMP1 - PAK.cpp) +list(APPEND types + PAK + MLVL) + +make_dnalist(liblist ${types}) +add_library(DNAMP1 ${liblist}) diff --git a/DataSpec/DNAMP1/DNAMP1.pri b/DataSpec/DNAMP1/DNAMP1.pri deleted file mode 100644 index 7134590f9..000000000 --- a/DataSpec/DNAMP1/DNAMP1.pri +++ /dev/null @@ -1,6 +0,0 @@ -HEADERS += \ - $$PWD/MLVL.hpp \ - $$PWD/PAK.hpp - -SOURCES += \ - $$PWD/PAK.cpp diff --git a/DataSpec/DNAMP1/MLVL.hpp b/DataSpec/DNAMP1/MLVL.hpp index 62ea60812..99a646e7b 100644 --- a/DataSpec/DNAMP1/MLVL.hpp +++ b/DataSpec/DNAMP1/MLVL.hpp @@ -8,11 +8,11 @@ namespace DNAMP1 struct MLVL : BigDNA { DECL_DNA - DNAFourCC magic; + HECL::FourCC magic; Value version; - DNAUniqueID32 worldNameId; - DNAUniqueID32 saveWorldId; - DNAUniqueID32 worldSkyboxId; + UniqueID32 worldNameId; + UniqueID32 saveWorldId; + UniqueID32 worldSkyboxId; Value memRelayLinkCount; struct MemRelayLink : BigDNA @@ -30,10 +30,10 @@ struct MLVL : BigDNA struct Area : BigDNA { DECL_DNA - DNAUniqueID32 areaNameId; + UniqueID32 areaNameId; Value transformMtx[3]; Value aabb[2]; - DNAUniqueID32 areaMREAId; + UniqueID32 areaMREAId; Value areaId; Value attachedAreaCount; @@ -44,8 +44,8 @@ struct MLVL : BigDNA struct Dependency : BigDNA { DECL_DNA - DNAUniqueID32 id; - DNAFourCC type; + UniqueID32 id; + HECL::FourCC type; }; Vector deps; @@ -63,7 +63,7 @@ struct MLVL : BigDNA Value areaIdx; Value dockIdx; }; - DNAFourCC type; + HECL::FourCC type; Vector endpoints; Value planeVertCount; @@ -72,7 +72,7 @@ struct MLVL : BigDNA Vector docks; }; - DNAUniqueID32 worldMap; + UniqueID32 worldMap; Value unknown2; Value unknown3; @@ -81,7 +81,7 @@ struct MLVL : BigDNA { DECL_DNA Value unknown; - DNAUniqueID32 agscId; + UniqueID32 agscId; }; Vector audioGroups; String<-1> unkString; diff --git a/DataSpec/DNAMP2/DNAMP2.pri b/DataSpec/DNAMP2/DNAMP2.pri deleted file mode 100644 index d6331bfd0..000000000 --- a/DataSpec/DNAMP2/DNAMP2.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += \ - $$PWD/PAK.hpp diff --git a/DataSpec/DNAMP3/CMakeLists.txt b/DataSpec/DNAMP3/CMakeLists.txt index 95cf91618..a7b4586f2 100644 --- a/DataSpec/DNAMP3/CMakeLists.txt +++ b/DataSpec/DNAMP3/CMakeLists.txt @@ -1,2 +1,5 @@ -add_library(DNAMP3 - PAK.cpp) +list(APPEND types + PAK) + +make_dnalist(liblist ${types}) +add_library(DNAMP3 ${liblist}) diff --git a/DataSpec/DNAMP3/DNAMP3.pri b/DataSpec/DNAMP3/DNAMP3.pri deleted file mode 100644 index cbec773fe..000000000 --- a/DataSpec/DNAMP3/DNAMP3.pri +++ /dev/null @@ -1,5 +0,0 @@ -HEADERS += \ - $$PWD/PAK.hpp - -SOURCES += \ - $$PWD/PAK.cpp diff --git a/DataSpec/DataSpec.pro b/DataSpec/DataSpec.pro deleted file mode 100644 index d3186f5f0..000000000 --- a/DataSpec/DataSpec.pro +++ /dev/null @@ -1,26 +0,0 @@ -TEMPLATE = lib -CONFIG += staticlib c++11 -TARGET = RetroDataSpec -CONFIG -= Qt -QT = - -# Get hecl's headers (when built as submodule in hecl's extern) -INCLUDEPATH += ../../../include \ - ../../Athena/include \ - ../../LogVisor/include \ - ../NODLib/include - -include(DNACommon/DNACommon.pri) -include(DNAMP1/DNAMP1.pri) -include(DNAMP2/DNAMP2.pri) -include(DNAMP3/DNAMP3.pri) - -HEADERS += \ - Logging.hpp \ - SpecBase.hpp - -SOURCES += \ - SpecMP1.cpp \ - SpecMP2.cpp \ - SpecMP3.cpp \ - SpecBase.cpp diff --git a/NODLib b/NODLib index fea6b496a..6b5cf5b1b 160000 --- a/NODLib +++ b/NODLib @@ -1 +1 @@ -Subproject commit fea6b496a6d64c1b75b6b48af00e4e8c2bd8cdfe +Subproject commit 6b5cf5b1b56fdd3bff070de2b47f8cfc115f05f5 diff --git a/RetroCommon.pro b/RetroCommon.pro deleted file mode 100644 index 3ddb9761a..000000000 --- a/RetroCommon.pro +++ /dev/null @@ -1,6 +0,0 @@ -TEMPLATE = subdirs -CONFIG -= Qt -QT = - -SUBDIRS += DataSpec NODLib/lib -