Files
oot/tools/ZAPD/ZAPD/ZRoom/Commands/SetRoomBehavior.cpp
T
Nicholas Estelami 0432011bd9 Updated to use latest version of ZAPD (#777)
* Updated config file

* Added missing files

* Temporarily removed asm_processor changes.

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "96ffc1e62"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "96ffc1e62"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "179af7d11"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "179af7d11"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Cleanup and fixes.

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "50ad2fe78"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "50ad2fe78"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Makefile fix

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "b9120803e"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "b9120803e"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
2021-04-30 23:23:22 +02:00

30 lines
804 B
C++

#include "SetRoomBehavior.h"
#include "../../BitConverter.h"
#include "../../StringHelper.h"
using namespace std;
SetRoomBehavior::SetRoomBehavior(ZRoom* nZRoom, std::vector<uint8_t> rawData, uint32_t rawDataIndex)
: ZRoomCommand(nZRoom, rawData, rawDataIndex)
{
gameplayFlags = rawData[rawDataIndex + 0x01];
gameplayFlags2 = BitConverter::ToInt32BE(rawData, rawDataIndex + 0x04);
}
string SetRoomBehavior::GenerateSourceCodePass1(string roomName, uint32_t baseAddress)
{
return StringHelper::Sprintf(
"%s 0x%02X, 0x%08X", ZRoomCommand::GenerateSourceCodePass1(roomName, baseAddress).c_str(),
gameplayFlags, gameplayFlags2);
;
}
string SetRoomBehavior::GetCommandCName()
{
return "SCmdRoomBehavior";
}
RoomCommand SetRoomBehavior::GetRoomCommand()
{
return RoomCommand::SetRoomBehavior;
}