Merge pull request #138 from jiangzhengwenjz/battle

battle (4th take)
This commit is contained in:
PikalaxALT
2019-11-19 10:58:44 -05:00
committed by GitHub
48 changed files with 8241 additions and 18696 deletions
File diff suppressed because it is too large Load Diff
-2675
View File
File diff suppressed because it is too large Load Diff
-1746
View File
File diff suppressed because it is too large Load Diff
-2500
View File
File diff suppressed because it is too large Load Diff
-3099
View File
File diff suppressed because it is too large Load Diff
-362
View File
@@ -1,362 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_80B1620
sub_80B1620: @ 80B1620
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, _080B1674 @ =gBattleAnimArgs
movs r1, 0x6
ldrsh r0, [r4, r1]
cmp r0, 0
bne _080B1636
adds r0, r5, 0
movs r1, 0x2
bl StartSpriteAnim
_080B1636:
adds r0, r5, 0
movs r1, 0x1
bl InitSpritePosToAnimAttacker
ldrh r0, [r4, 0x4]
strh r0, [r5, 0x2E]
ldr r4, _080B1678 @ =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x32]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x36]
ldr r0, _080B167C @ =0x0000ffe2
strh r0, [r5, 0x38]
adds r0, r5, 0
bl InitAnimArcTranslation
ldr r0, _080B1680 @ =sub_80B1684
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080B1674: .4byte gBattleAnimArgs
_080B1678: .4byte gBattleAnimTarget
_080B167C: .4byte 0x0000ffe2
_080B1680: .4byte sub_80B1684
thumb_func_end sub_80B1620
thumb_func_start sub_80B1684
sub_80B1684: @ 80B1684
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimHorizontalArc
lsls r0, 24
cmp r0, 0
beq _080B1698
adds r0, r4, 0
bl DestroyAnimSprite
_080B1698:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80B1684
thumb_func_start sub_80B16A0
sub_80B16A0: @ 80B16A0
push {r4-r6,lr}
sub sp, 0x4
adds r4, r0, 0
ldr r5, _080B1714 @ =gBattleAnimArgs
movs r1, 0x6
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080B16B8
adds r0, r4, 0
movs r1, 0x2
bl StartSpriteAnim
_080B16B8:
adds r0, r4, 0
movs r1, 0x1
bl InitSpritePosToAnimAttacker
ldr r0, _080B1718 @ =gBattleAnimTarget
ldrb r0, [r0]
mov r6, sp
adds r6, 0x2
movs r1, 0x1
mov r2, sp
adds r3, r6, 0
bl SetAverageBattlerPositions
ldr r0, _080B171C @ =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _080B16E6
ldrh r0, [r5, 0x8]
negs r0, r0
strh r0, [r5, 0x8]
_080B16E6:
ldrh r0, [r5, 0x4]
strh r0, [r4, 0x2E]
mov r1, sp
ldrh r0, [r5, 0x8]
ldrh r1, [r1]
adds r0, r1
strh r0, [r4, 0x32]
ldrh r0, [r5, 0xA]
ldrh r6, [r6]
adds r0, r6
strh r0, [r4, 0x36]
ldr r0, _080B1720 @ =0x0000ffe2
strh r0, [r4, 0x38]
adds r0, r4, 0
bl InitAnimArcTranslation
ldr r0, _080B1724 @ =sub_80B1728
str r0, [r4, 0x1C]
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080B1714: .4byte gBattleAnimArgs
_080B1718: .4byte gBattleAnimTarget
_080B171C: .4byte gBattleAnimAttacker
_080B1720: .4byte 0x0000ffe2
_080B1724: .4byte sub_80B1728
thumb_func_end sub_80B16A0
thumb_func_start sub_80B1728
sub_80B1728: @ 80B1728
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimHorizontalArc
lsls r0, 24
cmp r0, 0
beq _080B173C
adds r0, r4, 0
bl DestroyAnimSprite
_080B173C:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80B1728
thumb_func_start sub_80B1744
sub_80B1744: @ 80B1744
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, _080B1790 @ =gBattleAnimArgs
ldrh r0, [r5, 0x4]
strh r0, [r4, 0x2E]
ldrh r0, [r4, 0x20]
strh r0, [r4, 0x30]
ldrh r1, [r5]
adds r0, r1
strh r0, [r4, 0x32]
ldrh r0, [r4, 0x22]
strh r0, [r4, 0x34]
ldrh r1, [r5, 0x2]
adds r0, r1
strh r0, [r4, 0x36]
adds r0, r4, 0
bl InitSpriteDataForLinearTranslation
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r2, 0x4
ldrsh r1, [r5, r2]
bl __divsi3
strh r0, [r4, 0x38]
movs r1, 0x32
ldrsh r0, [r4, r1]
movs r2, 0x4
ldrsh r1, [r5, r2]
bl __divsi3
strh r0, [r4, 0x3A]
ldr r0, _080B1794 @ =sub_80B1798
str r0, [r4, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080B1790: .4byte gBattleAnimArgs
_080B1794: .4byte sub_80B1798
thumb_func_end sub_80B1744
thumb_func_start sub_80B1798
sub_80B1798: @ 80B1798
push {r4,lr}
adds r4, r0, 0
bl TranslateSpriteLinearFixedPoint
ldrh r0, [r4, 0x30]
ldrh r1, [r4, 0x38]
subs r0, r1
strh r0, [r4, 0x30]
ldrh r0, [r4, 0x32]
ldrh r1, [r4, 0x3A]
subs r0, r1
strh r0, [r4, 0x32]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _080B17BE
adds r0, r4, 0
bl DestroyAnimSprite
_080B17BE:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80B1798
thumb_func_start sub_80B17C4
sub_80B17C4: @ 80B17C4
push {r4,lr}
adds r4, r0, 0
ldr r0, _080B1824 @ =gBattleAnimTarget
ldrb r0, [r0]
adds r2, r4, 0
adds r2, 0x20
adds r3, r4, 0
adds r3, 0x22
movs r1, 0x1
bl SetAverageBattlerPositions
ldr r0, _080B1828 @ =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _080B17F0
ldr r1, _080B182C @ =gBattleAnimArgs
ldrh r0, [r1]
negs r0, r0
strh r0, [r1]
_080B17F0:
ldr r0, _080B182C @ =gBattleAnimArgs
ldrh r2, [r0]
ldrh r1, [r4, 0x20]
adds r2, r1
strh r2, [r4, 0x20]
ldrh r1, [r0, 0x2]
ldrh r3, [r4, 0x22]
adds r1, r3
strh r1, [r4, 0x22]
ldrh r3, [r0, 0x8]
strh r3, [r4, 0x2E]
ldrh r0, [r0, 0x4]
adds r2, r0
strh r2, [r4, 0x32]
adds r1, r3
strh r1, [r4, 0x36]
ldr r0, _080B1830 @ =StartAnimLinearTranslation
str r0, [r4, 0x1C]
ldr r1, _080B1834 @ =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080B1824: .4byte gBattleAnimTarget
_080B1828: .4byte gBattleAnimAttacker
_080B182C: .4byte gBattleAnimArgs
_080B1830: .4byte StartAnimLinearTranslation
_080B1834: .4byte DestroyAnimSprite
thumb_func_end sub_80B17C4
thumb_func_start sub_80B1838
sub_80B1838: @ 80B1838
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, _080B1850 @ =gBattleAnimArgs
movs r1, 0x4
ldrsh r0, [r5, r1]
cmp r0, 0
bne _080B1854
adds r0, r4, 0
movs r1, 0x1
bl InitSpritePosToAnimTarget
b _080B188A
.align 2, 0
_080B1850: .4byte gBattleAnimArgs
_080B1854:
ldr r0, _080B1894 @ =gBattleAnimTarget
ldrb r0, [r0]
adds r2, r4, 0
adds r2, 0x20
adds r3, r4, 0
adds r3, 0x22
movs r1, 0x1
bl SetAverageBattlerPositions
ldr r0, _080B1898 @ =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _080B187A
ldrh r0, [r5]
negs r0, r0
strh r0, [r5]
_080B187A:
ldrh r0, [r5]
ldrh r1, [r4, 0x20]
adds r0, r1
strh r0, [r4, 0x20]
ldrh r0, [r5, 0x2]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
_080B188A:
ldr r0, _080B189C @ =sub_80B18A0
str r0, [r4, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080B1894: .4byte gBattleAnimTarget
_080B1898: .4byte gBattleAnimAttacker
_080B189C: .4byte sub_80B18A0
thumb_func_end sub_80B1838
thumb_func_start sub_80B18A0
sub_80B18A0: @ 80B18A0
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r0, 0xB
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x2E]
movs r1, 0x2E
ldrsh r0, [r4, r1]
movs r1, 0x4
bl Sin
strh r0, [r4, 0x24]
ldrh r0, [r4, 0x30]
adds r0, 0x30
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 24
negs r0, r0
strh r0, [r4, 0x26]
adds r0, r4, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _080B18DC
adds r0, r4, 0
bl DestroyAnimSprite
_080B18DC:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80B18A0
.align 2, 0 @ Don't pad with nop.
@@ -0,0 +1 @@
gUnknown_3005EE0
+6 -263
View File
@@ -499,7 +499,10 @@ gUnknown_83E5A38::
.incbin "baserom.gba", 0x3E5A38, 0x18
gUnknown_83E5A50::
.incbin "baserom.gba", 0x3E5A50, 0x30
.incbin "baserom.gba", 0x3E5A50, 0x28
gUnknown_83E5A78::
.incbin "baserom.gba", 0x3E5A78, 0x8
gUnknown_83E5A80::
.incbin "baserom.gba", 0x3E5A80, 0x18
@@ -522,265 +525,5 @@ gUnknown_83E5B70::
gUnknown_83E5B88:: @ 83E5B88
.incbin "baserom.gba", 0x3E5B88, 0x18
gUnknown_83E5BA0::
.incbin "baserom.gba", 0x3E5BA0, 0x40
gUnknown_83E5BE0::
.incbin "baserom.gba", 0x3E5BE0, 0x18
gUnknown_83E5BF8::
.incbin "baserom.gba", 0x3E5BF8, 0x78
gUnknown_83E5C70::
.incbin "baserom.gba", 0x3E5C70, 0x18
gUnknown_83E5C88::
.incbin "baserom.gba", 0x3E5C88, 0x18
gUnknown_83E5CA0::
.incbin "baserom.gba", 0x3E5CA0, 0x78
gUnknown_83E5D18::
.incbin "baserom.gba", 0x3E5D18, 0x30
@ ================
gUnknown_83E5D48:: @ 83E5D48
.incbin "baserom.gba", 0x3E5D48, 0x4
gUnknown_83E5D4C::
.incbin "baserom.gba", 0x3E5D4C, 0x18
gUnknown_83E5D64::
.incbin "baserom.gba", 0x3E5D64, 0x18
gUnknown_83E5D7C::
.incbin "baserom.gba", 0x3E5D7C, 0x18
gUnknown_83E5D94::
.incbin "baserom.gba", 0x3E5D94, 0x50
gUnknown_83E5DE4::
.incbin "baserom.gba", 0x3E5DE4, 0x18
gUnknown_83E5DFC::
.incbin "baserom.gba", 0x3E5DFC, 0x18
gUnknown_83E5E14::
.incbin "baserom.gba", 0x3E5E14, 0x18
gUnknown_83E5E2C:: @ 83E5E2C
.incbin "baserom.gba", 0x3E5E2C, 0x18
gUnknown_83E5E44:: @ 83E5E44
.incbin "baserom.gba", 0x3E5E44, 0x2
gUnknown_83E5E46:: @ 83E5E46
.incbin "baserom.gba", 0x3E5E46, 0x1A
gUnknown_83E5E60::
.incbin "baserom.gba", 0x3E5E60, 0x54
gUnknown_83E5EB4::
.incbin "baserom.gba", 0x3E5EB4, 0x30
gUnknown_83E5EE4::
.incbin "baserom.gba", 0x3E5EE4, 0x18
gUnknown_83E5EFC:: @ 83E5EFC
.incbin "baserom.gba", 0x3E5EFC, 0x10
gUnknown_83E5F0C:: @ 83E5F0C
.incbin "baserom.gba", 0x3E5F0C, 0x2C
gUnknown_83E5F38:: @ 83E5F38
.incbin "baserom.gba", 0x3E5F38, 0x8C
gUnknown_83E5FC4::
.incbin "baserom.gba", 0x3E5FC4, 0x18
gUnknown_83E5FDC::
.incbin "baserom.gba", 0x3E5FDC, 0x2C
gUnknown_83E6008::
.incbin "baserom.gba", 0x3E6008, 0x50
gUnknown_83E6058::
.incbin "baserom.gba", 0x3E6058, 0x18
gUnknown_83E6070::
.incbin "baserom.gba", 0x3E6070, 0x18
gUnknown_83E6088::
.incbin "baserom.gba", 0x3E6088, 0x18
gUnknown_83E60A0:: @ 83E60A0
.incbin "baserom.gba", 0x3E60A0, 0x18
gUnknown_83E60B8:: @ 83E60B8
.incbin "baserom.gba", 0x3E60B8, 0x18
gUnknown_83E60D0:: @ 83E60D0
.incbin "baserom.gba", 0x3E60D0, 0x50
gUnknown_83E6120:: @ 83E6120
.incbin "baserom.gba", 0x3E6120, 0xB4
gUnknown_83E61D4::
.incbin "baserom.gba", 0x3E61D4, 0x30
gUnknown_83E6204::
.incbin "baserom.gba", 0x3E6204, 0x18
gUnknown_83E621C::
.incbin "baserom.gba", 0x3E621C, 0x5C
gUnknown_83E6278:: @ 83E6278
.incbin "baserom.gba", 0x3E6278, 0x18
gUnknown_83E6290::
.incbin "baserom.gba", 0x3E6290, 0x18
gUnknown_83E62A8:: @ 83E62A8
.incbin "baserom.gba", 0x3E62A8, 0xA0
gUnknown_83E6348::
.incbin "baserom.gba", 0x3E6348, 0x18
gUnknown_83E6360::
.incbin "baserom.gba", 0x3E6360, 0x2C
gUnknown_83E638C::
.incbin "baserom.gba", 0x3E638C, 0x18
gUnknown_83E63A4::
.incbin "baserom.gba", 0x3E63A4, 0x3C
gUnknown_83E63E0:: @ 83E63E0
.incbin "baserom.gba", 0x3E63E0, 0x18
gUnknown_83E63F8::
.incbin "baserom.gba", 0x3E63F8, 0x18
gUnknown_83E6410::
.incbin "baserom.gba", 0x3E6410, 0x18
gUnknown_83E6428::
.incbin "baserom.gba", 0x3E6428, 0x18
gUnknown_83E6440::
.incbin "baserom.gba", 0x3E6440, 0x3C
gUnknown_83E647C::
.incbin "baserom.gba", 0x3E647C, 0x28
gUnknown_83E64A4::
.incbin "baserom.gba", 0x3E64A4, 0x18
gUnknown_83E64BC::
.incbin "baserom.gba", 0x3E64BC, 0x18
gUnknown_83E64D4:: @ 83E64D4
.incbin "baserom.gba", 0x3E64D4, 0x14
gUnknown_83E64E8::
.incbin "baserom.gba", 0x3E64E8, 0x18
gUnknown_83E6500:: @ 83E6500
.incbin "baserom.gba", 0x3E6500, 0x14
gUnknown_83E6514::
.incbin "baserom.gba", 0x3E6514, 0x18
gUnknown_83E652C:: @ 83E652C
.incbin "baserom.gba", 0x3E652C, 0x78
gUnknown_83E65A4:: @ 83E65A4
.incbin "baserom.gba", 0x3E65A4, 0x18
gUnknown_83E65BC::
.incbin "baserom.gba", 0x3E65BC, 0xA0
gUnknown_83E665C::
.incbin "baserom.gba", 0x3E665C, 0x18
gUnknown_83E6674::
.incbin "baserom.gba", 0x3E6674, 0x6C
gUnknown_83E66E0::
.incbin "baserom.gba", 0x3E66E0, 0x18
gUnknown_83E66F8::
.incbin "baserom.gba", 0x3E66F8, 0x18
gUnknown_83E6710::
.incbin "baserom.gba", 0x3E6710, 0x18
gUnknown_83E6728::
.incbin "baserom.gba", 0x3E6728, 0x18
gUnknown_83E6740::
.incbin "baserom.gba", 0x3E6740, 0x18
gUnknown_83E6758::
.incbin "baserom.gba", 0x3E6758, 0x34
gUnknown_83E678C::
.incbin "baserom.gba", 0x3E678C, 0x34
gUnknown_83E67C0::
.incbin "baserom.gba", 0x3E67C0, 0x18
gUnknown_83E67D8::
.incbin "baserom.gba", 0x3E67D8, 0x18
gUnknown_83E67F0::
.incbin "baserom.gba", 0x3E67F0, 0x18
gUnknown_83E6808::
.incbin "baserom.gba", 0x3E6808, 0x18
gUnknown_83E6820::
.incbin "baserom.gba", 0x3E6820, 0x44
gUnknown_83E6864::
.incbin "baserom.gba", 0x3E6864, 0x18
gUnknown_83E687C::
.incbin "baserom.gba", 0x3E687C, 0x18
gUnknown_83E6894::
.incbin "baserom.gba", 0x3E6894, 0x18
gUnknown_83E68AC::
.incbin "baserom.gba", 0x3E68AC, 0x54
gUnknown_83E6900::
.incbin "baserom.gba", 0x3E6900, 0x48
gUnknown_83E6948::
.incbin "baserom.gba", 0x3E6948, 0x34
gUnknown_83E697C::
.incbin "baserom.gba", 0x3E697C, 0x30
gUnknown_83E69AC::
.incbin "baserom.gba", 0x3E69AC, 0x74
gUnknown_83E6A20::
.incbin "baserom.gba", 0x3E6A20, 0x18
gUnknown_83E6A38::
.incbin "baserom.gba", 0x3E6A38, 0x18
gUnknown_83E6A50::
.incbin "baserom.gba", 0x3E6A50, 0x34
gUnknown_83E6A84::
.incbin "baserom.gba", 0x3E6A84, 0x34
gUnknown_83E6AB8::
.incbin "baserom.gba", 0x3E6AB8, 0x18
gUnknown_83E6AD0::
.incbin "baserom.gba", 0x3E6AD0, 0x18
gUnknown_83E5BA0:: @ 83E5BA0
.incbin "baserom.gba", 0x3E5BA0, 0x18
+70 -70
View File
@@ -924,11 +924,11 @@ Move_LEECH_SEED:: @ 81C7C23
Move_EMBER:: @ 81C7C79
loadspritegfx 10029
loopsewithpan SE_W052, 192, 5, 2
createsprite gUnknown_83E5D4C, ANIM_TARGET, 2, 20, 0, -16, 24, 20, 1
createsprite gEmberSpriteTemplate, ANIM_TARGET, 2, 20, 0, -16, 24, 20, 1
delay 4
createsprite gUnknown_83E5D4C, ANIM_TARGET, 2, 20, 0, 0, 24, 20, 1
createsprite gEmberSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 24, 20, 1
delay 4
createsprite gUnknown_83E5D4C, ANIM_TARGET, 2, 20, 0, 16, 24, 20, 1
createsprite gEmberSpriteTemplate, ANIM_TARGET, 2, 20, 0, 16, 24, 20, 1
delay 16
playsewithpan SE_W172, 63
call gUnknown_81C7CD5
@@ -937,7 +937,7 @@ Move_EMBER:: @ 81C7C79
end
gUnknown_81C7CD5:: @ 81C7CD5
createsprite gUnknown_83E5D64, ANIM_TARGET, 2, -24, 24, 24, 24, 20, 1, 1
createsprite gEmberFlareSpriteTemplate, ANIM_TARGET, 2, -24, 24, 24, 24, 20, 1, 1
delay 4
return
@@ -949,7 +949,7 @@ Move_MEGA_PUNCH:: @ 81C7CED
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 0, 16, 0
setalpha 12, 8
playsewithpan SE_W025, 63
createsprite gUnknown_83E67C0, ANIM_ATTACKER, 3, 0, 0, 0, 50
createsprite gMegaPunchKickSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 50
createvisualtask sub_80BA7F8, 10, 4, 2, 0, 7, 32767
delay 50
call gUnknown_81C7D89
@@ -997,7 +997,7 @@ Move_MEGA_KICK:: @ 81C7DC7
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 0, 16, 0
setalpha 12, 8
playsewithpan SE_W025, 63
createsprite gUnknown_83E67C0, ANIM_ATTACKER, 3, 0, 0, 1, 50
createsprite gMegaPunchKickSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 50
createvisualtask sub_80BA7F8, 10, 4, 2, 0, 7, 32767
delay 50
playsewithpan SE_W025B, 63
@@ -1031,12 +1031,12 @@ gUnknown_81C7E77:: @ 81C7E77
gUnknown_81C7E91:: @ 81C7E91
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, -8, 1, 2
createsprite gUnknown_83E6710, ANIM_ATTACKER, 3, -8, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, -8, 0, 8, 1, 0
goto gUnknown_81C7E77
gUnknown_81C7EB6:: @ 81C7EB6
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, -8, 1, 2
createsprite gUnknown_83E6710, ANIM_ATTACKER, 3, 8, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 8, 0, 8, 1, 0
goto gUnknown_81C7E77
Move_SONIC_BOOM:: @ 81C7EDB
@@ -1172,24 +1172,24 @@ gUnknown_81C81E3:: @ 81C81E3
gUnknown_81C81E8:: @ 81C81E8
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -20, -20, 1, 2
createsprite gUnknown_83E6710, ANIM_TARGET, 3, -20, -12, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, -20, -12, 8, 1, 0
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
playsewithpan SE_W233B, 63
delay 8
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 8, 0, 1, 2
createsprite gUnknown_83E6710, ANIM_TARGET, 3, 8, 8, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 8, 8, 8, 1, 0
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
playsewithpan SE_W233B, 63
goto gUnknown_81C81E3
gUnknown_81C8259:: @ 81C8259
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 12, -20, 1, 2
createsprite gUnknown_83E6710, ANIM_TARGET, 3, 12, -12, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 12, -12, 8, 1, 0
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
playsewithpan SE_W233B, 63
delay 8
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -12, 0, 1, 2
createsprite gUnknown_83E6710, ANIM_TARGET, 3, -12, 8, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, -12, 8, 8, 1, 0
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
playsewithpan SE_W233B, 63
goto gUnknown_81C81E3
@@ -1283,7 +1283,7 @@ Move_REVERSAL:: @ 81C8445
delay 8
playsewithpan SE_W233B, 63
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, 32767, 8, 0, 0
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 10, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
createvisualtask sub_8099BD4, 5, 0, 1, 8, 1, 0
end
@@ -1383,7 +1383,7 @@ Move_DIZZY_PUNCH:: @ 81C86FC
monbg 1
setalpha 12, 8
call gUnknown_81C8817
createsprite gUnknown_83E6710, ANIM_TARGET, 5, 16, 8, 20, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 5, 16, 8, 20, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 16, 0, 1, 1
playsewithpan SE_W004, 63
createsprite gUnknown_83E67F0, ANIM_TARGET, 3, 16, 8, 160, -32
@@ -1394,7 +1394,7 @@ Move_DIZZY_PUNCH:: @ 81C86FC
createsprite gUnknown_83E67F0, ANIM_TARGET, 3, 16, 8, -384, -31
delay 10
call gUnknown_81C8817
createsprite gUnknown_83E6710, ANIM_TARGET, 5, -16, -8, 20, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 5, -16, -8, 20, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -16, -16, 1, 1
playsewithpan SE_W233B, 63
createsprite gUnknown_83E67F0, ANIM_TARGET, 3, -16, -8, 160, -32
@@ -3196,7 +3196,7 @@ gUnknown_81CB11E:: @ 81CB11E
playsewithpan SE_W026, 192
delay 6
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0
playsewithpan SE_W004, 63
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
waitforvisualfinish
@@ -3523,7 +3523,7 @@ Move_HEAT_WAVE:: @ 81CB766
loadspritegfx 10261
createvisualtask AnimTask_BlendParticle, 5, 10261, 0, 6, 6, 31
createvisualtask AnimTask_LoadSandstormBackground, 5, 1
createvisualtask sub_80ADAA4, 6, 6, 31
createvisualtask AnimTask_BlendBackground, 6, 6, 31
panse_1B SE_W257, 192, 63, 2, 0
delay 4
createvisualtask sub_80AD800, 5,
@@ -3548,7 +3548,7 @@ Move_HAIL:: @ 81CB816
loadspritegfx 10141
createvisualtask sub_80BA7F8, 10, 1, 3, 0, 6, 0
waitforvisualfinish
createvisualtask sub_80B038C, 5,
createvisualtask AnimTask_Hail1, 5,
loopsewithpan SE_W258, 0, 8, 10
waitforvisualfinish
createvisualtask sub_80BA7F8, 10, 1, 3, 6, 0, 0
@@ -3776,20 +3776,20 @@ gUnknown_81CBC47:: @ 81CBC47
delay 4
delay 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, -18, -18, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, -18, -18, 10, 1, 0
playsewithpan SE_W233, 63
delay 20
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8
delay 5
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, 18, 18, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 18, 18, 10, 1, 0
playsewithpan SE_W233, 63
delay 20
createvisualtask AnimTask_WindUpLunge, 2, 0, -24, 0, 24, 10, 24, 3
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 6, 0
delay 37
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, 0, 0, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 10, 1, 0
playsewithpan SE_W233B, 63
waitforvisualfinish
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 6, 0, 0
@@ -3805,20 +3805,20 @@ gUnknown_81CBD16:: @ 81CBD16
createsprite gUnknown_83E6808, ANIM_ATTACKER, 3, 1, 0, 0, 90, 10
delay 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, -18, -18, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, -18, -18, 10, 1, 0
playsewithpan SE_W233, 63
delay 20
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8
delay 5
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, 18, 18, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 18, 18, 10, 1, 0
playsewithpan SE_W233, 63
delay 20
createvisualtask AnimTask_WindUpLunge, 2, 0, -24, 0, 24, 10, 24, 3
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 6, 0
delay 37
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, 0, 0, 10, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 10, 1, 0
playsewithpan SE_W233B, 63
waitforvisualfinish
createsprite gUnknown_83E6820, ANIM_ATTACKER, 2, 1, 0, -8, -12
@@ -4026,7 +4026,7 @@ Move_MIST_BALL:: @ 81CC212
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, 32279, 16, 32767, 16
delay 0
playsewithpan SE_W114, 0
createvisualtask sub_80AFD80, 5,
createvisualtask AnimTask_LoadMistTiles, 5,
createvisualtask sub_80BA7F8, 10, 4, 3, 0, 16, 32767
delay 8
createvisualtask AnimTask_ShakeMon, 2, 1, 4, 0, 70, 0
@@ -4154,7 +4154,7 @@ Move_NEEDLE_ARM:: @ 81CC513
waitforvisualfinish
createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 18, 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0
playsewithpan SE_W233B, 63
createsprite gUnknown_83E3100, ANIM_TARGET, 2, 1, 1, 0, -24, 10
createsprite gUnknown_83E3100, ANIM_TARGET, 2, 1, 1, 17, -17, 10
@@ -4379,7 +4379,7 @@ Move_SHADOW_PUNCH:: @ 81CCB76
playsewithpan SE_W026, 192
delay 6
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0
playsewithpan SE_W004, 63
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 6, 1
waitforvisualfinish
@@ -4749,7 +4749,7 @@ Move_ICE_PUNCH:: @ 81CD2E0
createsprite gUnknown_83E6348, ANIM_ATTACKER, 2, 160
createsprite gUnknown_83E6348, ANIM_ATTACKER, 2, 224
delay 17
createsprite gUnknown_83E6710, ANIM_ATTACKER, 4, 0, -10, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 4, 0, -10, 8, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -10, 1, 1
playsewithpan SE_W004, 63
delay 2
@@ -4914,7 +4914,7 @@ Move_THUNDER_PUNCH:: @ 81CD6CA
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 16, 0
waitforvisualfinish
playsewithpan SE_W004, 63
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
delay 1
createvisualtask sub_80BA0E8, 2, 257, 257, 257
@@ -6661,19 +6661,19 @@ gUnknown_81CFEEB:: @ 81CFEEB
end
gUnknown_81CFEF0:: @ 81CFEF0
createsprite gUnknown_83E6710, ANIM_TARGET, 4, -16, -8, 20, 1, 1
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, -16, -8, 20, 1, 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -16, -16, 1, 2
createvisualtask AnimTask_ShakeMon, 5, 1, 4, 0, 6, 1
goto gUnknown_81CFEEB
gUnknown_81CFF26:: @ 81CFF26
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 8, 8, 20, 1, 1
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 8, 8, 20, 1, 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, 0, 1, 2
createvisualtask AnimTask_ShakeMon, 5, 1, 4, 0, 6, 1
goto gUnknown_81CFEEB
gUnknown_81CFF5C:: @ 81CFF5C
createsprite gUnknown_83E6710, ANIM_TARGET, 4, 0, 0, 20, 1, 1
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 20, 1, 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -8, 1, 1
createvisualtask AnimTask_ShakeMon, 5, 1, 6, 0, 8, 1
goto gUnknown_81CFEEB
@@ -6687,7 +6687,7 @@ Move_DYNAMIC_PUNCH:: @ 81CFF92
monbg 3
setalpha 12, 8
playsewithpan SE_W233B, 63
createsprite gUnknown_83E6710, ANIM_TARGET, 3, 0, 0, 20, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 20, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0
createvisualtask AnimTask_ShakeMon, 5, 1, 5, 0, 7, 1
delay 1
@@ -6726,17 +6726,17 @@ Move_COUNTER:: @ 81D005A
playsewithpan SE_W233B, 63
delay 1
createvisualtask AnimTask_ShakeMon, 2, 1, 5, 0, 25, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 3, -15, 18, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, -15, 18, 8, 1, 0
delay 3
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, -4, 1, 0
playsewithpan SE_W233B, 63
delay 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 3, 0, -4, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 0, -4, 8, 1, 0
delay 3
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 15, 9, 1, 0
playsewithpan SE_W233B, 63
delay 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 3, 15, 9, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 15, 9, 8, 1, 0
delay 5
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5
waitforvisualfinish
@@ -6775,7 +6775,7 @@ Move_ROCK_SMASH:: @ 81D01A4
setalpha 12, 8
delay 1
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1
createsprite gUnknown_83E6710, ANIM_ATTACKER, 2, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 8, 1, 0
playsewithpan SE_W233B, 63
createvisualtask AnimTask_ShakeMon, 2, 1, 3, 0, 5, 1
waitforvisualfinish
@@ -7050,7 +7050,7 @@ gUnknown_81D086C:: @ 81D086C
Move_HAZE:: @ 81D0882
waitforvisualfinish
playsewithpan SE_W114, 0
createvisualtask sub_80AFAE4, 5,
createvisualtask AnimTask_Haze1, 5,
delay 30
createvisualtask sub_80BA7F8, 10, 1920, 2, 0, 16, 0
delay 90
@@ -7070,7 +7070,7 @@ Move_FIRE_PUNCH:: @ 81D08B5
createsprite gUnknown_83E5BE0, ANIM_TARGET, 1, 196
playsewithpan SE_W172, 63
waitforvisualfinish
createsprite gUnknown_83E6710, ANIM_TARGET, 3, 0, 0, 8, 1, 0
createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 8, 1, 0
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 1
createvisualtask AnimTask_ShakeMon, 2, 1, 0, 3, 15, 1
call gUnknown_81D0950
@@ -9935,7 +9935,7 @@ Move_MAGICAL_LEAF:: @ 81D4E6D
Move_ICE_BALL:: @ 81D4F8E
loadspritegfx 10043
loadspritegfx 10141
createvisualtask sub_80B0870, 5, 0
createvisualtask AnimTask_GetRolloutCounter, 5, 0
jumpargeq 0, 4, gUnknown_81D5005
gUnknown_81D4FA5:: @ 81D4FA5
@@ -9943,7 +9943,7 @@ gUnknown_81D4FA5:: @ 81D4FA5
createsprite gUnknown_83E665C, ANIM_TARGET, 2, 15, 0, -12, -16, 30, -40
delay 28
playsewithpan SE_W280, 63
createvisualtask sub_80B0870, 5, 0
createvisualtask AnimTask_GetRolloutCounter, 5, 0
jumpargeq 0, 0, gUnknown_81D5016
jumpargeq 0, 1, gUnknown_81D5045
jumpargeq 0, 2, gUnknown_81D507E
@@ -9951,7 +9951,7 @@ gUnknown_81D4FA5:: @ 81D4FA5
jumpargeq 0, 4, gUnknown_81D5109
gUnknown_81D4FF3:: @ 81D4FF3
createvisualtask sub_80B0870, 5, 0
createvisualtask AnimTask_GetRolloutCounter, 5, 0
jumpargeq 0, 4, gUnknown_81D500C
gUnknown_81D5004:: @ 81D5004
@@ -10272,88 +10272,88 @@ gUnknown_81D5712:: @ 81D5712
return
gUnknown_81D575B:: @ 81D575B
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, 10, 10, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 10, 10, 0
playsewithpan SE_W092, 63
delay 6
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, 20, -20, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, -20, 0
playsewithpan SE_W092, 63
delay 6
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, -20, 15, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, -20, 15, 0
playsewithpan SE_W092, 63
delay 6
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, 0, 0, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0
playsewithpan SE_W092, 63
delay 6
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, -20, -20, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, -20, -20, 0
playsewithpan SE_W092, 63
delay 6
createsprite gUnknown_83E6AB8, ANIM_TARGET, 2, 16, -8, 0
createsprite gPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 16, -8, 0
playsewithpan SE_W092, 63
return
gUnknown_81D57CC:: @ 81D57CC
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 10, 10, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 0
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 20, -20, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 20, -20, 0
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, -20, 15, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, -20, 15, 0
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 0, 0, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, -20, -20, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, -20, -20, 0
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 16, -8, 0
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 16, -8, 0
playsewithpan SE_W145C, 63
return
gUnknown_81D583D:: @ 81D583D
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 10, 10, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, -28, -10, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, -28, -10, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 20, -20, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 20, -20, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, -20, 15, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, -20, 15, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 0, 0, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 27, 8, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 27, 8, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, -20, -20, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, -20, -20, 1
playsewithpan SE_W145C, 63
delay 6
createsprite gUnknown_83E6AD0, ANIM_ATTACKER, 2, 16, -8, 1
createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 16, -8, 1
playsewithpan SE_W145C, 63
return
gUnknown_81D58D4:: @ 81D58D4
playsewithpan SE_W085B, 63
createsprite gUnknown_83E6088, ANIM_TARGET, 2, 5, 0, 5, 0
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 5, 0, 5, 0
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, -5, 10, 5, 1
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -5, 10, 5, 1
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, 15, 20, 5, 2
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 15, 20, 5, 2
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, -15, -10, 5, 0
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -15, -10, 5, 0
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, 25, 0, 5, 1
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 25, 0, 5, 1
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, -8, 8, 5, 2
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -8, 8, 5, 2
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, 2, -8, 5, 0
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, 2, -8, 5, 0
delay 2
createsprite gUnknown_83E6088, ANIM_TARGET, 2, -20, 15, 5, 1
createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -20, 15, 5, 1
return
gUnknown_81D595F:: @ 81D595F
-24
View File
@@ -191,30 +191,6 @@ gUnknown_8478EC4:: @ 8478EC4
gUnknown_8478F14:: @ 8478F14
.incbin "baserom.gba", 0x478F14, 0x8
gUnknown_8478F1C:: @ 8478F1C
.incbin "baserom.gba", 0x478F1C, 0x144
gUnknown_8479060:: @ 8479060
.incbin "baserom.gba", 0x479060, 0x78
gUnknown_84790D8:: @ 84790D8
.incbin "baserom.gba", 0x4790D8, 0xC0
gUnknown_8479198:: @ 8479198
.incbin "baserom.gba", 0x479198, 0x10
gUnknown_84791A8:: @ 84791A8
.incbin "baserom.gba", 0x4791A8, 0x10
gUnknown_84791B8:: @ 84791B8
.incbin "baserom.gba", 0x4791B8, 0x14
gUnknown_84791CC:: @ 84791CC
.incbin "baserom.gba", 0x4791CC, 0x1C
gUnknown_84791E8:: @ 84791E8
.incbin "baserom.gba", 0x4791E8, 0x18
.section .rodata.8479668
.align 2
+1 -1
View File
@@ -25,7 +25,7 @@ gUnknown_83C2D00:: @ 83C2D00
gUnknown_83C2D20:: @ 83C2D20
.incbin "baserom.gba", 0x3C2D20, 0x820
gUnknown_83C3540:: @ 83C3540
gWeatherFog1Tiles:: @ 83C3540
.incbin "baserom.gba", 0x3C3540, 0x3080
gUnknown_83C65C0:: @ 83C65C0
+1 -1
View File
@@ -13760,7 +13760,7 @@ gFile_graphics_battle_anims_sprites_277_sheet:: @ 8E7EE00
.incbin "graphics/battle_anims/sprites/277.4bpp.lz"
.align 2
gFile_graphics_battle_anims_backgrounds_fog_tilemap:: @ 8E7F1F4
gBattleAnimFogTilemap:: @ 8E7F1F4
.incbin "graphics/battle_anims/backgrounds/fog.bin.lz"
.align 2
+1 -1
View File
@@ -664,7 +664,7 @@ extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200];
extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT];
extern void (*gPreBattleCallback1)(void);
extern bool8 gDoingBattleAnim;
extern void *gUnknown_3005EE0[];
extern u8 *gUnknown_3005EE0[MAX_BATTLERS_COUNT];
extern u8 *gUnknown_2022BB8;
extern u8 *gUnknown_2022BBC;
extern void (*gBattleMainFunc)(void);
+65 -51
View File
@@ -57,46 +57,53 @@ extern s32 gAnimMoveDmg;
extern u16 gAnimBattlerSpecies[MAX_BATTLERS_COUNT];
extern u8 gUnknown_2037F24;
extern struct OamData gOamData_83ACA40;
extern struct OamData gOamData_83AC9C8;
extern struct OamData gOamData_83ACA38;
extern struct OamData gOamData_83AC9D0;
extern struct OamData gOamData_83AC9F8;
extern struct OamData gOamData_83AC9D8;
extern struct OamData gOamData_83ACB58;
extern struct OamData gOamData_83ACAF8;
extern struct OamData gOamData_83ACB60;
extern struct OamData gOamData_83ACA30;
extern struct OamData gOamData_83ACA98;
extern struct OamData gOamData_83ACA90;
extern struct OamData gOamData_83ACAF0;
extern struct OamData gOamData_83ACB10;
extern struct OamData gOamData_83ACB18;
extern struct OamData gOamData_83ACB38;
extern struct OamData gOamData_83ACA18;
extern struct OamData gOamData_83ACB20;
extern struct OamData gOamData_83ACB50;
extern struct OamData gOamData_83ACAB8;
extern struct OamData gOamData_83ACA00;
extern struct OamData gOamData_83ACBC0;
extern struct OamData gOamData_83ACB00;
extern struct OamData gOamData_83AC9E0;
extern struct OamData gOamData_83ACA20;
extern struct OamData gOamData_83ACA80;
extern struct OamData gOamData_83ACAA0;
extern const struct OamData gOamData_83AC9C8;
extern const struct OamData gOamData_83AC9D0;
extern const struct OamData gOamData_83AC9D8;
extern const struct OamData gOamData_83AC9E0;
extern const struct OamData gOamData_83AC9F8;
extern const struct OamData gOamData_83ACA00;
extern const struct OamData gOamData_83ACA18;
extern const struct OamData gOamData_83ACA20;
extern const struct OamData gOamData_83ACA30;
extern const struct OamData gOamData_83ACA38;
extern const struct OamData gOamData_83ACA40;
extern const struct OamData gOamData_83ACA80;
extern const struct OamData gOamData_83ACA90;
extern const struct OamData gOamData_83ACA98;
extern const struct OamData gOamData_83ACAA0;
extern const struct OamData gOamData_83ACAB8;
extern const struct OamData gOamData_83ACAC8;
extern const struct OamData gOamData_83ACAE8;
extern const struct OamData gOamData_83ACAF0;
extern const struct OamData gOamData_83ACAF8;
extern const struct OamData gOamData_83ACB00;
extern const struct OamData gOamData_83ACB10;
extern const struct OamData gOamData_83ACB18;
extern const struct OamData gOamData_83ACB20;
extern const struct OamData gOamData_83ACB28;
extern const struct OamData gOamData_83ACB38;
extern const struct OamData gOamData_83ACB48;
extern const struct OamData gOamData_83ACB50;
extern const struct OamData gOamData_83ACB58;
extern const struct OamData gOamData_83ACB60;
extern const struct OamData gOamData_83ACB88;
extern const struct OamData gOamData_83ACBC0;
extern const struct OamData gOamData_83ACBE8;
// battle_anim.s
void MoveBattlerSpriteToBG(u8 battlerId, u8);
void sub_8073128(u8);
void ClearBattleAnimationVars(void);
void DoMoveAnim(u16 move);
void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMoveAnim);
void DestroyAnimSprite(struct Sprite *sprite);
void DestroyAnimVisualTask(u8 taskId);
void DestroyAnimSoundTask(u8 taskId);
bool8 IsAnimBankSpriteVisible(u8 bank);
void sub_80A438C(u8 bank, bool8 toBG_2, bool8 setSpriteInvisible);
bool8 IsAnimBankSpriteVisible(u8 battlerId);
bool8 IsContest(void);
s8 BattleAnimAdjustPanning(s8 pan);
s8 BattleAnimAdjustPanning2(s8 pan);
s16 sub_80A52EC(s16 a);
s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan);
bool8 IsBattlerSpriteVisible(u8 battlerId);
s16 KeepPanInRange(s16 a, s32 oldPan);
@@ -135,23 +142,6 @@ enum
BATTLER_COORD_ATTR_RAW_BOTTOM,
};
u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId);
bool8 IsBankSpritePresent(u8 battlerId);
void sub_80A6C68(u8 arg0);
u8 GetAnimBattlerSpriteId(u8 wantedBank);
bool8 IsDoubleBattle(void);
u8 sub_80A6D94(void);
u8 sub_80A8364(u8);
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite *));
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
u8 sub_80A82E4(u8 battlerId);
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
u8 GetGhostSpriteDefault_Y(u8 battlerId);
void MoveBattlerSpriteToBG(u8 battlerId, u8);
void sub_8073128(u8);
// battle_anim_status_effects.s
#define STAT_ANIM_PLUS1 15
#define STAT_ANIM_PLUS2 39
@@ -245,7 +235,7 @@ u8 sub_8075D80(u8 a1);
void AnimSpriteOnMonPos(struct Sprite *sprite);
void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite);
void AnimThrowProjectile(struct Sprite *sprite);
void sub_8075F0C(struct Sprite *sprite);
void AnimSnoreZ(struct Sprite *sprite);
s16 CloneBattlerSpriteWithBlend(u8 animBattler);
void obj_delete_but_dont_free_vram(struct Sprite *sprite);
void sub_8076048(u8 taskId);
@@ -293,6 +283,7 @@ void sub_8099BD4(u8 taskId);
// normal.c
extern const struct SpriteTemplate gUnknown_83E7C98;
extern const struct SpriteTemplate gBasicHitSplatSpriteTemplate;
u32 UnpackSelectedBattleAnimPalettes(s16 selector);
void sub_80B9BDC(u8 taskId);
@@ -353,11 +344,34 @@ void sub_80B194C(u8 taskId);
void sub_80B1D3C(struct Sprite *sprite);
void sub_80B2868(u8 taskId);
// fighting.c
void sub_80B1530(u8 taskId);
// ice.c
void AnimTask_Haze1(u8 taskId);
void AnimTask_LoadMistTiles(u8 taskId);
void AnimTask_Hail1(u8 taskId);
void AnimTask_GetRolloutCounter(u8 taskId);
// electric.c
void sub_80AE220(u8 taskId);
void sub_80AE540(u8 taskId);
void sub_80AE8A0(u8 taskId);
void sub_80AEA10(u8 taskId);
void sub_80AECE0(u8 taskId);
void sub_80AEFA0(u8 taskId);
// fire.c
extern const union AnimCmd *const gUnknown_83E5D48[];
void sub_80ACEA4(u8 taskId);
void sub_80ADAD8(u8 taskId);
void AnimTask_BlendBackground(u8 taskId);
void sub_80AD800(u8 taskId);
// water.s
extern const union AnimCmd *const gUnknown_83E5958[];
// fire.s
extern const union AnimCmd *const gUnknown_83E5D48[];
extern const union AnimCmd *const gUnknown_83E5A78[];
// battle_anim_utility_funcs.c
void sub_80BA7F8(u8 taskId);
+6 -11
View File
@@ -203,7 +203,7 @@ void BtlController_EmitPrintString(u8 bufferId, u16 stringId);
void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId);
void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2);
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
void BtlController_EmitChooseItem(u8 bufferId, u8* arg1);
void BtlController_EmitChooseItem(u8 bufferId, u8 *arg1);
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4);
void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
void BtlController_EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints);
@@ -221,7 +221,7 @@ void BtlController_EmitPlayFanfare(u8 bufferId, u16 songId);
void BtlController_EmitFaintingCry(u8 bufferId);
void BtlController_EmitIntroSlide(u8 bufferId, u8 terrainId);
void BtlController_EmitIntroTrainerBallThrow(u8 bufferId);
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2);
void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus *hpAndStatus, u8 arg2);
void BtlController_EmitHidePartyStatusSummary(u8 bufferId);
void BtlController_EmitEndBounceEffect(u8 bufferId);
void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible);
@@ -246,21 +246,16 @@ void MoveSelectionCreateCursorAt(u8 cursorPos, u8 arg1);
void MoveSelectionDestroyCursorAt(u8 cursorPos);
void HandleInputChooseMove(void);
// recorded player controller
void SetControllerToRecordedPlayer(void);
// opponent controller
void SetControllerToOpponent(void);
void OpponentBufferExecCompleted(void);
// player partner controller
void SetControllerToPlayerPartner(void);
// safari controller
void SetControllerToSafari(void);
// pokedude controller
void SetControllerToPokeDude(void);
void SetControllerToPokedude(void);
void InitPokedudePartyAndOpponent(void);
// oak and old man controller
void SetControllerToOakOrOldMan(void);
@@ -273,10 +268,10 @@ void sub_80E7988(void);
void sub_80EB30C(void);
void sub_80EB524(void);
// link opponent
// link opponent controller
void SetControllerToLinkOpponent(void);
// link partner
// link partner controller
void SetControllerToLinkPartner(void);
#endif // GUARD_BATTLE_CONTROLLERS_H
+7 -7
View File
@@ -110,12 +110,12 @@
u32 _size = size; \
while (1) \
{ \
DmaFill##bit(dmaNum, 0, dest, (block)); \
dest += (block); \
DmaFill##bit(dmaNum, 0, dest, (block)); \
dest += (block); \
_size -= (block); \
if (_size <= (block)) \
{ \
DmaFill##bit(dmaNum, 0, dest, _size); \
DmaFill##bit(dmaNum, 0, dest, _size); \
break; \
} \
} \
@@ -123,16 +123,16 @@
#define DmaFillLarge(dmaNum, value, dest, size, block, bit) \
{ \
void *_dest = (void *)dest; \
void *_dest = (void *)dest; \
u32 _size = size; \
while (1) \
{ \
DmaFill##bit(dmaNum, value, _dest, (block)); \
DmaFill##bit(dmaNum, value, _dest, (block)); \
_dest += (block); \
_size -= (block); \
if (_size <= (block)) \
{ \
DmaFill##bit(dmaNum, value, _dest, _size); \
DmaFill##bit(dmaNum, value, _dest, _size); \
break; \
} \
} \
@@ -162,7 +162,7 @@
#define DmaFillDefvars(dmaNum, value, dest, size, bit) \
{ \
void *_dest = (void *)dest; \
void *_dest = (void *)dest; \
u32 _size = size; \
DmaFill##bit(dmaNum, value, _dest, _size); \
}
+5 -1
View File
@@ -2915,7 +2915,6 @@ extern const u8 gBerryFixWindow_Tilemap[];
extern const u8 gBerryFixWindow_Pal[];
// item_pc
extern const u8 gItemPcTiles[];
extern const u32 gItemPcBgPals[];
extern const u8 gItemPcTilemap[];
@@ -3736,6 +3735,11 @@ extern const u32 gSubstituteDollGfx[];
extern const u32 gSubstituteDollTilemap[];
extern const u32 gSubstituteDollPal[];
// ice
extern const u8 gWeatherFog1Tiles[];
extern const u32 gBattleAnimFogTilemap[];
extern const u16 gUnknown_83C2CE0[];
// credits
extern const u32 gCreditsPokeballBgGfxTiles[];
extern const u32 gCreditsPokeballBgGfxMap[];
+1
View File
@@ -89,5 +89,6 @@ void CB2_PartyMenuFromStartMenu(void);
void sub_8128198(void);
void sub_8127FF4(u8 slot, u8 slot2);
void LoadHeldItemIcons(void);
void sub_8127968(void);
#endif // GUARD_PARTY_MENU_H
+9
View File
@@ -0,0 +1,9 @@
#ifndef GUARD_QUEST_LOG_815A008_H
#define GUARD_QUEST_LOG_815A008_H
#include "global.h"
void sub_815A008(struct QuestLog *);
void sub_815A1F8(struct QuestLog *, struct MapObjectTemplate *);
#endif //GUARD_QUEST_LOG_815A008_H
+22
View File
@@ -243,6 +243,28 @@ extern const u8 gUnknown_83FDDEB[];
extern const u8 gUnknown_83FDCD2[];
extern const u8 gUnknown_83FE6FA[];
// battle_controller_pokedude
extern const u8 gUnknown_81C5F69[];
extern const u8 gUnknown_81C5FA7[];
extern const u8 gUnknown_81C5FDC[];
extern const u8 gUnknown_81C601C[];
extern const u8 gUnknown_81C60FA[];
extern const u8 gUnknown_81C615A[];
extern const u8 gUnknown_81C6196[];
extern const u8 gUnknown_81C61EA[];
extern const u8 gUnknown_81C6202[];
extern const u8 gUnknown_81C6301[];
extern const u8 gUnknown_81C63A9[];
extern const u8 gUnknown_81C63F9[];
extern const u8 gUnknown_81C6446[];
extern const u8 gUnknown_81C657A[];
extern const u8 gUnknown_81C6637[];
extern const u8 gUnknown_81C6645[];
extern const u8 gUnknown_81C66CF[];
extern const u8 gUnknown_81C6787[];
extern const u8 gUnknown_81C684B[];
extern const u8 gUnknown_81C686C[];
// credits
extern const u8 gString_Dummy[];
extern const u8 gString_PokemonFireRed_Staff[]; // FR
-10
View File
@@ -1,10 +0,0 @@
#ifndef GUARD_UNK_8159F40_H
#define GUARD_UNK_8159F40_H
#include "global.h"
void InitPokedudePartyAndOpponent(void);
void sub_815A008(struct QuestLog *);
void sub_815A1F8(struct QuestLog *, struct MapObjectTemplate *);
#endif //GUARD_UNK_8159F40_H
+13 -8
View File
@@ -157,11 +157,11 @@ SECTIONS {
asm/battle_anim_effects_1.o(.text);
asm/battle_anim_effects_2.o(.text);
asm/water.o(.text);
asm/fire.o(.text);
asm/electric.o(.text);
asm/ice.o(.text);
asm/fighting.o(.text);
asm/poison.o(.text);
src/fire.o(.text);
src/electric.o(.text);
src/ice.o(.text);
src/fighting.o(.text);
src/poison.o(.text);
src/flying.o(.text);
src/psychic.o(.text);
src/bug.o(.text);
@@ -276,8 +276,8 @@ SECTIONS {
src/text_window.o(.text);
src/quest_log_8150454.o(.text);
asm/dodrio_berry_picking.o(.text);
asm/battle_controller_pokedude.o(.text);
src/unk_8159F40.o(.text);
src/battle_controller_pokedude.o(.text);
src/quest_log_815A008.o(.text);
src/dodrio_berry_picking_2.o(.text);
asm/dodrio_berry_picking_2.o(.text);
src/teachy_tv.o(.text);
@@ -448,6 +448,11 @@ SECTIONS {
src/pokemon_size_record.o(.rodata);
src/item_use.o(.rodata);
data/battle_anim_effects_misc.o(.rodata);
src/fire.o(.rodata);
src/electric.o(.rodata);
src/ice.o(.rodata);
src/fighting.o(.rodata);
src/poison.o(.rodata);
src/flying.o(.rodata);
src/psychic.o(.rodata);
src/bug.o(.rodata);
@@ -547,7 +552,7 @@ SECTIONS {
src/text_window_graphics.o(.rodata);
src/quest_log_8150454.o(.rodata);
data/data_8471F00.o(.rodata);
src/unk_8159F40.o(.rodata);
src/battle_controller_pokedude.o(.rodata);
src/teachy_tv.o(.rodata);
src/unk_815C980.o(.rodata);
data/data_8471F00.o(.rodata.8479668);
+1 -1
View File
@@ -888,7 +888,7 @@ void sub_8099BD4(u8 taskId)
gTasks[taskId].data[12] = 0;
gTasks[taskId].data[10] = gBattleAnimArgs[3];
gTasks[taskId].data[11] = gBattleAnimArgs[4];
gTasks[taskId].data[7] = GetAnimBattlerSpriteId(1);
gTasks[taskId].data[7] = GetAnimBattlerSpriteId(ANIM_TARGET);
gTasks[taskId].data[8] = gSprites[gTasks[taskId].data[7]].pos2.x;
gTasks[taskId].data[9] = gSprites[gTasks[taskId].data[7]].pos2.y;
gTasks[taskId].data[0] = 0;
+7 -7
View File
@@ -1393,7 +1393,7 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
void AnimThrowProjectile(struct Sprite *sprite)
{
InitSpritePosToAnimAttacker(sprite, 1);
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
@@ -1409,7 +1409,7 @@ static void AnimThrowProjectile_Step(struct Sprite *sprite)
DestroyAnimSprite(sprite);
}
void sub_8075F0C(struct Sprite *sprite)
void AnimSnoreZ(struct Sprite *sprite)
{
bool8 r4;
u8 battlerId, coordType;
@@ -1434,7 +1434,7 @@ void sub_8075F0C(struct Sprite *sprite)
InitSpritePosToAnimTarget(sprite, r4);
battlerId = gBattleAnimTarget;
}
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
InitSpritePosToAnimTarget(sprite, r4);
sprite->data[0] = gBattleAnimArgs[4];
@@ -2070,7 +2070,7 @@ u8 sub_8076E34(s32 battlerId, u8 spriteId, s32 species)
void sub_8076ED8(struct Sprite *sprite)
{
SetSpriteCoordsToAnimAttackerCoords(sprite);
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
{
sprite->pos1.x -= gBattleAnimArgs[0];
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
@@ -2113,7 +2113,7 @@ void sub_8076F58(struct Sprite *sprite)
void sub_8076FD0(struct Sprite *sprite)
{
SetSpriteCoordsToAnimAttackerCoords(sprite);
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
sprite->pos1.x -= gBattleAnimArgs[0];
else
sprite->pos1.x += gBattleAnimArgs[0];
@@ -2210,7 +2210,7 @@ void sub_807729C(struct Sprite *sprite)
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
if (!GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
sprite->data[0] = 5;
else
sprite->data[0] = -10;
@@ -2237,7 +2237,7 @@ void sub_8077350(struct Sprite *sprite)
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[4];
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[5];
if (!GetBattlerSide(gBattleAnimTarget))
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
{
x = (u16)gBattleAnimArgs[4] + 30;
sprite->pos1.x += x;
+2 -2
View File
@@ -309,7 +309,7 @@ void sub_80BACEC(u8 taskId)
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES);
else
species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES);
spriteId = GetAnimBattlerSpriteId(0);
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
newSpriteId = sub_8076E34(gBattleAnimAttacker, spriteId, species);
sub_80752A0(&animBgData);
AnimLoadCompressedBgTilemap(animBgData.bgId, gFile_graphics_battle_anims_masks_curse_tilemap);
@@ -354,7 +354,7 @@ static void sub_80BAF38(u8 taskId)
SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) ^ DISPCNT_OBJWIN_ON);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
sprite = &gSprites[GetAnimBattlerSpriteId(0)]; // unused
sprite = &gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)]; // unused
sprite = &gSprites[gTasks[taskId].data[0]];
DestroySprite(sprite);
sub_80752A0(&animBgData);
+3 -3
View File
@@ -181,7 +181,7 @@ static void OakOldManBufferRunCommand(void)
{
if (gBattleControllerExecFlags & gBitTable[gActiveBattler])
{
if (gBattleBufferA[gActiveBattler][0] < ARRAY_COUNT(sOakOldManBufferCommands))
if (gBattleBufferA[gActiveBattler][0] < NELEMS(sOakOldManBufferCommands))
sOakOldManBufferCommands[gBattleBufferA[gActiveBattler][0]]();
else
OakOldManBufferExecCompleted();
@@ -463,7 +463,7 @@ static void sub_80E7CD8(void)
static void Task_GiveExpToMon(u8 taskId)
{
u32 monId = (u8)(gTasks[taskId].tExpTask_monId);
u32 monId = (u8)gTasks[taskId].tExpTask_monId;
u8 battlerId = gTasks[taskId].tExpTask_battler;
s16 gainedExp = gTasks[taskId].tExpTask_gainedExp;
@@ -487,7 +487,7 @@ static void Task_GiveExpToMon(u8 taskId)
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
gActiveBattler = savedActiveBattler;
if (IsDoubleBattle() == TRUE
&& ((u16)(monId) == gBattlerPartyIndexes[battlerId] || (u16)(monId) == gBattlerPartyIndexes[battlerId ^ BIT_FLANK]))
&& ((u16)monId == gBattlerPartyIndexes[battlerId] || (u16)monId == gBattlerPartyIndexes[battlerId ^ BIT_FLANK]))
gTasks[taskId].func = Task_LaunchLvlUpAnim;
else
gTasks[taskId].func = DestroyExpTaskAndCompleteOnInactiveTextPrinter;
+1 -1
View File
@@ -1497,7 +1497,7 @@ static void OpponentHandleStatusIconUpdate(void)
UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], HEALTHBOX_STATUS_ICON);
battlerId = gActiveBattler;
gBattleSpritesDataPtr->healthBoxesData[battlerId].statusAnimActive = 0;
gBattleSpritesDataPtr->healthBoxesData[battlerId].statusAnimActive = FALSE;
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedStatusAnimation;
}
}
+1 -2
View File
@@ -1003,7 +1003,6 @@ static void CompleteOnHealthbarDone(void)
s16 hpValue = MoveBattleBar(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], HEALTH_BAR, 0);
SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]);
if (hpValue != -1)
{
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
@@ -2544,7 +2543,7 @@ static void PlayerHandleStatusIconUpdate(void)
UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], HEALTHBOX_STATUS_ICON);
battlerId = gActiveBattler;
gBattleSpritesDataPtr->healthBoxesData[battlerId].statusAnimActive = 0;
gBattleSpritesDataPtr->healthBoxesData[battlerId].statusAnimActive = FALSE;
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedStatusAnimation;
}
}
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -85,9 +85,9 @@ static void InitSinglePlayerBtlControllers(void)
gBattleMainFunc = BeginBattleIntro;
if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)
{
gBattlerControllerFuncs[0] = SetControllerToPokeDude;
gBattlerControllerFuncs[0] = SetControllerToPokedude;
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
gBattlerControllerFuncs[1] = SetControllerToPokeDude;
gBattlerControllerFuncs[1] = SetControllerToPokedude;
gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT;
gBattlersCount = 2;
}
@@ -110,13 +110,13 @@ static void InitSinglePlayerBtlControllers(void)
gBattleMainFunc = BeginBattleIntro;
if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)
{
gBattlerControllerFuncs[0] = SetControllerToPokeDude;
gBattlerControllerFuncs[0] = SetControllerToPokedude;
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
gBattlerControllerFuncs[1] = SetControllerToPokeDude;
gBattlerControllerFuncs[1] = SetControllerToPokedude;
gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT;
gBattlerControllerFuncs[2] = SetControllerToPokeDude;
gBattlerControllerFuncs[2] = SetControllerToPokedude;
gBattlerPositions[2] = B_POSITION_PLAYER_RIGHT;
gBattlerControllerFuncs[3] = SetControllerToPokeDude;
gBattlerControllerFuncs[3] = SetControllerToPokedude;
gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT;
gBattlersCount = MAX_BATTLERS_COUNT;
}
+1 -1
View File
@@ -7064,7 +7064,7 @@ static void atk8F_forcerandomswitch(void)
u8 valid;
u8 val;
if (!GetBattlerSide(gBattlerTarget))
if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER)
party = gPlayerParty;
else
party = gEnemyParty;
+1 -1
View File
@@ -13,7 +13,6 @@
#include "strings.h"
#include "string_util.h"
#include "event_data.h"
#include "unk_8159F40.h"
#include "map_obj_80688E4.h"
#include "metatile_behavior.h"
#include "event_scripts.h"
@@ -28,6 +27,7 @@
#include "battle.h"
#include "battle_setup.h"
#include "battle_transition.h"
#include "battle_controllers.h"
#include "constants/battle_setup.h"
#include "constants/flags.h"
#include "constants/items.h"
+7 -7
View File
@@ -172,7 +172,7 @@ static const union AffineAnimCmd gUnknown_83E733C[] =
AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 18),
AFFINEANIMCMD_LOOP(0),
AFFINEANIMCMD_FRAME(0xFFFB, 0xFFFB, 0, 8),
AFFINEANIMCMD_FRAME(-0x5, -0x5, 0, 8),
AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 8),
AFFINEANIMCMD_LOOP(5),
AFFINEANIMCMD_END,
@@ -202,7 +202,7 @@ static void sub_80B3FAC(struct Sprite *sprite)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
}
else if (!GetBattlerSide(gBattleAnimTarget))
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
{
StartSpriteAffineAnim(sprite, 1);
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
@@ -226,7 +226,7 @@ static void sub_80B407C(struct Sprite *sprite)
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
StartSpriteAffineAnim(sprite, 2);
}
else if (!GetBattlerSide(gBattleAnimTarget))
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
@@ -283,12 +283,12 @@ static void sub_80B41C0(struct Sprite *sprite)
static void sub_80B41F8(struct Sprite *sprite)
{
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
sprite->pos1.x -= gBattleAnimArgs[0];
else
sprite->pos1.x += gBattleAnimArgs[0];
sprite->pos1.y += gBattleAnimArgs[1];
if (!GetBattlerSide(gBattleAnimTarget))
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
sprite->pos1.y += 8;
sprite->callback = sub_80B4274;
}
@@ -356,7 +356,7 @@ static void AnimTranslateStinger(struct Sprite *sprite)
{
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
}
else if (GetBattlerSide(gBattleAnimAttacker))
else if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
{
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
@@ -399,7 +399,7 @@ static void AnimTranslateStinger(struct Sprite *sprite)
static void AnimMissileArc(struct Sprite *sprite)
{
InitSpritePosToAnimAttacker(sprite, 1);
if (GetBattlerSide(gBattleAnimAttacker))
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
+1272
View File
File diff suppressed because it is too large Load Diff
+971
View File
@@ -0,0 +1,971 @@
#include "global.h"
#include "battle_anim.h"
#include "gpu_regs.h"
#include "random.h"
#include "task.h"
#include "trig.h"
static void unc_080B08A0(struct Sprite *sprite);
static void sub_80B08DC(struct Sprite *sprite);
static void sub_80B0928(struct Sprite *sprite);
static void AnimBasicFistOrFoot(struct Sprite *sprite);
static void sub_80B09A4(struct Sprite *sprite);
static void sub_80B0B80(struct Sprite *sprite);
static void sub_80B0C28(struct Sprite *sprite);
static void AnimSpinningKickOrPunch(struct Sprite *sprite);
static void AnimStompFoot(struct Sprite *sprite);
static void sub_80B0DF0(struct Sprite *sprite);
static void sub_80B0E80(struct Sprite *sprite);
static void sub_80B0F68(struct Sprite *sprite);
static void sub_80B107C(struct Sprite *sprite);
static void sub_80B1188(struct Sprite *sprite);
static void sub_80B12E8(struct Sprite *sprite);
static void sub_80B13F8(struct Sprite *sprite);
static void sub_80B1484(struct Sprite *sprite);
static void sub_80B14F0(struct Sprite *sprite);
static void sub_80B0B2C(struct Sprite *sprite);
static void sub_80B0BD8(struct Sprite *sprite);
static void sub_80B0CB4(struct Sprite *sprite);
static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite);
static void AnimStompFootStep(struct Sprite *sprite);
static void AnimStompFootEnd(struct Sprite *sprite);
static void sub_80B0EF0(struct Sprite *sprite);
static void sub_80B1050(struct Sprite *sprite);
static void sub_80B111C(struct Sprite *sprite);
static void sub_80B11E4(struct Sprite *sprite);
static void sub_80B12A4(struct Sprite *sprite);
const struct SpriteTemplate gUnknown_83E668C =
{
.tileTag = ANIM_TAG_HUMANOID_FOOT,
.paletteTag = ANIM_TAG_HUMANOID_FOOT,
.oam = &gOamData_83AC9D8,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = unc_080B08A0,
};
static const union AnimCmd gUnknown_83E66A4[] =
{
ANIMCMD_FRAME(0, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E66AC[] =
{
ANIMCMD_FRAME(16, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E66B4[] =
{
ANIMCMD_FRAME(32, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E66BC[] =
{
ANIMCMD_FRAME(48, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E66C4[] =
{
ANIMCMD_FRAME(48, 1, .hFlip = TRUE),
ANIMCMD_END,
};
static const union AnimCmd *const gUnknown_83E66CC[] =
{
gUnknown_83E66A4,
};
static const union AnimCmd *const gUnknown_83E66D0[] =
{
gUnknown_83E66AC,
gUnknown_83E66B4,
};
static const union AnimCmd *const gUnknown_83E66D8[] =
{
gUnknown_83E66BC,
gUnknown_83E66C4,
};
const struct SpriteTemplate gUnknown_83E66E0 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B08DC,
};
const struct SpriteTemplate gUnknown_83E66F8 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0928,
};
const struct SpriteTemplate gFistFootSpriteTemplate =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimBasicFistOrFoot,
};
const struct SpriteTemplate gUnknown_83E6728 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B09A4,
};
const struct SpriteTemplate gUnknown_83E6740 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66D8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0B80,
};
const struct SpriteTemplate gUnknown_83E6758 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66D0,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0C28,
};
static const union AffineAnimCmd gUnknown_83E6770[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 20, 1),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd *const gUnknown_83E6788[] =
{
gUnknown_83E6770,
};
const struct SpriteTemplate gUnknown_83E678C =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83ACA98,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gUnknown_83E6788,
.callback = AnimSpinningKickOrPunch,
};
static const union AffineAnimCmd gUnknown_83E67A4[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(-0x4, -0x4, 20, 1),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd *const gUnknown_83E67BC[] =
{
gUnknown_83E67A4,
};
const struct SpriteTemplate gMegaPunchKickSpriteTemplate =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83ACA98,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gUnknown_83E67BC,
.callback = AnimSpinningKickOrPunch,
};
const struct SpriteTemplate gUnknown_83E67D8 =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66D0,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimStompFoot,
};
const struct SpriteTemplate gUnknown_83E67F0 =
{
.tileTag = ANIM_TAG_DUCK,
.paletteTag = ANIM_TAG_DUCK,
.oam = &gOamData_83AC9D0,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0DF0,
};
const struct SpriteTemplate gUnknown_83E6808 =
{
.tileTag = ANIM_TAG_BLUE_LIGHT_WALL,
.paletteTag = ANIM_TAG_BLUE_LIGHT_WALL,
.oam = &gOamData_83ACB00,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0E80,
};
const struct SpriteTemplate gUnknown_83E6820 =
{
.tileTag = ANIM_TAG_TORN_METAL,
.paletteTag = ANIM_TAG_TORN_METAL,
.oam = &gOamData_83AC9D8,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B0F68,
};
static const union AffineAnimCmd gUnknown_83E6838[] =
{
AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0),
AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 64),
AFFINEANIMCMD_FRAME(-0x6, -0x6, 0, 8),
AFFINEANIMCMD_FRAME(0x6, 0x6, 0, 8),
AFFINEANIMCMD_JUMP(2),
};
static const union AffineAnimCmd *const gUnknown_83E6860[] =
{
gUnknown_83E6838,
};
const struct SpriteTemplate gUnknown_83E6864 =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.oam = &gOamData_83ACBC0,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_83E6860,
.callback = sub_80B107C,
};
const struct SpriteTemplate gUnknown_83E687C =
{
.tileTag = ANIM_TAG_FLAT_ROCK,
.paletteTag = ANIM_TAG_FLAT_ROCK,
.oam = &gOamData_83AC9D0,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B1188,
};
const struct SpriteTemplate gUnknown_83E6894 =
{
.tileTag = ANIM_TAG_METEOR,
.paletteTag = ANIM_TAG_METEOR,
.oam = &gOamData_83AC9E0,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B12E8,
};
const struct SpriteTemplate gUnknown_83E68AC =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B13F8,
};
static const union AnimCmd gUnknown_83E68C4[] =
{
ANIMCMD_FRAME(0, 4),
ANIMCMD_FRAME(16, 4),
ANIMCMD_FRAME(32, 4),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E68D4[] =
{
ANIMCMD_FRAME(0, 4, .vFlip = TRUE),
ANIMCMD_FRAME(16, 4, .vFlip = TRUE),
ANIMCMD_FRAME(32, 4, .vFlip = TRUE),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E68E4[] =
{
ANIMCMD_FRAME(0, 4, .hFlip = TRUE),
ANIMCMD_FRAME(16, 4, .hFlip = TRUE),
ANIMCMD_FRAME(32, 4, .hFlip = TRUE),
ANIMCMD_END,
};
static const union AnimCmd *const gUnknown_83E68F4[] =
{
gUnknown_83E68C4,
gUnknown_83E68D4,
gUnknown_83E68E4,
};
const struct SpriteTemplate gUnknown_83E6900 =
{
.tileTag = ANIM_TAG_PURPLE_SCRATCH,
.paletteTag = ANIM_TAG_PURPLE_SCRATCH,
.oam = &gOamData_83AC9D8,
.anims = gUnknown_83E68F4,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B1484,
};
static const union AnimCmd gUnknown_83E6918[] =
{
ANIMCMD_FRAME(0, 6),
ANIMCMD_FRAME(64, 6),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E6924[] =
{
ANIMCMD_FRAME(0, 6, .vFlip = TRUE, .hFlip = TRUE),
ANIMCMD_FRAME(64, 6, .vFlip = TRUE, .hFlip = TRUE),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E6930[] =
{
ANIMCMD_FRAME(0, 6, .hFlip = TRUE),
ANIMCMD_FRAME(64, 6, .hFlip = TRUE),
ANIMCMD_END,
};
static const union AnimCmd *const gUnknown_83E693C[] =
{
gUnknown_83E6918,
gUnknown_83E6924,
gUnknown_83E6930,
};
const struct SpriteTemplate gUnknown_83E6948 =
{
.tileTag = ANIM_TAG_PURPLE_SWIPE,
.paletteTag = ANIM_TAG_PURPLE_SWIPE,
.oam = &gOamData_83AC9E0,
.anims = gUnknown_83E693C,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80B1484,
};
static const union AffineAnimCmd gUnknown_83E6960[] =
{
AFFINEANIMCMD_FRAME(0x200, 0x200, 0, 0),
AFFINEANIMCMD_FRAME(-0x20, -0x20, 0, 8),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd *const gUnknown_83E6978[] =
{
gUnknown_83E6960,
};
const struct SpriteTemplate gUnknown_83E697C =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_83ACA98,
.anims = gUnknown_83E66CC,
.images = NULL,
.affineAnims = gUnknown_83E6978,
.callback = sub_80B14F0,
};
static void unc_080B08A0(struct Sprite *sprite)
{
SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]);
sprite->pos1.y += gBattleAnimArgs[1];
sprite->data[0] = 15;
sprite->callback = WaitAnimForDuration;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
static void sub_80B08DC(struct Sprite *sprite)
{
if (gBattleAnimArgs[7] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
}
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
gBattleAnimArgs[6] = 0;
AnimSnoreZ(sprite);
}
static void sub_80B0928(struct Sprite *sprite)
{
if (IsContest())
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
}
sub_80B08DC(sprite);
}
// Displays a basic fist or foot sprite for a given duration.
// Used by many fighting moves (and elemental "punch" moves).
// arg 0: initial x pixel offset
// arg 1: initial y pixel offset
// arg 2: duration
// arg 3: ? (todo: related to initial pixel offsets)
// arg 4: anim num
static void AnimBasicFistOrFoot(struct Sprite *sprite)
{
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
if (gBattleAnimArgs[3] == 0)
InitSpritePosToAnimAttacker(sprite, 1);
else
InitSpritePosToAnimTarget(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[2];
sprite->callback = WaitAnimForDuration;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
static void sub_80B09A4(struct Sprite *sprite)
{
u8 battler;
s16 xMod, yMod;
s16 x, y;
if (gBattleAnimArgs[0] == 0)
battler = gBattleAnimAttacker;
else
battler = gBattleAnimTarget;
if (gBattleAnimArgs[2] < 0)
gBattleAnimArgs[2] = Random() % 5;
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
sprite->pos1.x = GetBattlerSpriteCoord(battler, 2);
sprite->pos1.y = GetBattlerSpriteCoord(battler, 3);
xMod = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_WIDTH) / 2;
yMod = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_HEIGHT) / 4;
x = Random() % xMod;
y = Random() % yMod;
if (Random() & 1)
x *= -1;
if (Random() & 1)
y *= -1;
if ((gBattlerPositions[battler] & BIT_SIDE) == B_SIDE_PLAYER)
y += 0xFFF0;
sprite->pos1.x += x;
sprite->pos1.y += y;
sprite->data[0] = gBattleAnimArgs[1];
sprite->data[7] = CreateSprite(&gBasicHitSplatSpriteTemplate, sprite->pos1.x, sprite->pos1.y, sprite->subpriority + 1);
if (sprite->data[7] != 64)
{
StartSpriteAffineAnim(&gSprites[sprite->data[7]], 0);
gSprites[sprite->data[7]].callback = SpriteCallbackDummy;
}
sprite->callback = sub_80B0B2C;
}
static void sub_80B0B2C(struct Sprite *sprite)
{
if (sprite->data[0] == 0)
{
if (sprite->data[7] != 64)
{
FreeOamMatrix(gSprites[sprite->data[7]].oam.matrixNum);
DestroySprite(&gSprites[sprite->data[7]]);
}
DestroyAnimSprite(sprite);
}
else
{
--sprite->data[0];
}
}
static void sub_80B0B80(struct Sprite *sprite)
{
InitSpritePosToAnimTarget(sprite, TRUE);
sprite->data[0] = 30;
if (gBattleAnimArgs[2] == 0)
{
sprite->data[2] = sprite->pos1.x - 20;
}
else
{
sprite->data[2] = sprite->pos1.x + 20;
sprite->hFlip = 1;
}
sprite->data[4] = sprite->pos1.y - 20;
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, sub_80B0BD8);
}
static void sub_80B0BD8(struct Sprite *sprite)
{
if (++sprite->data[5] == 11)
{
sprite->data[2] = sprite->pos1.x - sprite->pos2.x;
sprite->data[4] = sprite->pos1.y - sprite->pos2.y;
sprite->data[0] = 8;
sprite->pos1.x += sprite->pos2.x;
sprite->pos1.y += sprite->pos2.y;
sprite->pos2.y = 0;
sprite->pos2.x = 0;
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
}
static void sub_80B0C28(struct Sprite *sprite)
{
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT)
gBattleAnimArgs[0] *= -1;
InitSpritePosToAnimTarget(sprite, TRUE);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[3];
sprite->data[1] = sprite->pos1.x;
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = sprite->pos1.y;
InitAnimLinearTranslation(sprite);
sprite->data[5] = gBattleAnimArgs[5];
sprite->data[6] = gBattleAnimArgs[4];
sprite->data[7] = 0;
sprite->callback = sub_80B0CB4;
}
static void sub_80B0CB4(struct Sprite *sprite)
{
if (!AnimTranslateLinear(sprite))
{
sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]);
sprite->data[7] += sprite->data[6];
}
else
{
DestroyAnimSprite(sprite);
}
}
// Animates the spinning, shrinking kick or punch, which then
// reappears at full size. Used by moves such as MOVE_MEGA_PUNCH and MOVE_MEGA_KICK.
// arg 0: initial x pixel offset
// arg 1: initial y pixel offset
// arg 2: anim num
// arg 3: spin duration
static void AnimSpinningKickOrPunch(struct Sprite *sprite)
{
InitSpritePosToAnimTarget(sprite, TRUE);
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
sprite->data[0] = gBattleAnimArgs[3];
sprite->callback = WaitAnimForDuration;
StoreSpriteCallbackInData6(sprite, AnimSpinningKickOrPunchFinish);
}
static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite)
{
StartSpriteAffineAnim(sprite, 0);
sprite->affineAnimPaused = 1;
sprite->data[0] = 20;
sprite->callback = WaitAnimForDuration;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
// Animates MOVE_STOMP's foot that slides downward.
// arg 0: initial x pixel offset
// arg 1: initial y pixel offset
// arg 2: initial wait duration
static void AnimStompFoot(struct Sprite *sprite)
{
InitSpritePosToAnimTarget(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[2];
sprite->callback = AnimStompFootStep;
}
static void AnimStompFootStep(struct Sprite *sprite)
{
if (--sprite->data[0] == -1)
{
sprite->data[0] = 6;
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, AnimStompFootEnd);
}
}
static void AnimStompFootEnd(struct Sprite *sprite)
{
sprite->data[0] = 15;
sprite->callback = WaitAnimForDuration;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
static void sub_80B0DF0(struct Sprite *sprite)
{
if (sprite->data[0] == 0)
{
InitSpritePosToAnimTarget(sprite, TRUE);
sprite->data[1] = gBattleAnimArgs[2];
sprite->data[2] = gBattleAnimArgs[3];
++sprite->data[0];
}
else
{
sprite->data[4] += sprite->data[1];
sprite->pos2.x = sprite->data[4] >> 8;
sprite->pos2.y = Sin(sprite->data[3], sprite->data[2]);
sprite->data[3] = (sprite->data[3] + 3) & 0xFF;
if (sprite->data[3] > 100)
sprite->invisible = sprite->data[3] % 2;
if (sprite->data[3] > 120)
DestroyAnimSprite(sprite);
}
}
static void sub_80B0E80(struct Sprite *sprite)
{
if (gBattleAnimArgs[0] == 0)
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1);
}
else
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1);
}
sprite->pos1.x += gBattleAnimArgs[1];
sprite->pos1.y += gBattleAnimArgs[2];
sprite->data[0] = 0;
sprite->data[1] = gBattleAnimArgs[3];
sprite->data[2] = gBattleAnimArgs[4];
sprite->data[3] = 0;
sprite->callback = sub_80B0EF0;
}
static void sub_80B0EF0(struct Sprite *sprite)
{
switch (sprite->data[0])
{
case 0:
if (--sprite->data[1] == 0)
{
if (sprite->data[2] == 0)
DestroyAnimSprite(sprite);
else
++sprite->data[0];
}
break;
case 1:
if (++sprite->data[1] > 1)
{
sprite->data[1] = 0;
++sprite->data[3];
if (sprite->data[3] & 1)
sprite->pos2.x = 2;
else
sprite->pos2.x = -2;
}
if (--sprite->data[2] == 0)
DestroyAnimSprite(sprite);
break;
}
}
static void sub_80B0F68(struct Sprite *sprite)
{
if (gBattleAnimArgs[0] == 0)
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2];
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3];
}
else
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[2];
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[3];
}
sprite->oam.tileNum += gBattleAnimArgs[1] * 16;
sprite->data[0] = 0;
switch (gBattleAnimArgs[1])
{
case 0:
sprite->data[6] = -3;
sprite->data[7] = -3;
break;
case 1:
sprite->data[6] = 3;
sprite->data[7] = -3;
break;
case 2:
sprite->data[6] = -3;
sprite->data[7] = 3;
break;
case 3:
sprite->data[6] = 3;
sprite->data[7] = 3;
break;
default:
DestroyAnimSprite(sprite);
return;
}
sprite->callback = sub_80B1050;
}
static void sub_80B1050(struct Sprite *sprite)
{
sprite->pos1.x += sprite->data[6];
sprite->pos1.y += sprite->data[7];
if (++sprite->data[0] > 40)
DestroyAnimSprite(sprite);
}
static void sub_80B107C(struct Sprite *sprite)
{
if (gBattleAnimArgs[0] == 0)
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker);
sprite->data[7] = gBattleAnimTarget;
}
else
{
sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimTarget);
sprite->data[7] = gBattleAnimAttacker;
}
sprite->data[0] = 0;
sprite->data[1] = 12;
sprite->data[2] = 8;
sprite->callback = sub_80B111C;
}
static void sub_80B111C(struct Sprite *sprite)
{
if (++sprite->data[0] == 180)
{
SetGpuReg(REG_OFFSET_BLDCNT, 0);
sprite->data[0] = 16;
sprite->data[1] = sprite->pos1.x;
sprite->data[2] = GetBattlerSpriteCoord(sprite->data[7], 2);
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = GetBattlerSpriteCoord(sprite->data[7], 3);
InitAnimLinearTranslation(sprite);
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
sprite->callback = sub_807563C;
}
}
static void sub_80B1188(struct Sprite *sprite)
{
sprite->pos1.x = gBattleAnimArgs[0];
sprite->pos1.y = 120;
sprite->data[0] = gBattleAnimArgs[3];
StorePointerInVars(&sprite->data[4], &sprite->data[5], (void *)(sprite->pos1.y << 8));
sprite->data[6] = gBattleAnimArgs[1];
sprite->oam.tileNum += gBattleAnimArgs[2] * 4;
sprite->callback = sub_80B11E4;
}
static void sub_80B11E4(struct Sprite *sprite)
{
void *var0;
if (sprite->data[0] != 0)
{
var0 = LoadPointerFromVars(sprite->data[4], sprite->data[5]);
var0 -= sprite->data[6];
StorePointerInVars(&sprite->data[4], &sprite->data[5], var0);
var0 = (void *)(((intptr_t)var0) >> 8);
sprite->pos1.y = (intptr_t)var0;
if (sprite->pos1.y < -8)
DestroyAnimSprite(sprite);
else
--sprite->data[0];
}
else
{
s16 pos0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
s16 pos1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
s16 pos2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
s16 pos3 = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
sprite->data[0] = pos2 - pos0;
sprite->data[1] = pos3 - pos1;
sprite->data[2] = sprite->pos1.x << 4;
sprite->data[3] = sprite->pos1.y << 4;
sprite->callback = sub_80B12A4;
}
}
static void sub_80B12A4(struct Sprite *sprite)
{
u16 edgeX;
sprite->data[2] += sprite->data[0];
sprite->data[3] += sprite->data[1];
sprite->pos1.x = sprite->data[2] >> 4;
sprite->pos1.y = sprite->data[3] >> 4;
edgeX = sprite->pos1.x + 8;
if (edgeX > 256 || sprite->pos1.y < -8 || sprite->pos1.y > 120)
DestroyAnimSprite(sprite);
}
static void sub_80B12E8(struct Sprite *sprite)
{
u8 battler;
if (gBattleAnimArgs[0] == 0)
{
sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3);
battler = gBattleAnimTarget;
sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker);
}
else
{
battler = gBattleAnimAttacker;
sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimTarget);
}
if (IsContest())
sprite->oam.matrixNum |= ST_OAM_HFLIP;
else if (GetBattlerSide(battler) == B_SIDE_PLAYER)
sprite->oam.matrixNum |= (ST_OAM_HFLIP | ST_OAM_VFLIP);
sprite->data[0] = 16;
sprite->data[1] = sprite->pos1.x;
sprite->data[2] = GetBattlerSpriteCoord(battler, 2);
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = GetBattlerSpriteCoord(battler, 3);
InitAnimLinearTranslation(sprite);
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
sprite->callback = sub_807563C;
}
static void sub_80B13D4(struct Sprite *sprite)
{
if (sprite->data[0] == sprite->data[4])
DestroyAnimSprite(sprite);
++sprite->data[0];
}
static void sub_80B13F8(struct Sprite *sprite)
{
u8 turn;
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
sprite->data[1] = gBattleAnimArgs[3];
sprite->data[2] = gBattleAnimArgs[0];
sprite->data[3] = gBattleAnimArgs[1];
sprite->data[4] = gBattleAnimArgs[2];
turn = gAnimMoveTurn;
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
++turn;
if (turn & 1)
{
sprite->data[2] = -sprite->data[2];
++sprite->data[1];
}
StartSpriteAnim(sprite, sprite->data[1]);
sprite->pos2.x = sprite->data[2];
sprite->pos2.y = sprite->data[3];
sprite->callback = sub_80B13D4;
}
static void sub_80B1484(struct Sprite *sprite)
{
if (gBattleAnimArgs[2] == 0)
InitSpritePosToAnimAttacker(sprite, 0);
else
InitSpritePosToAnimTarget(sprite, FALSE);
if (IsContest())
StartSpriteAnim(sprite, 2);
else if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
StartSpriteAnim(sprite, 1);
sprite->callback = RunStoredCallbackWhenAnimEnds;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
static void sub_80B14F0(struct Sprite *sprite)
{
if (sprite->affineAnimEnded)
{
sprite->data[1] = (sprite->data[1] + 40) & 0xFF;
sprite->pos2.x = Sin(sprite->data[1], 2);
if (++sprite->data[0] > 40)
DestroyAnimSprite(sprite);
}
}
void sub_80B1530(u8 taskId)
{
struct Task *task = &gTasks[taskId];
switch (task->data[0])
{
case 0:
sub_8075458(0);
task->data[8] = gBattleAnimArgs[0];
++task->data[0];
break;
case 1:
if (--task->data[8] == -1)
++task->data[0];
break;
case 2:
default:
task->data[9] += 1280;
break;
}
task->data[10] += 2816;
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
gBattle_BG3_X += task->data[9] >> 8;
else
gBattle_BG3_X -= task->data[9] >> 8;
gBattle_BG3_Y += task->data[10] >> 8;
task->data[9] &= 0xFF;
task->data[10] &= 0xFF;
if (gBattleAnimArgs[7] == -1)
{
gBattle_BG3_X = 0;
gBattle_BG3_Y = 0;
sub_8075458(1);
DestroyAnimVisualTask(taskId);
}
}
+1193
View File
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -98,8 +98,8 @@ static const union AffineAnimCmd gUnknown_83E6B64[] =
{
AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6),
AFFINEANIMCMD_FRAME(0x0, 0xFFE0, 0, 5),
AFFINEANIMCMD_FRAME(0xFFF0, 0x20, 0, 10),
AFFINEANIMCMD_FRAME(0x0, -0x20, 0, 5),
AFFINEANIMCMD_FRAME(-0x10, 0x20, 0, 10),
AFFINEANIMCMD_END,
};
@@ -232,9 +232,9 @@ static const union AffineAnimCmd gUnknown_83E6C9C[] =
{
AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6),
AFFINEANIMCMD_FRAME(0x0, 0xFFE0, 0, 5),
AFFINEANIMCMD_FRAME(0xFFEC, 0x0, 0, 7),
AFFINEANIMCMD_FRAME(0xFFEC, 0xFFEC, 0, 5),
AFFINEANIMCMD_FRAME(0x0, -0x20, 0, 5),
AFFINEANIMCMD_FRAME(-0x14, 0x0, 0, 7),
AFFINEANIMCMD_FRAME(-0x14, -0x14, 0, 5),
AFFINEANIMCMD_END,
};
@@ -280,8 +280,8 @@ static const union AffineAnimCmd gUnknown_83E6D14[] =
{
AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6),
AFFINEANIMCMD_FRAME(0x0, 0xFFE0, 0, 5),
AFFINEANIMCMD_FRAME(0xFFF0, 0x20, 0, 10),
AFFINEANIMCMD_FRAME(0x0, -0x20, 0, 5),
AFFINEANIMCMD_FRAME(-0x10, 0x20, 0, 10),
AFFINEANIMCMD_END,
};
@@ -306,7 +306,7 @@ static const union AffineAnimCmd gUnknown_83E6D58[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x0, 0, 0),
AFFINEANIMCMD_FRAME(0x0, 0x20, 0, 12),
AFFINEANIMCMD_FRAME(0x0, 0xFFE0, 0, 11),
AFFINEANIMCMD_FRAME(0x0, -0x20, 0, 11),
AFFINEANIMCMD_END,
};
@@ -995,8 +995,8 @@ static void sub_80B2780(struct Sprite *sprite)
InitSpritePosToAnimAttacker(sprite, 0);
else
InitSpritePosToAnimTarget(sprite, FALSE);
if ((!gBattleAnimArgs[2] && !GetBattlerSide(gBattleAnimAttacker))
|| (gBattleAnimArgs[2] == 1 && !GetBattlerSide(gBattleAnimTarget)))
if ((!gBattleAnimArgs[2] && GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|| (gBattleAnimArgs[2] == 1 && GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER))
sprite->pos1.x += 8;
SeekSpriteAnim(sprite, gBattleAnimArgs[4]);
sprite->pos1.x -= 32;
@@ -1048,7 +1048,7 @@ static void sub_80B2914(struct Sprite *sprite)
{
case 0:
InitSpritePosToAnimAttacker(sprite, 1);
gSprites[GetAnimBattlerSpriteId(0)].invisible = TRUE;
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE;
++sprite->data[0];
break;
case 1:
@@ -1076,7 +1076,7 @@ static void sub_80B2974(struct Sprite *sprite)
sprite->pos2.y -= 10;
if (sprite->pos1.y + sprite->pos2.y < -32)
{
gSprites[GetAnimBattlerSpriteId(0)].invisible = FALSE;
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = FALSE;
DestroyAnimSprite(sprite);
}
break;
@@ -1089,7 +1089,7 @@ static void sub_80B2A08(struct Sprite *sprite)
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[1] = gBattleAnimArgs[3];
sprite->callback = sub_80B2A50;
gSprites[GetAnimBattlerSpriteId(0)].invisible = TRUE;
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE;
}
static void sub_80B2A50(struct Sprite *sprite)
@@ -1275,13 +1275,13 @@ static void sub_80B2E64(u8 taskId)
{
if (gBattleAnimArgs[0] == 0)
{
u8 spriteId = GetAnimBattlerSpriteId(0);
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[spriteId].invisible = TRUE;
}
else
{
u8 spriteId = GetAnimBattlerSpriteId(0);
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[spriteId].invisible = FALSE;
}
+6 -6
View File
@@ -50,7 +50,7 @@ static void sub_80B71B0(struct Sprite *sprite);
static const union AffineAnimCmd gUnknown_83E75A8[] =
{
AFFINEANIMCMD_FRAME(0x1E, 0x1E, 10, 5),
AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 10, 5),
AFFINEANIMCMD_FRAME(-0x1E, -0x1E, 10, 5),
AFFINEANIMCMD_JUMP(0),
};
@@ -342,7 +342,7 @@ void sub_80B54E8(u8 taskId)
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10));
spriteId = GetAnimBattlerSpriteId(0);
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_BLEND);
SetSpriteRotScale(spriteId, 128, 128, 0);
gSprites[spriteId].invisible = FALSE;
@@ -377,7 +377,7 @@ static void sub_80B55C8(u8 taskId)
gTasks[taskId].data[1] -= 1;
return;
}
spriteId = GetAnimBattlerSpriteId(0);
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gTasks[taskId].data[0] += 8;
if (gTasks[taskId].data[0] <= 0xFF)
{
@@ -626,7 +626,7 @@ static void sub_80B5AD4(u8 taskId)
task->data[1] = 0;
task->data[2] = 0;
task->data[3] = 16;
task->data[13] = GetAnimBattlerSpriteId(1);
task->data[13] = GetAnimBattlerSpriteId(ANIM_TARGET);
task->data[4] = (gSprites[task->data[13]].oam.paletteNum + 16) * 16;
if (position == 1)
{
@@ -711,7 +711,7 @@ static void sub_80B5DCC(u8 taskId)
{
case 0:
gScanlineEffect.state = 3;
task->data[14] = GetAnimBattlerSpriteId(1);
task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET);
if (rank == 1)
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
else
@@ -1288,7 +1288,7 @@ static void sub_80B6BE4(u8 taskId)
task->data[1] = 0;
task->data[2] = 0;
task->data[3] = 16;
task->data[4] = GetAnimBattlerSpriteId(0);
task->data[4] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
task->data[5] = gSprites[task->data[4]].oam.priority;
task->data[6] = (gSprites[task->data[4]].oam.paletteNum + 16) << 4;
gSprites[task->data[4]].oam.objMode = ST_OAM_OBJ_BLEND;
+4 -4
View File
@@ -298,7 +298,7 @@ static void sub_80B8ED4(u8 taskId)
switch (task->data[0])
{
case 0:
task->data[10] = GetAnimBattlerSpriteId(0);
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
if (task->data[11] == 1)
{
@@ -360,7 +360,7 @@ static void sub_80B8ED4(u8 taskId)
static void sub_80B908C(u8 taskId)
{
u8 spriteId = GetAnimBattlerSpriteId(0);
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[spriteId].invisible = TRUE;
gSprites[spriteId].pos2.x = 0;
@@ -391,7 +391,7 @@ static void sub_80B912C(u8 taskId)
switch (task->data[0])
{
case 0:
task->data[10] = GetAnimBattlerSpriteId(0);
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[task->data[10]].invisible = FALSE;
gSprites[task->data[10]].pos2.x = 0;
gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y;
@@ -410,7 +410,7 @@ static void sub_80B91B0(u8 taskId)
switch (task->data[0])
{
case 0:
task->data[10] = GetAnimBattlerSpriteId(0);
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
if (task->data[11] == 1)
task->data[12] = gBattle_BG1_X;
+1477
View File
File diff suppressed because it is too large Load Diff
+298
View File
@@ -0,0 +1,298 @@
#include "global.h"
#include "battle_anim.h"
#include "trig.h"
static void sub_80B1620(struct Sprite *sprite);
static void sub_80B16A0(struct Sprite *sprite);
static void sub_80B1744(struct Sprite *sprite);
static void sub_80B17C4(struct Sprite *sprite);
static void AnimBubbleEffect(struct Sprite *sprite);
static void sub_80B1684(struct Sprite *sprite);
static void sub_80B1728(struct Sprite *sprite);
static void sub_80B1798(struct Sprite *sprite);
static void AnimBubbleEffectStep(struct Sprite *sprite);
static const union AnimCmd gUnknown_83E6994[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_FRAME(8, 5),
ANIMCMD_FRAME(16, 5),
ANIMCMD_FRAME(24, 5),
ANIMCMD_END,
};
static const union AnimCmd *const gUnknown_83E69A8[] =
{
gUnknown_83E6994,
};
const struct SpriteTemplate gUnknown_83E69AC =
{
.tileTag = ANIM_TAG_TOXIC_BUBBLE,
.paletteTag = ANIM_TAG_TOXIC_BUBBLE,
.oam = &gOamData_83ACA18,
.anims = gUnknown_83E69A8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSpriteOnMonPos,
};
static const union AnimCmd gUnknown_83E69C4[] =
{
ANIMCMD_FRAME(0, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E69CC[] =
{
ANIMCMD_FRAME(4, 1),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_83E69D4[] =
{
ANIMCMD_FRAME(8, 1),
ANIMCMD_END,
};
static const union AnimCmd *const gUnknown_83E69DC[] =
{
gUnknown_83E69C4,
};
static const union AnimCmd *const gUnknown_83E69E0[] =
{
gUnknown_83E69CC,
};
static const union AnimCmd *const gUnknown_83E69E4[] =
{
gUnknown_83E69D4,
};
static const union AffineAnimCmd gUnknown_83E69E8[] =
{
AFFINEANIMCMD_FRAME(0x160, 0x160, 0, 0),
AFFINEANIMCMD_FRAME(-0xA, -0xA, 0, 10),
AFFINEANIMCMD_FRAME(0xA, 0xA, 0, 10),
AFFINEANIMCMD_JUMP(0),
};
static const union AffineAnimCmd gUnknown_83E6A08[] =
{
AFFINEANIMCMD_FRAME(0xEC, 0xEC, 0, 0),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd *const gUnknown_83E6A18[] =
{
gUnknown_83E69E8,
};
static const union AffineAnimCmd *const gUnknown_83E6A1C[] =
{
gUnknown_83E6A08,
};
const struct SpriteTemplate gUnknown_83E6A20 =
{
.tileTag = ANIM_TAG_POISON_BUBBLE,
.paletteTag = ANIM_TAG_POISON_BUBBLE,
.oam = &gOamData_83ACA90,
.anims = gUnknown_83E69DC,
.images = NULL,
.affineAnims = gUnknown_83E6A18,
.callback = sub_80B1620,
};
const struct SpriteTemplate gUnknown_83E6A38 =
{
.tileTag = ANIM_TAG_POISON_BUBBLE,
.paletteTag = ANIM_TAG_POISON_BUBBLE,
.oam = &gOamData_83ACA90,
.anims = gUnknown_83E69DC,
.images = NULL,
.affineAnims = gUnknown_83E6A18,
.callback = sub_80B16A0,
};
const struct SpriteTemplate gUnknown_83E6A50 =
{
.tileTag = ANIM_TAG_POISON_BUBBLE,
.paletteTag = ANIM_TAG_POISON_BUBBLE,
.oam = &gOamData_83ACA30,
.anims = gUnknown_83E69E4,
.images = NULL,
.affineAnims = gUnknown_83E6A1C,
.callback = sub_80B1744,
};
static const union AffineAnimCmd gUnknown_83E6A68[] =
{
AFFINEANIMCMD_FRAME(-0x10, 0x10, 0, 6),
AFFINEANIMCMD_FRAME(0x10, -0x10, 0, 6),
AFFINEANIMCMD_JUMP(0),
};
static const union AffineAnimCmd *const gUnknown_83E6A80[] =
{
gUnknown_83E6A68,
};
const struct SpriteTemplate gUnknown_83E6A84 =
{
.tileTag = ANIM_TAG_POISON_BUBBLE,
.paletteTag = ANIM_TAG_POISON_BUBBLE,
.oam = &gOamData_83ACA90,
.anims = gUnknown_83E69E0,
.images = NULL,
.affineAnims = gUnknown_83E6A80,
.callback = sub_80B17C4,
};
static const union AffineAnimCmd gUnknown_83E6A9C[] =
{
AFFINEANIMCMD_FRAME(0x9C, 0x9C, 0, 0),
AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 20),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd *const gUnknown_83E6AB4[] =
{
gUnknown_83E6A9C,
};
const struct SpriteTemplate gPoisonBubbleSpriteTemplate =
{
.tileTag = ANIM_TAG_POISON_BUBBLE,
.paletteTag = ANIM_TAG_POISON_BUBBLE,
.oam = &gOamData_83ACA30,
.anims = gUnknown_83E69DC,
.images = NULL,
.affineAnims = gUnknown_83E6AB4,
.callback = AnimBubbleEffect,
};
const struct SpriteTemplate gWaterBubbleSpriteTemplate =
{
.tileTag = ANIM_TAG_SMALL_BUBBLES,
.paletteTag = ANIM_TAG_SMALL_BUBBLES,
.oam = &gOamData_83ACB50,
.anims = gUnknown_83E5A78,
.images = NULL,
.affineAnims = gUnknown_83E6AB4,
.callback = AnimBubbleEffect,
};
static void sub_80B1620(struct Sprite *sprite)
{
if (!gBattleAnimArgs[3])
StartSpriteAnim(sprite, 2);
InitSpritePosToAnimAttacker(sprite, 1);
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
sprite->data[5] = -30;
InitAnimArcTranslation(sprite);
sprite->callback = sub_80B1684;
}
static void sub_80B1684(struct Sprite *sprite)
{
if (TranslateAnimHorizontalArc(sprite))
DestroyAnimSprite(sprite);
}
static void sub_80B16A0(struct Sprite *sprite)
{
s16 l1, l2;
if (!gBattleAnimArgs[3])
StartSpriteAnim(sprite, 2);
InitSpritePosToAnimAttacker(sprite, 1);
SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2);
if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[4] = -gBattleAnimArgs[4];
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[2] = l1 + gBattleAnimArgs[4];
sprite->data[4] = l2 + gBattleAnimArgs[5];
sprite->data[5] = -30;
InitAnimArcTranslation(sprite);
sprite->callback = sub_80B1728;
}
static void sub_80B1728(struct Sprite *sprite)
{
if (TranslateAnimHorizontalArc(sprite))
DestroyAnimSprite(sprite);
}
static void sub_80B1744(struct Sprite *sprite)
{
sprite->data[0] = gBattleAnimArgs[2];
sprite->data[1] = sprite->pos1.x;
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[0];
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[1];
InitSpriteDataForLinearTranslation(sprite);
sprite->data[5] = sprite->data[1] / gBattleAnimArgs[2];
sprite->data[6] = sprite->data[2] / gBattleAnimArgs[2];
sprite->callback = sub_80B1798;
}
static void sub_80B1798(struct Sprite *sprite)
{
TranslateSpriteLinearFixedPoint(sprite);
sprite->data[1] -= sprite->data[5];
sprite->data[2] -= sprite->data[6];
if (!sprite->data[0])
DestroyAnimSprite(sprite);
}
static void sub_80B17C4(struct Sprite *sprite)
{
SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
sprite->pos1.x += gBattleAnimArgs[0];
sprite->pos1.y += gBattleAnimArgs[1];
sprite->data[0] = gBattleAnimArgs[4];
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
sprite->data[4] = sprite->pos1.y + sprite->data[0];
sprite->callback = StartAnimLinearTranslation;
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
}
// Animates a bubble by rising upward, swaying side to side, and
// enlarging the sprite. This is used as an after-effect by poison-type
// moves, along with MOVE_BUBBLE, and MOVE_BUBBLEBEAM.
// arg 0: initial x pixel offset
// arg 1: initial y pixel offset
// arg 2: 0 = single-target, 1 = multi-target
static void AnimBubbleEffect(struct Sprite *sprite)
{
if (!gBattleAnimArgs[2])
{
InitSpritePosToAnimTarget(sprite, TRUE);
}
else
{
SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
sprite->pos1.x += gBattleAnimArgs[0];
sprite->pos1.y += gBattleAnimArgs[1];
}
sprite->callback = AnimBubbleEffectStep;
}
static void AnimBubbleEffectStep(struct Sprite *sprite)
{
sprite->data[0] = (sprite->data[0] + 0xB) & 0xFF;
sprite->pos2.x = Sin(sprite->data[0], 4);
sprite->data[1] += 0x30;
sprite->pos2.y = -(sprite->data[1] >> 8);
if (sprite->affineAnimEnded)
DestroyAnimSprite(sprite);
}
+10 -10
View File
@@ -2365,25 +2365,25 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
{
if (FlagGet(FLAG_BADGE01_GET)
&& !GetBattlerSide(battlerIdAtk))
&& GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER)
attack = (110 * attack) / 100;
}
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
{
if (FlagGet(FLAG_BADGE05_GET)
&& !GetBattlerSide(battlerIdDef))
&& GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER)
defense = (110 * defense) / 100;
}
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
{
if (FlagGet(FLAG_BADGE07_GET)
&& !GetBattlerSide(battlerIdAtk))
&& GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER)
spAttack = (110 * spAttack) / 100;
}
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
{
if (FlagGet(FLAG_BADGE07_GET)
&& !GetBattlerSide(battlerIdDef))
&& GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER)
spDefense = (110 * spDefense) / 100;
}
@@ -3917,7 +3917,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
if (gMain.inBattle)
{
gActiveBattler = gBattlerInMenuId;
cmdIndex = (GetBattlerSide(gActiveBattler) != 0);
cmdIndex = (GetBattlerSide(gActiveBattler) != B_SIDE_PLAYER);
while (cmdIndex < gBattlersCount)
{
if (gBattlerPartyIndexes[cmdIndex] == partyIndex)
@@ -4118,13 +4118,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
{
gAbsentBattlerFlags &= ~gBitTable[sp34];
CopyPlayerPartyMonToBattleData(sp34, pokemon_order_func(gBattlerPartyIndexes[sp34]));
if (GetBattlerSide(gActiveBattler) == 0 && gBattleResults.numRevivesUsed < 255)
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
gBattleResults.numRevivesUsed++;
}
else
{
gAbsentBattlerFlags &= ~gBitTable[gActiveBattler ^ 2];
if (GetBattlerSide(gActiveBattler) == 0 && gBattleResults.numRevivesUsed < 255)
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
gBattleResults.numRevivesUsed++;
}
}
@@ -4163,7 +4163,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
if (gMain.inBattle && sp34 != 4)
{
gBattleMons[sp34].hp = data;
if (!(r10 & 0x10) && GetBattlerSide(gActiveBattler) == 0)
if (!(r10 & 0x10) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
{
if (gBattleResults.numHealingItemsUsed < 255)
gBattleResults.numHealingItemsUsed++;
@@ -6039,11 +6039,11 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)
}
}
bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 bank)
bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 battlerId)
{
u8 buffer[12];
if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(bank))
if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(battlerId) != B_SIDE_PLAYER)
{
GetMonData(mon, MON_DATA_NICKNAME, buffer);
StringGetEnd10(buffer);
+11 -11
View File
@@ -30,7 +30,7 @@ static void sub_80B3D78(u8 taskId);
static const union AffineAnimCmd gUnknown_83E6DDC[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(0xFFFE, 0xFFFE, -10, 120),
AFFINEANIMCMD_FRAME(-0x2, -0x2, -10, 120),
AFFINEANIMCMD_END,
};
@@ -305,7 +305,7 @@ const struct SpriteTemplate gUnknown_83E705C =
static const union AffineAnimCmd gUnknown_83E7074[] =
{
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 8),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 8),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 8),
AFFINEANIMCMD_JUMP(0),
};
@@ -313,27 +313,27 @@ static const union AffineAnimCmd gUnknown_83E7074[] =
static const union AffineAnimCmd gUnknown_83E708C[] =
{
AFFINEANIMCMD_FRAME(0xF0, 0xF0, 0, 0),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 6),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 6),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 8),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 2),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 2),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd gUnknown_83E70B4[] =
{
AFFINEANIMCMD_FRAME(0xD0, 0xD0, 0, 0),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 4),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 4),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 8),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 4),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 4),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd gUnknown_83E70DC[] =
{
AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 2),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 2),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 8),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 6),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 6),
AFFINEANIMCMD_JUMP(1),
};
@@ -384,11 +384,11 @@ static const union AffineAnimCmd gUnknown_83E7160[] =
AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0),
AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 17),
AFFINEANIMCMD_LOOP(0),
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 10),
AFFINEANIMCMD_FRAME(-0x8, -0x8, 0, 10),
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 10),
AFFINEANIMCMD_LOOP(4),
AFFINEANIMCMD_LOOP(0),
AFFINEANIMCMD_FRAME(0xFFF0, 0xFFF0, 0, 5),
AFFINEANIMCMD_FRAME(-0x10, -0x10, 0, 5),
AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 5),
AFFINEANIMCMD_LOOP(7),
AFFINEANIMCMD_END,
@@ -396,7 +396,7 @@ static const union AffineAnimCmd gUnknown_83E7160[] =
static const union AffineAnimCmd gUnknown_83E71B8[] =
{
AFFINEANIMCMD_FRAME(0xFFEC, 0x18, 0, 15),
AFFINEANIMCMD_FRAME(-0x14, 0x18, 0, 15),
AFFINEANIMCMD_END,
};
+1 -1
View File
@@ -31,10 +31,10 @@
#include "wild_encounter.h"
#include "help_system.h"
#include "party_menu.h"
#include "unk_8159F40.h"
#include "pokemon_storage_system.h"
#include "save.h"
#include "link.h"
#include "quest_log_815A008.h"
#include "quest_log_8150454.h"
#include "quest_log.h"
#include "new_menu_helpers.h"
@@ -1,5 +1,4 @@
#include "global.h"
#include "battle.h"
#include "event_data.h"
#include "quest_log.h"
#include "fieldmap.h"
@@ -7,152 +6,6 @@
#include "metatile_behavior.h"
#include "link.h"
#include "link_rfu.h"
#include "constants/species.h"
#include "constants/moves.h"
#include "constants/pokemon.h"
struct PokedudeBattlePartyInfo
{
u8 side;
u8 level;
u16 species;
u16 moves[4];
u8 nature;
u8 gender;
};
static const struct PokedudeBattlePartyInfo sParties_Battle[] = {
{
.side = 0,
.level = 15,
.species = SPECIES_RATTATA,
.moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_HYPER_FANG, MOVE_QUICK_ATTACK},
.nature = NATURE_LONELY,
.gender = MALE
},
{
.side = 1,
.level = 18,
.species = SPECIES_PIDGEY,
.moves = {MOVE_TACKLE, MOVE_SAND_ATTACK, MOVE_GUST, MOVE_QUICK_ATTACK},
.nature = NATURE_NAUGHTY,
.gender = MALE
},
{0xFF}
};
static const struct PokedudeBattlePartyInfo sParties_Status[] = {
{
.side = 0,
.level = 15,
.species = SPECIES_RATTATA,
.moves = {MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_HYPER_FANG, MOVE_QUICK_ATTACK},
.nature = NATURE_LONELY,
.gender = MALE
},
{
.side = 1,
.level = 14,
.species = SPECIES_ODDISH,
.moves = {MOVE_ABSORB, MOVE_SWEET_SCENT, MOVE_POISON_POWDER},
.nature = NATURE_RASH,
.gender = MALE
},
{0xFF}
};
static const struct PokedudeBattlePartyInfo sParties_Matchups[] = {
{
.side = 0,
.level = 15,
.species = SPECIES_POLIWAG,
.moves = {MOVE_WATER_GUN, MOVE_HYPNOSIS, MOVE_BUBBLE},
.nature = NATURE_RASH,
.gender = MALE
},
{
.side = 0,
.level = 15,
.species = SPECIES_BUTTERFREE,
.moves = {MOVE_CONFUSION, MOVE_POISON_POWDER, MOVE_STUN_SPORE, MOVE_SLEEP_POWDER},
.nature = NATURE_RASH,
.gender = MALE
},
{
.side = 1,
.level = 14,
.species = SPECIES_ODDISH,
.moves = {MOVE_ABSORB, MOVE_SWEET_SCENT, MOVE_POISON_POWDER},
.nature = NATURE_RASH,
.gender = MALE
},
{0xFF}
};
static const struct PokedudeBattlePartyInfo sParties_Catching[] = {
{
.side = 0,
.level = 15,
.species = SPECIES_BUTTERFREE,
.moves = {MOVE_CONFUSION, MOVE_POISON_POWDER, MOVE_SLEEP_POWDER, MOVE_STUN_SPORE},
.nature = NATURE_RASH,
.gender = MALE
},
{
.side = 1,
.level = 11,
.species = SPECIES_JIGGLYPUFF,
.moves = {MOVE_SING, MOVE_DEFENSE_CURL, MOVE_POUND},
.nature = NATURE_CAREFUL,
.gender = MALE
},
{0xFF}
};
static const struct PokedudeBattlePartyInfo *const sPokedudeBattlePartyPointers[] = {
sParties_Battle,
sParties_Status,
sParties_Matchups,
sParties_Catching
};
void InitPokedudePartyAndOpponent(void)
{
s32 i, j;
struct Pokemon * mon;
s32 myIdx = 0;
s32 opIdx = 0;
const struct PokedudeBattlePartyInfo * data;
gBattleTypeFlags = BATTLE_TYPE_POKEDUDE;
ZeroPlayerPartyMons();
ZeroEnemyPartyMons();
data = sPokedudeBattlePartyPointers[gSpecialVar_0x8004];
i = 0;
do
{
if (data[i].side == 0)
{
mon = &gPlayerParty[myIdx];
myIdx++;
}
else
{
mon = &gEnemyParty[opIdx];
opIdx++;
}
CreateMonWithGenderNatureLetter(mon, data[i].species, data[i].level, 0, data[i].gender, data[i].nature, 0);
for (j = 0; j < 4; j++)
{
SetMonMoveSlot(mon, data[i].moves[j], j);
}
i++;
} while (data[i].side != 0xFF);
}
// file boundary?
void sub_815A008(struct QuestLog * questLog)
{
+4 -4
View File
@@ -87,8 +87,8 @@ const struct SpriteTemplate gUnknown_83E73E4 =
static const union AffineAnimCmd gUnknown_83E73FC[] =
{
AFFINEANIMCMD_FRAME(0xC0, 0xC0, 0, 0),
AFFINEANIMCMD_FRAME(0x2, 0xFFFD, 0, 5),
AFFINEANIMCMD_FRAME(0xFFFE, 0x3, 0, 5),
AFFINEANIMCMD_FRAME(0x2, -0x3, 0, 5),
AFFINEANIMCMD_FRAME(-0x2, 0x3, 0, 5),
AFFINEANIMCMD_JUMP(1),
};
@@ -152,7 +152,7 @@ static const struct Subsprite gUnknown_83E7468[] =
static const struct SubspriteTable gUnknown_83E7470[] =
{
{ ARRAY_COUNT(gUnknown_83E7468), gUnknown_83E7468 },
{ NELEMS(gUnknown_83E7468), gUnknown_83E7468 },
};
static const union AnimCmd gUnknown_83E7478[] =
@@ -588,7 +588,7 @@ void sub_80B4BD0(u8 taskId)
task->data[13] = pan1;
task->data[14] = (pan2 - pan1) / task->data[8];
task->data[1] = var4;
task->data[15] = GetAnimBattlerSpriteId(0);
task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
task->func = sub_80B4D00;
}
+1 -1
View File
@@ -25,11 +25,11 @@
#include "battle_transition.h"
#include "battle_main.h"
#include "battle.h"
#include "battle_controllers.h"
#include "global.fieldmap.h"
#include "teachy_tv.h"
#include "help_system.h"
#include "overworld.h"
#include "unk_8159F40.h"
#include "graphics.h"
#include "fieldmap.h"
#include "strings.h"
+1 -4
View File
@@ -192,10 +192,7 @@ gUnknown_3005E98: @ 3005E98
.include "mevent.o"
.align 4
gUnknown_3005EE0: @ 3005EE0
@ const u8 *gUnknown_3005EE0[4]
.space 0x10
.include "battle_controller_pokedude.o"
.align 4
.include "berry_fix_program.o"
.include "m4a.o"