cuttown
This commit is contained in:
parent
18a06af6f7
commit
296a493159
|
@ -76,10 +76,17 @@ set(TESTAPP_SRC_FILES
|
||||||
TestApp/ModelWindow.cpp
|
TestApp/ModelWindow.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CUTTOWN_SRC_FILES
|
||||||
|
CuttownTest/Main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
add_library(snowlib STATIC ${SNOWLIB_SRC_FILES})
|
add_library(snowlib STATIC ${SNOWLIB_SRC_FILES})
|
||||||
|
|
||||||
add_executable(testApp ${TESTAPP_SRC_FILES})
|
add_executable(testApp ${TESTAPP_SRC_FILES})
|
||||||
target_link_libraries(testApp snowlib ${Boost_LIBRARIES} ${GLEW_LIBRARIES} SDL2::SDL2 SDL2::SDL2main opengl32.lib)
|
target_link_libraries(testApp snowlib ${Boost_LIBRARIES} ${GLEW_LIBRARIES} SDL2::SDL2 SDL2::SDL2main opengl32.lib)
|
||||||
|
|
||||||
|
add_executable(cuttownTest ${CUTTOWN_SRC_FILES})
|
||||||
|
target_link_libraries(cuttownTest snowlib ${Boost_LIBRARIES} ${GLEW_LIBRARIES} SDL2::SDL2 SDL2::SDL2main opengl32.lib)
|
||||||
|
|
||||||
#include(BoostTestHelpers.cmake)
|
#include(BoostTestHelpers.cmake)
|
||||||
|
|
||||||
|
|
33
CuttownTest/Main.cpp
Normal file
33
CuttownTest/Main.cpp
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#pragma once
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "LmpRepository.h"
|
||||||
|
#include "GobFile.h"
|
||||||
|
#include "VifDecoder.h"
|
||||||
|
#include "TexDecoder.h"
|
||||||
|
#include "AnimDecoder.h"
|
||||||
|
#include "Model.h"
|
||||||
|
#include "Texture.h"
|
||||||
|
#include "AnimData.h"
|
||||||
|
#include "WorldReader.h"
|
||||||
|
#include "World.h"
|
||||||
|
|
||||||
|
LmpRepository* lmpRepository;
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
string dataPath = "D:\\emu\\bgda\\BG\\DATA\\";
|
||||||
|
if (argc == 2){
|
||||||
|
dataPath = argv[1];
|
||||||
|
}
|
||||||
|
lmpRepository = new LmpRepositoryImpl(dataPath, GameType::DARK_ALLIANCE);
|
||||||
|
|
||||||
|
GobFile cuttownGob = GobFile(dataPath + "CUTTOWN.GOB", GameType::DARK_ALLIANCE);
|
||||||
|
World* world = WorldReader().readWorld(&cuttownGob, "cuttown");
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,8 @@ void WorldReader::decodeWorldFile(World* world, const unsigned char* data, int d
|
||||||
int offset60 = DataUtil::getLEInt(data, 0x60);
|
int offset60 = DataUtil::getLEInt(data, 0x60);
|
||||||
int textureArrayOffset = DataUtil::getLEInt(data, 0x64);
|
int textureArrayOffset = DataUtil::getLEInt(data, 0x64);
|
||||||
int offset68 = DataUtil::getLEInt(data, 0x68);
|
int offset68 = DataUtil::getLEInt(data, 0x68);
|
||||||
int offsetTex6C = DataUtil::getLEInt(data, 0x6C);
|
int worldTexOffsetsOffset = DataUtil::getLEInt(data, 0x6C);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldReader::decodeTopography(World* world, const unsigned char* data, int dataLength)
|
void WorldReader::decodeTopography(World* world, const unsigned char* data, int dataLength)
|
||||||
|
|
Reference in a new issue