mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 08:47:58 +03:00
Fixed chase camera; Moved Camera in DLL;
This commit is contained in:
parent
26c9367b15
commit
cbe9f362b6
28 changed files with 31 additions and 7 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "sphere.h"
|
#include "sphere.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "camera.h"
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ int ExittingBinos = 0;
|
||||||
int LSHKShotsFired = 0;
|
int LSHKShotsFired = 0;
|
||||||
PHD_VECTOR CamOldPos;
|
PHD_VECTOR CamOldPos;
|
||||||
int TLFlag = 0;
|
int TLFlag = 0;
|
||||||
|
CAMERA_INFO Camera;
|
||||||
|
|
||||||
void ActivateCamera()
|
void ActivateCamera()
|
||||||
{
|
{
|
||||||
|
@ -1575,7 +1576,7 @@ void CalculateCamera()
|
||||||
//Camera is in a water room, play water sound effect.
|
//Camera is in a water room, play water sound effect.
|
||||||
if ((Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER))
|
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 (Camera.underwater == 0)
|
||||||
{
|
{
|
||||||
/*if (GLOBAL_playing_cutseq == 0 && TLFlag == 0)
|
/*if (GLOBAL_playing_cutseq == 0 && TLFlag == 0)
|
||||||
|
@ -1632,7 +1633,7 @@ void CalculateCamera()
|
||||||
int dx = Camera.item->pos.xPos - item->pos.xPos;
|
int dx = Camera.item->pos.xPos - item->pos.xPos;
|
||||||
int dz = Camera.item->pos.zPos - item->pos.zPos;
|
int dz = Camera.item->pos.zPos - item->pos.zPos;
|
||||||
int shift = SQRT_ASM(SQUARE(dx) + SQUARE(dz));
|
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);
|
short tilt = ATAN(shift, y - (bounds[2] + bounds[3]) / 2 - Camera.item->pos.yPos);
|
||||||
bounds = GetBoundsAccurate(Camera.item);
|
bounds = GetBoundsAccurate(Camera.item);
|
||||||
angle >>= 1;
|
angle >>= 1;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#include <d3dx9.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 ForcedFixedCamera VAR_U_(0x00EEFA20, GAME_VECTOR)
|
||||||
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
|
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
#define UnknownCamera ((void(__cdecl*)()) 0x004975D0)
|
#define UnknownCamera ((void(__cdecl*)()) 0x004975D0)
|
||||||
|
|
||||||
extern PHD_VECTOR CurrentCameraPosition;
|
extern PHD_VECTOR CurrentCameraPosition;
|
||||||
|
extern CAMERA_INFO Camera;
|
||||||
|
|
||||||
void ActivateCamera();
|
void ActivateCamera();
|
||||||
void LookAt(int posX, int posY, int posZ, int targetX, int targetY, int targetZ, short roll);
|
void LookAt(int posX, int posY, int posZ, int targetX, int targetY, int targetZ, short roll);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "..\Specific\roomload.h"
|
#include "..\Specific\roomload.h"
|
||||||
#include "debris.h"
|
#include "debris.h"
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
int wf = 256;
|
int wf = 256;
|
||||||
extern std::deque<FOOTPRINT_STRUCT> footprints;
|
extern std::deque<FOOTPRINT_STRUCT> footprints;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
#include "Lara.h"
|
#include "Lara.h"
|
||||||
|
#include "camera.h"
|
||||||
#include "..\Global\global.h"
|
#include "..\Global\global.h"
|
||||||
#include "..\Specific\input.h"
|
#include "..\Specific\input.h"
|
||||||
#include "..\Specific\configuration.h"
|
#include "..\Specific\configuration.h"
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "sphere.h"
|
#include "sphere.h"
|
||||||
#include "traps.h"
|
#include "traps.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
#include "..\Global\global.h"
|
#include "..\Global\global.h"
|
||||||
#include "..\Scripting\GameFlowScript.h"
|
#include "..\Scripting\GameFlowScript.h"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "tomb4fx.h"
|
#include "tomb4fx.h"
|
||||||
#include "..\Specific\roomload.h"
|
#include "..\Specific\roomload.h"
|
||||||
#include "..\Specific\setup.h"
|
#include "..\Specific\setup.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
PISTOL_DEF PistolsTable[4] =
|
PISTOL_DEF PistolsTable[4] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "sphere.h"
|
#include "sphere.h"
|
||||||
#include "laramisc.h"
|
#include "laramisc.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
short LeftIntRightExtTab[4] = // offset 0xA0B7C
|
short LeftIntRightExtTab[4] = // offset 0xA0B7C
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
#include "laraflar.h"
|
#include "laraflar.h"
|
||||||
#include "lara1gun.h"
|
#include "lara1gun.h"
|
||||||
#include "lara2gun.h"
|
#include "lara2gun.h"
|
||||||
|
#include "camera.h"
|
||||||
#include "..\Scripting\GameFlowScript.h"
|
#include "..\Scripting\GameFlowScript.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "rope.h"
|
#include "rope.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
#include "inventory.h"
|
#include "inventory.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
extern LaraExtraInfo g_LaraExtra;
|
extern LaraExtraInfo g_LaraExtra;
|
||||||
extern GameFlow* g_GameFlow;
|
extern GameFlow* g_GameFlow;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "..\Global\global.h"
|
#include "..\Global\global.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
|
#include "camera.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
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "..\Game\sound.h"
|
#include "..\Game\sound.h"
|
||||||
#include "..\Specific\roomload.h"
|
#include "..\Specific\roomload.h"
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
|
#include "camera.h"
|
||||||
|
|
||||||
FileStream* SaveGame::m_stream;
|
FileStream* SaveGame::m_stream;
|
||||||
ChunkReader* SaveGame::m_reader;
|
ChunkReader* SaveGame::m_reader;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
#include "camera.h"
|
||||||
#include "..\Specific\configuration.h"
|
#include "..\Specific\configuration.h"
|
||||||
|
|
||||||
HSTREAM BASS_3D_Mixdown;
|
HSTREAM BASS_3D_Mixdown;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "..\Game\sound.h"
|
#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 ForcedFixedCamera VAR_U_(0x00EEFA20, GAME_VECTOR)
|
||||||
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
|
#define UseForcedFixedCamera VAR_U_(0x00EEFA50, char)
|
||||||
#define MallocBuffer VAR_U_(0x00E4B10C, char*)
|
#define MallocBuffer VAR_U_(0x00E4B10C, char*)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "../../Game/Box.h"
|
#include "../../Game/Box.h"
|
||||||
#include "../../Game/effect2.h"
|
#include "../../Game/effect2.h"
|
||||||
#include "../../Game/items.h"
|
#include "../../Game/items.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
enum abortion_anims {
|
enum abortion_anims {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "../../Game/people.h"
|
#include "../../Game/people.h"
|
||||||
#include "../../Game/lot.h"
|
#include "../../Game/lot.h"
|
||||||
#include "../../specific/setup.h"
|
#include "../../specific/setup.h"
|
||||||
|
#include "..\..\Game\camera.h"
|
||||||
|
|
||||||
enum PIERRE_STATE {
|
enum PIERRE_STATE {
|
||||||
PEOPLE_EMPTY, PEOPLE_STOP, PEOPLE_WALK, PEOPLE_RUN, PEOPLE_AIM,
|
PEOPLE_EMPTY, PEOPLE_STOP, PEOPLE_WALK, PEOPLE_RUN, PEOPLE_AIM,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "../../Game/Box.h"
|
#include "../../Game/Box.h"
|
||||||
#include "../../Game/lot.h"
|
#include "../../Game/lot.h"
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/roomload.h"
|
#include "../../Specific/roomload.h"
|
||||||
#include "../../specific/setup.h"
|
#include "../../specific/setup.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "../newobjects.h"
|
#include "../newobjects.h"
|
||||||
#include "../../Game/items.h"
|
#include "../../Game/items.h"
|
||||||
#include "../../Game/Box.h"
|
#include "../../Game/Box.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
void LaraTyrannosaurDeath(ITEM_INFO* item)
|
void LaraTyrannosaurDeath(ITEM_INFO* item)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "../../Game/effect2.h"
|
#include "../../Game/effect2.h"
|
||||||
#include "../../Game/draw.h"
|
#include "../../Game/draw.h"
|
||||||
#include "../../Game/tomb4fx.h"
|
#include "../../Game/tomb4fx.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
extern SMOKE_SPARKS SmokeSparks[MAX_SPARKS_SMOKE];
|
extern SMOKE_SPARKS SmokeSparks[MAX_SPARKS_SMOKE];
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "../../Game/switch.h"
|
#include "../../Game/switch.h"
|
||||||
#include "../../Game/debris.h"
|
#include "../../Game/debris.h"
|
||||||
#include "../../Game/objects.h"
|
#include "../../Game/objects.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Game/missile.h"
|
#include "../../Game/missile.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "../../Game/effect2.h"
|
#include "../../Game/effect2.h"
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
#include "../../Game/traps.h"
|
#include "../../Game/traps.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
short SPyoffs[8] =
|
short SPyoffs[8] =
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "../../Game/items.h"
|
#include "../../Game/items.h"
|
||||||
#include "../../Game/collide.h"
|
#include "../../Game/collide.h"
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
extern LaraExtraInfo g_LaraExtra;
|
extern LaraExtraInfo g_LaraExtra;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "../../Game/effects.h"
|
#include "../../Game/effects.h"
|
||||||
#include "../../Game/lara1gun.h"
|
#include "../../Game/lara1gun.h"
|
||||||
#include "../../Game/items.h"
|
#include "../../Game/items.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
#include "../../Game/laraflar.h"
|
#include "../../Game/laraflar.h"
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
#include "../../Game/draw.h"
|
#include "../../Game/draw.h"
|
||||||
#include "../../Game/misc.h"
|
#include "../../Game/misc.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "..\..\Specific\roomload.h"
|
#include "..\..\Specific\roomload.h"
|
||||||
#include "../../Specific/setup.h"
|
#include "../../Specific/setup.h"
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "../../Game/items.h"
|
#include "../../Game/items.h"
|
||||||
#include "../../Game/sphere.h"
|
#include "../../Game/sphere.h"
|
||||||
#include "../../Game/collide.h"
|
#include "../../Game/collide.h"
|
||||||
|
#include "../../Game/camera.h"
|
||||||
#include "../../Game/effects.h"
|
#include "../../Game/effects.h"
|
||||||
#include "../../Game/laraflar.h"
|
#include "../../Game/laraflar.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Renderer11.h"
|
#include "Renderer11.h"
|
||||||
#include "../Specific/configuration.h"
|
#include "../Specific/configuration.h"
|
||||||
|
#include "../Game/camera.h"
|
||||||
#include "../Game/draw.h"
|
#include "../Game/draw.h"
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
extern GameConfiguration g_Configuration;
|
extern GameConfiguration g_Configuration;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "../Game/tomb4fx.h"
|
#include "../Game/tomb4fx.h"
|
||||||
#include "../Game/lara.h"
|
#include "../Game/lara.h"
|
||||||
#include "../Game/draw.h"
|
#include "../Game/draw.h"
|
||||||
|
#include "../Game/camera.h"
|
||||||
#include "../Game/debris.h"
|
#include "../Game/debris.h"
|
||||||
#include "../Specific/setup.h"
|
#include "../Specific/setup.h"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "..\Game\missile.h"
|
#include "..\Game\missile.h"
|
||||||
#include "..\Game\control.h"
|
#include "..\Game\control.h"
|
||||||
#include "..\Game\pickup.h"
|
#include "..\Game\pickup.h"
|
||||||
|
#include "../Game/camera.h"
|
||||||
#include "..\Game\lara1gun.h"
|
#include "..\Game\lara1gun.h"
|
||||||
#include "..\Game\laraflar.h"
|
#include "..\Game\laraflar.h"
|
||||||
#include "..\Game\larafire.h"
|
#include "..\Game\larafire.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue