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

37 lines
1.1 KiB
C++

#include "SetSkyboxSettings.h"
#include "Globals.h"
#include "Utils/StringHelper.h"
SetSkyboxSettings::SetSkyboxSettings(ZFile* nParent) : ZRoomCommand(nParent)
{
}
void SetSkyboxSettings::ParseRawData()
{
ZRoomCommand::ParseRawData();
unk1 = cmdArg1;
skyboxNumber = parent->GetRawData().at(rawDataIndex + 0x04);
cloudsType = parent->GetRawData().at(rawDataIndex + 0x05);
isIndoors = parent->GetRawData().at(rawDataIndex + 0x06);
}
std::string SetSkyboxSettings::GetBodySourceCode() const
{
std::string indoors = StringHelper::BoolStr(isIndoors);
if (Globals::Instance->game == ZGame::MM_RETAIL)
return StringHelper::Sprintf("SCENE_CMD_SKYBOX_SETTINGS(0x%02X, %i, %i, %s)", unk1,
skyboxNumber, cloudsType, indoors.c_str());
return StringHelper::Sprintf("SCENE_CMD_SKYBOX_SETTINGS(%i, %i, %s)", skyboxNumber, cloudsType,
indoors.c_str());
}
std::string SetSkyboxSettings::GetCommandCName() const
{
return "SCmdSkyboxSettings";
}
RoomCommand SetSkyboxSettings::GetRoomCommand() const
{
return RoomCommand::SetSkyboxSettings;
}