summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorRoman971 <32455037+Roman971@users.noreply.github.com>2020-08-20 00:15:02 +0200
committerGitHub <noreply@github.com>2020-08-19 18:15:02 -0400
commit3a22219d5dd7c1071b8946434ca8c7a60a98cc9c (patch)
tree3d39c125613eec425cfa6ac776724abcbbc36e45 /src/code
parent4ad461c7974f49df6fba583250d2142b6250bd8d (diff)
Match Lights_Free (#333)
* Match Lights_Free * Remove bug comment
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_lights.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 327c4f2d1..83f0a7032 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -101,19 +101,14 @@ z_Light* Lights_FindFreeSlot() {
return ret;
}
-#ifdef NON_MATCHING
-// single ordering difference
-void Lights_Free(z_Light* light) {
+// return type must not be void to match
+s32 Lights_Free(z_Light* light) {
if (light != NULL) {
sLightsList.numOccupied--;
light->info = NULL;
- sLightsList.nextFree = (light - sLightsList.lights) /
- sizeof(z_Light); //! @bug Due to pointer arithmetic, the division is unnecessary
+ sLightsList.nextFree = (light - sLightsList.lights) / sizeof(z_Light);
}
}
-#else
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/Lights_Free.s")
-#endif
void func_8007A614(GlobalContext* globalCtx, LightingContext* lightCtx) {
Lights_ClearHead(globalCtx, lightCtx);