mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 09:20:17 +00:00
git subrepo pull --force tools/ZAPD (#727)
subrepo: subdir: "tools/ZAPD" merged: "4751db5c9" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "4751db5c9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
This commit is contained in:
parent
77ec4d4916
commit
493bdbc3c6
115 changed files with 16370 additions and 2789 deletions
|
@ -27,10 +27,12 @@ ZCutscene::ZCutscene(std::vector<uint8_t> nRawData, int rawDataIndex, int rawDat
|
|||
|
||||
int numEntries = 1;
|
||||
|
||||
/*if (cmdID != CutsceneCommands::SetCameraPos && cmdID != CutsceneCommands::SetCameraFocus && cmdID != CutsceneCommands::SetCameraFocusLink && cmdID != CutsceneCommands::SetCameraPosLink)
|
||||
/*if (cmdID != CutsceneCommands::SetCameraPos && cmdID != CutsceneCommands::SetCameraFocus
|
||||
&& cmdID != CutsceneCommands::SetCameraFocusLink && cmdID !=
|
||||
CutsceneCommands::SetCameraPosLink)
|
||||
{
|
||||
numEntries = BitConverter::ToInt32BE(rawData, currentPtr);
|
||||
currentPtr += 4;
|
||||
numEntries = BitConverter::ToInt32BE(rawData, currentPtr);
|
||||
currentPtr += 4;
|
||||
}*/
|
||||
|
||||
for (int j = 0; j < numEntries; j++)
|
||||
|
@ -39,15 +41,39 @@ ZCutscene::ZCutscene(std::vector<uint8_t> nRawData, int rawDataIndex, int rawDat
|
|||
|
||||
switch (cmdID)
|
||||
{
|
||||
case CutsceneCommands::SetCameraPos: cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetCameraFocus: cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SpecialAction: cmd = new CutsceneCommandSpecialAction(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetLighting: cmd = new CutsceneCommandEnvLighting(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetCameraPosLink: cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetCameraFocusLink: cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Textbox: cmd = new CutsceneCommandTextbox(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Cmd09: cmd = new CutsceneCommandUnknown9(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Unknown: cmd = new CutsceneCommandUnknown(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Cmd00:
|
||||
break;
|
||||
case CutsceneCommands::SetCameraPos:
|
||||
cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetCameraFocus:
|
||||
cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SpecialAction:
|
||||
cmd = new CutsceneCommandSpecialAction(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetLighting:
|
||||
cmd = new CutsceneCommandEnvLighting(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetCameraPosLink:
|
||||
cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetCameraFocusLink:
|
||||
cmd = new CutsceneCommandSetCameraPos(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Cmd07:
|
||||
break;
|
||||
case CutsceneCommands::Cmd08:
|
||||
break;
|
||||
case CutsceneCommands::Cmd09:
|
||||
cmd = new CutsceneCommandUnknown9(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Textbox:
|
||||
cmd = new CutsceneCommandTextbox(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Unknown:
|
||||
cmd = new CutsceneCommandUnknown(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetActorAction0:
|
||||
case CutsceneCommands::SetActorAction1:
|
||||
case CutsceneCommands::SetActorAction2:
|
||||
|
@ -58,15 +84,37 @@ ZCutscene::ZCutscene(std::vector<uint8_t> nRawData, int rawDataIndex, int rawDat
|
|||
case CutsceneCommands::SetActorAction7:
|
||||
case CutsceneCommands::SetActorAction8:
|
||||
case CutsceneCommands::SetActorAction9:
|
||||
case CutsceneCommands::SetActorAction10: cmd = new CutsceneCommandActorAction(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetSceneTransFX: cmd = new CutsceneCommandSceneTransFX(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Nop: cmd = new CutsceneCommandNop(rawData, currentPtr); break;
|
||||
case CutsceneCommands::PlayBGM: cmd = new CutsceneCommandPlayBGM(rawData, currentPtr); break;
|
||||
case CutsceneCommands::StopBGM: cmd = new CutsceneCommandStopBGM(rawData, currentPtr); break;
|
||||
case CutsceneCommands::FadeBGM: cmd = new CutsceneCommandFadeBGM(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetTime: cmd = new CutsceneCommandDayTime(rawData, currentPtr); break;
|
||||
case CutsceneCommands::Terminator: cmd = new CutsceneCommandTerminator(rawData, currentPtr); break;
|
||||
case CutsceneCommands::End: cmd = new CutsceneCommandEnd(rawData, currentPtr); break;
|
||||
case CutsceneCommands::SetActorAction10:
|
||||
cmd = new CutsceneCommandActorAction(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetSceneTransFX:
|
||||
cmd = new CutsceneCommandSceneTransFX(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Nop:
|
||||
cmd = new CutsceneCommandNop(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::PlayBGM:
|
||||
cmd = new CutsceneCommandPlayBGM(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::StopBGM:
|
||||
cmd = new CutsceneCommandStopBGM(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::FadeBGM:
|
||||
cmd = new CutsceneCommandFadeBGM(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::SetTime:
|
||||
cmd = new CutsceneCommandDayTime(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Terminator:
|
||||
cmd = new CutsceneCommandTerminator(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::End:
|
||||
cmd = new CutsceneCommandEnd(rawData, currentPtr);
|
||||
break;
|
||||
case CutsceneCommands::Error:
|
||||
fprintf(stderr, "Cutscene command error %d %s %d\n", (int)cmdID, __FILE__,
|
||||
__LINE__);
|
||||
break;
|
||||
}
|
||||
|
||||
cmd->commandIndex = i;
|
||||
|
@ -87,18 +135,18 @@ ZCutscene::~ZCutscene()
|
|||
string ZCutscene::GetSourceOutputCode(const std::string& prefix)
|
||||
{
|
||||
string output = "";
|
||||
int size = 0;
|
||||
size_t size = 0;
|
||||
int32_t curPtr = 0;
|
||||
|
||||
//output += StringHelper::Sprintf("// SIZE = 0x%04X\n", GetRawDataSize());
|
||||
// output += StringHelper::Sprintf("// SIZE = 0x%04X\n", GetRawDataSize());
|
||||
output += StringHelper::Sprintf("\tCS_BEGIN_CUTSCENE(%i, %i),\n", commands.size(), endFrame);
|
||||
|
||||
for (int i = 0; i < commands.size(); i++)
|
||||
for (size_t i = 0; i < commands.size(); i++)
|
||||
{
|
||||
CutsceneCommand* cmd = commands[i];
|
||||
output += "\t" + cmd->GenerateSourceCode(prefix, curPtr);
|
||||
curPtr += (uint32_t)cmd->GetCommandSize();
|
||||
size += (int)cmd->GetCommandSize();
|
||||
size += cmd->GetCommandSize();
|
||||
}
|
||||
|
||||
output += StringHelper::Sprintf("\tCS_END(),\n", commands.size(), endFrame);
|
||||
|
@ -113,7 +161,7 @@ int ZCutscene::GetRawDataSize()
|
|||
// Beginning
|
||||
size += 8;
|
||||
|
||||
for (int i = 0; i < commands.size(); i++)
|
||||
for (size_t i = 0; i < commands.size(); i++)
|
||||
{
|
||||
CutsceneCommand* cmd = commands[i];
|
||||
size += (int)cmd->GetCommandSize();
|
||||
|
@ -126,7 +174,9 @@ int ZCutscene::GetRawDataSize()
|
|||
return size;
|
||||
}
|
||||
|
||||
ZCutscene* ZCutscene::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, const int rawDataIndex, const std::string& nRelPath)
|
||||
ZCutscene* ZCutscene::ExtractFromXML(tinyxml2::XMLElement* reader,
|
||||
const std::vector<uint8_t>& nRawData, const int rawDataIndex,
|
||||
const std::string& nRelPath)
|
||||
{
|
||||
ZCutscene* cs = new ZCutscene(nRawData, rawDataIndex, 9999);
|
||||
cs->rawData = nRawData;
|
||||
|
@ -145,35 +195,165 @@ CutsceneCommands ZCutscene::GetCommandFromID(int id)
|
|||
{
|
||||
switch (id)
|
||||
{
|
||||
case 0x0003: return CutsceneCommands::SpecialAction;
|
||||
case 0x0004: return CutsceneCommands::SetLighting;
|
||||
case 0x0056: return CutsceneCommands::PlayBGM;
|
||||
case 0x0057: return CutsceneCommands::StopBGM;
|
||||
case 0x007C: return CutsceneCommands::FadeBGM;
|
||||
case 0x0009: return CutsceneCommands::Cmd09;
|
||||
case 0x0013: return CutsceneCommands::Textbox;
|
||||
case 0x008C: return CutsceneCommands::SetTime;
|
||||
case 0x0001: return CutsceneCommands::SetCameraPos;
|
||||
case 0x0002: return CutsceneCommands::SetCameraFocus;
|
||||
case 0x0005: return CutsceneCommands::SetCameraPosLink;
|
||||
case 0x0006: return CutsceneCommands::SetCameraFocusLink;
|
||||
case 0x0007: return CutsceneCommands::Cmd07;
|
||||
case 0x0008: return CutsceneCommands::Cmd08;
|
||||
case 0x03E8: return CutsceneCommands::Terminator;
|
||||
case 0xFFFF: return CutsceneCommands::End;
|
||||
case 0x002D: return CutsceneCommands::SetSceneTransFX;
|
||||
case 10: return CutsceneCommands::SetActorAction0;
|
||||
case 15: case 17: case 18: case 23: case 34: case 39: case 46: case 76: case 85: case 93: case 105: case 107: case 110: case 119: case 123: case 138: case 139: case 144: return CutsceneCommands::SetActorAction1;
|
||||
case 14: case 16: case 24: case 35: case 40: case 48: case 64: case 68: case 70: case 78: case 80: case 94: case 116: case 118: case 120: case 125: case 131: case 141: return CutsceneCommands::SetActorAction2;
|
||||
case 25: case 36: case 41: case 50: case 67: case 69: case 72: case 81: case 106: case 117: case 121: case 126: case 132: return CutsceneCommands::SetActorAction3;
|
||||
case 29: case 37: case 42: case 51: case 53: case 63: case 65: case 66: case 75: case 82: case 108: case 127: case 133: return CutsceneCommands::SetActorAction4;
|
||||
case 30: case 38: case 43: case 47: case 54: case 79: case 83: case 128: case 135: return CutsceneCommands::SetActorAction5;
|
||||
case 44: case 55: case 77: case 84: case 90: case 129: case 136: return CutsceneCommands::SetActorAction6;
|
||||
case 31: case 52: case 57: case 58: case 88: case 115: case 130: case 137: return CutsceneCommands::SetActorAction7;
|
||||
case 49: case 60: case 89: case 111: case 114: case 134: case 142: return CutsceneCommands::SetActorAction8;
|
||||
case 62: return CutsceneCommands::SetActorAction9;
|
||||
case 143: return CutsceneCommands::SetActorAction10;
|
||||
case 0x0B: case 0x0D: case 0x1A: case 0x1B: case 0x1C: case 0x20: case 0x21: case 0x3B: case 0x3D: case 0x47: case 0x49: case 0x6D: case 0x15: case 0x16: case 0x70: case 0x71: case 0x4A: return CutsceneCommands::Unknown;
|
||||
case 0x0003:
|
||||
return CutsceneCommands::SpecialAction;
|
||||
case 0x0004:
|
||||
return CutsceneCommands::SetLighting;
|
||||
case 0x0056:
|
||||
return CutsceneCommands::PlayBGM;
|
||||
case 0x0057:
|
||||
return CutsceneCommands::StopBGM;
|
||||
case 0x007C:
|
||||
return CutsceneCommands::FadeBGM;
|
||||
case 0x0009:
|
||||
return CutsceneCommands::Cmd09;
|
||||
case 0x0013:
|
||||
return CutsceneCommands::Textbox;
|
||||
case 0x008C:
|
||||
return CutsceneCommands::SetTime;
|
||||
case 0x0001:
|
||||
return CutsceneCommands::SetCameraPos;
|
||||
case 0x0002:
|
||||
return CutsceneCommands::SetCameraFocus;
|
||||
case 0x0005:
|
||||
return CutsceneCommands::SetCameraPosLink;
|
||||
case 0x0006:
|
||||
return CutsceneCommands::SetCameraFocusLink;
|
||||
case 0x0007:
|
||||
return CutsceneCommands::Cmd07;
|
||||
case 0x0008:
|
||||
return CutsceneCommands::Cmd08;
|
||||
case 0x03E8:
|
||||
return CutsceneCommands::Terminator;
|
||||
case 0xFFFF:
|
||||
return CutsceneCommands::End;
|
||||
case 0x002D:
|
||||
return CutsceneCommands::SetSceneTransFX;
|
||||
case 10:
|
||||
return CutsceneCommands::SetActorAction0;
|
||||
case 15:
|
||||
case 17:
|
||||
case 18:
|
||||
case 23:
|
||||
case 34:
|
||||
case 39:
|
||||
case 46:
|
||||
case 76:
|
||||
case 85:
|
||||
case 93:
|
||||
case 105:
|
||||
case 107:
|
||||
case 110:
|
||||
case 119:
|
||||
case 123:
|
||||
case 138:
|
||||
case 139:
|
||||
case 144:
|
||||
return CutsceneCommands::SetActorAction1;
|
||||
case 14:
|
||||
case 16:
|
||||
case 24:
|
||||
case 35:
|
||||
case 40:
|
||||
case 48:
|
||||
case 64:
|
||||
case 68:
|
||||
case 70:
|
||||
case 78:
|
||||
case 80:
|
||||
case 94:
|
||||
case 116:
|
||||
case 118:
|
||||
case 120:
|
||||
case 125:
|
||||
case 131:
|
||||
case 141:
|
||||
return CutsceneCommands::SetActorAction2;
|
||||
case 25:
|
||||
case 36:
|
||||
case 41:
|
||||
case 50:
|
||||
case 67:
|
||||
case 69:
|
||||
case 72:
|
||||
case 81:
|
||||
case 106:
|
||||
case 117:
|
||||
case 121:
|
||||
case 126:
|
||||
case 132:
|
||||
return CutsceneCommands::SetActorAction3;
|
||||
case 29:
|
||||
case 37:
|
||||
case 42:
|
||||
case 51:
|
||||
case 53:
|
||||
case 63:
|
||||
case 65:
|
||||
case 66:
|
||||
case 75:
|
||||
case 82:
|
||||
case 108:
|
||||
case 127:
|
||||
case 133:
|
||||
return CutsceneCommands::SetActorAction4;
|
||||
case 30:
|
||||
case 38:
|
||||
case 43:
|
||||
case 47:
|
||||
case 54:
|
||||
case 79:
|
||||
case 83:
|
||||
case 128:
|
||||
case 135:
|
||||
return CutsceneCommands::SetActorAction5;
|
||||
case 44:
|
||||
case 55:
|
||||
case 77:
|
||||
case 84:
|
||||
case 90:
|
||||
case 129:
|
||||
case 136:
|
||||
return CutsceneCommands::SetActorAction6;
|
||||
case 31:
|
||||
case 52:
|
||||
case 57:
|
||||
case 58:
|
||||
case 88:
|
||||
case 115:
|
||||
case 130:
|
||||
case 137:
|
||||
return CutsceneCommands::SetActorAction7;
|
||||
case 49:
|
||||
case 60:
|
||||
case 89:
|
||||
case 111:
|
||||
case 114:
|
||||
case 134:
|
||||
case 142:
|
||||
return CutsceneCommands::SetActorAction8;
|
||||
case 62:
|
||||
return CutsceneCommands::SetActorAction9;
|
||||
case 143:
|
||||
return CutsceneCommands::SetActorAction10;
|
||||
case 0x0B:
|
||||
case 0x0D:
|
||||
case 0x1A:
|
||||
case 0x1B:
|
||||
case 0x1C:
|
||||
case 0x20:
|
||||
case 0x21:
|
||||
case 0x3B:
|
||||
case 0x3D:
|
||||
case 0x47:
|
||||
case 0x49:
|
||||
case 0x6D:
|
||||
case 0x15:
|
||||
case 0x16:
|
||||
case 0x70:
|
||||
case 0x71:
|
||||
case 0x4A:
|
||||
return CutsceneCommands::Unknown;
|
||||
}
|
||||
|
||||
printf("WARNING: Could not identify cutscene command ID 0x%04X\n", id);
|
||||
|
@ -188,7 +368,6 @@ ZResourceType ZCutscene::GetResourceType()
|
|||
|
||||
CutsceneCommand::CutsceneCommand(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
string CutsceneCommand::GetCName(const std::string& prefix)
|
||||
|
@ -198,7 +377,9 @@ string CutsceneCommand::GetCName(const std::string& prefix)
|
|||
|
||||
string CutsceneCommand::GenerateSourceCode(const std::string& roomName, int baseAddress)
|
||||
{
|
||||
return StringHelper::Sprintf("%s %sCutsceneData%04XCmd%02X = { 0x%02X,", GetCName(roomName).c_str(), roomName.c_str(), baseAddress, commandIndex, commandID);
|
||||
return StringHelper::Sprintf("%s %sCutsceneData%04XCmd%02X = { 0x%02X,",
|
||||
GetCName(roomName).c_str(), roomName.c_str(), baseAddress,
|
||||
commandIndex, commandID);
|
||||
}
|
||||
|
||||
size_t CutsceneCommand::GetCommandSize()
|
||||
|
@ -222,7 +403,9 @@ CutsceneCameraPoint::CutsceneCameraPoint(const vector<uint8_t>& rawData, int raw
|
|||
unused = BitConverter::ToInt16BE(data, rawDataIndex + 14);
|
||||
}
|
||||
|
||||
CutsceneCommandSetCameraPos::CutsceneCommandSetCameraPos(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandSetCameraPos::CutsceneCommandSetCameraPos(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
const uint8_t* data = rawData.data();
|
||||
|
||||
|
@ -285,10 +468,13 @@ string CutsceneCommandSetCameraPos::GenerateSourceCode(const std::string& roomNa
|
|||
|
||||
result += StringHelper::Sprintf("%s(%i, %i),\n", listStr.c_str(), startFrame, endFrame);
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\t%s(%i, %i, %i, 0x%06X, %i, %i, %i, %i),\n", posStr.c_str(), entries[i]->continueFlag, entries[i]->cameraRoll, entries[i]->nextPointFrame,
|
||||
*(uint32_t*)&entries[i]->viewAngle, entries[i]->posX, entries[i]->posY, entries[i]->posZ, entries[i]->unused);
|
||||
result += StringHelper::Sprintf("\t\t%s(%i, %i, %i, 0x%06X, %i, %i, %i, %i),\n",
|
||||
posStr.c_str(), entries[i]->continueFlag,
|
||||
entries[i]->cameraRoll, entries[i]->nextPointFrame,
|
||||
*(uint32_t*)&entries[i]->viewAngle, entries[i]->posX,
|
||||
entries[i]->posY, entries[i]->posZ, entries[i]->unused);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -312,12 +498,16 @@ MusicFadeEntry::MusicFadeEntry(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
unknown5 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 24);
|
||||
unknown6 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 28);
|
||||
unknown7 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 32);
|
||||
unknown8 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 36);
|
||||
unknown9 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 40);
|
||||
unknown10 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 44);
|
||||
unknown8 = (uint32_t)BitConverter::ToInt32BE(rawData,
|
||||
rawDataIndex + 36); // Macro hardcodes it as zero
|
||||
unknown9 = (uint32_t)BitConverter::ToInt32BE(rawData,
|
||||
rawDataIndex + 40); // Macro hardcodes it as zero
|
||||
unknown10 = (uint32_t)BitConverter::ToInt32BE(rawData,
|
||||
rawDataIndex + 44); // Macro hardcodes it as zero
|
||||
}
|
||||
|
||||
CutsceneCommandFadeBGM::CutsceneCommandFadeBGM(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandFadeBGM::CutsceneCommandFadeBGM(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex + 0);
|
||||
|
||||
|
@ -341,11 +531,13 @@ string CutsceneCommandFadeBGM::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_FADE_BGM_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_FADE_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->base, entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->unknown0, entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4, entries[i]->unknown5, entries[i]->unknown6, entries[i]->unknown7,
|
||||
entries[i]->unknown8, entries[i]->unknown9, entries[i]->unknown10);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_FADE_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->base,
|
||||
entries[i]->startFrame, entries[i]->endFrame, entries[i]->unknown0,
|
||||
entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4,
|
||||
entries[i]->unknown5, entries[i]->unknown6, entries[i]->unknown7);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -353,7 +545,7 @@ string CutsceneCommandFadeBGM::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
size_t CutsceneCommandFadeBGM::GetCommandSize()
|
||||
{
|
||||
return CutsceneCommand::GetCommandSize() + 0x30;
|
||||
return CutsceneCommand::GetCommandSize() + 0x30 * entries.size();
|
||||
}
|
||||
|
||||
MusicChangeEntry::MusicChangeEntry(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
|
@ -371,7 +563,8 @@ MusicChangeEntry::MusicChangeEntry(const vector<uint8_t>& rawData, int rawDataIn
|
|||
unknown7 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 32);
|
||||
}
|
||||
|
||||
CutsceneCommandPlayBGM::CutsceneCommandPlayBGM(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandPlayBGM::CutsceneCommandPlayBGM(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex + 0);
|
||||
|
||||
|
@ -390,11 +583,13 @@ string CutsceneCommandPlayBGM::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_PLAY_BGM_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_PLAY_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->sequence, entries[i]->startFrame,
|
||||
entries[i]->endFrame, entries[i]->unknown0, entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4, entries[i]->unknown5,
|
||||
entries[i]->unknown6, entries[i]->unknown7);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_PLAY_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->sequence,
|
||||
entries[i]->startFrame, entries[i]->endFrame, entries[i]->unknown0,
|
||||
entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4,
|
||||
entries[i]->unknown5, entries[i]->unknown6, entries[i]->unknown7);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -410,7 +605,8 @@ size_t CutsceneCommandPlayBGM::GetCommandSize()
|
|||
return CutsceneCommand::GetCommandSize() + 0x30;
|
||||
}
|
||||
|
||||
CutsceneCommandStopBGM::CutsceneCommandStopBGM(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandStopBGM::CutsceneCommandStopBGM(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex + 0);
|
||||
|
||||
|
@ -429,11 +625,13 @@ string CutsceneCommandStopBGM::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_STOP_BGM_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("CS_STOP_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->sequence, entries[i]->startFrame,
|
||||
entries[i]->endFrame, entries[i]->unknown0, entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4, entries[i]->unknown5,
|
||||
entries[i]->unknown6, entries[i]->unknown7);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_STOP_BGM(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->sequence,
|
||||
entries[i]->startFrame, entries[i]->endFrame, entries[i]->unknown0,
|
||||
entries[i]->unknown1, entries[i]->unknown2, entries[i]->unknown3, entries[i]->unknown4,
|
||||
entries[i]->unknown5, entries[i]->unknown6, entries[i]->unknown7);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -464,7 +662,9 @@ EnvLightingEntry::EnvLightingEntry(const vector<uint8_t>& rawData, int rawDataIn
|
|||
unused7 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 32);
|
||||
}
|
||||
|
||||
CutsceneCommandEnvLighting::CutsceneCommandEnvLighting(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandEnvLighting::CutsceneCommandEnvLighting(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex + 0);
|
||||
|
||||
|
@ -483,10 +683,12 @@ string CutsceneCommandEnvLighting::GenerateSourceCode(const std::string& roomNam
|
|||
|
||||
result += StringHelper::Sprintf("CS_LIGHTING_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("CS_LIGHTING(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->setting, entries[i]->startFrame,
|
||||
entries[i]->endFrame, entries[i]->unused0, entries[i]->unused1, entries[i]->unused2, entries[i]->unused3, entries[i]->unused4, entries[i]->unused5,
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_LIGHTING(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->setting,
|
||||
entries[i]->startFrame, entries[i]->endFrame, entries[i]->unused0, entries[i]->unused1,
|
||||
entries[i]->unused2, entries[i]->unused3, entries[i]->unused4, entries[i]->unused5,
|
||||
entries[i]->unused6, entries[i]->unused7);
|
||||
}
|
||||
|
||||
|
@ -512,10 +714,12 @@ Unknown9Entry::Unknown9Entry(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
unk3 = rawData[rawDataIndex + 7];
|
||||
unk4 = rawData[rawDataIndex + 8];
|
||||
unused0 = rawData[rawDataIndex + 10];
|
||||
unused1 = rawData[rawDataIndex + 11];;
|
||||
unused1 = rawData[rawDataIndex + 11];
|
||||
;
|
||||
}
|
||||
|
||||
CutsceneCommandUnknown9::CutsceneCommandUnknown9(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandUnknown9::CutsceneCommandUnknown9(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex);
|
||||
|
||||
|
@ -534,10 +738,12 @@ string CutsceneCommandUnknown9::GenerateSourceCode(const std::string& roomName,
|
|||
|
||||
result += StringHelper::Sprintf("CS_CMD_09_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("CS_CMD_09(%i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->base, entries[i]->startFrame, entries[i]->endFrame, entries[i]->unk2,
|
||||
entries[i]->unk3, entries[i]->unk4, entries[i]->unused0, entries[i]->unused1);
|
||||
result += StringHelper::Sprintf("\t\tCS_CMD_09(%i, %i, %i, %i, %i, %i, %i, %i),\n",
|
||||
entries[i]->base, entries[i]->startFrame,
|
||||
entries[i]->endFrame, entries[i]->unk2, entries[i]->unk3,
|
||||
entries[i]->unk4, entries[i]->unused0, entries[i]->unused1);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -569,7 +775,8 @@ UnkEntry::UnkEntry(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
unused11 = (uint32_t)BitConverter::ToInt32BE(rawData, rawDataIndex + 44);
|
||||
}
|
||||
|
||||
CutsceneCommandUnknown::CutsceneCommandUnknown(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandUnknown::CutsceneCommandUnknown(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex);
|
||||
|
||||
|
@ -588,11 +795,13 @@ string CutsceneCommandUnknown::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_UNK_DATA_LIST(0x%02X, %i),\n", commandID, entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\tCS_UNK_DATA(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->unused0, entries[i]->unused1, entries[i]->unused2,
|
||||
entries[i]->unused3, entries[i]->unused4, entries[i]->unused5, entries[i]->unused6,
|
||||
entries[i]->unused7, entries[i]->unused8, entries[i]->unused9, entries[i]->unused10, entries[i]->unused11);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_UNK_DATA(%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n",
|
||||
entries[i]->unused0, entries[i]->unused1, entries[i]->unused2, entries[i]->unused3,
|
||||
entries[i]->unused4, entries[i]->unused5, entries[i]->unused6, entries[i]->unused7,
|
||||
entries[i]->unused8, entries[i]->unused9, entries[i]->unused10, entries[i]->unused11);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -618,7 +827,8 @@ DayTimeEntry::DayTimeEntry(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
unused = rawData[rawDataIndex + 8];
|
||||
}
|
||||
|
||||
CutsceneCommandDayTime::CutsceneCommandDayTime(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandDayTime::CutsceneCommandDayTime(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex);
|
||||
|
||||
|
@ -642,10 +852,11 @@ string CutsceneCommandDayTime::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_TIME_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_TIME(%i, %i, %i, %i, %i, %i),\n", entries[i]->base, entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->hour, entries[i]->minute, entries[i]->unused);
|
||||
result += StringHelper::Sprintf("\t\tCS_TIME(%i, %i, %i, %i, %i, %i),\n", entries[i]->base,
|
||||
entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->hour, entries[i]->minute, entries[i]->unused);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -666,7 +877,8 @@ TextboxEntry::TextboxEntry(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
textID2 = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 10);
|
||||
}
|
||||
|
||||
CutsceneCommandTextbox::CutsceneCommandTextbox(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandTextbox::CutsceneCommandTextbox(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex);
|
||||
|
||||
|
@ -690,16 +902,19 @@ string CutsceneCommandTextbox::GenerateSourceCode(const std::string& roomName, i
|
|||
|
||||
result += StringHelper::Sprintf("CS_TEXT_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
if (entries[i]->base == 0xFFFF)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_TEXT_NONE(%i, %i),\n", entries[i]->startFrame, entries[i]->endFrame);
|
||||
result += StringHelper::Sprintf("\t\tCS_TEXT_NONE(%i, %i),\n", entries[i]->startFrame,
|
||||
entries[i]->endFrame);
|
||||
}
|
||||
else
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_TEXT_DISPLAY_TEXTBOX(%i, %i, %i, %i, %i, %i),\n", entries[i]->base, entries[i]->startFrame, entries[i]->endFrame, entries[i]->type,
|
||||
entries[i]->textID1, entries[i]->textID2);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_TEXT_DISPLAY_TEXTBOX(%i, %i, %i, %i, %i, %i),\n", entries[i]->base,
|
||||
entries[i]->startFrame, entries[i]->endFrame, entries[i]->type, entries[i]->textID1,
|
||||
entries[i]->textID2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -732,7 +947,9 @@ ActorAction::ActorAction(const vector<uint8_t>& rawData, int rawDataIndex)
|
|||
normalZ = BitConverter::ToInt32BE(data, rawDataIndex + 44);
|
||||
}
|
||||
|
||||
CutsceneCommandActorAction::CutsceneCommandActorAction(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandActorAction::CutsceneCommandActorAction(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex);
|
||||
|
||||
|
@ -748,14 +965,28 @@ CutsceneCommandActorAction::CutsceneCommandActorAction(const vector<uint8_t>& ra
|
|||
string CutsceneCommandActorAction::GenerateSourceCode(const std::string& roomName, int baseAddress)
|
||||
{
|
||||
string result = "";
|
||||
string subCommand = "";
|
||||
|
||||
result += StringHelper::Sprintf("CS_NPC_ACTION_LIST(%i, %i),\n", commandID, entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
if (commandID == 10)
|
||||
{
|
||||
result += StringHelper::Sprintf("\tCS_NPC_ACTION(0x%04X, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->action, entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->rotX, entries[i]->rotY, entries[i]->rotZ, entries[i]->startPosX, entries[i]->startPosY, entries[i]->startPosZ, entries[i]->endPosX, entries[i]->endPosY, entries[i]->endPosZ,
|
||||
*(int32_t*)&entries[i]->normalX, *(int32_t*)&entries[i]->normalY, *(int32_t*)&entries[i]->normalZ);
|
||||
result += StringHelper::Sprintf("CS_PLAYER_ACTION_LIST(%i),\n", entries.size());
|
||||
subCommand = "CS_PLAYER_ACTION";
|
||||
}
|
||||
else
|
||||
{
|
||||
result += StringHelper::Sprintf("CS_NPC_ACTION_LIST(%i, %i),\n", commandID, entries.size());
|
||||
subCommand = "CS_NPC_ACTION";
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\t%s(0x%04X, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, %i, %i, %i, %i, %i, %i, %i),\n",
|
||||
subCommand.c_str(), entries[i]->action, entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->rotX, entries[i]->rotY, entries[i]->rotZ, entries[i]->startPosX,
|
||||
entries[i]->startPosY, entries[i]->startPosZ, entries[i]->endPosX, entries[i]->endPosY,
|
||||
entries[i]->endPosZ, *(int32_t*)&entries[i]->normalX, *(int32_t*)&entries[i]->normalY,
|
||||
*(int32_t*)&entries[i]->normalZ);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -771,14 +1002,16 @@ size_t CutsceneCommandActorAction::GetCommandSize()
|
|||
return CutsceneCommand::GetCommandSize() + (entries.size() * 0x30);
|
||||
}
|
||||
|
||||
CutsceneCommandTerminator::CutsceneCommandTerminator(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandTerminator::CutsceneCommandTerminator(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
rawDataIndex += 4;
|
||||
|
||||
base = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 0);
|
||||
startFrame = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 2);
|
||||
endFrame = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 4);
|
||||
unknown = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 6);
|
||||
unknown = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 6); // endFrame duplicate
|
||||
}
|
||||
|
||||
string CutsceneCommandTerminator::GetCName(const std::string& prefix)
|
||||
|
@ -790,7 +1023,7 @@ string CutsceneCommandTerminator::GenerateSourceCode(const std::string& roomName
|
|||
{
|
||||
string result = "";
|
||||
|
||||
result += StringHelper::Sprintf("CS_TERMINATOR(0x%04X, %i, %i, 0x%04X),\n", base, startFrame, endFrame, unknown);
|
||||
result += StringHelper::Sprintf("CS_TERMINATOR(0x%04X, %i, %i),\n", base, startFrame, endFrame);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -800,7 +1033,8 @@ size_t CutsceneCommandTerminator::GetCommandSize()
|
|||
return CutsceneCommand::GetCommandSize() + 8;
|
||||
}
|
||||
|
||||
CutsceneCommandEnd::CutsceneCommandEnd(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandEnd::CutsceneCommandEnd(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
base = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 0);
|
||||
startFrame = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 2);
|
||||
|
@ -846,7 +1080,9 @@ SpecialActionEntry::SpecialActionEntry(const vector<uint8_t>& rawData, int rawDa
|
|||
unused10 = BitConverter::ToUInt32BE(data, rawDataIndex + 44);
|
||||
}
|
||||
|
||||
CutsceneCommandSpecialAction::CutsceneCommandSpecialAction(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandSpecialAction::CutsceneCommandSpecialAction(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
int numEntries = BitConverter::ToInt32BE(rawData, rawDataIndex + 0);
|
||||
|
||||
|
@ -859,17 +1095,22 @@ CutsceneCommandSpecialAction::CutsceneCommandSpecialAction(const vector<uint8_t>
|
|||
}
|
||||
}
|
||||
|
||||
string CutsceneCommandSpecialAction::GenerateSourceCode(const std::string& roomName, int baseAddress)
|
||||
string CutsceneCommandSpecialAction::GenerateSourceCode(const std::string& roomName,
|
||||
int baseAddress)
|
||||
{
|
||||
string result = "";
|
||||
|
||||
result += StringHelper::Sprintf("CS_MISC_LIST(%i),\n", entries.size());
|
||||
|
||||
for (int i = 0; i < entries.size(); i++)
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
result += StringHelper::Sprintf("\t\tCS_MISC(0x%04X, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, %i, %i, %i, %i, %i, %i),\n", entries[i]->base, entries[i]->startFrame, entries[i]->endFrame,
|
||||
entries[i]->unused0, entries[i]->unused1, entries[i]->unused2, entries[i]->unused3, entries[i]->unused4, entries[i]->unused5, entries[i]->unused6,
|
||||
entries[i]->unused7, entries[i]->unused8, entries[i]->unused9, entries[i]->unused10);
|
||||
result += StringHelper::Sprintf(
|
||||
"\t\tCS_MISC(0x%04X, %i, %i, 0x%04X, 0x%04X, 0x%04X, %i, %i, %i, %i, %i, %i, %i, "
|
||||
"%i),\n",
|
||||
entries[i]->base, entries[i]->startFrame, entries[i]->endFrame, entries[i]->unused0,
|
||||
entries[i]->unused1, entries[i]->unused2, entries[i]->unused3, entries[i]->unused4,
|
||||
entries[i]->unused5, entries[i]->unused6, entries[i]->unused7, entries[i]->unused8,
|
||||
entries[i]->unused9, entries[i]->unused10);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -885,7 +1126,8 @@ size_t CutsceneCommandSpecialAction::GetCommandSize()
|
|||
return CutsceneCommand::GetCommandSize() + (0x30 * entries.size());
|
||||
}
|
||||
|
||||
CutsceneCommandNop::CutsceneCommandNop(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandNop::CutsceneCommandNop(const vector<uint8_t>& rawData, int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
base = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 0);
|
||||
startFrame = (uint16_t)BitConverter::ToInt16BE(rawData, rawDataIndex + 2);
|
||||
|
@ -902,7 +1144,9 @@ size_t CutsceneCommandNop::GetCommandSize()
|
|||
return CutsceneCommand::GetCommandSize() + 6;
|
||||
}
|
||||
|
||||
CutsceneCommandSceneTransFX::CutsceneCommandSceneTransFX(const vector<uint8_t>& rawData, int rawDataIndex) : CutsceneCommand(rawData, rawDataIndex)
|
||||
CutsceneCommandSceneTransFX::CutsceneCommandSceneTransFX(const vector<uint8_t>& rawData,
|
||||
int rawDataIndex)
|
||||
: CutsceneCommand(rawData, rawDataIndex)
|
||||
{
|
||||
rawDataIndex += 4;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue