2021-06-23 19:25:12 +02:00
|
|
|
#pragma once
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <libgte.h>
|
|
|
|
|
|
|
|
// Camera modes
|
|
|
|
#define ACTOR 0
|
|
|
|
#define ROTATE 1
|
|
|
|
#define FIXED 2
|
|
|
|
#define TRACK 3
|
|
|
|
#define FLYCAM 4
|
|
|
|
#define FOLLOW 5
|
|
|
|
|
|
|
|
typedef struct{
|
|
|
|
int x, xv; // x: current value += xv : new value
|
|
|
|
int y, yv; // x,y,z, vx, vy, vz are in PSX units (ONE == 4096)
|
|
|
|
int z, zv;
|
|
|
|
int pan, panv;
|
|
|
|
int tilt, tiltv;
|
|
|
|
int rol;
|
2021-07-10 12:08:52 +02:00
|
|
|
SVECTOR * pos;
|
|
|
|
SVECTOR * rot;
|
2021-06-23 19:25:12 +02:00
|
|
|
SVECTOR dvs;
|
2021-07-10 12:08:52 +02:00
|
|
|
MATRIX * mat;
|
2021-06-23 19:25:12 +02:00
|
|
|
} CAMERA;
|
|
|
|
|
|
|
|
void getCameraXZ(int * x, int * z, int actorX, int actorZ, int angle, int distance);
|
|
|
|
void getCameraXZY(int * x, int * z, int * y, int actorX, int actorZ, int actorY, int angle, int angleX, int distance);
|
|
|
|
void getCameraZY( int * z, int * y, int actorZ, int actorY, int angleX, int distance);
|
|
|
|
void applyCamera(CAMERA * cam);
|
2021-07-10 12:08:52 +02:00
|
|
|
void setCameraPos(CAMERA * camera, SVECTOR * pos, SVECTOR * rot);
|
2021-07-12 13:00:19 +02:00
|
|
|
|
2021-08-07 16:41:08 +02:00
|
|
|
void setCameraMode(LEVEL * curLvl, CAMERA * camera, VECTOR * posToActor, VECTOR * angle, VECTOR * angleCam, short *curCamAngle, int camMode, int * lerping);
|