Shipwright/ZAPDTR/ZAPD/ZRoom/Commands/SetSkyboxModifier.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

33 lines
842 B
C++

#include "SetSkyboxModifier.h"
#include "Utils/StringHelper.h"
SetSkyboxModifier::SetSkyboxModifier(ZFile* nParent) : ZRoomCommand(nParent)
{
}
void SetSkyboxModifier::ParseRawData()
{
ZRoomCommand::ParseRawData();
disableSky = parent->GetRawData().at(rawDataIndex + 0x04);
disableSunMoon = parent->GetRawData().at(rawDataIndex + 0x05);
}
std::string SetSkyboxModifier::GetBodySourceCode() const
{
std::string sky = StringHelper::BoolStr(disableSky);
std::string soonMoon = StringHelper::BoolStr(disableSunMoon);
return StringHelper::Sprintf("SCENE_CMD_SKYBOX_DISABLES(%s, %s)", sky.c_str(),
soonMoon.c_str());
}
std::string SetSkyboxModifier::GetCommandCName() const
{
return "SCmdSkyboxDisables";
}
RoomCommand SetSkyboxModifier::GetRoomCommand() const
{
return RoomCommand::SetSkyboxModifier;
}