summaryrefslogtreecommitdiff
path: root/src/code/z_effect_soft_sprite.c
diff options
context:
space:
mode:
authorrozlette <uberpanzermensch@gmail.com>2019-12-17 18:47:52 -0600
committerrozlette <uberpanzermensch@gmail.com>2019-12-17 18:47:52 -0600
commit82ad58e489e2b49064f1834462071433cc2da10f (patch)
treed34e0b2bf7641d29a1fd09673dc982ec31a3f43b /src/code/z_effect_soft_sprite.c
parent45d820041c534c38212b688fe9516a5512ab7e31 (diff)
Cleanup files in code. Decompile code_800CAAD0.c
Diffstat (limited to 'src/code/z_effect_soft_sprite.c')
-rw-r--r--src/code/z_effect_soft_sprite.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c
index 9d7e03dad..f721b864f 100644
--- a/src/code/z_effect_soft_sprite.c
+++ b/src/code/z_effect_soft_sprite.c
@@ -219,10 +219,7 @@ GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_LoadParticle.asm")
#endif
-// XXX regalloc is wrong
-#ifdef NONMATCHING
-
-void EffectSS_UpdateParticle(GlobalContext* ctxt, u32 index) {
+void EffectSS_UpdateParticle(GlobalContext* ctxt, s32 index) {
LoadedParticleEntry* particle = &EffectSS2Info.data_table[index];
if (particle->update != NULL) {
@@ -234,16 +231,10 @@ void EffectSS_UpdateParticle(GlobalContext* ctxt, u32 index) {
particle->position.y += particle->velocity.y;
particle->position.z += particle->velocity.z;
- (*particle->update)(ctxt);
+ (*particle->update)(ctxt, index, particle);
}
}
-#else
-
-GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_UpdateParticle.asm")
-
-#endif
-
void EffectSS_UpdateAllParticles(GlobalContext* ctxt) {
s32 i;
@@ -262,22 +253,13 @@ void EffectSS_UpdateAllParticles(GlobalContext* ctxt) {
}
}
-// XXX regalloc is wrong
-#ifdef NONMATCHING
-
void EffectSS_DrawParticle(GlobalContext* ctxt, s32 index) {
LoadedParticleEntry* entry = &EffectSS2Info.data_table[index];
if (entry->draw != 0) {
- (*entry->draw)(ctxt);
+ (*entry->draw)(ctxt, index, entry);
}
}
-#else
-
-GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_DrawParticle.asm")
-
-#endif
-
void EffectSS_DrawAllParticles(GlobalContext* ctxt) {
LightMapper* s0;
s32 i;