Mario Kart 64
Loading...
Searching...
No Matches
Engine.cpp File Reference
#include "Engine.h"
#include "StringHelper.h"
#include "GameExtractor.h"
#include "ui/ImguiUI.h"
#include "libultraship/src/Context.h"
#include "libultraship/src/controller/controldevice/controller/mapping/ControllerDefaultMappings.h"
#include "resource/type/ResourceType.h"
#include "resource/importers/GenericArrayFactory.h"
#include "resource/importers/AudioBankFactory.h"
#include "resource/importers/AudioSampleFactory.h"
#include "resource/importers/AudioSequenceFactory.h"
#include "resource/importers/Vec3fFactory.h"
#include "resource/importers/Vec3sFactory.h"
#include "resource/importers/CPUFactory.h"
#include "resource/importers/CourseVtxFactory.h"
#include "resource/importers/TrackSectionsFactory.h"
#include "resource/importers/TrackPathPointFactory.h"
#include "resource/importers/ActorSpawnDataFactory.h"
#include "resource/importers/UnkActorSpawnDataFactory.h"
#include "resource/importers/ArrayFactory.h"
#include "resource/importers/MinimapFactory.h"
#include "resource/importers/BetterTextureFactory.h"
#include <Fonts.h>
#include "window/gui/resource/Font.h"
#include "window/gui/resource/FontFactory.h"
#include "SpaghettiGui.h"
#include "port/interpolation/FrameInterpolation.h"
#include <graphic/Fast3D/Fast3dWindow.h>
#include <graphic/Fast3D/interpreter.h>
#include <SDL2/SDL.h>
#include <utility>
#include <macros.h>
#include <DisplayListFactory.h>
#include <TextureFactory.h>
#include <MatrixFactory.h>
#include <BlobFactory.h>
#include <VertexFactory.h>
#include <LightFactory.h>
#include "audio/internal.h"
#include "audio/GameAudio.h"
Include dependency graph for Engine.cpp:

Functions

Fast::Interpreter * GetInterpreter ()
 
bool CreateDirectoryRecursive (std::string const &dirName, std::error_code &err)
 
uint32_t GameEngine_GetInterpolationFrameCount ()
 
uint32_t GameEngine_GetSampleRate ()
 
uint32_t GameEngine_GetSamplesPerFrame ()
 
CtlEntryGameEngine_LoadBank (const uint8_t bankId)
 
uint8_t GameEngine_IsBankLoaded (const uint8_t bankId)
 
void GameEngine_UnloadBank (const uint8_t bankId)
 
AudioSequenceDataGameEngine_LoadSequence (const uint8_t seqId)
 
uint32_t GameEngine_GetSequenceCount ()
 
uint8_t GameEngine_IsSequenceLoaded (const uint8_t seqId)
 
void GameEngine_UnloadSequence (const uint8_t seqId)
 
float GameEngine_GetAspectRatio ()
 
uint32_t GameEngine_GetGameVersion ()
 
bool GameEngine_OTRSigCheck (const char *data)
 
int32_t GameEngine_ResourceGetTexTypeByName (const char *name)
 
void Timer_Increment (int32_t *address, int32_t value)
 
void Timer_SetValue (int32_t *address, int32_t value)
 
float OTRGetAspectRatio ()
 
float OTRGetDimensionFromLeftEdge (float v)
 
int16_t OTRGetRectDimensionFromLeftEdge (float v)
 
float OTRGetDimensionFromRightEdge (float v)
 
int16_t OTRGetRectDimensionFromRightEdge (float v)
 
uint32_t OTRCalculateCenterOfAreaFromRightEdge (int32_t center)
 
uint32_t OTRCalculateCenterOfAreaFromLeftEdge (int32_t center)
 
uint32_t OTRGetGameRenderWidth ()
 
uint32_t OTRGetGameRenderHeight ()
 
uint32_t OTRGetGameViewportWidth ()
 
uint32_t OTRGetGameViewportHeight ()
 

Variables

bool prevAltAssets = false
 
float gInterpolationStep = 0.0f
 
bool ShouldClearTextureCacheAtEndOfFrame = false
 
static const char * sOtrSignature = "__OTR__"
 

Function Documentation

◆ CreateDirectoryRecursive()

bool CreateDirectoryRecursive ( std::string const & dirName,
std::error_code & err )

◆ GameEngine_GetAspectRatio()

float GameEngine_GetAspectRatio ( )
Here is the call graph for this function:

◆ GameEngine_GetGameVersion()

uint32_t GameEngine_GetGameVersion ( )

◆ GameEngine_GetInterpolationFrameCount()

uint32_t GameEngine_GetInterpolationFrameCount ( )

◆ GameEngine_GetSampleRate()

uint32_t GameEngine_GetSampleRate ( )

◆ GameEngine_GetSamplesPerFrame()

uint32_t GameEngine_GetSamplesPerFrame ( )

◆ GameEngine_GetSequenceCount()

uint32_t GameEngine_GetSequenceCount ( )

◆ GameEngine_IsBankLoaded()

uint8_t GameEngine_IsBankLoaded ( const uint8_t bankId)
Here is the call graph for this function:

◆ GameEngine_IsSequenceLoaded()

uint8_t GameEngine_IsSequenceLoaded ( const uint8_t seqId)
Here is the call graph for this function:

◆ GameEngine_LoadBank()

CtlEntry * GameEngine_LoadBank ( const uint8_t bankId)
Here is the caller graph for this function:

◆ GameEngine_LoadSequence()

AudioSequenceData * GameEngine_LoadSequence ( const uint8_t seqId)
Here is the caller graph for this function:

◆ GameEngine_OTRSigCheck()

bool GameEngine_OTRSigCheck ( const char * data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GameEngine_ResourceGetTexTypeByName()

int32_t GameEngine_ResourceGetTexTypeByName ( const char * name)
Here is the caller graph for this function:

◆ GameEngine_UnloadBank()

void GameEngine_UnloadBank ( const uint8_t bankId)
Here is the caller graph for this function:

◆ GameEngine_UnloadSequence()

void GameEngine_UnloadSequence ( const uint8_t seqId)
Here is the caller graph for this function:

◆ GetInterpreter()

Fast::Interpreter * GetInterpreter ( )
Here is the caller graph for this function:

◆ OTRCalculateCenterOfAreaFromLeftEdge()

uint32_t OTRCalculateCenterOfAreaFromLeftEdge ( int32_t center)
Here is the call graph for this function:

◆ OTRCalculateCenterOfAreaFromRightEdge()

uint32_t OTRCalculateCenterOfAreaFromRightEdge ( int32_t center)

Centers an item in a given area.

Adds the number of extended screen pixels to the location to center. This allows stretching the game window really wide, and the item will stay in-place.

This is not for centering in the direct center of the screen.

How to use:

s32 center = OTRCalculateCenterOfAreaFromRightEdge((SCREEN_WIDTH / 4) + (SCREEN_WIDTH / 2)); x = center - (texWidth / 2) x2 = center + (texWidth / 2)

Here is the call graph for this function:

◆ OTRGetAspectRatio()

float OTRGetAspectRatio ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetDimensionFromLeftEdge()

float OTRGetDimensionFromLeftEdge ( float v)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetDimensionFromRightEdge()

float OTRGetDimensionFromRightEdge ( float v)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetGameRenderHeight()

uint32_t OTRGetGameRenderHeight ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetGameRenderWidth()

uint32_t OTRGetGameRenderWidth ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetGameViewportHeight()

uint32_t OTRGetGameViewportHeight ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetGameViewportWidth()

uint32_t OTRGetGameViewportWidth ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetRectDimensionFromLeftEdge()

int16_t OTRGetRectDimensionFromLeftEdge ( float v)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OTRGetRectDimensionFromRightEdge()

int16_t OTRGetRectDimensionFromRightEdge ( float v)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Timer_Increment()

void Timer_Increment ( int32_t * address,
int32_t value )

◆ Timer_SetValue()

void Timer_SetValue ( int32_t * address,
int32_t value )

Variable Documentation

◆ gInterpolationStep

float gInterpolationStep = 0.0f

◆ prevAltAssets

bool prevAltAssets = false

◆ ShouldClearTextureCacheAtEndOfFrame

bool ShouldClearTextureCacheAtEndOfFrame = false

◆ sOtrSignature

const char* sOtrSignature = "__OTR__"
static