summaryrefslogtreecommitdiff
path: root/src/code_800AF9B0.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-07-31 21:51:00 -0600
committerGitHub <noreply@github.com>2024-07-31 21:51:00 -0600
commit48a8342f3fff5df04737cbd0511945a8bc5d6dd9 (patch)
treea0ace17d76f5eb68f87288551b64bcf2f1590baa /src/code_800AF9B0.c
parentfee2dc308a2461041f685bf3b884c1b9382b755c (diff)
Fix Buffer Overflows (#28)
* Update code_800AF9B0.c * Update code_80005FD0.c * Update code_800029B0.c * Update code_80091750.c * Update code_80091750.h * Update code_80005FD0.c
Diffstat (limited to 'src/code_800AF9B0.c')
-rw-r--r--src/code_800AF9B0.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c
index faac24fc7..6aabd3757 100644
--- a/src/code_800AF9B0.c
+++ b/src/code_800AF9B0.c
@@ -10,17 +10,7 @@
#include "math_util.h"
#include <stdlib.h>
-/*** Data ***/
-Ambient D_800E8680 = {{
- {31, 31, 31}, 0,
- {31, 31, 31}, 0,
-}};
-
-Light D_800E8688 = {{
- {255, 255, 255}, 0,
- {255, 255, 255}, 0,
- { 40, 40, 20}, 0,
-}};
+Lights1 D_800E8680 = gdSPDefLights1(31, 31, 31, 255, 255, 255, 40, 40, 20);
/*** BSS ****/
s16 D_8018EDB0;
@@ -173,8 +163,8 @@ void func_800B0004(void) {
UNUSED u32 pad[0x5];
s32 i, j;
- gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8688), LIGHT_1);
- gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680), LIGHT_2);
+ gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680.l[0]), LIGHT_1);
+ gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680.a), LIGHT_2);
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE);