diff options
| author | Kenix3 <kenixwhisperwind@gmail.com> | 2020-12-30 19:25:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-30 19:25:06 -0500 |
| commit | 27c17b20d38a72b7a8016852fa85311dcdc40f11 (patch) | |
| tree | cc62e053f3ff368e1affbd809a34e2e99ce1c74a /ZAPD/ZRoom/Commands/SetWind.cpp | |
| parent | fd533747ddfa6645a53f6b1356b5b68d7f2f0bed (diff) | |
ZAP2 project renamed to ZAPD (#27)
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetWind.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetWind.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ZAPD/ZRoom/Commands/SetWind.cpp b/ZAPD/ZRoom/Commands/SetWind.cpp new file mode 100644 index 0000000..88f1266 --- /dev/null +++ b/ZAPD/ZRoom/Commands/SetWind.cpp @@ -0,0 +1,27 @@ +#include "SetWind.h" +#include "../../StringHelper.h" + +using namespace std; + +SetWind::SetWind(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDataIndex) : ZRoomCommand(nZRoom, rawData, rawDataIndex) +{ + windWest = rawData[rawDataIndex + 0x04]; + windVertical = rawData[rawDataIndex + 0x05]; + windSouth = rawData[rawDataIndex + 0x06]; + clothFlappingStrength = rawData[rawDataIndex + 0x07]; +} + +string SetWind::GenerateSourceCodePass1(string roomName, int baseAddress) +{ + return StringHelper::Sprintf("%s 0x00, 0x00, 0x00, 0x%02X, 0x%02X, 0x%02X, 0x%02X", ZRoomCommand::GenerateSourceCodePass1(roomName, baseAddress).c_str(), windWest, windVertical, windSouth, clothFlappingStrength); +} + +string SetWind::GetCommandCName() +{ + return "SCmdWindSettings"; +} + +RoomCommand SetWind::GetRoomCommand() +{ + return RoomCommand::SetWind; +}
\ No newline at end of file |
