Files
oot/tools/ZAPD/ZAPD/ZRoom/Commands/SetSpecialObjects.cpp
T
fig02 ba0c6965ca Remove submodule and use subrepo for ZAPD (#591)
* remove zap

* git subrepo clone https://github.com/zeldaret/ZAPD.git tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "cd4a8760b"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "cd4a8760b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* remove thanks.md

* zap2 -> zapd and spec changes

* remove submodule init
2021-01-01 23:24:29 -05:00

26 lines
786 B
C++

#include "SetSpecialObjects.h"
#include "../../BitConverter.h"
#include "../../StringHelper.h"
using namespace std;
SetSpecialObjects::SetSpecialObjects(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDataIndex) : ZRoomCommand(nZRoom, rawData, rawDataIndex)
{
elfMessage = rawData[rawDataIndex + 0x01];
globalObject = BitConverter::ToInt16BE(rawData, rawDataIndex + 6);
}
string SetSpecialObjects::GenerateSourceCodePass1(string roomName, int baseAddress)
{
return StringHelper::Sprintf("%s 0x%02X, 0x%04X", ZRoomCommand::GenerateSourceCodePass1(roomName, baseAddress).c_str(), elfMessage, globalObject);
}
string SetSpecialObjects::GetCommandCName()
{
return "SCmdSpecialFiles";
}
RoomCommand SetSpecialObjects::GetRoomCommand()
{
return RoomCommand::SetSpecialObjects;
}