summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-05-03 21:38:56 -0600
committerGitHub <noreply@github.com>2024-05-03 21:38:56 -0600
commite86b876992e8fa6c5724771ad5bb20ee49f84ad4 (patch)
treebd2d527039317f2ad0c06cde2ef6612065ac985f /src
parent1fbf28a78d8b6dd8136aa628b5b1bc3d4c9b9223 (diff)
Changes (#9)
Diffstat (limited to 'src')
-rw-r--r--src/actors/box_truck/render.inc.c1
-rw-r--r--src/code_80091750.c7
-rw-r--r--src/code_80091750.h1
-rw-r--r--src/data/some_data.c2
-rw-r--r--src/menus.c2
-rw-r--r--src/racing/actors.c3
-rw-r--r--src/racing/actors.h43
-rw-r--r--src/racing/memory.c2
-rw-r--r--src/update_objects.c15
9 files changed, 16 insertions, 60 deletions
diff --git a/src/actors/box_truck/render.inc.c b/src/actors/box_truck/render.inc.c
index f429144c1..e3e13bf03 100644
--- a/src/actors/box_truck/render.inc.c
+++ b/src/actors/box_truck/render.inc.c
@@ -2,7 +2,6 @@
#include <libultra/gbi.h>
#include <main.h>
#include <defines.h>
-#include "courses/toads_turnpike/course_data.h"
/**
* @brief Renders the box truck actor.
diff --git a/src/code_80091750.c b/src/code_80091750.c
index 12f606898..90bd01748 100644
--- a/src/code_80091750.c
+++ b/src/code_80091750.c
@@ -65,8 +65,7 @@ Gfx *D_8018E75C;
s32 gNumD_8018E768Entries;
struct_8018E768_entry D_8018E768[D_8018E768_SIZE];
s32 gCycleFlashMenu;
-s8 D_8018E7AC[4];
-s8 D_8018E7B0;
+s8 D_8018E7AC[5];
u32 D_8018E7B8[4];
u32 D_8018E7C8;
u32 D_8018E7D0[4];
@@ -2658,7 +2657,7 @@ void func_80094C60(void) {
void func_80095574(void) {
s32 var_v0;
- if ((D_8018EE0C < 3) || (D_8018E7B0 != 0)) {
+ if ((D_8018EE0C < 3) || (D_8018E7AC[4] != 0)) {
func_800A8230();
}
if (gDebugMenuSelection >= 2) {
@@ -4441,7 +4440,7 @@ Gfx *func_8009BA74(Gfx *arg0, MkTexture *arg1, s32 column, s32 row) {
}
temp_v0_3 = (u8*)func_8009B8C4(temp_v0->textureData);
if (temp_v0_3 != 0) {
- if (D_8018E7B0 != 4) {
+ if (D_8018E7AC[4] != 4) {
arg0 = func_80095E10(arg0, var_s4, 0x00000400, 0x00000400, 0, 0, temp_v0->width, temp_v0->height, temp_v0->dX + column, temp_v0->dY + row, temp_v0_3, temp_v0->width, temp_v0->height);
} else {
arg0 = func_800987D0(arg0, 0U, 0U, temp_v0->width, temp_v0->height, temp_v0->dX + column, temp_v0->dY + row, temp_v0_3, temp_v0->width, temp_v0->height);
diff --git a/src/code_80091750.h b/src/code_80091750.h
index 28c7c8a44..59c6459a6 100644
--- a/src/code_80091750.h
+++ b/src/code_80091750.h
@@ -436,7 +436,6 @@ extern s32 gNumD_8018E768Entries;
extern struct_8018E768_entry D_8018E768[D_8018E768_SIZE];
extern s32 gCycleFlashMenu;
extern s8 D_8018E7AC[];
-extern s8 D_8018E7B0;
extern u32 D_8018E7B8[];
extern u32 D_8018E7C8;
extern u32 D_8018E7D0[];
diff --git a/src/data/some_data.c b/src/data/some_data.c
index 91c827268..b70068b7b 100644
--- a/src/data/some_data.c
+++ b/src/data/some_data.c
@@ -185,7 +185,7 @@ Vtx gBalloonVertexPlane2[] = {
};
u8 D_800E52D0[] = {
- #include "assets/onomatopoeia/gTLUTOnomatopoeia.inc.c"
+ #include "assets/code/some_data/gTLUTOnomatopoeia.rgba16.inc.c"
};
u8 *gCourseOutlineTextures[] = {
diff --git a/src/menus.c b/src/menus.c
index bdecd0e18..1721ca9a1 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -2004,7 +2004,7 @@ void func_800B44BC(void) {
// Likely checks that the user is actually in the menus and not racing.
bool func_800B4520(void) {
- if ((D_8018E7B0 == 2) || (D_8018E7B0 == 3) || (D_8018E7B0 == 4) || (D_8018E7B0 == 7)) {
+ if ((D_8018E7AC[4] == 2) || (D_8018E7AC[4] == 3) || (D_8018E7AC[4] == 4) || (D_8018E7AC[4] == 7)) {
return true;
}
return false;
diff --git a/src/racing/actors.c b/src/racing/actors.c
index 9bbf72ba1..afcd10d44 100644
--- a/src/racing/actors.c
+++ b/src/racing/actors.c
@@ -1,11 +1,12 @@
#include <libultraship.h>
+#include <libultra/gbi.h>
+#include <course_offsets.h>
#include <macros.h>
#include <mk64.h>
#include <sounds.h>
#include <common_structs.h>
#include <actor_types.h>
#include <defines.h>
-#include <libultra/gbi.h>
#include "code_800029B0.h"
#include "main.h"
diff --git a/src/racing/actors.h b/src/racing/actors.h
index a9cb13830..22fc08ce1 100644
--- a/src/racing/actors.h
+++ b/src/racing/actors.h
@@ -129,51 +129,8 @@ extern s16 gCurrentCourseId;
extern u16 isCrossingTriggeredByIndex[];
extern Lights1 D_800DC610[];
-extern Gfx D_0D005338[];
-extern Gfx D_0D005368[];
-extern Gfx D_0D007B20[];
-
-extern Gfx toads_turnpike_dl_0[];
-extern Gfx toads_turnpike_dl_1[];
-extern Gfx toads_turnpike_dl_2[];
-extern Gfx toads_turnpike_dl_3[];
-extern Gfx toads_turnpike_dl_4[];
-extern Gfx toads_turnpike_dl_5[];
-extern Gfx toads_turnpike_dl_6[];
-extern Gfx toads_turnpike_dl_7[];
-extern Gfx toads_turnpike_dl_8[];
-extern Gfx toads_turnpike_dl_9[];
-extern Gfx toads_turnpike_dl_10[];
-extern Gfx toads_turnpike_dl_11[];
-
extern s32 D_80162DF8;
-extern Gfx D_0D001750[];
-extern Gfx D_0D001780[];
-extern Gfx D_0D001798[];
-extern Gfx D_0D0017B0[];
-extern Gfx D_0D0017C8[];
-extern Gfx D_0D0017E0[];
-extern Gfx D_0D0017F8[];
-extern Gfx D_0D001810[];
-extern Gfx D_0D001828[];
-extern Gfx D_0D001B90[];
-extern Gfx D_0D001BD8[];
-extern Gfx D_0D001C20[];
-extern Gfx D_0D001C88[];
-extern Gfx D_0D002EE8[];
-extern Gfx common_model_fake_itembox[];
-extern Gfx itemBoxQuestionMarkModel[];
-extern Gfx D_0D003090[];
-extern Gfx D_0D0030F8[];
-extern Gfx D_0D003128[];
-extern Gfx D_0D003158[];
-extern Gfx D_0D003188[];
-extern Gfx D_0D0031B8[];
-extern Gfx D_0D0031E8[];
-extern Gfx common_model_banana[];
-extern Gfx common_model_flat_banana[];
-
extern s8 D_800DC628[];
extern s8 D_800DC630[];
extern s8 D_802B8864[];
diff --git a/src/racing/memory.c b/src/racing/memory.c
index 038d528fb..2e09f0e77 100644
--- a/src/racing/memory.c
+++ b/src/racing/memory.c
@@ -37,7 +37,7 @@ s32 memoryPadding[2];
void *get_next_available_memory_addr(uintptr_t size) {
uintptr_t freeSpace = gNextFreeMemoryAddress;
size = ALIGN16(size);
- gNextFreeMemoryAddress += size;
+ gNextFreeMemoryAddress += malloc(freeSpace + size);
return (void*) freeSpace;
}
diff --git a/src/update_objects.c b/src/update_objects.c
index 46533bd42..b889b485c 100644
--- a/src/update_objects.c
+++ b/src/update_objects.c
@@ -3621,28 +3621,29 @@ u8 gen_random_item(s16 rank, s16 isCpu)
if (gModeSelection == VERSUS) {
switch (gPlayerCountSelection1) {
case TWO_PLAYERS_SELECTED:
- curve = segmented_to_virtual((void *) common_versus_2_player_item_curve);
+ //curve = segmented_to_virtual((void *) common_versus_2_player_item_curve);
break;
case THREE_PLAYERS_SELECTED:
- curve = segmented_to_virtual((void *) common_versus_3_player_item_curve);
+ //curve = segmented_to_virtual((void *) common_versus_3_player_item_curve);
break;
case FOUR_PLAYERS_SELECTED:
- curve = segmented_to_virtual((void *) common_versus_4_player_item_curve);
+ //curve = segmented_to_virtual((void *) common_versus_4_player_item_curve);
break;
}
randomItem = *((rank * 100) + curve + sRandomItemIndex);
} else if (gModeSelection == BATTLE) {
- curve = segmented_to_virtual((void *) common_battle_item_curve);
+ //curve = segmented_to_virtual((void *) common_battle_item_curve);
randomItem = curve[sRandomItemIndex];
} else { // GP Mode
if (isCpu == 0) {
- curve = segmented_to_virtual((void *) common_grand_prix_human_item_curve);
+ //curve = segmented_to_virtual((void *) common_grand_prix_human_item_curve);
}
else {
- curve = segmented_to_virtual((void *) common_grand_prix_kart_ai_item_curve);
+ //curve = segmented_to_virtual((void *) common_grand_prix_kart_ai_item_curve);
}
- randomItem = *((rank * 100) + curve + sRandomItemIndex);
+ // *((rank * 100) + curve + sRandomItemIndex)
+ randomItem = 1;
}
return randomItem;
}