|
SpaghettiKart
|
#include "Engine.h"#include "ship/utils/StringHelper.h"#include "GameExtractor.h"#include "mods/ModManager.h"#include "ui/ImguiUI.h"#include "ship/Context.h"#include "ship/controller/controldevice/controller/mapping/ControllerDefaultMappings.h"#include "resource/type/ResourceType.h"#include "fast/resource/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 <ship/window/gui/Fonts.h>#include "ship/window/gui/resource/Font.h"#include "ship/window/gui/resource/FontFactory.h"#include "libultraship/controller/controldeck/ControlDeck.h"#include "SpaghettiGui.h"#include "port/interpolation/FrameInterpolation.h"#include <fast/Fast3dWindow.h>#include <fast/interpreter.h>#include <SDL2/SDL.h>#include <utility>#include <macros.h>#include <fast/resource/factory/DisplayListFactory.h>#include <fast/resource/factory/TextureFactory.h>#include <fast/resource/factory/MatrixFactory.h>#include <ship/resource/factory/BlobFactory.h>#include <fast/resource/factory/VertexFactory.h>#include <fast/resource/factory/LightFactory.h>#include "audio/internal.h"#include "audio/GameAudio.h"Variables | |
| bool | prevAltAssets = false |
| float | gInterpolationStep = 0.0f |
| bool | ShouldClearTextureCacheAtEndOfFrame = false |
| static const char *const | sOtrSignature = "__OTR__" |
| bool CreateDirectoryRecursive | ( | std::string const & | dirName, |
| std::error_code & | err ) |
| float GameEngine_GetAspectRatio | ( | ) |
| uint32_t GameEngine_GetGameVersion | ( | ) |
| uint32_t GameEngine_GetInterpolationFrameCount | ( | ) |
| uint32_t GameEngine_GetSampleRate | ( | ) |
| uint32_t GameEngine_GetSamplesPerFrame | ( | ) |
| uint32_t GameEngine_GetSequenceCount | ( | ) |
| uint8_t GameEngine_IsBankLoaded | ( | const uint8_t | bankId | ) |
| uint8_t GameEngine_IsSequenceLoaded | ( | const uint8_t | seqId | ) |
| CtlEntry * GameEngine_LoadBank | ( | const uint8_t | bankId | ) |
| AudioSequenceData * GameEngine_LoadSequence | ( | const uint8_t | seqId | ) |
| bool GameEngine_OTRSigCheck | ( | const char * | data | ) |
| int32_t GameEngine_ResourceGetTexTypeByName | ( | const char * | name | ) |
| void GameEngine_UnloadBank | ( | const uint8_t | bankId | ) |
| void GameEngine_UnloadSequence | ( | const uint8_t | seqId | ) |
| Fast::Interpreter * GetInterpreter | ( | ) |
| uint32_t OTRCalculateCenterOfAreaFromLeftEdge | ( | int32_t | center | ) |
| 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)
| float OTRGetAspectRatio | ( | void | ) |
| float OTRGetDimensionFromLeftEdge | ( | float | v | ) |
| float OTRGetDimensionFromRightEdge | ( | float | v | ) |
| uint32_t OTRGetGameRenderHeight | ( | void | ) |
| uint32_t OTRGetGameRenderWidth | ( | void | ) |
| uint32_t OTRGetGameViewportHeight | ( | ) |
| uint32_t OTRGetGameViewportWidth | ( | ) |
| int16_t OTRGetRectDimensionFromLeftEdge | ( | float | v | ) |
| int16_t OTRGetRectDimensionFromRightEdge | ( | float | v | ) |
| void Timer_Increment | ( | int32_t * | address, |
| int32_t | value ) |
| void Timer_SetValue | ( | int32_t * | address, |
| int32_t | value ) |
| float gInterpolationStep = 0.0f |
| bool prevAltAssets = false |
| bool ShouldClearTextureCacheAtEndOfFrame = false |
|
static |