summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2022-04-07 12:39:11 -0700
committerGitHub <noreply@github.com>2022-04-07 20:39:11 +0100
commit06412c070f0240eacfaa860eee99b9c723245b7f (patch)
tree488abb4544fcc7bcd09f9f9ef46e38b53f4a3f33 /src/code
parentc2f4572d130d61e66587ea70c05675f830c29b07 (diff)
Cleanup 3 (#778)
* lights * D_801D88A0 -> gScarecrowSpawnSongPtr * Misc fixes * CHECK_FLAG_ALL * Trailing commas in enums * matches * Remove todo from lights bss * Update src/overlays/actors/ovl_En_In/z_en_in.c Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * thisx -> this2 * fix * Todos Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_lights.c7
-rw-r--r--src/code/z_sram_NES.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 615e11e69..2b0db8ad4 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -1,6 +1,8 @@
#include "global.h"
#include "objects/gameplay_keep/gameplay_keep.h"
+LightsBuffer sLightsBuffer;
+
void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type) {
info->type = type;
info->params.point.x = x;
@@ -128,6 +130,7 @@ void Lights_BindPoint(Lights* lights, LightParams* params, GlobalContext* global
Vec3f posF;
Vec3f adjustedPos;
u32 pad;
+
if (radiusF > 0) {
posF.x = params->point.x;
posF.y = params->point.y;
@@ -373,7 +376,7 @@ void Lights_GlowCheck(GlobalContext* globalCtx) {
LightNode* light = globalCtx->lightCtx.listHead;
while (light != NULL) {
- LightPoint* params = (LightPoint*)&light->info->params;
+ LightPoint* params = &light->info->params.point;
if (light->info->type == LIGHT_POINT_GLOW) {
Vec3f pos;
@@ -422,7 +425,7 @@ void Lights_DrawGlow(GlobalContext* globalCtx) {
do {
if (light->info->type == LIGHT_POINT_GLOW) {
- params = (LightPoint*)&light->info->params;
+ params = &light->info->params.point;
if (params->drawGlow) {
f32 scale = SQ((f32)params->radius) * 2e-6f;
diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c
index b1dbdb1fe..52acc9379 100644
--- a/src/code/z_sram_NES.c
+++ b/src/code/z_sram_NES.c
@@ -979,7 +979,8 @@ void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
}
if (gSaveContext.save.unk_F65) {
- Lib_MemCpy(D_801D88A0, gSaveContext.save.scarecrowsSong, sizeof(gSaveContext.save.scarecrowsSong));
+ Lib_MemCpy(gScarecrowSpawnSongPtr, gSaveContext.save.scarecrowsSong,
+ sizeof(gSaveContext.save.scarecrowsSong));
for (i = 0; i != ARRAY_COUNT(gSaveContext.save.scarecrowsSong); i++) {}
}