mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-03 02:33:55 -04:00
Game.cpp and World.cpp Cleanup (#159)
* Remove CProperties and delete dup Properties from World.h * Improvement * Fix compile * Cleanup * Document gRaceState * wip cleanup * compile * Impl PlayerBombKart * Rename CourseManager_ to CM_ * Finish renames m_ to CM_ * cleanup * Remove extra printf --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
+11
-17
@@ -557,8 +557,6 @@ void render_object_p1(void) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
|
||||
CourseManager_DrawBombKarts(PLAYER_ONE); // render_bomb_karts_wrap(PLAYER_ONE);
|
||||
|
||||
// if (gGamestate == ENDING) {
|
||||
// //func_80055F48(PLAYER_ONE);
|
||||
// //func_80056160(PLAYER_ONE);
|
||||
@@ -576,7 +574,6 @@ void render_object_p2(void) {
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
CourseManager_DrawBombKarts(PLAYER_TWO);
|
||||
// render_bomb_karts_wrap(PLAYER_TWO);
|
||||
render_object_for_player(PLAYER_TWO);
|
||||
}
|
||||
@@ -587,7 +584,6 @@ void render_object_p3(void) {
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
CourseManager_DrawBombKarts(PLAYER_THREE);
|
||||
// render_bomb_karts_wrap(PLAYER_THREE);
|
||||
render_object_for_player(PLAYER_THREE);
|
||||
}
|
||||
@@ -599,7 +595,6 @@ void render_object_p4(void) {
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]),
|
||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
CourseManager_DrawBombKarts(PLAYER_FOUR);
|
||||
// render_bomb_karts_wrap(PLAYER_FOUR);
|
||||
if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) {
|
||||
// render_lakitu(PLAYER_FOUR);
|
||||
@@ -689,9 +684,9 @@ void render_player_snow_effect_four(void) {
|
||||
}
|
||||
|
||||
void render_object_for_player(s32 cameraId) {
|
||||
CourseManager_DrawObjects(cameraId);
|
||||
CM_DrawObjects(cameraId);
|
||||
CM_DrawParticles(cameraId);
|
||||
CourseManager_RenderCourseObjects(cameraId);
|
||||
CM_RenderCourseObjects(cameraId);
|
||||
|
||||
// switch (gCurrentCourseId) {
|
||||
// case COURSE_MARIO_RACEWAY:
|
||||
@@ -785,8 +780,7 @@ void render_object_for_player(s32 cameraId) {
|
||||
render_balloons_grand_prix(cameraId);
|
||||
}
|
||||
if (gModeSelection == BATTLE) {
|
||||
CourseManager_DrawBattleBombKarts(cameraId);
|
||||
// render_battle_bomb_karts(cameraId);
|
||||
CM_DrawBattleBombKarts(cameraId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,7 +794,7 @@ void render_snowing_effect(s32 playerId) {
|
||||
render_object_snowflakes_particles();
|
||||
}
|
||||
}
|
||||
if (CourseManager_GetProps()->LakituTowType == 1) {
|
||||
if (CM_GetProps()->LakituTowType == 1) {
|
||||
render_ice_block(playerId);
|
||||
}
|
||||
}
|
||||
@@ -1241,7 +1235,7 @@ void func_8005995C(void) {
|
||||
void func_80059A88(s32 playerId) {
|
||||
func_80059820(playerId);
|
||||
if (!gDemoMode) {
|
||||
// update_object_lakitu(playerId); // Moved to CourseManager_TickObjects60fps
|
||||
// update_object_lakitu(playerId); // Moved to CM_TickObjects60fps
|
||||
func_8007BB9C(playerId);
|
||||
}
|
||||
}
|
||||
@@ -1283,7 +1277,7 @@ void func_80059AC8(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
CourseManager_TickObjects60fps();
|
||||
CM_TickObjects60fps();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1400,7 +1394,7 @@ void func_80059D00(void) {
|
||||
break;
|
||||
}
|
||||
update_object();
|
||||
CourseManager_TickObjects();
|
||||
CM_TickObjects();
|
||||
CM_TickParticles();
|
||||
func_800744CC();
|
||||
}
|
||||
@@ -1418,12 +1412,12 @@ void func_8005A070(void) {
|
||||
// func_80086D80();
|
||||
// update_cheep_cheep(1);
|
||||
// func_80077640();
|
||||
CourseManager_TickObjects();
|
||||
CM_TickObjects();
|
||||
CM_TickParticles();
|
||||
} else if (gGamestate == CREDITS_SEQUENCE) {
|
||||
func_80059820(PLAYER_ONE);
|
||||
func_80078C70(0);
|
||||
CourseManager_TickObjects();
|
||||
CM_TickObjects();
|
||||
CM_TickParticles();
|
||||
} else { // normal gameplay
|
||||
func_80059D00();
|
||||
@@ -1572,7 +1566,7 @@ void func_8005A71C(void) {
|
||||
|
||||
void update_object(void) {
|
||||
|
||||
CourseManager_UpdateCourseObjects();
|
||||
CM_UpdateCourseObjects();
|
||||
|
||||
// switch (gCurrentCourseId) {
|
||||
// case COURSE_MARIO_RACEWAY:
|
||||
@@ -2718,7 +2712,7 @@ void func_8005D18C(void) {
|
||||
|
||||
void func_8005D1F4(s32 cameraId) {
|
||||
|
||||
CourseManager_BombKartsWaypoint(cameraId);
|
||||
CM_BombKartsWaypoint(cameraId);
|
||||
// s32 playerWaypoint;
|
||||
// s32 bombWaypoint;
|
||||
// s32 var_a2;
|
||||
|
||||
Reference in New Issue
Block a user