summaryrefslogtreecommitdiff
path: root/src/spawn_players.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-06-07 21:38:12 -0600
committerGitHub <noreply@github.com>2025-06-07 21:38:12 -0600
commit44db9bab773cc3b14c8f944a9411673b6fe08b01 (patch)
tree8ad796dac5ec3f42eca1220efe1e054b576374e8 /src/spawn_players.c
parenta67fbb6442d76016397c67f2cb7831687cdda91a (diff)
Add Interpolation (#204)
* initial work * more work * progress * Fixed slow fps * Add Lywx changes * Interp Works * Test default tick/logic update * Added missing include (#202) * Added missing include * More missing includes --------- Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * test * Revert "test" This reverts commit 1a810d74cc8531ce486bcb1c399cc6798fa1b51d. * Interp Item box * Actually interpolate item box * fix clouds * interp player? * Test 2 * Fix mistake * tag and fix item boxes * tag fake item box and whatever func_800696CC is * these aren't needed * tag karts * Slightly better falling rocks(still needs work) * Tag Smoke and Dust * Removed unneeded code from falling_rock * tag whatever func_80051ABC is * add missing rotate x coord * GrandPrixBallon/kart shadow * Green shells tag, and added comments I neglected to add before. * doesn't compile on win * Fixes * Disabled camera interpolation * Balloons fixes * progress * set_transform_matrix compiles * Compile setTransformMatrix * More transforms interp * Add more interps * matrix * Matrix multi interp * Fix interpolation camera bug * Missing includes needed for Linux. * Excluded access to HM64 Labs on Switch. * interpolation tags for various objects * Bowser castle statue flame interpolated. * tag hedgehogs * cloud interpolation * Interpolated smoke particles from shells * cloud interpolation refactor * Interpolated snowflakes * Interpolated penguins, also added comment tags to places I missed. * tag Snowman interpolation * Interpolated player reflection(sherbet land) * Forgot to uncomment stuff while testing * better tag * tag leaves * Set the default FPS to 30 * tag hud * Fixed "Match Refresh Rate" option * adjust draw distance * remove innecessary rock tag * rag rocks * better tag * Tagged player rank placement in HUD * Tagged Bat, Boos, and TrashBin(Banshee Boardwalk objects) * Refactor render_screens and fix editor raycast * better object interpolation * shift is not needed here * fix tag * fix tags * mole comments * comment * Changed how shell flames are interpolated. * interpolated ended scene fireworks. * Tagged star particles in the ending scene * Shell flames handled better. * this isn't needed * Fix multiplayer cameras * Fixed loading battle maps. * Tagged battle balloons * Some fixes for battle mode * No longer needed changes toAFinishline with the changes mega made. * Tag finishline * fix to make it compile with cmake 3.31 * changed mtxf_multiplication() to fix vert explosion in Desert & DK parkway.(provided by Coco.) * fix memory leaks, avoid invalidate texture (#207) * Fixed macos * More stupid fixes * update with main and update torch and lus and enable action on this branch * Update FrameInterpolation.h * Update FrameInterpolation.cpp * fix some memory leak * Update torch * Update torch * update torch and lus * reduce texture import * don't use fork of torch and lus * Update torch * Update torch --------- Co-authored-by: Lywx <kiritodev01@gmail.com> * Refactor World::Courses to unique_ptr (#211) * wip course unique ptr * Track unique_ptr : This probably compiles * Finish impl Courses as unique_ptr * Fix error * Fixes * More fixes * Cleanup * Remove old vars --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com> * particle boat and train * fix player particle interpolation * add modify interpolation target fps in menu * fix windows * Update libultraship * Fix logo interp * Interp SetTextMatrix * Fix freecam camera * Clarify comment * Clarify func * fix linux compilation * Update Thwomp.cpp * Update Thwomp.h * Update render.inc.c * Update render.inc.c * Update gbiMacro.c * interp falling rock shadow * Revert change that has no explanation * Update code_80057C60.c * Update code_80057C60.c * Update GrandPrixBalloons.cpp * Update Lakitu.cpp * Update framebuffer_effects.c * Update render_courses.c --------- Co-authored-by: Sonic Dreamcaster <alejandro.asenjo88@gmail.com> Co-authored-by: KiritoDv <kiritodev01@gmail.com> Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com> Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com> Co-authored-by: coco875 <59367621+coco875@users.noreply.github.com> Co-authored-by: coco875 <pereira.jannin@gmail.com>
Diffstat (limited to 'src/spawn_players.c')
-rw-r--r--src/spawn_players.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/spawn_players.c b/src/spawn_players.c
index 5e623577b..f633f550d 100644
--- a/src/spawn_players.c
+++ b/src/spawn_players.c
@@ -729,7 +729,7 @@ void spawn_players_versus_two_player(f32* arg0, f32* arg1, f32 arg2) {
}
void spawn_players_2p_battle(f32* arg0, f32* arg1, f32 arg2) {
- if (GetCourse() == GetBigDonut()) {
+ if (IsBigDonut()) {
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
@@ -778,7 +778,7 @@ void func_8003B318(f32* arg0, f32* arg1, f32 arg2) {
}
void spawn_players_3p_battle(f32* arg0, f32* arg1, f32 arg2) {
- if (GetCourse() == GetBigDonut()) {
+ if (IsBigDonut()) {
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
@@ -830,7 +830,7 @@ void func_8003B870(f32* arg0, f32* arg1, f32 arg2) {
}
void spawn_players_4p_battle(f32* arg0, f32* arg1, f32 arg2) {
- if (GetCourse() == GetBigDonut()) {
+ if (IsBigDonut()) {
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
@@ -888,17 +888,17 @@ void func_8003C0F0(void) {
if (gModeSelection == BATTLE) {
func_8000EEDC();
- } else if (GetCourse() != GetPodiumCeremony()) {
+ } else if (!IsPodiumCeremony()) {
func_8000F2DC();
sp5E = (f32) D_80164550[0][0].posX;
sp5C = (f32) D_80164550[0][0].posZ;
sp5A = (f32) D_80164550[0][0].posY;
- if (GetCourse() == GetToadsTurnpike()) {
+ if (IsToadsTurnpike()) {
sp5E = 0;
}
}
- if ((gModeSelection != BATTLE) && (GetCourse() != GetPodiumCeremony())) {
+ if ((gModeSelection != BATTLE) && (!IsPodiumCeremony())) {
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
switch (gModeSelection) {
@@ -993,7 +993,7 @@ void func_8003C0F0(void) {
}
break;
}
- } else if (GetCourse() == GetBlockFort()) {
+ } else if (IsBlockFort()) {
switch (gActiveScreenMode) {
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
@@ -1023,7 +1023,7 @@ void func_8003C0F0(void) {
}
break;
}
- } else if (GetCourse() == GetSkyscraper()) {
+ } else if (IsSkyscraper()) {
switch (gActiveScreenMode) {
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
@@ -1053,7 +1053,7 @@ void func_8003C0F0(void) {
}
break;
}
- } else if (GetCourse() == GetDoubleDeck()) {
+ } else if (IsDoubleDeck()) {
switch (gActiveScreenMode) {
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
@@ -1083,7 +1083,7 @@ void func_8003C0F0(void) {
}
break;
}
- } else if (GetCourse() == GetBigDonut()) {
+ } else if (IsBigDonut()) {
switch (gActiveScreenMode) {
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
@@ -1194,12 +1194,13 @@ void func_8003D080(void) {
} else {
func_8003C0F0();
}
+
if (!gDemoMode) {
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
switch (gModeSelection) {
case GRAND_PRIX:
- if (GetCourse() == GetToadsTurnpike()) {
+ if (IsToadsTurnpike()) {
camera_init(0.0f, player->pos[1], D_80165230[7], player->rotation[1], 8, 0);
} else {
camera_init((D_80165210[7] + D_80165210[6]) / 2, player->pos[1], D_80165230[7],
@@ -1289,6 +1290,9 @@ void func_8003D080(void) {
}
}
+ // Init freecam
+ //freecam_init(player->pos[0], player->pos[1], player->pos[2], player->rotation[1], 1, 4);
+
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
func_8003CD98(gPlayerOneCopy, camera1, 0, 0); // sic