Skip to content

Commit

Permalink
- SW: remap LIGHT_Tics to the otherwise unused spritetype::detail.
Browse files Browse the repository at this point in the history
We should not hijack a coordinate for this due to access rights for scripting and potential value ranme issues. Since this value is never loaded from a map this is safe.
  • Loading branch information
coelckers committed Feb 15, 2022
1 parent 37fda9c commit 680a870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/games/sw/src/light.h
Expand Up @@ -47,7 +47,7 @@ inline void LIGHT_DirChange(DSWActor* sp) { sp->spr.extra ^= SPRX_BOOL10; }

int8_t& LIGHT_FloorShade(DSWActor* a) { return a->spr.xoffset; }
int8_t& LIGHT_CeilingShade(DSWActor* a) { return a->spr.yoffset; }
int& LIGHT_Tics(DSWActor* a) { return a->spr.pos.Z; }
int16_t& LIGHT_Tics(DSWActor* a) { return a->spr.detail; }

inline int LIGHT_DiffuseNum(DSWActor* sp) { return SP_TAG3(sp); }
inline int16_t LIGHT_DiffuseMult(DSWActor* sp) { return SP_TAG4((sp)); }
Expand Down

0 comments on commit 680a870

Please sign in to comment.