mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 16:57:57 +03:00
add draw (and undraw) flipeffects for cutscenes, fix typo
This commit is contained in:
parent
4c93f7d7b9
commit
04e7cb5bb4
6 changed files with 40 additions and 10 deletions
|
@ -18,6 +18,8 @@
|
|||
#include "tr5_bats_emitter.h"
|
||||
#include "tr5_spider_emitter.h"
|
||||
#include "pickup.h"
|
||||
#include "larafire.h"
|
||||
|
||||
using std::function;
|
||||
constexpr auto ITEM_RADIUS_YMAX = SECTOR(3);
|
||||
int wf = 256;
|
||||
|
@ -42,8 +44,8 @@ function<EffectFunction> effect_routines[59] =
|
|||
ExplosionFX,
|
||||
lara_hands_free,
|
||||
puzzle,
|
||||
void_effect,
|
||||
void_effect,
|
||||
draw_right_pistol,
|
||||
draw_left_pistol,
|
||||
shoot_right_gun,
|
||||
shoot_left_gun,
|
||||
void_effect,
|
||||
|
@ -145,6 +147,34 @@ void SetFog(ITEM_INFO* item)//39A44(<), 39F44(<) (F)
|
|||
FlipEffect = -1;
|
||||
}
|
||||
|
||||
void draw_left_pistol(ITEM_INFO* item)
|
||||
{
|
||||
if (Lara.meshPtrs[LM_LHAND] == Objects[ID_LARA_SKIN].meshIndex + LM_LHAND)
|
||||
{
|
||||
Lara.meshPtrs[LM_LHAND] = Objects[WeaponObjectMesh(WEAPON_PISTOLS)].meshIndex + LM_LHAND;
|
||||
Lara.holsterInfo.leftHolster = HOLSTER_SLOT::Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
|
||||
Lara.holsterInfo.leftHolster = HolsterSlotForWeapon(static_cast<LARA_WEAPON_TYPE>(WEAPON_PISTOLS));
|
||||
}
|
||||
}
|
||||
|
||||
void draw_right_pistol(ITEM_INFO* item)
|
||||
{
|
||||
if (Lara.meshPtrs[LM_RHAND] == Objects[ID_LARA_SKIN].meshIndex + LM_RHAND)
|
||||
{
|
||||
Lara.meshPtrs[LM_RHAND] = Objects[WeaponObjectMesh(WEAPON_PISTOLS)].meshIndex + LM_RHAND;
|
||||
Lara.holsterInfo.rightHolster = HOLSTER_SLOT::Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Lara.meshPtrs[LM_RHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_RHAND;
|
||||
Lara.holsterInfo.rightHolster = HolsterSlotForWeapon(static_cast<LARA_WEAPON_TYPE>(WEAPON_PISTOLS));
|
||||
}
|
||||
}
|
||||
|
||||
void shoot_left_gun(ITEM_INFO* item)//39A34(<), 39F34(<) (F)
|
||||
{
|
||||
Lara.leftArm.flash_gun = 3;
|
||||
|
|
|
@ -54,4 +54,6 @@ void reset_hair(ITEM_INFO* item);
|
|||
void Richochet(PHD_3DPOS* pos);
|
||||
void DoLotsOfBlood(int x, int y, int z, int speed, short direction, short roomNumber, int count);
|
||||
void pickup(ITEM_INFO* item);
|
||||
void puzzle(ITEM_INFO* item);
|
||||
void puzzle(ITEM_INFO* item);
|
||||
void draw_right_pistol(ITEM_INFO* item);
|
||||
void draw_left_pistol(ITEM_INFO* item);
|
|
@ -364,21 +364,19 @@ void undraw_pistol_mesh_left(int weaponType)
|
|||
//LARA_MESHES(ID_LARA, LM_LHAND);
|
||||
Lara.meshPtrs[LM_LHAND] = Objects[ID_LARA_SKIN].meshIndex + LM_LHAND;
|
||||
|
||||
Lara.holsterInfo.leftHoster = HolsterSlotForWeapon(static_cast<LARA_WEAPON_TYPE>(weaponType));
|
||||
Lara.holsterInfo.leftHolster = HolsterSlotForWeapon(static_cast<LARA_WEAPON_TYPE>(weaponType));
|
||||
}
|
||||
}
|
||||
|
||||
void draw_pistol_meshes(int weaponType)
|
||||
{
|
||||
if(static_cast<LARA_WEAPON_TYPE>(weaponType) != LARA_WEAPON_TYPE::WEAPON_REVOLVER){
|
||||
Lara.holsterInfo.leftHoster = HOLSTER_SLOT::Empty;
|
||||
Lara.holsterInfo.leftHolster = HOLSTER_SLOT::Empty;
|
||||
}
|
||||
Lara.holsterInfo.rightHolster = HOLSTER_SLOT::Empty;
|
||||
|
||||
//LARA_MESHES(WeaponObjectMesh(weaponType), LM_RHAND);
|
||||
Lara.meshPtrs[LM_RHAND] = Objects[WeaponObjectMesh(weaponType)].meshIndex + LM_RHAND;
|
||||
if (static_cast<LARA_WEAPON_TYPE>(weaponType) != LARA_WEAPON_TYPE::WEAPON_REVOLVER)
|
||||
//LARA_MESHES(WeaponObjectMesh(weaponType), LM_LHAND);
|
||||
Lara.meshPtrs[LM_LHAND] = Objects[WeaponObjectMesh(weaponType)].meshIndex + LM_LHAND;
|
||||
}
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ enum class HOLSTER_SLOT : int {
|
|||
|
||||
};
|
||||
struct HolsterInfo {
|
||||
HOLSTER_SLOT leftHoster;
|
||||
HOLSTER_SLOT leftHolster;
|
||||
HOLSTER_SLOT rightHolster;
|
||||
HOLSTER_SLOT backHolster;
|
||||
};
|
||||
|
|
|
@ -803,7 +803,7 @@ void InitialiseLara(int restore)
|
|||
Lara.dpoisoned = 0;
|
||||
Lara.poisoned = 0;
|
||||
Lara.waterSurfaceDist = 100;
|
||||
Lara.holsterInfo.leftHoster = HOLSTER_SLOT::Pistols;
|
||||
Lara.holsterInfo.leftHolster = HOLSTER_SLOT::Pistols;
|
||||
Lara.holsterInfo.rightHolster = HOLSTER_SLOT::Pistols;
|
||||
Lara.location = -1;
|
||||
Lara.highestLocation = -1;
|
||||
|
|
|
@ -285,7 +285,7 @@ void Renderer11::drawLaraHolsters(bool transparent)
|
|||
{
|
||||
int firstBucket = (transparent ? 2 : 0);
|
||||
int lastBucket = (transparent ? 4 : 2);
|
||||
HOLSTER_SLOT leftHolsterID = Lara.holsterInfo.leftHoster;
|
||||
HOLSTER_SLOT leftHolsterID = Lara.holsterInfo.leftHolster;
|
||||
HOLSTER_SLOT rightHolsterID = Lara.holsterInfo.rightHolster;
|
||||
HOLSTER_SLOT backHolsterID = Lara.holsterInfo.backHolster;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue