Shipwright/ZAPDTR/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp
M4xw 5dda5762ba git subrepo clone https://github.com/HarbourMasters/ZAPDTR.git
subrepo:
  subdir:   "ZAPDTR"
  merged:   "a53a53ea4"
upstream:
  origin:   "https://github.com/HarbourMasters/ZAPDTR.git"
  branch:   "master"
  commit:   "a53a53ea4"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-22 02:54:48 +01:00

35 lines
832 B
C++

#include "SetSpecialObjects.h"
#include "Utils/BitConverter.h"
#include "Utils/StringHelper.h"
#include "ZRoom/ZNames.h"
SetSpecialObjects::SetSpecialObjects(ZFile* nParent) : ZRoomCommand(nParent)
{
}
void SetSpecialObjects::ParseRawData()
{
ZRoomCommand::ParseRawData();
elfMessage = cmdArg1;
globalObject = BitConverter::ToUInt16BE(parent->GetRawData(), rawDataIndex + 0x06);
}
std::string SetSpecialObjects::GetBodySourceCode() const
{
std::string objectName = ZNames::GetObjectName(globalObject);
return StringHelper::Sprintf("SCENE_CMD_SPECIAL_FILES(0x%02X, %s)", elfMessage,
objectName.c_str());
}
std::string SetSpecialObjects::GetCommandCName() const
{
return "SCmdSpecialFiles";
}
RoomCommand SetSpecialObjects::GetRoomCommand() const
{
return RoomCommand::SetSpecialObjects;
}