Files

21 lines
777 B
C++
Raw Permalink Normal View History

2024-01-05 10:15:41 -06:00
#include "2s2h/resource/importer/scenecommand/SetWindSettingsFactory.h"
#include "2s2h/resource/type/scenecommand/SetWindSettings.h"
#include "spdlog/spdlog.h"
2024-03-26 21:26:31 -04:00
namespace SOH {
std::shared_ptr<Ship::IResource> SetWindSettingsFactory::ReadResource(std::shared_ptr<Ship::ResourceInitData> initData,
2024-05-22 09:52:56 -04:00
std::shared_ptr<Ship::BinaryReader> reader) {
2024-03-26 21:26:31 -04:00
auto setWind = std::make_shared<SetWindSettings>(initData);
2024-01-05 10:15:41 -06:00
ReadCommandId(setWind, reader);
2024-03-26 21:26:31 -04:00
2024-01-05 10:15:41 -06:00
setWind->settings.windWest = reader->ReadInt8();
setWind->settings.windVertical = reader->ReadInt8();
setWind->settings.windSouth = reader->ReadInt8();
setWind->settings.windSpeed = reader->ReadUByte();
2024-03-26 21:26:31 -04:00
return setWind;
2024-01-05 10:15:41 -06:00
}
2024-03-26 21:26:31 -04:00
} // namespace SOH