fixes
This commit is contained in:
parent
593cc0730b
commit
4f14a8b5e9
15
README.md
15
README.md
|
@ -3,13 +3,20 @@ Building
|
|||
|
||||
For windows, I use vcpkg to install packages. See https://github.com/Microsoft/vcpkg
|
||||
|
||||
```
|
||||
> git clone https://github.com/Microsoft/vcpkg.git
|
||||
> cd vcpkg
|
||||
|
||||
PS> .\bootstrap-vcpkg.bat
|
||||
Linux:~/$ ./bootstrap-vcpkg.sh
|
||||
|
||||
.\vcpkg integrate install
|
||||
```
|
||||
|
||||
you will want to install the following packages as follows:
|
||||
|
||||
```
|
||||
vcpkg install sdl2:x64-windows
|
||||
vcpkg install glm:x64-windows
|
||||
vcpkg install glew:x64-windows
|
||||
vcpkg install boost:x64-windows
|
||||
vcpkg install sdl2:x64-windows glm:x64-windows glew:x64-windows boost:x64-windows
|
||||
```
|
||||
|
||||
Then you can open the directory in visual studio and it will be recognised as a cmake project.
|
||||
|
|
|
@ -24,7 +24,7 @@ TexturedMesh* readTexturedMesh(string dataPath, const char* lmpName, const char*
|
|||
TexturedMesh* texturedMesh = new TexturedMesh();
|
||||
VifDecoder vifDecoder;
|
||||
TexDecoder texDecoder;
|
||||
texturedMesh->meshList = vifDecoder.decode(vifEntry->data, vifEntry->length);
|
||||
texturedMesh->meshList = vifDecoder.decode(vifEntry->data,0);
|
||||
texturedMesh->texture = texDecoder.decode(texEntry->data, 0);
|
||||
|
||||
for (auto& mesh : *texturedMesh->meshList){
|
||||
|
@ -60,18 +60,16 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
lmpRepository = new LmpRepositoryImpl(dataPath, GameType::DARK_ALLIANCE);
|
||||
|
||||
GobFile cuttownGob = GobFile(dataPath + "CUTTOWN.GOB", GameType::DARK_ALLIANCE);
|
||||
World* world = WorldReader().readWorld(&cuttownGob, "cuttown");
|
||||
// GobFile cuttownGob = GobFile(dataPath + "CUTTOWN.GOB", GameType::DARK_ALLIANCE);
|
||||
// World* world = WorldReader().readWorld(&cuttownGob, "cuttown");
|
||||
|
||||
const char* lmpName = "DWARF.LMP";
|
||||
vector<string> meshNames;
|
||||
meshNames.push_back("dwarf");
|
||||
meshNames.push_back("hair");
|
||||
// meshNames.push_back("hair");
|
||||
|
||||
// Model* model = readModel(dataPath, "CHEST.LMP", "chest_large", "chest_large_open");
|
||||
Model* model = readModel(dataPath, lmpName, meshNames, "l_idlea");
|
||||
|
||||
|
||||
vector<string> animNames = lmpRepository->getLmp(lmpName)->findFilenamesByExtension(".anm");
|
||||
|
||||
ModelWindow modelWindow;
|
||||
|
|
|
@ -170,7 +170,7 @@ void ModelWindow::drawMesh(Model* model, int frame)
|
|||
glm::mat4 Projection = glm::perspective(45.0f, (float)screen_width / screen_height, 0.1f, 1000.0f);
|
||||
// Camera matrix
|
||||
glm::mat4 View = glm::lookAt(
|
||||
glm::vec3(0,-100,50), // Camera is at (0,-100,50), in World Space
|
||||
glm::vec3(0,100,50), // Camera is at (0,100,50), in World Space
|
||||
glm::vec3(0,0,30), // and looks at
|
||||
glm::vec3(0,0,1) // Head is up
|
||||
);
|
||||
|
|
|
@ -6,6 +6,10 @@ void AnimData::BuildPerFrameFKPoses()
|
|||
perFrameFKPoses = new AnimPose[NumFrames * NumBones];
|
||||
glm::vec3* parentPoints = new glm::vec3[64];
|
||||
glm::quat* parentRotations = new glm::quat[64];
|
||||
for (int idx = 0; idx < 64; ++idx) {
|
||||
parentPoints[idx] = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
parentRotations[idx] = glm::quat(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
for (int frame = 0; frame < NumFrames; ++frame) {
|
||||
for (int jointNum = 0; jointNum < NumBones; ++jointNum) {
|
||||
|
||||
|
|
Reference in a new issue