mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 08:47:58 +03:00
Fixed some GameFlowScript.cpp warnings:
Remove SkyVelocity1 and SkyVelocity2 - they weren't being used. Change a loop var to a size_t. Make GameScriptInventoryObject.yOffset a short.
This commit is contained in:
parent
2039df5a27
commit
10419d15a8
5 changed files with 4 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue