summaryrefslogtreecommitdiff
path: root/ZAPD/ZSkeleton.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2021-01-23 14:23:51 -0500
committerGitHub <noreply@github.com>2021-01-23 14:23:51 -0500
commitee42172389c0aebfbc0c2d5bbabab4ec858bc8cd (patch)
tree3c6afd903bb9983602f6f79a1333106fe2306745 /ZAPD/ZSkeleton.cpp
parent2e1174063f3ed6bcf929bc7093cd2d1b05f8518b (diff)
WIP F3DEX Support, Bug Fixes, Game definable in XML (#75)
* WIP F3DEX support * Additional work on F3DEX support, fixed bug with actorlist * Fixed crash bug * Adds ZFile attribute "Game" to be able to change the game mode for ZAPD. * Additional changes to support F3DEX * Fixed bug with cullDL and with dlist type selection * F3DEX Opcode fix * Fixed up a few bugs * Cleaned up some code and fixed bug with directory creation. * ZAPD now supports correct bitpacking for gsSPSetOtherMode on F3DEX * Fixes syntax error in ZDisplayList.h * Updates Actor and Object Lists * Updated actor and object list * G_MTX updated for F3DEX * Fixed bug with transition actor list * Updated G_Texture for F3DEX * SW97 maps: Removes actor 0x22, and shifts actors 0x23 and above down by one to match retail enum. * Fixes issue in reuse of actorCount variable in SetActorList::GetActorListArraySize. Co-authored-by: Kenix3
Diffstat (limited to 'ZAPD/ZSkeleton.cpp')
-rw-r--r--ZAPD/ZSkeleton.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ZAPD/ZSkeleton.cpp b/ZAPD/ZSkeleton.cpp
index f09198f..485c5a7 100644
--- a/ZAPD/ZSkeleton.cpp
+++ b/ZAPD/ZSkeleton.cpp
@@ -1,6 +1,7 @@
#include "ZSkeleton.h"
#include "BitConverter.h"
#include "StringHelper.h"
+#include "Globals.h"
#include "HighLevel/HLModelIntermediette.h"
#include <typeinfo>
@@ -170,7 +171,7 @@ std::string ZSkeleton::GetSourceOutputCode(const std::string& prefix)
if (limb->dListPtr != 0 && parent->GetDeclaration(limb->dListPtr) == nullptr)
{
- ZDisplayList* dList = new ZDisplayList(rawData, limb->dListPtr, ZDisplayList::GetDListLength(rawData, limb->dListPtr));
+ ZDisplayList* dList = new ZDisplayList(rawData, limb->dListPtr, ZDisplayList::GetDListLength(rawData, limb->dListPtr, Globals::Instance->game == ZGame::OOT_SW97 ? DListType::F3DEX : DListType::F3DZEX));
dList->parent = parent;
dList->SetName(StringHelper::Sprintf("%sLimbDL_%06X", defaultPrefix.c_str(), limb->dListPtr));
dList->GetSourceOutputCode(defaultPrefix);
@@ -187,7 +188,7 @@ std::string ZSkeleton::GetSourceOutputCode(const std::string& prefix)
if (limbLOD->farDListPtr != 0 && parent->GetDeclaration(limbLOD->farDListPtr) == nullptr)
{
- ZDisplayList* dList = new ZDisplayList(rawData, limbLOD->farDListPtr, ZDisplayList::GetDListLength(rawData, limbLOD->farDListPtr));
+ ZDisplayList* dList = new ZDisplayList(rawData, limbLOD->farDListPtr, ZDisplayList::GetDListLength(rawData, limbLOD->farDListPtr, Globals::Instance->game == ZGame::OOT_SW97 ? DListType::F3DEX : DListType::F3DZEX));
dList->parent = parent;
dList->SetName(StringHelper::Sprintf("%s_farLimbDlist_%06X", defaultPrefix.c_str(), limbLOD->farDListPtr));
dList->GetSourceOutputCode(defaultPrefix);