mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-04 19:24:28 +00:00
750c0cab35
* remove fake match * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "3e9ed72e2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "3e9ed72e2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * new extraction script and a hack to make clear tag work * fix clear tag again * remove static from clear tag DLists * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e7a8a48cf" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e7a8a48cf" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "e243634e5" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "e243634e5" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "d0cd6b397" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "d0cd6b397" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Update ovl_En_Clear_Tag.xml
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
#include "ZRoomCommand.h"
|
|
|
|
#include "Utils/BitConverter.h"
|
|
#include "Utils/StringHelper.h"
|
|
#include "ZRoom.h"
|
|
|
|
ZRoomCommand::ZRoomCommand(ZFile* nParent) : ZResource(nParent)
|
|
{
|
|
}
|
|
|
|
void ZRoomCommand::ExtractCommandFromRoom(ZRoom* nZRoom, uint32_t nRawDataIndex)
|
|
{
|
|
zRoom = nZRoom;
|
|
rawDataIndex = nRawDataIndex;
|
|
|
|
ParseRawData();
|
|
}
|
|
|
|
void ZRoomCommand::ParseRawData()
|
|
{
|
|
auto& parentRawData = parent->GetRawData();
|
|
cmdID = static_cast<RoomCommand>(parentRawData.at(rawDataIndex));
|
|
cmdAddress = rawDataIndex;
|
|
|
|
cmdArg1 = parentRawData.at(rawDataIndex + 1);
|
|
cmdArg2 = BitConverter::ToUInt32BE(parentRawData, rawDataIndex + 4);
|
|
segmentOffset = Seg2Filespace(cmdArg2, parent->baseAddress);
|
|
}
|
|
|
|
RoomCommand ZRoomCommand::GetRoomCommand() const
|
|
{
|
|
return RoomCommand::Error;
|
|
}
|
|
|
|
size_t ZRoomCommand::GetRawDataSize() const
|
|
{
|
|
return 0x08;
|
|
}
|
|
|
|
std::string ZRoomCommand::GetSourceTypeName() const
|
|
{
|
|
return GetCommandCName();
|
|
}
|
|
|
|
ZResourceType ZRoomCommand::GetResourceType() const
|
|
{
|
|
return ZResourceType::RoomCommand;
|
|
}
|
|
|
|
std::string ZRoomCommand::GetCommandCName() const
|
|
{
|
|
return "SceneCmd";
|
|
}
|
|
|
|
std::string ZRoomCommand::GetCommandHex() const
|
|
{
|
|
return StringHelper::Sprintf("0x%02X", static_cast<uint8_t>(cmdID));
|
|
}
|