Fixed chase camera; Moved Camera in DLL;

This commit is contained in:
MontyTRC89 2020-04-12 06:50:43 +02:00
parent 26c9367b15
commit cbe9f362b6
28 changed files with 31 additions and 7 deletions

View file

@ -9,6 +9,7 @@
#include "draw.h"
#include "sphere.h"
#include "misc.h"
#include "camera.h"
#include "control.h"
#include "../Specific/setup.h"

View file

@ -47,6 +47,7 @@ int ExittingBinos = 0;
int LSHKShotsFired = 0;
PHD_VECTOR CamOldPos;
int TLFlag = 0;
CAMERA_INFO Camera;
void ActivateCamera()
{
@ -1575,7 +1576,7 @@ void CalculateCamera()
//Camera is in a water room, play water sound effect.
if ((Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER))
{
SoundEffect(SFX_UNDERWATER, NULL, 2);
SoundEffect(SFX_UNDERWATER, NULL, SFX_ALWAYS);
if (Camera.underwater == 0)
{
/*if (GLOBAL_playing_cutseq == 0 && TLFlag == 0)
@ -1632,7 +1633,7 @@ void CalculateCamera()
int dx = Camera.item->pos.xPos - item->pos.xPos;
int dz = Camera.item->pos.zPos - item->pos.zPos;
int shift = SQRT_ASM(SQUARE(dx) + SQUARE(dz));
short angle = ATAN(Camera.item->pos.zPos - item->pos.zPos, Camera.item->pos.xPos - item->pos.xPos) - item->pos.yRot;
short angle = ATAN(dz, dx) - item->pos.yRot;
short tilt = ATAN(shift, y - (bounds[2] + bounds[3]) / 2 - Camera.item->pos.yPos);
bounds = GetBoundsAccurate(Camera.item);
angle >>= 1;

View file

@ -4,7 +4,7 @@
#include <d3d9.h>
#include <d3dx9.h>
#define Camera VAR_U_(0x00EEF940, CAMERA_INFO)
//#define Camera VAR_U_(0x00EEF940, CAMERA_INFO)
#define ForcedFixedCamera VAR_U_(0x00EEFA20, GAME_VECTOR)
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
@ -23,6 +23,7 @@
#define UnknownCamera ((void(__cdecl*)()) 0x004975D0)
extern PHD_VECTOR CurrentCameraPosition;
extern CAMERA_INFO Camera;
void ActivateCamera();
void LookAt(int posX, int posY, int posZ, int targetX, int targetY, int targetZ, short roll);

View file

@ -13,6 +13,7 @@
#include "..\Specific\roomload.h"
#include "debris.h"
#include "../Specific/setup.h"
#include "camera.h"
int wf = 256;
extern std::deque<FOOTPRINT_STRUCT> footprints;

View file

@ -7,7 +7,7 @@
#include "sound.h"
#include "savegame.h"
#include "Lara.h"
#include "camera.h"
#include "..\Global\global.h"
#include "..\Specific\input.h"
#include "..\Specific\configuration.h"

View file

@ -16,6 +16,7 @@
#include "objects.h"
#include "sphere.h"
#include "traps.h"
#include "camera.h"
#include "..\Global\global.h"
#include "..\Scripting\GameFlowScript.h"

View file

@ -6,6 +6,7 @@
#include "tomb4fx.h"
#include "..\Specific\roomload.h"
#include "..\Specific\setup.h"
#include "camera.h"
PISTOL_DEF PistolsTable[4] =
{

View file

@ -5,6 +5,7 @@
#include "draw.h"
#include "sphere.h"
#include "laramisc.h"
#include "camera.h"
short LeftIntRightExtTab[4] = // offset 0xA0B7C
{

View file

@ -5,9 +5,8 @@
#include "laraflar.h"
#include "lara1gun.h"
#include "lara2gun.h"
#include "camera.h"
#include "..\Scripting\GameFlowScript.h"
#include <stdio.h>
#include "objects.h"
#include "effects.h"

View file

@ -14,6 +14,7 @@
#include "rope.h"
#include "draw.h"
#include "inventory.h"
#include "camera.h"
extern LaraExtraInfo g_LaraExtra;
extern GameFlow* g_GameFlow;

View file

@ -3,6 +3,7 @@
#include "..\Global\global.h"
#include <stdio.h>
#include "../Specific/setup.h"
#include "camera.h"
#define DEFAULT_FLY_UPDOWN_SPEED 16
#define DEFAULT_SWIM_UPDOWN_SPEED 32

View file

@ -14,6 +14,7 @@
#include "..\Game\sound.h"
#include "..\Specific\roomload.h"
#include "../Specific/setup.h"
#include "camera.h"
FileStream* SaveGame::m_stream;
ChunkReader* SaveGame::m_reader;

View file

@ -1,4 +1,5 @@
#include "sound.h"
#include "camera.h"
#include "..\Specific\configuration.h"
HSTREAM BASS_3D_Mixdown;

View file

@ -2,7 +2,7 @@
#include "..\Game\sound.h"
#define Camera VAR_U_(0x00EEF940, CAMERA_INFO)
//#define Camera VAR_U_(0x00EEF940, CAMERA_INFO)
#define ForcedFixedCamera VAR_U_(0x00EEFA20, GAME_VECTOR)
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
#define MallocBuffer VAR_U_(0x00E4B10C, char*)

View file

@ -2,6 +2,7 @@
#include "../../Game/Box.h"
#include "../../Game/effect2.h"
#include "../../Game/items.h"
#include "../../Game/camera.h"
#include "../../Specific/setup.h"
enum abortion_anims {

View file

@ -4,6 +4,7 @@
#include "../../Game/people.h"
#include "../../Game/lot.h"
#include "../../specific/setup.h"
#include "..\..\Game\camera.h"
enum PIERRE_STATE {
PEOPLE_EMPTY, PEOPLE_STOP, PEOPLE_WALK, PEOPLE_RUN, PEOPLE_AIM,

View file

@ -6,6 +6,7 @@
#include "../../Game/Box.h"
#include "../../Game/lot.h"
#include "../../Game/sphere.h"
#include "../../Game/camera.h"
#include "../../Specific/roomload.h"
#include "../../specific/setup.h"

View file

@ -1,6 +1,7 @@
#include "../newobjects.h"
#include "../../Game/items.h"
#include "../../Game/Box.h"
#include "../../Game/camera.h"
#include "../../Specific/setup.h"
void LaraTyrannosaurDeath(ITEM_INFO* item)

View file

@ -6,6 +6,7 @@
#include "../../Game/effect2.h"
#include "../../Game/draw.h"
#include "../../Game/tomb4fx.h"
#include "../../Game/camera.h"
#include "../../Specific/setup.h"
extern SMOKE_SPARKS SmokeSparks[MAX_SPARKS_SMOKE];

View file

@ -14,6 +14,7 @@
#include "../../Game/switch.h"
#include "../../Game/debris.h"
#include "../../Game/objects.h"
#include "../../Game/camera.h"
#include "../../Game/missile.h"
#include "../../Specific/setup.h"

View file

@ -14,6 +14,7 @@
#include "../../Game/effect2.h"
#include "../../Game/sphere.h"
#include "../../Game/traps.h"
#include "../../Game/camera.h"
#include "../../Specific/setup.h"
short SPyoffs[8] =

View file

@ -3,6 +3,7 @@
#include "../../Game/items.h"
#include "../../Game/collide.h"
#include "../../Game/sphere.h"
#include "../../Game/camera.h"
#include "../../Specific/setup.h"
extern LaraExtraInfo g_LaraExtra;

View file

@ -6,6 +6,7 @@
#include "../../Game/effects.h"
#include "../../Game/lara1gun.h"
#include "../../Game/items.h"
#include "../../Game/camera.h"
#include "../../Game/sphere.h"
#include "../../Game/laraflar.h"

View file

@ -7,6 +7,7 @@
#include "../../Game/sphere.h"
#include "../../Game/draw.h"
#include "../../Game/misc.h"
#include "../../Game/camera.h"
#include "..\..\Specific\roomload.h"
#include "../../Specific/setup.h"

View file

@ -4,6 +4,7 @@
#include "../../Game/items.h"
#include "../../Game/sphere.h"
#include "../../Game/collide.h"
#include "../../Game/camera.h"
#include "../../Game/effects.h"
#include "../../Game/laraflar.h"
#include <vector>

View file

@ -1,6 +1,7 @@
#pragma once
#include "Renderer11.h"
#include "../Specific/configuration.h"
#include "../Game/camera.h"
#include "../Game/draw.h"
#include "../Specific/setup.h"
extern GameConfiguration g_Configuration;

View file

@ -5,6 +5,7 @@
#include "../Game/tomb4fx.h"
#include "../Game/lara.h"
#include "../Game/draw.h"
#include "../Game/camera.h"
#include "../Game/debris.h"
#include "../Specific/setup.h"

View file

@ -9,6 +9,7 @@
#include "..\Game\missile.h"
#include "..\Game\control.h"
#include "..\Game\pickup.h"
#include "../Game/camera.h"
#include "..\Game\lara1gun.h"
#include "..\Game\laraflar.h"
#include "..\Game\larafire.h"