diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-06-08 15:02:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-08 15:02:43 -0700 |
| commit | 06d6f7aaa4502698ddef83821c258f835ea41fbd (patch) | |
| tree | b79ba550d13cab7b057f0638f8ae6a97ba939d6d /src/object | |
| parent | e94528d9bf0d6bc3c4488d66b512c6c96964e89f (diff) | |
| parent | 5dd8bb6078105d1508094fdac705492ab7198f5a (diff) | |
Merge pull request #518 from hatal175/sub_0801A8D0
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/object12.c | 16 | ||||
| -rw-r--r-- | src/object/object1E.c | 9 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/object/object12.c b/src/object/object12.c index 2b1ce0c5..d99bc2ad 100644 --- a/src/object/object12.c +++ b/src/object/object12.c @@ -51,8 +51,9 @@ void Object12_Init(Object12Entity* this) { void Object12_Action1(Object12Entity* this) { } -NONMATCH("asm/non_matching/object12/Object12_Action2.inc", void Object12_Action2(Object12Entity* this)) { +void Object12_Action2(Object12Entity* this) { u32 tmp; + u32 tmp2; if (--super->timer == 0) { super->action = 3; super->timer = 0x1e; @@ -60,13 +61,16 @@ NONMATCH("asm/non_matching/object12/Object12_Action2.inc", void Object12_Action2 gScreen.lcd.displayControl |= 0x2000; gScreen.controls.windowInsideControl = 0x1f; gScreen.controls.windowOutsideControl = 0xf; - tmp = super->x.HALF.HI - gRoomControls.scroll_x; - gScreen.controls.window0HorizontalDimensions = (((tmp - 0x18) & 0xff) << 8) | ((tmp + 0x18) & 0xff); - tmp = super->y.HALF.HI - gRoomControls.scroll_y; - gScreen.controls.window0VerticalDimensions = (((tmp - 0x18) & 0xff) << 8) | ((tmp + 0x18) & 0xff); + tmp2 = super->x.HALF.HI; + tmp = gRoomControls.scroll_x; + tmp2 = tmp2 - tmp; + gScreen.controls.window0HorizontalDimensions = (((tmp2 - 0x18) & 0xff) << 8) | ((tmp2 + 0x18) & 0xff); + tmp2 = super->y.HALF.HI; + tmp = gRoomControls.scroll_y; + tmp2 = tmp2 - tmp; + gScreen.controls.window0VerticalDimensions = (((tmp2 - 0x18) & 0xff) << 8) | ((tmp2 + 0x18) & 0xff); } } -END_NONMATCH void Object12_Action3(Object12Entity* this) { if (--super->timer == 0) { diff --git a/src/object/object1E.c b/src/object/object1E.c index 1356bdd0..05d7b271 100644 --- a/src/object/object1E.c +++ b/src/object/object1E.c @@ -25,7 +25,7 @@ void Object1E(Entity* this) { } } -NONMATCH("asm/non_matching/object1E/sub_08087528.inc", void sub_08087528(Entity* this)) { +void sub_08087528(Entity* this) { u32 palette; this->action = 1; @@ -47,13 +47,13 @@ NONMATCH("asm/non_matching/object1E/sub_08087528.inc", void sub_08087528(Entity* } ChangeObjPalette(this, palette); switch (this->animationState) { - case 1: - this->spriteSettings.flipX = 1; + case 3: if (this->type == 0x40) { this->y.HALF.HI += 4; } break; - case 3: + case 1: + this->spriteSettings.flipX = 1; if (this->type == 0x40) { this->y.HALF.HI += 4; } @@ -68,7 +68,6 @@ NONMATCH("asm/non_matching/object1E/sub_08087528.inc", void sub_08087528(Entity* SetDefaultPriority(this, 3); InitializeAnimation(this, this->type2 * 4 + this->animationState); } -END_NONMATCH void sub_080875F4(Entity* this) { GetNextFrame(this); |
