mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-13 14:07:04 +03:00
Remove some instances of Lara global usage in motorbike.cpp; cleanup
This commit is contained in:
parent
4b381fa048
commit
e30eba578f
5 changed files with 1259 additions and 1272 deletions
|
@ -93,7 +93,7 @@ bool HandleLaraVehicle(ItemInfo* item, CollisionInfo* coll)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MOTORBIKE:
|
case ID_MOTORBIKE:
|
||||||
MotorbikeControl();
|
MotorbikeControl(item, coll);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_KAYAK:
|
case ID_KAYAK:
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,8 +2,6 @@
|
||||||
#include "Game/items.h"
|
#include "Game/items.h"
|
||||||
#include "Game/collision/collide_room.h"
|
#include "Game/collision/collide_room.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void InitialiseMotorbike(short itemNumber);
|
void InitialiseMotorbike(short itemNumber);
|
||||||
void MotorbikeCollision(short itemNumber, ItemInfo* laraitem, CollisionInfo* coll);
|
void MotorbikeCollision(short itemNumber, ItemInfo* laraItem, CollisionInfo* coll);
|
||||||
int MotorbikeControl(void);
|
bool MotorbikeControl(ItemInfo* laraItem, CollisionInfo* coll);
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
struct MotorbikeInfo {
|
|
||||||
short wheelRight; // (two wheel: front and back)
|
struct MotorbikeInfo
|
||||||
short wheelLeft; // (one wheel: left)
|
{
|
||||||
int velocity;
|
short TurnRate;
|
||||||
int revs;
|
short MomentumAngle;
|
||||||
int engineRevs;
|
short ExtraRotation;
|
||||||
short momentumAngle;
|
short WallShiftRotation;
|
||||||
short extraRotation;
|
|
||||||
short wallShiftRotation;
|
int Velocity;
|
||||||
int bikeTurn;
|
|
||||||
int pitch;
|
int Revs;
|
||||||
short flags;
|
int EngineRevs;
|
||||||
short lightPower;
|
int Pitch;
|
||||||
|
|
||||||
|
short RightWheelsRotation;
|
||||||
|
short LeftWheelRotation;
|
||||||
|
|
||||||
|
short LightPower;
|
||||||
|
short Flags;
|
||||||
};
|
};
|
|
@ -238,10 +238,10 @@ namespace TEN::Renderer
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
case 4:
|
case 4:
|
||||||
currentBone->ExtraRotation.x = TO_RAD(bike.wheelRight);
|
currentBone->ExtraRotation.x = TO_RAD(bike.RightWheelsRotation);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
currentBone->ExtraRotation.x = TO_RAD(bike.wheelLeft);
|
currentBone->ExtraRotation.x = TO_RAD(bike.LeftWheelRotation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue