diff --git a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp index f528f3ef6..ea49e929a 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.cpp @@ -9,7 +9,7 @@ #include "../../Minecraft.Client/Network/ClientConnection.h" #include "../../Minecraft.World/Headers/net.minecraft.network.packet.h" -ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount, +ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains /*= true*/, bool changeGameMode /*= false*/, GameType *targetGameMode /*= 0*/ ) : TutorialConstraint( -1 ) { @@ -73,7 +73,7 @@ void ChangeStateConstraint::tick(int iPad) bool inASourceState = false; Minecraft *minecraft = Minecraft::GetInstance(); - for(DWORD i = 0; i < m_sourceStatesCount; ++i) + for(std::size_t i = 0; i < m_sourceStatesCount; ++i) { if(m_sourceStates[i] == m_tutorial->getCurrentState()) { diff --git a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h index 2156870d4..9388210c9 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h +++ b/Minecraft.Client/Platform/Common/Tutorial/ChangeStateConstraint.h @@ -3,6 +3,8 @@ #include "TutorialEnum.h" #include "TutorialConstraint.h" +#include + class AABB; class Tutorial; class GameType; @@ -18,7 +20,7 @@ private: eTutorial_State m_targetState; eTutorial_State *m_sourceStates; - DWORD m_sourceStatesCount; + std::size_t m_sourceStatesCount; bool m_bHasChanged; eTutorial_State m_changedFromState; @@ -30,8 +32,8 @@ private: public: virtual ConstraintType getType() { return e_ConstraintChangeState; } - ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL ); + ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL ); ~ChangeStateConstraint(); virtual void tick(int iPad); -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h index 5e9aaaad1..af0fdca19 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h @@ -6,6 +6,8 @@ #include "TutorialMessage.h" #include "TutorialEnum.h" +#include + // #define TUTORIAL_HINT_DELAY_TIME 14000 // How long we should wait from displaying one hint to the next // #define TUTORIAL_DISPLAY_MESSAGE_TIME 7000 // #define TUTORIAL_MINIMUM_DISPLAY_MESSAGE_TIME 2000 @@ -93,8 +95,8 @@ protected: //D3DXVECTOR3 m_OriginalPosition; public: - DWORD lastMessageTime; - DWORD m_lastHintDisplayedTime; + std::uint32_t lastMessageTime; + std::uint32_t m_lastHintDisplayedTime; private: PopupMessageDetails *m_lastMessage; diff --git a/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h b/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h index 33f2e67d4..69497ef02 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h +++ b/Minecraft.Client/Platform/Common/Tutorial/TutorialEnum.h @@ -1,14 +1,16 @@ #pragma once +#include + typedef struct { - WORD index; - DWORD diffsSize; - BYTE *diffs; - DWORD lastByteChanged; + std::uint16_t index; + std::uint32_t diffsSize; + std::uint8_t *diffs; + std::uint32_t lastByteChanged; } TutorialDiff_Chunk; typedef struct { - DWORD diffCount; + std::uint32_t diffCount; TutorialDiff_Chunk *diffs; } TutorialDiff_File; @@ -326,4 +328,4 @@ enum eTutorial_CompletionAction e_Tutorial_Completion_Complete_State, // This will make the current tutorial state complete e_Tutorial_Completion_Complete_State_Gameplay_Constraints, // This will make the current tutorial state complete, and move the delayed constraints to the gameplay state e_Tutorial_Completion_Jump_To_Last_Task, -}; \ No newline at end of file +};