From 4c9d472f1059389644f9c52e2849d8655638b698 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 9 Jul 2021 14:18:26 +0200 Subject: [PATCH] Several fixes for binary stream --- .../AngelScript/ByteCodeHandling/IPkmnBinaryStream.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ScriptResolving/AngelScript/ByteCodeHandling/IPkmnBinaryStream.hpp b/src/ScriptResolving/AngelScript/ByteCodeHandling/IPkmnBinaryStream.hpp index 44cb342..0c37f36 100644 --- a/src/ScriptResolving/AngelScript/ByteCodeHandling/IPkmnBinaryStream.hpp +++ b/src/ScriptResolving/AngelScript/ByteCodeHandling/IPkmnBinaryStream.hpp @@ -20,10 +20,10 @@ public: // We serialize our types in the format // "[category(byte)][name(str)]\2[decl(str)]\2[name(str)]\2[decl(str)]\1[category(byte)]...." - ScriptCategory categoryArr[1]; + i16 categoryArr[1]; for (const auto& dic : types) { // Write the category - categoryArr[0] = dic.first; + categoryArr[0] = (i16)dic.first; Write(categoryArr, sizeof(i16)); for (const auto& inner : dic.second) { // Write the script name @@ -40,7 +40,7 @@ public: Write("\1", sizeof(char)); } - categoryArr[0] = (ScriptCategory)-1; + categoryArr[0] = (i16)-1; Write(categoryArr, sizeof(i16)); for (const auto& inner : itemUseTypes) { // Write the script name @@ -56,7 +56,7 @@ public: // Write the divider between categories. Write("\1", sizeof(char)); - categoryArr[0] = (ScriptCategory)-2; + categoryArr[0] = (i16)-2; Write(categoryArr, sizeof(i16)); for (const auto& inner : evolutionTypes) { // Write the script name