summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetSkyboxModifier.cpp
blob: 689f965392447bd50c050854816146e8d4fcce32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "SetSkyboxModifier.h"

#include <ship/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;
}