diff --git a/TR5Main/Game/control.cpp b/TR5Main/Game/control.cpp index d3ae65b00..d58b2bb74 100644 --- a/TR5Main/Game/control.cpp +++ b/TR5Main/Game/control.cpp @@ -133,8 +133,6 @@ HEIGHT_TYPES HeightType; int HeavyTriggered; short SkyPos1; short SkyPos2; -signed char SkyVelocity1; -signed char SkyVelocity2; CVECTOR SkyColor1; CVECTOR SkyColor2; int CutSeqNum; diff --git a/TR5Main/Game/control.h b/TR5Main/Game/control.h index 2b6bde55d..fe6bfc56a 100644 --- a/TR5Main/Game/control.h +++ b/TR5Main/Game/control.h @@ -105,8 +105,6 @@ extern HEIGHT_TYPES HeightType; extern int HeavyTriggered; extern short SkyPos1; extern short SkyPos2; -extern signed char SkyVelocity1; -extern signed char SkyVelocity2; extern CVECTOR SkyColor1; extern CVECTOR SkyColor2; extern int CutSeqNum; diff --git a/TR5Main/Scripting/GameFlowScript.cpp b/TR5Main/Scripting/GameFlowScript.cpp index b26a7cd9f..1ae6a4e34 100644 --- a/TR5Main/Scripting/GameFlowScript.cpp +++ b/TR5Main/Scripting/GameFlowScript.cpp @@ -241,12 +241,10 @@ bool GameFlow::DoGameflow() SkyColor1.r = level->Layer1.R; SkyColor1.g = level->Layer1.G; SkyColor1.b = level->Layer1.B; - SkyVelocity1 = level->Layer1.CloudSpeed; SkyColor2.r = level->Layer2.R; SkyColor2.g = level->Layer2.G; SkyColor2.b = level->Layer2.B; - SkyVelocity2 = level->Layer2.CloudSpeed; } if (level->Storm) @@ -269,7 +267,7 @@ bool GameFlow::DoGameflow() else { // Prepare inventory objects table - for (int i = 0; i < level->InventoryObjects.size(); i++) + for (size_t i = 0; i < level->InventoryObjects.size(); i++) { GameScriptInventoryObject* obj = &level->InventoryObjects[i]; if (obj->slot >= 0 && obj->slot < INVENTORY_TABLE_SIZE) diff --git a/TR5Main/Scripting/GameScriptInventoryObject.cpp b/TR5Main/Scripting/GameScriptInventoryObject.cpp index 943262dad..be401cabf 100644 --- a/TR5Main/Scripting/GameScriptInventoryObject.cpp +++ b/TR5Main/Scripting/GameScriptInventoryObject.cpp @@ -29,7 +29,7 @@ associated getters and setters. @tparam ItemAction action is this usable, equippable, or examinable? @return an InventoryObject */ -GameScriptInventoryObject::GameScriptInventoryObject(std::string const& a_name, ItemEnumPair a_slot, float a_yOffset, float a_scale, GameScriptRotation const & a_rot, rotflags a_rotationFlags, int a_meshBits, item_options a_action) : +GameScriptInventoryObject::GameScriptInventoryObject(std::string const& a_name, ItemEnumPair a_slot, short a_yOffset, float a_scale, GameScriptRotation const & a_rot, rotflags a_rotationFlags, int a_meshBits, item_options a_action) : name{ a_name }, slot{ a_slot.m_pair.second }, yOffset{ a_yOffset }, diff --git a/TR5Main/Scripting/GameScriptInventoryObject.h b/TR5Main/Scripting/GameScriptInventoryObject.h index 476e9a39f..bce533eaa 100644 --- a/TR5Main/Scripting/GameScriptInventoryObject.h +++ b/TR5Main/Scripting/GameScriptInventoryObject.h @@ -24,7 +24,7 @@ struct GameScriptInventoryObject { std::string name{}; inv_objects slot{ INV_OBJECT_PISTOLS }; - float yOffset{ 0.0f }; + short yOffset{ 0 }; float scale{ 1.0f }; GameScriptRotation rot{}; rotflags rotationFlags{ rotflags::INV_ROT_X }; @@ -32,7 +32,7 @@ struct GameScriptInventoryObject item_options action{ item_options::OPT_USE }; GameScriptInventoryObject() = default; - GameScriptInventoryObject(std::string const & a_name, ItemEnumPair a_slot, float a_yOffset, float a_scale, GameScriptRotation const & a_rot, rotflags a_rotationFlags, int a_meshBits, item_options a_actions); + GameScriptInventoryObject(std::string const & a_name, ItemEnumPair a_slot, short a_yOffset, float a_scale, GameScriptRotation const & a_rot, rotflags a_rotationFlags, int a_meshBits, item_options a_actions); static void Register(sol::state* lua);