summaryrefslogtreecommitdiff
path: root/src/field_effect.c
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-06-12 12:16:45 -0400
committerscnorton <scnorton@biociphers.org>2017-06-12 12:16:45 -0400
commite600694768b4badf5fca03e9671d13c54abedfd1 (patch)
treec39bfb0bc995d23f1f87539cb26014cd070a971a /src/field_effect.c
parentb3df9aad1ddbee7e467bf1799030a5f7987b5f32 (diff)
Another sprite callback currently unlinked to any known/decompiled routine
Diffstat (limited to 'src/field_effect.c')
-rwxr-xr-xsrc/field_effect.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/field_effect.c b/src/field_effect.c
index 15f42c9f8..9269f7db0 100755
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -2870,3 +2870,53 @@ void sub_80890D8(struct Sprite *sprite)
sprite->data7 = 1;
}
}
+
+void sub_808914C(struct Sprite *sprite)
+{
+ if (sprite->data7 == 0)
+ {
+ if (sprite->data0 == 0)
+ {
+ sprite->oam.affineMode = 3;
+ sprite->affineAnims = gSpriteAffineAnimTable_0839F44C;
+ InitSpriteAffineAnim(sprite);
+ StartSpriteAffineAnim(sprite, 1);
+ sprite->pos1.x = 0x5e;
+ sprite->pos1.y = -0x20;
+ sprite->data0++;
+ sprite->data1 = 0xf0;
+ sprite->data2 = 0x800;
+ sprite->data4 = 0x80;
+ }
+ sprite->data1 += sprite->data2 >> 8;
+ sprite->data3 += sprite->data2 >> 8;
+ sprite->data1 &= 0xff;
+ sprite->pos2.x = Cos(sprite->data1, 0x20);
+ sprite->pos2.y = Sin(sprite->data1, 0x78);
+ if (sprite->data2 > 0x100)
+ {
+ sprite->data2 -= sprite->data4;
+ }
+ if (sprite->data4 < 0x100)
+ {
+ sprite->data4 += 24;
+ }
+ if (sprite->data2 < 0x100)
+ {
+ sprite->data2 = 0x100;
+ }
+ if (sprite->data3 >= 60)
+ {
+ sprite->data7++;
+ sprite->oam.affineMode = 0;
+ FreeOamMatrix(sprite->oam.matrixNum);
+ sprite->invisible = 1;
+ }
+ }
+}
+
+void sub_8089230(u8 spriteId)
+{
+ sub_8088FC0(spriteId);
+ gSprites[spriteId].callback = sub_808914C;
+}