SpaghettiKart
Loading...
Searching...
No Matches
freecam.cpp File Reference
#include <libultraship.h>
#include <ship/window/Window.h>
#include "port/Engine.h"
#include "port/Game.h"
#include <ship/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h>
#include "port/interpolation/FrameInterpolation.h"
#include "engine/Matrix.h"
#include <macros.h>
#include <defines.h>
#include "main.h"
#include <libc/math.h>
#include <common_structs.h>
#include "racing/collision.h"
#include "player_controller.h"
#include "code_80057C60.h"
#include "code_800029B0.h"
#include "code_80005FD0.h"
#include <SDL2/SDL.h>
#include "freecam_engine.h"
#include "math_util.h"
#include "skybox_and_splitscreen.h"
#include "freecam.h"
#include "engine/tracks/Track.h"
Include dependency graph for freecam.cpp:

Data Structures

struct  freecamSaveState
 

Macros

#define MAX_KEYS   256
 

Functions

void freecam (Camera *camera, Player *player, s8 index)
 
void on_freecam (void)
 
void off_freecam (void)
 
void freecam_loop (Camera *camera)
 
void freecam_mouse_manager (Camera *camera, Vec3f forwardVector)
 
bool FreecamKeyDown (int virtualKey)
 
void freecam_keyboard_manager (Camera *camera, Vec3f forwardVector)
 
void freecam_update_controller (void)
 

Variables

freecamSaveState fState
 
Controller fController
 
u32 fRankIndex = 0
 
u32 fTargetPlayer = false
 
u32 fMode
 
u32 fModeInit = false
 
u32 bFreecamUseController = false
 
f32 gFreecamSpeed = 3.0f
 
f32 gFreecamSpeedMultiplier = 2.0f
 
bool prevPrev = false
 
static bool prevKeyState [MAX_KEYS] = { false }
 

Macro Definition Documentation

◆ MAX_KEYS

#define MAX_KEYS   256

Function Documentation

◆ freecam()

void freecam ( Camera * camera,
Player * player,
s8 index )

Controls

Forward: A Backward: B

Go faster: Z

Up: C-up Down: C-down

Targets players based on rank position

Target player: R-trig Target next player: C-right Target previous player: C-left

Switch camera modes: D-pad left

Camera mode 1: Enter freecam at the player's position Camera mode 2: Enter freecam at previous freecam spot

Here is the call graph for this function:

◆ freecam_keyboard_manager()

void freecam_keyboard_manager ( Camera * camera,
Vec3f forwardVector )
Todo
configure this properly
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freecam_loop()

void freecam_loop ( Camera * camera)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freecam_mouse_manager()

void freecam_mouse_manager ( Camera * camera,
Vec3f forwardVector )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freecam_update_controller()

void freecam_update_controller ( void )
Here is the caller graph for this function:

◆ FreecamKeyDown()

bool FreecamKeyDown ( int virtualKey)
Here is the caller graph for this function:

◆ off_freecam()

void off_freecam ( void )
Here is the caller graph for this function:

◆ on_freecam()

void on_freecam ( void )
Here is the caller graph for this function:

Variable Documentation

◆ bFreecamUseController

u32 bFreecamUseController = false

◆ fController

Controller fController

◆ fMode

u32 fMode

◆ fModeInit

u32 fModeInit = false

◆ fRankIndex

u32 fRankIndex = 0

◆ fState

◆ fTargetPlayer

u32 fTargetPlayer = false

◆ gFreecamSpeed

f32 gFreecamSpeed = 3.0f

◆ gFreecamSpeedMultiplier

f32 gFreecamSpeedMultiplier = 2.0f

◆ prevKeyState

bool prevKeyState[MAX_KEYS] = { false }
static

◆ prevPrev

bool prevPrev = false