summaryrefslogtreecommitdiff
path: root/src/actors
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-11-14 23:32:55 -0700
committerGitHub <noreply@github.com>2024-11-14 23:32:55 -0700
commit475f167bb2803999c5116bc285601d1f9a05d7de (patch)
tree859fec292c5c9807cc9690ebf4f0600f558b6063 /src/actors
parent4fbb031dd95f2a84e73fbca269f517e98808d293 (diff)
[modding] Big Update PR (#118)
* Implement kart vehicle * Fix menu CC * Actors * variable framerate * Implement Actors vector * Fix water & scrolling textures * Finish ACoin * Refactor finishline * Refactor mtx to vector * Fix refactored screen code bugs * Fix playlist bug * Switching courses working now * Fix podium ceremony * Mostly Fix Demo and Credits * Credits Load Actors and Textures * Fix credits * Formatting * Update lus and torch * Fix water features * Fix crabs * Combine function * Fix wheels * Add Moon Jump Cheat * Wheel Change * Fix smoke due to wheel change * Fix screens for wheels * Fix transparency * Fix staff ghost * Fix lakitu transition widescreen * Rename and export credits text * Fixes --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/actors')
-rw-r--r--src/actors/banana/update.inc.c2
-rw-r--r--src/actors/blue_and_red_shells/update.inc.c10
-rw-r--r--src/actors/falling_rock/update.inc.c2
-rw-r--r--src/actors/green_shell/update.inc.c8
-rw-r--r--src/actors/trees/render.inc.c2
5 files changed, 11 insertions, 13 deletions
diff --git a/src/actors/banana/update.inc.c b/src/actors/banana/update.inc.c
index cb21a3166..cd7b70078 100644
--- a/src/actors/banana/update.inc.c
+++ b/src/actors/banana/update.inc.c
@@ -146,7 +146,7 @@ void update_actor_banana(struct BananaActor* banana) {
func_802B4E30((struct Actor*) banana);
break;
case BANANA_BUNCH_BANANA:
- elderBanana = (struct BananaActor*) &gActorList[banana->elderIndex];
+ elderBanana = (struct BananaActor*) GET_ACTOR(banana->elderIndex);
temp_f2 = elderBanana->pos[0] - banana->pos[0];
temp_f14 = elderBanana->pos[1] - banana->pos[1];
temp_f16 = elderBanana->pos[2] - banana->pos[2];
diff --git a/src/actors/blue_and_red_shells/update.inc.c b/src/actors/blue_and_red_shells/update.inc.c
index a6eb2f269..861433446 100644
--- a/src/actors/blue_and_red_shells/update.inc.c
+++ b/src/actors/blue_and_red_shells/update.inc.c
@@ -293,9 +293,9 @@ void update_actor_red_blue_shell(struct ShellActor* shell) {
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
if (pad13 == ACTOR_RED_SHELL) {
- add_red_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_red_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
} else {
- add_blue_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_blue_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08));
}
}
@@ -307,9 +307,9 @@ void update_actor_red_blue_shell(struct ShellActor* shell) {
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
if (pad13 == ACTOR_RED_SHELL) {
- add_red_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_red_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
} else {
- add_blue_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_blue_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08));
}
}
@@ -429,7 +429,7 @@ void update_actor_red_blue_shell(struct ShellActor* shell) {
break;
case TRIPLE_RED_SHELL:
player = &gPlayers[shell->playerId];
- parent = (TripleShellParent*) &gActorList[shell->parentIndex];
+ parent = (TripleShellParent*) GET_ACTOR(shell->parentIndex);
if (parent->type != ACTOR_TRIPLE_RED_SHELL) {
destroy_destructable_actor((struct Actor*) shell);
} else {
diff --git a/src/actors/falling_rock/update.inc.c b/src/actors/falling_rock/update.inc.c
index 97d9a2a6b..f189aeaa1 100644
--- a/src/actors/falling_rock/update.inc.c
+++ b/src/actors/falling_rock/update.inc.c
@@ -53,7 +53,7 @@ void spawn_falling_rocks(struct ActorSpawnData* spawnData) {
vec3f_set(startingVelocity, 0, 0, 0);
vec3s_set(startingRot, 0, 0, 0);
temp = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_FALLING_ROCK);
- temp_v1 = (struct FallingRock*) &gActorList[temp];
+ temp_v1 = (struct FallingRock*) GET_ACTOR(temp);
temp_v1->unk_06 = temp_s0->someId;
func_802AAAAC((Collision*) &temp_v1->unk30);
diff --git a/src/actors/green_shell/update.inc.c b/src/actors/green_shell/update.inc.c
index 157895844..546baee89 100644
--- a/src/actors/green_shell/update.inc.c
+++ b/src/actors/green_shell/update.inc.c
@@ -74,7 +74,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
return;
} else {
shell->state = 1;
@@ -97,7 +97,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
}
} else {
shell->rotAngle += 0xE38;
@@ -107,7 +107,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
}
}
if (shell->state == 2) {
@@ -160,7 +160,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
break;
case TRIPLE_GREEN_SHELL:
player = &gPlayers[shell->playerId];
- parent = (TripleShellParent*) &gActorList[shell->parentIndex];
+ parent = (TripleShellParent*) GET_ACTOR(shell->parentIndex);
if (parent->type != ACTOR_TRIPLE_GREEN_SHELL) {
destroy_destructable_actor((struct Actor*) shell);
} else {
diff --git a/src/actors/trees/render.inc.c b/src/actors/trees/render.inc.c
index 9ae645199..cb54275c6 100644
--- a/src/actors/trees/render.inc.c
+++ b/src/actors/trees/render.inc.c
@@ -204,8 +204,6 @@ void func_80299864(Camera* camera, Mat4 arg1, struct Actor* arg2) {
// This comment can be removed when this is confirmed to work.
if (GetCourse() == GetLuigiRaceway()) {
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_FC70);
- } else if (GetCourse() == GetMooMooFarm()) {
- gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_mole_tlut);
}
}
}