mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-02 14:47:58 +03:00
improve naming consistency
This commit is contained in:
parent
899b1f91c0
commit
c724d7d37e
21 changed files with 239 additions and 232 deletions
|
@ -16,9 +16,9 @@ typedef enum {
|
||||||
BAT_ATTACK = 3,
|
BAT_ATTACK = 3,
|
||||||
BAT_FALL = 4,
|
BAT_FALL = 4,
|
||||||
BAT_DEATH = 5,
|
BAT_DEATH = 5,
|
||||||
} BAT_ANIMS;
|
} BAT_ANIM;
|
||||||
|
|
||||||
BITE_INFO BatBite = { 0, 16, 45, 4 };
|
static BITE_INFO BatBite = { 0, 16, 45, 4 };
|
||||||
|
|
||||||
void BatControl(int16_t item_num)
|
void BatControl(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,9 +33,9 @@ typedef enum {
|
||||||
BEAR_ATTACK2 = 7,
|
BEAR_ATTACK2 = 7,
|
||||||
BEAR_EAT = 8,
|
BEAR_EAT = 8,
|
||||||
BEAR_DEATH = 9,
|
BEAR_DEATH = 9,
|
||||||
} BEAR_ANIMS;
|
} BEAR_ANIM;
|
||||||
|
|
||||||
BITE_INFO BearHeadBite = { 0, 96, 335, 14 };
|
static BITE_INFO BearHeadBite = { 0, 96, 335, 14 };
|
||||||
|
|
||||||
void BearControl(int16_t item_num)
|
void BearControl(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,16 +31,16 @@ typedef enum {
|
||||||
CROC_ATTACK1 = 5,
|
CROC_ATTACK1 = 5,
|
||||||
CROC_ATTACK2 = 6,
|
CROC_ATTACK2 = 6,
|
||||||
CROC_DEATH = 7,
|
CROC_DEATH = 7,
|
||||||
} CROC_ANIMS;
|
} CROC_ANIM;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GATOR_EMPTY = 0,
|
GATOR_EMPTY = 0,
|
||||||
GATOR_SWIM = 1,
|
GATOR_SWIM = 1,
|
||||||
GATOR_ATTACK = 2,
|
GATOR_ATTACK = 2,
|
||||||
GATOR_DEATH = 3,
|
GATOR_DEATH = 3,
|
||||||
} GATOR_ANIMS;
|
} GATOR_ANIM;
|
||||||
|
|
||||||
BITE_INFO CrocBite = { 5, -21, 467, 9 };
|
static BITE_INFO CrocBite = { 5, -21, 467, 9 };
|
||||||
|
|
||||||
void AlligatorControl(int16_t item_num)
|
void AlligatorControl(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@ typedef enum {
|
||||||
RAPTOR_WARNING = 6,
|
RAPTOR_WARNING = 6,
|
||||||
RAPTOR_ATTACK2 = 7,
|
RAPTOR_ATTACK2 = 7,
|
||||||
RAPTOR_ATTACK3 = 8,
|
RAPTOR_ATTACK3 = 8,
|
||||||
} RAPTOR_ANIMS;
|
} RAPTOR_ANIM;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DINO_EMPTY = 0,
|
DINO_EMPTY = 0,
|
||||||
|
@ -54,9 +54,9 @@ typedef enum {
|
||||||
DINO_ROAR = 6,
|
DINO_ROAR = 6,
|
||||||
DINO_ATTACK2 = 7,
|
DINO_ATTACK2 = 7,
|
||||||
DINO_KILL = 8,
|
DINO_KILL = 8,
|
||||||
} DINO_ANIMS;
|
} DINO_ANIM;
|
||||||
|
|
||||||
BITE_INFO RaptorBite = { 0, 66, 318, 22 };
|
static BITE_INFO RaptorBite = { 0, 66, 318, 22 };
|
||||||
|
|
||||||
void RaptorControl(int16_t item_num)
|
void RaptorControl(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#define FLIPFLAG 0x40
|
#define FLIPFLAG 0x40
|
||||||
#define UNFLIPFLAG 0x80
|
#define UNFLIPFLAG 0x80
|
||||||
|
|
||||||
void (*effect_routines[])(ITEM_INFO* item) = {
|
void (*EffectRoutines[])(ITEM_INFO* item) = {
|
||||||
FxTurn180, FxDinoStomp, FxLaraNormal, FxLaraBubbles, FxFinishLevel,
|
FxTurn180, FxDinoStomp, FxLaraNormal, FxLaraBubbles, FxFinishLevel,
|
||||||
FxEarthQuake, FxFlood, FxRaisingBlock, FxStairs2Slope, FxSand,
|
FxEarthQuake, FxFlood, FxRaisingBlock, FxStairs2Slope, FxSand,
|
||||||
FxPowerUp, FxExplosion, FxLaraHandsFree, FxFlipMap, FxDrawRightGun,
|
FxPowerUp, FxExplosion, FxLaraHandsFree, FxFlipMap, FxDrawRightGun,
|
||||||
|
@ -58,7 +58,7 @@ void SoundEffects()
|
||||||
// NOTE: why are we firing this here?
|
// NOTE: why are we firing this here?
|
||||||
// Some of the FX routines rely on the item to be not null!
|
// Some of the FX routines rely on the item to be not null!
|
||||||
if (FlipEffect != -1) {
|
if (FlipEffect != -1) {
|
||||||
effect_routines[FlipEffect](NULL);
|
EffectRoutines[FlipEffect](NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mn_update_sound_effects();
|
mn_update_sound_effects();
|
||||||
|
|
|
@ -43,6 +43,8 @@ void FxLaraHandsFree(ITEM_INFO* item);
|
||||||
void FxFlipMap(ITEM_INFO* item);
|
void FxFlipMap(ITEM_INFO* item);
|
||||||
void FxDrawRightGun(ITEM_INFO* item);
|
void FxDrawRightGun(ITEM_INFO* item);
|
||||||
|
|
||||||
|
extern void (*EffectRoutines[])(ITEM_INFO* item);
|
||||||
|
|
||||||
void T1MInjectGameEffects();
|
void T1MInjectGameEffects();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
142
src/game/hair.c
142
src/game/hair.c
|
@ -15,28 +15,28 @@
|
||||||
#define HAIR_OFFSET_Y (20) // up-down
|
#define HAIR_OFFSET_Y (20) // up-down
|
||||||
#define HAIR_OFFSET_Z (-45) // front-back
|
#define HAIR_OFFSET_Z (-45) // front-back
|
||||||
|
|
||||||
static int first_hair;
|
static int FirstHair;
|
||||||
static PHD_3DPOS hair[HAIR_SEGMENTS + 1];
|
static PHD_3DPOS Hair[HAIR_SEGMENTS + 1];
|
||||||
static PHD_VECTOR hvel[HAIR_SEGMENTS + 1];
|
static PHD_VECTOR HVel[HAIR_SEGMENTS + 1];
|
||||||
|
|
||||||
void InitialiseHair()
|
void InitialiseHair()
|
||||||
{
|
{
|
||||||
first_hair = 1;
|
FirstHair = 1;
|
||||||
|
|
||||||
int32_t* bone = &AnimBones[Objects[O_HAIR].bone_index];
|
int32_t* bone = &AnimBones[Objects[O_HAIR].bone_index];
|
||||||
|
|
||||||
hair[0].y_rot = 0;
|
Hair[0].y_rot = 0;
|
||||||
hair[0].x_rot = -PHD_90;
|
Hair[0].x_rot = -PHD_90;
|
||||||
|
|
||||||
for (int i = 1; i < HAIR_SEGMENTS + 1; i++, bone += 4) {
|
for (int i = 1; i < HAIR_SEGMENTS + 1; i++, bone += 4) {
|
||||||
hair[i].x = *(bone + 1);
|
Hair[i].x = *(bone + 1);
|
||||||
hair[i].y = *(bone + 2);
|
Hair[i].y = *(bone + 2);
|
||||||
hair[i].z = *(bone + 3);
|
Hair[i].z = *(bone + 3);
|
||||||
hair[i].x_rot = -PHD_90;
|
Hair[i].x_rot = -PHD_90;
|
||||||
hair[i].y_rot = hair[i].z_rot = 0;
|
Hair[i].y_rot = Hair[i].z_rot = 0;
|
||||||
hvel[i].x = 0;
|
HVel[i].x = 0;
|
||||||
hvel[i].y = 0;
|
HVel[i].y = 0;
|
||||||
hvel[i].z = 0;
|
HVel[i].z = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,31 +167,31 @@ void HairControl(int in_cutscene)
|
||||||
|
|
||||||
bone = &AnimBones[Objects[O_HAIR].bone_index];
|
bone = &AnimBones[Objects[O_HAIR].bone_index];
|
||||||
|
|
||||||
if (first_hair) {
|
if (FirstHair) {
|
||||||
first_hair = 0;
|
FirstHair = 0;
|
||||||
|
|
||||||
hair[0].x = pos.x;
|
Hair[0].x = pos.x;
|
||||||
hair[0].y = pos.y;
|
Hair[0].y = pos.y;
|
||||||
hair[0].z = pos.z;
|
Hair[0].z = pos.z;
|
||||||
|
|
||||||
for (i = 0; i < HAIR_SEGMENTS; i++, bone += 4) {
|
for (i = 0; i < HAIR_SEGMENTS; i++, bone += 4) {
|
||||||
phd_PushUnitMatrix();
|
phd_PushUnitMatrix();
|
||||||
PhdMatrixPtr->_03 = hair[i].x << W2V_SHIFT;
|
PhdMatrixPtr->_03 = Hair[i].x << W2V_SHIFT;
|
||||||
PhdMatrixPtr->_13 = hair[i].y << W2V_SHIFT;
|
PhdMatrixPtr->_13 = Hair[i].y << W2V_SHIFT;
|
||||||
PhdMatrixPtr->_23 = hair[i].z << W2V_SHIFT;
|
PhdMatrixPtr->_23 = Hair[i].z << W2V_SHIFT;
|
||||||
phd_RotYXZ(hair[i].y_rot, hair[i].x_rot, 0);
|
phd_RotYXZ(Hair[i].y_rot, Hair[i].x_rot, 0);
|
||||||
phd_TranslateRel(*(bone + 1), *(bone + 2), *(bone + 3));
|
phd_TranslateRel(*(bone + 1), *(bone + 2), *(bone + 3));
|
||||||
|
|
||||||
hair[i + 1].x = PhdMatrixPtr->_03 >> W2V_SHIFT;
|
Hair[i + 1].x = PhdMatrixPtr->_03 >> W2V_SHIFT;
|
||||||
hair[i + 1].y = PhdMatrixPtr->_13 >> W2V_SHIFT;
|
Hair[i + 1].y = PhdMatrixPtr->_13 >> W2V_SHIFT;
|
||||||
hair[i + 1].z = PhdMatrixPtr->_23 >> W2V_SHIFT;
|
Hair[i + 1].z = PhdMatrixPtr->_23 >> W2V_SHIFT;
|
||||||
|
|
||||||
phd_PopMatrix();
|
phd_PopMatrix();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hair[0].x = pos.x;
|
Hair[0].x = pos.x;
|
||||||
hair[0].y = pos.y;
|
Hair[0].y = pos.y;
|
||||||
hair[0].z = pos.z;
|
Hair[0].z = pos.z;
|
||||||
|
|
||||||
room_number = LaraItem->room_number;
|
room_number = LaraItem->room_number;
|
||||||
|
|
||||||
|
@ -208,45 +208,45 @@ void HairControl(int in_cutscene)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < HAIR_SEGMENTS + 1; i++, bone += 4) {
|
for (i = 1; i < HAIR_SEGMENTS + 1; i++, bone += 4) {
|
||||||
hvel[0].x = hair[i].x;
|
HVel[0].x = Hair[i].x;
|
||||||
hvel[0].y = hair[i].y;
|
HVel[0].y = Hair[i].y;
|
||||||
hvel[0].z = hair[i].z;
|
HVel[0].z = Hair[i].z;
|
||||||
|
|
||||||
if (!in_cutscene) {
|
if (!in_cutscene) {
|
||||||
floor = GetFloor(hair[i].x, hair[i].y, hair[i].z, &room_number);
|
floor = GetFloor(Hair[i].x, Hair[i].y, Hair[i].z, &room_number);
|
||||||
height = GetHeight(floor, hair[i].x, hair[i].y, hair[i].z);
|
height = GetHeight(floor, Hair[i].x, Hair[i].y, Hair[i].z);
|
||||||
} else
|
} else
|
||||||
height = 32767;
|
height = 32767;
|
||||||
|
|
||||||
hair[i].x += hvel[i].x * 3 / 4;
|
Hair[i].x += HVel[i].x * 3 / 4;
|
||||||
hair[i].y += hvel[i].y * 3 / 4;
|
Hair[i].y += HVel[i].y * 3 / 4;
|
||||||
hair[i].z += hvel[i].z * 3 / 4;
|
Hair[i].z += HVel[i].z * 3 / 4;
|
||||||
|
|
||||||
switch (Lara.water_status) {
|
switch (Lara.water_status) {
|
||||||
case LWS_ABOVEWATER:
|
case LWS_ABOVEWATER:
|
||||||
hair[i].y += 10;
|
Hair[i].y += 10;
|
||||||
if (water_level != NO_HEIGHT && hair[i].y > water_level)
|
if (water_level != NO_HEIGHT && Hair[i].y > water_level)
|
||||||
hair[i].y = water_level;
|
Hair[i].y = water_level;
|
||||||
else if (hair[i].y > height) {
|
else if (Hair[i].y > height) {
|
||||||
hair[i].x = hvel[0].x;
|
Hair[i].x = HVel[0].x;
|
||||||
hair[i].z = hvel[0].z;
|
Hair[i].z = HVel[0].z;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LWS_UNDERWATER:
|
case LWS_UNDERWATER:
|
||||||
case LWS_SURFACE:
|
case LWS_SURFACE:
|
||||||
if (hair[i].y < water_level) {
|
if (Hair[i].y < water_level) {
|
||||||
hair[i].y = water_level;
|
Hair[i].y = water_level;
|
||||||
} else if (hair[i].y > height) {
|
} else if (Hair[i].y > height) {
|
||||||
hair[i].y = height;
|
Hair[i].y = height;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < 5; j++) {
|
for (j = 0; j < 5; j++) {
|
||||||
x = hair[i].x - sphere[j].x;
|
x = Hair[i].x - sphere[j].x;
|
||||||
y = hair[i].y - sphere[j].y;
|
y = Hair[i].y - sphere[j].y;
|
||||||
z = hair[i].z - sphere[j].z;
|
z = Hair[i].z - sphere[j].z;
|
||||||
|
|
||||||
distance = x * x + y * y + z * z;
|
distance = x * x + y * y + z * z;
|
||||||
|
|
||||||
|
@ -256,24 +256,24 @@ void HairControl(int in_cutscene)
|
||||||
if (distance == 0)
|
if (distance == 0)
|
||||||
distance = 1;
|
distance = 1;
|
||||||
|
|
||||||
hair[i].x = sphere[j].x + x * sphere[j].r / distance;
|
Hair[i].x = sphere[j].x + x * sphere[j].r / distance;
|
||||||
hair[i].y = sphere[j].y + y * sphere[j].r / distance;
|
Hair[i].y = sphere[j].y + y * sphere[j].r / distance;
|
||||||
hair[i].z = sphere[j].z + z * sphere[j].r / distance;
|
Hair[i].z = sphere[j].z + z * sphere[j].r / distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
distance = phd_sqrt(
|
distance = phd_sqrt(
|
||||||
SQUARE(hair[i].z - hair[i - 1].z)
|
SQUARE(Hair[i].z - Hair[i - 1].z)
|
||||||
+ SQUARE(hair[i].x - hair[i - 1].x));
|
+ SQUARE(Hair[i].x - Hair[i - 1].x));
|
||||||
hair[i - 1].y_rot =
|
Hair[i - 1].y_rot =
|
||||||
phd_atan(hair[i].z - hair[i - 1].z, hair[i].x - hair[i - 1].x);
|
phd_atan(Hair[i].z - Hair[i - 1].z, Hair[i].x - Hair[i - 1].x);
|
||||||
hair[i - 1].x_rot = -phd_atan(distance, hair[i].y - hair[i - 1].y);
|
Hair[i - 1].x_rot = -phd_atan(distance, Hair[i].y - Hair[i - 1].y);
|
||||||
|
|
||||||
phd_PushUnitMatrix();
|
phd_PushUnitMatrix();
|
||||||
PhdMatrixPtr->_03 = hair[i - 1].x << W2V_SHIFT;
|
PhdMatrixPtr->_03 = Hair[i - 1].x << W2V_SHIFT;
|
||||||
PhdMatrixPtr->_13 = hair[i - 1].y << W2V_SHIFT;
|
PhdMatrixPtr->_13 = Hair[i - 1].y << W2V_SHIFT;
|
||||||
PhdMatrixPtr->_23 = hair[i - 1].z << W2V_SHIFT;
|
PhdMatrixPtr->_23 = Hair[i - 1].z << W2V_SHIFT;
|
||||||
phd_RotYXZ(hair[i - 1].y_rot, hair[i - 1].x_rot, 0);
|
phd_RotYXZ(Hair[i - 1].y_rot, Hair[i - 1].x_rot, 0);
|
||||||
|
|
||||||
if (i == HAIR_SEGMENTS) {
|
if (i == HAIR_SEGMENTS) {
|
||||||
phd_TranslateRel(*(bone - 3), *(bone - 2), *(bone - 1));
|
phd_TranslateRel(*(bone - 3), *(bone - 2), *(bone - 1));
|
||||||
|
@ -281,13 +281,13 @@ void HairControl(int in_cutscene)
|
||||||
phd_TranslateRel(*(bone + 1), *(bone + 2), *(bone + 3));
|
phd_TranslateRel(*(bone + 1), *(bone + 2), *(bone + 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
hair[i].x = PhdMatrixPtr->_03 >> W2V_SHIFT;
|
Hair[i].x = PhdMatrixPtr->_03 >> W2V_SHIFT;
|
||||||
hair[i].y = PhdMatrixPtr->_13 >> W2V_SHIFT;
|
Hair[i].y = PhdMatrixPtr->_13 >> W2V_SHIFT;
|
||||||
hair[i].z = PhdMatrixPtr->_23 >> W2V_SHIFT;
|
Hair[i].z = PhdMatrixPtr->_23 >> W2V_SHIFT;
|
||||||
|
|
||||||
hvel[i].x = hair[i].x - hvel[0].x;
|
HVel[i].x = Hair[i].x - HVel[0].x;
|
||||||
hvel[i].y = hair[i].y - hvel[0].y;
|
HVel[i].y = Hair[i].y - HVel[0].y;
|
||||||
hvel[i].z = hair[i].z - hvel[0].z;
|
HVel[i].z = Hair[i].z - HVel[0].z;
|
||||||
|
|
||||||
phd_PopMatrix();
|
phd_PopMatrix();
|
||||||
}
|
}
|
||||||
|
@ -306,9 +306,9 @@ void DrawHair()
|
||||||
for (int i = 0; i < HAIR_SEGMENTS; i++) {
|
for (int i = 0; i < HAIR_SEGMENTS; i++) {
|
||||||
phd_PushMatrix();
|
phd_PushMatrix();
|
||||||
|
|
||||||
phd_TranslateAbs(hair[i].x, hair[i].y, hair[i].z);
|
phd_TranslateAbs(Hair[i].x, Hair[i].y, Hair[i].z);
|
||||||
phd_RotY(hair[i].y_rot);
|
phd_RotY(Hair[i].y_rot);
|
||||||
phd_RotX(hair[i].x_rot);
|
phd_RotX(Hair[i].x_rot);
|
||||||
phd_PutPolygons(*mesh++, 1);
|
phd_PutPolygons(*mesh++, 1);
|
||||||
|
|
||||||
phd_PopMatrix();
|
phd_PopMatrix();
|
||||||
|
|
|
@ -24,7 +24,7 @@ typedef enum {
|
||||||
PBACK = 16,
|
PBACK = 16,
|
||||||
PINBACK = 32,
|
PINBACK = 32,
|
||||||
PPAGE1 = 64
|
PPAGE1 = 64
|
||||||
} PASS_PAGES;
|
} PASS_PAGE;
|
||||||
|
|
||||||
static int OldInputDB = 0;
|
static int OldInputDB = 0;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
memset(&imo, 0, sizeof(IMOTION_INFO));
|
memset(&imo, 0, sizeof(IMOTION_INFO));
|
||||||
memset(&ring, 0, sizeof(RING_INFO));
|
memset(&ring, 0, sizeof(RING_INFO));
|
||||||
|
|
||||||
if (inv_mode == RM_KEYS && !InvKeysObjects) {
|
if (inv_mode == RT_KEYS && !InvKeysObjects) {
|
||||||
InventoryChosen = -1;
|
InventoryChosen = -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -75,29 +75,29 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
case INV_LOAD_MODE:
|
case INV_LOAD_MODE:
|
||||||
case INV_TITLE_MODE:
|
case INV_TITLE_MODE:
|
||||||
Inv_RingInit(
|
Inv_RingInit(
|
||||||
&ring, RM_OPTION, InvOptionList, InvOptionObjects, InvOptionCurrent,
|
&ring, RT_OPTION, InvOptionList, InvOptionObjects, InvOptionCurrent,
|
||||||
&imo);
|
&imo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INV_KEYS_MODE:
|
case INV_KEYS_MODE:
|
||||||
Inv_RingInit(
|
Inv_RingInit(
|
||||||
&ring, RM_KEYS, InvKeysList, InvKeysObjects, InvMainCurrent, &imo);
|
&ring, RT_KEYS, InvKeysList, InvKeysObjects, InvMainCurrent, &imo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (InvMainObjects) {
|
if (InvMainObjects) {
|
||||||
Inv_RingInit(
|
Inv_RingInit(
|
||||||
&ring, RM_MAIN, InvMainList, InvMainObjects, InvMainCurrent,
|
&ring, RT_MAIN, InvMainList, InvMainObjects, InvMainCurrent,
|
||||||
&imo);
|
&imo);
|
||||||
} else {
|
} else {
|
||||||
Inv_RingInit(
|
Inv_RingInit(
|
||||||
&ring, RM_OPTION, InvOptionList, InvOptionObjects,
|
&ring, RT_OPTION, InvOptionList, InvOptionObjects,
|
||||||
InvOptionCurrent, &imo);
|
InvOptionCurrent, &imo);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundEffect(111, 0, RM_KEYS);
|
SoundEffect(111, 0, RT_KEYS);
|
||||||
|
|
||||||
InvNFrames = 2;
|
InvNFrames = 2;
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
SoundEffect(112, 0, SFX_ALWAYS);
|
SoundEffect(112, 0, SFX_ALWAYS);
|
||||||
InventoryChosen = -1;
|
InventoryChosen = -1;
|
||||||
|
|
||||||
if (ring.type == RM_MAIN) {
|
if (ring.type == RT_MAIN) {
|
||||||
InvMainCurrent = ring.current_object;
|
InvMainCurrent = ring.current_object;
|
||||||
} else {
|
} else {
|
||||||
InvOptionCurrent = ring.current_object;
|
InvOptionCurrent = ring.current_object;
|
||||||
|
@ -301,10 +301,10 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
Item_Data = 0;
|
Item_Data = 0;
|
||||||
|
|
||||||
INVENTORY_ITEM* inv_item;
|
INVENTORY_ITEM* inv_item;
|
||||||
if (ring.type == RM_MAIN) {
|
if (ring.type == RT_MAIN) {
|
||||||
InvMainCurrent = ring.current_object;
|
InvMainCurrent = ring.current_object;
|
||||||
inv_item = InvMainList[ring.current_object];
|
inv_item = InvMainList[ring.current_object];
|
||||||
} else if (ring.type == RM_OPTION) {
|
} else if (ring.type == RT_OPTION) {
|
||||||
InvOptionCurrent = ring.current_object;
|
InvOptionCurrent = ring.current_object;
|
||||||
inv_item = InvOptionList[ring.current_object];
|
inv_item = InvOptionList[ring.current_object];
|
||||||
} else {
|
} else {
|
||||||
|
@ -351,7 +351,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
|
|
||||||
if (CHK_ANY(InputDB, IN_FORWARD) && InventoryMode != INV_TITLE_MODE
|
if (CHK_ANY(InputDB, IN_FORWARD) && InventoryMode != INV_TITLE_MODE
|
||||||
&& InventoryMode != INV_KEYS_MODE) {
|
&& InventoryMode != INV_KEYS_MODE) {
|
||||||
if (ring.type == RM_MAIN) {
|
if (ring.type == RT_MAIN) {
|
||||||
if (InvKeysObjects) {
|
if (InvKeysObjects) {
|
||||||
Inv_RingMotionSetup(
|
Inv_RingMotionSetup(
|
||||||
&ring, RNG_CLOSING, RNG_MAIN2KEYS,
|
&ring, RNG_CLOSING, RNG_MAIN2KEYS,
|
||||||
|
@ -365,7 +365,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
}
|
}
|
||||||
Input = 0;
|
Input = 0;
|
||||||
InputDB = 0;
|
InputDB = 0;
|
||||||
} else if (ring.type == RM_OPTION) {
|
} else if (ring.type == RT_OPTION) {
|
||||||
if (InvMainObjects) {
|
if (InvMainObjects) {
|
||||||
Inv_RingMotionSetup(
|
Inv_RingMotionSetup(
|
||||||
&ring, RNG_CLOSING, RNG_OPTION2MAIN,
|
&ring, RNG_CLOSING, RNG_OPTION2MAIN,
|
||||||
|
@ -382,7 +382,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
} else if (
|
} else if (
|
||||||
CHK_ANY(InputDB, IN_BACK) && InventoryMode != INV_TITLE_MODE
|
CHK_ANY(InputDB, IN_BACK) && InventoryMode != INV_TITLE_MODE
|
||||||
&& InventoryMode != INV_KEYS_MODE) {
|
&& InventoryMode != INV_KEYS_MODE) {
|
||||||
if (ring.type == RM_KEYS) {
|
if (ring.type == RT_KEYS) {
|
||||||
if (InvMainObjects) {
|
if (InvMainObjects) {
|
||||||
Inv_RingMotionSetup(
|
Inv_RingMotionSetup(
|
||||||
&ring, RNG_CLOSING, RNG_KEYS2MAIN,
|
&ring, RNG_CLOSING, RNG_KEYS2MAIN,
|
||||||
|
@ -396,7 +396,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
}
|
}
|
||||||
Input = 0;
|
Input = 0;
|
||||||
InputDB = 0;
|
InputDB = 0;
|
||||||
} else if (ring.type == RM_MAIN) {
|
} else if (ring.type == RT_MAIN) {
|
||||||
if (InvOptionObjects) {
|
if (InvOptionObjects) {
|
||||||
Inv_RingMotionSetup(
|
Inv_RingMotionSetup(
|
||||||
&ring, RNG_CLOSING, RNG_MAIN2OPTION,
|
&ring, RNG_CLOSING, RNG_MAIN2OPTION,
|
||||||
|
@ -422,7 +422,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
imo.camera_pitch_target = 0;
|
imo.camera_pitch_target = 0;
|
||||||
InvMainCurrent = ring.current_object;
|
InvMainCurrent = ring.current_object;
|
||||||
ring.list = InvOptionList;
|
ring.list = InvOptionList;
|
||||||
ring.type = RM_OPTION;
|
ring.type = RT_OPTION;
|
||||||
ring.number_of_objects = InvOptionObjects;
|
ring.number_of_objects = InvOptionObjects;
|
||||||
ring.current_object = InvOptionCurrent;
|
ring.current_object = InvOptionCurrent;
|
||||||
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
||||||
|
@ -442,7 +442,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
InvMainCurrent = ring.current_object;
|
InvMainCurrent = ring.current_object;
|
||||||
InvMainObjects = ring.number_of_objects;
|
InvMainObjects = ring.number_of_objects;
|
||||||
ring.list = InvKeysList;
|
ring.list = InvKeysList;
|
||||||
ring.type = RM_KEYS;
|
ring.type = RT_KEYS;
|
||||||
ring.number_of_objects = InvKeysObjects;
|
ring.number_of_objects = InvKeysObjects;
|
||||||
ring.current_object = InvKeysCurrent;
|
ring.current_object = InvKeysCurrent;
|
||||||
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
||||||
|
@ -461,7 +461,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
imo.camera_pitch_target = 0;
|
imo.camera_pitch_target = 0;
|
||||||
InvKeysCurrent = ring.current_object;
|
InvKeysCurrent = ring.current_object;
|
||||||
ring.list = InvMainList;
|
ring.list = InvMainList;
|
||||||
ring.type = RM_MAIN;
|
ring.type = RT_MAIN;
|
||||||
ring.number_of_objects = InvMainObjects;
|
ring.number_of_objects = InvMainObjects;
|
||||||
ring.current_object = InvMainCurrent;
|
ring.current_object = InvMainCurrent;
|
||||||
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
||||||
|
@ -481,7 +481,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
InvOptionObjects = ring.number_of_objects;
|
InvOptionObjects = ring.number_of_objects;
|
||||||
InvOptionCurrent = ring.current_object;
|
InvOptionCurrent = ring.current_object;
|
||||||
ring.list = InvMainList;
|
ring.list = InvMainList;
|
||||||
ring.type = RM_MAIN;
|
ring.type = RT_MAIN;
|
||||||
ring.number_of_objects = InvMainObjects;
|
ring.number_of_objects = InvMainObjects;
|
||||||
ring.current_object = InvMainCurrent;
|
ring.current_object = InvMainCurrent;
|
||||||
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
Inv_RingCalcAdders(&ring, ROTATE_DURATION);
|
||||||
|
@ -527,7 +527,7 @@ int32_t Display_Inventory(int inv_mode)
|
||||||
if (CHK_ANY(InputDB, IN_SELECT)) {
|
if (CHK_ANY(InputDB, IN_SELECT)) {
|
||||||
inv_item->sprlist = NULL;
|
inv_item->sprlist = NULL;
|
||||||
InventoryChosen = inv_item->object_number;
|
InventoryChosen = inv_item->object_number;
|
||||||
if (ring.type == RM_MAIN) {
|
if (ring.type == RT_MAIN) {
|
||||||
InvMainCurrent = ring.current_object;
|
InvMainCurrent = ring.current_object;
|
||||||
} else {
|
} else {
|
||||||
InvOptionCurrent = ring.current_object;
|
InvOptionCurrent = ring.current_object;
|
||||||
|
|
|
@ -30,11 +30,11 @@ void RingIsOpen(RING_INFO* ring)
|
||||||
|
|
||||||
if (!InvRingText) {
|
if (!InvRingText) {
|
||||||
switch (ring->type) {
|
switch (ring->type) {
|
||||||
case RM_MAIN:
|
case RT_MAIN:
|
||||||
InvRingText = T_Print(0, 26, 0, "INVENTORY");
|
InvRingText = T_Print(0, 26, 0, "INVENTORY");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RM_OPTION:
|
case RT_OPTION:
|
||||||
if (InventoryMode == INV_DEATH_MODE) {
|
if (InventoryMode == INV_DEATH_MODE) {
|
||||||
InvRingText = T_Print(0, 26, 0, "GAME OVER");
|
InvRingText = T_Print(0, 26, 0, "GAME OVER");
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,7 +42,7 @@ void RingIsOpen(RING_INFO* ring)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RM_KEYS:
|
case RT_KEYS:
|
||||||
InvRingText = T_Print(0, 26, 0, "ITEMS");
|
InvRingText = T_Print(0, 26, 0, "ITEMS");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@ void RingIsOpen(RING_INFO* ring)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InvUpArrow1) {
|
if (!InvUpArrow1) {
|
||||||
if (ring->type == RM_OPTION
|
if (ring->type == RT_OPTION
|
||||||
|| (ring->type == RM_MAIN && InvKeysObjects)) {
|
|| (ring->type == RT_MAIN && InvKeysObjects)) {
|
||||||
InvUpArrow1 = T_Print(20, 28, 0, "[");
|
InvUpArrow1 = T_Print(20, 28, 0, "[");
|
||||||
InvUpArrow2 = T_Print(-20, 28, 0, "[");
|
InvUpArrow2 = T_Print(-20, 28, 0, "[");
|
||||||
T_RightAlign(InvUpArrow2, 1);
|
T_RightAlign(InvUpArrow2, 1);
|
||||||
|
@ -64,7 +64,7 @@ void RingIsOpen(RING_INFO* ring)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InvDownArrow1) {
|
if (!InvDownArrow1) {
|
||||||
if (ring->type == RM_MAIN || ring->type == RM_KEYS) {
|
if (ring->type == RT_MAIN || ring->type == RT_KEYS) {
|
||||||
InvDownArrow1 = T_Print(20, -15, 0, "]");
|
InvDownArrow1 = T_Print(20, -15, 0, "]");
|
||||||
InvDownArrow2 = T_Print(-20, -15, 0, "]");
|
InvDownArrow2 = T_Print(-20, -15, 0, "]");
|
||||||
T_BottomAlign(InvDownArrow1, 1);
|
T_BottomAlign(InvDownArrow1, 1);
|
||||||
|
|
|
@ -167,21 +167,21 @@ int32_t FireWeapon(
|
||||||
int32_t weapon_type, ITEM_INFO* target, ITEM_INFO* src, PHD_ANGLE* angles);
|
int32_t weapon_type, ITEM_INFO* target, ITEM_INFO* src, PHD_ANGLE* angles);
|
||||||
void HitTarget(ITEM_INFO* item, GAME_VECTOR* hitpos, int32_t damage);
|
void HitTarget(ITEM_INFO* item, GAME_VECTOR* hitpos, int32_t damage);
|
||||||
|
|
||||||
void draw_shotgun();
|
void DrawShotgun();
|
||||||
void undraw_shotgun();
|
void UndrawShotgun();
|
||||||
void draw_shotgun_meshes();
|
void DrawShotgunMeshes();
|
||||||
void undraw_shotgun_meshes();
|
void UndrawShotgunMeshes();
|
||||||
void ready_shotgun();
|
void ReadyShotgun();
|
||||||
void RifleHandler(int32_t weapon_type);
|
void RifleHandler(int32_t weapon_type);
|
||||||
void AnimateShotgun();
|
void AnimateShotgun();
|
||||||
void FireShotgun();
|
void FireShotgun();
|
||||||
|
|
||||||
void draw_pistols(int32_t weapon_type);
|
void DrawPistols(int32_t weapon_type);
|
||||||
void undraw_pistols(int32_t weapon_type);
|
void UndrawPistols(int32_t weapon_type);
|
||||||
void ready_pistols();
|
void ReadyPistols();
|
||||||
void draw_pistol_meshes(int32_t weapon_type);
|
void DrawPistolMeshes(int32_t weapon_type);
|
||||||
void undraw_pistol_mesh_left(int32_t weapon_type);
|
void UndrawPistolMeshLeft(int32_t weapon_type);
|
||||||
void undraw_pistol_mesh_right(int32_t weapon_type);
|
void UndrawPistolMeshRight(int32_t weapon_type);
|
||||||
void PistolHandler(int32_t weapon_type);
|
void PistolHandler(int32_t weapon_type);
|
||||||
void AnimatePistols(int32_t weapon_type);
|
void AnimatePistols(int32_t weapon_type);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
#include "specific/input.h"
|
#include "specific/input.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
void draw_shotgun()
|
// original name: draw_shotgun
|
||||||
|
void DrawShotgun()
|
||||||
{
|
{
|
||||||
int16_t ani = Lara.left_arm.frame_number;
|
int16_t ani = Lara.left_arm.frame_number;
|
||||||
ani++;
|
ani++;
|
||||||
|
@ -13,17 +14,18 @@ void draw_shotgun()
|
||||||
if (ani < AF_SG_DRAW || ani > AF_SG_RECOIL) {
|
if (ani < AF_SG_DRAW || ani > AF_SG_RECOIL) {
|
||||||
ani = AF_SG_DRAW;
|
ani = AF_SG_DRAW;
|
||||||
} else if (ani == AF_SG_DRAW + 10) {
|
} else if (ani == AF_SG_DRAW + 10) {
|
||||||
draw_shotgun_meshes();
|
DrawShotgunMeshes();
|
||||||
SoundEffect(6, &LaraItem->pos, 0);
|
SoundEffect(6, &LaraItem->pos, 0);
|
||||||
} else if (ani == AF_SG_RECOIL) {
|
} else if (ani == AF_SG_RECOIL) {
|
||||||
ready_shotgun();
|
ReadyShotgun();
|
||||||
ani = AF_SG_AIM;
|
ani = AF_SG_AIM;
|
||||||
}
|
}
|
||||||
Lara.left_arm.frame_number = ani;
|
Lara.left_arm.frame_number = ani;
|
||||||
Lara.right_arm.frame_number = ani;
|
Lara.right_arm.frame_number = ani;
|
||||||
}
|
}
|
||||||
|
|
||||||
void undraw_shotgun()
|
// origianl name: undraw_shotgun
|
||||||
|
void UndrawShotgun()
|
||||||
{
|
{
|
||||||
int16_t ani = ani = Lara.left_arm.frame_number;
|
int16_t ani = ani = Lara.left_arm.frame_number;
|
||||||
|
|
||||||
|
@ -51,7 +53,7 @@ void undraw_shotgun()
|
||||||
} else if (ani >= AF_SG_UNDRAW && ani < AF_SG_UNAIM) {
|
} else if (ani >= AF_SG_UNDRAW && ani < AF_SG_UNAIM) {
|
||||||
ani++;
|
ani++;
|
||||||
if (ani == AF_SG_UNDRAW + 20) {
|
if (ani == AF_SG_UNDRAW + 20) {
|
||||||
undraw_shotgun_meshes();
|
UndrawShotgunMeshes();
|
||||||
SoundEffect(6, &LaraItem->pos, 0);
|
SoundEffect(6, &LaraItem->pos, 0);
|
||||||
} else if (ani == AF_SG_UNAIM) {
|
} else if (ani == AF_SG_UNAIM) {
|
||||||
ani = AF_SG_AIM;
|
ani = AF_SG_AIM;
|
||||||
|
@ -70,7 +72,8 @@ void undraw_shotgun()
|
||||||
Lara.left_arm.frame_number = ani;
|
Lara.left_arm.frame_number = ani;
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_shotgun_meshes()
|
// original name: draw_shotgun_meshes
|
||||||
|
void DrawShotgunMeshes()
|
||||||
{
|
{
|
||||||
Lara.mesh_ptrs[LM_HAND_L] =
|
Lara.mesh_ptrs[LM_HAND_L] =
|
||||||
Meshes[Objects[O_SHOTGUN].mesh_index + LM_HAND_L];
|
Meshes[Objects[O_SHOTGUN].mesh_index + LM_HAND_L];
|
||||||
|
@ -79,14 +82,16 @@ void draw_shotgun_meshes()
|
||||||
Lara.mesh_ptrs[LM_TORSO] = Meshes[Objects[O_LARA].mesh_index + LM_TORSO];
|
Lara.mesh_ptrs[LM_TORSO] = Meshes[Objects[O_LARA].mesh_index + LM_TORSO];
|
||||||
}
|
}
|
||||||
|
|
||||||
void undraw_shotgun_meshes()
|
// original name: undraw_shotgun_meshes
|
||||||
|
void UndrawShotgunMeshes()
|
||||||
{
|
{
|
||||||
Lara.mesh_ptrs[LM_HAND_L] = Meshes[Objects[O_LARA].mesh_index + LM_HAND_L];
|
Lara.mesh_ptrs[LM_HAND_L] = Meshes[Objects[O_LARA].mesh_index + LM_HAND_L];
|
||||||
Lara.mesh_ptrs[LM_HAND_R] = Meshes[Objects[O_LARA].mesh_index + LM_HAND_R];
|
Lara.mesh_ptrs[LM_HAND_R] = Meshes[Objects[O_LARA].mesh_index + LM_HAND_R];
|
||||||
Lara.mesh_ptrs[LM_TORSO] = Meshes[Objects[O_SHOTGUN].mesh_index + LM_TORSO];
|
Lara.mesh_ptrs[LM_TORSO] = Meshes[Objects[O_SHOTGUN].mesh_index + LM_TORSO];
|
||||||
}
|
}
|
||||||
|
|
||||||
void ready_shotgun()
|
// original name: ReadyShotgun
|
||||||
|
void ReadyShotgun()
|
||||||
{
|
{
|
||||||
Lara.gun_status = LGS_READY;
|
Lara.gun_status = LGS_READY;
|
||||||
Lara.left_arm.x_rot = 0;
|
Lara.left_arm.x_rot = 0;
|
||||||
|
@ -230,7 +235,7 @@ void FireShotgun()
|
||||||
|
|
||||||
void T1MInjectGameLaraGun1()
|
void T1MInjectGameLaraGun1()
|
||||||
{
|
{
|
||||||
INJECT(0x00425E30, draw_shotgun);
|
INJECT(0x00425E30, DrawShotgun);
|
||||||
INJECT(0x00425F50, undraw_shotgun);
|
INJECT(0x00425F50, UndrawShotgun);
|
||||||
INJECT(0x004260F0, RifleHandler);
|
INJECT(0x004260F0, RifleHandler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
#include "game/vars.h"
|
#include "game/vars.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
void draw_pistols(int32_t weapon_type)
|
// original name: draw_pistols
|
||||||
|
void DrawPistols(int32_t weapon_type)
|
||||||
{
|
{
|
||||||
int16_t ani = Lara.left_arm.frame_number;
|
int16_t ani = Lara.left_arm.frame_number;
|
||||||
ani++;
|
ani++;
|
||||||
|
@ -11,10 +12,10 @@ void draw_pistols(int32_t weapon_type)
|
||||||
if (ani < AF_G_DRAW1 || ani > AF_G_DRAW2_L) {
|
if (ani < AF_G_DRAW1 || ani > AF_G_DRAW2_L) {
|
||||||
ani = AF_G_DRAW1;
|
ani = AF_G_DRAW1;
|
||||||
} else if (ani == AF_G_DRAW2) {
|
} else if (ani == AF_G_DRAW2) {
|
||||||
draw_pistol_meshes(weapon_type);
|
DrawPistolMeshes(weapon_type);
|
||||||
SoundEffect(6, &LaraItem->pos, 0);
|
SoundEffect(6, &LaraItem->pos, 0);
|
||||||
} else if (ani == AF_G_DRAW2_L) {
|
} else if (ani == AF_G_DRAW2_L) {
|
||||||
ready_pistols();
|
ReadyPistols();
|
||||||
ani = AF_G_AIM;
|
ani = AF_G_AIM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +23,8 @@ void draw_pistols(int32_t weapon_type)
|
||||||
Lara.right_arm.frame_number = ani;
|
Lara.right_arm.frame_number = ani;
|
||||||
}
|
}
|
||||||
|
|
||||||
void undraw_pistols(int32_t weapon_type)
|
// original name: undraw_pistols
|
||||||
|
void UndrawPistols(int32_t weapon_type)
|
||||||
{
|
{
|
||||||
int16_t anil = Lara.left_arm.frame_number;
|
int16_t anil = Lara.left_arm.frame_number;
|
||||||
if (anil >= AF_G_RECOIL) {
|
if (anil >= AF_G_RECOIL) {
|
||||||
|
@ -39,7 +41,7 @@ void undraw_pistols(int32_t weapon_type)
|
||||||
} else if (anil > AF_G_DRAW1) {
|
} else if (anil > AF_G_DRAW1) {
|
||||||
anil--;
|
anil--;
|
||||||
if (anil == AF_G_DRAW2) {
|
if (anil == AF_G_DRAW2) {
|
||||||
undraw_pistol_mesh_left(weapon_type);
|
UndrawPistolMeshLeft(weapon_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Lara.left_arm.frame_number = anil;
|
Lara.left_arm.frame_number = anil;
|
||||||
|
@ -59,7 +61,7 @@ void undraw_pistols(int32_t weapon_type)
|
||||||
} else if (anir > AF_G_DRAW1) {
|
} else if (anir > AF_G_DRAW1) {
|
||||||
anir--;
|
anir--;
|
||||||
if (anir == AF_G_DRAW2) {
|
if (anir == AF_G_DRAW2) {
|
||||||
undraw_pistol_mesh_right(weapon_type);
|
UndrawPistolMeshRight(weapon_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Lara.right_arm.frame_number = anir;
|
Lara.right_arm.frame_number = anir;
|
||||||
|
@ -79,7 +81,8 @@ void undraw_pistols(int32_t weapon_type)
|
||||||
Lara.torso_y_rot = (Lara.right_arm.y_rot + Lara.left_arm.y_rot) / 4;
|
Lara.torso_y_rot = (Lara.right_arm.y_rot + Lara.left_arm.y_rot) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ready_pistols()
|
// original name: ready_pistols
|
||||||
|
void ReadyPistols()
|
||||||
{
|
{
|
||||||
Lara.gun_status = LGS_READY;
|
Lara.gun_status = LGS_READY;
|
||||||
Lara.left_arm.x_rot = 0;
|
Lara.left_arm.x_rot = 0;
|
||||||
|
@ -99,7 +102,8 @@ void ready_pistols()
|
||||||
Lara.left_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
Lara.left_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_pistol_meshes(int32_t weapon_type)
|
// original name: draw_pistol_meshes
|
||||||
|
void DrawPistolMeshes(int32_t weapon_type)
|
||||||
{
|
{
|
||||||
int16_t object_num = O_PISTOLS;
|
int16_t object_num = O_PISTOLS;
|
||||||
if (weapon_type == LGT_MAGNUMS) {
|
if (weapon_type == LGT_MAGNUMS) {
|
||||||
|
@ -118,7 +122,8 @@ void draw_pistol_meshes(int32_t weapon_type)
|
||||||
Meshes[Objects[O_LARA].mesh_index + LM_THIGH_R];
|
Meshes[Objects[O_LARA].mesh_index + LM_THIGH_R];
|
||||||
}
|
}
|
||||||
|
|
||||||
void undraw_pistol_mesh_left(int32_t weapon_type)
|
// original name: undraw_pistol_mesh_left
|
||||||
|
void UndrawPistolMeshLeft(int32_t weapon_type)
|
||||||
{
|
{
|
||||||
int16_t object_num = O_PISTOLS;
|
int16_t object_num = O_PISTOLS;
|
||||||
if (weapon_type == LGT_MAGNUMS) {
|
if (weapon_type == LGT_MAGNUMS) {
|
||||||
|
@ -132,7 +137,8 @@ void undraw_pistol_mesh_left(int32_t weapon_type)
|
||||||
SoundEffect(7, &LaraItem->pos, 0);
|
SoundEffect(7, &LaraItem->pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void undraw_pistol_mesh_right(int32_t weapon_type)
|
// original name: undraw_pistol_mesh_right
|
||||||
|
void UndrawPistolMeshRight(int32_t weapon_type)
|
||||||
{
|
{
|
||||||
int16_t object_num = O_PISTOLS;
|
int16_t object_num = O_PISTOLS;
|
||||||
if (weapon_type == LGT_MAGNUMS) {
|
if (weapon_type == LGT_MAGNUMS) {
|
||||||
|
@ -240,9 +246,9 @@ void AnimatePistols(int32_t weapon_type)
|
||||||
|
|
||||||
void T1MInjectGameLaraGun2()
|
void T1MInjectGameLaraGun2()
|
||||||
{
|
{
|
||||||
INJECT(0x00426470, draw_pistols);
|
INJECT(0x00426470, DrawPistols);
|
||||||
INJECT(0x004265C0, undraw_pistols);
|
INJECT(0x004265C0, UndrawPistols);
|
||||||
INJECT(0x00426830, draw_pistol_meshes);
|
INJECT(0x00426830, DrawPistolMeshes);
|
||||||
INJECT(0x004268A0, PistolHandler);
|
INJECT(0x004268A0, PistolHandler);
|
||||||
INJECT(0x004269D0, AnimatePistols);
|
INJECT(0x004269D0, AnimatePistols);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,14 +92,14 @@ void LaraGun()
|
||||||
if (Camera.type != CAM_CINEMATIC && Camera.type != CAM_LOOK) {
|
if (Camera.type != CAM_CINEMATIC && Camera.type != CAM_LOOK) {
|
||||||
Camera.type = CAM_COMBAT;
|
Camera.type = CAM_COMBAT;
|
||||||
}
|
}
|
||||||
draw_pistols(Lara.gun_type);
|
DrawPistols(Lara.gun_type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LGT_SHOTGUN:
|
case LGT_SHOTGUN:
|
||||||
if (Camera.type != CAM_CINEMATIC && Camera.type != CAM_LOOK) {
|
if (Camera.type != CAM_CINEMATIC && Camera.type != CAM_LOOK) {
|
||||||
Camera.type = CAM_COMBAT;
|
Camera.type = CAM_COMBAT;
|
||||||
}
|
}
|
||||||
draw_shotgun();
|
DrawShotgun();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -110,11 +110,11 @@ void LaraGun()
|
||||||
case LGT_PISTOLS:
|
case LGT_PISTOLS:
|
||||||
case LGT_MAGNUMS:
|
case LGT_MAGNUMS:
|
||||||
case LGT_UZIS:
|
case LGT_UZIS:
|
||||||
undraw_pistols(Lara.gun_type);
|
UndrawPistols(Lara.gun_type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LGT_SHOTGUN:
|
case LGT_SHOTGUN:
|
||||||
undraw_shotgun();
|
UndrawShotgun();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -193,7 +193,7 @@ void InitialiseNewWeapon()
|
||||||
Lara.right_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
Lara.right_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
||||||
Lara.left_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
Lara.left_arm.frame_base = Objects[O_PISTOLS].frame_base;
|
||||||
if (Lara.gun_status != LGS_ARMLESS) {
|
if (Lara.gun_status != LGS_ARMLESS) {
|
||||||
draw_pistol_meshes(Lara.gun_type);
|
DrawPistolMeshes(Lara.gun_type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ void InitialiseNewWeapon()
|
||||||
Lara.right_arm.frame_base = Objects[O_SHOTGUN].frame_base;
|
Lara.right_arm.frame_base = Objects[O_SHOTGUN].frame_base;
|
||||||
Lara.left_arm.frame_base = Objects[O_SHOTGUN].frame_base;
|
Lara.left_arm.frame_base = Objects[O_SHOTGUN].frame_base;
|
||||||
if (Lara.gun_status != LGS_ARMLESS) {
|
if (Lara.gun_status != LGS_ARMLESS) {
|
||||||
draw_shotgun_meshes();
|
DrawShotgunMeshes();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ typedef enum {
|
||||||
THS_TEASE = 1,
|
THS_TEASE = 1,
|
||||||
THS_ACTIVE = 2,
|
THS_ACTIVE = 2,
|
||||||
THS_DONE = 3,
|
THS_DONE = 3,
|
||||||
} THOR_HAMMER_STATES;
|
} THOR_HAMMER_STATE;
|
||||||
|
|
||||||
void DrawLightning(ITEM_INFO* item)
|
void DrawLightning(ITEM_INFO* item)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,15 +8,24 @@
|
||||||
#include "game/vars.h"
|
#include "game/vars.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#define MB_MAXOFF 300
|
typedef enum {
|
||||||
#define MB_MAXOFF_Z (LARA_RAD + 80) // = 180
|
MBS_STILL = 1,
|
||||||
|
MBS_PUSH = 2,
|
||||||
|
MBS_PULL = 3,
|
||||||
|
} MOVABLE_BLOCK_STATE;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
RBS_START = 0,
|
||||||
|
RBS_END = 1,
|
||||||
|
RBS_MOVING = 2,
|
||||||
|
} ROLLING_BLOCK_STATE;
|
||||||
|
|
||||||
static int16_t MovingBlockBounds[12] = {
|
static int16_t MovingBlockBounds[12] = {
|
||||||
-MB_MAXOFF,
|
-300,
|
||||||
+MB_MAXOFF,
|
+300,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
-WALL_L / 2 - MB_MAXOFF_Z,
|
-WALL_L / 2 - (LARA_RAD + 80),
|
||||||
-WALL_L / 2,
|
-WALL_L / 2,
|
||||||
-10 * PHD_DEGREE,
|
-10 * PHD_DEGREE,
|
||||||
+10 * PHD_DEGREE,
|
+10 * PHD_DEGREE,
|
||||||
|
@ -26,18 +35,6 @@ static int16_t MovingBlockBounds[12] = {
|
||||||
+10 * PHD_DEGREE,
|
+10 * PHD_DEGREE,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
MBS_STILL = 1,
|
|
||||||
MBS_PUSH = 2,
|
|
||||||
MBS_PULL = 3,
|
|
||||||
} MOVABLE_BLOCK_STATES;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RBS_START = 0,
|
|
||||||
RBS_END = 1,
|
|
||||||
RBS_MOVING = 2,
|
|
||||||
} ROLLING_BLOCK_STATES;
|
|
||||||
|
|
||||||
// original name: InitialiseMovingBlock
|
// original name: InitialiseMovingBlock
|
||||||
void InitialiseMovableBlock(int16_t item_num)
|
void InitialiseMovableBlock(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define ABORTION_TRIGHT 0x3FF8000
|
#define ABORTION_TRIGHT 0x3FF8000
|
||||||
#define ABORTION_TOUCH (ABORTION_TLEFT | ABORTION_TRIGHT)
|
#define ABORTION_TOUCH (ABORTION_TLEFT | ABORTION_TRIGHT)
|
||||||
|
|
||||||
enum ABORTION_ANIMS {
|
typedef enum {
|
||||||
ABORTION_EMPTY = 0,
|
ABORTION_EMPTY = 0,
|
||||||
ABORTION_STOP = 1,
|
ABORTION_STOP = 1,
|
||||||
ABORTION_TURN_L = 2,
|
ABORTION_TURN_L = 2,
|
||||||
|
@ -48,22 +48,22 @@ enum ABORTION_ANIMS {
|
||||||
ABORTION_FALL = 9,
|
ABORTION_FALL = 9,
|
||||||
ABORTION_DEATH = 10,
|
ABORTION_DEATH = 10,
|
||||||
ABORTION_KILL = 11,
|
ABORTION_KILL = 11,
|
||||||
};
|
} ABORTION_ANIM;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NATLA_EMPTY,
|
NATLA_EMPTY = 0,
|
||||||
NATLA_STOP,
|
NATLA_STOP = 1,
|
||||||
NATLA_FLY,
|
NATLA_FLY = 2,
|
||||||
NATLA_RUN,
|
NATLA_RUN = 3,
|
||||||
NATLA_AIM,
|
NATLA_AIM = 4,
|
||||||
NATLA_SEMIDEATH,
|
NATLA_SEMIDEATH = 5,
|
||||||
NATLA_SHOOT,
|
NATLA_SHOOT = 6,
|
||||||
NATLA_FALL,
|
NATLA_FALL = 7,
|
||||||
NATLA_STAND,
|
NATLA_STAND = 8,
|
||||||
NATLA_DEATH
|
NATLA_DEATH = 9,
|
||||||
} NATLA_ANIMS;
|
} NATLA_ANIM;
|
||||||
|
|
||||||
BITE_INFO NatlaGun = { 5, 220, 7, 4 };
|
static BITE_INFO NatlaGun = { 5, 220, 7, 4 };
|
||||||
|
|
||||||
void AbortionControl(int16_t item_num)
|
void AbortionControl(int16_t item_num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,14 +14,14 @@ typedef enum {
|
||||||
CABIN_DROP2 = 2,
|
CABIN_DROP2 = 2,
|
||||||
CABIN_DROP3 = 3,
|
CABIN_DROP3 = 3,
|
||||||
CABIN_FINISH = 4,
|
CABIN_FINISH = 4,
|
||||||
} CABIN_ANIMS;
|
} CABIN_ANIM;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BOAT_EMPTY = 0,
|
BOAT_EMPTY = 0,
|
||||||
BOAT_SET = 1,
|
BOAT_SET = 1,
|
||||||
BOAT_MOVE = 2,
|
BOAT_MOVE = 2,
|
||||||
BOAT_STOP = 3,
|
BOAT_STOP = 3,
|
||||||
} BOAT_ANIMS;
|
} BOAT_ANIM;
|
||||||
|
|
||||||
void ShutThatDoor(DOORPOS_DATA* d)
|
void ShutThatDoor(DOORPOS_DATA* d)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ typedef enum {
|
||||||
PEOPLE_DEATH = 5,
|
PEOPLE_DEATH = 5,
|
||||||
PEOPLE_POSE = 6,
|
PEOPLE_POSE = 6,
|
||||||
PEOPLE_SHOOT = 7,
|
PEOPLE_SHOOT = 7,
|
||||||
} PEOPLE_ANIMS;
|
} PEOPLE_ANIM;
|
||||||
|
|
||||||
BITE_INFO LarsonGun = { -60, 170, 0, 14 };
|
BITE_INFO LarsonGun = { -60, 170, 0, 14 };
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ typedef enum {
|
||||||
SS_OFF = 0,
|
SS_OFF = 0,
|
||||||
SS_ON = 1,
|
SS_ON = 1,
|
||||||
SS_LINK = 2,
|
SS_LINK = 2,
|
||||||
} SWITCH_STATES;
|
} SWITCH_STATE;
|
||||||
|
|
||||||
static int16_t PickUpBounds[12] = {
|
static int16_t PickUpBounds[12] = {
|
||||||
-256, +256, -100, +100, -256, +100, -10 * PHD_DEGREE, +10 * PHD_DEGREE,
|
-256, +256, -100, +100, -256, +100, -10 * PHD_DEGREE, +10 * PHD_DEGREE,
|
||||||
|
@ -141,7 +141,9 @@ static PHD_VECTOR Switch2Position = { 0, 0, 108 };
|
||||||
static PHD_VECTOR KeyHolePosition = { 0, 0, WALL_L / 2 - LARA_RAD - 50 };
|
static PHD_VECTOR KeyHolePosition = { 0, 0, WALL_L / 2 - LARA_RAD - 50 };
|
||||||
static PHD_VECTOR PuzzleHolePosition = { 0, 0, WALL_L / 2 - LARA_RAD - 85 };
|
static PHD_VECTOR PuzzleHolePosition = { 0, 0, WALL_L / 2 - LARA_RAD - 85 };
|
||||||
|
|
||||||
static int PickUpX, PickUpY, PickUpZ;
|
static int32_t PickUpX;
|
||||||
|
static int32_t PickUpY;
|
||||||
|
static int32_t PickUpZ;
|
||||||
|
|
||||||
void AnimateLaraUntil(ITEM_INFO* lara_item, int32_t goal)
|
void AnimateLaraUntil(ITEM_INFO* lara_item, int32_t goal)
|
||||||
{
|
{
|
||||||
|
|
|
@ -212,7 +212,7 @@ typedef enum {
|
||||||
#endif
|
#endif
|
||||||
O_ALPHABET = 190,
|
O_ALPHABET = 190,
|
||||||
NUMBER_OBJECTS = 191,
|
NUMBER_OBJECTS = 191,
|
||||||
} GAME_OBJECT_ID;
|
} OBJECT_ID;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AF_VAULT12 = 759,
|
AF_VAULT12 = 759,
|
||||||
|
@ -258,7 +258,7 @@ typedef enum {
|
||||||
AF_PICKUP_UW = 2970,
|
AF_PICKUP_UW = 2970,
|
||||||
AF_PICKUPSCION = 44,
|
AF_PICKUPSCION = 44,
|
||||||
AF_USEPUZZLE = 3372,
|
AF_USEPUZZLE = 3372,
|
||||||
} LARA_ANIMATION_FRAMES;
|
} LARA_ANIMATION_FRAME;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AF_SG_AIM = 0,
|
AF_SG_AIM = 0,
|
||||||
|
@ -267,7 +267,7 @@ typedef enum {
|
||||||
AF_SG_UNDRAW = 80,
|
AF_SG_UNDRAW = 80,
|
||||||
AF_SG_UNAIM = 114,
|
AF_SG_UNAIM = 114,
|
||||||
AF_SG_END = 127,
|
AF_SG_END = 127,
|
||||||
} LARA_SHOTGUN_ANIMATION_FRAMES;
|
} LARA_SHOTGUN_ANIMATION_FRAME;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AF_G_AIM = 0,
|
AF_G_AIM = 0,
|
||||||
|
@ -277,7 +277,7 @@ typedef enum {
|
||||||
AF_G_DRAW2 = 13,
|
AF_G_DRAW2 = 13,
|
||||||
AF_G_DRAW2_L = 23,
|
AF_G_DRAW2_L = 23,
|
||||||
AF_G_RECOIL = 24,
|
AF_G_RECOIL = 24,
|
||||||
} LARA_GUN_ANIMATION_FRAMES;
|
} LARA_GUN_ANIMATION_FRAME;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AA_VAULT12 = 50,
|
AA_VAULT12 = 50,
|
||||||
|
@ -322,14 +322,14 @@ typedef enum {
|
||||||
AA_SPAZ_BACK = 126,
|
AA_SPAZ_BACK = 126,
|
||||||
AA_SPAZ_RIGHT = 127,
|
AA_SPAZ_RIGHT = 127,
|
||||||
AA_SPAZ_LEFT = 128,
|
AA_SPAZ_LEFT = 128,
|
||||||
} LARA_ANIMATION_ANIMS;
|
} LARA_ANIMATION;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LWS_ABOVEWATER = 0,
|
LWS_ABOVEWATER = 0,
|
||||||
LWS_UNDERWATER = 1,
|
LWS_UNDERWATER = 1,
|
||||||
LWS_SURFACE = 2,
|
LWS_SURFACE = 2,
|
||||||
LWS_CHEAT = 3,
|
LWS_CHEAT = 3,
|
||||||
} LARA_WATER_STATES;
|
} LARA_WATER_STATUS;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AS_WALK = 0,
|
AS_WALK = 0,
|
||||||
|
@ -388,7 +388,7 @@ typedef enum {
|
||||||
AS_FASTDIVE = 53,
|
AS_FASTDIVE = 53,
|
||||||
AS_GYMNAST = 54,
|
AS_GYMNAST = 54,
|
||||||
AS_WATEROUT = 55,
|
AS_WATEROUT = 55,
|
||||||
} LARA_STATES;
|
} LARA_STATE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LGS_ARMLESS = 0,
|
LGS_ARMLESS = 0,
|
||||||
|
@ -396,7 +396,7 @@ typedef enum {
|
||||||
LGS_DRAW = 2,
|
LGS_DRAW = 2,
|
||||||
LGS_UNDRAW = 3,
|
LGS_UNDRAW = 3,
|
||||||
LGS_READY = 4,
|
LGS_READY = 4,
|
||||||
} LARA_GUN_STATES;
|
} LARA_GUN_STATE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LGT_UNARMED = 0,
|
LGT_UNARMED = 0,
|
||||||
|
@ -405,7 +405,7 @@ typedef enum {
|
||||||
LGT_UZIS = 3,
|
LGT_UZIS = 3,
|
||||||
LGT_SHOTGUN = 4,
|
LGT_SHOTGUN = 4,
|
||||||
NUM_WEAPONS = 5
|
NUM_WEAPONS = 5
|
||||||
} LARA_GUN_TYPES;
|
} LARA_GUN_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LM_HIPS = 0,
|
LM_HIPS = 0,
|
||||||
|
@ -424,7 +424,7 @@ typedef enum {
|
||||||
LM_HAND_L = 13,
|
LM_HAND_L = 13,
|
||||||
LM_HEAD = 14,
|
LM_HEAD = 14,
|
||||||
LM_NUMBER_OF = 15,
|
LM_NUMBER_OF = 15,
|
||||||
} LARA_MESHES;
|
} LARA_MESH;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MOOD_BORED = 0,
|
MOOD_BORED = 0,
|
||||||
|
@ -433,7 +433,7 @@ typedef enum {
|
||||||
MOOD_STALK = 3,
|
MOOD_STALK = 3,
|
||||||
} MOOD_TYPE;
|
} MOOD_TYPE;
|
||||||
|
|
||||||
enum {
|
typedef enum {
|
||||||
TARGET_NONE = 0,
|
TARGET_NONE = 0,
|
||||||
TARGET_PRIMARY = 1,
|
TARGET_PRIMARY = 1,
|
||||||
TARGET_SECONDARY = 2,
|
TARGET_SECONDARY = 2,
|
||||||
|
@ -509,8 +509,8 @@ typedef enum {
|
||||||
// UB_LEVEL2 = 23, // TRUB - Temple of Cat
|
// UB_LEVEL2 = 23, // TRUB - Temple of Cat
|
||||||
// UB_LEVEL3 = 24,
|
// UB_LEVEL3 = 24,
|
||||||
// UB_LEVEL4 = 25,
|
// UB_LEVEL4 = 25,
|
||||||
NUMBER_OF_LEVELS = 22,
|
LV_NUMBER_OF = 22,
|
||||||
} GAME_LEVELS;
|
} GAME_LEVEL;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GF_STARTGAME = 0,
|
GF_STARTGAME = 0,
|
||||||
|
@ -531,7 +531,7 @@ typedef enum {
|
||||||
GF_CREDITS = 15 << 6,
|
GF_CREDITS = 15 << 6,
|
||||||
GF_PREWARMGAME = 16 << 6,
|
GF_PREWARMGAME = 16 << 6,
|
||||||
GF_LOOPCINE = 17 << 6
|
GF_LOOPCINE = 17 << 6
|
||||||
} TITLE_OPTIONS;
|
} GAMEFLOW_OPTION;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IN_FORWARD = (1 << 0),
|
IN_FORWARD = (1 << 0),
|
||||||
|
@ -581,11 +581,11 @@ typedef enum {
|
||||||
TF_BOTTOM = (1 << 8),
|
TF_BOTTOM = (1 << 8),
|
||||||
TF_BGND = (1 << 9),
|
TF_BGND = (1 << 9),
|
||||||
TF_OUTLINE = (1 << 10),
|
TF_OUTLINE = (1 << 10),
|
||||||
} TEXTSTRING_FLAGS;
|
} TEXTSTRING_FLAG;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ASF_FPS = 1 << 2,
|
ASF_FPS = 1 << 2,
|
||||||
} APP_SETTINGS_FLAGS;
|
} APP_SETTINGS_FLAG;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
COLL_NONE = 0,
|
COLL_NONE = 0,
|
||||||
|
@ -595,13 +595,13 @@ typedef enum {
|
||||||
COLL_TOP = 8,
|
COLL_TOP = 8,
|
||||||
COLL_TOPFRONT = 16,
|
COLL_TOPFRONT = 16,
|
||||||
COLL_CLAMP = 32,
|
COLL_CLAMP = 32,
|
||||||
} COLL_TYPES;
|
} COLL_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HT_WALL = 0,
|
HT_WALL = 0,
|
||||||
HT_SMALL_SLOPE = 1,
|
HT_SMALL_SLOPE = 1,
|
||||||
HT_BIG_SLOPE = 2,
|
HT_BIG_SLOPE = 2,
|
||||||
} HEIGHT_TYPES;
|
} HEIGHT_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DIR_NORTH = 0,
|
DIR_NORTH = 0,
|
||||||
|
@ -637,7 +637,7 @@ typedef enum {
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RF_UNDERWATER = 1,
|
RF_UNDERWATER = 1,
|
||||||
} ROOM_FLAGS;
|
} ROOM_FLAG;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FT_FLOOR = 0,
|
FT_FLOOR = 0,
|
||||||
|
@ -646,7 +646,7 @@ typedef enum {
|
||||||
FT_ROOF = 3,
|
FT_ROOF = 3,
|
||||||
FT_TRIGGER = 4,
|
FT_TRIGGER = 4,
|
||||||
FT_LAVA = 5,
|
FT_LAVA = 5,
|
||||||
} FLOOR_TYPES;
|
} FLOOR_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TT_TRIGGER = 0,
|
TT_TRIGGER = 0,
|
||||||
|
@ -658,7 +658,7 @@ typedef enum {
|
||||||
TT_ANTIPAD = 6,
|
TT_ANTIPAD = 6,
|
||||||
TT_COMBAT = 7,
|
TT_COMBAT = 7,
|
||||||
TT_DUMMY = 8,
|
TT_DUMMY = 8,
|
||||||
} TRIGGER_TYPES;
|
} TRIGGER_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TO_OBJECT = 0,
|
TO_OBJECT = 0,
|
||||||
|
@ -672,7 +672,7 @@ typedef enum {
|
||||||
TO_CD = 8,
|
TO_CD = 8,
|
||||||
TO_FLIPEFFECT = 9,
|
TO_FLIPEFFECT = 9,
|
||||||
TO_SECRET = 10,
|
TO_SECRET = 10,
|
||||||
} TRIGGER_OBJECTS;
|
} TRIGGER_OBJECT;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IF_ONESHOT = 0x0100,
|
IF_ONESHOT = 0x0100,
|
||||||
|
@ -680,7 +680,7 @@ typedef enum {
|
||||||
IF_REVERSE = 0x4000,
|
IF_REVERSE = 0x4000,
|
||||||
IF_NOT_VISIBLE = 0x0100,
|
IF_NOT_VISIBLE = 0x0100,
|
||||||
IF_KILLED_ITEM = 0x8000,
|
IF_KILLED_ITEM = 0x8000,
|
||||||
} ITEM_FLAGS;
|
} ITEM_FLAG;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FMV_INTRO = 0,
|
FMV_INTRO = 0,
|
||||||
|
@ -724,10 +724,10 @@ typedef enum {
|
||||||
} INV_MODE;
|
} INV_MODE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RM_MAIN = 0,
|
RT_MAIN = 0,
|
||||||
RM_OPTION = 1,
|
RT_OPTION = 1,
|
||||||
RM_KEYS = 2,
|
RT_KEYS = 2,
|
||||||
} RING_MODE;
|
} RING_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SHAPE_SPRITE = 1,
|
SHAPE_SPRITE = 1,
|
||||||
|
@ -766,7 +766,7 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DOOR_CLOSED = 0,
|
DOOR_CLOSED = 0,
|
||||||
DOOR_OPEN = 1,
|
DOOR_OPEN = 1,
|
||||||
} DOOR_ANIMS;
|
} DOOR_ANIM;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
@ -1032,7 +1032,7 @@ typedef struct {
|
||||||
} START_INFO;
|
} START_INFO;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0000 */ START_INFO start[NUMBER_OF_LEVELS];
|
/* 0000 */ START_INFO start[LV_NUMBER_OF];
|
||||||
/* 014A */ uint32_t timer;
|
/* 014A */ uint32_t timer;
|
||||||
/* 014E */ uint32_t kills;
|
/* 014E */ uint32_t kills;
|
||||||
/* 0152 */ uint16_t secrets;
|
/* 0152 */ uint16_t secrets;
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
#define Lara VAR_U_(0x0045ED80, LARA_INFO)
|
#define Lara VAR_U_(0x0045ED80, LARA_INFO)
|
||||||
#define LaraItem VAR_U_(0x0045EE6C, ITEM_INFO*)
|
#define LaraItem VAR_U_(0x0045EE6C, ITEM_INFO*)
|
||||||
#define PierreItem VAR_U_(0x0045E328, int16_t)
|
#define PierreItem VAR_U_(0x0045E328, int16_t)
|
||||||
#define LevelNames ARRAY_(0x00453648, const char*, [NUMBER_OF_LEVELS])
|
#define LevelNames ARRAY_(0x00453648, const char*, [LV_NUMBER_OF])
|
||||||
#define LevelTitles ARRAY_(0x00453DF8, const char*, [NUMBER_OF_LEVELS])
|
#define LevelTitles ARRAY_(0x00453DF8, const char*, [LV_NUMBER_OF])
|
||||||
#define LevelMusic ARRAY_(0x00456A18, int16_t, [NUMBER_OF_LEVELS])
|
#define LevelMusic ARRAY_(0x00456A18, int16_t, [LV_NUMBER_OF])
|
||||||
#define SecretTotals ARRAY_(0x00453CB0, int8_t, [MAX_SECRETS])
|
#define SecretTotals ARRAY_(0x00453CB0, int8_t, [MAX_SECRETS])
|
||||||
#define ResetFlag VAR_I_(0x00459F50, int32_t, 0)
|
#define ResetFlag VAR_I_(0x00459F50, int32_t, 0)
|
||||||
#define Input VAR_U_(0x0045EEF4, int32_t)
|
#define Input VAR_U_(0x0045EEF4, int32_t)
|
||||||
|
@ -125,17 +125,12 @@
|
||||||
#define Cine VAR_U_(0x00462CF4, int16_t*)
|
#define Cine VAR_U_(0x00462CF4, int16_t*)
|
||||||
#define CineFrame VAR_U_(0x00462D14, int16_t)
|
#define CineFrame VAR_U_(0x00462D14, int16_t)
|
||||||
#define CinematicPosition VAR_U_(0x00462D00, PHD_3DPOS)
|
#define CinematicPosition VAR_U_(0x00462D00, PHD_3DPOS)
|
||||||
|
|
||||||
// #define LaraControlRoutines ARRAY_(0x00456490, ControlRoutine, [])
|
|
||||||
// #define LaraCollisionRoutines ARRAY_(0x00456570, CollisionRoutine, [])
|
|
||||||
|
|
||||||
#define DumpX VAR_I_(0x004546E0, int16_t, 0)
|
#define DumpX VAR_I_(0x004546E0, int16_t, 0)
|
||||||
#define DumpY VAR_I_(0x004546E2, int16_t, 0)
|
#define DumpY VAR_I_(0x004546E2, int16_t, 0)
|
||||||
#define DumpWidth VAR_I_(0x004546E4, int16_t, 0)
|
#define DumpWidth VAR_I_(0x004546E4, int16_t, 0)
|
||||||
#define DumpHeight VAR_I_(0x004546E6, int16_t, 0)
|
#define DumpHeight VAR_I_(0x004546E6, int16_t, 0)
|
||||||
#define TriggerIndex VAR_U_(0x00462CE8, int16_t*)
|
#define TriggerIndex VAR_U_(0x00462CE8, int16_t*)
|
||||||
#define Ticks VAR_U_(0x0045A318, int32_t)
|
#define Ticks VAR_U_(0x0045A318, int32_t)
|
||||||
#define EffectRoutines ARRAY_(0x00453600, EffectRoutine, [])
|
|
||||||
#define IMRate VAR_U_(0x00462BE0, int32_t)
|
#define IMRate VAR_U_(0x00462BE0, int32_t)
|
||||||
#define IMFrac VAR_U_(0x00462570, int32_t)
|
#define IMFrac VAR_U_(0x00462570, int32_t)
|
||||||
#define IMMatrixPtr VAR_U_(0x00462BE4, PHD_MATRIX*)
|
#define IMMatrixPtr VAR_U_(0x00462BE4, PHD_MATRIX*)
|
||||||
|
@ -200,16 +195,16 @@
|
||||||
#define Item_Data VAR_U_(0x0045A0B8, int16_t)
|
#define Item_Data VAR_U_(0x0045A0B8, int16_t)
|
||||||
#define InvNFrames VAR_U_(0x004550A0, int32_t)
|
#define InvNFrames VAR_U_(0x004550A0, int32_t)
|
||||||
#define LsAdder VAR_U_(0x0068F3A0, int32_t)
|
#define LsAdder VAR_U_(0x0068F3A0, int32_t)
|
||||||
#define Key1Strings ARRAY_(0x00454178, char*, [NUMBER_OF_LEVELS])
|
#define Key1Strings ARRAY_(0x00454178, char*, [LV_NUMBER_OF])
|
||||||
#define Key2Strings ARRAY_(0x004541D0, char*, [NUMBER_OF_LEVELS])
|
#define Key2Strings ARRAY_(0x004541D0, char*, [LV_NUMBER_OF])
|
||||||
#define Key3Strings ARRAY_(0x00454228, char*, [NUMBER_OF_LEVELS])
|
#define Key3Strings ARRAY_(0x00454228, char*, [LV_NUMBER_OF])
|
||||||
#define Key4Strings ARRAY_(0x00454280, char*, [NUMBER_OF_LEVELS])
|
#define Key4Strings ARRAY_(0x00454280, char*, [LV_NUMBER_OF])
|
||||||
#define Pickup1Strings ARRAY_(0x004540C8, char*, [NUMBER_OF_LEVELS])
|
#define Pickup1Strings ARRAY_(0x004540C8, char*, [LV_NUMBER_OF])
|
||||||
#define Pickup2Strings ARRAY_(0x00454120, char*, [NUMBER_OF_LEVELS])
|
#define Pickup2Strings ARRAY_(0x00454120, char*, [LV_NUMBER_OF])
|
||||||
#define Puzzle1Strings ARRAY_(0x00453F68, char*, [NUMBER_OF_LEVELS])
|
#define Puzzle1Strings ARRAY_(0x00453F68, char*, [LV_NUMBER_OF])
|
||||||
#define Puzzle2Strings ARRAY_(0x00453FC0, char*, [NUMBER_OF_LEVELS])
|
#define Puzzle2Strings ARRAY_(0x00453FC0, char*, [LV_NUMBER_OF])
|
||||||
#define Puzzle3Strings ARRAY_(0x00454018, char*, [NUMBER_OF_LEVELS])
|
#define Puzzle3Strings ARRAY_(0x00454018, char*, [LV_NUMBER_OF])
|
||||||
#define Puzzle4Strings ARRAY_(0x00454070, char*, [NUMBER_OF_LEVELS])
|
#define Puzzle4Strings ARRAY_(0x00454070, char*, [LV_NUMBER_OF])
|
||||||
#define IMediOption VAR_U_(0x004559E0, INVENTORY_ITEM)
|
#define IMediOption VAR_U_(0x004559E0, INVENTORY_ITEM)
|
||||||
#define IBigMediOption VAR_U_(0x00455A20, INVENTORY_ITEM)
|
#define IBigMediOption VAR_U_(0x00455A20, INVENTORY_ITEM)
|
||||||
#define ILeadBarOption VAR_U_(0x00455A60, INVENTORY_ITEM)
|
#define ILeadBarOption VAR_U_(0x00455A60, INVENTORY_ITEM)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue