3dcam-headers/camera.h

47 lines
954 B
C
Raw Normal View History

2021-04-10 14:22:48 +02:00
#pragma once
#include <sys/types.h>
#include <libgte.h>
2021-06-22 17:24:52 +02:00
// Camera modes
#define ACTOR 0
#define ROTATE 1
#define FIXED 2
#define TRACK 3
#define FLYCAM 4
#define FOLLOW 5
2021-04-10 14:22:48 +02:00
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;
VECTOR pos;
SVECTOR rot;
SVECTOR dvs;
MATRIX mat;
} CAMERA;
void getCameraXZ(int * x, int * z, int actorX, int actorZ, int angle, int distance);
2021-04-20 11:55:52 +02:00
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);
2021-04-10 14:22:48 +02:00
void applyCamera(CAMERA * cam);
void setCameraPos(CAMERA * camera, VECTOR pos, SVECTOR rot);