mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-03 09:03:29 -04:00
[modding] Add Actors (#113)
* fix * Add Actors * Refactor * Update Game.cpp
This commit is contained in:
+235
-225
@@ -139,66 +139,66 @@ void CustomEngineInit() {
|
||||
|
||||
extern "C" {
|
||||
|
||||
World* GetWorld(void) {
|
||||
return &gWorldInstance;
|
||||
}
|
||||
|
||||
u32 WorldNextCup(void) {
|
||||
return gWorldInstance.NextCup();
|
||||
}
|
||||
|
||||
u32 WorldPreviousCup(void) {
|
||||
return gWorldInstance.PreviousCup();
|
||||
}
|
||||
|
||||
void SetCupIndex(int16_t courseId) {
|
||||
gWorldInstance.SetCupIndex(courseId);
|
||||
}
|
||||
|
||||
void SetCup() {
|
||||
gWorldInstance.SetCup();
|
||||
}
|
||||
|
||||
u32 GetCupIndex(void) {
|
||||
printf("Cup Index: %d\n", gWorldInstance.GetCupIndex());
|
||||
return gWorldInstance.GetCupIndex();
|
||||
}
|
||||
|
||||
const char* GetCupName(void) {
|
||||
return gWorldInstance.Cups[gWorldInstance.CupIndex]->Name;
|
||||
}
|
||||
|
||||
void LoadCourse() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Load();
|
||||
World* GetWorld(void) {
|
||||
return &gWorldInstance;
|
||||
}
|
||||
}
|
||||
|
||||
CProperties* GetCoursePropsA() {
|
||||
return (CProperties*) gWorldInstance.GetCourseProps();
|
||||
}
|
||||
|
||||
size_t GetCourseIndex() {
|
||||
return gWorldInstance.CourseIndex;
|
||||
}
|
||||
|
||||
void SetCourse(const char* name) {
|
||||
gWorldInstance.SetCourse(name);
|
||||
}
|
||||
|
||||
void NextCourse() {
|
||||
gWorldInstance.NextCourse();
|
||||
}
|
||||
|
||||
void PreviousCourse() {
|
||||
gWorldInstance.PreviousCourse();
|
||||
}
|
||||
|
||||
void CourseManager_SpawnVehicles() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnVehicles();
|
||||
u32 WorldNextCup(void) {
|
||||
return gWorldInstance.NextCup();
|
||||
}
|
||||
|
||||
u32 WorldPreviousCup(void) {
|
||||
return gWorldInstance.PreviousCup();
|
||||
}
|
||||
|
||||
void SetCupIndex(int16_t courseId) {
|
||||
gWorldInstance.SetCupIndex(courseId);
|
||||
}
|
||||
|
||||
void SetCup() {
|
||||
gWorldInstance.SetCup();
|
||||
}
|
||||
|
||||
u32 GetCupIndex(void) {
|
||||
printf("Cup Index: %d\n", gWorldInstance.GetCupIndex());
|
||||
return gWorldInstance.GetCupIndex();
|
||||
}
|
||||
|
||||
const char* GetCupName(void) {
|
||||
return gWorldInstance.Cups[gWorldInstance.CupIndex]->Name;
|
||||
}
|
||||
|
||||
void LoadCourse() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Load();
|
||||
}
|
||||
}
|
||||
|
||||
CProperties* GetCoursePropsA() {
|
||||
return (CProperties*) gWorldInstance.GetCourseProps();
|
||||
}
|
||||
|
||||
size_t GetCourseIndex() {
|
||||
return gWorldInstance.CourseIndex;
|
||||
}
|
||||
|
||||
void SetCourse(const char* name) {
|
||||
gWorldInstance.SetCourse(name);
|
||||
}
|
||||
|
||||
void NextCourse() {
|
||||
gWorldInstance.NextCourse();
|
||||
}
|
||||
|
||||
void PreviousCourse() {
|
||||
gWorldInstance.PreviousCourse();
|
||||
}
|
||||
|
||||
void CourseManager_SpawnVehicles() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnVehicles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_VehiclesSpawn() {
|
||||
for (auto& vehicle : gWorldInstance.Vehicles) {
|
||||
@@ -231,7 +231,6 @@ void CourseManager_SpawnVehicles() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_ResetVehicles(void) {
|
||||
gWorldInstance.ResetVehicles();
|
||||
@@ -273,247 +272,258 @@ void CourseManager_SpawnVehicles() {
|
||||
gWorldInstance.CurrentCourse->LoadTextures();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_RenderCourse(struct UnkStruct_800DC5EC* arg0) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Render(arg0);
|
||||
void CourseManager_RenderCourse(struct UnkStruct_800DC5EC* arg0) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Render(arg0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_RenderCredits() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->RenderCredits();
|
||||
void CourseManager_RenderCredits() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->RenderCredits();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SpawnActors() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnActors();
|
||||
void CourseManager_TickActors() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.TickActors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_InitClouds() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->InitClouds();
|
||||
void CourseManager_DrawActors(Camera* camera) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.DrawActors(camera);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_UpdateClouds(s32 arg0, Camera* camera) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->UpdateClouds(arg0, camera);
|
||||
void CourseManager_SpawnActors() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnActors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_Waypoints(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Waypoints(player, playerId);
|
||||
void CourseManager_InitClouds() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->InitClouds();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_GenerateCollision() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->GenerateCollision();
|
||||
void CourseManager_UpdateClouds(s32 arg0, Camera* camera) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->UpdateClouds(arg0, camera);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
|
||||
f32* arg6, f32* arg7) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SomeCollisionThing(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
void CourseManager_Waypoints(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Waypoints(player, playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_MinimapSettings() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->MinimapSettings();
|
||||
void CourseManager_GenerateCollision() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->GenerateCollision();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_InitCourseObjects() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->InitCourseObjects();
|
||||
void CourseManager_SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
|
||||
f32* arg6, f32* arg7) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SomeCollisionThing(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_UpdateCourseObjects() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->UpdateCourseObjects();
|
||||
void CourseManager_MinimapSettings() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->MinimapSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_RenderCourseObjects(s32 cameraId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->RenderCourseObjects(cameraId);
|
||||
void CourseManager_InitCourseObjects() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->InitCourseObjects();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SomeSounds() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SomeSounds();
|
||||
void CourseManager_UpdateCourseObjects() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->UpdateCourseObjects();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SetCourseVtxColours() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SetCourseVtxColours();
|
||||
void CourseManager_RenderCourseObjects(s32 cameraId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->RenderCourseObjects(cameraId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->WhatDoesThisDo(player, playerId);
|
||||
void CourseManager_SomeSounds() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SomeSounds();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->WhatDoesThisDoAI(player, playerId);
|
||||
void CourseManager_SetCourseVtxColours() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SetCourseVtxColours();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_MinimapFinishlinePosition() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->MinimapFinishlinePosition();
|
||||
void CourseManager_WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->WhatDoesThisDo(player, playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SetStaffGhost() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SetStaffGhost();
|
||||
void CourseManager_WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->WhatDoesThisDoAI(player, playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CProperties* CourseManager_GetProps() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
return (CProperties*) &gWorldInstance.CurrentCourse->Props;
|
||||
void CourseManager_MinimapFinishlinePosition() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->MinimapFinishlinePosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_SpawnBombKarts() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnBombKarts();
|
||||
void CourseManager_SetStaffGhost() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SetStaffGhost();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_Water() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Water();
|
||||
CProperties* CourseManager_GetProps() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
return (CProperties*) &gWorldInstance.CurrentCourse->Props;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t GetCupCursorPosition() {
|
||||
return gWorldInstance.CurrentCup->CursorPosition;
|
||||
}
|
||||
void CourseManager_SpawnBombKarts() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->SpawnBombKarts();
|
||||
}
|
||||
}
|
||||
|
||||
void CourseManager_Water() {
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Water();
|
||||
}
|
||||
}
|
||||
|
||||
size_t GetCupCursorPosition() {
|
||||
return gWorldInstance.CurrentCup->CursorPosition;
|
||||
}
|
||||
|
||||
void SetCupCursorPosition(size_t position) {
|
||||
gWorldInstance.CurrentCup->SetCourse(position);
|
||||
//gWorldInstance.CurrentCup->CursorPosition = position;
|
||||
}
|
||||
|
||||
size_t GetCupSize() {
|
||||
return gWorldInstance.CurrentCup->GetSize();
|
||||
}
|
||||
size_t GetCupSize() {
|
||||
return gWorldInstance.CurrentCup->GetSize();
|
||||
}
|
||||
|
||||
void SetCourseFromCup() {
|
||||
gWorldInstance.CurrentCourse = gWorldInstance.CurrentCup->GetCourse();
|
||||
}
|
||||
void SetCourseFromCup() {
|
||||
gWorldInstance.CurrentCourse = gWorldInstance.CurrentCup->GetCourse();
|
||||
}
|
||||
|
||||
void* GetCourse(void) {
|
||||
return gWorldInstance.CurrentCourse;
|
||||
}
|
||||
void* GetCourse(void) {
|
||||
return gWorldInstance.CurrentCourse;
|
||||
}
|
||||
|
||||
void SetCourseByClass(void* course) {
|
||||
gWorldInstance.CurrentCourse = (Course*) course;
|
||||
}
|
||||
void SetCourseByClass(void* course) {
|
||||
gWorldInstance.CurrentCourse = (Course*) course;
|
||||
}
|
||||
|
||||
void* GetMarioRaceway(void) {
|
||||
return gMarioRaceway;
|
||||
}
|
||||
void* GetMarioRaceway(void) {
|
||||
return gMarioRaceway;
|
||||
}
|
||||
|
||||
void* GetLuigiRaceway(void) {
|
||||
return gLuigiRaceway;
|
||||
}
|
||||
void* GetLuigiRaceway(void) {
|
||||
return gLuigiRaceway;
|
||||
}
|
||||
|
||||
void* GetChocoMountain(void) {
|
||||
return gChocoMountain;
|
||||
}
|
||||
void* GetChocoMountain(void) {
|
||||
return gChocoMountain;
|
||||
}
|
||||
|
||||
void* GetBowsersCastle(void) {
|
||||
return gBowsersCastle;
|
||||
}
|
||||
void* GetBowsersCastle(void) {
|
||||
return gBowsersCastle;
|
||||
}
|
||||
|
||||
void* GetBansheeBoardwalk(void) {
|
||||
return gBansheeBoardwalk;
|
||||
}
|
||||
void* GetBansheeBoardwalk(void) {
|
||||
return gBansheeBoardwalk;
|
||||
}
|
||||
|
||||
void* GetYoshiValley(void) {
|
||||
return gYoshiValley;
|
||||
}
|
||||
void* GetYoshiValley(void) {
|
||||
return gYoshiValley;
|
||||
}
|
||||
|
||||
void* GetFrappeSnowland(void) {
|
||||
return gFrappeSnowland;
|
||||
}
|
||||
void* GetFrappeSnowland(void) {
|
||||
return gFrappeSnowland;
|
||||
}
|
||||
|
||||
void* GetKoopaTroopaBeach(void) {
|
||||
return gKoopaTroopaBeach;
|
||||
}
|
||||
void* GetKoopaTroopaBeach(void) {
|
||||
return gKoopaTroopaBeach;
|
||||
}
|
||||
|
||||
void* GetRoyalRaceway(void) {
|
||||
return gRoyalRaceway;
|
||||
}
|
||||
void* GetRoyalRaceway(void) {
|
||||
return gRoyalRaceway;
|
||||
}
|
||||
|
||||
void* GetMooMooFarm(void) {
|
||||
return gMooMooFarm;
|
||||
}
|
||||
void* GetMooMooFarm(void) {
|
||||
return gMooMooFarm;
|
||||
}
|
||||
|
||||
void* GetToadsTurnpike(void) {
|
||||
return gToadsTurnpike;
|
||||
}
|
||||
void* GetToadsTurnpike(void) {
|
||||
return gToadsTurnpike;
|
||||
}
|
||||
|
||||
void* GetKalimariDesert(void) {
|
||||
return gKalimariDesert;
|
||||
}
|
||||
void* GetKalimariDesert(void) {
|
||||
return gKalimariDesert;
|
||||
}
|
||||
|
||||
void* GetSherbetLand(void) {
|
||||
return gSherbetLand;
|
||||
}
|
||||
void* GetSherbetLand(void) {
|
||||
return gSherbetLand;
|
||||
}
|
||||
|
||||
void* GetRainbowRoad(void) {
|
||||
return gRainbowRoad;
|
||||
}
|
||||
void* GetRainbowRoad(void) {
|
||||
return gRainbowRoad;
|
||||
}
|
||||
|
||||
void* GetWarioStadium(void) {
|
||||
return gWarioStadium;
|
||||
}
|
||||
void* GetWarioStadium(void) {
|
||||
return gWarioStadium;
|
||||
}
|
||||
|
||||
void* GetBlockFort(void) {
|
||||
return gBlockFort;
|
||||
}
|
||||
void* GetBlockFort(void) {
|
||||
return gBlockFort;
|
||||
}
|
||||
|
||||
void* GetSkyscraper(void) {
|
||||
return gSkyscraper;
|
||||
}
|
||||
void* GetSkyscraper(void) {
|
||||
return gSkyscraper;
|
||||
}
|
||||
|
||||
void* GetDoubleDeck(void) {
|
||||
return gDoubleDeck;
|
||||
}
|
||||
void* GetDoubleDeck(void) {
|
||||
return gDoubleDeck;
|
||||
}
|
||||
|
||||
void* GetDkJungle(void) {
|
||||
return gDkJungle;
|
||||
}
|
||||
void* GetDkJungle(void) {
|
||||
return gDkJungle;
|
||||
}
|
||||
|
||||
void* GetBigDonut(void) {
|
||||
return gBigDonut;
|
||||
}
|
||||
void* GetBigDonut(void) {
|
||||
return gBigDonut;
|
||||
}
|
||||
|
||||
void* GetPodiumCeremony(void) {
|
||||
return gPodiumCeremony;
|
||||
}
|
||||
void* GetPodiumCeremony(void) {
|
||||
return gPodiumCeremony;
|
||||
}
|
||||
|
||||
void* GetTestCourse(void) {
|
||||
return gTestCourse;
|
||||
}
|
||||
void* GetTestCourse(void) {
|
||||
return gTestCourse;
|
||||
}
|
||||
}
|
||||
|
||||
void push_frame() {
|
||||
|
||||
Reference in New Issue
Block a user