summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetWind.cpp
blob: 69561e21dad927d23be91d7a6b6a24f0c16f98eb (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 "SetWind.h"
#include <ship/utils/StringHelper.h>

SetWind::SetWind(ZFile* nParent) : ZRoomCommand(nParent)
{
}

void SetWind::ParseRawData()
{
	ZRoomCommand::ParseRawData();
	auto& parentRawData = parent->GetRawData();
	windWest = parentRawData.at(rawDataIndex + 0x04);
	windVertical = parentRawData.at(rawDataIndex + 0x05);
	windSouth = parentRawData.at(rawDataIndex + 0x06);
	clothFlappingStrength = parentRawData.at(rawDataIndex + 0x07);
}

std::string SetWind::GetBodySourceCode() const
{
	return StringHelper::Sprintf("SCENE_CMD_WIND_SETTINGS(%i, %i, %i, %i)", windWest, windVertical,
	                             windSouth, clothFlappingStrength);
}

std::string SetWind::GetCommandCName() const
{
	return "SCmdWindSettings";
}

RoomCommand SetWind::GetRoomCommand() const
{
	return RoomCommand::SetWind;
}