Shipwright/ZAPDTR/ZAPD/ZRoom/Commands/SetWind.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
818 B
C++

#include "SetWind.h"
#include "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;
}