Rename draw.cpp to animation.cpp which makes more sense, some more edits

This commit is contained in:
Lwmte 2021-09-16 05:06:03 +03:00
parent d8aa65260f
commit 8d86c2e97d
224 changed files with 846 additions and 823 deletions

View file

@ -1,10 +1,12 @@
#pragma once #pragma once
#include "Specific\phd_global.h" #include "Specific\phd_global.h"
#include "level.h" #include "level.h"
struct ITEM_INFO; struct ITEM_INFO;
struct BITE_INFO; struct BITE_INFO;
struct CREATURE_INFO; struct CREATURE_INFO;
struct LOT_INFO; struct LOT_INFO;
enum TARGET_TYPE enum TARGET_TYPE
{ {
NO_TARGET, NO_TARGET,
@ -12,8 +14,6 @@ enum TARGET_TYPE
SECONDARY_TARGET SECONDARY_TARGET
}; };
struct OBJECT_BONES struct OBJECT_BONES
{ {
short bone0; short bone0;

View file

@ -27,6 +27,7 @@
#include "kayak.h" #include "kayak.h"
#include "minecart.h" #include "minecart.h"
#include "animation.h"
#include "GameFlowScript.h" #include "GameFlowScript.h"
#include "health.h" #include "health.h"
#include "flipeffect.h" #include "flipeffect.h"
@ -34,8 +35,8 @@
#include "savegame.h" #include "savegame.h"
#include "rope.h" #include "rope.h"
#include "rubberboat.h" #include "rubberboat.h"
#include <Game\misc.h> #include "misc.h"
#include <control\volume.h> #include "control\volume.h"
#include "Renderer11.h" #include "Renderer11.h"
#include "camera.h" #include "camera.h"

View file

@ -8,7 +8,7 @@
#include "input.h" #include "input.h"
#include "health.h" #include "health.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "draw.h" #include "animation.h"
#include "pickup.h" #include "pickup.h"
#include "collide.h" #include "collide.h"
#include "item.h" #include "item.h"

View file

@ -2,7 +2,7 @@
#include "lara_climb.h" #include "lara_climb.h"
#include "Lara.h" #include "Lara.h"
#include "control.h" #include "control.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "camera.h" #include "camera.h"
#include "level.h" #include "level.h"

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#include "lara.h" #include "lara.h"
#include "input.h" #include "input.h"
#include "draw.h" #include "animation.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "collide.h" #include "collide.h"
#include "control.h" #include "control.h"

View file

@ -4,7 +4,7 @@
#include "lara_tests.h" #include "lara_tests.h"
#include "lara_slide.h" #include "lara_slide.h"
#include "lara_collide.h" #include "lara_collide.h"
#include "draw.h" #include "animation.h"
#include "control\los.h" #include "control\los.h"
#include "Lara\lara_flare.h" #include "Lara\lara_flare.h"
#include "collide.h" #include "collide.h"

View file

@ -8,7 +8,7 @@
#include "objects.h" #include "objects.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "sphere.h" #include "sphere.h"
#include "draw.h" #include "animation.h"
#include "effects\flmtorch.h" #include "effects\flmtorch.h"
#include "level.h" #include "level.h"
#include "lot.h" #include "lot.h"
@ -19,7 +19,7 @@
#include "savegame.h" #include "savegame.h"
#include "GameFlowScript.h" #include "GameFlowScript.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
WEAPON_INFO Weapons[NUM_WEAPONS] = WEAPON_INFO Weapons[NUM_WEAPONS] =
{ {

View file

@ -3,7 +3,7 @@
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "draw.h" #include "animation.h"
#include "items.h" #include "items.h"
#include "sphere.h" #include "sphere.h"
#include "lara_fire.h" #include "lara_fire.h"

View file

@ -2,7 +2,7 @@
#include "lara.h" #include "lara.h"
#include "input.h" #include "input.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "draw.h" #include "animation.h"
#include "rope.h" #include "rope.h"
#include "lara_tests.h" #include "lara_tests.h"
#include "camera.h" #include "camera.h"

View file

@ -3,7 +3,7 @@
#include "items.h" #include "items.h"
#include "Lara.h" #include "Lara.h"
#include "lara_fire.h" #include "lara_fire.h"
#include "draw.h" #include "animation.h"
#include "box.h" #include "box.h"
#include "control.h" #include "control.h"
#include "effects\effects.h" #include "effects\effects.h"

View file

@ -8,7 +8,7 @@
#include "lara_surface.h" #include "lara_surface.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "lara_fire.h" #include "lara_fire.h"
#include "draw.h" #include "animation.h"
#include "camera.h" #include "camera.h"
#include "level.h" #include "level.h"
#include "input.h" #include "input.h"

View file

@ -2,7 +2,7 @@
#include "lara.h" #include "lara.h"
#include "lara_tests.h" #include "lara_tests.h"
#include "input.h" #include "input.h"
#include "draw.h" #include "animation.h"
#include "lara_climb.h" #include "lara_climb.h"
#include "lara_collide.h" #include "lara_collide.h"
#include "control.h" #include "control.h"

View file

@ -3,7 +3,7 @@
#include "lara_fire.h" #include "lara_fire.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"

323
TR5Main/Game/animation.cpp Normal file
View file

@ -0,0 +1,323 @@
#include "framework.h"
#include "animation.h"
#include "Lara.h"
#include "camera.h"
#include "level.h"
#include "Renderer11.h"
#include "Sound/sound.h"
#include "flipeffect.h"
using TEN::Renderer::g_Renderer;
BOUNDING_BOX InterpolatedBounds;
void AnimateItem(ITEM_INFO* item)
{
item->touchBits = 0;
item->hitStatus = false;
item->frameNumber++;
ANIM_STRUCT* anim = &g_Level.Anims[item->animNumber];
if (anim->numberChanges > 0 && GetChange(item, anim))
{
anim = &g_Level.Anims[item->animNumber];
item->currentAnimState = anim->currentAnimState;
if (item->requiredAnimState == item->currentAnimState)
item->requiredAnimState = 0;
}
if (item->frameNumber > anim->frameEnd)
{
if (anim->numberCommands > 0)
{
short* cmd = &g_Level.Commands[anim->commandIndex];
for (int i = anim->numberCommands; i > 0; i--)
{
switch (*(cmd++))
{
case COMMAND_MOVE_ORIGIN:
TranslateItem(item, cmd[0], cmd[1], cmd[2]);
cmd += 3;
break;
case COMMAND_JUMP_VELOCITY:
item->fallspeed = *(cmd++);
item->speed = *(cmd++);
item->gravityStatus = true;
break;
case COMMAND_DEACTIVATE:
if (Objects[item->objectNumber].intelligent && !item->afterDeath)
item->afterDeath = 1;
item->status = ITEM_DEACTIVATED;
break;
case COMMAND_SOUND_FX:
case COMMAND_EFFECT:
cmd += 2;
break;
default:
break;
}
}
}
item->animNumber = anim->jumpAnimNum;
item->frameNumber = anim->jumpFrameNum;
anim = &g_Level.Anims[item->animNumber];
if (item->currentAnimState != anim->currentAnimState)
{
item->currentAnimState = anim->currentAnimState;
item->goalAnimState = anim->currentAnimState;
}
if (item->requiredAnimState == item->currentAnimState)
item->requiredAnimState = 0;
}
if (anim->numberCommands > 0)
{
short* cmd = &g_Level.Commands[anim->commandIndex];
int flags;
int effectID = 0;
for (int i = anim->numberCommands; i > 0; i--)
{
switch (*(cmd++))
{
case COMMAND_MOVE_ORIGIN:
cmd += 3;
break;
case COMMAND_JUMP_VELOCITY:
cmd += 2;
break;
case COMMAND_SOUND_FX:
if (item->frameNumber != *cmd)
{
cmd += 2;
break;
}
flags = cmd[1] & 0xC000;
if (!Objects[item->objectNumber].waterCreature)
{
if (item->roomNumber == NO_ROOM)
{
item->pos.xPos = LaraItem->pos.xPos;
item->pos.yPos = LaraItem->pos.yPos - 762;
item->pos.zPos = LaraItem->pos.zPos;
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
else if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER)
{
if (!flags || flags == SFX_WATERONLY && (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER || Objects[item->objectNumber].intelligent))
{
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
}
else if (!flags || flags == SFX_LANDONLY && !(g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER))
{
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
}
else
{
if (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER)
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 1);
else
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 0);
}
break;
case COMMAND_EFFECT:
if (item->frameNumber != *cmd)
{
cmd += 2;
break;
}
FXType = cmd[1] & 0xC000;
effectID = cmd[1] & 0x3FFF;
DoFlipEffect(effectID, item);
cmd += 2;
break;
default:
break;
}
}
}
int lateral = 0;
if (item->gravityStatus)
{
item->fallspeed += (item->fallspeed >= 128 ? 1 : 6);
item->pos.yPos += item->fallspeed;
}
else
{
int velocity = anim->velocity;
if (anim->acceleration)
velocity += anim->acceleration * (item->frameNumber - anim->frameBase);
item->speed = velocity >> 16;
lateral = anim->Xvelocity;
if (anim->Xacceleration)
lateral += anim->Xacceleration * (item->frameNumber - anim->frameBase);
lateral >>= 16;
}
item->pos.xPos += item->speed * phd_sin(item->pos.yRot);
item->pos.zPos += item->speed * phd_cos(item->pos.yRot);
item->pos.xPos += lateral * phd_sin(item->pos.yRot + ANGLE(90));
item->pos.zPos += lateral * phd_cos(item->pos.yRot + ANGLE(90));
// Update matrices
short itemNumber = item - g_Level.Items.data();
g_Renderer.updateItemAnimations(itemNumber, true);
}
void TranslateItem(ITEM_INFO* item, int x, int y, int z)
{
float c = phd_cos(item->pos.yRot);
float s = phd_sin(item->pos.yRot);
item->pos.xPos += c * x + s * z;
item->pos.yPos += y;
item->pos.zPos += -s * x + c * z;
}
int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim)
{
if (item->currentAnimState == item->goalAnimState)
return 0;
if (anim->numberChanges <= 0)
return 0;
for (int i = 0; i < anim->numberChanges; i++)
{
CHANGE_STRUCT* change = &g_Level.Changes[anim->changeIndex + i];
if (change->goalAnimState == item->goalAnimState)
{
for (int j = 0; j < change->numberRanges; j++)
{
RANGE_STRUCT* range = &g_Level.Ranges[change->rangeIndex + j];
if (item->frameNumber >= range->startFrame && item->frameNumber <= range->endFrame)
{
item->animNumber = range->linkAnimNum;
item->frameNumber = range->linkFrameNum;
return 1;
}
}
}
}
return 0;
}
BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item)
{
int rate = 0;
ANIM_FRAME* framePtr[2];
int frac = GetFrame(item, framePtr, &rate);
if (frac == 0)
return &framePtr[0]->boundingBox;
else
{
InterpolatedBounds.X1 = framePtr[0]->boundingBox.X1 + (framePtr[1]->boundingBox.X1 - framePtr[0]->boundingBox.X1) * frac / rate;
InterpolatedBounds.X2 = framePtr[0]->boundingBox.X2 + (framePtr[1]->boundingBox.X2 - framePtr[0]->boundingBox.X2) * frac / rate;
InterpolatedBounds.Y1 = framePtr[0]->boundingBox.Y1 + (framePtr[1]->boundingBox.Y1 - framePtr[0]->boundingBox.Y1) * frac / rate;
InterpolatedBounds.Y2 = framePtr[0]->boundingBox.Y2 + (framePtr[1]->boundingBox.Y2 - framePtr[0]->boundingBox.Y2) * frac / rate;
InterpolatedBounds.Z1 = framePtr[0]->boundingBox.Z1 + (framePtr[1]->boundingBox.Z1 - framePtr[0]->boundingBox.Z1) * frac / rate;
InterpolatedBounds.Z2 = framePtr[0]->boundingBox.Z2 + (framePtr[1]->boundingBox.Z2 - framePtr[0]->boundingBox.Z2) * frac / rate;
return &InterpolatedBounds;
}
}
ANIM_FRAME* GetBestFrame(ITEM_INFO* item)
{
int rate = 0;
ANIM_FRAME* framePtr[2];
int frac = GetFrame(item, framePtr, &rate);
if (frac <= (rate >> 1))
return framePtr[0];
else
return framePtr[1];
}
int GetFrame(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate)
{
ANIM_STRUCT *anim;
int frm;
int first, second;
int interp, rat;
frm = item->frameNumber;
anim = &g_Level.Anims[item->animNumber];
framePtr[0] = framePtr[1] = &g_Level.Frames[anim->framePtr];
rat = *rate = anim->interpolation & 0x00ff;
frm -= anim->frameBase;
first = frm / rat;
interp = frm % rat;
framePtr[0] += first; // Get Frame pointers
framePtr[1] = framePtr[0] + 1; // and store away
if (interp == 0)
return(0);
second = first * rat + rat;
if (second>anim->frameEnd) // Clamp KeyFrame to End if need be
*rate = anim->frameEnd - (second - rat);
return(interp);
}
void DrawAnimatingItem(ITEM_INFO* item)
{
// TODO: to refactor
// Empty stub because actually we disable items drawing when drawRoutine pointer is NULL in OBJECT_INFO
}
void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum)
{
if (LM_enum >= NUM_LARA_MESHES)
LM_enum = LM_HEAD;
Vector3 p = Vector3(pos->x, pos->y, pos->z);
g_Renderer.getLaraAbsBonePosition(&p, LM_enum);
pos->x = p.x;
pos->y = p.y;
pos->z = p.z;
}
void ClampRotation(PHD_3DPOS* pos, short angle, short rot)
{
if (angle <= rot)
{
if (angle >= -rot)
pos->yRot += angle;
else
pos->yRot -= rot;
}
else
{
pos->yRot += rot;
}
}

30
TR5Main/Game/animation.h Normal file
View file

@ -0,0 +1,30 @@
#pragma once
#include "box.h"
struct PHD_3DPOS;
struct PHD_VECTOR;
struct ANIM_FRAME;
struct ITEM_INFO;
enum ANIMCOMMAND_TYPES
{
COMMAND_NULL = 0,
COMMAND_MOVE_ORIGIN,
COMMAND_JUMP_VELOCITY,
COMMAND_ATTACK_READY,
COMMAND_DEACTIVATE,
COMMAND_SOUND_FX,
COMMAND_EFFECT
};
void AnimateItem(ITEM_INFO* item);
void TranslateItem(ITEM_INFO* item, int x, int y, int z);
int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim);
int GetFrame(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate);
ANIM_FRAME* GetBestFrame(ITEM_INFO* item);
BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item);
void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum);
void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint);
void ClampRotation(PHD_3DPOS* pos, short angle, short rot);
void DrawAnimatingItem(ITEM_INFO* item);

View file

@ -3,7 +3,7 @@
#include "effects/tomb4fx.h" #include "effects/tomb4fx.h"
#include "lot.h" #include "lot.h"
#include "Lara.h" #include "Lara.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "camera.h" #include "camera.h"
#include "control.h" #include "control.h"
@ -11,7 +11,7 @@
#include "setup.h" #include "setup.h"
#include "Specific/trmath.h" #include "Specific/trmath.h"
#include "objectslist.h" #include "objectslist.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#define CHECK_CLICK(x) CLICK(x) / 2 #define CHECK_CLICK(x) CLICK(x) / 2
#define ESCAPE_DIST SECTOR(5) #define ESCAPE_DIST SECTOR(5)

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "camera.h" #include "camera.h"
#include "draw.h" #include "animation.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "effects\debris.h" #include "effects\debris.h"

View file

@ -2,7 +2,7 @@
#include "control.h" #include "control.h"
#include "control\los.h" #include "control\los.h"
#include "collide.h" #include "collide.h"
#include "draw.h" #include "animation.h"
#include "Lara.h" #include "Lara.h"
#include "items.h" #include "items.h"
#include "effects\effects.h" #include "effects\effects.h"

View file

@ -1,15 +1,14 @@
#include "framework.h" #include "framework.h"
#include <process.h> #include <process.h>
#include "winmain.h"
#include "collide.h" #include "collide.h"
#include "control.h" #include "control.h"
#include "pickup.h" #include "pickup.h"
#include "camera.h" #include "camera.h"
#include "Lara.h" #include "Lara.h"
#include "effects/hair.h" #include "effects/hair.h"
#include "effects/flmtorch.h"
#include "items.h" #include "items.h"
#include "flipeffect.h" #include "flipeffect.h"
#include "draw.h"
#ifdef NEW_INV #ifdef NEW_INV
#include "newinv2.h" #include "newinv2.h"
#else #else
@ -21,10 +20,10 @@
#include "Sound/sound.h" #include "Sound/sound.h"
#include "spotcam.h" #include "spotcam.h"
#include "box.h" #include "box.h"
#include "objects.h"
#include "sphere.h" #include "sphere.h"
#include "level.h" #include "level.h"
#include "input.h" #include "input.h"
#include "winmain.h"
#include "setup.h" #include "setup.h"
#include "effects/effects.h" #include "effects/effects.h"
#include "effects/tomb4fx.h" #include "effects/tomb4fx.h"
@ -100,6 +99,13 @@ extern Inventory g_Inventory;
short IsRoomOutsideNo; short IsRoomOutsideNo;
std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE]; std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE];
int DrawPhase()
{
g_Renderer.Draw();
Camera.numberFrames = g_Renderer.SyncRenderer();
return Camera.numberFrames;
}
GAME_STATUS ControlPhase(int numFrames, int demoMode) GAME_STATUS ControlPhase(int numFrames, int demoMode)
{ {
short oldLaraFrame; short oldLaraFrame;
@ -150,7 +156,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
{ {
if (TrInput & IN_PAUSE && GLOBAL_invMode != IM_PAUSE && LaraItem->hitPoints > 0) if (TrInput & IN_PAUSE && GLOBAL_invMode != IM_PAUSE && LaraItem->hitPoints > 0)
{ {
SOUND_Stop(); Sound_Stop();
g_Renderer.DumpGameScene(); g_Renderer.DumpGameScene();
GLOBAL_invMode = IM_PAUSE; GLOBAL_invMode = IM_PAUSE;
pause_menu_to_display = pause_main_menu; pause_menu_to_display = pause_main_menu;
@ -159,7 +165,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
else if ((DbInput & IN_DESELECT || GLOBAL_enterinventory != NO_ITEM) && LaraItem->hitPoints > 0) else if ((DbInput & IN_DESELECT || GLOBAL_enterinventory != NO_ITEM) && LaraItem->hitPoints > 0)
{ {
// Stop all sounds // Stop all sounds
SOUND_Stop(); Sound_Stop();
if (S_CallInventory2()) if (S_CallInventory2())
return GAME_STATUS_LOAD_GAME; return GAME_STATUS_LOAD_GAME;
@ -182,7 +188,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
if ((DbInput & IN_DESELECT || g_Inventory.GetEnterObject() != NO_ITEM) && LaraItem->hitPoints > 0) if ((DbInput & IN_DESELECT || g_Inventory.GetEnterObject() != NO_ITEM) && LaraItem->hitPoints > 0)
{ {
// Stop all sounds // Stop all sounds
SOUND_Stop(); Sound_Stop();
int inventoryResult = g_Inventory.DoInventory(); int inventoryResult = g_Inventory.DoInventory();
switch (inventoryResult) switch (inventoryResult)
{ {
@ -421,7 +427,6 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
UpdateShockwaves(); UpdateShockwaves();
TEN::Entities::TR4::UpdateScarabs(); TEN::Entities::TR4::UpdateScarabs();
TEN::Entities::TR4::UpdateLocusts(); TEN::Entities::TR4::UpdateLocusts();
//Legacy_UpdateLightning();
AnimateWaterfalls(); AnimateWaterfalls();
// Rumble screen (like in submarine level of TRC) // Rumble screen (like in submarine level of TRC)
@ -496,7 +501,7 @@ GAME_STATUS DoTitle(int index)
InitialiseFXArray(true); InitialiseFXArray(true);
InitialisePickupDisplay(); InitialisePickupDisplay();
InitialiseCamera(); InitialiseCamera();
SOUND_Stop(); Sound_Stop();
// Run the level script // Run the level script
GameScriptLevel* level = g_GameFlow->Levels[index]; GameScriptLevel* level = g_GameFlow->Levels[index];
@ -614,7 +619,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame)
InitialiseFXArray(true); InitialiseFXArray(true);
InitialisePickupDisplay(); InitialisePickupDisplay();
InitialiseCamera(); InitialiseCamera();
SOUND_Stop(); Sound_Stop();
// Run the level script // Run the level script
GameScriptLevel* level = g_GameFlow->Levels[index]; GameScriptLevel* level = g_GameFlow->Levels[index];
@ -705,7 +710,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame)
while (true) while (true)
{ {
result = ControlPhase(nframes, 0); result = ControlPhase(nframes, 0);
nframes = DrawPhaseGame(); nframes = DrawPhase();
Sound_UpdateScene(); Sound_UpdateScene();
if (result == GAME_STATUS_EXIT_TO_TITLE || if (result == GAME_STATUS_EXIT_TO_TITLE ||
@ -715,7 +720,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame)
g_GameScript->OnEnd(); g_GameScript->OnEnd();
g_GameScript->FreeLevelScripts(); g_GameScript->FreeLevelScripts();
// Here is the only way for exiting from the loop // Here is the only way for exiting from the loop
SOUND_Stop(); Sound_Stop();
StopSoundTracks(); StopSoundTracks();
DisableBubbles(); DisableBubbles();
DisableDebris(); DisableDebris();
@ -725,16 +730,6 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame)
} }
} }
void TranslateItem(ITEM_INFO *item, int x, int y, int z)
{
float c = phd_cos(item->pos.yRot);
float s = phd_sin(item->pos.yRot);
item->pos.xPos += c * x + s * z;
item->pos.yPos += y;
item->pos.zPos += -s * x + c * z;
}
int GetWaterSurface(int x, int y, int z, short roomNumber) int GetWaterSurface(int x, int y, int z, short roomNumber)
{ {
ROOM_INFO *room = &g_Level.Rooms[roomNumber]; ROOM_INFO *room = &g_Level.Rooms[roomNumber];
@ -824,36 +819,6 @@ void KillMoveEffects()
ItemNewRoomNo = 0; ItemNewRoomNo = 0;
} }
int GetChange(ITEM_INFO *item, ANIM_STRUCT *anim)
{
if (item->currentAnimState == item->goalAnimState)
return 0;
if (anim->numberChanges <= 0)
return 0;
for (int i = 0; i < anim->numberChanges; i++)
{
CHANGE_STRUCT *change = &g_Level.Changes[anim->changeIndex + i];
if (change->goalAnimState == item->goalAnimState)
{
for (int j = 0; j < change->numberRanges; j++)
{
RANGE_STRUCT *range = &g_Level.Ranges[change->rangeIndex + j];
if (item->frameNumber >= range->startFrame && item->frameNumber <= range->endFrame)
{
item->animNumber = range->linkAnimNum;
item->frameNumber = range->linkFrameNum;
return 1;
}
}
}
}
return 0;
}
void AlterFloorHeight(ITEM_INFO *item, int height) void AlterFloorHeight(ITEM_INFO *item, int height)
{ {
FLOOR_INFO *floor; FLOOR_INFO *floor;
@ -926,185 +891,6 @@ int GetCeiling(FLOOR_INFO *floor, int x, int y, int z)
return GetCeilingHeight(ROOM_VECTOR{floor->Room, y}, x, z).value_or(NO_HEIGHT); return GetCeilingHeight(ROOM_VECTOR{floor->Room, y}, x, z).value_or(NO_HEIGHT);
} }
void AnimateItem(ITEM_INFO *item)
{
item->touchBits = 0;
item->hitStatus = false;
item->frameNumber++;
ANIM_STRUCT *anim = &g_Level.Anims[item->animNumber];
if (anim->numberChanges > 0 && GetChange(item, anim))
{
anim = &g_Level.Anims[item->animNumber];
item->currentAnimState = anim->currentAnimState;
if (item->requiredAnimState == item->currentAnimState)
item->requiredAnimState = 0;
}
if (item->frameNumber > anim->frameEnd)
{
if (anim->numberCommands > 0)
{
short *cmd = &g_Level.Commands[anim->commandIndex];
for (int i = anim->numberCommands; i > 0; i--)
{
switch (*(cmd++))
{
case COMMAND_MOVE_ORIGIN:
TranslateItem(item, cmd[0], cmd[1], cmd[2]);
cmd += 3;
break;
case COMMAND_JUMP_VELOCITY:
item->fallspeed = *(cmd++);
item->speed = *(cmd++);
item->gravityStatus = true;
break;
case COMMAND_DEACTIVATE:
if (Objects[item->objectNumber].intelligent && !item->afterDeath)
item->afterDeath = 1;
item->status = ITEM_DEACTIVATED;
break;
case COMMAND_SOUND_FX:
case COMMAND_EFFECT:
cmd += 2;
break;
default:
break;
}
}
}
item->animNumber = anim->jumpAnimNum;
item->frameNumber = anim->jumpFrameNum;
anim = &g_Level.Anims[item->animNumber];
if (item->currentAnimState != anim->currentAnimState)
{
item->currentAnimState = anim->currentAnimState;
item->goalAnimState = anim->currentAnimState;
}
if (item->requiredAnimState == item->currentAnimState)
item->requiredAnimState = 0;
}
if (anim->numberCommands > 0)
{
short *cmd = &g_Level.Commands[anim->commandIndex];
int flags;
int effectID = 0;
for (int i = anim->numberCommands; i > 0; i--)
{
switch (*(cmd++))
{
case COMMAND_MOVE_ORIGIN:
cmd += 3;
break;
case COMMAND_JUMP_VELOCITY:
cmd += 2;
break;
case COMMAND_SOUND_FX:
if (item->frameNumber != *cmd)
{
cmd += 2;
break;
}
flags = cmd[1] & 0xC000;
if (!Objects[item->objectNumber].waterCreature)
{
if (item->roomNumber == NO_ROOM)
{
item->pos.xPos = LaraItem->pos.xPos;
item->pos.yPos = LaraItem->pos.yPos - 762;
item->pos.zPos = LaraItem->pos.zPos;
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
else if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER)
{
if (!flags || flags == SFX_WATERONLY && (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER || Objects[item->objectNumber].intelligent))
{
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
}
else if (!flags || flags == SFX_LANDONLY && !(g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER))
{
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2);
}
}
else
{
if (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER)
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 1);
else
SoundEffect(cmd[1] & 0x3FFF, &item->pos, 0);
}
break;
case COMMAND_EFFECT:
if (item->frameNumber != *cmd)
{
cmd += 2;
break;
}
FXType = cmd[1] & 0xC000;
effectID = cmd[1] & 0x3FFF;
DoFlipEffect(effectID, item);
cmd += 2;
break;
default:
break;
}
}
}
int lateral = 0;
if (item->gravityStatus)
{
item->fallspeed += (item->fallspeed >= 128 ? 1 : 6);
item->pos.yPos += item->fallspeed;
}
else
{
int velocity = anim->velocity;
if (anim->acceleration)
velocity += anim->acceleration * (item->frameNumber - anim->frameBase);
item->speed = velocity >> 16;
lateral = anim->Xvelocity;
if (anim->Xacceleration)
lateral += anim->Xacceleration * (item->frameNumber - anim->frameBase);
lateral >>= 16;
}
item->pos.xPos += item->speed * phd_sin(item->pos.yRot);
item->pos.zPos += item->speed * phd_cos(item->pos.yRot);
item->pos.xPos += lateral * phd_sin(item->pos.yRot + ANGLE(90));
item->pos.zPos += lateral * phd_cos(item->pos.yRot + ANGLE(90));
// Update matrices
short itemNumber = item - g_Level.Items.data();
g_Renderer.updateItemAnimations(itemNumber, true);
}
void RumbleScreen() void RumbleScreen()
{ {
if (!(GlobalCounter & 0x1FF)) if (!(GlobalCounter & 0x1FF))

View file

@ -33,17 +33,6 @@ enum HEADINGS
WEST WEST
}; };
enum COMMAND_TYPES
{
COMMAND_NULL = 0,
COMMAND_MOVE_ORIGIN,
COMMAND_JUMP_VELOCITY,
COMMAND_ATTACK_READY,
COMMAND_DEACTIVATE,
COMMAND_SOUND_FX,
COMMAND_EFFECT
};
#define OUTSIDE_Z 64 #define OUTSIDE_Z 64
#define OUTSIDE_SIZE 108 #define OUTSIDE_SIZE 108
@ -84,6 +73,8 @@ extern int LastInventoryItem;
extern std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE]; extern std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE];
extern short IsRoomOutsideNo; extern short IsRoomOutsideNo;
int DrawPhase();
GAME_STATUS DoTitle(int index); GAME_STATUS DoTitle(int index);
GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame); GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame);
GAME_STATUS ControlPhase(int numFrames, int demoMode); GAME_STATUS ControlPhase(int numFrames, int demoMode);
@ -91,9 +82,6 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode);
int GetRandomControl(); int GetRandomControl();
int GetRandomDraw(); int GetRandomDraw();
int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim);
void AnimateItem(ITEM_INFO* item);
void TranslateItem(ITEM_INFO* item, int x, int y, int z);
void KillMoveItems(); void KillMoveItems();
void KillMoveEffects(); void KillMoveEffects();
void UpdateShatters(); void UpdateShatters();
@ -106,8 +94,6 @@ void RefreshCamera(short type, short* data);
void ResetGlobals(); void ResetGlobals();
void AnimateWaterfalls();
void AlterFloorHeight(ITEM_INFO* item, int height); void AlterFloorHeight(ITEM_INFO* item, int height);
int GetFloorHeight(FLOOR_INFO* floor, int x, int y, int z); int GetFloorHeight(FLOOR_INFO* floor, int x, int y, int z);
FLOOR_INFO* GetFloor(int x, int y, int z, short* roomNumber); FLOOR_INFO* GetFloor(int x, int y, int z, short* roomNumber);
@ -118,5 +104,4 @@ int ExplodeItemNode(ITEM_INFO* item, int Node, int NoXZVel, int bits);
int GetWaterSurface(int x, int y, int z, short roomNumber); int GetWaterSurface(int x, int y, int z, short roomNumber);
int GetWaterHeight(int x, int y, int z, short roomNumber); int GetWaterHeight(int x, int y, int z, short roomNumber);
unsigned CALLBACK GameMain(void*); unsigned CALLBACK GameMain(void*);

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "los.h" #include "los.h"
#include "draw.h" #include "animation.h"
#include "Sound/sound.h" #include "Sound/sound.h"
#include "objects.h" #include "objects.h"
#include "switch.h" #include "switch.h"

View file

@ -2,7 +2,7 @@
#include "room.h" #include "room.h"
#include "setup.h" #include "setup.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#include "savegame.h" #include "savegame.h"
#include "RenderEnums.h" #include "RenderEnums.h"
#include "Renderer11.h" #include "Renderer11.h"

View file

@ -1,122 +0,0 @@
#include "framework.h"
#include "draw.h"
#include "Lara.h"
#include "camera.h"
#include "level.h"
#include "Renderer11.h"
using TEN::Renderer::g_Renderer;
BITE_INFO EnemyBites[9] =
{
{ 20, -95, 240, 13 },
{ 48, 0, 180, -11 },
{ -48, 0, 180, 14 },
{ -48, 5, 225, 14 },
{ 15, -60, 195, 13 },
{ -30, -65, 250, 18 },
{ 0, -110, 480, 13 },
{ -20, -80, 190, -10 },
{ 10, -60, 200, 13 }
};
BOUNDING_BOX InterpolatedBounds;
int DrawPhaseGame()
{
g_Renderer.Draw();
Camera.numberFrames = g_Renderer.SyncRenderer();
return Camera.numberFrames;
}
BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item)
{
int rate = 0;
ANIM_FRAME* framePtr[2];
int frac = GetFrame_D2(item, framePtr, &rate);
if (frac == 0)
return &framePtr[0]->boundingBox;
else
{
InterpolatedBounds.X1 = framePtr[0]->boundingBox.X1 + (framePtr[1]->boundingBox.X1 - framePtr[0]->boundingBox.X1) * frac / rate;
InterpolatedBounds.X2 = framePtr[0]->boundingBox.X2 + (framePtr[1]->boundingBox.X2 - framePtr[0]->boundingBox.X2) * frac / rate;
InterpolatedBounds.Y1 = framePtr[0]->boundingBox.Y1 + (framePtr[1]->boundingBox.Y1 - framePtr[0]->boundingBox.Y1) * frac / rate;
InterpolatedBounds.Y2 = framePtr[0]->boundingBox.Y2 + (framePtr[1]->boundingBox.Y2 - framePtr[0]->boundingBox.Y2) * frac / rate;
InterpolatedBounds.Z1 = framePtr[0]->boundingBox.Z1 + (framePtr[1]->boundingBox.Z1 - framePtr[0]->boundingBox.Z1) * frac / rate;
InterpolatedBounds.Z2 = framePtr[0]->boundingBox.Z2 + (framePtr[1]->boundingBox.Z2 - framePtr[0]->boundingBox.Z2) * frac / rate;
return &InterpolatedBounds;
}
}
ANIM_FRAME* GetBestFrame(ITEM_INFO* item)
{
int rate = 0;
ANIM_FRAME* framePtr[2];
int frac = GetFrame_D2(item, framePtr, &rate);
if (frac <= (rate >> 1))
return framePtr[0];
else
return framePtr[1];
}
int GetFrame_D2(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate)
{
ANIM_STRUCT *anim;
int frm;
int first, second;
int interp, rat;
frm = item->frameNumber;
anim = &g_Level.Anims[item->animNumber];
framePtr[0] = framePtr[1] = &g_Level.Frames[anim->framePtr];
rat = *rate = anim->interpolation & 0x00ff;
frm -= anim->frameBase;
first = frm / rat;
interp = frm % rat;
framePtr[0] += first; // Get Frame pointers
framePtr[1] = framePtr[0] + 1; // and store away
if (interp == 0)
return(0);
second = first * rat + rat;
if (second>anim->frameEnd) // Clamp KeyFrame to End if need be
*rate = anim->frameEnd - (second - rat);
return(interp);
}
void DrawAnimatingItem(ITEM_INFO* item)
{
// TODO: to refactor
// Empty stub because actually we disable items drawing when drawRoutine pointer is NULL in OBJECT_INFO
}
void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum)
{
if (LM_enum >= NUM_LARA_MESHES)
LM_enum = LM_HEAD;
Vector3 p = Vector3(pos->x, pos->y, pos->z);
g_Renderer.getLaraAbsBonePosition(&p, LM_enum);
pos->x = p.x;
pos->y = p.y;
pos->z = p.z;
}
void ClampRotation(PHD_3DPOS* pos, short angle, short rot)
{
if (angle <= rot)
{
if (angle >= -rot)
pos->yRot += angle;
else
pos->yRot -= rot;
}
else
{
pos->yRot += rot;
}
}

View file

@ -1,17 +0,0 @@
#pragma once
#include "Box.h"
struct PHD_3DPOS;
struct PHD_VECTOR;
struct ANIM_FRAME;
struct ITEM_INFO;
extern BITE_INFO EnemyBites[9];
int DrawPhaseGame();
int GetFrame_D2(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate);
BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item);
ANIM_FRAME* GetBestFrame(ITEM_INFO* item);
void DrawAnimatingItem(ITEM_INFO* item);
void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum);
void ClampRotation(PHD_3DPOS* pos, short angle, short rot);

View file

@ -4,7 +4,7 @@
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "control.h" #include "control.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#include "level.h" #include "level.h"
#include "smoke.h" #include "smoke.h"
#include "spark.h" #include "spark.h"

View file

@ -1,5 +1,5 @@
#include "framework.h" #include "framework.h"
#include "draw.h" #include "animation.h"
#include "effects.h" #include "effects.h"
#include "lara.h" #include "lara.h"
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"

View file

@ -3,7 +3,7 @@
#include "effects/effects.h" #include "effects/effects.h"
#include "lara_flare.h" #include "lara_flare.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#include "items.h" #include "items.h"
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#include "control.h" #include "control.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#include "effects\groundfx.h" #include "effects\groundfx.h"
#include "effects\footprint.h" #include "effects\footprint.h"
#include "level.h" #include "level.h"

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#include "hair.h" #include "hair.h"
#include "draw.h" #include "animation.h"
#include "lara.h" #include "lara.h"
#include "control.h" #include "control.h"
#include "GameFlowScript.h" #include "GameFlowScript.h"

View file

@ -2,7 +2,7 @@
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "Sound\sound.h" #include "Sound\sound.h"
@ -11,10 +11,10 @@
#include "GameFlowScript.h" #include "GameFlowScript.h"
#include "smoke.h" #include "smoke.h"
#include "drip.h" #include "drip.h"
#include <effects.h> #include "effects.h"
#include "Renderer11.h" #include "Renderer11.h"
#include <effects.h> #include "effects.h"
#include <draw.h> #include "animation.h"
using std::vector; using std::vector;
using TEN::Renderer::g_Renderer; using TEN::Renderer::g_Renderer;

View file

@ -2,7 +2,7 @@
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "gameflow.h" #include "gameflow.h"
@ -16,7 +16,7 @@
#include "Renderer11.h" #include "Renderer11.h"
#include "effects/effects.h" #include "effects/effects.h"
#include "effects/weather.h" #include "effects/weather.h"
#include "draw.h" #include "animation.h"
using std::vector; using std::vector;
using TEN::Renderer::g_Renderer; using TEN::Renderer::g_Renderer;

View file

@ -3,7 +3,7 @@
#include "Lara.h" #include "Lara.h"
#include "lot.h" #include "lot.h"
#include "effects\hair.h" #include "effects\hair.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "gameflow.h" #include "gameflow.h"
#include "draw.h" #include "animation.h"
#include "savegame.h" #include "savegame.h"
#include "input.h" #include "input.h"

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "health.h" #include "health.h"
#include "draw.h" #include "animation.h"
#include "pickup.h" #include "pickup.h"
#include "lara.h" #include "lara.h"
#include "camera.h" #include "camera.h"

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#ifndef NEW_INV #ifndef NEW_INV
#include "inventory.h" #include "inventory.h"
#include "draw.h" #include "animation.h"
#include "control.h" #include "control.h"
#include "lara_fire.h" #include "lara_fire.h"
#include "gameflow.h" #include "gameflow.h"

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "phd_global.h" #include "phd_global.h"
#include <vector> #include <vector>
struct BOX_NODE { struct BOX_NODE {
int exitBox; int exitBox;
int searchNumber; int searchNumber;

View file

@ -4,7 +4,7 @@
#include <cstddef> #include <cstddef>
#include "upv_info.h" #include "upv_info.h"
#include "skidoo_info.h" #include "skidoo_info.h"
#include "door_data.h" #include "itemdata/door_data.h"
#include "kayak_info.h" #include "kayak_info.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "jeep_info.h" #include "jeep_info.h"
@ -13,7 +13,7 @@
#include "biggun_info.h" #include "biggun_info.h"
#include "quad_info.h" #include "quad_info.h"
#include "tr5_laserhead_info.h" #include "tr5_laserhead_info.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "boat_info.h" #include "boat_info.h"
#include "rubberboat_info.h" #include "rubberboat_info.h"
#include <stdexcept> #include <stdexcept>

View file

@ -5,7 +5,8 @@
#include "camera.h" #include "camera.h"
#include "lara.h" #include "lara.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#define DEFAULT_FLY_UPDOWN_SPEED 16 #define DEFAULT_FLY_UPDOWN_SPEED 16
#define DEFAULT_SWIM_UPDOWN_SPEED 32 #define DEFAULT_SWIM_UPDOWN_SPEED 32

View file

@ -3,8 +3,8 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
using std::vector; using std::vector;
short GF(short animIndex, short frameToStart) short GF(short animIndex, short frameToStart)
{ {

View file

@ -3,7 +3,7 @@
#include "Sound\sound.h" #include "Sound\sound.h"
#include "items.h" #include "items.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "effects\debris.h" #include "effects\debris.h"
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#ifdef NEW_INV #ifdef NEW_INV
#include "newinv2.h" #include "newinv2.h"
#include "draw.h" #include "animation.h"
#include "control.h" #include "control.h"
#include "lara_fire.h" #include "lara_fire.h"
#include "gameflow.h" #include "gameflow.h"

View file

@ -2,7 +2,7 @@
#include "objects.h" #include "objects.h"
#include "items.h" #include "items.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "Lara.h" #include "Lara.h"
#include "sphere.h" #include "sphere.h"
#include "effects\debris.h" #include "effects\debris.h"

View file

@ -1,13 +1,13 @@
#include "framework.h" #include "framework.h"
#include "people.h" #include "people.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "control\los.h" #include "control\los.h"
#include "sphere.h" #include "sphere.h"
#include "effects\debris.h" #include "effects\debris.h"
#include "lara.h" #include "lara.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
int ShotLara(ITEM_INFO* item, AI_INFO* info, BITE_INFO* gun, short extra_rotation, int damage) int ShotLara(ITEM_INFO* item, AI_INFO* info, BITE_INFO* gun, short extra_rotation, int damage)
{ {

View file

@ -2,7 +2,7 @@
#include "pickup.h" #include "pickup.h"
#include "Specific/phd_global.h" #include "Specific/phd_global.h"
#include "lara.h" #include "lara.h"
#include "draw.h" #include "animation.h"
#ifdef NEW_INV #ifdef NEW_INV
#include "newinv2.h" #include "newinv2.h"
#else #else

View file

@ -9,7 +9,7 @@
#endif #endif
#include "switch.h" #include "switch.h"
#include "pickup.h" #include "pickup.h"
#include "draw.h" #include "animation.h"
#include "control.h" #include "control.h"
#include "puzzles_keys.h" #include "puzzles_keys.h"
#include "generic_switch.h" #include "generic_switch.h"

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "rope.h" #include "rope.h"
#include "draw.h" #include "animation.h"
#include "lara.h" #include "lara.h"
#include "level.h" #include "level.h"
#include "input.h" #include "input.h"

View file

@ -15,7 +15,7 @@
#include "tr5_bats_emitter.h" #include "tr5_bats_emitter.h"
#include "tr5_spider_emitter.h" #include "tr5_spider_emitter.h"
#include "fullblock_switch.h" #include "fullblock_switch.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
using namespace TEN::Entities::Switches; using namespace TEN::Entities::Switches;

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "sphere.h" #include "sphere.h"
#include "draw.h" #include "animation.h"
#include "lara.h" #include "lara.h"
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"
@ -111,51 +111,6 @@ int TestCollision(ITEM_INFO* item, ITEM_INFO* l)
} }
} }
void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index)
{
short* ptr = &frameptr[0];
ptr += 9;
for (int i = 0; i < index; i++)
{
ptr += ((*ptr & 0xc000) == 0 ? 2 : 1);
}
int rot0 = *ptr++;
int frameMode = (rot0 & 0xc000);
int rot1;
int rotX;
int rotY;
int rotZ;
switch (frameMode)
{
case 0:
rot1 = *ptr++;
rotX = ((rot0 & 0x3ff0) >> 4);
rotY = (((rot1 & 0xfc00) >> 10) | ((rot0 & 0xf) << 6) & 0x3ff);
rotZ = ((rot1) & 0x3ff);
*matrix = Matrix::CreateFromYawPitchRoll(rotY * (360.0f / 1024.0f) * RADIAN,
rotX * (360.0f / 1024.0f) * RADIAN,
rotZ * (360.0f / 1024.0f) * RADIAN);
break;
case 0x4000:
*matrix = Matrix::CreateRotationX((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN);
break;
case 0x8000:
*matrix = Matrix::CreateRotationY((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN);
break;
case 0xc000:
*matrix = Matrix::CreateRotationZ((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN);
break;
}
}
void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint)
{ {
// Get the real item number // Get the real item number

View file

@ -20,5 +20,3 @@ extern SPHERE CreatureSpheres[MAX_SPHERES];
int TestCollision(ITEM_INFO* item, ITEM_INFO* l); int TestCollision(ITEM_INFO* item, ITEM_INFO* l);
int GetSpheres(ITEM_INFO* item, SPHERE* ptr, int worldSpace, Matrix local); int GetSpheres(ITEM_INFO* item, SPHERE* ptr, int worldSpace, Matrix local);
void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint);
void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index);

View file

@ -2,7 +2,7 @@
#include "spotcam.h" #include "spotcam.h"
#include "camera.h" #include "camera.h"
#include "control.h" #include "control.h"
#include "draw.h" #include "animation.h"
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "lara.h" #include "lara.h"
#include "input.h" #include "input.h"

View file

@ -9,7 +9,7 @@
#else #else
#include "inventory.h" #include "inventory.h"
#endif #endif
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "camera.h" #include "camera.h"
#include "setup.h" #include "setup.h"

View file

@ -1,6 +1,6 @@
#include "framework.h" #include "framework.h"
#include "text.h" #include "text.h"
#include "draw.h" #include "animation.h"
#include "Renderer11.h" #include "Renderer11.h"
namespace TEN::Renderer { namespace TEN::Renderer {
void PrintString(int x, int y, int unk1, char* string, int unk2) { void PrintString(int x, int y, int unk1, char* string, int unk2) {

View file

@ -1,4 +1,4 @@
#pragma once #pragma once
#include "draw.h" #include "animation.h"
void PrintString(int x, int y, int unk1, char* string, int unk2); void PrintString(int x, int y, int unk1, char* string, int unk2);

View file

@ -9,7 +9,7 @@
#include "sphere.h" #include "sphere.h"
#include "camera.h" #include "camera.h"
#include "tr5_light.h" #include "tr5_light.h"
#include "draw.h" #include "animation.h"
#include "level.h" #include "level.h"
#include "input.h" #include "input.h"
#include "Sound/sound.h" #include "Sound/sound.h"

View file

@ -3,7 +3,7 @@
#include "effects\debris.h" #include "effects\debris.h"
#include "items.h" #include "items.h"
#include "traps.h" #include "traps.h"
#include "draw.h" #include "animation.h"
#include "effects\tomb4fx.h" #include "effects\tomb4fx.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "level.h" #include "level.h"

View file

@ -1,12 +1,12 @@
#include "framework.h" #include "framework.h"
#include "tr4_locusts.h" #include "tr4_locusts.h"
#include "Sound\sound.h" #include "Sound/sound.h"
#include "Specific\trmath.h" #include "Specific/trmath.h"
#include "sphere.h" #include "sphere.h"
#include "misc.h"
#include "lara.h" #include "lara.h"
#include "effects\tomb4fx.h" #include "effects/tomb4fx.h"
#include "collide.h" #include "collide.h"
#include "animation.h"
namespace TEN::Entities::TR4 { namespace TEN::Entities::TR4 {
LOCUST_INFO Locusts[MAX_LOCUSTS]; LOCUST_INFO Locusts[MAX_LOCUSTS];

View file

@ -3,7 +3,7 @@
#include "effects\effects.h" #include "effects\effects.h"
#include "control.h" #include "control.h"
#include "setup.h" #include "setup.h"
#include "draw.h" #include "animation.h"
#include "lara.h" #include "lara.h"
#include "lara_collide.h" #include "lara_collide.h"
#include "Sound\sound.h" #include "Sound\sound.h"

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "lara.h" #include "lara.h"

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "cog_switch.h" #include "cog_switch.h"
#include "objectslist.h" #include "objectslist.h"
@ -17,7 +17,7 @@
#include "lara.h" #include "lara.h"
#include "trmath.h" #include "trmath.h"
#include "misc.h" #include "misc.h"
#include "door_data.h" #include "itemdata/door_data.h"
#include "collide.h" #include "collide.h"
#include "itemdata/itemdata.h" #include "itemdata/itemdata.h"

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "lara.h" #include "lara.h"
@ -17,7 +17,7 @@
#include "misc.h" #include "misc.h"
#include "pushpull_kick_door.h" #include "pushpull_kick_door.h"
#include "collide.h" #include "collide.h"
#include "door_data.h" #include "itemdata/door_data.h"
namespace TEN::Entities::Doors namespace TEN::Entities::Doors
{ {

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "lara.h" #include "lara.h"
@ -17,7 +17,7 @@
#include "misc.h" #include "misc.h"
#include "sequence_door.h" #include "sequence_door.h"
#include "fullblock_switch.h" #include "fullblock_switch.h"
#include "door_data.h" #include "itemdata/door_data.h"
using namespace TEN::Entities::Switches; using namespace TEN::Entities::Switches;

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "lara.h" #include "lara.h"

View file

@ -9,7 +9,7 @@
#include "input.h" #include "input.h"
#include "pickup.h" #include "pickup.h"
#include "sound.h" #include "sound.h"
#include "draw.h" #include "animation.h"
#include "sphere.h" #include "sphere.h"
#include "lara_struct.h" #include "lara_struct.h"
#include "lara.h" #include "lara.h"

View file

@ -5,6 +5,7 @@
#include "camera.h" #include "camera.h"
#include "control.h" #include "control.h"
#include "level.h" #include "level.h"
#include "animation.h"
OBJECT_COLLISION_BOUNDS CeilingTrapDoorBounds = {-256, 256, 0, 900, -768, -256, -1820, 1820, -5460, 5460, -1820, 1820}; OBJECT_COLLISION_BOUNDS CeilingTrapDoorBounds = {-256, 256, 0, 900, -768, -256, -1820, 1820, -5460, 5460, -1820, 1820};
static PHD_VECTOR CeilingTrapDoorPos = {0, 1056, -480}; static PHD_VECTOR CeilingTrapDoorPos = {0, 1056, -480};

View file

@ -4,10 +4,11 @@
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "door_data.h" #include "itemdata/door_data.h"
#include "Box.h" #include "box.h"
#include "generic_doors.h" #include "generic_doors.h"
#include "collide.h" #include "collide.h"
#include "animation.h"
using namespace TEN::Entities::Doors; using namespace TEN::Entities::Doors;

View file

@ -1,14 +1,14 @@
#include "framework.h" #include "framework.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "control.h"
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "crowbar_switch.h" #include "crowbar_switch.h"
#include "newinv2.h" #include "newinv2.h"
#include "Sound\sound.h" #include "Sound/sound.h"
#include "pickup.h" #include "pickup.h"
#include "level.h" #include "level.h"
#include "collide.h" #include "collide.h"
#include "animation.h"
namespace TEN::Entities::Switches namespace TEN::Entities::Switches
{ {

View file

@ -1,12 +1,12 @@
#include "framework.h" #include "framework.h"
#include "fullblock_switch.h" #include "fullblock_switch.h"
#include "control.h"
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "setup.h" #include "setup.h"
#include "collide.h" #include "collide.h"
#include "level.h" #include "level.h"
#include "animation.h"
namespace TEN::Entities::Switches namespace TEN::Entities::Switches
{ {

View file

@ -4,7 +4,7 @@
#include "lara.h" #include "lara.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "sphere.h" #include "sphere.h"
#include "draw.h" #include "animation.h"
#include "collide.h" #include "collide.h"
#include "floordata.h" #include "floordata.h"

View file

@ -1,11 +1,11 @@
#include "framework.h" #include "framework.h"
#include "rail_switch.h" #include "rail_switch.h"
#include "control.h"
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "level.h" #include "level.h"
#include "collide.h" #include "collide.h"
#include "animation.h"
namespace TEN::Entities::Switches namespace TEN::Entities::Switches
{ {

View file

@ -3,13 +3,12 @@
#include "control.h" #include "control.h"
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "generic_switch.h"
#include "sound.h" #include "sound.h"
#include "switch.h"
#include "setup.h" #include "setup.h"
#include "camera.h" #include "camera.h"
#include "level.h" #include "level.h"
#include "collide.h" #include "collide.h"
#include "animation.h"
namespace TEN::Entities::Switches namespace TEN::Entities::Switches
{ {

View file

@ -1,14 +1,12 @@
#include "framework.h" #include "framework.h"
#include "control.h"
#include "input.h" #include "input.h"
#include "lara.h" #include "lara.h"
#include "underwater_switch.h" #include "underwater_switch.h"
#include "newinv2.h"
#include "Sound\sound.h"
#include "generic_switch.h" #include "generic_switch.h"
#include "camera.h" #include "camera.h"
#include "collide.h" #include "collide.h"
#include "level.h" #include "level.h"
#include "animation.h"
namespace TEN::Entities::Switches namespace TEN::Entities::Switches
{ {

View file

@ -6,7 +6,7 @@
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "lara.h" #include "lara.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "control.h" #include "control.h"
BITE_INFO bearBite = { 0, 96, 335, 14 }; BITE_INFO bearBite = { 0, 96, 335, 14 };

View file

@ -10,7 +10,7 @@
#include "sphere.h" #include "sphere.h"
#include "lara_one_gun.h" #include "lara_one_gun.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "draw.h" #include "animation.h"
#include "collide.h" #include "collide.h"
#include "item.h" #include "item.h"
#include "setup.h" #include "setup.h"

View file

@ -1,12 +1,12 @@
#include "framework.h" #include "framework.h"
#include "tr1_doppelganger.h" #include "tr1_doppelganger.h"
#include "box.h"
#include "items.h" #include "items.h"
#include "lara_fire.h" #include "lara_fire.h"
#include "misc.h" #include "misc.h"
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "control.h" #include "control.h"
#include "animation.h"
// TODO: Evil lara is not targetable and cant move like lara. // TODO: Evil lara is not targetable and cant move like lara.

View file

@ -1,14 +1,15 @@
#include "framework.h" #include "framework.h"
#include "box.h" #include "box.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "items.h" #include "items.h"
#include "camera.h" #include "camera.h"
#include "setup.h" #include "setup.h"
#include "effects\tomb4fx.h" #include "effects/tomb4fx.h"
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "Sound\sound.h" #include "Sound/sound.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "animation.h"
enum abortion_anims { enum abortion_anims {
ABORT_EMPTY, ABORT_STOP, ABORT_TURNL, ABORT_TURNR, ABORT_ATTACK1, ABORT_ATTACK2, ABORT_EMPTY, ABORT_STOP, ABORT_TURNL, ABORT_TURNR, ABORT_ATTACK1, ABORT_ATTACK2,

View file

@ -8,7 +8,7 @@
#include "Sound\sound.h" #include "Sound\sound.h"
#include "effects\effects.h" #include "effects\effects.h"
#include "Specific\trmath.h" #include "Specific\trmath.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#define NATLA_NEAR_DEATH 200 #define NATLA_NEAR_DEATH 200

View file

@ -7,7 +7,7 @@
#include "setup.h" #include "setup.h"
#include "control.h" #include "control.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "control.h" #include "control.h"
BITE_INFO wolfBite = { 0, -14, 174, 6 }; BITE_INFO wolfBite = { 0, -14, 174, 6 };

View file

@ -19,7 +19,7 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "object_helper.h" #include "object_helper.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
static void StartBaddy(OBJECT_INFO* obj) static void StartBaddy(OBJECT_INFO* obj)
{ {

View file

@ -5,7 +5,7 @@
#include "lara.h" #include "lara.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO barracudaBite = { 2, -60, 121, 7 }; BITE_INFO barracudaBite = { 2, -60, 121, 7 };
void BarracudaControl(short itemNum) void BarracudaControl(short itemNum)

View file

@ -1,7 +1,7 @@
#include "framework.h" #include "framework.h"
#include "tr2_dragon.h" #include "tr2_dragon.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "items.h" #include "items.h"
#include "collide.h" #include "collide.h"
#include "box.h" #include "box.h"
@ -11,8 +11,9 @@
#include "level.h" #include "level.h"
#include "setup.h" #include "setup.h"
#include "input.h" #include "input.h"
#include "Sound\sound.h" #include "animation.h"
#include "creature_info.h" #include "Sound/sound.h"
#include "itemdata/creature_info.h"
#define DRAGON_SWIPE_DAMAGE 250 #define DRAGON_SWIPE_DAMAGE 250
#define DRAGON_TOUCH_DAMAGE 10 #define DRAGON_TOUCH_DAMAGE 10

View file

@ -6,7 +6,7 @@
#include "items.h" #include "items.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO eagleBite = { 15, 46, 21, 6 }; BITE_INFO eagleBite = { 15, 46, 21, 6 };
BITE_INFO crowBite = { 2, 10, 60, 14 }; BITE_INFO crowBite = { 2, 10, 60, 14 };

View file

@ -8,7 +8,7 @@
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "floordata.h" #include "floordata.h"
#include "collide.h" #include "collide.h"

View file

@ -6,7 +6,7 @@
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "Specific\trmath.h" #include "Specific\trmath.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO mercUziBite = { 0, 150, 19, 17 }; BITE_INFO mercUziBite = { 0, 150, 19, 17 };
BITE_INFO mercAutoPistolBite = { 0, 230, 9, 17 }; BITE_INFO mercAutoPistolBite = { 0, 230, 9, 17 };

View file

@ -6,7 +6,7 @@
#include "Sound\sound.h" #include "Sound\sound.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO monkBite = { -23,16,265, 14 }; BITE_INFO monkBite = { -23,16,265, 14 };
extern bool MonksAttackLara; extern bool MonksAttackLara;

View file

@ -6,7 +6,7 @@
#include "setup.h" #include "setup.h"
#include "control.h" #include "control.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "control.h" #include "control.h"
BITE_INFO ratBite = { 0, 0, 57, 2 }; BITE_INFO ratBite = { 0, 0, 57, 2 };

View file

@ -1,11 +1,12 @@
#include "framework.h" #include "framework.h"
#include "tr2_shark.h" #include "tr2_shark.h"
#include "box.h" #include "box.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "lara.h" #include "lara.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "animation.h"
BITE_INFO sharkBite = { 17, -22, 344, 12 }; BITE_INFO sharkBite = { 17, -22, 344, 12 };

View file

@ -5,7 +5,7 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO silencerGun = { 3, 331, 56, 10 }; BITE_INFO silencerGun = { 3, 331, 56, 10 };
void SilencerControl(short itemNum) void SilencerControl(short itemNum)

View file

@ -9,10 +9,13 @@
#include "sphere.h" #include "sphere.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "Sound\sound.h" #include "Sound/sound.h"
#include "snowmobile.h" #include "snowmobile.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "skidoo_info.h" #include "skidoo_info.h"
#include "animation.h"
enum SKIDMAN_STATE { SMAN_EMPTY, SMAN_WAIT, SMAN_MOVING, SMAN_STARTLEFT, SMAN_STARTRIGHT, SMAN_LEFT, SMAN_RIGHT, SMAN_DEATH }; enum SKIDMAN_STATE { SMAN_EMPTY, SMAN_WAIT, SMAN_MOVING, SMAN_STARTLEFT, SMAN_STARTRIGHT, SMAN_LEFT, SMAN_RIGHT, SMAN_DEATH };
#define SMAN_MIN_TURN (ANGLE(6.0f)/3) #define SMAN_MIN_TURN (ANGLE(6.0f)/3)

View file

@ -7,7 +7,7 @@
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO spearLeftBite = { 0, 0, 920, 11 }; BITE_INFO spearLeftBite = { 0, 0, 920, 11 };
BITE_INFO spearRightBite = { 0, 0, 920, 18 }; BITE_INFO spearRightBite = { 0, 0, 920, 18 };

View file

@ -1,16 +1,16 @@
#include "framework.h" #include "framework.h"
#include "tr2_spider.h" #include "tr2_spider.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "sphere.h"
#include "box.h" #include "box.h"
#include "items.h" #include "items.h"
#include "lot.h" #include "lot.h"
#include "lara.h" #include "lara.h"
#include "setup.h" #include "setup.h"
#include "effects\tomb4fx.h" #include "effects/tomb4fx.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "control.h" #include "control.h"
#include "animation.h"
BITE_INFO spiderBite = { 0, 0, 41, 1 }; BITE_INFO spiderBite = { 0, 0, 41, 1 };

View file

@ -8,7 +8,7 @@
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "Sound\sound.h" #include "Sound\sound.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO swordBite = { 0, 37, 550, 15 }; BITE_INFO swordBite = { 0, 37, 550, 15 };

View file

@ -5,7 +5,7 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO workerDualGunL = { -2, 275, 23, 6 }; BITE_INFO workerDualGunL = { -2, 275, 23, 6 };
BITE_INFO workerDualGunR = { 2, 275, 23, 10 }; BITE_INFO workerDualGunR = { 2, 275, 23, 10 };

View file

@ -1,18 +1,17 @@
#include "framework.h" #include "framework.h"
#include "tr2_worker_flamethrower.h" #include "tr2_worker_flamethrower.h"
#include "box.h" #include "box.h"
#include "sphere.h"
#include "people.h" #include "people.h"
#include "items.h" #include "items.h"
#include "missile.h" #include "missile.h"
#include "effects\tomb4fx.h" #include "effects/tomb4fx.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "effects\effects.h" #include "animation.h"
#include "Specific\trmath.h" #include "effects/effects.h"
#include "creature_info.h" #include "Specific/trmath.h"
#include "control.h" #include "itemdata/creature_info.h"
BITE_INFO workerFlameThrower = { 0, 250, 32, 9 }; BITE_INFO workerFlameThrower = { 0, 250, 32, 9 };

View file

@ -6,7 +6,7 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO workerMachineGun = { 0, 308, 32, 9 }; BITE_INFO workerMachineGun = { 0, 308, 32, 9 };

View file

@ -6,7 +6,7 @@
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "control.h" #include "control.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
BITE_INFO workerShotgun = { 0, 281, 40, 9 }; BITE_INFO workerShotgun = { 0, 281, 40, 9 };

View file

@ -6,7 +6,7 @@
#include "lara.h" #include "lara.h"
#include "setup.h" #include "setup.h"
#include "level.h" #include "level.h"
#include "creature_info.h" #include "itemdata/creature_info.h"
#include "control.h" #include "control.h"
BITE_INFO yetiBiteR = { 12, 101, 19, 10 }; BITE_INFO yetiBiteR = { 12, 101, 19, 10 };

View file

@ -4,7 +4,8 @@
#include "setup.h" #include "setup.h"
#include "control.h" #include "control.h"
#include "lara.h" #include "lara.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "animation.h"
void InitialiseKillerStatue(short itemNumber) void InitialiseKillerStatue(short itemNumber)
{ {

View file

@ -4,9 +4,10 @@
#include "control.h" #include "control.h"
#include "lara.h" #include "lara.h"
#include "setup.h" #include "setup.h"
#include "effects\effects.h" #include "effects/effects.h"
#include "Sound\sound.h" #include "Sound/sound.h"
#include "items.h" #include "items.h"
#include "animation.h"
void InitialiseSpinningBlade(short itemNumber) void InitialiseSpinningBlade(short itemNumber)
{ {

View file

@ -2,7 +2,7 @@
#include "tr2_springboard.h" #include "tr2_springboard.h"
#include "level.h" #include "level.h"
#include "lara.h" #include "lara.h"
#include "control.h" #include "animation.h"
void SpringBoardControl(short itemNumber) void SpringBoardControl(short itemNumber)
{ {

Some files were not shown because too many files have changed in this diff Show more