summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetCameraSettings.cpp
diff options
context:
space:
mode:
authorKenix3 <kenixwhisperwind@gmail.com>2020-12-30 19:25:06 -0500
committerGitHub <noreply@github.com>2020-12-30 19:25:06 -0500
commit27c17b20d38a72b7a8016852fa85311dcdc40f11 (patch)
treecc62e053f3ff368e1affbd809a34e2e99ce1c74a /ZAPD/ZRoom/Commands/SetCameraSettings.cpp
parentfd533747ddfa6645a53f6b1356b5b68d7f2f0bed (diff)
ZAP2 project renamed to ZAPD (#27)
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetCameraSettings.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetCameraSettings.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/ZAPD/ZRoom/Commands/SetCameraSettings.cpp b/ZAPD/ZRoom/Commands/SetCameraSettings.cpp
new file mode 100644
index 0000000..830aacc
--- /dev/null
+++ b/ZAPD/ZRoom/Commands/SetCameraSettings.cpp
@@ -0,0 +1,26 @@
+#include "SetCameraSettings.h"
+#include "../../BitConverter.h"
+#include "../../StringHelper.h"
+
+using namespace std;
+
+SetCameraSettings::SetCameraSettings(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDataIndex) : ZRoomCommand(nZRoom, rawData, rawDataIndex)
+{
+ cameraMovement = rawData[rawDataIndex + 0x01];
+ mapHighlight = BitConverter::ToInt32BE(rawData, rawDataIndex + 4);
+}
+
+string SetCameraSettings::GenerateSourceCodePass1(string roomName, int baseAddress)
+{
+ return StringHelper::Sprintf("%s 0x%02X, 0x%08X", ZRoomCommand::GenerateSourceCodePass1(roomName, baseAddress).c_str(), cameraMovement, mapHighlight);
+}
+
+string SetCameraSettings::GetCommandCName()
+{
+ return "SCmdMiscSettings";
+}
+
+RoomCommand SetCameraSettings::GetRoomCommand()
+{
+ return RoomCommand::SetCameraSettings;
+} \ No newline at end of file