diff --git a/asm/code_803D110.s b/asm/code_803D110.s index 51c4c2465..d0d51f2d4 100644 --- a/asm/code_803D110.s +++ b/asm/code_803D110.s @@ -559,7 +559,7 @@ _0803D500: ldr r4, _0803D658 adds r2, r4 ldrb r0, [r2] - bl sub_8090298 + bl GetDungeonFloorCount ldr r1, [r6] ldr r7, _0803D66C adds r1, r7 diff --git a/asm/code_8044210.s b/asm/code_8044210.s index 32a8e6911..f92362577 100644 --- a/asm/code_8044210.s +++ b/asm/code_8044210.s @@ -5,98 +5,6 @@ .text - thumb_func_start sub_8044210 -sub_8044210: - push {lr} - ldr r0, _0804422C - ldr r0, [r0] - ldr r1, _08044230 - adds r0, r1 - ldrb r0, [r0] - subs r0, 0x4B - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x16 - bls _08044234 - movs r0, 0 - b _08044236 - .align 2, 0 -_0804422C: .4byte gDungeonGlobalData -_08044230: .4byte 0x00000644 -_08044234: - movs r0, 0x1 -_08044236: - pop {r1} - bx r1 - thumb_func_end sub_8044210 - - thumb_func_start RunDungeon -RunDungeon: - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 - bl sub_8044994 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 - adds r0, r4, 0 - bl xxx_dungeon_80442D0 - lsls r0, 24 - lsrs r4, r0, 24 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 - cmp r4, 0 - beq _08044280 - bl sub_807E378 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 -_08044280: - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 - bl sub_8044574 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _080442C6 - bl sub_8044820 - bl sub_8044B28 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _080442C6 - bl sub_8044AB4 - ldr r0, _080442CC - ldr r0, [r0] - movs r2, 0xCC - lsls r2, 3 - adds r1, r0, r2 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x18 - bne _080442C6 - strh r4, [r1] -_080442C6: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080442CC: .4byte gDungeonGlobalData - thumb_func_end RunDungeon - thumb_func_start xxx_dungeon_80442D0 xxx_dungeon_80442D0: push {r4-r7,lr} @@ -1316,4 +1224,4 @@ sub_8044C50: _08044C84: .4byte 0x0000ffff thumb_func_end sub_8044C50 - .align 2, 0 \ No newline at end of file + .align 2, 0 diff --git a/asm/code_8046CE4.s b/asm/code_8046CE4.s index 713c3a3dd..6cbade5fa 100644 --- a/asm/code_8046CE4.s +++ b/asm/code_8046CE4.s @@ -1998,7 +1998,7 @@ sub_80482D4: ldr r1, _080482F8 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 diff --git a/asm/code_8048480.s b/asm/code_8048480.s index eabc0b0f2..d9ee2d60c 100644 --- a/asm/code_8048480.s +++ b/asm/code_8048480.s @@ -5,352 +5,6 @@ .text - thumb_func_start sub_8048524 -sub_8048524: - push {r4-r6,lr} - sub sp, 0x4 - adds r6, r0, 0 - adds r4, r1, 0 - ldr r0, [r4, 0x70] - adds r5, r0, 0 - ldrb r0, [r5, 0x7] - cmp r0, 0 - beq _08048542 - adds r0, r6, 0 - movs r2, 0 - movs r3, 0x5 - bl sub_8078A58 - b _080485A4 -_08048542: - ldr r0, _08048560 - adds r1, r4, 0 - movs r2, 0 - bl SetMessageArgument - adds r0, r4, 0 - movs r1, 0x12 - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - beq _08048568 - ldr r0, _08048564 - b _08048586 - .align 2, 0 -_08048560: .4byte gAvailablePokemonNames -_08048564: .4byte gPtrSelfHealPreventedHungerMessage -_08048568: - movs r0, 0x9E - lsls r0, 1 - adds r5, r0 - ldr r0, [r5] - bl RoundUpFixedPoint - cmp r0, 0 - beq _08048598 - mov r0, sp - movs r1, 0 - bl sub_80943A0 - ldr r0, [sp] - str r0, [r5] - ldr r0, _08048594 -_08048586: - ldr r2, [r0] - adds r0, r6, 0 - adds r1, r4, 0 - bl sub_80522F4 - b _080485A4 - .align 2, 0 -_08048594: .4byte gUnknown_80F9740 -_08048598: - ldr r0, _080485AC - ldr r2, [r0] - adds r0, r6, 0 - adds r1, r4, 0 - bl sub_80522F4 -_080485A4: - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_080485AC: .4byte gUnknown_80F9760 - thumb_func_end sub_8048524 - - thumb_func_start sub_80485B0 -sub_80485B0: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - mov r9, r0 - mov r8, r1 - movs r0, 0 - str r0, [sp] - movs r2, 0x1 - mov r10, r2 - ldr r4, [r1, 0x70] - movs r0, 0x64 - bl DungeonRandomCapped - ldr r1, _0804865C - movs r2, 0 - ldrsh r1, [r1, r2] - cmp r0, r1 - bge _080485DE - movs r0, 0x3 - mov r10, r0 -_080485DE: - ldrb r0, [r4, 0x7] - cmp r0, 0 - beq _0804867C - movs r2, 0x8C - lsls r2, 1 - adds r4, r2 - adds r5, r4, 0 - movs r7, 0x3 -_080485EE: - ldrb r1, [r4] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804862C - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0804862C - adds r0, r5, 0 - bl GetMovePower - cmp r0, 0 - beq _0804862C - ldrb r6, [r4, 0x5] - adds r0, r5, 0 - bl GetMoveUnk12 - adds r1, r0, 0 - ldrb r0, [r4, 0x5] - add r0, r10 - strb r0, [r4, 0x5] - ldrb r0, [r4, 0x5] - cmp r0, r1 - blt _08048622 - strb r1, [r4, 0x5] -_08048622: - ldrb r0, [r4, 0x5] - cmp r6, r0 - beq _0804862C - movs r2, 0x1 - str r2, [sp] -_0804862C: - adds r4, 0x8 - adds r5, 0x8 - subs r7, 0x1 - cmp r7, 0 - bge _080485EE - ldr r0, [sp] - cmp r0, 0 - beq _08048668 - ldr r0, _08048660 - ldr r2, [r0] - mov r0, r9 - mov r1, r8 - bl sub_80522F4 - mov r2, r10 - cmp r2, 0x1 - beq _08048688 - movs r0, 0xA - movs r1, 0x40 - bl sub_803E708 - ldr r0, _08048664 - b _0804866A - .align 2, 0 -_0804865C: .4byte gUnknown_80F4F46 -_08048660: .4byte gUnknown_80FE454 -_08048664: .4byte gUnknown_80FE434 -_08048668: - ldr r0, _08048678 -_0804866A: - ldr r2, [r0] - mov r0, r9 - mov r1, r8 - bl sub_80522F4 - b _08048688 - .align 2, 0 -_08048678: .4byte gUnknown_80FE40C -_0804867C: - ldr r0, _08048698 - ldr r2, [r0] - mov r0, r9 - mov r1, r8 - bl sub_80522F4 -_08048688: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08048698: .4byte gUnknown_80FE40C - thumb_func_end sub_80485B0 - - thumb_func_start sub_804869C -sub_804869C: - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x1C - adds r4, r0, 0 - adds r7, r1, 0 - lsls r2, 24 - cmp r2, 0 - beq _08048724 - ldr r5, [r7, 0x70] - ldr r0, _080486D4 - ldr r0, [r0] - ldr r1, _080486D8 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _080486E4 - ldr r0, _080486DC - movs r1, 0 - ldrsh r6, [r0, r1] - ldr r0, _080486E0 - ldr r2, [r0] - adds r0, r4, 0 - adds r1, r7, 0 - bl sub_80522F4 - b _080486EA - .align 2, 0 -_080486D4: .4byte gDungeonGlobalData -_080486D8: .4byte 0x00000675 -_080486DC: .4byte gUnknown_80F4FA8 -_080486E0: .4byte gUnknown_80FEAE8 -_080486E4: - ldr r0, _0804871C - movs r1, 0 - ldrsh r6, [r0, r1] -_080486EA: - adds r0, r5, 0 - adds r0, 0xB0 - ldrb r0, [r0] - cmp r0, 0x1 - bne _080486FC - adds r0, r4, 0 - adds r1, r7, 0 - bl SendImmobilizeEndMessage -_080486FC: - add r0, sp, 0x18 - str r0, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r0, _08048720 - str r0, [sp, 0x8] - str r1, [sp, 0xC] - str r1, [sp, 0x10] - str r1, [sp, 0x14] - adds r0, r4, 0 - adds r1, r7, 0 - adds r2, r6, 0 - movs r3, 0x1 - bl sub_806F370 - b _080487B6 - .align 2, 0 -_0804871C: .4byte gUnknown_80F4FA4 -_08048720: .4byte 0x00000216 -_08048724: - adds r0, r4, 0 - bl sub_8042520 - adds r0, r4, 0 - bl sub_80696FC - adds r5, r0, 0 - cmp r5, 0 - bne _08048748 - ldr r0, _08048744 - ldr r2, [r0] - adds r0, r4, 0 - adds r1, r7, 0 - bl sub_80522F4 - b _080487B6 - .align 2, 0 -_08048744: .4byte gUnknown_80FDBA0 -_08048748: - ldr r1, [r5, 0x70] - mov r8, r1 - ldr r0, _08048770 - ldr r0, [r0] - ldr r1, _08048774 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _08048780 - ldr r0, _08048778 - movs r1, 0 - ldrsh r6, [r0, r1] - ldr r0, _0804877C - ldr r2, [r0] - adds r0, r4, 0 - adds r1, r7, 0 - bl sub_80522F4 - b _08048786 - .align 2, 0 -_08048770: .4byte gDungeonGlobalData -_08048774: .4byte 0x00000675 -_08048778: .4byte gUnknown_80F4FAA -_0804877C: .4byte gUnknown_80FEAE8 -_08048780: - ldr r0, _080487C4 - movs r1, 0 - ldrsh r6, [r0, r1] -_08048786: - mov r0, r8 - adds r0, 0xB0 - ldrb r0, [r0] - cmp r0, 0x1 - bne _08048798 - adds r0, r4, 0 - adds r1, r5, 0 - bl SendImmobilizeEndMessage -_08048798: - add r0, sp, 0x18 - str r0, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r0, _080487C8 - str r0, [sp, 0x8] - str r1, [sp, 0xC] - str r1, [sp, 0x10] - str r1, [sp, 0x14] - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - movs r3, 0x1 - bl sub_806F370 -_080487B6: - add sp, 0x1C - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080487C4: .4byte gUnknown_80F4FA6 -_080487C8: .4byte 0x00000216 - thumb_func_end sub_804869C - - thumb_func_start sub_80487CC -sub_80487CC: - push {r4,lr} - sub sp, 0x4 - movs r4, 0x1 - str r4, [sp] - bl sub_8078B5C - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80487CC - thumb_func_start sub_80487E0 sub_80487E0: push {r4-r7,lr} @@ -1069,56 +723,4 @@ _08048D40: bx r1 thumb_func_end sub_8048B9C - thumb_func_start sub_8048D50 -sub_8048D50: - push {r4,lr} - adds r4, r0, 0 - adds r2, r1, 0 - ldr r3, [r4, 0x70] - ldrb r1, [r2] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08048D78 - ldr r0, _08048D70 - adds r1, r2, 0 - bl sub_8045BF8 - ldr r0, _08048D74 - b _08048D9A - .align 2, 0 -_08048D70: .4byte gUnknown_202DE58 -_08048D74: .4byte gUnknown_80FE3E8 -_08048D78: - adds r0, r3, 0 - adds r0, 0xEC - ldrb r0, [r0] - cmp r0, 0x1 - bne _08048DB0 - ldrb r0, [r2, 0x2] - bl IsEdibleItem - lsls r0, 24 - cmp r0, 0 - beq _08048DB0 - ldr r0, _08048DA8 - adds r1, r4, 0 - movs r2, 0 - bl SetMessageArgument - ldr r0, _08048DAC -_08048D9A: - ldr r1, [r0] - adds r0, r4, 0 - bl SendMessage - movs r0, 0 - b _08048DB2 - .align 2, 0 -_08048DA8: .4byte gAvailablePokemonNames -_08048DAC: .4byte gUnknown_80FDCA4 -_08048DB0: - movs r0, 0x1 -_08048DB2: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8048D50 - .align 2, 0 diff --git a/asm/code_80521D0.s b/asm/code_80521D0.s index 393cfe850..500210389 100644 --- a/asm/code_80521D0.s +++ b/asm/code_80521D0.s @@ -6770,7 +6770,7 @@ _08055D54: ldr r1, _08055DD8 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r3, r0, 0 movs r0, 0 str r0, [sp] @@ -6925,7 +6925,7 @@ _08055EC0: ldr r1, _08055F88 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r4, 0 adds r1, r4, 0 diff --git a/asm/code_805744C.s b/asm/code_805744C.s index 4272c44bf..4d95c0ee3 100644 --- a/asm/code_805744C.s +++ b/asm/code_805744C.s @@ -376,7 +376,7 @@ sub_80576D0: ldr r1, _080576F4 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r2, 0x1 adds r0, r5, 0 @@ -398,7 +398,7 @@ sub_80576F8: ldr r1, _0805771C adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 @@ -420,7 +420,7 @@ sub_8057720: ldr r1, _08057744 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 diff --git a/asm/code_8057824.s b/asm/code_8057824.s index 3fd73d05b..d4600ed4c 100644 --- a/asm/code_8057824.s +++ b/asm/code_8057824.s @@ -90,7 +90,7 @@ sub_8057E28: ldr r1, _08057E4C adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 @@ -1727,7 +1727,7 @@ sub_8058A54: ldr r1, _08058A78 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 @@ -5269,7 +5269,7 @@ sub_805A4D4: ldr r1, _0805A4F8 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 @@ -6166,7 +6166,7 @@ _0805ABEC: ldr r1, _0805AC04 adds r0, r6, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r6, 0 @@ -6316,7 +6316,7 @@ sub_805AD04: ldr r1, _0805AD30 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r3, r0, 0 movs r0, 0x1 str r0, [sp] @@ -8393,7 +8393,7 @@ sub_805BC70: ldr r1, _0805BC94 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 diff --git a/asm/code_8069E0C.s b/asm/code_8069E0C.s index 056266432..2e8f0da14 100644 --- a/asm/code_8069E0C.s +++ b/asm/code_8069E0C.s @@ -5,669 +5,6 @@ .text - thumb_func_start sub_8069E0C -sub_8069E0C: - push {r4-r7,lr} - adds r4, r0, 0 - ldr r5, [r4, 0x70] - movs r1, 0x25 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069E44 - adds r0, r4, 0 - bl GetWeather - ldr r1, _08069E40 - lsls r0, 24 - lsrs r0, 22 - adds r0, r1 - ldrb r1, [r0] - adds r0, r5, 0 - adds r0, 0x5C - movs r2, 0 - strb r1, [r0] - adds r0, 0x1 - strb r2, [r0] - adds r6, r5, 0 - adds r6, 0x5E - b _08069E62 - .align 2, 0 -_08069E40: .4byte gUnknown_80F520C -_08069E44: - movs r4, 0 - adds r7, r5, 0 - adds r7, 0x5C - adds r6, r5, 0 - adds r6, 0x5E -_08069E4E: - movs r1, 0x2 - ldrsh r0, [r5, r1] - adds r1, r4, 0 - bl GetPokemonType - adds r1, r7, r4 - strb r0, [r1] - adds r4, 0x1 - cmp r4, 0x1 - ble _08069E4E -_08069E62: - movs r4, 0 -_08069E64: - movs r1, 0x2 - ldrsh r0, [r5, r1] - adds r1, r4, 0 - bl GetPokemonAbility - adds r1, r6, r4 - strb r0, [r1] - adds r4, 0x1 - cmp r4, 0x1 - ble _08069E64 - ldr r0, _08069E88 - ldr r1, [r0] - movs r0, 0x1 - strb r0, [r1, 0xC] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08069E88: .4byte gDungeonGlobalData - thumb_func_end sub_8069E0C - - thumb_func_start TriggerWeatherAbilities -TriggerWeatherAbilities: - push {r4-r7,lr} - ldr r3, _08069ED8 - ldr r2, [r3] - ldrb r0, [r2, 0xC] - cmp r0, 0 - beq _08069F44 - movs r1, 0 - strb r1, [r2, 0xC] - ldr r0, [r3] - ldr r2, _08069EDC - adds r0, r2 - strb r1, [r0] - movs r7, 0 - adds r5, r3, 0 - movs r6, 0x1 -_08069EAA: - ldr r0, [r5] - lsls r1, r7, 2 - ldr r2, _08069EE0 - adds r0, r2 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _08069F3E - adds r0, r4, 0 - movs r1, 0x4 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069EE8 - ldr r0, [r5] - ldr r1, _08069EE4 - b _08069F16 - .align 2, 0 -_08069ED8: .4byte gDungeonGlobalData -_08069EDC: .4byte 0x0000e279 -_08069EE0: .4byte 0x000135cc -_08069EE4: .4byte 0x0000e273 -_08069EE8: - adds r0, r4, 0 - movs r1, 0x1C - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069F04 - ldr r0, [r5] - ldr r2, _08069F00 - adds r0, r2 - b _08069F18 - .align 2, 0 -_08069F00: .4byte 0x0000e271 -_08069F04: - adds r0, r4, 0 - movs r1, 0x31 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069F1A - ldr r0, [r5] - ldr r1, _08069F4C -_08069F16: - adds r0, r1 -_08069F18: - strb r6, [r0] -_08069F1A: - adds r0, r4, 0 - movs r1, 0x8 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - bne _08069F36 - adds r0, r4, 0 - movs r1, 0x2D - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069F3E -_08069F36: - ldr r0, [r5] - ldr r2, _08069F50 - adds r0, r2 - strb r6, [r0] -_08069F3E: - adds r7, 0x1 - cmp r7, 0x13 - ble _08069EAA -_08069F44: - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08069F4C: .4byte 0x0000e270 -_08069F50: .4byte 0x0000e279 - thumb_func_end TriggerWeatherAbilities - - thumb_func_start sub_8069F54 -sub_8069F54: - push {r4,r5,lr} - adds r5, r0, 0 - lsls r1, 16 - asrs r0, r1, 16 - ldr r2, _08069F88 - adds r1, r2 - lsrs r1, 16 - cmp r1, 0x3 - bhi _08069F94 - adds r0, r5, 0 - movs r1, 0x25 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _08069F90 - ldr r4, _08069F8C - adds r0, r5, 0 - bl GetWeather - lsls r0, 24 - lsrs r0, 22 - adds r0, r4 - movs r1, 0x2 - ldrsh r0, [r0, r1] - b _08069F94 - .align 2, 0 -_08069F88: .4byte 0xfe880000 -_08069F8C: .4byte gUnknown_80F520C -_08069F90: - movs r0, 0xBC - lsls r0, 1 -_08069F94: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8069F54 - - thumb_func_start sub_8069F9C -sub_8069F9C: - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - mov r8, r0 - adds r6, r1, 0 - mov r9, r2 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - bne _08069FB8 - b _0806A0FA -_08069FB8: - adds r0, r6, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - bne _08069FC6 - b _0806A0FA -_08069FC6: - cmp r8, r6 - bne _08069FCC - b _0806A0FA -_08069FCC: - mov r0, r8 - ldr r2, [r0, 0x70] - adds r3, r2, 0 - ldr r7, [r6, 0x70] - movs r4, 0x1 - negs r4, r4 - adds r0, r7, 0 - adds r0, 0x5E - ldrb r0, [r0] - cmp r0, 0x28 - bne _08069FE4 - movs r4, 0 -_08069FE4: - adds r0, r7, 0 - adds r0, 0x5F - ldrb r0, [r0] - cmp r0, 0x28 - bne _08069FF0 - movs r4, 0x1 -_08069FF0: - cmp r4, 0 - blt _0806A068 - movs r1, 0 - adds r0, r2, 0 - adds r0, 0x5E - ldrb r2, [r0] - cmp r2, 0 - beq _0806A006 - mov r0, sp - strb r2, [r0] - movs r1, 0x1 -_0806A006: - adds r0, r3, 0 - adds r0, 0x5F - ldrb r2, [r0] - cmp r2, 0 - beq _0806A018 - mov r3, sp - adds r0, r3, r1 - strb r2, [r0] - adds r1, 0x1 -_0806A018: - cmp r1, 0 - beq _0806A068 - cmp r1, 0x1 - bne _0806A024 - movs r1, 0 - b _0806A030 -_0806A024: - adds r0, r1, 0 - bl DungeonRandomCapped - adds r1, r0, 0 - cmp r1, 0 - blt _0806A068 -_0806A030: - adds r0, r7, 0 - adds r0, 0x5E - adds r0, r4 - add r1, sp - ldrb r1, [r1] - strb r1, [r0] - ldr r0, _0806A108 - ldr r1, [r0] - movs r0, 0x1 - strb r0, [r1, 0xC] - ldr r0, _0806A10C - adds r1, r6, 0 - movs r2, 0 - bl SetMessageArgument - ldr r0, _0806A110 - ldr r2, [r0] - mov r0, r8 - adds r1, r6, 0 - bl sub_80522F4 - adds r0, r6, 0 - bl sub_8042900 - mov r0, r8 - adds r1, r6, 0 - bl sub_806ABAC -_0806A068: - movs r0, 0xAD - lsls r0, 1 - adds r1, r7, r0 - ldrb r0, [r1] - cmp r0, 0 - beq _0806A0FA - movs r0, 0 - strb r0, [r1] - adds r0, r6, 0 - movs r1, 0x3B - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _0806A0FA - mov r0, r8 - mov r1, r9 - bl GetMoveTypeForPokemon - lsls r0, 24 - lsrs r5, r0, 24 - mov r1, r9 - ldrh r0, [r1, 0x2] - cmp r0, 0x1F - bne _0806A0AA - mov r0, r8 - bl GetWeather - lsls r0, 24 - lsrs r0, 24 - ldr r1, _0806A114 - adds r0, r1 - ldrb r5, [r0] -_0806A0AA: - cmp r5, 0 - beq _0806A0FA - adds r0, r6, 0 - adds r1, r5, 0 - bl HasType - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _0806A0FA - adds r4, r7, 0 - adds r4, 0x5C - strb r5, [r4] - adds r1, r7, 0 - adds r1, 0x5D - strb r0, [r1] - adds r1, 0x99 - movs r0, 0x1 - strb r0, [r1] - ldr r0, _0806A10C - adds r1, r6, 0 - movs r2, 0 - bl SetMessageArgument - ldrb r0, [r4] - bl GetUnformattedTypeString - adds r1, r0, 0 - ldr r0, _0806A118 - bl strcpy - ldr r0, _0806A11C - ldr r2, [r0] - mov r0, r8 - adds r1, r6, 0 - bl sub_80522F4 - adds r0, r6, 0 - bl sub_8042968 -_0806A0FA: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0806A108: .4byte gDungeonGlobalData -_0806A10C: .4byte gAvailablePokemonNames -_0806A110: .4byte gUnknown_80FCC7C -_0806A114: .4byte gUnknown_80F51E4 -_0806A118: .4byte gUnknown_202DE58 -_0806A11C: .4byte gUnknown_80FCCAC - thumb_func_end sub_8069F9C - - thumb_func_start sub_806A120 -sub_806A120: - push {r4-r7,lr} - adds r7, r0, 0 - adds r6, r1, 0 - adds r4, r2, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A19C - adds r0, r6, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A19C - cmp r7, r6 - beq _0806A19C - ldr r5, [r6, 0x70] - adds r0, r5, 0 - adds r0, 0xC4 - ldrb r0, [r0] - cmp r0, 0xC - bne _0806A19C - adds r0, r7, 0 - adds r1, r4, 0 - bl GetMoveTypeForPokemon - lsls r0, 24 - lsrs r0, 24 - bl sub_8092364 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0806A19C - adds r0, r5, 0 - adds r0, 0x5C - movs r1, 0 - strb r4, [r0] - adds r0, 0x1 - strb r1, [r0] - adds r0, r6, 0 - bl sub_8041BBC - ldr r0, _0806A1A4 - adds r1, r6, 0 - movs r2, 0 - bl SetMessageArgument - adds r0, r4, 0 - bl GetUnformattedTypeString - adds r1, r0, 0 - ldr r0, _0806A1A8 - bl strcpy - ldr r0, _0806A1AC - ldr r2, [r0] - adds r0, r7, 0 - adds r1, r6, 0 - bl sub_80522F4 -_0806A19C: - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0806A1A4: .4byte gAvailablePokemonNames -_0806A1A8: .4byte gUnknown_202DE58 -_0806A1AC: .4byte gUnknown_80FDCC8 - thumb_func_end sub_806A120 - - thumb_func_start sub_806A1B0 -sub_806A1B0: - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A1DE - adds r0, r4, 0 - movs r1, 0x2A - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _0806A1DE - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x1 - bl sub_8076090 -_0806A1DE: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_806A1B0 - - thumb_func_start sub_806A1E8 -sub_806A1E8: - push {r4,r5,lr} - adds r4, r0, 0 - movs r5, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A234 - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x1 - bne _0806A210 - ldr r0, [r4, 0x70] - movs r1, 0 - ldrb r0, [r0, 0x6] - cmp r0, 0 - bne _0806A20E - movs r1, 0x1 -_0806A20E: - adds r5, r1, 0 -_0806A210: - ldr r0, _0806A23C - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _0806A21C - movs r5, 0 -_0806A21C: - cmp r5, 0 - beq _0806A234 - adds r0, r4, 0 - bl sub_8045888 - lsls r0, 24 - cmp r0, 0 - bne _0806A234 - adds r0, r4, 0 - movs r1, 0x1 - bl sub_806A2BC -_0806A234: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0806A23C: .4byte gUnknown_203B46C - thumb_func_end sub_806A1E8 - - thumb_func_start sub_806A240 -sub_806A240: - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r6, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A2B4 - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x1 - bne _0806A26A - ldr r0, [r4, 0x70] - movs r1, 0 - ldrb r0, [r0, 0x6] - cmp r0, 0 - bne _0806A268 - movs r1, 0x1 -_0806A268: - adds r6, r1, 0 -_0806A26A: - cmp r6, 0 - beq _0806A284 - adds r0, r4, 0 - bl sub_8045888 - lsls r0, 24 - cmp r0, 0 - bne _0806A284 - adds r0, r4, 0 - movs r1, 0x1 - bl sub_806A2BC - b _0806A2B4 -_0806A284: - adds r0, r5, 0 - bl GetEntityType - cmp r0, 0x1 - bne _0806A29C - ldr r0, [r5, 0x70] - movs r1, 0 - ldrb r0, [r0, 0x6] - cmp r0, 0 - bne _0806A29A - movs r1, 0x1 -_0806A29A: - adds r6, r1, 0 -_0806A29C: - cmp r6, 0 - beq _0806A2B4 - adds r0, r5, 0 - bl sub_8045888 - lsls r0, 24 - cmp r0, 0 - bne _0806A2B4 - adds r0, r5, 0 - movs r1, 0x1 - bl sub_806A2BC -_0806A2B4: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_806A240 - - thumb_func_start sub_806A2BC -sub_806A2BC: - push {r4-r7,lr} - adds r4, r0, 0 - lsls r1, 24 - lsrs r6, r1, 24 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806A328 - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x1 - bne _0806A328 - ldr r5, _0806A2F4 - ldr r0, [r5] - ldr r1, _0806A2F8 - adds r0, r1 - ldr r0, [r0] - cmp r0, r4 - beq _0806A328 - adds r7, r4, 0x4 - cmp r6, 0 - beq _0806A30C - movs r0, 0x1 - bl sub_804178C - b _0806A302 - .align 2, 0 -_0806A2F4: .4byte gDungeonGlobalData -_0806A2F8: .4byte 0x000181f8 -_0806A2FC: - movs r0, 0x34 - bl sub_803E46C -_0806A302: - ldr r0, [r5] - movs r1, 0x12 - ldrsh r0, [r0, r1] - cmp r0, 0x3B - ble _0806A2FC -_0806A30C: - movs r0, 0x4 - movs r1, 0x44 - bl sub_803E708 - adds r0, r4, 0 - bl sub_803F508 - adds r0, r7, 0 - bl sub_804AC20 - ldr r0, _0806A330 - ldr r1, [r0] - movs r0, 0 - strh r0, [r1, 0x12] -_0806A328: - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0806A330: .4byte gDungeonGlobalData - thumb_func_end sub_806A2BC - - thumb_func_start nullsub_95 -nullsub_95: - bx lr - thumb_func_end nullsub_95 - thumb_func_start sub_806A338 sub_806A338: push {r4-r6,lr} diff --git a/asm/code_806CD90.s b/asm/code_806CD90.s index c3047303f..abb3d79c1 100644 --- a/asm/code_806CD90.s +++ b/asm/code_806CD90.s @@ -5,201 +5,6 @@ .text - thumb_func_start sub_806CEBC -sub_806CEBC: - push {lr} - ldr r0, [r0, 0x70] - adds r1, r0, 0 - adds r0, 0xA8 - ldrb r0, [r0] - cmp r0, 0x1 - beq _0806CED2 - cmp r0, 0x5 - beq _0806CED2 - cmp r0, 0x3 - bne _0806CEE8 -_0806CED2: - movs r2, 0x4 - ldrsh r0, [r1, r2] - cmp r0, 0xB9 - bne _0806CEE4 - adds r0, r1, 0 - adds r0, 0xA9 - ldrb r0, [r0] - cmp r0, 0x7F - beq _0806CEF2 -_0806CEE4: - movs r0, 0x5 - b _0806CEF8 -_0806CEE8: - adds r0, r1, 0 - adds r0, 0xC0 - ldrb r0, [r0] - cmp r0, 0x1 - beq _0806CEF6 -_0806CEF2: - movs r0, 0x7 - b _0806CEF8 -_0806CEF6: - movs r0, 0xB -_0806CEF8: - pop {r1} - bx r1 - thumb_func_end sub_806CEBC - - thumb_func_start sub_806CEFC -sub_806CEFC: - push {r4,lr} - adds r4, r1, 0 - ldr r2, [r0, 0x70] - movs r3, 0x7 - ands r1, r3 - adds r2, 0x46 - strb r1, [r2] - movs r1, 0x7 - ands r1, r4 - bl sub_806CE68 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_806CEFC - - thumb_func_start sub_806CF18 -sub_806CF18: - push {r4-r6,lr} - adds r4, r0, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806CF4C - ldr r6, [r4, 0x70] - movs r5, 0 - b _0806CF2E -_0806CF2C: - adds r5, 0x1 -_0806CF2E: - cmp r5, 0x63 - bgt _0806CF4C - movs r0, 0x21 - bl sub_803E46C - movs r1, 0x4 - ldrsh r0, [r6, r1] - adds r1, r4, 0 - adds r1, 0x6B - ldrb r1, [r1] - bl sub_808DA44 - lsls r0, 24 - cmp r0, 0 - bne _0806CF2C -_0806CF4C: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_806CF18 - - thumb_func_start sub_806CF54 -sub_806CF54: - ldr r0, [r0, 0x70] - movs r1, 0x81 - lsls r1, 2 - adds r0, r1 - ldrb r0, [r0] - bx lr - thumb_func_end sub_806CF54 - - thumb_func_start sub_806CF60 -sub_806CF60: - push {r4,r5,lr} - movs r5, 0 -_0806CF64: - ldr r0, _0806CF90 - ldr r0, [r0] - lsls r1, r5, 2 - ldr r2, _0806CF94 - adds r0, r2 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0806CF84 - adds r0, r4, 0 - bl sub_806CF98 -_0806CF84: - adds r5, 0x1 - cmp r5, 0x13 - ble _0806CF64 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0806CF90: .4byte gDungeonGlobalData -_0806CF94: .4byte 0x000135cc - thumb_func_end sub_806CF60 - - thumb_func_start sub_806CF98 -sub_806CF98: - push {r4-r7,lr} - adds r4, r0, 0 - bl GetMapTileForDungeonEntity_2 - ldrh r0, [r0] - movs r5, 0x3 - ands r5, r0 - adds r6, r5, 0 - ldr r7, [r4, 0x70] - movs r1, 0x4 - ldrsh r0, [r7, r1] - bl GetShadowSize - lsls r0, 24 - lsrs r4, r0, 24 - cmp r5, 0x3 - bne _0806CFBE - movs r0, 0x6 - b _0806CFF8 -_0806CFBE: - cmp r5, 0x1 - bne _0806CFCE - bl IsWaterTileset - lsls r0, 24 - cmp r0, 0 - beq _0806CFEE - b _0806CFE8 -_0806CFCE: - cmp r6, 0x2 - bne _0806CFEE - ldr r1, _0806D000 - ldr r0, _0806D004 - ldr r0, [r0] - ldr r2, _0806D008 - adds r0, r2 - movs r2, 0 - ldrsh r0, [r0, r2] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - beq _0806CFEE -_0806CFE8: - ldr r0, _0806D00C - adds r0, r4, r0 - ldrb r4, [r0] -_0806CFEE: - movs r1, 0x81 - lsls r1, 2 - adds r0, r7, r1 - strb r4, [r0] - adds r0, r4, 0 -_0806CFF8: - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0806D000: .4byte gDungeonWaterType -_0806D004: .4byte gDungeonGlobalData -_0806D008: .4byte 0x00003a0e -_0806D00C: .4byte gUnknown_8106EEF - thumb_func_end sub_806CF98 - thumb_func_start sub_806D010 sub_806D010: push {r4-r7,lr} diff --git a/asm/code_8071214.s b/asm/code_8071214.s deleted file mode 100644 index 03e111f68..000000000 --- a/asm/code_8071214.s +++ /dev/null @@ -1,195 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start CanMoveForward -CanMoveForward: - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r2 - ldr r0, [r4, 0x70] - movs r1, 0x2 - ldrsh r0, [r0, r1] - bl GetCrossableTerrain - lsls r0, 24 - lsrs r6, r0, 24 - movs r0, 0 - mov r2, r8 - strb r0, [r2] - movs r3, 0x4 - ldrsh r0, [r4, r3] - ldr r1, _0807130C - lsls r2, r7, 2 - adds r2, r1 - movs r3, 0 - ldrsh r1, [r2, r3] - adds r0, r1 - movs r3, 0x6 - ldrsh r1, [r4, r3] - movs r3, 0x2 - ldrsh r2, [r2, r3] - adds r1, r2 - bl GetMapTile_1 - adds r5, r0, 0 - ldrh r1, [r5] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08071260 - b _0807137E -_08071260: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08071286 - ldr r0, _08071310 - ldr r0, [r0] - ldr r1, _08071314 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08071286 - adds r0, r4, 0 - movs r1, 0xF - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - beq _08071286 - b _0807137E -_08071286: - ldr r0, [r5, 0x14] - cmp r0, 0 - beq _080712B8 - adds r0, r4, 0 - movs r1, 0xE - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - beq _080712B8 - ldr r0, [r5, 0x14] - bl GetEntityType - cmp r0, 0x2 - bne _080712B8 - ldr r0, [r5, 0x14] - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - bne _0807137E - ldr r0, [r4, 0x70] - adds r0, 0xE8 - ldrb r0, [r0] - cmp r0, 0x3 - beq _0807137E -_080712B8: - ldrh r1, [r5] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0x2 - bne _080712E6 - ldr r1, _08071318 - ldr r0, _08071310 - ldr r0, [r0] - ldr r2, _0807131C - adds r0, r2 - movs r3, 0 - ldrsh r0, [r0, r3] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - bne _080712E6 - adds r0, r4, 0 - movs r1, 0x14 - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - bne _0807137E -_080712E6: - bl IsFixedDungeon - lsls r0, 24 - cmp r0, 0 - bne _08071348 - ldr r0, [r4, 0x70] - adds r0, 0xE4 - ldrb r0, [r0] - cmp r0, 0x3 - beq _08071308 - adds r0, r4, 0 - movs r1, 0x9 - bl HasItem - lsls r0, 24 - cmp r0, 0 - beq _08071320 -_08071308: - movs r6, 0x3 - b _08071348 - .align 2, 0 -_0807130C: .4byte gAdjacentTileOffsets -_08071310: .4byte gDungeonGlobalData -_08071314: .4byte 0x00000671 -_08071318: .4byte gDungeonWaterType -_0807131C: .4byte 0x00003a0e -_08071320: - adds r0, r4, 0 - movs r1, 0xC - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - bne _08071346 - adds r0, r4, 0 - movs r1, 0xD - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - beq _08071348 - movs r0, 0x1 - ands r0, r7 - movs r6, 0x3 - cmp r0, 0 - beq _08071348 -_08071346: - movs r6, 0x2 -_08071348: - movs r1, 0x4 - ldrsh r0, [r4, r1] - movs r2, 0x6 - ldrsh r1, [r4, r2] - bl GetMapTile_1 - adds r0, 0xA - adds r0, r6 - ldr r2, _08071374 - movs r1, 0x7 - ands r1, r7 - adds r1, r2 - ldrb r2, [r0] - ldrb r0, [r1] - ands r0, r2 - cmp r0, 0 - beq _0807137E - ldr r0, [r5, 0x10] - cmp r0, 0 - bne _08071378 - movs r0, 0x1 - b _08071380 - .align 2, 0 -_08071374: .4byte gDirectionBitMasks_3 -_08071378: - movs r0, 0x1 - mov r3, r8 - strb r0, [r3] -_0807137E: - movs r0, 0 -_08071380: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end CanMoveForward - - .align 2, 0 diff --git a/asm/code_807167C.s b/asm/code_807167C.s deleted file mode 100644 index ca8dda25a..000000000 --- a/asm/code_807167C.s +++ /dev/null @@ -1,9 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - - .align 2, 0 diff --git a/asm/code_80718D8.s b/asm/code_80718D8.s index 4732f6be2..e8d360d6f 100644 --- a/asm/code_80718D8.s +++ b/asm/code_80718D8.s @@ -5,78 +5,6 @@ .text - thumb_func_start SetVisualFlags -SetVisualFlags: - push {r4,r5,lr} - adds r3, r0, 0 - lsls r1, 16 - lsrs r4, r1, 16 - lsls r2, 24 - lsrs r5, r2, 24 - movs r1, 0xA7 - lsls r1, 1 - adds r0, r3, r1 - ldrh r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08071AF6 - movs r0, 0xA8 - lsls r0, 1 - adds r2, r3, r0 - ldrh r1, [r2] - adds r0, r4, 0 - orrs r0, r1 - strh r0, [r2] - b _08071B02 -_08071AF6: - movs r0, 0xA8 - lsls r0, 1 - adds r1, r3, r0 - ldrh r0, [r1] - bics r0, r4 - strh r0, [r1] -_08071B02: - cmp r5, 0 - beq _08071B16 - movs r1, 0xA7 - lsls r1, 1 - adds r2, r3, r1 - ldrh r1, [r2] - adds r0, r4, 0 - orrs r0, r1 - strh r0, [r2] - b _08071B22 -_08071B16: - movs r0, 0xA7 - lsls r0, 1 - adds r1, r3, r0 - ldrh r0, [r1] - bics r0, r4 - strh r0, [r1] -_08071B22: - movs r1, 0xA8 - lsls r1, 1 - adds r0, r3, r1 - ldrh r0, [r0] - ands r0, r4 - cmp r0, 0 - bne _08071B40 - subs r1, 0x2 - adds r0, r3, r1 - ldrh r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08071B40 - movs r0, 0x1 - b _08071B42 -_08071B40: - movs r0, 0 -_08071B42: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end SetVisualFlags - thumb_func_start sub_8071B48 sub_8071B48: push {r4-r7,lr} diff --git a/asm/code_8075BA4.s b/asm/code_8075BA4.s index 2f26f5274..0343da63d 100644 --- a/asm/code_8075BA4.s +++ b/asm/code_8075BA4.s @@ -549,7 +549,7 @@ _08075FF6: ldr r1, _08076064 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xA9 @@ -755,7 +755,7 @@ _080761A8: ldr r1, _080761EC adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xBD @@ -906,7 +906,7 @@ _080762E8: ldr r1, _08076330 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 mov r1, r8 adds r1, 0xAD @@ -1132,7 +1132,7 @@ _080764B4: ldr r1, _08076504 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 mov r1, r8 adds r1, 0xAD @@ -1364,7 +1364,7 @@ _0807669C: ldr r1, _080766E8 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 mov r1, r8 adds r1, 0xAD @@ -1595,7 +1595,7 @@ _08076892: ldr r1, _080768D4 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xB8 @@ -1689,7 +1689,7 @@ _08076948: ldr r1, _080769A4 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xB8 @@ -1796,7 +1796,7 @@ _08076A2A: ldr r1, _08076A80 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xB8 @@ -1877,7 +1877,7 @@ _08076AD8: ldr r1, _08076B20 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xB8 @@ -1971,7 +1971,7 @@ _08076B74: ldr r1, _08076C0C adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 mov r1, r8 adds r1, 0xB8 @@ -2192,7 +2192,7 @@ _08076D7C: _08076D7E: adds r0, r6, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r4, 0 adds r1, 0xB8 @@ -2761,4 +2761,4 @@ _0807722E: _08077238: .4byte gUnknown_80FC21C thumb_func_end sub_8077160 - .align 2, 0 \ No newline at end of file + .align 2, 0 diff --git a/asm/code_8077274.s b/asm/code_8077274.s index 46662f7a4..08a891836 100644 --- a/asm/code_8077274.s +++ b/asm/code_8077274.s @@ -594,7 +594,7 @@ _08077718: ldr r1, _0807775C adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xBD @@ -699,7 +699,7 @@ _080777EC: ldr r1, _08077848 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 mov r1, r8 adds r1, 0xAD @@ -837,7 +837,7 @@ sub_8077910: ldr r1, _08077964 adds r0, r5, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r4, r0, 0x1 _08077940: ldr r6, [r5, 0x70] @@ -987,7 +987,7 @@ _08077A5A: adds r0, r5, 0 ldr r1, _08077A7C movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 strb r0, [r4] b _08077A86 @@ -1116,7 +1116,7 @@ _08077B58: ldr r1, _08077B90 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xBD @@ -1181,7 +1181,7 @@ sub_8077BB4: ldr r1, _08077C20 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xBD @@ -1675,7 +1675,7 @@ _08077FE2: ldr r1, _08078018 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xD9 @@ -1845,7 +1845,7 @@ _08078134: ldr r1, _08078174 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xD9 @@ -2058,7 +2058,7 @@ sub_80782CC: ldr r1, _08078324 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xDD @@ -2117,7 +2117,7 @@ sub_8078348: ldr r1, _080783A0 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xDD @@ -2276,7 +2276,7 @@ _080784A8: ldr r1, _08078588 adds r0, r7, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 ldr r1, [sp, 0x1C] strb r0, [r1] @@ -2427,7 +2427,7 @@ _080785F6: ldr r1, _08078634 adds r0, r6, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xCB @@ -2537,7 +2537,7 @@ _080786C8: ldr r1, _08078744 adds r0, r6, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xCB @@ -2616,7 +2616,7 @@ sub_8078758: ldr r1, _080787C0 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xBD @@ -2740,7 +2740,7 @@ _08078884: ldr r1, _080788C4 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xE5 @@ -2805,7 +2805,7 @@ sub_80788E8: ldr r1, _08078944 adds r0, r5, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 strb r0, [r4] ldr r0, _08078948 @@ -2918,7 +2918,7 @@ _080789F0: ldr r1, _08078A30 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xBD @@ -3363,7 +3363,7 @@ sub_8078D8C: ldr r1, _08078DF4 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xED @@ -3498,7 +3498,7 @@ _08078ED4: ldr r1, _08078F44 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xE5 @@ -3575,7 +3575,7 @@ _08078F78: ldr r1, _08078FB8 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xE5 @@ -3812,7 +3812,7 @@ BlindTarget: ldr r1, _080791B4 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xE9 @@ -3889,7 +3889,7 @@ sub_80791D8: ldr r1, _08079250 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r7, 0 adds r1, 0xE9 @@ -3945,7 +3945,7 @@ RestoreVisionTarget: ldr r1, _080792D4 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xE9 @@ -4486,7 +4486,7 @@ _080796C6: ldr r1, _08079718 adds r0, r7, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r2, r5, 0 adds r2, 0xC1 @@ -4501,7 +4501,7 @@ _080796E4: ldr r1, _0807971C adds r0, r7, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC1 @@ -4637,7 +4637,7 @@ _080797E8: ldr r1, _0807982C adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xC5 @@ -4689,7 +4689,7 @@ sub_8079834: ldr r1, _0807988C adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -4748,7 +4748,7 @@ sub_80798B0: ldr r1, _08079908 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -4807,7 +4807,7 @@ sub_807992C: ldr r1, _08079984 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -4866,7 +4866,7 @@ sub_80799A8: ldr r1, _08079A00 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -4925,7 +4925,7 @@ sub_8079A24: ldr r1, _08079A7C adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -4984,7 +4984,7 @@ sub_8079AA0: ldr r1, _08079AF8 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5041,7 +5041,7 @@ sub_8079B1C: ldr r1, _08079B70 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5107,7 +5107,7 @@ sub_8079BA8: ldr r1, _08079C00 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5166,7 +5166,7 @@ sub_8079C24: ldr r1, _08079C7C adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5225,7 +5225,7 @@ sub_8079CA0: ldr r1, _08079CF8 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5299,7 +5299,7 @@ _08079D50: ldr r1, _08079D94 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r6, 0 adds r1, 0xC5 @@ -5358,7 +5358,7 @@ sub_8079DB8: ldr r1, _08079E10 adds r0, r4, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns adds r0, 0x1 adds r1, r5, 0 adds r1, 0xC5 @@ -5900,7 +5900,7 @@ _0807A228: ldr r1, _0807A250 adds r0, r5, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r2, 0x1 adds r0, r6, 0 diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index 56979bb93..ffe0b3ca1 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -485,7 +485,7 @@ sub_807EA30: ldr r1, _0807EA5C movs r0, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns ldr r1, _0807EA60 ldr r1, [r1] ldr r2, _0807EA64 @@ -505,7 +505,7 @@ _0807EA6C: ldr r1, _0807EA90 movs r0, 0 movs r2, 0 - bl sub_808417C + bl CalculateStatusTurns ldr r1, _0807EA94 ldr r1, [r1] ldr r2, _0807EA98 diff --git a/asm/code_807FCD4.s b/asm/code_807FCD4.s index 57c6f3e32..9d544c1d9 100644 --- a/asm/code_807FCD4.s +++ b/asm/code_807FCD4.s @@ -866,7 +866,7 @@ sub_8080388: ldr r1, _080803B0 adds r0, r4, 0 movs r2, 0x1 - bl sub_808417C + bl CalculateStatusTurns adds r2, r0, 0 adds r0, r5, 0 adds r1, r4, 0 @@ -6598,4 +6598,4 @@ sub_8083260: bx r0 thumb_func_end sub_8083260 - .align 2, 0 \ No newline at end of file + .align 2, 0 diff --git a/asm/code_808333C.s b/asm/code_808333C.s index 87beca7f9..239d7813a 100644 --- a/asm/code_808333C.s +++ b/asm/code_808333C.s @@ -5,99 +5,6 @@ .text - thumb_func_start InSameRoom_3 -InSameRoom_3: - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r1, 0 - ldrsh r0, [r4, r1] - movs r2, 0x2 - ldrsh r1, [r4, r2] - bl GetMapTile_1 - ldrb r2, [r0, 0x9] - cmp r2, 0xFF - beq _08083394 - ldr r1, _080833C4 - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - ldr r3, _080833C8 - adds r0, r3 - ldr r1, [r1] - adds r1, r0 - movs r6, 0x2 - ldrsh r0, [r1, r6] - subs r0, 0x1 - movs r2, 0 - ldrsh r3, [r5, r2] - cmp r0, r3 - bgt _08083394 - movs r6, 0x4 - ldrsh r0, [r1, r6] - subs r0, 0x1 - movs r6, 0x2 - ldrsh r2, [r5, r6] - cmp r0, r2 - bgt _08083394 - movs r6, 0x6 - ldrsh r0, [r1, r6] - adds r0, 0x1 - cmp r0, r3 - ble _08083394 - movs r3, 0x8 - ldrsh r0, [r1, r3] - adds r0, 0x1 - cmp r0, r2 - bgt _080833DE -_08083394: - movs r6, 0 - ldrsh r3, [r4, r6] - movs r0, 0 - ldrsh r2, [r5, r0] - movs r6, 0x2 - ldrsh r1, [r4, r6] - movs r6, 0x2 - ldrsh r0, [r5, r6] - subs r1, r0 - subs r3, r2 - cmp r3, 0 - bge _080833AE - negs r3, r3 -_080833AE: - cmp r1, 0 - bge _080833B4 - negs r1, r1 -_080833B4: - cmp r1, r3 - bge _080833BA - adds r1, r3, 0 -_080833BA: - cmp r1, 0x2 - ble _080833CC -_080833BE: - movs r0, 0 - b _080833E0 - .align 2, 0 -_080833C4: .4byte gDungeonGlobalData -_080833C8: .4byte 0x000104c4 -_080833CC: - cmp r1, 0x2 - bne _080833DE - adds r0, r4, 0 - adds r1, r5, 0 - bl IsTargetTwoTilesAway - lsls r0, 24 - cmp r0, 0 - beq _080833BE -_080833DE: - movs r0, 0x1 -_080833E0: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end InSameRoom_3 - thumb_func_start sub_80833E8 sub_80833E8: push {r4,r5,lr} diff --git a/asm/code_808417C.s b/asm/code_808417C.s index 8d0082f69..d6ef204cb 100644 --- a/asm/code_808417C.s +++ b/asm/code_808417C.s @@ -5,63 +5,6 @@ .text - thumb_func_start sub_808417C -sub_808417C: - push {r4-r6,lr} - adds r5, r0, 0 - lsls r2, 24 - lsrs r6, r2, 24 - movs r2, 0 - ldrsh r0, [r1, r2] - movs r2, 0x2 - ldrsh r1, [r1, r2] - bl DungeonRandomRange - adds r4, r0, 0 - adds r0, r5, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _080841DC - adds r0, r5, 0 - bl GetEntityType - cmp r0, 0x1 - bne _080841DC - cmp r6, 0 - beq _080841DC - adds r0, r5, 0 - movs r1, 0x12 - bl HasIQSkill - lsls r0, 24 - cmp r0, 0 - beq _080841C4 - cmp r4, 0x7F - beq _080841C4 - lsrs r0, r4, 31 - adds r0, r4, r0 - asrs r4, r0, 1 -_080841C4: - adds r0, r5, 0 - movs r1, 0x14 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _080841DC - cmp r4, 0x7F - beq _080841DC - cmp r4, 0x4 - ble _080841DC - movs r4, 0x5 -_080841DC: - cmp r4, 0 - bgt _080841E2 - movs r4, 0x1 -_080841E2: - adds r0, r4, 0 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808417C - thumb_func_start sub_80841EC sub_80841EC: push {r4-r6,lr} diff --git a/asm/code_80958E8.s b/asm/code_80958E8.s index 904f41c60..818d7db69 100644 --- a/asm/code_80958E8.s +++ b/asm/code_80958E8.s @@ -262,7 +262,7 @@ _08095D1C: add r0, r9 ldrb r7, [r0] adds r0, r7, 0 - bl sub_8090298 + bl GetDungeonFloorCount str r0, [sp, 0x58] lsrs r0, 31 ldr r2, [sp, 0x58] diff --git a/asm/code_8097318.s b/asm/code_8097318.s index d8acc0755..865ccfd24 100644 --- a/asm/code_8097318.s +++ b/asm/code_8097318.s @@ -5,29 +5,6 @@ .text - thumb_func_start sub_8097318 -sub_8097318: - push {lr} - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xD - bne _08097326 - movs r0, 0 - b _08097338 -_08097326: - lsls r2, r0, 16 - lsrs r2, 16 - movs r0, 0 - movs r1, 0x2B - bl sub_8001784 - cmp r0, 0 - beq _08097338 - movs r0, 0x1 -_08097338: - pop {r1} - bx r1 - thumb_func_end sub_8097318 - thumb_func_start sub_809733C sub_809733C: push {r4-r6,lr} diff --git a/asm/dungeon_2.s b/asm/dungeon_2.s index 20866660a..2090f6d0c 100644 --- a/asm/dungeon_2.s +++ b/asm/dungeon_2.s @@ -729,7 +729,7 @@ sub_80908D8: ldrb r0, [r0] b _0809090A .align 2, 0 -_08090900: .4byte gUnknown_81077A8 +_08090900: .4byte gDungeonFloorCount _08090904: .4byte gUnknown_8108084 _08090908: movs r0, 0x1 @@ -768,7 +768,7 @@ sub_8090910: b _08090956 .align 2, 0 _0809094C: .4byte 0x0000270f -_08090950: .4byte gUnknown_81077A8 +_08090950: .4byte gDungeonFloorCount _08090954: movs r0, 0x46 _08090956: diff --git a/asm/ground_event.s b/asm/ground_event.s index ba241ece2..adada8704 100644 --- a/asm/ground_event.s +++ b/asm/ground_event.s @@ -602,11 +602,11 @@ _080ADDE2: movs r4, 0x1 _080ADDE8: adds r0, r5, 0 - bl sub_8090298 + bl GetDungeonFloorCount cmp r4, r0 blt _080ADDFA adds r0, r5, 0 - bl sub_8090298 + bl GetDungeonFloorCount subs r4, r0, 0x1 _080ADDFA: ldr r2, [r6, 0x4] diff --git a/asm/ground_script.s b/asm/ground_script.s index 3a8bf35e1..d1927840a 100644 --- a/asm/ground_script.s +++ b/asm/ground_script.s @@ -3934,7 +3934,7 @@ _0809FAD4: negs r4, r4 _0809FAD8: adds r0, r1, 0 - bl sub_8090298 + bl GetDungeonFloorCount ldr r2, _0809FAF4 add r1, sp, 0x8 movs r3, 0x2 diff --git a/asm/rescue_password_menu.s b/asm/rescue_password_menu.s index 99e121103..f978ddec1 100644 --- a/asm/rescue_password_menu.s +++ b/asm/rescue_password_menu.s @@ -5,837 +5,6 @@ .text - thumb_func_start UpdateRescuePasswordMenu -UpdateRescuePasswordMenu: - push {r4-r6,lr} - sub sp, 0x34 - movs r0, 0xB - str r0, [sp, 0x30] - ldr r5, _08038AB4 - ldr r1, _08038AB8 - ldr r0, [r1] - ldr r0, [r0, 0x4] - adds r6, r1, 0 - cmp r0, 0x9 - bls _08038AA8 - b _08038DB0 -_08038AA8: - lsls r0, 2 - ldr r1, _08038ABC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08038AB4: .4byte 0x0000ffdc -_08038AB8: .4byte gRescuePasswordMenu -_08038ABC: .4byte _08038AC0 - .align 2, 0 -_08038AC0: - .4byte _08038AE8 - .4byte _08038AFC - .4byte _08038AE8 - .4byte _08038AFC - .4byte _08038AE8 - .4byte _08038AFC - .4byte _08038C78 - .4byte _08038C8C - .4byte _08038CC2 - .4byte _08038D38 -_08038AE8: - bl sub_8031DCC - ldr r5, _08038AF8 - cmp r0, 0 - bne _08038AF4 - b _08038DB0 -_08038AF4: - movs r5, 0xB - b _08038DB0 - .align 2, 0 -_08038AF8: .4byte 0x0000ffdc -_08038AFC: - bl sub_80154F0 - adds r4, r0, 0 - mov r0, sp - movs r1, 0 - movs r2, 0x30 - bl MemoryFill8 - cmp r4, 0x1 - bne _08038B12 - b _08038CBC -_08038B12: - cmp r4, 0x1 - bcs _08038B18 - b _08038CB0 -_08038B18: - cmp r4, 0x2 - beq _08038AF4 - cmp r4, 0x3 - beq _08038B22 - b _08038DB0 -_08038B22: - ldr r0, _08038B44 - ldr r0, [r0] - ldr r0, [r0] - ldr r1, _08038B48 - mov r2, sp - bl sub_8039068 - subs r0, 0x7 - cmp r0, 0x11 - bls _08038B38 - b _08038DB0 -_08038B38: - lsls r0, 2 - ldr r1, _08038B4C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08038B44: .4byte gRescuePasswordMenu -_08038B48: .4byte gUnknown_202EC50 -_08038B4C: .4byte _08038B50 - .align 2, 0 -_08038B50: - .4byte _08038BA4 - .4byte _08038DB0 - .4byte _08038BD8 - .4byte _08038DB0 - .4byte _08038C28 - .4byte _08038DB0 - .4byte _08038B9C - .4byte _08038DB0 - .4byte _08038DB0 - .4byte _08038DB0 - .4byte _08038B98 - .4byte _08038BA0 - .4byte _08038BD4 - .4byte _08038C24 - .4byte _08038DB0 - .4byte _08038BA8 - .4byte _08038BDC - .4byte _08038C2C -_08038B98: - movs r0, 0x11 - b _08038CA4 -_08038B9C: - movs r0, 0xD - b _08038CA4 -_08038BA0: - movs r0, 0x12 - b _08038CA4 -_08038BA4: - movs r0, 0x7 - b _08038CA4 -_08038BA8: - ldr r0, [sp, 0x10] - bl sub_8095274 - bl sub_8038F98 - ldr r0, _08038BCC - ldr r1, [r0] - movs r0, 0x9 - str r0, [r1, 0x4] - ldr r5, _08038BD0 - mov r1, sp - movs r0, 0x2 - strb r0, [r1] - mov r0, sp - bl sub_80951BC - b _08038DB0 - .align 2, 0 -_08038BCC: .4byte gRescuePasswordMenu -_08038BD0: .4byte 0x0000ffdc -_08038BD4: - movs r0, 0x13 - b _08038CA4 -_08038BD8: - movs r0, 0x9 - b _08038CA4 -_08038BDC: - bl sub_8038F98 - ldr r0, _08038C18 - ldr r1, [r0] - movs r0, 0x9 - str r0, [r1, 0x4] - ldr r5, _08038C1C - mov r1, sp - movs r0, 0x5 - strb r0, [r1] - mov r0, sp - bl sub_80951FC - ldr r1, [sp, 0x10] - movs r0, 0x1 - bl sub_809539C - lsls r0, 24 - lsrs r0, 24 - bl sub_8095228 - movs r1, 0x7 - strb r1, [r0] - ldr r0, _08038C20 - movs r1, 0 - movs r2, 0x5C - bl MemoryFill8 - b _08038DB0 - .align 2, 0 -_08038C18: .4byte gRescuePasswordMenu -_08038C1C: .4byte 0x0000ffdc -_08038C20: .4byte gUnknown_203B484 -_08038C24: - movs r0, 0x14 - b _08038CA4 -_08038C28: - movs r0, 0xB - b _08038CA4 -_08038C2C: - bl sub_8038F98 - ldr r0, _08038C70 - ldr r1, [r0] - movs r0, 0x9 - str r0, [r1, 0x4] - ldr r5, _08038C74 - ldr r1, [sp, 0x10] - movs r0, 0x4 - bl sub_809539C - lsls r0, 24 - lsrs r0, 24 - bl sub_8095228 - adds r2, r0, 0 - mov r1, sp - ldm r1!, {r3,r4,r6} - stm r2!, {r3,r4,r6} - ldm r1!, {r3,r4,r6} - stm r2!, {r3,r4,r6} - ldm r1!, {r3,r4,r6} - stm r2!, {r3,r4,r6} - ldm r1!, {r3,r4,r6} - stm r2!, {r3,r4,r6} - movs r1, 0x6 - strb r1, [r0] - bl GetMainMenu - adds r0, 0x3A - movs r1, 0x1 - strb r1, [r0] - b _08038DB0 - .align 2, 0 -_08038C70: .4byte gRescuePasswordMenu -_08038C74: .4byte 0x0000ffdc -_08038C78: - bl sub_8031DCC - ldr r5, _08038C88 - cmp r0, 0 - bne _08038C84 - b _08038DB0 -_08038C84: - movs r5, 0xD - b _08038DB0 - .align 2, 0 -_08038C88: .4byte 0x0000ffdc -_08038C8C: - bl sub_80154F0 - cmp r0, 0x1 - beq _08038CBC - cmp r0, 0x1 - bcc _08038CB0 - cmp r0, 0x2 - beq _08038C84 - cmp r0, 0x3 - beq _08038CA2 - b _08038DB0 -_08038CA2: - movs r0, 0x15 -_08038CA4: - bl sub_8038DC0 - ldr r0, _08038CB4 - ldr r1, [r0] - movs r0, 0x8 - str r0, [r1, 0x4] -_08038CB0: - ldr r5, _08038CB8 - b _08038DB0 - .align 2, 0 -_08038CB4: .4byte gRescuePasswordMenu -_08038CB8: .4byte 0x0000ffdc -_08038CBC: - bl sub_8031E00 - b _08038CB0 -_08038CC2: - ldr r0, [r6] - adds r0, 0x8 - bl sub_8012FD8 - lsls r0, 24 - cmp r0, 0 - bne _08038CDA - ldr r0, [r6] - adds r0, 0x8 - add r1, sp, 0x30 - bl sub_8013114 -_08038CDA: - ldr r0, [sp, 0x30] - cmp r0, 0xB - beq _08038D24 - cmp r0, 0xB - bhi _08038CEA - cmp r0, 0xA - beq _08038CEE - b _08038DB0 -_08038CEA: - cmp r0, 0xC - bne _08038DB0 -_08038CEE: - bl sub_8039174 - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - ldr r1, _08038D1C - movs r0, 0x4 - bl sub_80151C0 - ldr r0, _08038D20 - ldr r1, [r0] - movs r0, 0x8 - str r0, [r1, 0x4] - ldr r0, [r1] - subs r0, 0x21 - movs r5, 0xB - cmp r0, 0x1 - bhi _08038DB0 - b _08038C84 - .align 2, 0 -_08038D1C: .4byte gUnknown_202EC50 -_08038D20: .4byte gRescuePasswordMenu -_08038D24: - ldr r1, [r6] - movs r0, 0x8 - str r0, [r1, 0x4] - ldr r5, _08038D34 - bl sub_80391F8 - b _08038DB0 - .align 2, 0 -_08038D34: .4byte 0x0000ffdc -_08038D38: - adds r4, r6, 0 - ldr r0, [r4] - adds r0, 0x8 - bl sub_8012FD8 - lsls r0, 24 - cmp r0, 0 - bne _08038D52 - ldr r0, [r4] - adds r0, 0x8 - add r1, sp, 0x30 - bl sub_8013114 -_08038D52: - ldr r0, [sp, 0x30] - cmp r0, 0xB - beq _08038DA4 - cmp r0, 0xB - bhi _08038D62 - cmp r0, 0xA - beq _08038D66 - b _08038DB0 -_08038D62: - cmp r0, 0xC - bne _08038DB0 -_08038D66: - bl sub_8039174 - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - ldr r1, _08038D9C - movs r0, 0x4 - bl sub_80151C0 - ldr r4, _08038DA0 - ldr r0, [r4] - ldr r0, [r0] - bl ConvertMenutoRescuePasswordState - ldr r1, [r4] - str r0, [r1, 0x4] - ldr r0, [r1] - subs r0, 0x21 - movs r5, 0x2A - cmp r0, 0x1 - bhi _08038DB0 - movs r5, 0x2B - b _08038DB0 - .align 2, 0 -_08038D9C: .4byte gUnknown_202EC50 -_08038DA0: .4byte gRescuePasswordMenu -_08038DA4: - ldr r1, [r6] - movs r0, 0x9 - str r0, [r1, 0x4] - ldr r5, _08038DBC - bl sub_80391F8 -_08038DB0: - adds r0, r5, 0 - add sp, 0x34 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_08038DBC: .4byte 0x0000ffdc - thumb_func_end UpdateRescuePasswordMenu - - thumb_func_start sub_8038DC0 -sub_8038DC0: - push {r4,lr} - sub sp, 0x10 - adds r4, r0, 0 - ldr r0, _08038DF8 - ldr r0, [r0] - movs r1, 0xD4 - lsls r1, 1 - adds r0, r1 - bl sub_8006518 - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - bl sub_80155F0 - subs r0, r4, 0x7 - cmp r0, 0xE - bls _08038DEE - b _08038F74 -_08038DEE: - lsls r0, 2 - ldr r1, _08038DFC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08038DF8: .4byte gRescuePasswordMenu -_08038DFC: .4byte _08038E00 - .align 2, 0 -_08038E00: - .4byte _08038E7C - .4byte _08038F74 - .4byte _08038EDC - .4byte _08038F74 - .4byte _08038F1C - .4byte _08038F74 - .4byte _08038E9C - .4byte _08038F74 - .4byte _08038F74 - .4byte _08038F74 - .4byte _08038E3C - .4byte _08038E5C - .4byte _08038EBC - .4byte _08038EFC - .4byte _08038F50 -_08038E3C: - ldr r0, _08038E50 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038E54 - ldr r2, _08038E58 - b _08038F2E - .align 2, 0 -_08038E50: .4byte gRescuePasswordMenu -_08038E54: .4byte gUnknown_80E71FC -_08038E58: .4byte gUnknown_80E7214 -_08038E5C: - ldr r0, _08038E70 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038E74 - ldr r2, _08038E78 - b _08038F2E - .align 2, 0 -_08038E70: .4byte gRescuePasswordMenu -_08038E74: .4byte gUnknown_80E72EC -_08038E78: .4byte gUnknown_80E7304 -_08038E7C: - ldr r0, _08038E90 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038E94 - ldr r2, _08038E98 - b _08038F2E - .align 2, 0 -_08038E90: .4byte gRescuePasswordMenu -_08038E94: .4byte gUnknown_80E7344 -_08038E98: .4byte gUnknown_80E735C -_08038E9C: - ldr r0, _08038EB0 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038EB4 - ldr r2, _08038EB8 - b _08038F2E - .align 2, 0 -_08038EB0: .4byte gRescuePasswordMenu -_08038EB4: .4byte gUnknown_80E7588 -_08038EB8: .4byte gUnknown_80E75A0 -_08038EBC: - ldr r0, _08038ED0 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038ED4 - ldr r2, _08038ED8 - b _08038F2E - .align 2, 0 -_08038ED0: .4byte gRescuePasswordMenu -_08038ED4: .4byte gUnknown_80E73AC -_08038ED8: .4byte gUnknown_80E73C4 -_08038EDC: - ldr r0, _08038EF0 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038EF4 - ldr r2, _08038EF8 - b _08038F2E - .align 2, 0 -_08038EF0: .4byte gRescuePasswordMenu -_08038EF4: .4byte gUnknown_80E7408 -_08038EF8: .4byte gUnknown_80E7420 -_08038EFC: - ldr r0, _08038F10 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038F14 - ldr r2, _08038F18 - b _08038F2E - .align 2, 0 -_08038F10: .4byte gRescuePasswordMenu -_08038F14: .4byte gUnknown_80E7468 -_08038F18: .4byte gUnknown_80E7480 -_08038F1C: - ldr r0, _08038F44 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038F48 - ldr r2, _08038F4C -_08038F2E: - str r2, [sp] - movs r4, 0 - str r4, [sp, 0x4] - movs r2, 0xD - str r2, [sp, 0x8] - str r4, [sp, 0xC] - movs r2, 0 - bl SetMenuItems - b _08038F74 - .align 2, 0 -_08038F44: .4byte gRescuePasswordMenu -_08038F48: .4byte gUnknown_80E74C8 -_08038F4C: .4byte gUnknown_80E74E0 -_08038F50: - ldr r0, _08038F8C - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038F90 - ldr r2, _08038F94 - str r2, [sp] - movs r4, 0 - str r4, [sp, 0x4] - movs r2, 0xD - str r2, [sp, 0x8] - str r4, [sp, 0xC] - movs r2, 0 - bl SetMenuItems -_08038F74: - ldr r0, _08038F8C - ldr r0, [r0] - adds r0, 0x8 - movs r1, 0 - movs r2, 0x1 - bl sub_8035CF4 - add sp, 0x10 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08038F8C: .4byte gRescuePasswordMenu -_08038F90: .4byte gUnknown_80E752C -_08038F94: .4byte gUnknown_80E7544 - thumb_func_end sub_8038DC0 - - thumb_func_start sub_8038F98 -sub_8038F98: - push {r4,r5,lr} - sub sp, 0x10 - ldr r5, _08038FF4 - ldr r0, [r5] - movs r1, 0xD4 - lsls r1, 1 - adds r0, r1 - bl sub_8006518 - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - bl sub_80155F0 - ldr r1, [r5] - adds r0, r1, 0 - adds r0, 0x8 - movs r2, 0xA4 - lsls r2, 1 - adds r1, r2 - ldr r3, _08038FF8 - ldr r2, _08038FFC - str r2, [sp] - movs r4, 0 - str r4, [sp, 0x4] - movs r2, 0xD - str r2, [sp, 0x8] - str r4, [sp, 0xC] - movs r2, 0 - bl SetMenuItems - ldr r0, [r5] - adds r0, 0x8 - movs r1, 0 - movs r2, 0x1 - bl sub_8035CF4 - add sp, 0x10 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08038FF4: .4byte gRescuePasswordMenu -_08038FF8: .4byte gUnknown_80E7278 -_08038FFC: .4byte gUnknown_80E7290 - thumb_func_end sub_8038F98 - - thumb_func_start ConvertMenutoRescuePasswordState -ConvertMenutoRescuePasswordState: - push {lr} - movs r1, 0xB - ldr r0, _0803901C - ldr r0, [r0] - ldr r0, [r0] - subs r0, 0x1B - cmp r0, 0x7 - bhi _08039062 - lsls r0, 2 - ldr r1, _08039020 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0803901C: .4byte gRescuePasswordMenu -_08039020: .4byte _08039024 - .align 2, 0 -_08039024: - .4byte _08039044 - .4byte _08039054 - .4byte _0803904C - .4byte _0803905C - .4byte _08039048 - .4byte _08039058 - .4byte _08039050 - .4byte _08039060 -_08039044: - movs r1, 0 - b _08039062 -_08039048: - movs r1, 0x4 - b _08039062 -_0803904C: - movs r1, 0x2 - b _08039062 -_08039050: - movs r1, 0x6 - b _08039062 -_08039054: - movs r1, 0x1 - b _08039062 -_08039058: - movs r1, 0x5 - b _08039062 -_0803905C: - movs r1, 0x3 - b _08039062 -_08039060: - movs r1, 0x7 -_08039062: - adds r0, r1, 0 - pop {r1} - bx r1 - thumb_func_end ConvertMenutoRescuePasswordState - - thumb_func_start sub_8039068 -sub_8039068: - push {r4-r6,lr} - adds r6, r0, 0 - adds r0, r1, 0 - adds r5, r2, 0 - adds r1, r5, 0 - bl sub_803D204 - lsls r0, 24 - cmp r0, 0 - beq _080390AC - ldrb r0, [r5] - cmp r0, 0x7 - bhi _080390AC - ldrb r4, [r5, 0x5] - ldrb r0, [r5, 0x4] - bl sub_8090298 - cmp r4, r0 - bge _080390AC - movs r0, 0xC - ldrsh r1, [r5, r0] - cmp r1, 0 - beq _080390AC - ldr r0, _080390B0 - cmp r1, r0 - bgt _080390AC - adds r0, r5, 0 - adds r0, 0x22 - ldrb r0, [r0] - bl IsInvalidItemReward - lsls r0, 24 - cmp r0, 0 - beq _080390B4 -_080390AC: - movs r0, 0x11 - b _0803916E - .align 2, 0 -_080390B0: .4byte 0x000001a7 -_080390B4: - cmp r6, 0x1E - beq _08039120 - cmp r6, 0x1E - bhi _080390C2 - cmp r6, 0x1C - beq _080390C8 - b _0803916A -_080390C2: - cmp r6, 0x20 - beq _08039140 - b _0803916A -_080390C8: - ldrb r0, [r5] - cmp r0, 0x1 - beq _080390D2 - movs r0, 0x12 - b _0803916E -_080390D2: - ldr r1, [r5, 0x10] - movs r0, 0x2 - bl sub_80952F0 - lsls r0, 24 - cmp r0, 0 - bne _08039108 - ldr r1, [r5, 0x10] - movs r0, 0x4 - bl sub_80952F0 - lsls r0, 24 - cmp r0, 0 - bne _08039108 - ldr r1, [r5, 0x10] - movs r0, 0x6 - bl sub_80952F0 - lsls r0, 24 - cmp r0, 0 - bne _08039108 - ldr r0, [r5, 0x10] - bl sub_8095298 - lsls r0, 24 - cmp r0, 0 - beq _0803910C -_08039108: - movs r0, 0x7 - b _0803916E -_0803910C: - bl sub_8095190 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - bne _0803911C - movs r0, 0xD - b _0803916E -_0803911C: - movs r0, 0x16 - b _0803916E -_08039120: - ldrb r0, [r5] - cmp r0, 0x4 - beq _0803912A - movs r0, 0x13 - b _0803916E -_0803912A: - ldr r1, [r5, 0x10] - movs r0, 0x1 - bl sub_80952F0 - lsls r0, 24 - cmp r0, 0 - bne _0803913C - movs r0, 0x9 - b _0803916E -_0803913C: - movs r0, 0x17 - b _0803916E -_08039140: - ldrb r0, [r5] - cmp r0, 0x5 - beq _0803914A - movs r0, 0x14 - b _0803916E -_0803914A: - ldr r1, [r5, 0x10] - movs r0, 0x4 - bl sub_80952F0 - lsls r0, 24 - cmp r0, 0 - beq _08039162 - bl sub_8011C34 - ldr r1, [r5, 0x28] - cmp r1, r0 - beq _08039166 -_08039162: - movs r0, 0xB - b _0803916E -_08039166: - movs r0, 0x18 - b _0803916E -_0803916A: - movs r0, 0x1 - negs r0, r0 -_0803916E: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8039068 - thumb_func_start sub_8039174 sub_8039174: push {r4,lr} diff --git a/asm/wonder_mail_4.s b/asm/wonder_mail_4.s index c4c2ccdeb..404c7cfde 100644 --- a/asm/wonder_mail_4.s +++ b/asm/wonder_mail_4.s @@ -618,947 +618,4 @@ _08030D36: _08030D3C: .4byte gUnknown_203B480 thumb_func_end sub_8030C20 - thumb_func_start sub_8030D40 -sub_8030D40: - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r6, _08030D98 - movs r0, 0x78 - movs r1, 0x8 - bl MemoryAlloc - str r0, [r6] - strb r4, [r0, 0xC] - ldr r0, [r6] - bl sub_801317C - ldr r0, [r6] - str r5, [r0, 0x10] - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 3 - adds r1, 0x18 - adds r1, r0, r1 - str r1, [r0, 0x14] - adds r0, 0x18 - bl sub_8006518 - ldr r1, [r6] - ldr r2, [r1, 0x10] - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 3 - adds r1, r0 - adds r1, 0x18 - ldr r0, _08030D9C - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - bl sub_8030DD4 - movs r0, 0x1 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_08030D98: .4byte gUnknown_203B324 -_08030D9C: .4byte gUnknown_80E091C - thumb_func_end sub_8030D40 - - thumb_func_start sub_8030DA0 -sub_8030DA0: - push {lr} - ldr r0, _08030DC0 - ldr r0, [r0] - ldr r1, [r0, 0x10] - bl sub_8012A64 - cmp r0, 0x1 - beq _08030DC4 - cmp r0, 0x2 - bne _08030DCE - movs r0, 0x1 - bl PlayMenuSoundEffect - movs r0, 0x2 - b _08030DD0 - .align 2, 0 -_08030DC0: .4byte gUnknown_203B324 -_08030DC4: - movs r0, 0 - bl PlayMenuSoundEffect - movs r0, 0x3 - b _08030DD0 -_08030DCE: - movs r0, 0 -_08030DD0: - pop {r1} - bx r1 - thumb_func_end sub_8030DA0 - - thumb_func_start sub_8030DD4 -sub_8030DD4: - push {lr} - bl sub_8030E2C - bl sub_8030E48 - pop {r0} - bx r0 - thumb_func_end sub_8030DD4 - - thumb_func_start sub_8030DE4 -sub_8030DE4: - push {r4,r5,lr} - ldr r4, _08030E24 - ldr r2, [r4] - cmp r2, 0 - beq _08030E1E - ldr r0, [r2, 0x10] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 3 - adds r1, r2, r1 - adds r1, 0x18 - ldr r0, _08030E28 - ldm r0!, {r2,r3,r5} - stm r1!, {r2,r3,r5} - ldm r0!, {r2,r3,r5} - stm r1!, {r2,r3,r5} - bl ResetUnusedInputStruct - ldr r0, [r4] - adds r0, 0x18 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - ldr r0, [r4] - bl MemoryFree - movs r0, 0 - str r0, [r4] -_08030E1E: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08030E24: .4byte gUnknown_203B324 -_08030E28: .4byte gUnknown_80E0900 - thumb_func_end sub_8030DE4 - - thumb_func_start sub_8030E2C -sub_8030E2C: - push {lr} - bl ResetUnusedInputStruct - ldr r0, _08030E44 - ldr r0, [r0] - adds r0, 0x18 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - pop {r0} - bx r0 - .align 2, 0 -_08030E44: .4byte gUnknown_203B324 - thumb_func_end sub_8030E2C - - thumb_func_start sub_8030E48 -sub_8030E48: - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x15C - ldr r3, _08030EA8 - ldr r4, _08030EAC - ldr r2, [r4] - ldrb r1, [r2, 0xC] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 4 - ldr r1, [r3] - adds r5, r1, r0 - ldr r0, [r2, 0x10] - bl sub_80073B8 - ldr r0, [r4] - ldr r0, [r0, 0x10] - str r0, [sp, 0x4] - add r1, sp, 0x44 - movs r2, 0 - movs r0, 0x7 - strb r0, [r1] - mov r0, sp - adds r0, 0x46 - strb r2, [r0] - add r0, sp, 0x48 - strb r2, [r0] - adds r0, r5, 0x4 - str r0, [sp, 0xC] - adds r0, 0x10 - str r0, [sp, 0x10] - add r1, sp, 0x4 - ldrh r0, [r5, 0xC] - strh r0, [r1, 0x10] - ldrh r0, [r5, 0xC] - strh r0, [r1, 0x12] - adds r0, r1, 0 - strb r2, [r0, 0x14] - adds r2, r5, 0 - adds r2, 0x22 - ldrb r0, [r2] - cmp r0, 0 - bne _08030EB0 - adds r1, 0x2E - movs r0, 0x5 - strb r0, [r1] - b _08030EBE - .align 2, 0 -_08030EA8: .4byte gUnknown_203B480 -_08030EAC: .4byte gUnknown_203B324 -_08030EB0: - mov r1, sp - adds r1, 0x32 - movs r0, 0x2 - strb r0, [r1] - ldrb r1, [r2] - add r0, sp, 0x38 - strb r1, [r0] -_08030EBE: - ldrb r0, [r5] - cmp r0, 0x2 - beq _08030ED2 - cmp r0, 0x2 - ble _08030EE2 - cmp r0, 0x4 - beq _08030ED2 - cmp r0, 0x5 - beq _08030EDA - b _08030EE2 -_08030ED2: - mov r1, sp - adds r1, 0x45 - movs r0, 0xA - b _08030EE8 -_08030EDA: - mov r1, sp - adds r1, 0x45 - movs r0, 0xB - b _08030EE8 -_08030EE2: - mov r1, sp - adds r1, 0x45 - movs r0, 0x9 -_08030EE8: - strb r0, [r1] - add r0, sp, 0x4 - bl CreateRescueDescription - ldrh r0, [r5, 0x10] - ldr r1, _08030F48 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - ldr r2, _08030F4C - ldr r5, _08030F50 - ldr r0, [r5] - ldr r3, [r0, 0x10] - movs r0, 0 - mov r8, r0 - str r0, [sp] - movs r0, 0xA - movs r1, 0x68 - bl xxx_call_draw_string - add r6, sp, 0x5C - ldr r1, _08030F54 - adds r0, r6, 0 - adds r2, r4, 0 - bl sprintf_2 - ldr r0, [r5] - ldr r3, [r0, 0x10] - mov r0, r8 - str r0, [sp] - movs r0, 0x44 - movs r1, 0x68 - adds r2, r6, 0 - bl xxx_call_draw_string - ldr r0, [r5] - ldr r0, [r0, 0x10] - bl sub_80073E0 - add sp, 0x15C - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08030F48: .4byte 0x00002710 -_08030F4C: .4byte gUnknown_80E0934 -_08030F50: .4byte gUnknown_203B324 -_08030F54: .4byte gUnknown_80E0938 - thumb_func_end sub_8030E48 - - thumb_func_start sub_8030F58 -sub_8030F58: - push {r4-r6,lr} - adds r6, r0, 0 - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - ldr r5, _08030FF4 - ldr r0, [r5] - cmp r0, 0 - bne _08030F88 - movs r4, 0x8E - lsls r4, 1 - adds r0, r4, 0 - movs r1, 0x8 - bl MemoryAlloc - str r0, [r5] - movs r1, 0 - adds r2, r4, 0 - bl MemoryFill8 -_08030F88: - ldr r0, [r5] - movs r1, 0x8C - lsls r1, 1 - adds r0, r1 - str r6, [r0] - movs r0, 0x98 - lsls r0, 1 - bl GetDialogueSpriteDataPtr - ldr r2, [r5] - movs r4, 0x84 - lsls r4, 1 - adds r1, r2, r4 - str r0, [r1] - movs r3, 0x86 - lsls r3, 1 - adds r1, r2, r3 - ldr r0, [r0, 0x4] - str r0, [r1] - movs r0, 0x8A - lsls r0, 1 - adds r2, r0 - movs r1, 0 - strb r1, [r2] - ldr r0, [r5] - ldr r2, _08030FF8 - adds r0, r2 - strb r1, [r0] - ldr r0, [r5] - adds r3, 0xA - adds r0, r3 - strb r1, [r0] - ldr r2, [r5] - movs r0, 0x88 - lsls r0, 1 - adds r1, r2, r0 - movs r0, 0x2 - strh r0, [r1] - subs r3, 0x4 - adds r1, r2, r3 - movs r0, 0x8 - strh r0, [r1] - adds r0, r6, 0 - bl sub_8030C20 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _08031038 - cmp r6, 0x2 - beq _08030FFC - cmp r6, 0x4 - beq _08031014 - b _08031022 - .align 2, 0 -_08030FF4: .4byte gUnknown_203B328 -_08030FF8: .4byte 0x00000115 -_08030FFC: - ldr r0, _0803100C - ldr r2, [r5] - adds r2, r4 - ldr r3, _08031010 - movs r1, 0 - bl sub_80141B4 - b _08031022 - .align 2, 0 -_0803100C: .4byte gUnknown_80E09D8 -_08031010: .4byte 0x00000101 -_08031014: - ldr r0, _0803102C - ldr r2, [r5] - adds r2, r4 - ldr r3, _08031030 - movs r1, 0 - bl sub_80141B4 -_08031022: - ldr r0, _08031034 - ldr r1, [r0] - movs r0, 0x5 - str r0, [r1] - b _08031048 - .align 2, 0 -_0803102C: .4byte gUnknown_80E0A0C -_08031030: .4byte 0x00000101 -_08031034: .4byte gUnknown_203B328 -_08031038: - ldr r0, [r5] - str r1, [r0] - adds r0, r6, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0x8 - bl sub_80306A8 -_08031048: - movs r0, 0x1 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8030F58 - - thumb_func_start sub_8031050 -sub_8031050: - push {lr} - ldr r1, _08031068 - ldr r0, [r1] - ldr r0, [r0] - adds r2, r1, 0 - cmp r0, 0x6 - bhi _080310AC - lsls r0, 2 - ldr r1, _0803106C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08031068: .4byte gUnknown_203B328 -_0803106C: .4byte _08031070 - .align 2, 0 -_08031070: - .4byte _0803108C - .4byte _08031092 - .4byte _08031098 - .4byte _08031098 - .4byte _080310A2 - .4byte _080310A8 - .4byte _080310A8 -_0803108C: - bl sub_8031300 - b _080310AC -_08031092: - bl sub_803136C - b _080310AC -_08031098: - ldr r0, [r2] - ldr r0, [r0] - bl sub_80313D8 - b _080310AC -_080310A2: - bl sub_8031498 - b _080310AC -_080310A8: - movs r0, 0x3 - b _080310AE -_080310AC: - movs r0, 0 -_080310AE: - pop {r1} - bx r1 - thumb_func_end sub_8031050 - - thumb_func_start sub_80310B4 -sub_80310B4: - push {r4,lr} - bl sub_803084C - ldr r4, _080310E0 - ldr r0, [r4] - cmp r0, 0 - beq _080310D8 - movs r1, 0x84 - lsls r1, 1 - adds r0, r1 - ldr r0, [r0] - bl CloseFile - ldr r0, [r4] - bl MemoryFree - movs r0, 0 - str r0, [r4] -_080310D8: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080310E0: .4byte gUnknown_203B328 - thumb_func_end sub_80310B4 - - thumb_func_start sub_80310E4 -sub_80310E4: - push {lr} - ldr r1, _080310F8 - ldr r1, [r1] - str r0, [r1] - bl sub_80310FC - bl sub_8031258 - pop {r0} - bx r0 - .align 2, 0 -_080310F8: .4byte gUnknown_203B328 - thumb_func_end sub_80310E4 - - thumb_func_start sub_80310FC -sub_80310FC: - push {r4-r6,lr} - ldr r4, _0803111C - ldr r0, [r4] - adds r0, 0xA8 - bl sub_8006518 - ldr r0, [r4] - ldr r0, [r0] - cmp r0, 0x6 - bls _08031112 - b _0803122C -_08031112: - lsls r0, 2 - ldr r1, _08031120 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0803111C: .4byte gUnknown_203B328 -_08031120: .4byte _08031124 - .align 2, 0 -_08031124: - .4byte _08031140 - .4byte _08031178 - .4byte _080311C0 - .4byte _080311C0 - .4byte _080311E8 - .4byte _0803122C - .4byte _0803122C -_08031140: - ldr r3, _08031170 - ldr r1, [r3] - ldr r2, _08031174 - adds r1, 0xC0 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r1, [r3] - adds r1, 0xD8 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r0, [r3] - adds r0, 0xF0 - ldm r2!, {r1,r3,r4} - stm r0!, {r1,r3,r4} - ldm r2!, {r1,r5,r6} - stm r0!, {r1,r5,r6} - b _0803123A - .align 2, 0 -_08031170: .4byte gUnknown_203B328 -_08031174: .4byte gUnknown_80E0990 -_08031178: - ldr r3, _080311B0 - ldr r1, [r3] - adds r1, 0xC0 - ldr r0, _080311B4 - ldm r0!, {r2,r4,r5} - stm r1!, {r2,r4,r5} - ldm r0!, {r2,r4,r6} - stm r1!, {r2,r4,r6} - ldr r1, [r3] - ldr r2, _080311B8 - adds r1, 0xD8 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r0, [r3] - adds r0, 0xF0 - ldm r2!, {r1,r5,r6} - stm r0!, {r1,r5,r6} - ldm r2!, {r4-r6} - stm r0!, {r4-r6} - ldr r0, [r3] - adds r0, 0xC0 - ldr r1, _080311BC - bl sub_8012CAC - b _0803123A - .align 2, 0 -_080311B0: .4byte gUnknown_203B328 -_080311B4: .4byte gUnknown_80E09A8 -_080311B8: .4byte gUnknown_80E0990 -_080311BC: .4byte gUnknown_80E0968 -_080311C0: - ldr r2, _080311DC - ldr r1, [r2] - adds r1, 0xD8 - ldr r0, _080311E0 - ldm r0!, {r3-r5} - stm r1!, {r3-r5} - ldm r0!, {r3,r4,r6} - stm r1!, {r3,r4,r6} - ldr r0, [r2] - adds r0, 0xD8 - ldr r1, _080311E4 - bl sub_8012CAC - b _0803123A - .align 2, 0 -_080311DC: .4byte gUnknown_203B328 -_080311E0: .4byte gUnknown_80E09C0 -_080311E4: .4byte gUnknown_80E0948 -_080311E8: - ldr r3, _08031224 - ldr r1, [r3] - ldr r2, _08031228 - adds r1, 0xA8 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r1, [r3] - adds r1, 0xC0 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r1, [r3] - adds r1, 0xD8 - adds r0, r2, 0 - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldm r0!, {r4-r6} - stm r1!, {r4-r6} - ldr r0, [r3] - adds r0, 0xF0 - ldm r2!, {r1,r5,r6} - stm r0!, {r1,r5,r6} - ldm r2!, {r3-r5} - stm r0!, {r3-r5} - b _0803123A - .align 2, 0 -_08031224: .4byte gUnknown_203B328 -_08031228: .4byte gUnknown_80E0990 -_0803122C: - bl ResetUnusedInputStruct - movs r0, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C -_0803123A: - bl ResetUnusedInputStruct - ldr r0, _08031254 - ldr r0, [r0] - adds r0, 0xA8 - movs r1, 0x1 - movs r2, 0x1 - bl sub_800641C - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08031254: .4byte gUnknown_203B328 - thumb_func_end sub_80310FC - - thumb_func_start sub_8031258 -sub_8031258: - push {r4,lr} - sub sp, 0x8 - ldr r1, _08031274 - ldr r0, [r1] - ldr r0, [r0] - adds r2, r1, 0 - cmp r0, 0x6 - bhi _080312F6 - lsls r0, 2 - ldr r1, _08031278 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08031274: .4byte gUnknown_203B328 -_08031278: .4byte _0803127C - .align 2, 0 -_0803127C: - .4byte _08031298 - .4byte _080312A0 - .4byte _080312BC - .4byte _080312BC - .4byte _080312EC - .4byte _080312F6 - .4byte _080312F6 -_08031298: - movs r0, 0x1 - bl sub_8030810 - b _080312F6 -_080312A0: - bl sub_803092C - ldr r0, _080312B4 - ldr r0, [r0] - adds r0, 0x8 - ldr r1, _080312B8 - movs r2, 0x4 - str r2, [sp] - movs r2, 0x1 - b _080312D8 - .align 2, 0 -_080312B4: .4byte gUnknown_203B328 -_080312B8: .4byte gUnknown_80E0968 -_080312BC: - bl sub_803092C - ldr r4, _080312E4 - ldr r0, [r4] - adds r0, 0x8 - movs r1, 0 - bl sub_8012EA4 - ldr r0, [r4] - adds r0, 0x58 - ldr r1, _080312E8 - movs r2, 0x3 - str r2, [sp] - movs r2, 0x2 -_080312D8: - str r2, [sp, 0x4] - movs r2, 0 - movs r3, 0 - bl sub_8012D60 - b _080312F6 - .align 2, 0 -_080312E4: .4byte gUnknown_203B328 -_080312E8: .4byte gUnknown_80E0948 -_080312EC: - ldr r0, [r2] - ldrb r0, [r0, 0x4] - movs r1, 0x3 - bl sub_8030D40 -_080312F6: - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8031258 - - thumb_func_start sub_8031300 -sub_8031300: - push {lr} - movs r0, 0x1 - bl sub_8030768 - cmp r0, 0x4 - bhi _08031366 - lsls r0, 2 - ldr r1, _08031318 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08031318: .4byte _0803131C - .align 2, 0 -_0803131C: - .4byte _08031366 - .4byte _08031366 - .4byte _08031360 - .4byte _08031330 - .4byte _08031348 -_08031330: - bl sub_80307EC - ldr r1, _08031344 - ldr r1, [r1] - strb r0, [r1, 0x4] - movs r0, 0x1 - bl sub_80310E4 - b _08031366 - .align 2, 0 -_08031344: .4byte gUnknown_203B328 -_08031348: - bl sub_80307EC - ldr r1, _0803135C - ldr r1, [r1] - strb r0, [r1, 0x4] - movs r0, 0x4 - bl sub_80310E4 - b _08031366 - .align 2, 0 -_0803135C: .4byte gUnknown_203B328 -_08031360: - movs r0, 0x6 - bl sub_80310E4 -_08031366: - pop {r0} - bx r0 - thumb_func_end sub_8031300 - - thumb_func_start sub_803136C -sub_803136C: - push {r4,lr} - sub sp, 0x4 - movs r0, 0 - str r0, [sp] - bl sub_8030768 - ldr r4, _080313A4 - ldr r0, [r4] - adds r0, 0x8 - bl sub_8012FD8 - lsls r0, 24 - cmp r0, 0 - bne _08031392 - ldr r0, [r4] - adds r0, 0x8 - mov r1, sp - bl sub_8013114 -_08031392: - ldr r0, [sp] - cmp r0, 0x4 - beq _080313C2 - cmp r0, 0x4 - bgt _080313A8 - cmp r0, 0x1 - beq _080313B2 - b _080313D0 - .align 2, 0 -_080313A4: .4byte gUnknown_203B328 -_080313A8: - cmp r0, 0x5 - beq _080313CA - cmp r0, 0x6 - beq _080313BA - b _080313D0 -_080313B2: - movs r0, 0 - bl sub_80310E4 - b _080313D0 -_080313BA: - movs r0, 0x3 - bl sub_80310E4 - b _080313D0 -_080313C2: - movs r0, 0x2 - bl sub_80310E4 - b _080313D0 -_080313CA: - movs r0, 0x4 - bl sub_80310E4 -_080313D0: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_803136C - - thumb_func_start sub_80313D8 -sub_80313D8: - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r0, 0 - str r0, [sp] - bl sub_8030768 - ldr r4, _08031418 - ldr r0, [r4] - adds r0, 0x8 - bl sub_8012FD8 - ldr r0, [r4] - adds r0, 0x58 - bl sub_8012FD8 - lsls r0, 24 - cmp r0, 0 - bne _08031408 - ldr r0, [r4] - adds r0, 0x58 - mov r1, sp - bl sub_8013114 -_08031408: - ldr r0, [sp] - cmp r0, 0x2 - beq _08031428 - cmp r0, 0x2 - bgt _0803141C - cmp r0, 0x1 - beq _08031420 - b _0803148E - .align 2, 0 -_08031418: .4byte gUnknown_203B328 -_0803141C: - cmp r0, 0x3 - bne _0803148E -_08031420: - movs r0, 0 - bl sub_80310E4 - b _0803148E -_08031428: - cmp r5, 0x2 - beq _08031432 - cmp r5, 0x3 - beq _0803143C - b _0803145A -_08031432: - ldr r0, [r4] - ldrb r0, [r0, 0x4] - bl sub_8095240 - b _0803145A -_0803143C: - ldr r4, _08031480 - movs r3, 0 - movs r1, 0 - movs r2, 0x1F -_08031444: - ldr r0, [r4] - adds r0, r1 - strb r3, [r0] - ldr r0, [r4] - adds r0, r1 - adds r0, 0x22 - strb r3, [r0] - adds r1, 0x30 - subs r2, 0x1 - cmp r2, 0 - bge _08031444 -_0803145A: - ldr r0, _08031484 - ldr r0, [r0] - movs r1, 0x8C - lsls r1, 1 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0x2 - beq _0803146E - cmp r0, 0x4 - bne _0803148E -_0803146E: - bl sub_8030C20 - lsls r0, 24 - cmp r0, 0 - beq _08031488 - movs r0, 0x5 - bl sub_80310E4 - b _0803148E - .align 2, 0 -_08031480: .4byte gUnknown_203B480 -_08031484: .4byte gUnknown_203B328 -_08031488: - movs r0, 0 - bl sub_80310E4 -_0803148E: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80313D8 - - thumb_func_start sub_8031498 -sub_8031498: - push {lr} - bl sub_8030DA0 - cmp r0, 0x1 - bls _080314B0 - cmp r0, 0x3 - bhi _080314B0 - bl sub_8030DE4 - movs r0, 0 - bl sub_80310E4 -_080314B0: - pop {r0} - bx r0 - thumb_func_end sub_8031498 + .align 2,0 diff --git a/asm/wonder_mail_5.s b/asm/wonder_mail_5.s new file mode 100644 index 000000000..ec3a007ad --- /dev/null +++ b/asm/wonder_mail_5.s @@ -0,0 +1,799 @@ + #include "asm/constants/gba_constants.inc" + #include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_8030E48 +sub_8030E48: + push {r4-r6,lr} + mov r6, r8 + push {r6} + sub sp, 0x15C + ldr r3, _08030EA8 + ldr r4, _08030EAC + ldr r2, [r4] + ldrb r1, [r2, 0xC] + lsls r0, r1, 1 + adds r0, r1 + lsls r0, 4 + ldr r1, [r3] + adds r5, r1, r0 + ldr r0, [r2, 0x10] + bl sub_80073B8 + ldr r0, [r4] + ldr r0, [r0, 0x10] + str r0, [sp, 0x4] + add r1, sp, 0x44 + movs r2, 0 + movs r0, 0x7 + strb r0, [r1] + mov r0, sp + adds r0, 0x46 + strb r2, [r0] + add r0, sp, 0x48 + strb r2, [r0] + adds r0, r5, 0x4 + str r0, [sp, 0xC] + adds r0, 0x10 + str r0, [sp, 0x10] + add r1, sp, 0x4 + ldrh r0, [r5, 0xC] + strh r0, [r1, 0x10] + ldrh r0, [r5, 0xC] + strh r0, [r1, 0x12] + adds r0, r1, 0 + strb r2, [r0, 0x14] + adds r2, r5, 0 + adds r2, 0x22 + ldrb r0, [r2] + cmp r0, 0 + bne _08030EB0 + adds r1, 0x2E + movs r0, 0x5 + strb r0, [r1] + b _08030EBE + .align 2, 0 +_08030EA8: .4byte gUnknown_203B480 +_08030EAC: .4byte gUnknown_203B324 +_08030EB0: + mov r1, sp + adds r1, 0x32 + movs r0, 0x2 + strb r0, [r1] + ldrb r1, [r2] + add r0, sp, 0x38 + strb r1, [r0] +_08030EBE: + ldrb r0, [r5] + cmp r0, 0x2 + beq _08030ED2 + cmp r0, 0x2 + ble _08030EE2 + cmp r0, 0x4 + beq _08030ED2 + cmp r0, 0x5 + beq _08030EDA + b _08030EE2 +_08030ED2: + mov r1, sp + adds r1, 0x45 + movs r0, 0xA + b _08030EE8 +_08030EDA: + mov r1, sp + adds r1, 0x45 + movs r0, 0xB + b _08030EE8 +_08030EE2: + mov r1, sp + adds r1, 0x45 + movs r0, 0x9 +_08030EE8: + strb r0, [r1] + add r0, sp, 0x4 + bl CreateRescueDescription + ldrh r0, [r5, 0x10] + ldr r1, _08030F48 + bl __umodsi3 + adds r4, r0, 0 + lsls r4, 16 + lsrs r4, 16 + ldr r2, _08030F4C + ldr r5, _08030F50 + ldr r0, [r5] + ldr r3, [r0, 0x10] + movs r0, 0 + mov r8, r0 + str r0, [sp] + movs r0, 0xA + movs r1, 0x68 + bl xxx_call_draw_string + add r6, sp, 0x5C + ldr r1, _08030F54 + adds r0, r6, 0 + adds r2, r4, 0 + bl sprintf_2 + ldr r0, [r5] + ldr r3, [r0, 0x10] + mov r0, r8 + str r0, [sp] + movs r0, 0x44 + movs r1, 0x68 + adds r2, r6, 0 + bl xxx_call_draw_string + ldr r0, [r5] + ldr r0, [r0, 0x10] + bl sub_80073E0 + add sp, 0x15C + pop {r3} + mov r8, r3 + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_08030F48: .4byte 0x00002710 +_08030F4C: .4byte gUnknown_80E0934 +_08030F50: .4byte gUnknown_203B324 +_08030F54: .4byte gUnknown_80E0938 + thumb_func_end sub_8030E48 + + thumb_func_start sub_8030F58 +sub_8030F58: + push {r4-r6,lr} + adds r6, r0, 0 + bl ResetUnusedInputStruct + movs r0, 0 + movs r1, 0x1 + movs r2, 0x1 + bl sub_800641C + ldr r5, _08030FF4 + ldr r0, [r5] + cmp r0, 0 + bne _08030F88 + movs r4, 0x8E + lsls r4, 1 + adds r0, r4, 0 + movs r1, 0x8 + bl MemoryAlloc + str r0, [r5] + movs r1, 0 + adds r2, r4, 0 + bl MemoryFill8 +_08030F88: + ldr r0, [r5] + movs r1, 0x8C + lsls r1, 1 + adds r0, r1 + str r6, [r0] + movs r0, 0x98 + lsls r0, 1 + bl GetDialogueSpriteDataPtr + ldr r2, [r5] + movs r4, 0x84 + lsls r4, 1 + adds r1, r2, r4 + str r0, [r1] + movs r3, 0x86 + lsls r3, 1 + adds r1, r2, r3 + ldr r0, [r0, 0x4] + str r0, [r1] + movs r0, 0x8A + lsls r0, 1 + adds r2, r0 + movs r1, 0 + strb r1, [r2] + ldr r0, [r5] + ldr r2, _08030FF8 + adds r0, r2 + strb r1, [r0] + ldr r0, [r5] + adds r3, 0xA + adds r0, r3 + strb r1, [r0] + ldr r2, [r5] + movs r0, 0x88 + lsls r0, 1 + adds r1, r2, r0 + movs r0, 0x2 + strh r0, [r1] + subs r3, 0x4 + adds r1, r2, r3 + movs r0, 0x8 + strh r0, [r1] + adds r0, r6, 0 + bl sub_8030C20 + lsls r0, 24 + lsrs r1, r0, 24 + cmp r1, 0 + beq _08031038 + cmp r6, 0x2 + beq _08030FFC + cmp r6, 0x4 + beq _08031014 + b _08031022 + .align 2, 0 +_08030FF4: .4byte gUnknown_203B328 +_08030FF8: .4byte 0x00000115 +_08030FFC: + ldr r0, _0803100C + ldr r2, [r5] + adds r2, r4 + ldr r3, _08031010 + movs r1, 0 + bl sub_80141B4 + b _08031022 + .align 2, 0 +_0803100C: .4byte gUnknown_80E09D8 +_08031010: .4byte 0x00000101 +_08031014: + ldr r0, _0803102C + ldr r2, [r5] + adds r2, r4 + ldr r3, _08031030 + movs r1, 0 + bl sub_80141B4 +_08031022: + ldr r0, _08031034 + ldr r1, [r0] + movs r0, 0x5 + str r0, [r1] + b _08031048 + .align 2, 0 +_0803102C: .4byte gUnknown_80E0A0C +_08031030: .4byte 0x00000101 +_08031034: .4byte gUnknown_203B328 +_08031038: + ldr r0, [r5] + str r1, [r0] + adds r0, r6, 0 + movs r1, 0 + movs r2, 0 + movs r3, 0x8 + bl sub_80306A8 +_08031048: + movs r0, 0x1 + pop {r4-r6} + pop {r1} + bx r1 + thumb_func_end sub_8030F58 + + thumb_func_start sub_8031050 +sub_8031050: + push {lr} + ldr r1, _08031068 + ldr r0, [r1] + ldr r0, [r0] + adds r2, r1, 0 + cmp r0, 0x6 + bhi _080310AC + lsls r0, 2 + ldr r1, _0803106C + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08031068: .4byte gUnknown_203B328 +_0803106C: .4byte _08031070 + .align 2, 0 +_08031070: + .4byte _0803108C + .4byte _08031092 + .4byte _08031098 + .4byte _08031098 + .4byte _080310A2 + .4byte _080310A8 + .4byte _080310A8 +_0803108C: + bl sub_8031300 + b _080310AC +_08031092: + bl sub_803136C + b _080310AC +_08031098: + ldr r0, [r2] + ldr r0, [r0] + bl sub_80313D8 + b _080310AC +_080310A2: + bl sub_8031498 + b _080310AC +_080310A8: + movs r0, 0x3 + b _080310AE +_080310AC: + movs r0, 0 +_080310AE: + pop {r1} + bx r1 + thumb_func_end sub_8031050 + + thumb_func_start sub_80310B4 +sub_80310B4: + push {r4,lr} + bl sub_803084C + ldr r4, _080310E0 + ldr r0, [r4] + cmp r0, 0 + beq _080310D8 + movs r1, 0x84 + lsls r1, 1 + adds r0, r1 + ldr r0, [r0] + bl CloseFile + ldr r0, [r4] + bl MemoryFree + movs r0, 0 + str r0, [r4] +_080310D8: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_080310E0: .4byte gUnknown_203B328 + thumb_func_end sub_80310B4 + + thumb_func_start sub_80310E4 +sub_80310E4: + push {lr} + ldr r1, _080310F8 + ldr r1, [r1] + str r0, [r1] + bl sub_80310FC + bl sub_8031258 + pop {r0} + bx r0 + .align 2, 0 +_080310F8: .4byte gUnknown_203B328 + thumb_func_end sub_80310E4 + + thumb_func_start sub_80310FC +sub_80310FC: + push {r4-r6,lr} + ldr r4, _0803111C + ldr r0, [r4] + adds r0, 0xA8 + bl sub_8006518 + ldr r0, [r4] + ldr r0, [r0] + cmp r0, 0x6 + bls _08031112 + b _0803122C +_08031112: + lsls r0, 2 + ldr r1, _08031120 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_0803111C: .4byte gUnknown_203B328 +_08031120: .4byte _08031124 + .align 2, 0 +_08031124: + .4byte _08031140 + .4byte _08031178 + .4byte _080311C0 + .4byte _080311C0 + .4byte _080311E8 + .4byte _0803122C + .4byte _0803122C +_08031140: + ldr r3, _08031170 + ldr r1, [r3] + ldr r2, _08031174 + adds r1, 0xC0 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r1, [r3] + adds r1, 0xD8 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r0, [r3] + adds r0, 0xF0 + ldm r2!, {r1,r3,r4} + stm r0!, {r1,r3,r4} + ldm r2!, {r1,r5,r6} + stm r0!, {r1,r5,r6} + b _0803123A + .align 2, 0 +_08031170: .4byte gUnknown_203B328 +_08031174: .4byte gUnknown_80E0990 +_08031178: + ldr r3, _080311B0 + ldr r1, [r3] + adds r1, 0xC0 + ldr r0, _080311B4 + ldm r0!, {r2,r4,r5} + stm r1!, {r2,r4,r5} + ldm r0!, {r2,r4,r6} + stm r1!, {r2,r4,r6} + ldr r1, [r3] + ldr r2, _080311B8 + adds r1, 0xD8 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r0, [r3] + adds r0, 0xF0 + ldm r2!, {r1,r5,r6} + stm r0!, {r1,r5,r6} + ldm r2!, {r4-r6} + stm r0!, {r4-r6} + ldr r0, [r3] + adds r0, 0xC0 + ldr r1, _080311BC + bl sub_8012CAC + b _0803123A + .align 2, 0 +_080311B0: .4byte gUnknown_203B328 +_080311B4: .4byte gUnknown_80E09A8 +_080311B8: .4byte gUnknown_80E0990 +_080311BC: .4byte gUnknown_80E0968 +_080311C0: + ldr r2, _080311DC + ldr r1, [r2] + adds r1, 0xD8 + ldr r0, _080311E0 + ldm r0!, {r3-r5} + stm r1!, {r3-r5} + ldm r0!, {r3,r4,r6} + stm r1!, {r3,r4,r6} + ldr r0, [r2] + adds r0, 0xD8 + ldr r1, _080311E4 + bl sub_8012CAC + b _0803123A + .align 2, 0 +_080311DC: .4byte gUnknown_203B328 +_080311E0: .4byte gUnknown_80E09C0 +_080311E4: .4byte gUnknown_80E0948 +_080311E8: + ldr r3, _08031224 + ldr r1, [r3] + ldr r2, _08031228 + adds r1, 0xA8 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r1, [r3] + adds r1, 0xC0 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r1, [r3] + adds r1, 0xD8 + adds r0, r2, 0 + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldm r0!, {r4-r6} + stm r1!, {r4-r6} + ldr r0, [r3] + adds r0, 0xF0 + ldm r2!, {r1,r5,r6} + stm r0!, {r1,r5,r6} + ldm r2!, {r3-r5} + stm r0!, {r3-r5} + b _0803123A + .align 2, 0 +_08031224: .4byte gUnknown_203B328 +_08031228: .4byte gUnknown_80E0990 +_0803122C: + bl ResetUnusedInputStruct + movs r0, 0 + movs r1, 0x1 + movs r2, 0x1 + bl sub_800641C +_0803123A: + bl ResetUnusedInputStruct + ldr r0, _08031254 + ldr r0, [r0] + adds r0, 0xA8 + movs r1, 0x1 + movs r2, 0x1 + bl sub_800641C + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_08031254: .4byte gUnknown_203B328 + thumb_func_end sub_80310FC + + thumb_func_start sub_8031258 +sub_8031258: + push {r4,lr} + sub sp, 0x8 + ldr r1, _08031274 + ldr r0, [r1] + ldr r0, [r0] + adds r2, r1, 0 + cmp r0, 0x6 + bhi _080312F6 + lsls r0, 2 + ldr r1, _08031278 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08031274: .4byte gUnknown_203B328 +_08031278: .4byte _0803127C + .align 2, 0 +_0803127C: + .4byte _08031298 + .4byte _080312A0 + .4byte _080312BC + .4byte _080312BC + .4byte _080312EC + .4byte _080312F6 + .4byte _080312F6 +_08031298: + movs r0, 0x1 + bl sub_8030810 + b _080312F6 +_080312A0: + bl sub_803092C + ldr r0, _080312B4 + ldr r0, [r0] + adds r0, 0x8 + ldr r1, _080312B8 + movs r2, 0x4 + str r2, [sp] + movs r2, 0x1 + b _080312D8 + .align 2, 0 +_080312B4: .4byte gUnknown_203B328 +_080312B8: .4byte gUnknown_80E0968 +_080312BC: + bl sub_803092C + ldr r4, _080312E4 + ldr r0, [r4] + adds r0, 0x8 + movs r1, 0 + bl sub_8012EA4 + ldr r0, [r4] + adds r0, 0x58 + ldr r1, _080312E8 + movs r2, 0x3 + str r2, [sp] + movs r2, 0x2 +_080312D8: + str r2, [sp, 0x4] + movs r2, 0 + movs r3, 0 + bl sub_8012D60 + b _080312F6 + .align 2, 0 +_080312E4: .4byte gUnknown_203B328 +_080312E8: .4byte gUnknown_80E0948 +_080312EC: + ldr r0, [r2] + ldrb r0, [r0, 0x4] + movs r1, 0x3 + bl sub_8030D40 +_080312F6: + add sp, 0x8 + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8031258 + + thumb_func_start sub_8031300 +sub_8031300: + push {lr} + movs r0, 0x1 + bl sub_8030768 + cmp r0, 0x4 + bhi _08031366 + lsls r0, 2 + ldr r1, _08031318 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08031318: .4byte _0803131C + .align 2, 0 +_0803131C: + .4byte _08031366 + .4byte _08031366 + .4byte _08031360 + .4byte _08031330 + .4byte _08031348 +_08031330: + bl sub_80307EC + ldr r1, _08031344 + ldr r1, [r1] + strb r0, [r1, 0x4] + movs r0, 0x1 + bl sub_80310E4 + b _08031366 + .align 2, 0 +_08031344: .4byte gUnknown_203B328 +_08031348: + bl sub_80307EC + ldr r1, _0803135C + ldr r1, [r1] + strb r0, [r1, 0x4] + movs r0, 0x4 + bl sub_80310E4 + b _08031366 + .align 2, 0 +_0803135C: .4byte gUnknown_203B328 +_08031360: + movs r0, 0x6 + bl sub_80310E4 +_08031366: + pop {r0} + bx r0 + thumb_func_end sub_8031300 + + thumb_func_start sub_803136C +sub_803136C: + push {r4,lr} + sub sp, 0x4 + movs r0, 0 + str r0, [sp] + bl sub_8030768 + ldr r4, _080313A4 + ldr r0, [r4] + adds r0, 0x8 + bl sub_8012FD8 + lsls r0, 24 + cmp r0, 0 + bne _08031392 + ldr r0, [r4] + adds r0, 0x8 + mov r1, sp + bl sub_8013114 +_08031392: + ldr r0, [sp] + cmp r0, 0x4 + beq _080313C2 + cmp r0, 0x4 + bgt _080313A8 + cmp r0, 0x1 + beq _080313B2 + b _080313D0 + .align 2, 0 +_080313A4: .4byte gUnknown_203B328 +_080313A8: + cmp r0, 0x5 + beq _080313CA + cmp r0, 0x6 + beq _080313BA + b _080313D0 +_080313B2: + movs r0, 0 + bl sub_80310E4 + b _080313D0 +_080313BA: + movs r0, 0x3 + bl sub_80310E4 + b _080313D0 +_080313C2: + movs r0, 0x2 + bl sub_80310E4 + b _080313D0 +_080313CA: + movs r0, 0x4 + bl sub_80310E4 +_080313D0: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_803136C + + thumb_func_start sub_80313D8 +sub_80313D8: + push {r4,r5,lr} + sub sp, 0x4 + adds r5, r0, 0 + movs r0, 0 + str r0, [sp] + bl sub_8030768 + ldr r4, _08031418 + ldr r0, [r4] + adds r0, 0x8 + bl sub_8012FD8 + ldr r0, [r4] + adds r0, 0x58 + bl sub_8012FD8 + lsls r0, 24 + cmp r0, 0 + bne _08031408 + ldr r0, [r4] + adds r0, 0x58 + mov r1, sp + bl sub_8013114 +_08031408: + ldr r0, [sp] + cmp r0, 0x2 + beq _08031428 + cmp r0, 0x2 + bgt _0803141C + cmp r0, 0x1 + beq _08031420 + b _0803148E + .align 2, 0 +_08031418: .4byte gUnknown_203B328 +_0803141C: + cmp r0, 0x3 + bne _0803148E +_08031420: + movs r0, 0 + bl sub_80310E4 + b _0803148E +_08031428: + cmp r5, 0x2 + beq _08031432 + cmp r5, 0x3 + beq _0803143C + b _0803145A +_08031432: + ldr r0, [r4] + ldrb r0, [r0, 0x4] + bl sub_8095240 + b _0803145A +_0803143C: + ldr r4, _08031480 + movs r3, 0 + movs r1, 0 + movs r2, 0x1F +_08031444: + ldr r0, [r4] + adds r0, r1 + strb r3, [r0] + ldr r0, [r4] + adds r0, r1 + adds r0, 0x22 + strb r3, [r0] + adds r1, 0x30 + subs r2, 0x1 + cmp r2, 0 + bge _08031444 +_0803145A: + ldr r0, _08031484 + ldr r0, [r0] + movs r1, 0x8C + lsls r1, 1 + adds r0, r1 + ldr r0, [r0] + cmp r0, 0x2 + beq _0803146E + cmp r0, 0x4 + bne _0803148E +_0803146E: + bl sub_8030C20 + lsls r0, 24 + cmp r0, 0 + beq _08031488 + movs r0, 0x5 + bl sub_80310E4 + b _0803148E + .align 2, 0 +_08031480: .4byte gUnknown_203B480 +_08031484: .4byte gUnknown_203B328 +_08031488: + movs r0, 0 + bl sub_80310E4 +_0803148E: + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + thumb_func_end sub_80313D8 + + .align 2,0 diff --git a/data/data_80DED44.s b/data/data_80DED44.s index bdc7012eb..f9ef5db70 100644 --- a/data/data_80DED44.s +++ b/data/data_80DED44.s @@ -1,138 +1,5 @@ .section .rodata - - .global gUnknown_80E0248 -gUnknown_80E0248: @ 80E0248 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global UnkData_80E0260 - UnkData_80E0260: - .byte 0x01, 0x00, 0x12, 0x00 - - .global gUnknown_80E0264 -gUnknown_80E0264: @ 80E0264 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x06, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x02, 0x00 - .byte 0x1a, 0x00, 0x10, 0x00 - .byte 0x10, 0x00, 0x00, 0x00 - .4byte UnkData_80E0260 - - .string "pksdir0\0" - - .global gUnknown_80E0284 -gUnknown_80E0284: @ 80E0284 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E029C -gUnknown_80E029C: @ 80E029C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x03, 0x00 - .byte 0x07, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E02B4 -gUnknown_80E02B4: @ 80E02B4 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x15, 0x00, 0x06, 0x00 - .byte 0x07, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E02CC -gUnknown_80E02CC: @ 80E02CC - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x15, 0x00, 0x0f, 0x00 - .byte 0x06, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gMailboxCheckMail -gMailboxCheckMail: @ 80E02E4 - .string "Check Mail\0" - .align 2,0 - - .global gMailboxJobList -gMailboxJobList: @ 80E02F0 - .string "Job List\0" - .align 2,0 - - .global gMailboxPKMNNews -gMailboxPKMNNews: @ 80E02FC - .string "PKMN News\0" - .align 2,0 - - .global gMailActionStore -gMailActionStore: @ 80E0308 - .string "Store\0" - .align 2,0 - - .global gMailActionRead -gMailActionRead: @ 80E0310 - .string "Read\0" - .align 2,0 - - .global gMailAccepted -gMailAccepted: @ 80E0318 - .string "Accepted\0" - .align 2,0 - - .global gUnknown_80E0324 -gUnknown_80E0324: @ 80E0324 - .string "/\0" - .align 2,0 - .string "pksdir0\0" - - .global gUnknown_80E0330 -gUnknown_80E0330: @ 80E0330 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E0348 -gUnknown_80E0348: @ 80E0348 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x03, 0x00 - .byte 0x07, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E0360 -gUnknown_80E0360: @ 80E0360 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x15, 0x00, 0x06, 0x00 - .byte 0x07, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E0378 -gUnknown_80E0378: @ 80E0378 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x15, 0x00, 0x0f, 0x00 - .byte 0x06, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .global gPelipperBoard_BulletinBoard gPelipperBoard_BulletinBoard: @ 80E0390 .string "Bulletin Board\0" diff --git a/data/data_80E1F30.s b/data/data_80E1F30.s index 9be260d3c..b5aa47826 100644 --- a/data/data_80E1F30.s +++ b/data/data_80E1F30.s @@ -1,45 +1,5 @@ .section .rodata - .global gUnknown_80E1F30 -gUnknown_80E1F30: @ 80E1F30 - .string "Objectives\0" - .align 2,0 - - .global gUnknown_80E1F3C -gUnknown_80E1F3C: @ 80E1F3C - .string "%dF\0" - - .global gUnknown_80E1F40 -gUnknown_80E1F40: @ 80E1F40 - .string " Rescue {COLOR_1 YELLOW}%s{END_COLOR_TEXT_1}\0" - .align 2,0 - - .global gUnknown_80E1F54 -gUnknown_80E1F54: @ 80E1F54 - .string "Just go!\0" - .align 2,0 - - .global gUnknown_80E1F60 -gUnknown_80E1F60: @ 80E1F60 - .string " Bring {COLOR_1 GREEN}%s{END_COLOR_TEXT_1}\0" - .align 2,0 - - .global gUnknown_80E1F70 -gUnknown_80E1F70: @ 80E1F70 - .string " Find {COLOR_1 GREEN}%s{END_COLOR_TEXT_1}\0" - .align 2,0 - - .global gUnknown_80E1F80 -gUnknown_80E1F80: @ 80E1F80 - .string " Escort to {COLOR_1 YELLOW}%s{END_COLOR_TEXT_1}\0" - .align 2,0 - - .global gUnknown_80E1F94 -gUnknown_80E1F94: @ 80E1F94 - .string "{COLOR_1 RED_2}???{END_COLOR_TEXT_1}\0" - .align 2,0 - .string "pksdir0\0" - .global gUnknown_80E1FA8 gUnknown_80E1FA8: @ 80E1FA8 .byte 0x00, 0x00, 0x00, 0x00 diff --git a/data/data_80F4E2C.s b/data/data_80F4E2C.s index 1d81050ce..1e088d7b1 100644 --- a/data/data_80F4E2C.s +++ b/data/data_80F4E2C.s @@ -800,8 +800,18 @@ gUnknown_80F51E4: @ 80F51E4 .global gUnknown_80F51EC gUnknown_80F51EC: @ 80F51EC - .incbin "baserom.gba", 0xF51EC, 0x20 +@ replacing .incbin "baserom.gba", 0x000f51ec, 0x20 +.4byte 256 +.4byte 512 +.4byte 512 +.4byte 256 +.4byte 512 +.4byte 512 +.4byte 512 +.4byte 512 .global gUnknown_80F520C gUnknown_80F520C: @ 80F520C - .incbin "baserom.gba", 0xF520C, 0x20 +@ replacing .incbin "baserom.gba", 0x000f520c, 0x20 +.byte 0x01, 0x00, 0x78, 0x01, 0x02, 0x00, 0x7a, 0x01, 0x01, 0x00, 0x78, 0x01, 0x01, 0x00, 0x78, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01 + diff --git a/data/data_80F59C8.s b/data/data_80F59C8.s index 0e04a6f1f..3a41f0a35 100644 --- a/data/data_80F59C8.s +++ b/data/data_80F59C8.s @@ -1059,36 +1059,51 @@ gUnknown_80F89D8: @ 80F89D8 gUnknown_80F89F4: @ 80F89F4 .4byte NothingHappened_80F89DC + .global BlownAway_80F89F8 + BlownAway_80F89F8: .string "{ARG_POKEMON_0} was blown away!\0" .align 2,0 .global gUnknown_80F8A0C gUnknown_80F8A0C: @ 80F8A0C - .byte 0xF8, 0x89, 0x0F, 0x08 + .4byte BlownAway_80F89F8 + + .global NoSetMove_80F8A10 + NoSetMove_80F8A10: .string "No move has been set.\0" .align 2,0 .global gUnknown_80F8A28 gUnknown_80F8A28: @ 80F8A28 - .byte 0x10, 0x8A, 0x0F, 0x08 + .4byte NoSetMove_80F8A10 + + .global SetMoveCantUse_80F8A2C + SetMoveCantUse_80F8A2C: .string "The set move can{APOSTROPHE}t be used.\0" .align 2,0 .global gUnknown_80F8A4C gUnknown_80F8A4C: @ 80F8A4C - .byte 0x2C, 0x8A, 0x0F, 0x08 + .4byte SetMoveCantUse_80F8A2C + + .global BeingConstricted_80F8A50 + BeingConstricted_80F8A50: .string "You{APOSTROPHE}re being constricted!\0" .align 2,0 .global gUnknown_80F8A6C gUnknown_80F8A6C: @ 80F8A6C - .byte 0x50, 0x8A, 0x0F, 0x08 + .4byte BeingConstricted_80F8A50 + + .global CantMove_80F8A70 + CantMove_80F8A70: .string "You can{APOSTROPHE}t move!\0" .align 2,0 .global gUnknown_80F8A84 gUnknown_80F8A84: @ 80F8A84 - .byte 0x70, 0x8A, 0x0F, 0x08 + .4byte CantMove_80F8A70 + .string "You can{APOSTROPHE}t move while you{APOSTROPHE}re rooted!\0" .align 2,0 diff --git a/data/data_8106FDD.s b/data/data_8106FDD.s deleted file mode 100644 index 4e984abd3..000000000 --- a/data/data_8106FDD.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .rodata - - .global gDirectionBitMasks_3 -gDirectionBitMasks_3: @ 8106FDD -@ replacing .incbin "baserom.gba", 0x00106fdd, 0x8 - .byte 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 \ No newline at end of file diff --git a/data/data_8107010.s b/data/data_8107010.s index 11b5a15a6..b3143f2b6 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -2,9 +2,10 @@ .string "pksdir0\0" .string "pksdir0\0" + .global gUnknown_8107010 gUnknown_8107010: @ 8107010 - .incbin "baserom.gba", 0x107010, 0x8 + .byte 0, 1, 1, 2, 1, 1, 0, 0 .global gUnknown_8107018 gUnknown_8107018: @ 8107018 @@ -215,8 +216,8 @@ gUnknown_8107798: @ 8107798 .string "pksdir0\0" .align 2,0 - .global gUnknown_81077A8 -gUnknown_81077A8: @ 81077A8 + .global gDungeonFloorCount +gDungeonFloorCount: @ 81077A8 .incbin "baserom.gba", 0x1077A8, 0x40 .global gUnknown_81077E8 diff --git a/data/dungeon/pokemon_found.inc b/data/dungeon/pokemon_found.inc index c32676bc0..c6e582f7f 100644 --- a/data/dungeon/pokemon_found.inc +++ b/data/dungeon/pokemon_found.inc @@ -1647,90 +1647,697 @@ DungeonPokemonFoundTable: .byte 0xac, 0x7f, 0x4b, 0x08 .byte 0xec, 0x7f, 0x4b, 0x08 .byte 0x3c, 0x80, 0x4b, 0x08 -.byte 0x84, 0x80, 0x4b, 0x08, 0xc4, 0x80, 0x4b, 0x08, 0xf4, 0x80, 0x4b, 0x08, 0x2c, 0x81, 0x4b, 0x08, 0x54, 0x81, 0x4b, 0x08, 0x9c, 0x81, 0x4b, 0x08, 0xd4, 0x81, 0x4b, 0x08, 0x0c, 0x82, 0x4b, 0x08 -.byte 0x54, 0x82, 0x4b, 0x08, 0x94, 0x82, 0x4b, 0x08, 0xd4, 0x82, 0x4b, 0x08, 0x0c, 0x83, 0x4b, 0x08, 0x44, 0x83, 0x4b, 0x08, 0x7c, 0x83, 0x4b, 0x08, 0xac, 0x83, 0x4b, 0x08, 0xdc, 0x83, 0x4b, 0x08 -.byte 0xfc, 0x83, 0x4b, 0x08, 0x2c, 0x84, 0x4b, 0x08, 0x64, 0x84, 0x4b, 0x08, 0xa4, 0x84, 0x4b, 0x08, 0xec, 0x84, 0x4b, 0x08, 0x24, 0x85, 0x4b, 0x08, 0x64, 0x85, 0x4b, 0x08, 0x94, 0x85, 0x4b, 0x08 -.byte 0xc4, 0x85, 0x4b, 0x08, 0x0c, 0x86, 0x4b, 0x08, 0x44, 0x86, 0x4b, 0x08, 0x84, 0x86, 0x4b, 0x08, 0xc4, 0x86, 0x4b, 0x08, 0x04, 0x87, 0x4b, 0x08, 0x4c, 0x87, 0x4b, 0x08, 0x8c, 0x87, 0x4b, 0x08 -.byte 0xcc, 0x87, 0x4b, 0x08, 0x0c, 0x88, 0x4b, 0x08, 0x4c, 0x88, 0x4b, 0x08, 0x8c, 0x88, 0x4b, 0x08, 0xbc, 0x88, 0x4b, 0x08, 0xe4, 0x88, 0x4b, 0x08, 0x1c, 0x89, 0x4b, 0x08, 0x4c, 0x89, 0x4b, 0x08 -.byte 0x74, 0x89, 0x4b, 0x08, 0xa4, 0x89, 0x4b, 0x08, 0xe4, 0x89, 0x4b, 0x08, 0x1c, 0x8a, 0x4b, 0x08, 0x64, 0x8a, 0x4b, 0x08, 0xa4, 0x8a, 0x4b, 0x08, 0xdc, 0x8a, 0x4b, 0x08, 0x1c, 0x8b, 0x4b, 0x08 -.byte 0x5c, 0x8b, 0x4b, 0x08, 0x94, 0x8b, 0x4b, 0x08, 0xc4, 0x8b, 0x4b, 0x08, 0xf4, 0x8b, 0x4b, 0x08, 0x1c, 0x8c, 0x4b, 0x08, 0x4c, 0x8c, 0x4b, 0x08, 0x7c, 0x8c, 0x4b, 0x08, 0xac, 0x8c, 0x4b, 0x08 -.byte 0xdc, 0x8c, 0x4b, 0x08, 0x14, 0x8d, 0x4b, 0x08, 0x54, 0x8d, 0x4b, 0x08, 0x8c, 0x8d, 0x4b, 0x08, 0xbc, 0x8d, 0x4b, 0x08, 0xdc, 0x8d, 0x4b, 0x08, 0x04, 0x8e, 0x4b, 0x08, 0x44, 0x8e, 0x4b, 0x08 -.byte 0x8c, 0x8e, 0x4b, 0x08, 0xcc, 0x8e, 0x4b, 0x08, 0x14, 0x8f, 0x4b, 0x08, 0x54, 0x8f, 0x4b, 0x08, 0x94, 0x8f, 0x4b, 0x08, 0xcc, 0x8f, 0x4b, 0x08, 0xec, 0x8f, 0x4b, 0x08, 0x2c, 0x90, 0x4b, 0x08 -.byte 0x74, 0x90, 0x4b, 0x08, 0xac, 0x90, 0x4b, 0x08, 0xdc, 0x90, 0x4b, 0x08, 0x0c, 0x91, 0x4b, 0x08, 0x3c, 0x91, 0x4b, 0x08, 0x6c, 0x91, 0x4b, 0x08, 0xa4, 0x91, 0x4b, 0x08, 0xe4, 0x91, 0x4b, 0x08 -.byte 0x1c, 0x92, 0x4b, 0x08, 0x44, 0x92, 0x4b, 0x08, 0x7c, 0x92, 0x4b, 0x08, 0xac, 0x92, 0x4b, 0x08, 0xcc, 0x92, 0x4b, 0x08, 0xfc, 0x92, 0x4b, 0x08, 0x2c, 0x93, 0x4b, 0x08, 0x54, 0x93, 0x4b, 0x08 -.byte 0x84, 0x93, 0x4b, 0x08, 0xbc, 0x93, 0x4b, 0x08, 0xec, 0x93, 0x4b, 0x08, 0x24, 0x94, 0x4b, 0x08, 0x54, 0x94, 0x4b, 0x08, 0x8c, 0x94, 0x4b, 0x08, 0xbc, 0x94, 0x4b, 0x08, 0xf4, 0x94, 0x4b, 0x08 -.byte 0x24, 0x95, 0x4b, 0x08, 0x54, 0x95, 0x4b, 0x08, 0x84, 0x95, 0x4b, 0x08, 0xc4, 0x95, 0x4b, 0x08, 0x1c, 0x96, 0x4b, 0x08, 0x74, 0x96, 0x4b, 0x08, 0xbc, 0x96, 0x4b, 0x08, 0x0c, 0x97, 0x4b, 0x08 -.byte 0x54, 0x97, 0x4b, 0x08, 0x94, 0x97, 0x4b, 0x08, 0xc4, 0x97, 0x4b, 0x08, 0xfc, 0x97, 0x4b, 0x08, 0x3c, 0x98, 0x4b, 0x08, 0x7c, 0x98, 0x4b, 0x08, 0xc4, 0x98, 0x4b, 0x08, 0x0c, 0x99, 0x4b, 0x08 -.byte 0x4c, 0x99, 0x4b, 0x08, 0x74, 0x99, 0x4b, 0x08, 0x94, 0x99, 0x4b, 0x08, 0xcc, 0x99, 0x4b, 0x08, 0x0c, 0x9a, 0x4b, 0x08, 0x54, 0x9a, 0x4b, 0x08, 0x94, 0x9a, 0x4b, 0x08, 0xcc, 0x9a, 0x4b, 0x08 -.byte 0xfc, 0x9a, 0x4b, 0x08, 0x34, 0x9b, 0x4b, 0x08, 0x6c, 0x9b, 0x4b, 0x08, 0xa4, 0x9b, 0x4b, 0x08, 0xe4, 0x9b, 0x4b, 0x08, 0x14, 0x9c, 0x4b, 0x08, 0x4c, 0x9c, 0x4b, 0x08, 0x7c, 0x9c, 0x4b, 0x08 -.byte 0xac, 0x9c, 0x4b, 0x08, 0xe4, 0x9c, 0x4b, 0x08, 0x14, 0x9d, 0x4b, 0x08, 0x44, 0x9d, 0x4b, 0x08, 0x7c, 0x9d, 0x4b, 0x08, 0x9c, 0x9d, 0x4b, 0x08, 0xcc, 0x9d, 0x4b, 0x08, 0x14, 0x9e, 0x4b, 0x08 -.byte 0x64, 0x9e, 0x4b, 0x08, 0xac, 0x9e, 0x4b, 0x08, 0xfc, 0x9e, 0x4b, 0x08, 0x3c, 0x9f, 0x4b, 0x08, 0x6c, 0x9f, 0x4b, 0x08, 0xac, 0x9f, 0x4b, 0x08, 0x0c, 0xa0, 0x4b, 0x08, 0x54, 0xa0, 0x4b, 0x08 -.byte 0xa4, 0xa0, 0x4b, 0x08, 0xf4, 0xa0, 0x4b, 0x08, 0x3c, 0xa1, 0x4b, 0x08, 0x6c, 0xa1, 0x4b, 0x08, 0x9c, 0xa1, 0x4b, 0x08, 0xd4, 0xa1, 0x4b, 0x08, 0x1c, 0xa2, 0x4b, 0x08, 0x54, 0xa2, 0x4b, 0x08 -.byte 0x8c, 0xa2, 0x4b, 0x08, 0xbc, 0xa2, 0x4b, 0x08, 0xfc, 0xa2, 0x4b, 0x08, 0x2c, 0xa3, 0x4b, 0x08, 0x5c, 0xa3, 0x4b, 0x08, 0x94, 0xa3, 0x4b, 0x08, 0xcc, 0xa3, 0x4b, 0x08, 0xfc, 0xa3, 0x4b, 0x08 -.byte 0x34, 0xa4, 0x4b, 0x08, 0x74, 0xa4, 0x4b, 0x08, 0xc4, 0xa4, 0x4b, 0x08, 0x0c, 0xa5, 0x4b, 0x08, 0x4c, 0xa5, 0x4b, 0x08, 0x8c, 0xa5, 0x4b, 0x08, 0xbc, 0xa5, 0x4b, 0x08, 0xec, 0xa5, 0x4b, 0x08 -.byte 0x24, 0xa6, 0x4b, 0x08, 0x54, 0xa6, 0x4b, 0x08, 0x84, 0xa6, 0x4b, 0x08, 0xac, 0xa6, 0x4b, 0x08, 0xcc, 0xa6, 0x4b, 0x08, 0x04, 0xa7, 0x4b, 0x08, 0x5c, 0xa7, 0x4b, 0x08, 0xa4, 0xa7, 0x4b, 0x08 -.byte 0xec, 0xa7, 0x4b, 0x08, 0x24, 0xa8, 0x4b, 0x08, 0x54, 0xa8, 0x4b, 0x08, 0x8c, 0xa8, 0x4b, 0x08, 0xbc, 0xa8, 0x4b, 0x08, 0xe4, 0xa8, 0x4b, 0x08, 0x04, 0xa9, 0x4b, 0x08, 0x44, 0xa9, 0x4b, 0x08 -.byte 0x84, 0xa9, 0x4b, 0x08, 0xc4, 0xa9, 0x4b, 0x08, 0xf4, 0xa9, 0x4b, 0x08, 0x24, 0xaa, 0x4b, 0x08, 0x54, 0xaa, 0x4b, 0x08, 0x84, 0xaa, 0x4b, 0x08, 0xbc, 0xaa, 0x4b, 0x08, 0xf4, 0xaa, 0x4b, 0x08 -.byte 0x34, 0xab, 0x4b, 0x08, 0x6c, 0xab, 0x4b, 0x08, 0x9c, 0xab, 0x4b, 0x08, 0xbc, 0xab, 0x4b, 0x08, 0x04, 0xac, 0x4b, 0x08, 0x3c, 0xac, 0x4b, 0x08, 0x74, 0xac, 0x4b, 0x08, 0xa4, 0xac, 0x4b, 0x08 -.byte 0xe4, 0xac, 0x4b, 0x08, 0x1c, 0xad, 0x4b, 0x08, 0x5c, 0xad, 0x4b, 0x08, 0x94, 0xad, 0x4b, 0x08, 0xc4, 0xad, 0x4b, 0x08, 0xf4, 0xad, 0x4b, 0x08, 0x1c, 0xae, 0x4b, 0x08, 0x54, 0xae, 0x4b, 0x08 -.byte 0x94, 0xae, 0x4b, 0x08, 0xdc, 0xae, 0x4b, 0x08, 0x2c, 0xaf, 0x4b, 0x08, 0x74, 0xaf, 0x4b, 0x08, 0xb4, 0xaf, 0x4b, 0x08, 0xfc, 0xaf, 0x4b, 0x08, 0x3c, 0xb0, 0x4b, 0x08, 0x74, 0xb0, 0x4b, 0x08 -.byte 0xb4, 0xb0, 0x4b, 0x08, 0xec, 0xb0, 0x4b, 0x08, 0x2c, 0xb1, 0x4b, 0x08, 0x74, 0xb1, 0x4b, 0x08, 0xb4, 0xb1, 0x4b, 0x08, 0xe4, 0xb1, 0x4b, 0x08, 0x0c, 0xb2, 0x4b, 0x08, 0x3c, 0xb2, 0x4b, 0x08 -.byte 0x6c, 0xb2, 0x4b, 0x08, 0xa4, 0xb2, 0x4b, 0x08, 0xe4, 0xb2, 0x4b, 0x08, 0x24, 0xb3, 0x4b, 0x08, 0x64, 0xb3, 0x4b, 0x08, 0xac, 0xb3, 0x4b, 0x08, 0xec, 0xb3, 0x4b, 0x08, 0x1c, 0xb4, 0x4b, 0x08 -.byte 0x44, 0xb4, 0x4b, 0x08, 0x74, 0xb4, 0x4b, 0x08, 0x9c, 0xb4, 0x4b, 0x08, 0xcc, 0xb4, 0x4b, 0x08, 0xf4, 0xb4, 0x4b, 0x08, 0x3c, 0xb5, 0x4b, 0x08, 0x8c, 0xb5, 0x4b, 0x08, 0xcc, 0xb5, 0x4b, 0x08 -.byte 0x04, 0xb6, 0x4b, 0x08, 0x34, 0xb6, 0x4b, 0x08, 0x5c, 0xb6, 0x4b, 0x08, 0x94, 0xb6, 0x4b, 0x08, 0xd4, 0xb6, 0x4b, 0x08, 0x14, 0xb7, 0x4b, 0x08, 0x4c, 0xb7, 0x4b, 0x08, 0x84, 0xb7, 0x4b, 0x08 -.byte 0xb4, 0xb7, 0x4b, 0x08, 0xe4, 0xb7, 0x4b, 0x08, 0x1c, 0xb8, 0x4b, 0x08, 0x4c, 0xb8, 0x4b, 0x08, 0x84, 0xb8, 0x4b, 0x08, 0xbc, 0xb8, 0x4b, 0x08, 0xe4, 0xb8, 0x4b, 0x08, 0x0c, 0xb9, 0x4b, 0x08 -.byte 0x44, 0xb9, 0x4b, 0x08, 0x6c, 0xb9, 0x4b, 0x08, 0x94, 0xb9, 0x4b, 0x08, 0xc4, 0xb9, 0x4b, 0x08, 0xfc, 0xb9, 0x4b, 0x08, 0x34, 0xba, 0x4b, 0x08, 0x6c, 0xba, 0x4b, 0x08, 0x94, 0xba, 0x4b, 0x08 -.byte 0xdc, 0xba, 0x4b, 0x08, 0x24, 0xbb, 0x4b, 0x08, 0x64, 0xbb, 0x4b, 0x08, 0xa4, 0xbb, 0x4b, 0x08, 0xfc, 0xbb, 0x4b, 0x08, 0x54, 0xbc, 0x4b, 0x08, 0x9c, 0xbc, 0x4b, 0x08, 0xcc, 0xbc, 0x4b, 0x08 -.byte 0xfc, 0xbc, 0x4b, 0x08, 0x3c, 0xbd, 0x4b, 0x08, 0x74, 0xbd, 0x4b, 0x08, 0xb4, 0xbd, 0x4b, 0x08, 0xfc, 0xbd, 0x4b, 0x08, 0x4c, 0xbe, 0x4b, 0x08, 0x8c, 0xbe, 0x4b, 0x08, 0xcc, 0xbe, 0x4b, 0x08 -.byte 0x14, 0xbf, 0x4b, 0x08, 0x54, 0xbf, 0x4b, 0x08, 0x8c, 0xbf, 0x4b, 0x08, 0xd4, 0xbf, 0x4b, 0x08, 0x14, 0xc0, 0x4b, 0x08, 0x6c, 0xc0, 0x4b, 0x08, 0xbc, 0xc0, 0x4b, 0x08, 0x04, 0xc1, 0x4b, 0x08 -.byte 0x3c, 0xc1, 0x4b, 0x08, 0x84, 0xc1, 0x4b, 0x08, 0xd4, 0xc1, 0x4b, 0x08, 0x1c, 0xc2, 0x4b, 0x08, 0x64, 0xc2, 0x4b, 0x08, 0x9c, 0xc2, 0x4b, 0x08, 0xc4, 0xc2, 0x4b, 0x08, 0xf4, 0xc2, 0x4b, 0x08 -.byte 0x2c, 0xc3, 0x4b, 0x08, 0x5c, 0xc3, 0x4b, 0x08, 0x94, 0xc3, 0x4b, 0x08, 0xd4, 0xc3, 0x4b, 0x08, 0x14, 0xc4, 0x4b, 0x08, 0x54, 0xc4, 0x4b, 0x08, 0x94, 0xc4, 0x4b, 0x08, 0xd4, 0xc4, 0x4b, 0x08 -.byte 0x0c, 0xc5, 0x4b, 0x08, 0x44, 0xc5, 0x4b, 0x08, 0x84, 0xc5, 0x4b, 0x08, 0xcc, 0xc5, 0x4b, 0x08, 0xfc, 0xc5, 0x4b, 0x08, 0x2c, 0xc6, 0x4b, 0x08, 0x64, 0xc6, 0x4b, 0x08, 0xa4, 0xc6, 0x4b, 0x08 -.byte 0xdc, 0xc6, 0x4b, 0x08, 0x14, 0xc7, 0x4b, 0x08, 0x54, 0xc7, 0x4b, 0x08, 0x8c, 0xc7, 0x4b, 0x08, 0xbc, 0xc7, 0x4b, 0x08, 0xfc, 0xc7, 0x4b, 0x08, 0x3c, 0xc8, 0x4b, 0x08, 0x7c, 0xc8, 0x4b, 0x08 -.byte 0xb4, 0xc8, 0x4b, 0x08, 0xe4, 0xc8, 0x4b, 0x08, 0x24, 0xc9, 0x4b, 0x08, 0x5c, 0xc9, 0x4b, 0x08, 0xa4, 0xc9, 0x4b, 0x08, 0xd4, 0xc9, 0x4b, 0x08, 0x0c, 0xca, 0x4b, 0x08, 0x54, 0xca, 0x4b, 0x08 -.byte 0x8c, 0xca, 0x4b, 0x08, 0xcc, 0xca, 0x4b, 0x08, 0x1c, 0xcb, 0x4b, 0x08, 0x4c, 0xcb, 0x4b, 0x08, 0x84, 0xcb, 0x4b, 0x08, 0xc4, 0xcb, 0x4b, 0x08, 0xfc, 0xcb, 0x4b, 0x08, 0x2c, 0xcc, 0x4b, 0x08 -.byte 0x5c, 0xcc, 0x4b, 0x08, 0xa4, 0xcc, 0x4b, 0x08, 0xf4, 0xcc, 0x4b, 0x08, 0x2c, 0xcd, 0x4b, 0x08, 0x64, 0xcd, 0x4b, 0x08, 0x9c, 0xcd, 0x4b, 0x08, 0xdc, 0xcd, 0x4b, 0x08, 0x14, 0xce, 0x4b, 0x08 -.byte 0x44, 0xce, 0x4b, 0x08, 0x74, 0xce, 0x4b, 0x08, 0xac, 0xce, 0x4b, 0x08, 0xfc, 0xce, 0x4b, 0x08, 0x4c, 0xcf, 0x4b, 0x08, 0x9c, 0xcf, 0x4b, 0x08, 0xe4, 0xcf, 0x4b, 0x08, 0x2c, 0xd0, 0x4b, 0x08 -.byte 0x74, 0xd0, 0x4b, 0x08, 0xb4, 0xd0, 0x4b, 0x08, 0xec, 0xd0, 0x4b, 0x08, 0x1c, 0xd1, 0x4b, 0x08, 0x54, 0xd1, 0x4b, 0x08, 0x8c, 0xd1, 0x4b, 0x08, 0xc4, 0xd1, 0x4b, 0x08, 0x04, 0xd2, 0x4b, 0x08 -.byte 0x3c, 0xd2, 0x4b, 0x08, 0x74, 0xd2, 0x4b, 0x08, 0xb4, 0xd2, 0x4b, 0x08, 0xe4, 0xd2, 0x4b, 0x08, 0x14, 0xd3, 0x4b, 0x08, 0x54, 0xd3, 0x4b, 0x08, 0xa4, 0xd3, 0x4b, 0x08, 0xfc, 0xd3, 0x4b, 0x08 -.byte 0x4c, 0xd4, 0x4b, 0x08, 0x9c, 0xd4, 0x4b, 0x08, 0xe4, 0xd4, 0x4b, 0x08, 0x2c, 0xd5, 0x4b, 0x08, 0x7c, 0xd5, 0x4b, 0x08, 0xbc, 0xd5, 0x4b, 0x08, 0xf4, 0xd5, 0x4b, 0x08, 0x2c, 0xd6, 0x4b, 0x08 -.byte 0x74, 0xd6, 0x4b, 0x08, 0xb4, 0xd6, 0x4b, 0x08, 0xdc, 0xd6, 0x4b, 0x08, 0x0c, 0xd7, 0x4b, 0x08, 0x44, 0xd7, 0x4b, 0x08, 0x74, 0xd7, 0x4b, 0x08, 0xc4, 0xd7, 0x4b, 0x08, 0x04, 0xd8, 0x4b, 0x08 -.byte 0x64, 0xd8, 0x4b, 0x08, 0xac, 0xd8, 0x4b, 0x08, 0xfc, 0xd8, 0x4b, 0x08, 0x54, 0xd9, 0x4b, 0x08, 0x94, 0xd9, 0x4b, 0x08, 0xf4, 0xd9, 0x4b, 0x08, 0x3c, 0xda, 0x4b, 0x08, 0x8c, 0xda, 0x4b, 0x08 -.byte 0xdc, 0xda, 0x4b, 0x08, 0x34, 0xdb, 0x4b, 0x08, 0x74, 0xdb, 0x4b, 0x08, 0xb4, 0xdb, 0x4b, 0x08, 0x0c, 0xdc, 0x4b, 0x08, 0x54, 0xdc, 0x4b, 0x08, 0x9c, 0xdc, 0x4b, 0x08, 0xc4, 0xdc, 0x4b, 0x08 -.byte 0x04, 0xdd, 0x4b, 0x08, 0x3c, 0xdd, 0x4b, 0x08, 0x64, 0xdd, 0x4b, 0x08, 0x94, 0xdd, 0x4b, 0x08, 0xd4, 0xdd, 0x4b, 0x08, 0xfc, 0xdd, 0x4b, 0x08, 0x2c, 0xde, 0x4b, 0x08, 0x64, 0xde, 0x4b, 0x08 -.byte 0x94, 0xde, 0x4b, 0x08, 0xcc, 0xde, 0x4b, 0x08, 0xfc, 0xde, 0x4b, 0x08, 0x24, 0xdf, 0x4b, 0x08, 0x5c, 0xdf, 0x4b, 0x08, 0x84, 0xdf, 0x4b, 0x08, 0xac, 0xdf, 0x4b, 0x08, 0xdc, 0xdf, 0x4b, 0x08 -.byte 0x14, 0xe0, 0x4b, 0x08, 0x44, 0xe0, 0x4b, 0x08, 0x7c, 0xe0, 0x4b, 0x08, 0xa4, 0xe0, 0x4b, 0x08, 0xd4, 0xe0, 0x4b, 0x08, 0xfc, 0xe0, 0x4b, 0x08, 0x2c, 0xe1, 0x4b, 0x08, 0x5c, 0xe1, 0x4b, 0x08 -.byte 0x84, 0xe1, 0x4b, 0x08, 0xb4, 0xe1, 0x4b, 0x08, 0xdc, 0xe1, 0x4b, 0x08, 0x14, 0xe2, 0x4b, 0x08, 0x4c, 0xe2, 0x4b, 0x08, 0x74, 0xe2, 0x4b, 0x08, 0xa4, 0xe2, 0x4b, 0x08, 0xec, 0xe2, 0x4b, 0x08 -.byte 0x2c, 0xe3, 0x4b, 0x08, 0x74, 0xe3, 0x4b, 0x08, 0xb4, 0xe3, 0x4b, 0x08, 0xfc, 0xe3, 0x4b, 0x08, 0x44, 0xe4, 0x4b, 0x08, 0x94, 0xe4, 0x4b, 0x08, 0xdc, 0xe4, 0x4b, 0x08, 0x24, 0xe5, 0x4b, 0x08 -.byte 0x44, 0xe5, 0x4b, 0x08, 0x84, 0xe5, 0x4b, 0x08, 0xcc, 0xe5, 0x4b, 0x08, 0x0c, 0xe6, 0x4b, 0x08, 0x44, 0xe6, 0x4b, 0x08, 0x7c, 0xe6, 0x4b, 0x08, 0xb4, 0xe6, 0x4b, 0x08, 0xf4, 0xe6, 0x4b, 0x08 -.byte 0x2c, 0xe7, 0x4b, 0x08, 0x64, 0xe7, 0x4b, 0x08, 0x9c, 0xe7, 0x4b, 0x08, 0xcc, 0xe7, 0x4b, 0x08, 0x04, 0xe8, 0x4b, 0x08, 0x4c, 0xe8, 0x4b, 0x08, 0x8c, 0xe8, 0x4b, 0x08, 0xc4, 0xe8, 0x4b, 0x08 -.byte 0x1c, 0xe9, 0x4b, 0x08, 0x7c, 0xe9, 0x4b, 0x08, 0xd4, 0xe9, 0x4b, 0x08, 0x1c, 0xea, 0x4b, 0x08, 0x7c, 0xea, 0x4b, 0x08, 0xd4, 0xea, 0x4b, 0x08, 0x2c, 0xeb, 0x4b, 0x08, 0x84, 0xeb, 0x4b, 0x08 -.byte 0xdc, 0xeb, 0x4b, 0x08, 0x34, 0xec, 0x4b, 0x08, 0x94, 0xec, 0x4b, 0x08, 0xcc, 0xec, 0x4b, 0x08, 0x0c, 0xed, 0x4b, 0x08, 0x4c, 0xed, 0x4b, 0x08, 0x8c, 0xed, 0x4b, 0x08, 0xd4, 0xed, 0x4b, 0x08 -.byte 0x14, 0xee, 0x4b, 0x08, 0x4c, 0xee, 0x4b, 0x08, 0x84, 0xee, 0x4b, 0x08, 0xc4, 0xee, 0x4b, 0x08, 0x0c, 0xef, 0x4b, 0x08, 0x4c, 0xef, 0x4b, 0x08, 0x8c, 0xef, 0x4b, 0x08, 0xcc, 0xef, 0x4b, 0x08 -.byte 0x0c, 0xf0, 0x4b, 0x08, 0x44, 0xf0, 0x4b, 0x08, 0x84, 0xf0, 0x4b, 0x08, 0xbc, 0xf0, 0x4b, 0x08, 0xfc, 0xf0, 0x4b, 0x08, 0x34, 0xf1, 0x4b, 0x08, 0x74, 0xf1, 0x4b, 0x08, 0xc4, 0xf1, 0x4b, 0x08 -.byte 0x0c, 0xf2, 0x4b, 0x08, 0x5c, 0xf2, 0x4b, 0x08, 0xac, 0xf2, 0x4b, 0x08, 0xec, 0xf2, 0x4b, 0x08, 0x3c, 0xf3, 0x4b, 0x08, 0x7c, 0xf3, 0x4b, 0x08, 0xb4, 0xf3, 0x4b, 0x08, 0xfc, 0xf3, 0x4b, 0x08 -.byte 0x4c, 0xf4, 0x4b, 0x08, 0x9c, 0xf4, 0x4b, 0x08, 0xec, 0xf4, 0x4b, 0x08, 0x34, 0xf5, 0x4b, 0x08, 0x6c, 0xf5, 0x4b, 0x08, 0xa4, 0xf5, 0x4b, 0x08, 0xdc, 0xf5, 0x4b, 0x08, 0x1c, 0xf6, 0x4b, 0x08 -.byte 0x6c, 0xf6, 0x4b, 0x08, 0xbc, 0xf6, 0x4b, 0x08, 0x14, 0xf7, 0x4b, 0x08, 0x64, 0xf7, 0x4b, 0x08, 0xb4, 0xf7, 0x4b, 0x08, 0xf4, 0xf7, 0x4b, 0x08, 0x4c, 0xf8, 0x4b, 0x08, 0x9c, 0xf8, 0x4b, 0x08 -.byte 0xe4, 0xf8, 0x4b, 0x08, 0x3c, 0xf9, 0x4b, 0x08, 0x94, 0xf9, 0x4b, 0x08, 0xec, 0xf9, 0x4b, 0x08, 0x4c, 0xfa, 0x4b, 0x08, 0xa4, 0xfa, 0x4b, 0x08, 0xfc, 0xfa, 0x4b, 0x08, 0x5c, 0xfb, 0x4b, 0x08 -.byte 0xb4, 0xfb, 0x4b, 0x08, 0x0c, 0xfc, 0x4b, 0x08, 0x64, 0xfc, 0x4b, 0x08, 0xac, 0xfc, 0x4b, 0x08, 0xfc, 0xfc, 0x4b, 0x08, 0x44, 0xfd, 0x4b, 0x08, 0x9c, 0xfd, 0x4b, 0x08, 0xf4, 0xfd, 0x4b, 0x08 -.byte 0x3c, 0xfe, 0x4b, 0x08, 0x8c, 0xfe, 0x4b, 0x08, 0xd4, 0xfe, 0x4b, 0x08, 0x24, 0xff, 0x4b, 0x08, 0x7c, 0xff, 0x4b, 0x08, 0xcc, 0xff, 0x4b, 0x08, 0x14, 0x00, 0x4c, 0x08, 0x4c, 0x00, 0x4c, 0x08 -.byte 0x8c, 0x00, 0x4c, 0x08, 0xc4, 0x00, 0x4c, 0x08, 0xfc, 0x00, 0x4c, 0x08, 0x34, 0x01, 0x4c, 0x08, 0x6c, 0x01, 0x4c, 0x08, 0xb4, 0x01, 0x4c, 0x08, 0xec, 0x01, 0x4c, 0x08, 0x34, 0x02, 0x4c, 0x08 -.byte 0x74, 0x02, 0x4c, 0x08, 0xa4, 0x02, 0x4c, 0x08, 0xe4, 0x02, 0x4c, 0x08, 0x1c, 0x03, 0x4c, 0x08, 0x54, 0x03, 0x4c, 0x08, 0x84, 0x03, 0x4c, 0x08, 0xbc, 0x03, 0x4c, 0x08, 0xe4, 0x03, 0x4c, 0x08 -.byte 0x1c, 0x04, 0x4c, 0x08, 0x4c, 0x04, 0x4c, 0x08, 0x74, 0x04, 0x4c, 0x08, 0xa4, 0x04, 0x4c, 0x08, 0xdc, 0x04, 0x4c, 0x08, 0x0c, 0x05, 0x4c, 0x08, 0x54, 0x05, 0x4c, 0x08, 0x94, 0x05, 0x4c, 0x08 -.byte 0xcc, 0x05, 0x4c, 0x08, 0xfc, 0x05, 0x4c, 0x08, 0x34, 0x06, 0x4c, 0x08, 0x64, 0x06, 0x4c, 0x08, 0xac, 0x06, 0x4c, 0x08, 0xdc, 0x06, 0x4c, 0x08, 0x14, 0x07, 0x4c, 0x08, 0x5c, 0x07, 0x4c, 0x08 -.byte 0x94, 0x07, 0x4c, 0x08, 0xcc, 0x07, 0x4c, 0x08, 0xfc, 0x07, 0x4c, 0x08, 0x2c, 0x08, 0x4c, 0x08, 0x5c, 0x08, 0x4c, 0x08, 0xa4, 0x08, 0x4c, 0x08, 0xe4, 0x08, 0x4c, 0x08, 0x14, 0x09, 0x4c, 0x08 -.byte 0x44, 0x09, 0x4c, 0x08, 0x74, 0x09, 0x4c, 0x08, 0xbc, 0x09, 0x4c, 0x08, 0xf4, 0x09, 0x4c, 0x08, 0x34, 0x0a, 0x4c, 0x08, 0x64, 0x0a, 0x4c, 0x08, 0x84, 0x0a, 0x4c, 0x08, 0xd4, 0x0a, 0x4c, 0x08 -.byte 0x1c, 0x0b, 0x4c, 0x08, 0x6c, 0x0b, 0x4c, 0x08, 0xac, 0x0b, 0x4c, 0x08, 0xfc, 0x0b, 0x4c, 0x08, 0x3c, 0x0c, 0x4c, 0x08, 0x8c, 0x0c, 0x4c, 0x08, 0xd4, 0x0c, 0x4c, 0x08, 0x14, 0x0d, 0x4c, 0x08 -.byte 0x4c, 0x0d, 0x4c, 0x08, 0x84, 0x0d, 0x4c, 0x08, 0xc4, 0x0d, 0x4c, 0x08, 0xfc, 0x0d, 0x4c, 0x08, 0x3c, 0x0e, 0x4c, 0x08, 0x84, 0x0e, 0x4c, 0x08, 0xcc, 0x0e, 0x4c, 0x08, 0x0c, 0x0f, 0x4c, 0x08 -.byte 0x44, 0x0f, 0x4c, 0x08, 0x74, 0x0f, 0x4c, 0x08, 0x9c, 0x0f, 0x4c, 0x08, 0xcc, 0x0f, 0x4c, 0x08, 0xf4, 0x0f, 0x4c, 0x08, 0x14, 0x10, 0x4c, 0x08, 0x4c, 0x10, 0x4c, 0x08, 0x94, 0x10, 0x4c, 0x08 -.byte 0xe4, 0x10, 0x4c, 0x08, 0x1c, 0x11, 0x4c, 0x08, 0x54, 0x11, 0x4c, 0x08, 0x8c, 0x11, 0x4c, 0x08, 0xdc, 0x11, 0x4c, 0x08, 0x2c, 0x12, 0x4c, 0x08, 0x84, 0x12, 0x4c, 0x08, 0xdc, 0x12, 0x4c, 0x08 -.byte 0x24, 0x13, 0x4c, 0x08, 0x7c, 0x13, 0x4c, 0x08, 0xc4, 0x13, 0x4c, 0x08, 0x14, 0x14, 0x4c, 0x08, 0x54, 0x14, 0x4c, 0x08, 0x9c, 0x14, 0x4c, 0x08, 0xe4, 0x14, 0x4c, 0x08, 0x2c, 0x15, 0x4c, 0x08 -.byte 0x74, 0x15, 0x4c, 0x08, 0xbc, 0x15, 0x4c, 0x08, 0x04, 0x16, 0x4c, 0x08, 0x4c, 0x16, 0x4c, 0x08, 0x94, 0x16, 0x4c, 0x08, 0xe4, 0x16, 0x4c, 0x08, 0x34, 0x17, 0x4c, 0x08, 0x84, 0x17, 0x4c, 0x08 -.byte 0xdc, 0x17, 0x4c, 0x08, 0x2c, 0x18, 0x4c, 0x08, 0x6c, 0x18, 0x4c, 0x08, 0xb4, 0x18, 0x4c, 0x08, 0x0c, 0x19, 0x4c, 0x08, 0x5c, 0x19, 0x4c, 0x08, 0xac, 0x19, 0x4c, 0x08, 0xfc, 0x19, 0x4c, 0x08 -.byte 0x4c, 0x1a, 0x4c, 0x08, 0x9c, 0x1a, 0x4c, 0x08, 0xec, 0x1a, 0x4c, 0x08, 0x34, 0x1b, 0x4c, 0x08, 0x8c, 0x1b, 0x4c, 0x08, 0xdc, 0x1b, 0x4c, 0x08, 0x24, 0x1c, 0x4c, 0x08, 0x7c, 0x1c, 0x4c, 0x08 -.byte 0xcc, 0x1c, 0x4c, 0x08, 0x14, 0x1d, 0x4c, 0x08, 0x54, 0x1d, 0x4c, 0x08, 0x94, 0x1d, 0x4c, 0x08, 0xe4, 0x1d, 0x4c, 0x08, 0x3c, 0x1e, 0x4c, 0x08, 0x94, 0x1e, 0x4c, 0x08, 0xdc, 0x1e, 0x4c, 0x08 -.byte 0x34, 0x1f, 0x4c, 0x08, 0x8c, 0x1f, 0x4c, 0x08, 0xe4, 0x1f, 0x4c, 0x08, 0x3c, 0x20, 0x4c, 0x08, 0x8c, 0x20, 0x4c, 0x08, 0xdc, 0x20, 0x4c, 0x08, 0x24, 0x21, 0x4c, 0x08, 0x7c, 0x21, 0x4c, 0x08 -.byte 0xd4, 0x21, 0x4c, 0x08, 0x2c, 0x22, 0x4c, 0x08, 0x84, 0x22, 0x4c, 0x08, 0xdc, 0x22, 0x4c, 0x08, 0x34, 0x23, 0x4c, 0x08, 0x7c, 0x23, 0x4c, 0x08, 0xbc, 0x23, 0x4c, 0x08, 0xf4, 0x23, 0x4c, 0x08 -.byte 0x3c, 0x24, 0x4c, 0x08, 0x8c, 0x24, 0x4c, 0x08, 0xdc, 0x24, 0x4c, 0x08, 0x34, 0x25, 0x4c, 0x08, 0x8c, 0x25, 0x4c, 0x08, 0xdc, 0x25, 0x4c, 0x08, 0x24, 0x26, 0x4c, 0x08, 0x64, 0x26, 0x4c, 0x08 -.byte 0xac, 0x26, 0x4c, 0x08, 0xec, 0x26, 0x4c, 0x08, 0x2c, 0x27, 0x4c, 0x08, 0x74, 0x27, 0x4c, 0x08, 0xac, 0x27, 0x4c, 0x08, 0xf4, 0x27, 0x4c, 0x08, 0x44, 0x28, 0x4c, 0x08, 0x84, 0x28, 0x4c, 0x08 -.byte 0xd4, 0x28, 0x4c, 0x08, 0x1c, 0x29, 0x4c, 0x08, 0x6c, 0x29, 0x4c, 0x08, 0xbc, 0x29, 0x4c, 0x08, 0x0c, 0x2a, 0x4c, 0x08, 0x54, 0x2a, 0x4c, 0x08 +.byte 0x84, 0x80, 0x4b, 0x08 +.byte 0xc4, 0x80, 0x4b, 0x08 +.byte 0xf4, 0x80, 0x4b, 0x08 +.byte 0x2c, 0x81, 0x4b, 0x08 +.byte 0x54, 0x81, 0x4b, 0x08 +.byte 0x9c, 0x81, 0x4b, 0x08 +.byte 0xd4, 0x81, 0x4b, 0x08 +.byte 0x0c, 0x82, 0x4b, 0x08 +.byte 0x54, 0x82, 0x4b, 0x08 +.byte 0x94, 0x82, 0x4b, 0x08 +.byte 0xd4, 0x82, 0x4b, 0x08 +.byte 0x0c, 0x83, 0x4b, 0x08 +.byte 0x44, 0x83, 0x4b, 0x08 +.byte 0x7c, 0x83, 0x4b, 0x08 +.byte 0xac, 0x83, 0x4b, 0x08 +.byte 0xdc, 0x83, 0x4b, 0x08 +.byte 0xfc, 0x83, 0x4b, 0x08 +.byte 0x2c, 0x84, 0x4b, 0x08 +.byte 0x64, 0x84, 0x4b, 0x08 +.byte 0xa4, 0x84, 0x4b, 0x08 +.byte 0xec, 0x84, 0x4b, 0x08 +.byte 0x24, 0x85, 0x4b, 0x08 +.byte 0x64, 0x85, 0x4b, 0x08 +.byte 0x94, 0x85, 0x4b, 0x08 +.byte 0xc4, 0x85, 0x4b, 0x08 +.byte 0x0c, 0x86, 0x4b, 0x08 +.byte 0x44, 0x86, 0x4b, 0x08 +.byte 0x84, 0x86, 0x4b, 0x08 +.byte 0xc4, 0x86, 0x4b, 0x08 +.byte 0x04, 0x87, 0x4b, 0x08 +.byte 0x4c, 0x87, 0x4b, 0x08 +.byte 0x8c, 0x87, 0x4b, 0x08 +.byte 0xcc, 0x87, 0x4b, 0x08 +.byte 0x0c, 0x88, 0x4b, 0x08 +.byte 0x4c, 0x88, 0x4b, 0x08 +.byte 0x8c, 0x88, 0x4b, 0x08 +.byte 0xbc, 0x88, 0x4b, 0x08 +.byte 0xe4, 0x88, 0x4b, 0x08 +.byte 0x1c, 0x89, 0x4b, 0x08 +.byte 0x4c, 0x89, 0x4b, 0x08 +.byte 0x74, 0x89, 0x4b, 0x08 +.byte 0xa4, 0x89, 0x4b, 0x08 +.byte 0xe4, 0x89, 0x4b, 0x08 +.byte 0x1c, 0x8a, 0x4b, 0x08 +.byte 0x64, 0x8a, 0x4b, 0x08 +.byte 0xa4, 0x8a, 0x4b, 0x08 +.byte 0xdc, 0x8a, 0x4b, 0x08 +.byte 0x1c, 0x8b, 0x4b, 0x08 +.byte 0x5c, 0x8b, 0x4b, 0x08 +.byte 0x94, 0x8b, 0x4b, 0x08 +.byte 0xc4, 0x8b, 0x4b, 0x08 +.byte 0xf4, 0x8b, 0x4b, 0x08 +.byte 0x1c, 0x8c, 0x4b, 0x08 +.byte 0x4c, 0x8c, 0x4b, 0x08 +.byte 0x7c, 0x8c, 0x4b, 0x08 +.byte 0xac, 0x8c, 0x4b, 0x08 +.byte 0xdc, 0x8c, 0x4b, 0x08 +.byte 0x14, 0x8d, 0x4b, 0x08 +.byte 0x54, 0x8d, 0x4b, 0x08 +.byte 0x8c, 0x8d, 0x4b, 0x08 +.byte 0xbc, 0x8d, 0x4b, 0x08 +.byte 0xdc, 0x8d, 0x4b, 0x08 +.byte 0x04, 0x8e, 0x4b, 0x08 +.byte 0x44, 0x8e, 0x4b, 0x08 +.byte 0x8c, 0x8e, 0x4b, 0x08 +.byte 0xcc, 0x8e, 0x4b, 0x08 +.byte 0x14, 0x8f, 0x4b, 0x08 +.byte 0x54, 0x8f, 0x4b, 0x08 +.byte 0x94, 0x8f, 0x4b, 0x08 +.byte 0xcc, 0x8f, 0x4b, 0x08 +.byte 0xec, 0x8f, 0x4b, 0x08 +.byte 0x2c, 0x90, 0x4b, 0x08 +.byte 0x74, 0x90, 0x4b, 0x08 +.byte 0xac, 0x90, 0x4b, 0x08 +.byte 0xdc, 0x90, 0x4b, 0x08 +.byte 0x0c, 0x91, 0x4b, 0x08 +.byte 0x3c, 0x91, 0x4b, 0x08 +.byte 0x6c, 0x91, 0x4b, 0x08 +.byte 0xa4, 0x91, 0x4b, 0x08 +.byte 0xe4, 0x91, 0x4b, 0x08 +.byte 0x1c, 0x92, 0x4b, 0x08 +.byte 0x44, 0x92, 0x4b, 0x08 +.byte 0x7c, 0x92, 0x4b, 0x08 +.byte 0xac, 0x92, 0x4b, 0x08 +.byte 0xcc, 0x92, 0x4b, 0x08 +.byte 0xfc, 0x92, 0x4b, 0x08 +.byte 0x2c, 0x93, 0x4b, 0x08 +.byte 0x54, 0x93, 0x4b, 0x08 +.byte 0x84, 0x93, 0x4b, 0x08 +.byte 0xbc, 0x93, 0x4b, 0x08 +.byte 0xec, 0x93, 0x4b, 0x08 +.byte 0x24, 0x94, 0x4b, 0x08 +.byte 0x54, 0x94, 0x4b, 0x08 +.byte 0x8c, 0x94, 0x4b, 0x08 +.byte 0xbc, 0x94, 0x4b, 0x08 +.byte 0xf4, 0x94, 0x4b, 0x08 +.byte 0x24, 0x95, 0x4b, 0x08 +.byte 0x54, 0x95, 0x4b, 0x08 +.byte 0x84, 0x95, 0x4b, 0x08 +.byte 0xc4, 0x95, 0x4b, 0x08 +.byte 0x1c, 0x96, 0x4b, 0x08 +.byte 0x74, 0x96, 0x4b, 0x08 +.byte 0xbc, 0x96, 0x4b, 0x08 +.byte 0x0c, 0x97, 0x4b, 0x08 +.byte 0x54, 0x97, 0x4b, 0x08 +.byte 0x94, 0x97, 0x4b, 0x08 +.byte 0xc4, 0x97, 0x4b, 0x08 +.byte 0xfc, 0x97, 0x4b, 0x08 +.byte 0x3c, 0x98, 0x4b, 0x08 +.byte 0x7c, 0x98, 0x4b, 0x08 +.byte 0xc4, 0x98, 0x4b, 0x08 +.byte 0x0c, 0x99, 0x4b, 0x08 +.byte 0x4c, 0x99, 0x4b, 0x08 +.byte 0x74, 0x99, 0x4b, 0x08 +.byte 0x94, 0x99, 0x4b, 0x08 +.byte 0xcc, 0x99, 0x4b, 0x08 +.byte 0x0c, 0x9a, 0x4b, 0x08 +.byte 0x54, 0x9a, 0x4b, 0x08 +.byte 0x94, 0x9a, 0x4b, 0x08 +.byte 0xcc, 0x9a, 0x4b, 0x08 +.byte 0xfc, 0x9a, 0x4b, 0x08 +.byte 0x34, 0x9b, 0x4b, 0x08 +.byte 0x6c, 0x9b, 0x4b, 0x08 +.byte 0xa4, 0x9b, 0x4b, 0x08 +.byte 0xe4, 0x9b, 0x4b, 0x08 +.byte 0x14, 0x9c, 0x4b, 0x08 +.byte 0x4c, 0x9c, 0x4b, 0x08 +.byte 0x7c, 0x9c, 0x4b, 0x08 +.byte 0xac, 0x9c, 0x4b, 0x08 +.byte 0xe4, 0x9c, 0x4b, 0x08 +.byte 0x14, 0x9d, 0x4b, 0x08 +.byte 0x44, 0x9d, 0x4b, 0x08 +.byte 0x7c, 0x9d, 0x4b, 0x08 +.byte 0x9c, 0x9d, 0x4b, 0x08 +.byte 0xcc, 0x9d, 0x4b, 0x08 +.byte 0x14, 0x9e, 0x4b, 0x08 +.byte 0x64, 0x9e, 0x4b, 0x08 +.byte 0xac, 0x9e, 0x4b, 0x08 +.byte 0xfc, 0x9e, 0x4b, 0x08 +.byte 0x3c, 0x9f, 0x4b, 0x08 +.byte 0x6c, 0x9f, 0x4b, 0x08 +.byte 0xac, 0x9f, 0x4b, 0x08 +.byte 0x0c, 0xa0, 0x4b, 0x08 +.byte 0x54, 0xa0, 0x4b, 0x08 +.byte 0xa4, 0xa0, 0x4b, 0x08 +.byte 0xf4, 0xa0, 0x4b, 0x08 +.byte 0x3c, 0xa1, 0x4b, 0x08 +.byte 0x6c, 0xa1, 0x4b, 0x08 +.byte 0x9c, 0xa1, 0x4b, 0x08 +.byte 0xd4, 0xa1, 0x4b, 0x08 +.byte 0x1c, 0xa2, 0x4b, 0x08 +.byte 0x54, 0xa2, 0x4b, 0x08 +.byte 0x8c, 0xa2, 0x4b, 0x08 +.byte 0xbc, 0xa2, 0x4b, 0x08 +.byte 0xfc, 0xa2, 0x4b, 0x08 +.byte 0x2c, 0xa3, 0x4b, 0x08 +.byte 0x5c, 0xa3, 0x4b, 0x08 +.byte 0x94, 0xa3, 0x4b, 0x08 +.byte 0xcc, 0xa3, 0x4b, 0x08 +.byte 0xfc, 0xa3, 0x4b, 0x08 +.byte 0x34, 0xa4, 0x4b, 0x08 +.byte 0x74, 0xa4, 0x4b, 0x08 +.byte 0xc4, 0xa4, 0x4b, 0x08 +.byte 0x0c, 0xa5, 0x4b, 0x08 +.byte 0x4c, 0xa5, 0x4b, 0x08 +.byte 0x8c, 0xa5, 0x4b, 0x08 +.byte 0xbc, 0xa5, 0x4b, 0x08 +.byte 0xec, 0xa5, 0x4b, 0x08 +.byte 0x24, 0xa6, 0x4b, 0x08 +.byte 0x54, 0xa6, 0x4b, 0x08 +.byte 0x84, 0xa6, 0x4b, 0x08 +.byte 0xac, 0xa6, 0x4b, 0x08 +.byte 0xcc, 0xa6, 0x4b, 0x08 +.byte 0x04, 0xa7, 0x4b, 0x08 +.byte 0x5c, 0xa7, 0x4b, 0x08 +.byte 0xa4, 0xa7, 0x4b, 0x08 +.byte 0xec, 0xa7, 0x4b, 0x08 +.byte 0x24, 0xa8, 0x4b, 0x08 +.byte 0x54, 0xa8, 0x4b, 0x08 +.byte 0x8c, 0xa8, 0x4b, 0x08 +.byte 0xbc, 0xa8, 0x4b, 0x08 +.byte 0xe4, 0xa8, 0x4b, 0x08 +.byte 0x04, 0xa9, 0x4b, 0x08 +.byte 0x44, 0xa9, 0x4b, 0x08 +.byte 0x84, 0xa9, 0x4b, 0x08 +.byte 0xc4, 0xa9, 0x4b, 0x08 +.byte 0xf4, 0xa9, 0x4b, 0x08 +.byte 0x24, 0xaa, 0x4b, 0x08 +.byte 0x54, 0xaa, 0x4b, 0x08 +.byte 0x84, 0xaa, 0x4b, 0x08 +.byte 0xbc, 0xaa, 0x4b, 0x08 +.byte 0xf4, 0xaa, 0x4b, 0x08 +.byte 0x34, 0xab, 0x4b, 0x08 +.byte 0x6c, 0xab, 0x4b, 0x08 +.byte 0x9c, 0xab, 0x4b, 0x08 +.byte 0xbc, 0xab, 0x4b, 0x08 +.byte 0x04, 0xac, 0x4b, 0x08 +.byte 0x3c, 0xac, 0x4b, 0x08 +.byte 0x74, 0xac, 0x4b, 0x08 +.byte 0xa4, 0xac, 0x4b, 0x08 +.byte 0xe4, 0xac, 0x4b, 0x08 +.byte 0x1c, 0xad, 0x4b, 0x08 +.byte 0x5c, 0xad, 0x4b, 0x08 +.byte 0x94, 0xad, 0x4b, 0x08 +.byte 0xc4, 0xad, 0x4b, 0x08 +.byte 0xf4, 0xad, 0x4b, 0x08 +.byte 0x1c, 0xae, 0x4b, 0x08 +.byte 0x54, 0xae, 0x4b, 0x08 +.byte 0x94, 0xae, 0x4b, 0x08 +.byte 0xdc, 0xae, 0x4b, 0x08 +.byte 0x2c, 0xaf, 0x4b, 0x08 +.byte 0x74, 0xaf, 0x4b, 0x08 +.byte 0xb4, 0xaf, 0x4b, 0x08 +.byte 0xfc, 0xaf, 0x4b, 0x08 +.byte 0x3c, 0xb0, 0x4b, 0x08 +.byte 0x74, 0xb0, 0x4b, 0x08 +.byte 0xb4, 0xb0, 0x4b, 0x08 +.byte 0xec, 0xb0, 0x4b, 0x08 +.byte 0x2c, 0xb1, 0x4b, 0x08 +.byte 0x74, 0xb1, 0x4b, 0x08 +.byte 0xb4, 0xb1, 0x4b, 0x08 +.byte 0xe4, 0xb1, 0x4b, 0x08 +.byte 0x0c, 0xb2, 0x4b, 0x08 +.byte 0x3c, 0xb2, 0x4b, 0x08 +.byte 0x6c, 0xb2, 0x4b, 0x08 +.byte 0xa4, 0xb2, 0x4b, 0x08 +.byte 0xe4, 0xb2, 0x4b, 0x08 +.byte 0x24, 0xb3, 0x4b, 0x08 +.byte 0x64, 0xb3, 0x4b, 0x08 +.byte 0xac, 0xb3, 0x4b, 0x08 +.byte 0xec, 0xb3, 0x4b, 0x08 +.byte 0x1c, 0xb4, 0x4b, 0x08 +.byte 0x44, 0xb4, 0x4b, 0x08 +.byte 0x74, 0xb4, 0x4b, 0x08 +.byte 0x9c, 0xb4, 0x4b, 0x08 +.byte 0xcc, 0xb4, 0x4b, 0x08 +.byte 0xf4, 0xb4, 0x4b, 0x08 +.byte 0x3c, 0xb5, 0x4b, 0x08 +.byte 0x8c, 0xb5, 0x4b, 0x08 +.byte 0xcc, 0xb5, 0x4b, 0x08 +.byte 0x04, 0xb6, 0x4b, 0x08 +.byte 0x34, 0xb6, 0x4b, 0x08 +.byte 0x5c, 0xb6, 0x4b, 0x08 +.byte 0x94, 0xb6, 0x4b, 0x08 +.byte 0xd4, 0xb6, 0x4b, 0x08 +.byte 0x14, 0xb7, 0x4b, 0x08 +.byte 0x4c, 0xb7, 0x4b, 0x08 +.byte 0x84, 0xb7, 0x4b, 0x08 +.byte 0xb4, 0xb7, 0x4b, 0x08 +.byte 0xe4, 0xb7, 0x4b, 0x08 +.byte 0x1c, 0xb8, 0x4b, 0x08 +.byte 0x4c, 0xb8, 0x4b, 0x08 +.byte 0x84, 0xb8, 0x4b, 0x08 +.byte 0xbc, 0xb8, 0x4b, 0x08 +.byte 0xe4, 0xb8, 0x4b, 0x08 +.byte 0x0c, 0xb9, 0x4b, 0x08 +.byte 0x44, 0xb9, 0x4b, 0x08 +.byte 0x6c, 0xb9, 0x4b, 0x08 +.byte 0x94, 0xb9, 0x4b, 0x08 +.byte 0xc4, 0xb9, 0x4b, 0x08 +.byte 0xfc, 0xb9, 0x4b, 0x08 +.byte 0x34, 0xba, 0x4b, 0x08 +.byte 0x6c, 0xba, 0x4b, 0x08 +.byte 0x94, 0xba, 0x4b, 0x08 +.byte 0xdc, 0xba, 0x4b, 0x08 +.byte 0x24, 0xbb, 0x4b, 0x08 +.byte 0x64, 0xbb, 0x4b, 0x08 +.byte 0xa4, 0xbb, 0x4b, 0x08 +.byte 0xfc, 0xbb, 0x4b, 0x08 +.byte 0x54, 0xbc, 0x4b, 0x08 +.byte 0x9c, 0xbc, 0x4b, 0x08 +.byte 0xcc, 0xbc, 0x4b, 0x08 +.byte 0xfc, 0xbc, 0x4b, 0x08 +.byte 0x3c, 0xbd, 0x4b, 0x08 +.byte 0x74, 0xbd, 0x4b, 0x08 +.byte 0xb4, 0xbd, 0x4b, 0x08 +.byte 0xfc, 0xbd, 0x4b, 0x08 +.byte 0x4c, 0xbe, 0x4b, 0x08 +.byte 0x8c, 0xbe, 0x4b, 0x08 +.byte 0xcc, 0xbe, 0x4b, 0x08 +.byte 0x14, 0xbf, 0x4b, 0x08 +.byte 0x54, 0xbf, 0x4b, 0x08 +.byte 0x8c, 0xbf, 0x4b, 0x08 +.byte 0xd4, 0xbf, 0x4b, 0x08 +.byte 0x14, 0xc0, 0x4b, 0x08 +.byte 0x6c, 0xc0, 0x4b, 0x08 +.byte 0xbc, 0xc0, 0x4b, 0x08 +.byte 0x04, 0xc1, 0x4b, 0x08 +.byte 0x3c, 0xc1, 0x4b, 0x08 +.byte 0x84, 0xc1, 0x4b, 0x08 +.byte 0xd4, 0xc1, 0x4b, 0x08 +.byte 0x1c, 0xc2, 0x4b, 0x08 +.byte 0x64, 0xc2, 0x4b, 0x08 +.byte 0x9c, 0xc2, 0x4b, 0x08 +.byte 0xc4, 0xc2, 0x4b, 0x08 +.byte 0xf4, 0xc2, 0x4b, 0x08 +.byte 0x2c, 0xc3, 0x4b, 0x08 +.byte 0x5c, 0xc3, 0x4b, 0x08 +.byte 0x94, 0xc3, 0x4b, 0x08 +.byte 0xd4, 0xc3, 0x4b, 0x08 +.byte 0x14, 0xc4, 0x4b, 0x08 +.byte 0x54, 0xc4, 0x4b, 0x08 +.byte 0x94, 0xc4, 0x4b, 0x08 +.byte 0xd4, 0xc4, 0x4b, 0x08 +.byte 0x0c, 0xc5, 0x4b, 0x08 +.byte 0x44, 0xc5, 0x4b, 0x08 +.byte 0x84, 0xc5, 0x4b, 0x08 +.byte 0xcc, 0xc5, 0x4b, 0x08 +.byte 0xfc, 0xc5, 0x4b, 0x08 +.byte 0x2c, 0xc6, 0x4b, 0x08 +.byte 0x64, 0xc6, 0x4b, 0x08 +.byte 0xa4, 0xc6, 0x4b, 0x08 +.byte 0xdc, 0xc6, 0x4b, 0x08 +.byte 0x14, 0xc7, 0x4b, 0x08 +.byte 0x54, 0xc7, 0x4b, 0x08 +.byte 0x8c, 0xc7, 0x4b, 0x08 +.byte 0xbc, 0xc7, 0x4b, 0x08 +.byte 0xfc, 0xc7, 0x4b, 0x08 +.byte 0x3c, 0xc8, 0x4b, 0x08 +.byte 0x7c, 0xc8, 0x4b, 0x08 +.byte 0xb4, 0xc8, 0x4b, 0x08 +.byte 0xe4, 0xc8, 0x4b, 0x08 +.byte 0x24, 0xc9, 0x4b, 0x08 +.byte 0x5c, 0xc9, 0x4b, 0x08 +.byte 0xa4, 0xc9, 0x4b, 0x08 +.byte 0xd4, 0xc9, 0x4b, 0x08 +.byte 0x0c, 0xca, 0x4b, 0x08 +.byte 0x54, 0xca, 0x4b, 0x08 +.byte 0x8c, 0xca, 0x4b, 0x08 +.byte 0xcc, 0xca, 0x4b, 0x08 +.byte 0x1c, 0xcb, 0x4b, 0x08 +.byte 0x4c, 0xcb, 0x4b, 0x08 +.byte 0x84, 0xcb, 0x4b, 0x08 +.byte 0xc4, 0xcb, 0x4b, 0x08 +.byte 0xfc, 0xcb, 0x4b, 0x08 +.byte 0x2c, 0xcc, 0x4b, 0x08 +.byte 0x5c, 0xcc, 0x4b, 0x08 +.byte 0xa4, 0xcc, 0x4b, 0x08 +.byte 0xf4, 0xcc, 0x4b, 0x08 +.byte 0x2c, 0xcd, 0x4b, 0x08 +.byte 0x64, 0xcd, 0x4b, 0x08 +.byte 0x9c, 0xcd, 0x4b, 0x08 +.byte 0xdc, 0xcd, 0x4b, 0x08 +.byte 0x14, 0xce, 0x4b, 0x08 +.byte 0x44, 0xce, 0x4b, 0x08 +.byte 0x74, 0xce, 0x4b, 0x08 +.byte 0xac, 0xce, 0x4b, 0x08 +.byte 0xfc, 0xce, 0x4b, 0x08 +.byte 0x4c, 0xcf, 0x4b, 0x08 +.byte 0x9c, 0xcf, 0x4b, 0x08 +.byte 0xe4, 0xcf, 0x4b, 0x08 +.byte 0x2c, 0xd0, 0x4b, 0x08 +.byte 0x74, 0xd0, 0x4b, 0x08 +.byte 0xb4, 0xd0, 0x4b, 0x08 +.byte 0xec, 0xd0, 0x4b, 0x08 +.byte 0x1c, 0xd1, 0x4b, 0x08 +.byte 0x54, 0xd1, 0x4b, 0x08 +.byte 0x8c, 0xd1, 0x4b, 0x08 +.byte 0xc4, 0xd1, 0x4b, 0x08 +.byte 0x04, 0xd2, 0x4b, 0x08 +.byte 0x3c, 0xd2, 0x4b, 0x08 +.byte 0x74, 0xd2, 0x4b, 0x08 +.byte 0xb4, 0xd2, 0x4b, 0x08 +.byte 0xe4, 0xd2, 0x4b, 0x08 +.byte 0x14, 0xd3, 0x4b, 0x08 +.byte 0x54, 0xd3, 0x4b, 0x08 +.byte 0xa4, 0xd3, 0x4b, 0x08 +.byte 0xfc, 0xd3, 0x4b, 0x08 +.byte 0x4c, 0xd4, 0x4b, 0x08 +.byte 0x9c, 0xd4, 0x4b, 0x08 +.byte 0xe4, 0xd4, 0x4b, 0x08 +.byte 0x2c, 0xd5, 0x4b, 0x08 +.byte 0x7c, 0xd5, 0x4b, 0x08 +.byte 0xbc, 0xd5, 0x4b, 0x08 +.byte 0xf4, 0xd5, 0x4b, 0x08 +.byte 0x2c, 0xd6, 0x4b, 0x08 +.byte 0x74, 0xd6, 0x4b, 0x08 +.byte 0xb4, 0xd6, 0x4b, 0x08 +.byte 0xdc, 0xd6, 0x4b, 0x08 +.byte 0x0c, 0xd7, 0x4b, 0x08 +.byte 0x44, 0xd7, 0x4b, 0x08 +.byte 0x74, 0xd7, 0x4b, 0x08 +.byte 0xc4, 0xd7, 0x4b, 0x08 +.byte 0x04, 0xd8, 0x4b, 0x08 +.byte 0x64, 0xd8, 0x4b, 0x08 +.byte 0xac, 0xd8, 0x4b, 0x08 +.byte 0xfc, 0xd8, 0x4b, 0x08 +.byte 0x54, 0xd9, 0x4b, 0x08 +.byte 0x94, 0xd9, 0x4b, 0x08 +.byte 0xf4, 0xd9, 0x4b, 0x08 +.byte 0x3c, 0xda, 0x4b, 0x08 +.byte 0x8c, 0xda, 0x4b, 0x08 +.byte 0xdc, 0xda, 0x4b, 0x08 +.byte 0x34, 0xdb, 0x4b, 0x08 +.byte 0x74, 0xdb, 0x4b, 0x08 +.byte 0xb4, 0xdb, 0x4b, 0x08 +.byte 0x0c, 0xdc, 0x4b, 0x08 +.byte 0x54, 0xdc, 0x4b, 0x08 +.byte 0x9c, 0xdc, 0x4b, 0x08 +.byte 0xc4, 0xdc, 0x4b, 0x08 +.byte 0x04, 0xdd, 0x4b, 0x08 +.byte 0x3c, 0xdd, 0x4b, 0x08 +.byte 0x64, 0xdd, 0x4b, 0x08 +.byte 0x94, 0xdd, 0x4b, 0x08 +.byte 0xd4, 0xdd, 0x4b, 0x08 +.byte 0xfc, 0xdd, 0x4b, 0x08 +.byte 0x2c, 0xde, 0x4b, 0x08 +.byte 0x64, 0xde, 0x4b, 0x08 +.byte 0x94, 0xde, 0x4b, 0x08 +.byte 0xcc, 0xde, 0x4b, 0x08 +.byte 0xfc, 0xde, 0x4b, 0x08 +.byte 0x24, 0xdf, 0x4b, 0x08 +.byte 0x5c, 0xdf, 0x4b, 0x08 +.byte 0x84, 0xdf, 0x4b, 0x08 +.byte 0xac, 0xdf, 0x4b, 0x08 +.byte 0xdc, 0xdf, 0x4b, 0x08 +.byte 0x14, 0xe0, 0x4b, 0x08 +.byte 0x44, 0xe0, 0x4b, 0x08 +.byte 0x7c, 0xe0, 0x4b, 0x08 +.byte 0xa4, 0xe0, 0x4b, 0x08 +.byte 0xd4, 0xe0, 0x4b, 0x08 +.byte 0xfc, 0xe0, 0x4b, 0x08 +.byte 0x2c, 0xe1, 0x4b, 0x08 +.byte 0x5c, 0xe1, 0x4b, 0x08 +.byte 0x84, 0xe1, 0x4b, 0x08 +.byte 0xb4, 0xe1, 0x4b, 0x08 +.byte 0xdc, 0xe1, 0x4b, 0x08 +.byte 0x14, 0xe2, 0x4b, 0x08 +.byte 0x4c, 0xe2, 0x4b, 0x08 +.byte 0x74, 0xe2, 0x4b, 0x08 +.byte 0xa4, 0xe2, 0x4b, 0x08 +.byte 0xec, 0xe2, 0x4b, 0x08 +.byte 0x2c, 0xe3, 0x4b, 0x08 +.byte 0x74, 0xe3, 0x4b, 0x08 +.byte 0xb4, 0xe3, 0x4b, 0x08 +.byte 0xfc, 0xe3, 0x4b, 0x08 +.byte 0x44, 0xe4, 0x4b, 0x08 +.byte 0x94, 0xe4, 0x4b, 0x08 +.byte 0xdc, 0xe4, 0x4b, 0x08 +.byte 0x24, 0xe5, 0x4b, 0x08 +.byte 0x44, 0xe5, 0x4b, 0x08 +.byte 0x84, 0xe5, 0x4b, 0x08 +.byte 0xcc, 0xe5, 0x4b, 0x08 +.byte 0x0c, 0xe6, 0x4b, 0x08 +.byte 0x44, 0xe6, 0x4b, 0x08 +.byte 0x7c, 0xe6, 0x4b, 0x08 +.byte 0xb4, 0xe6, 0x4b, 0x08 +.byte 0xf4, 0xe6, 0x4b, 0x08 +.byte 0x2c, 0xe7, 0x4b, 0x08 +.byte 0x64, 0xe7, 0x4b, 0x08 +.byte 0x9c, 0xe7, 0x4b, 0x08 +.byte 0xcc, 0xe7, 0x4b, 0x08 +.byte 0x04, 0xe8, 0x4b, 0x08 +.byte 0x4c, 0xe8, 0x4b, 0x08 +.byte 0x8c, 0xe8, 0x4b, 0x08 +.byte 0xc4, 0xe8, 0x4b, 0x08 +.byte 0x1c, 0xe9, 0x4b, 0x08 +.byte 0x7c, 0xe9, 0x4b, 0x08 +.byte 0xd4, 0xe9, 0x4b, 0x08 +.byte 0x1c, 0xea, 0x4b, 0x08 +.byte 0x7c, 0xea, 0x4b, 0x08 +.byte 0xd4, 0xea, 0x4b, 0x08 +.byte 0x2c, 0xeb, 0x4b, 0x08 +.byte 0x84, 0xeb, 0x4b, 0x08 +.byte 0xdc, 0xeb, 0x4b, 0x08 +.byte 0x34, 0xec, 0x4b, 0x08 +.byte 0x94, 0xec, 0x4b, 0x08 +.byte 0xcc, 0xec, 0x4b, 0x08 +.byte 0x0c, 0xed, 0x4b, 0x08 +.byte 0x4c, 0xed, 0x4b, 0x08 +.byte 0x8c, 0xed, 0x4b, 0x08 +.byte 0xd4, 0xed, 0x4b, 0x08 +.byte 0x14, 0xee, 0x4b, 0x08 +.byte 0x4c, 0xee, 0x4b, 0x08 +.byte 0x84, 0xee, 0x4b, 0x08 +.byte 0xc4, 0xee, 0x4b, 0x08 +.byte 0x0c, 0xef, 0x4b, 0x08 +.byte 0x4c, 0xef, 0x4b, 0x08 +.byte 0x8c, 0xef, 0x4b, 0x08 +.byte 0xcc, 0xef, 0x4b, 0x08 +.byte 0x0c, 0xf0, 0x4b, 0x08 +.byte 0x44, 0xf0, 0x4b, 0x08 +.byte 0x84, 0xf0, 0x4b, 0x08 +.byte 0xbc, 0xf0, 0x4b, 0x08 +.byte 0xfc, 0xf0, 0x4b, 0x08 +.byte 0x34, 0xf1, 0x4b, 0x08 +.byte 0x74, 0xf1, 0x4b, 0x08 +.byte 0xc4, 0xf1, 0x4b, 0x08 +.byte 0x0c, 0xf2, 0x4b, 0x08 +.byte 0x5c, 0xf2, 0x4b, 0x08 +.byte 0xac, 0xf2, 0x4b, 0x08 +.byte 0xec, 0xf2, 0x4b, 0x08 +.byte 0x3c, 0xf3, 0x4b, 0x08 +.byte 0x7c, 0xf3, 0x4b, 0x08 +.byte 0xb4, 0xf3, 0x4b, 0x08 +.byte 0xfc, 0xf3, 0x4b, 0x08 +.byte 0x4c, 0xf4, 0x4b, 0x08 +.byte 0x9c, 0xf4, 0x4b, 0x08 +.byte 0xec, 0xf4, 0x4b, 0x08 +.byte 0x34, 0xf5, 0x4b, 0x08 +.byte 0x6c, 0xf5, 0x4b, 0x08 +.byte 0xa4, 0xf5, 0x4b, 0x08 +.byte 0xdc, 0xf5, 0x4b, 0x08 +.byte 0x1c, 0xf6, 0x4b, 0x08 +.byte 0x6c, 0xf6, 0x4b, 0x08 +.byte 0xbc, 0xf6, 0x4b, 0x08 +.byte 0x14, 0xf7, 0x4b, 0x08 +.byte 0x64, 0xf7, 0x4b, 0x08 +.byte 0xb4, 0xf7, 0x4b, 0x08 +.byte 0xf4, 0xf7, 0x4b, 0x08 +.byte 0x4c, 0xf8, 0x4b, 0x08 +.byte 0x9c, 0xf8, 0x4b, 0x08 +.byte 0xe4, 0xf8, 0x4b, 0x08 +.byte 0x3c, 0xf9, 0x4b, 0x08 +.byte 0x94, 0xf9, 0x4b, 0x08 +.byte 0xec, 0xf9, 0x4b, 0x08 +.byte 0x4c, 0xfa, 0x4b, 0x08 +.byte 0xa4, 0xfa, 0x4b, 0x08 +.byte 0xfc, 0xfa, 0x4b, 0x08 +.byte 0x5c, 0xfb, 0x4b, 0x08 +.byte 0xb4, 0xfb, 0x4b, 0x08 +.byte 0x0c, 0xfc, 0x4b, 0x08 +.byte 0x64, 0xfc, 0x4b, 0x08 +.byte 0xac, 0xfc, 0x4b, 0x08 +.byte 0xfc, 0xfc, 0x4b, 0x08 +.byte 0x44, 0xfd, 0x4b, 0x08 +.byte 0x9c, 0xfd, 0x4b, 0x08 +.byte 0xf4, 0xfd, 0x4b, 0x08 +.byte 0x3c, 0xfe, 0x4b, 0x08 +.byte 0x8c, 0xfe, 0x4b, 0x08 +.byte 0xd4, 0xfe, 0x4b, 0x08 +.byte 0x24, 0xff, 0x4b, 0x08 +.byte 0x7c, 0xff, 0x4b, 0x08 +.byte 0xcc, 0xff, 0x4b, 0x08 +.byte 0x14, 0x00, 0x4c, 0x08 +.byte 0x4c, 0x00, 0x4c, 0x08 +.byte 0x8c, 0x00, 0x4c, 0x08 +.byte 0xc4, 0x00, 0x4c, 0x08 +.byte 0xfc, 0x00, 0x4c, 0x08 +.byte 0x34, 0x01, 0x4c, 0x08 +.byte 0x6c, 0x01, 0x4c, 0x08 +.byte 0xb4, 0x01, 0x4c, 0x08 +.byte 0xec, 0x01, 0x4c, 0x08 +.byte 0x34, 0x02, 0x4c, 0x08 +.byte 0x74, 0x02, 0x4c, 0x08 +.byte 0xa4, 0x02, 0x4c, 0x08 +.byte 0xe4, 0x02, 0x4c, 0x08 +.byte 0x1c, 0x03, 0x4c, 0x08 +.byte 0x54, 0x03, 0x4c, 0x08 +.byte 0x84, 0x03, 0x4c, 0x08 +.byte 0xbc, 0x03, 0x4c, 0x08 +.byte 0xe4, 0x03, 0x4c, 0x08 +.byte 0x1c, 0x04, 0x4c, 0x08 +.byte 0x4c, 0x04, 0x4c, 0x08 +.byte 0x74, 0x04, 0x4c, 0x08 +.byte 0xa4, 0x04, 0x4c, 0x08 +.byte 0xdc, 0x04, 0x4c, 0x08 +.byte 0x0c, 0x05, 0x4c, 0x08 +.byte 0x54, 0x05, 0x4c, 0x08 +.byte 0x94, 0x05, 0x4c, 0x08 +.byte 0xcc, 0x05, 0x4c, 0x08 +.byte 0xfc, 0x05, 0x4c, 0x08 +.byte 0x34, 0x06, 0x4c, 0x08 +.byte 0x64, 0x06, 0x4c, 0x08 +.byte 0xac, 0x06, 0x4c, 0x08 +.byte 0xdc, 0x06, 0x4c, 0x08 +.byte 0x14, 0x07, 0x4c, 0x08 +.byte 0x5c, 0x07, 0x4c, 0x08 +.byte 0x94, 0x07, 0x4c, 0x08 +.byte 0xcc, 0x07, 0x4c, 0x08 +.byte 0xfc, 0x07, 0x4c, 0x08 +.byte 0x2c, 0x08, 0x4c, 0x08 +.byte 0x5c, 0x08, 0x4c, 0x08 +.byte 0xa4, 0x08, 0x4c, 0x08 +.byte 0xe4, 0x08, 0x4c, 0x08 +.byte 0x14, 0x09, 0x4c, 0x08 +.byte 0x44, 0x09, 0x4c, 0x08 +.byte 0x74, 0x09, 0x4c, 0x08 +.byte 0xbc, 0x09, 0x4c, 0x08 +.byte 0xf4, 0x09, 0x4c, 0x08 +.byte 0x34, 0x0a, 0x4c, 0x08 +.byte 0x64, 0x0a, 0x4c, 0x08 +.byte 0x84, 0x0a, 0x4c, 0x08 +.byte 0xd4, 0x0a, 0x4c, 0x08 +.byte 0x1c, 0x0b, 0x4c, 0x08 +.byte 0x6c, 0x0b, 0x4c, 0x08 +.byte 0xac, 0x0b, 0x4c, 0x08 +.byte 0xfc, 0x0b, 0x4c, 0x08 +.byte 0x3c, 0x0c, 0x4c, 0x08 +.byte 0x8c, 0x0c, 0x4c, 0x08 +.byte 0xd4, 0x0c, 0x4c, 0x08 +.byte 0x14, 0x0d, 0x4c, 0x08 +.byte 0x4c, 0x0d, 0x4c, 0x08 +.byte 0x84, 0x0d, 0x4c, 0x08 +.byte 0xc4, 0x0d, 0x4c, 0x08 +.byte 0xfc, 0x0d, 0x4c, 0x08 +.byte 0x3c, 0x0e, 0x4c, 0x08 +.byte 0x84, 0x0e, 0x4c, 0x08 +.byte 0xcc, 0x0e, 0x4c, 0x08 +.byte 0x0c, 0x0f, 0x4c, 0x08 +.byte 0x44, 0x0f, 0x4c, 0x08 +.byte 0x74, 0x0f, 0x4c, 0x08 +.byte 0x9c, 0x0f, 0x4c, 0x08 +.byte 0xcc, 0x0f, 0x4c, 0x08 +.byte 0xf4, 0x0f, 0x4c, 0x08 +.byte 0x14, 0x10, 0x4c, 0x08 +.byte 0x4c, 0x10, 0x4c, 0x08 +.byte 0x94, 0x10, 0x4c, 0x08 +.byte 0xe4, 0x10, 0x4c, 0x08 +.byte 0x1c, 0x11, 0x4c, 0x08 +.byte 0x54, 0x11, 0x4c, 0x08 +.byte 0x8c, 0x11, 0x4c, 0x08 +.byte 0xdc, 0x11, 0x4c, 0x08 +.byte 0x2c, 0x12, 0x4c, 0x08 +.byte 0x84, 0x12, 0x4c, 0x08 +.byte 0xdc, 0x12, 0x4c, 0x08 +.byte 0x24, 0x13, 0x4c, 0x08 +.byte 0x7c, 0x13, 0x4c, 0x08 +.byte 0xc4, 0x13, 0x4c, 0x08 +.byte 0x14, 0x14, 0x4c, 0x08 +.byte 0x54, 0x14, 0x4c, 0x08 +.byte 0x9c, 0x14, 0x4c, 0x08 +.byte 0xe4, 0x14, 0x4c, 0x08 +.byte 0x2c, 0x15, 0x4c, 0x08 +.byte 0x74, 0x15, 0x4c, 0x08 +.byte 0xbc, 0x15, 0x4c, 0x08 +.byte 0x04, 0x16, 0x4c, 0x08 +.byte 0x4c, 0x16, 0x4c, 0x08 +.byte 0x94, 0x16, 0x4c, 0x08 +.byte 0xe4, 0x16, 0x4c, 0x08 +.byte 0x34, 0x17, 0x4c, 0x08 +.byte 0x84, 0x17, 0x4c, 0x08 +.byte 0xdc, 0x17, 0x4c, 0x08 +.byte 0x2c, 0x18, 0x4c, 0x08 +.byte 0x6c, 0x18, 0x4c, 0x08 +.byte 0xb4, 0x18, 0x4c, 0x08 +.byte 0x0c, 0x19, 0x4c, 0x08 +.byte 0x5c, 0x19, 0x4c, 0x08 +.byte 0xac, 0x19, 0x4c, 0x08 +.byte 0xfc, 0x19, 0x4c, 0x08 +.byte 0x4c, 0x1a, 0x4c, 0x08 +.byte 0x9c, 0x1a, 0x4c, 0x08 +.byte 0xec, 0x1a, 0x4c, 0x08 +.byte 0x34, 0x1b, 0x4c, 0x08 +.byte 0x8c, 0x1b, 0x4c, 0x08 +.byte 0xdc, 0x1b, 0x4c, 0x08 +.byte 0x24, 0x1c, 0x4c, 0x08 +.byte 0x7c, 0x1c, 0x4c, 0x08 +.byte 0xcc, 0x1c, 0x4c, 0x08 +.byte 0x14, 0x1d, 0x4c, 0x08 +.byte 0x54, 0x1d, 0x4c, 0x08 +.byte 0x94, 0x1d, 0x4c, 0x08 +.byte 0xe4, 0x1d, 0x4c, 0x08 +.byte 0x3c, 0x1e, 0x4c, 0x08 +.byte 0x94, 0x1e, 0x4c, 0x08 +.byte 0xdc, 0x1e, 0x4c, 0x08 +.byte 0x34, 0x1f, 0x4c, 0x08 +.byte 0x8c, 0x1f, 0x4c, 0x08 +.byte 0xe4, 0x1f, 0x4c, 0x08 +.byte 0x3c, 0x20, 0x4c, 0x08 +.byte 0x8c, 0x20, 0x4c, 0x08 +.byte 0xdc, 0x20, 0x4c, 0x08 +.byte 0x24, 0x21, 0x4c, 0x08 +.byte 0x7c, 0x21, 0x4c, 0x08 +.byte 0xd4, 0x21, 0x4c, 0x08 +.byte 0x2c, 0x22, 0x4c, 0x08 +.byte 0x84, 0x22, 0x4c, 0x08 +.byte 0xdc, 0x22, 0x4c, 0x08 +.byte 0x34, 0x23, 0x4c, 0x08 +.byte 0x7c, 0x23, 0x4c, 0x08 +.byte 0xbc, 0x23, 0x4c, 0x08 +.byte 0xf4, 0x23, 0x4c, 0x08 +.byte 0x3c, 0x24, 0x4c, 0x08 +.byte 0x8c, 0x24, 0x4c, 0x08 +.byte 0xdc, 0x24, 0x4c, 0x08 +.byte 0x34, 0x25, 0x4c, 0x08 +.byte 0x8c, 0x25, 0x4c, 0x08 +.byte 0xdc, 0x25, 0x4c, 0x08 +.byte 0x24, 0x26, 0x4c, 0x08 +.byte 0x64, 0x26, 0x4c, 0x08 +.byte 0xac, 0x26, 0x4c, 0x08 +.byte 0xec, 0x26, 0x4c, 0x08 +.byte 0x2c, 0x27, 0x4c, 0x08 +.byte 0x74, 0x27, 0x4c, 0x08 +.byte 0xac, 0x27, 0x4c, 0x08 +.byte 0xf4, 0x27, 0x4c, 0x08 +.byte 0x44, 0x28, 0x4c, 0x08 +.byte 0x84, 0x28, 0x4c, 0x08 +.byte 0xd4, 0x28, 0x4c, 0x08 +.byte 0x1c, 0x29, 0x4c, 0x08 +.byte 0x6c, 0x29, 0x4c, 0x08 +.byte 0xbc, 0x29, 0x4c, 0x08 +.byte 0x0c, 0x2a, 0x4c, 0x08 +.byte 0x54, 0x2a, 0x4c, 0x08 diff --git a/data/move/move_data.json b/data/move/move_data.json index 87e2c6108..bbd490ebd 100644 --- a/data/move/move_data.json +++ b/data/move/move_data.json @@ -30,7 +30,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -51,7 +51,7 @@ "accuracyOffensive": 68, "accuracyUseChance": 75, "hitCount": 5, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -172,7 +172,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -193,7 +193,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 3, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -332,7 +332,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -372,7 +372,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -512,7 +512,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -575,7 +575,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -616,7 +616,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -637,7 +637,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -658,7 +658,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -740,7 +740,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -800,7 +800,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -840,7 +840,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -861,7 +861,7 @@ "accuracyOffensive": 65, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -901,7 +901,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -944,7 +944,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1062,7 +1062,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -1083,7 +1083,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -1163,7 +1163,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1223,7 +1223,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1263,7 +1263,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -1285,7 +1285,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -1307,7 +1307,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1328,7 +1328,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1369,7 +1369,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1390,7 +1390,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1411,7 +1411,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1452,7 +1452,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1473,7 +1473,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1494,7 +1494,7 @@ "accuracyOffensive": 60, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1535,7 +1535,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1556,7 +1556,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1577,7 +1577,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1598,7 +1598,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1639,7 +1639,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -1661,7 +1661,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1682,7 +1682,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1784,7 +1784,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1844,7 +1844,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1865,7 +1865,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1886,7 +1886,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1907,7 +1907,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1968,7 +1968,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -1989,7 +1989,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2049,7 +2049,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2070,7 +2070,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2110,7 +2110,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2150,7 +2150,7 @@ "accuracyOffensive": 68, "accuracyUseChance": 75, "hitCount": 5, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2191,7 +2191,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2232,7 +2232,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2253,7 +2253,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2314,7 +2314,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2335,7 +2335,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2375,7 +2375,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2416,7 +2416,7 @@ "accuracyOffensive": 65, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2457,7 +2457,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -2479,7 +2479,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2560,7 +2560,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2581,7 +2581,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2602,7 +2602,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2643,7 +2643,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2704,7 +2704,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2725,7 +2725,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2766,7 +2766,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -2788,7 +2788,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2847,7 +2847,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2868,7 +2868,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2928,7 +2928,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2949,7 +2949,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -2970,7 +2970,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3010,7 +3010,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3051,7 +3051,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3092,7 +3092,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3133,7 +3133,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3154,7 +3154,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3195,7 +3195,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3216,7 +3216,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -3237,7 +3237,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3258,7 +3258,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3300,7 +3300,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3321,7 +3321,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3342,7 +3342,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3363,7 +3363,7 @@ "accuracyOffensive": 80, "accuracyUseChance": 75, "hitCount": 2, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3404,7 +3404,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3425,7 +3425,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3446,7 +3446,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3567,7 +3567,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3588,7 +3588,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3609,7 +3609,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3650,7 +3650,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3671,7 +3671,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3692,7 +3692,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3733,7 +3733,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3850,7 +3850,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3871,7 +3871,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3892,7 +3892,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -3954,7 +3954,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4056,7 +4056,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4097,7 +4097,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4118,7 +4118,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4159,7 +4159,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4180,7 +4180,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4201,7 +4201,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4222,7 +4222,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4243,7 +4243,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -4264,7 +4264,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4304,7 +4304,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 3, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4325,7 +4325,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4365,7 +4365,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4386,7 +4386,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4488,7 +4488,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4528,7 +4528,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4549,7 +4549,7 @@ "accuracyOffensive": 87, "accuracyUseChance": 75, "hitCount": 2, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 3, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4628,7 +4628,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4669,7 +4669,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4690,7 +4690,7 @@ "accuracyOffensive": 95, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4711,7 +4711,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -4792,7 +4792,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4813,7 +4813,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4874,7 +4874,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4895,7 +4895,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4916,7 +4916,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4937,7 +4937,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -4959,7 +4959,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -4980,7 +4980,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5001,7 +5001,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5022,7 +5022,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -5044,7 +5044,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5085,7 +5085,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5125,7 +5125,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5146,7 +5146,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5186,7 +5186,7 @@ "accuracyOffensive": 87, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5226,7 +5226,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5326,7 +5326,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5347,7 +5347,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -5369,7 +5369,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -5390,7 +5390,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5411,7 +5411,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5529,7 +5529,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5550,7 +5550,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5571,7 +5571,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": false, @@ -5632,7 +5632,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5653,7 +5653,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -5694,7 +5694,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -5715,7 +5715,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5736,7 +5736,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5796,7 +5796,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5837,7 +5837,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 2, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5878,7 +5878,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5919,7 +5919,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5940,7 +5940,7 @@ "accuracyOffensive": 87, "accuracyUseChance": 75, "hitCount": 2, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -5961,7 +5961,7 @@ "accuracyOffensive": 73, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -5982,7 +5982,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": false, "dealsDirectDamage": true, @@ -6081,7 +6081,7 @@ "accuracyOffensive": 125, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6121,7 +6121,7 @@ "accuracyOffensive": 65, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6142,7 +6142,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6202,7 +6202,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6262,7 +6262,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6302,7 +6302,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6323,7 +6323,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6344,7 +6344,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6365,7 +6365,7 @@ "accuracyOffensive": 70, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6386,7 +6386,7 @@ "accuracyOffensive": 78, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6544,7 +6544,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6565,7 +6565,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6586,7 +6586,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6607,7 +6607,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6628,7 +6628,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6649,7 +6649,7 @@ "accuracyOffensive": 90, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6769,7 +6769,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -6791,7 +6791,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6851,7 +6851,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6872,7 +6872,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -6991,7 +6991,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "affectedByMuzzled": true, "cannotHitFrozen": true, @@ -7033,7 +7033,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7054,7 +7054,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7075,7 +7075,7 @@ "accuracyOffensive": 87, "accuracyUseChance": 75, "hitCount": 2, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7096,7 +7096,7 @@ "accuracyOffensive": 80, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7117,7 +7117,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7157,7 +7157,7 @@ "accuracyOffensive": 80, "accuracyUseChance": 75, "hitCount": 0, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7218,7 +7218,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 50, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7239,7 +7239,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7260,7 +7260,7 @@ "accuracyOffensive": 93, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 1, + "maxPowerBoost": 1, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 11, @@ -7280,7 +7280,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 6, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7301,7 +7301,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 6, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7322,7 +7322,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 6, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7343,7 +7343,7 @@ "accuracyOffensive": 84, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 6, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7364,7 +7364,7 @@ "accuracyOffensive": 88, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7385,7 +7385,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 19, @@ -7405,7 +7405,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7481,7 +7481,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "criticalHitChance": 12, "cannotHitFrozen": true, "dealsDirectDamage": true, @@ -7952,7 +7952,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 11, @@ -8026,7 +8026,7 @@ "accuracyOffensive": 45, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 11, @@ -8046,7 +8046,7 @@ "accuracyOffensive": 45, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 11, @@ -8210,7 +8210,7 @@ "accuracyOffensive": 100, "accuracyUseChance": 75, "hitCount": 1, - "unk12": 99, + "maxPowerBoost": 99, "cannotHitFrozen": true, "dealsDirectDamage": true, "rangeType": 11, diff --git a/include/dungeon_entity.h b/include/dungeon_entity.h index a815811fb..68bfad466 100644 --- a/include/dungeon_entity.h +++ b/include/dungeon_entity.h @@ -160,7 +160,7 @@ struct DungeonEntityData u8 fillF3; /* 0xF4 */ bool8 grudgeStatus; /* 0xF5 */ bool8 exposedStatus; - u8 fillF6; + /* 0xF6 */ bool8 isColorChanged; /* 0xF7 */ bool8 isBoss; u8 fillF8[0xFA - 0xF8]; /* 0xFA */ u8 terrifiedTurnsLeft; // Doubles as a bool for whether the Pokémon is terrified. @@ -194,7 +194,9 @@ struct DungeonEntityData /* 0x14E */ u16 visualFlags; /* 0x150 */ u16 previousVisualFlags; /* 0x152 */ u8 unk152; - u8 fill153[0x15C - 0x153]; + u8 fill153[0x15A - 0x153]; + u8 unk15A; + u8 unk15B; u8 unk15C; u8 unk15D; u8 unk15E; @@ -220,7 +222,7 @@ struct DungeonEntityData /* 0x1FA */ s16 mobileTurnTimer; // When a Pokémon can pass through walls in a hallway, this counts up to 200 before the Pokémon turns in a random direction. /* 0x1FC */ u16 expGainedInTurn; // Used to accumulate experience when multiple enemies are defeated in one turn. /* 0x200 */ u32 statusSprites; - u32 unk204; + u8 unk204; }; // Used for Pokémon, items, and traps. diff --git a/include/dungeon_global_data.h b/include/dungeon_global_data.h index f679e6b6f..bc30090b3 100644 --- a/include/dungeon_global_data.h +++ b/include/dungeon_global_data.h @@ -31,30 +31,36 @@ struct DungeonGlobalData u8 fill5[0x7 - 0x5]; u8 unk7; u8 unk8; - u8 fill9[0xF - 0x9]; + u8 fill9[0xC - 0x9]; + u8 unkC; + u8 unkD[0xF - 0xD]; /* 0xF */ bool8 inputAllowed; // Whether the game is currently accepting input. Set to false while action animations play. u8 fill10; u8 unk11; - u8 fill12[0x16D - 0x12]; + s16 unk12; + u8 fill14[0x16D - 0x14]; u8 unk16D; u8 fill16E[0x179 - 0x16E]; /* 0x179 */ bool8 pokemonExposed; // True if a Pokémon on the floor has the Exposed status. u8 fill17A[0x17C - 0x17A]; struct DungeonGlobalData_sub unk17C[0x100]; - /* 0x57C */ u8 fill57C[0x645 - 0x57c]; + /* 0x57C */ u8 fill57C[0x644 - 0x57c]; + /* 0x644 */ u8 unk644; /* 0x645 */ u8 floorNumber; u8 fill646[0x65C - 0x646]; u8 unk65C; u8 fill65D[0x660 - 0x65D]; - /* 0x660 */ u8 speedTurnCounter; // Handles turn order when Pokémon have different movement speeds. - u8 fill661[0x666 - 0x661]; + /* 0x660 */ u16 speedTurnCounter; // Handles turn order when Pokémon have different movement speeds. + u8 fill662[0x666 - 0x662]; /* 0x666 */ u16 turnsLeft; // Turns remaining before getting swept out of the dungeon. u8 fill668[0x66A - 0x668]; u16 unk66A; u8 fill66C[0x671 - 0x66C]; /* 0x671 */ bool8 monsterHouseActive; /* 0x672 */ u8 unk672; - u8 fill673[0x68A - 0x673]; + u8 fill673[0x675 - 0x673]; + u8 unk675; + u8 unk676[0x68A - 0x676]; /* 0x68A */ u8 unk68A; u8 fill68B[0x363C - 0x68B]; /* 0x363C */ u8 expYieldRankings[NUM_SPECIES]; @@ -80,7 +86,7 @@ struct DungeonGlobalData /* 0xE26F */ u8 startingWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather. /* 0xE277 */ u8 mudSportTurnsLeft; /* 0xE278 */ u8 waterSportTurnsLeft; - /* 0xE279 */ u8 unkE279; + /* 0xE279 */ u8 negateWeatherEffects; // Air Lock and Cloud Nine toggle this to disable weather effects u8 fillE27A[0xE8C0 - 0xE27A]; /* 0xE8C0 */ struct MapTile* mapTilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X]; u8 fill104C0[0x104C4 - 0x104C0]; diff --git a/include/dungeon_pokemon_attributes.h b/include/dungeon_pokemon_attributes.h index c09a65741..f5b46f98c 100644 --- a/include/dungeon_pokemon_attributes.h +++ b/include/dungeon_pokemon_attributes.h @@ -13,5 +13,6 @@ bool8 CanSeeTeammate(struct DungeonEntity * pokemon); u8 GetMoveTypeForPokemon(struct DungeonEntity *pokemon, struct PokemonMove *pokeMove); s32 CalculateMovePower(struct DungeonEntity *pokemon, struct PokemonMove *pokeMove); bool8 ToolboxEnabled(struct DungeonEntityData *pokemon); +bool8 SetVisualFlags(struct DungeonEntityData *entityData, u16 newFlag, bool8 param_3); #endif diff --git a/include/item.h b/include/item.h index d9a9de60c..2f45e7c37 100644 --- a/include/item.h +++ b/include/item.h @@ -118,6 +118,7 @@ bool8 AddHeldItemToInventory(struct HeldItem* slot); bool8 IsNotMoneyOrUsedTMItem(u8 id); s32 FindItemInInventory(u8 itemIndex); bool8 IsHMItem(u8 id); +bool8 IsEdibleItem(u8 id); void RestoreHeldItem(struct unkStruct_8094924*, struct HeldItem*); diff --git a/include/moves.h b/include/moves.h index 12e6f4771..b2ee36426 100644 --- a/include/moves.h +++ b/include/moves.h @@ -16,7 +16,7 @@ u32 GetMoveHitCount(struct PokemonMove *move); s32 GetMovePower(struct PokemonMove *move); s32 GetMoveAccuracy(struct PokemonMove *move, u32 accuracyType); u32 GetMoveMaxPP(struct PokemonMove *move); -u8 GetMoveUnk12(struct PokemonMove *move); +u32 GetMoveMaxPowerBoost(struct PokemonMove *move); u8 GetMoveCriticalHitChance(struct PokemonMove *move); bool8 MoveCannotHitFrozen(struct PokemonMove *move); bool8 MoveDealsDirectDamage(struct PokemonMove *move); diff --git a/include/personality_test.h b/include/personality_test.h index 0351bd1fa..75c35c3e0 100644 --- a/include/personality_test.h +++ b/include/personality_test.h @@ -23,7 +23,7 @@ struct PersonalityQuestion const u8 (*effects); }; -struct PersonalityStruct_203B400 +struct PersonalityTestTracker { /* 0x0 */ s32 FrameCounter; /* 0x4 */ u32 unk4; diff --git a/include/rescue_password_menu.h b/include/rescue_password_menu.h index 66325befb..588251963 100644 --- a/include/rescue_password_menu.h +++ b/include/rescue_password_menu.h @@ -14,9 +14,10 @@ struct RescuePasswordMenu // size: 0x214 u32 currMenu; u32 state; - u8 fill8[0x148 - 8]; + u32 unk8; + u8 fillC[0x148 - 0xC]; struct UnkTextStruct2 unk148[4]; - u8 fill1A8[0x208 - 0x1A8]; + struct UnkTextStruct2 unk1A8[4]; struct unkSprite unk208; diff --git a/ld_script.txt b/ld_script.txt index 88f683582..66e001c56 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -144,6 +144,9 @@ SECTIONS { asm/makuhita_dojo.o(.text); src/wonder_mail_4.o(.text); asm/wonder_mail_4.o(.text); + src/wonder_mail_5.o(.text); + asm/wonder_mail_5.o(.text); + src/wonder_mail_4_1.o(.text); src/post_office_guide.o(.text); asm/code_8031D70.o(.text); src/adventure_log.o(.text); @@ -218,6 +221,7 @@ SECTIONS { src/status_checker.o(.text); asm/code_805D8C8.o(.text); src/targeting.o(.text); + src/code_8069E0C.o(.text); asm/code_8069E0C.o(.text); src/code_806CD90.o(.text); asm/code_806CD90.o(.text); @@ -233,8 +237,6 @@ SECTIONS { src/dungeon_capabilities_1.o(.text); asm/code_8070E3C.o(.text); src/dungeon_ai_targeting.o(.text); - asm/code_8071214.o(.text); - src/dungeon_ai_targeting_1.o(.text); src/dungeon_pokemon_attributes.o(.text); asm/code_80718D8.o(.text); src/dungeon_ai_items.o(.text); @@ -257,6 +259,7 @@ SECTIONS { src/dungeon_range.o(.text); asm/code_808333C.o(.text); src/dungeon_random.o(.text); + src/code_808417C.o(.text); asm/code_808417C.o(.text); src/code_80848F0.o(.text); asm/code_80848F0.o(.text); @@ -415,6 +418,8 @@ SECTIONS { src/wonder_mail_2_1.o(.rodata); src/wonder_mail_3.o(.rodata); src/wonder_mail_802DF88.o(.rodata); + src/mailbox.o(.rodata); + src/pelipper_board.o(.rodata); data/data_80DED44.o(.rodata); src/post_office_guide.o(.rodata); data/data_80E1F30.o(.rodata); @@ -449,8 +454,6 @@ SECTIONS { src/dungeon_capabilities_1.o(.rodata); data/data_8106FB5.o(.rodata); src/dungeon_ai_targeting.o(.rodata); - data/data_8106FDD.o(.rodata); - src/dungeon_ai_targeting_1.o(.rodata); data/data_8107010.o(.rodata); src/friend_area.o(.rodata); data/data_810AC60.o(.rodata); diff --git a/src/code_801B3C0.c b/src/code_801B3C0.c index 7dde2484f..6bd8b8093 100644 --- a/src/code_801B3C0.c +++ b/src/code_801B3C0.c @@ -111,7 +111,7 @@ extern void sub_801BE30(void); extern void sub_801BEC8(void); extern void sub_801B760(void); extern void sub_801B874(void); -extern u32 sub_8001784(u32, u32, u32); +extern u32 sub_8001784(u32, u32, u16); extern void sub_800199C(u32, u32, u32, u32); extern void PlaySound(u32); extern s32 sub_808D544(u32); diff --git a/src/code_8048480.c b/src/code_8048480.c index f8f9155ee..ee75d2caf 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -1,15 +1,36 @@ #include "global.h" -#include "dungeon_entity.h" +#include "constants/iq_skill.h" #include "constants/status.h" +#include "dungeon_entity.h" +#include "dungeon_global_data.h" +#include "dungeon_pokemon_attributes.h" +#include "dungeon_random.h" +#include "number_util.h" +#include "moves.h" -extern u32 gUnknown_80F89F4; +extern u8 *gUnknown_80F89F4[]; extern u8 gAvailablePokemonNames[0x58]; -extern u32 gUnknown_80FB580; +extern u8 *gUnknown_80FB580[]; extern s16 gUnknown_80F4FB6; extern s16 gUnknown_80F4FB8; extern s16 gUnknown_80F4FBA; extern s16 gUnknown_80F4FBC; extern s16 gUnknown_80F4FBE; +extern s16 gUnknown_80F4F46; // 0xC +extern s16 gUnknown_80F4FAA; // 0x1E +extern s16 gUnknown_80F4FA8; // 0xF +extern s16 gUnknown_80F4FA4; // 0x14 +extern s16 gUnknown_80F4FA6; // 0x2D + + +extern u8 *gUnknown_80FEAE8[]; +extern u8 *gUnknown_80FDBA0[]; +extern u8 *gUnknown_80FE434[]; +extern u8 *gUnknown_80FE40C[]; +extern u8 *gUnknown_80FE454[]; +extern u8 *gPtrSelfHealPreventedHungerMessage[]; +extern u8 *gUnknown_80F9740[]; +extern u8 *gUnknown_80F9760[]; extern void sub_807D148(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2, u32 r3); extern void sub_8075FCC(struct DungeonEntity *r0, struct DungeonEntity *r1); @@ -17,10 +38,10 @@ extern void sub_8077AE4(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 extern void sub_8072008(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2, u8 r3, u32); extern void sub_8076D10(struct DungeonEntity *r0, struct DungeonEntity *r1); extern void LevelDownTarget(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2); - +extern void sub_8078B5C(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32); extern void SetMessageArgument(u8 *r0, struct DungeonEntity *r1, u32); extern void sub_807A290(struct DungeonEntity *r0, struct DungeonEntity *r1); -extern void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, u32); +extern void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, const char[]); extern void RestoreVisionTarget(struct DungeonEntity *r0, struct DungeonEntity *r1); extern void sub_8077910(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32); extern void sub_80791D8(struct DungeonEntity *r0, struct DungeonEntity *r1); @@ -28,7 +49,13 @@ extern void BlindTarget(struct DungeonEntity *r0, struct DungeonEntity *r1); extern void HealTargetHP(struct DungeonEntity *r0, struct DungeonEntity *r1, s16, s16, u32); extern void sub_80792F8(struct DungeonEntity *r0, struct DungeonEntity *r1, u32); extern void sub_8079F20(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u8); -extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u32, u32, u32, u32, u32, u32); +extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32); +extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32); +extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*); +extern s32 sub_8042520(struct DungeonEntity *); +struct DungeonEntity *sub_80696FC(struct DungeonEntity *); +extern void sub_80943A0(void*, s32); +extern void sub_803E708(u32 r0, u32 r1); void sub_8048340(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 r2) { @@ -86,7 +113,7 @@ void sub_8048428(struct DungeonEntity *r0, struct DungeonEntity *r1) sub_807A290(r0, r1); else // Pointer to "But nothing happened!" - sub_80522F4(r0, r1, gUnknown_80F89F4); + sub_80522F4(r0, r1, *gUnknown_80F89F4); } void sub_8048450(struct DungeonEntity *r0, struct DungeonEntity *r1) @@ -95,7 +122,7 @@ void sub_8048450(struct DungeonEntity *r0, struct DungeonEntity *r1) sub_807A290(r0, r1); else // Pointer to "But nothing happened!" - sub_80522F4(r0, r1, gUnknown_80F89F4); + sub_80522F4(r0, r1, *gUnknown_80F89F4); } void sub_8048480(struct DungeonEntity *r0, struct DungeonEntity *r1) @@ -126,7 +153,7 @@ void sub_80484BC(struct DungeonEntity *r0, struct DungeonEntity *r1) void sub_80484C8(struct DungeonEntity *r0, struct DungeonEntity *r1) { // Pointer to "But nothing happened!" - sub_80522F4(r0, r1, gUnknown_80F89F4); + sub_80522F4(r0, r1, *gUnknown_80F89F4); } void sub_80484DC(struct DungeonEntity *r0, struct DungeonEntity *r1) @@ -142,6 +169,136 @@ void sub_80484E8(struct DungeonEntity *r0, struct DungeonEntity *r1) { SetMessageArgument(gAvailablePokemonNames, r1, 0); // Pointer to "But nothing happened!" - sub_80522F4(r0, r1, gUnknown_80FB580); + sub_80522F4(r0, r1, *gUnknown_80FB580); } } + +void sub_8048524(struct DungeonEntity *param_1, struct DungeonEntity * param_2) +{ + struct DungeonEntityData *iVar2; + struct DungeonEntityData *iVar3; + u32 *belly; + u32 local_14; + + iVar2 = param_2->entityData; + iVar3 = iVar2; + if (iVar2->isLeader) + sub_8078A58(param_1, param_2, 0, 5); + else + { + SetMessageArgument(gAvailablePokemonNames, param_2, 0); + if (HasIQSkill(param_2, IQ_SKILL_SELF_CURER)) + sub_80522F4(param_1, param_2, *gPtrSelfHealPreventedHungerMessage); + else + { + belly = &iVar3->belly; + if (RoundUpFixedPoint(*belly) != 0) { + sub_80943A0(&local_14, 0); + *belly = local_14; + sub_80522F4(param_1, param_2, *gUnknown_80F9740); + } + else + sub_80522F4(param_1, param_2, *gUnknown_80F9760); + } + } +} + +void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2) +{ + bool8 isMoveBoosted; + s32 moveIndex; + struct DungeonEntityData *iVar5; + register struct PokemonMove *movePtr1 asm("r4"); // r4 + register struct PokemonMove *movePtr2 asm("r5"); // r5 + u8 cVar8; + s32 movePowerBoost; + s32 maxPowerBoost; + + isMoveBoosted = FALSE; + cVar8 = 1; + iVar5 = param_2->entityData; + if (DungeonRandomCapped(100) < gUnknown_80F4F46) + cVar8 = 3; + if (iVar5->isLeader) { + for(moveIndex = 0, movePtr1 = &iVar5->moves[0], movePtr2 = movePtr1; moveIndex < MAX_MON_MOVES; movePtr1++, movePtr2++, moveIndex++) + { + if((movePtr1->moveFlags & MOVE_FLAG_EXISTS) && (movePtr1->moveFlags & MOVE_FLAG_SET)) + { + if(GetMovePower(movePtr2) == 0) continue; + movePowerBoost = movePtr1->powerBoost; + maxPowerBoost = GetMoveMaxPowerBoost(movePtr2); + movePtr1->powerBoost += cVar8; + if(movePtr1->powerBoost >= maxPowerBoost) + movePtr1->powerBoost = maxPowerBoost; + if(movePowerBoost != movePtr1->powerBoost) + isMoveBoosted = TRUE; + } + } + + if (isMoveBoosted) { + sub_80522F4(param_1,param_2,*gUnknown_80FE454); + if (cVar8 != 1) { + sub_803E708(10,0x40); + sub_80522F4(param_1,param_2,*gUnknown_80FE434); + } + } + else + sub_80522F4(param_1,param_2,*gUnknown_80FE40C); + } + else + sub_80522F4(param_1,param_2,*gUnknown_80FE40C); +} + +void sub_804869C(struct DungeonEntity *param_1, struct DungeonEntity * param_2, u8 param_3) +{ + s32 uVar1; + struct DungeonEntityData *iVar2; + struct DungeonEntityData *iVar4; + struct DungeonEntity *iVar3; + u8 auStack28 [4]; + + if (param_3 != '\0') { + iVar2 = param_2->entityData; + iVar4 = iVar2; + if (gDungeonGlobalData->unk675 != 0) { + uVar1 = gUnknown_80F4FA8; + sub_80522F4(param_1, param_2, *gUnknown_80FEAE8); + } + else { + uVar1 = gUnknown_80F4FA4; + } + if (iVar4->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) { + SendImmobilizeEndMessage(param_1, param_2); + } + sub_806F370(param_1, param_2, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0); + } + else + { + sub_8042520(param_1); + iVar3 = sub_80696FC(param_1); + if (iVar3 == NULL) + { + sub_80522F4(param_1, param_2, *gUnknown_80FDBA0); + } + else + { + iVar2 = iVar3->entityData; + if (gDungeonGlobalData->unk675 != 0) { + uVar1 = gUnknown_80F4FAA; + sub_80522F4(param_1, param_2, *gUnknown_80FEAE8); + } + else { + uVar1 = gUnknown_80F4FA6; + } + if (iVar2->immobilizeStatus == IMMOBILIZE_STATUS_FROZEN) { + SendImmobilizeEndMessage(param_1, iVar3); + } + sub_806F370(param_1, iVar3, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0); + } + } +} + +void sub_80487CC(struct DungeonEntity *param_1, struct DungeonEntity * param_2, u32 param_3, u32 param_4) +{ + sub_8078B5C(param_1, param_2, param_3, param_4, 1); +} diff --git a/src/code_8048DB8.c b/src/code_8048DB8.c index 0a932ec7e..7012ae643 100644 --- a/src/code_8048DB8.c +++ b/src/code_8048DB8.c @@ -1,7 +1,8 @@ #include "global.h" +#include "constants/status.h" #include "code_80521D0.h" #include "dungeon_random.h" - +#include "item.h" extern void sub_803E708(u32, u32); extern void sub_80421C0(struct DungeonEntity *r0, u16 r1); @@ -12,6 +13,9 @@ extern void sub_8076210(struct DungeonEntity *, u32, u32, u32); extern void sub_8077780(struct DungeonEntity *, u32, u32); extern void sub_8076E20(struct DungeonEntity *, u32, u32, u32, u32, u32); +extern u8 gAvailablePokemonNames[]; +extern u8 gUnknown_202DE58[]; + extern u8 *gPtrMusicBoxPlayedCrumbledMessage[]; extern u8 *gPtrWishStoneCrumbledMessage[]; extern u8 *gPtrIcePartCrumbledMessage[]; @@ -22,7 +26,33 @@ extern u32 gUnknown_8106A50; extern s16 gUnknown_80F4FAC; extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32); extern void sub_8051E7C(struct DungeonEntity *pokemon); +extern void sub_8045BF8(u8 *, struct ItemSlot *); +extern void SetMessageArgument(char[], struct DungeonEntity*, u32); +extern u8 *gUnknown_80FDCA4[]; +extern u8 *gUnknown_80FE3E8[]; + +bool8 sub_8048D50(struct DungeonEntity * param_1,struct ItemSlot *param_2) +{ + struct DungeonEntityData *iVar2; + + iVar2 = param_1->entityData; + + if ((param_2->itemFlags & ITEM_FLAG_STICKY) != 0) { + sub_8045BF8(gUnknown_202DE58,param_2); + SendMessage(param_1,*gUnknown_80FE3E8); + return FALSE; + } + else + { + if ((iVar2->muzzledStatus == MUZZLED_STATUS_MUZZLED) && (IsEdibleItem(param_2->itemIndex))) { + SetMessageArgument(gAvailablePokemonNames,param_1,0); + SendMessage(param_1,*gUnknown_80FDCA4); + return FALSE; + } + } + return TRUE; +} void sub_8048DB8(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u8 r2) { diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c new file mode 100644 index 000000000..e70e52f85 --- /dev/null +++ b/src/code_8069E0C.c @@ -0,0 +1,294 @@ +#include "global.h" +#include "constants/ability.h" +#include "constants/move_id.h" +#include "constants/type.h" +#include "constants/weather.h" +#include "dungeon_entity.h" +#include "dungeon_global_data.h" +#include "dungeon_pokemon_attributes.h" +#include "dungeon_random.h" +#include "dungeon_util.h" +#include "pokemon.h" +#include "weather.h" +#include "gUnknown_203B46C.h" + +extern struct UnkSaveStruct1 *gUnknown_203B46C; + +struct unkStruct_80F520C +{ + u8 unk0; + u8 unk1; + s16 unk2; +}; + +extern struct unkStruct_80F520C gUnknown_80F520C[]; + +extern u8 gAvailablePokemonNames[]; +extern u8 gUnknown_202DE58[]; +extern u8 gUnknown_80F51E4[]; +extern u8 *gUnknown_80FCC7C[]; +extern u8 *gUnknown_80FCCAC[]; +extern u8 *gUnknown_80FDCC8[]; + +extern u8* GetUnformattedTypeString(s16); +extern void SetMessageArgument(char[], struct DungeonEntity*, u32); +void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, const char r2[]); +extern void sub_8042900(struct DungeonEntity *r0); +extern void sub_8042968(struct DungeonEntity *r0); +extern void sub_806ABAC(struct DungeonEntity *, struct DungeonEntity *); +extern void sub_8076090(struct DungeonEntity *, struct DungeonEntity *,u32,u32,u32); +void sub_8041BBC(struct DungeonEntity *r0); +extern u8 sub_8045888(struct DungeonEntity *); +extern void sub_806A2BC(struct DungeonEntity *, u8); +extern void sub_804178C(u32); +extern void sub_803F508(struct DungeonEntity *); +extern void sub_804AC20(struct Position *); +extern u8 sub_8092364(u8); +extern void sub_803E46C(u32); +extern void sub_803E708(u32 r0, u32 r1); + +void sub_8069E0C(struct DungeonEntity *param_1) +{ + s32 index; + struct DungeonEntityData *iVar4; + + iVar4 = param_1->entityData; + if (HasAbility(param_1, ABILITY_FORECAST)) { + iVar4->types[0] = gUnknown_80F520C[GetWeather(param_1)].unk0; + iVar4->types[1] = TYPE_NONE; + } + else { + for(index = 0; index < 2; index++) + iVar4->types[index] = GetPokemonType(iVar4->entityID, index); + } + for(index = 0; index < 2; index++) + iVar4->abilities[index] = GetPokemonAbility(iVar4->entityID, index); + gDungeonGlobalData->unkC = 1; +} + +void TriggerWeatherAbilities(void) +{ + struct DungeonEntity *uVar4; + s32 iVar5; + + if (gDungeonGlobalData->unkC != 0) { + gDungeonGlobalData->unkC = 0; + gDungeonGlobalData->negateWeatherEffects = FALSE; + + for(iVar5 = 0; iVar5 < DUNGEON_MAX_POKEMON; iVar5++) + { + uVar4 = gDungeonGlobalData->allPokemon[iVar5]; + if (EntityExists(uVar4)) { + if (HasAbility(uVar4, ABILITY_DRIZZLE)) { + gDungeonGlobalData->startingWeather[WEATHER_RAIN] = 1; + } + else if (HasAbility(uVar4, ABILITY_SAND_STREAM)) { + gDungeonGlobalData->startingWeather[WEATHER_SANDSTORM] = 1; + } + else if (HasAbility(uVar4, ABILITY_DROUGHT)) { + gDungeonGlobalData->startingWeather[WEATHER_SUNNY] = 1; + } + if ((HasAbility(uVar4, ABILITY_AIR_LOCK)) || (HasAbility(uVar4, ABILITY_CLOUD_NINE))) { + gDungeonGlobalData->negateWeatherEffects = TRUE; + } + } + } + } +} + +s32 sub_8069F54(struct DungeonEntity *param_1, s16 param_2) +{ + if ((((param_2 * 0x10000) + 0xfe880000U) >> 0x10) < 4) { + if (HasAbility(param_1, ABILITY_FORECAST)) { + return gUnknown_80F520C[GetWeather(param_1)].unk2; + } + else { + return 0x178; + } + } + return param_2; +} + +static inline u8 sub_8069F9C_sub(struct DungeonEntity *param_1) +{ + u32 uVar3; + uVar3 = GetWeather(param_1); + return gUnknown_80F51E4[uVar3]; +} + +void sub_8069F9C(struct DungeonEntity *param_1,struct DungeonEntity * param_2,struct PokemonMove *param_3) +{ + u8 type; + u8 ability; + const char *__src; + register s32 abilityCounter asm("r1"); // r1 + int randomIndex; + int abilityIndex; + struct DungeonEntityData *iVar6; // r7 + struct DungeonEntityData *iVar7; // r2 + struct DungeonEntityData *iVar8; + u8 local_20 [4]; + + if (!EntityExists(param_1)) { + return; + } + if (!EntityExists(param_2)) { + return; + } + if (param_1 == param_2) { + return; + } + + iVar7 = param_1->entityData; + iVar8 = iVar7; + iVar6 = param_2->entityData; + abilityIndex = -1; + if (iVar6->abilities[0] == ABILITY_TRACE) { + abilityIndex = 0; + } + if (iVar6->abilities[1] == ABILITY_TRACE) { + abilityIndex = 1; + } + if (-1 < abilityIndex) { + abilityCounter = 0; + ability = iVar7->abilities[0]; + if (ability != ABILITY_NONE) { + local_20[0] = ability; + abilityCounter = 1; + } + ability = iVar8->abilities[1]; + if (ability != ABILITY_NONE) { + local_20[abilityCounter] = ability; + abilityCounter++; + } + if (abilityCounter != 0) { + if (abilityCounter == 1) { + randomIndex = 0; + } + else { + randomIndex = DungeonRandomCapped(abilityCounter); + if (randomIndex < 0) goto _0806A068; + } + iVar6->abilities[abilityIndex] = local_20[randomIndex]; + gDungeonGlobalData->unkC = 1; + SetMessageArgument(gAvailablePokemonNames,param_2,0); + sub_80522F4(param_1,param_2,*gUnknown_80FCC7C); + sub_8042900(param_2); + sub_806ABAC(param_1,param_2); + } + } +_0806A068: + if (iVar6->unk15A != 0) { + iVar6->unk15A = 0; + if (HasAbility(param_2, ABILITY_COLOR_CHANGE)) { + type = GetMoveTypeForPokemon(param_1,param_3); + if (param_3->moveID == MOVE_WEATHER_BALL) { + type = sub_8069F9C_sub(param_1); + } + if ((type != TYPE_NONE) && (!HasType(param_2,type))) { + iVar6->types[0] = type; + iVar6->types[1] = TYPE_NONE; + iVar6->isColorChanged = TRUE; + SetMessageArgument(gAvailablePokemonNames,param_2,0); + __src = GetUnformattedTypeString(iVar6->types[0]); + strcpy(gUnknown_202DE58,__src); + sub_80522F4(param_1,param_2,*gUnknown_80FCCAC); + sub_8042968(param_2); + } + } + } +} + +void sub_806A120(struct DungeonEntity * param_1, struct DungeonEntity * param_2, struct PokemonMove* move) +{ + u32 uVar2_u32; + u8 uVar2; + const char *__src; + struct DungeonEntityData *iVar3; + + if ((((EntityExists(param_1)) && (EntityExists(param_2))) && (param_1 != param_2)) + && (iVar3 = param_2->entityData, iVar3->protectionStatus == 0xC)) { + uVar2 = GetMoveTypeForPokemon(param_1, move); + uVar2_u32 = sub_8092364(uVar2); + if (uVar2_u32 != TYPE_NONE) { + iVar3->types[0] = uVar2_u32; + iVar3->types[1] = 0; + sub_8041BBC(param_2); + SetMessageArgument(gAvailablePokemonNames,param_2,0); + __src = GetUnformattedTypeString(uVar2_u32); + strcpy(gUnknown_202DE58,__src); + sub_80522F4(param_1,param_2,*gUnknown_80FDCC8); + } + } +} + +void sub_806A1B0(struct DungeonEntity *param_1) +{ + if ((EntityExists(param_1)) && (HasAbility(param_1,0x2a))) { + sub_8076090(param_1,param_1,0,1,0); + } +} + +void sub_806A1E8(struct DungeonEntity *param_1) +{ + bool8 bVar3; + struct DungeonEntityData *iVar1; + + bVar3 = FALSE; + if (EntityExists(param_1)) { + if (GetEntityType(param_1) == ENTITY_POKEMON) { + iVar1 = param_1->entityData; + bVar3 = (!iVar1->isEnemy); + } + if (gUnknown_203B46C->unk1 == '\0') { + bVar3 = FALSE; + } + if (bVar3 && (sub_8045888(param_1) == '\0')) { + sub_806A2BC(param_1,1); + } + } +} + +void sub_806A240(struct DungeonEntity *param_1, struct DungeonEntity *param_2) +{ + bool8 bVar3; + struct DungeonEntityData *iVar1; + + bVar3 = FALSE; + if (EntityExists(param_1)){ + if (GetEntityType(param_1) == ENTITY_POKEMON) { + iVar1 = param_1->entityData; + bVar3 = (!iVar1->isEnemy); + } + if (bVar3 && (sub_8045888(param_1) == '\0')) { + sub_806A2BC(param_1,1); + return; + } + else if (GetEntityType(param_2) == ENTITY_POKEMON) { + iVar1 = param_2->entityData; + bVar3 = (!iVar1->isEnemy); + } + if (bVar3 && (sub_8045888(param_2) == '\0')) { + sub_806A2BC(param_2,1); + } + } +} + +void sub_806A2BC(struct DungeonEntity *param_1, u8 param_2) +{ + if ((EntityExists(param_1)) && (GetEntityType(param_1) == ENTITY_POKEMON) && (gDungeonGlobalData->leader != param_1)) { + if (param_2 != '\0') { + sub_804178C(1); + while (gDungeonGlobalData->unk12 < 0x3c) { + sub_803E46C(0x34); + } + } + sub_803E708(4,0x44); + sub_803F508(param_1); + sub_804AC20(¶m_1->posWorld); + gDungeonGlobalData->unk12 = 0; + } +} + +void nullsub_95(void) +{} diff --git a/src/code_806CD90.c b/src/code_806CD90.c index d3267a90a..7ea60ff3f 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -1,11 +1,20 @@ #include "global.h" #include "constants/direction.h" +#include "constants/status.h" #include "dungeon_entity.h" #include "dungeon_global_data.h" #include "dungeon_util.h" +#include "pokemon.h" +#include "tile_types.h" extern u8 sub_806CEBC(struct DungeonEntity *); extern void sub_806CCB4(struct DungeonEntity *, u8); +extern void sub_803E46C(u32); +extern bool8 sub_808DA44(s32 a1_, u32 a2_); +extern u32 sub_806CF98(struct DungeonEntity *); + +extern const u8 gUnknown_8106EEF[]; +extern const u8 gDungeonWaterType[]; void sub_806CD90(void) { @@ -83,3 +92,93 @@ void sub_806CE94(struct DungeonEntity *r0, u32 newDir) } } } + +u8 sub_806CEBC(struct DungeonEntity *param_1) +{ + u8 sleepStatus; + struct DungeonEntityData * iVar2; + struct DungeonEntityData * iVar3; + + // NOTE: copy needed to match + iVar2 = param_1->entityData; + iVar3 = param_1->entityData; + sleepStatus = iVar2->sleepStatus; + + if ((sleepStatus == SLEEP_STATUS_SLEEP) || (sleepStatus == SLEEP_STATUS_NAPPING) || (sleepStatus == SLEEP_STATUS_NIGHTMARE)) { + if ((iVar3->transformSpecies != SPECIES_SUDOWOODO) || (iVar3->sleepStatusTurnsLeft != 0x7f)) { + return 5; + } + else + return 7; + } + else if (iVar3->chargingStatus == CHARGING_STATUS_BIDE) { + return 0xB; + } + return 0x7; +} + +void sub_806CEFC(struct DungeonEntity *param_1, u32 newDir) +{ + param_1->entityData->action.facingDir = newDir & DIRECTION_MASK; + sub_806CE68(param_1, (newDir & DIRECTION_MASK)); +} + +void sub_806CF18(struct DungeonEntity *param_1) +{ + s32 iVar2; + struct DungeonEntityData *entityData; + + if (EntityExists(param_1)) { + entityData = param_1->entityData; + for (iVar2 = 0; iVar2 < 100; iVar2++) { + sub_803E46C(0x21); + if (!sub_808DA44(entityData->transformSpecies, param_1->unk6B)) { + break; + } + } + } +} + +u8 sub_806CF54(struct DungeonEntity *param_1) +{ + return param_1->entityData->unk204; +} + +void sub_806CF60(void) +{ + struct DungeonEntity *uVar2; + s32 iVar3; + + for(iVar3 = 0; iVar3 < DUNGEON_MAX_POKEMON; iVar3++) + { + uVar2 = gDungeonGlobalData->allPokemon[iVar3]; + if (EntityExists(uVar2)) { + sub_806CF98(uVar2); + } + } +} + +u32 sub_806CF98(struct DungeonEntity *param_1) +{ + struct MapTile *mapTile; + u32 uVar3; + u16 tileType; + struct DungeonEntityData *entityData; + + mapTile = GetMapTileForDungeonEntity_2(param_1); + tileType = mapTile->tileType & (TILE_TYPE_FLOOR | TILE_TYPE_LIQUID); + entityData = param_1->entityData; + uVar3 = GetShadowSize(entityData->transformSpecies); + if (tileType == (TILE_TYPE_FLOOR | TILE_TYPE_LIQUID)) { + return 6; + } + if (tileType == TILE_TYPE_FLOOR) { + if (IsWaterTileset()) { + uVar3 = gUnknown_8106EEF[uVar3]; + } + } + else if ((tileType == TILE_TYPE_LIQUID) && (gDungeonWaterType[gDungeonGlobalData->tileset] != DUNGEON_WATER_TYPE_LAVA)) + uVar3 = gUnknown_8106EEF[uVar3]; + entityData->unk204 = uVar3; + return uVar3; +} diff --git a/src/code_808417C.c b/src/code_808417C.c new file mode 100644 index 000000000..eb8a9dd34 --- /dev/null +++ b/src/code_808417C.c @@ -0,0 +1,26 @@ +#include "global.h" +#include "constants/ability.h" +#include "constants/iq_skill.h" +#include "dungeon_entity.h" +#include "dungeon_pokemon_attributes.h" +#include "dungeon_random.h" +#include "dungeon_util.h" + +s32 CalculateStatusTurns(struct DungeonEntity *target, s16 *turnRange, bool8 factorCurerSkills) +{ + s32 numTurns; + + numTurns = DungeonRandomRange(turnRange[0],turnRange[1]); + if (EntityExists(target) && (GetEntityType(target) == ENTITY_POKEMON) && (factorCurerSkills)) { + if (HasIQSkill(target, IQ_SKILL_SELF_CURER) && (numTurns != 0x7f)) { + numTurns /= 2; + } + if (HasAbility(target, ABILITY_NATURAL_CURE) && (numTurns != 0x7f) && (4 < numTurns)) { + numTurns = 5; + } + } + if (numTurns < 1) { + numTurns = 1; + } + return numTurns; +} diff --git a/src/code_80958E8.c b/src/code_80958E8.c index cae46bc82..bfe24308b 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -31,7 +31,7 @@ struct unkStruct_203B490 extern bool8 sub_809095C(u8); -extern s32 sub_8090298(u8); +extern s32 GetDungeonFloorCount(u8); extern bool8 sub_809017C(u8 *); extern s16 GetBaseSpecies(s16); extern bool8 IsInvalidItemReward(u8); @@ -119,7 +119,7 @@ bool8 ValidateWonderMail(struct WonderMail *data) if(sub_809095C(data->dungeon)) return FALSE; - if(data->floor >= sub_8090298(data->dungeon)) + if(data->floor >= GetDungeonFloorCount(data->dungeon)) return FALSE; if(sub_809017C(&(data->dungeon))) return FALSE; diff --git a/src/code_80972F4.c b/src/code_80972F4.c index 1c7e1258a..61554f0aa 100644 --- a/src/code_80972F4.c +++ b/src/code_80972F4.c @@ -5,6 +5,7 @@ extern void SaveDungeonLocation(struct unkStruct_8094924*, struct DungeonLocation*); extern void RestoreDungeonLocation(struct unkStruct_8094924*, struct DungeonLocation*); extern void sub_80015C0(u32, u32); +extern u32 sub_8001784(u32, u32, u16); struct unkStruct_8097270 { @@ -198,3 +199,22 @@ void sub_80972F4(void) void nullsub_128(void) {} + +s32 sub_8097318(s16 param_1) +{ + s32 iVar1; + s32 param_1_s32; + + param_1_s32 = param_1; + + if (param_1_s32 == 0xd) { + iVar1 = 0; + } + else { + iVar1 = sub_8001784(0,0x2b,param_1_s32); + if (iVar1 != 0) { + iVar1 = 1; + } + } + return iVar1; +} diff --git a/src/code_809747C.c b/src/code_809747C.c index 39d41a898..258b14bf5 100644 --- a/src/code_809747C.c +++ b/src/code_809747C.c @@ -1,9 +1,19 @@ #include "global.h" #include "dungeon.h" -extern u32 *gStoryMissionText[]; -extern const u8 gDummyScenarioText; -extern u32 gUnknown_8109CC0; + +struct MissionText +{ + u8 *text; + u8 unk4; + u8 unk5; + u8 unk6; + u8 unk7; +}; + +extern struct MissionText gStoryMissionText[]; +extern const u8 gUnknown_8109CC0[]; +extern const u8 gDummyScenarioText[]; extern u8 sub_80A270C(); extern void sub_80015C0(u8, u8); @@ -11,7 +21,7 @@ const u8 *sub_809747C(s16 r0) { if(r0 == 0xD) { - return &gDummyScenarioText; + return gDummyScenarioText; } else { @@ -23,7 +33,7 @@ const u8 *sub_80974A0(s16 r0) { if(r0 == 0xD) { - return &gDummyScenarioText; + return gDummyScenarioText; } else { @@ -31,44 +41,18 @@ const u8 *sub_80974A0(s16 r0) } } -#ifndef NONMATCHING -NAKED -#endif -u32 *GetCurrentMissionText(s16 r0) +const u8 *GetCurrentMissionText(s16 r0) { -#ifdef NONMATCHING - // TODO fix regswap memes of r0/r1 - if(r0 <= 0x1E) + if(r0 < 0x1F) { - return gStoryMissionText[(r0 << 1)]; + struct MissionText *mt = &gStoryMissionText[r0]; + return mt->text; } else { - return &gUnknown_8109CC0; + return gUnknown_8109CC0; } -#else - asm_unified("\tpush {lr}\n" - "\tlsls r0, 16\n" - "\tasrs r0, 16\n" - "\tcmp r0, 0x1E\n" - "\tble _080974D8\n" - "\tldr r0, _080974D4\n" - "\tb _080974E0\n" - "\t.align 2, 0\n" -"_080974D4: .4byte gUnknown_8109CC0\n" -"_080974D8:\n" - "\tlsls r0, 3\n" - "\tldr r1, _080974E4\n" - "\tadds r0, r1\n" - "\tldr r0, [r0]\n" -"_080974E0:\n" - "\tpop {r1}\n" - "\tbx r1\n" - "\t.align 2, 0\n" -"_080974E4: .4byte gStoryMissionText"); - -#endif -} +} void sub_80974E8(void) { diff --git a/src/dungeon_2.c b/src/dungeon_2.c index 282ac99a6..8308e340e 100644 --- a/src/dungeon_2.c +++ b/src/dungeon_2.c @@ -8,7 +8,7 @@ extern const char gUnknown_8108F10[]; extern const char gUnknown_8108F18[]; extern const char gUnknown_8108F2C[]; -extern u8 gUnknown_81077A8[]; +extern u8 gDungeonFloorCount[]; extern u8 gUnknown_81077E8[]; void sub_80901D8(struct DungeonLocation *param_1,struct DungeonLocation *param_2) @@ -43,14 +43,14 @@ void CopyDungeonName1toBuffer(u8 *buffer, struct DungeonLocation *dungeonLocatio strncpy(buffer, gDungeonNames[dungeonLocation->dungeonIndex].name1, 0x50); } -u8 sub_8090298(u8 dungeon) +s32 GetDungeonFloorCount(u8 dungeon) { if ((u8)(dungeon - DUNGEON_NORMAL_MAZE_2) < NUM_DUNGEON_MAZE) return 4; else if(dungeon > DUNGEON_PURITY_FOREST) return 1; else - return gUnknown_81077A8[dungeon]; + return gDungeonFloorCount[dungeon]; } u8 sub_80902C8(u8 dungeon) diff --git a/src/dungeon_ai_targeting.c b/src/dungeon_ai_targeting.c index ec5abd902..bc44288c7 100644 --- a/src/dungeon_ai_targeting.c +++ b/src/dungeon_ai_targeting.c @@ -1,18 +1,64 @@ #include "global.h" #include "dungeon_ai_targeting.h" +#include "dungeon_ai_targeting_1.h" +#include "constants/ability.h" +#include "constants/dungeon.h" #include "constants/iq_skill.h" #include "constants/item.h" #include "constants/status.h" +#include "constants/tactic.h" +#include "constants/targeting.h" + #include "dungeon_engine.h" +#include "dungeon_global_data.h" #include "dungeon_items.h" #include "dungeon_map_access.h" #include "dungeon_movement.h" #include "dungeon_pokemon_attributes.h" +#include "dungeon_random.h" #include "dungeon_util.h" #include "map.h" +#include "tile_types.h" + +extern u8 gDungeonWaterType[]; + +extern void ShowVisualFlags(struct DungeonEntity *r0); const u8 gDirectionBitMasks_2[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +const u8 gDirectionBitMasks_3[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +const u8 gTargetingData[3][2][2][2] = { + { + { + {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, + {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} + }, + { + {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, + {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} + } + }, + { + { + {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, + {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} + }, + { + {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET}, + {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET} + } + }, + { + { + {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET}, + {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET} + }, + { + {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, + {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} + } + } +}; bool8 CanAttackInFront(struct DungeonEntity *pokemon, s32 direction) { @@ -60,3 +106,261 @@ bool8 CanAttackInFront(struct DungeonEntity *pokemon, s32 direction) } return FALSE; } + +bool8 CanMoveForward(struct DungeonEntity *entityPokemon, s32 direction, u8 *param_3) +{ + u8 crossableTerrain; + u32 var; + struct MapTile *puVar3; + struct MapTile * iVar4; + + crossableTerrain = GetCrossableTerrain(entityPokemon->entityData->entityID); + *param_3 = 0; + puVar3 = GetMapTile_1 (entityPokemon->posWorld.x + gAdjacentTileOffsets[direction].x, + entityPokemon->posWorld.y + gAdjacentTileOffsets[direction].y); + if(!(puVar3->tileType & TILE_TYPE_MAP_EDGE)) + { + if( + ((!(puVar3->tileType & TILE_TYPE_MONSTER_HOUSE)) || gDungeonGlobalData->monsterHouseActive || (!HasIQSkill(entityPokemon,IQ_SKILL_HOUSE_AVOIDER))) && + ((puVar3->mapObject == NULL) || (!HasIQSkill(entityPokemon,IQ_SKILL_TRAP_AVOIDER)) || (GetEntityType(puVar3->mapObject) != 2) || ((!puVar3->mapObject->visible) && (entityPokemon->entityData->eyesightStatus != EYESIGHT_STATUS_EYEDROPS))) && + (((puVar3->tileType & 3) != 2) || (gDungeonWaterType[gDungeonGlobalData->tileset] != DUNGEON_WATER_TYPE_LAVA) || (!HasIQSkill(entityPokemon,IQ_SKILL_LAVA_EVADER))) ) { + if (!IsFixedDungeon()) { + if (entityPokemon->entityData->transformStatus == TRANSFORM_STATUS_MOBILE || (HasItem(entityPokemon, ITEM_ID_MOBILE_SCARF))) { + crossableTerrain = CROSSABLE_TERRAIN_WALL; + } + else if (HasIQSkill(entityPokemon,IQ_SKILL_ALL_TERRAIN_HIKER) || + ((HasIQSkill(entityPokemon,IQ_SKILL_SUPER_MOBILE) && (var = direction & 1, crossableTerrain = CROSSABLE_TERRAIN_WALL, var != 0)))) { + crossableTerrain = CROSSABLE_TERRAIN_CREVICE; + } + } + iVar4 = GetMapTile_1(entityPokemon->posWorld.x,entityPokemon->posWorld.y); + if (iVar4->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks_3[direction & DIRECTION_MASK]) { + if (puVar3->pokemon == NULL) { + return TRUE; + } + *param_3 = 1; + } + } + } + return FALSE; +} + +bool8 IsAtJunction(struct DungeonEntity *pokemon) +{ + char cVar2; + u32 crossableTerrain; + struct MapTile *mapTile; + struct DungeonEntityData *iVar7; + + crossableTerrain = GetCrossableTerrain(pokemon->entityData->entityID); + if (!IsFixedDungeon()) { + if ((pokemon->entityData->transformStatus == TRANSFORM_STATUS_MOBILE) || (HasItem(pokemon, ITEM_ID_MOBILE_SCARF))) { + crossableTerrain = CROSSABLE_TERRAIN_WALL; + } + else if (HasIQSkill(pokemon, IQ_SKILL_ALL_TERRAIN_HIKER)) { + crossableTerrain = CROSSABLE_TERRAIN_CREVICE; + } + else if (HasIQSkill(pokemon, IQ_SKILL_SUPER_MOBILE)) { + crossableTerrain = CROSSABLE_TERRAIN_WALL; + } + } + if (crossableTerrain == CROSSABLE_TERRAIN_WALL) { + iVar7 = pokemon->entityData; + iVar7->mobileTurnTimer += DungeonRandomCapped(100); + if (iVar7->mobileTurnTimer < 200) { + return FALSE; + } + else + iVar7->mobileTurnTimer = 0; + } + else { + if ((gDungeonWaterType[gDungeonGlobalData->tileset] == DUNGEON_WATER_TYPE_LAVA) + && (crossableTerrain == CROSSABLE_TERRAIN_LIQUID) + && (HasIQSkill(pokemon, IQ_SKILL_LAVA_EVADER))) { + crossableTerrain = CROSSABLE_TERRAIN_REGULAR; + } + mapTile = GetMapTile_1(pokemon->posWorld.x, pokemon->posWorld.y); + cVar2 = mapTile->canMoveAdjacent[crossableTerrain]; + if ((cVar2 != 0x54) && (cVar2 != 0x51) && (cVar2 != 0x45) && (cVar2 != 0x15) && (cVar2 != 0x55)) return FALSE; + } + return TRUE; +} + +bool8 ShouldAvoidFirstHit(struct DungeonEntity *pokemon, bool8 forceAvoid) +{ + if (!HasTactic(pokemon, TACTIC_AVOID_THE_FIRST_HIT)) + return FALSE; + if (!forceAvoid) + return FALSE; + return TRUE; +} + +bool8 ShouldAvoidEnemies(struct DungeonEntity *pokemon) +{ + if (!EntityExists(pokemon)) + { + return FALSE; + } + else + { + struct DungeonEntityData *pokemonData = pokemon->entityData; + if (pokemonData->terrifiedTurnsLeft != 0) + { + return TRUE; + } + if (pokemonData->isLeader) + { + return FALSE; + } + if (HasAbility(pokemon, ABILITY_RUN_AWAY)) + { + bool8 runAwayActive = pokemonData->HP < pokemonData->maxHP / 2; + if (runAwayActive) + { + return TRUE; + } + } + if (HasTactic(pokemon, TACTIC_GET_AWAY) || + (HasTactic(pokemon, TACTIC_AVOID_TROUBLE) && pokemonData->HP <= pokemonData->maxHP / 2)) + { + return TRUE; + } + return FALSE; + } +} + +bool8 ShouldAvoidEnemiesAndShowEffect(struct DungeonEntity *pokemon, bool8 showRunAwayEffect) +{ + if (ShouldAvoidEnemies(pokemon)) + { + CheckRunAwayVisualFlag(pokemon, showRunAwayEffect); + return TRUE; + } + return FALSE; +} + +void CheckRunAwayVisualFlag(struct DungeonEntity *pokemon, bool8 showRunAwayEffect) +{ + bool8 cVar1; + struct DungeonEntityData *iVar2; + struct DungeonEntityData *iVar3; + + iVar2 = pokemon->entityData; + iVar3 = iVar2; + + if (((!iVar2->isLeader) && HasAbility(pokemon,ABILITY_RUN_AWAY) && + (cVar1 = SetVisualFlags(iVar3,4,iVar2->HP <= iVar2->maxHP / 2), showRunAwayEffect)) && + (cVar1)) { + ShowVisualFlags(pokemon); + } +} + +u8 CanTarget(struct DungeonEntity *pokemon, struct DungeonEntity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified) +{ + struct DungeonEntityData *pokemonData = pokemon->entityData; + struct DungeonEntityData *targetData = targetPokemon->entityData; + u8 targetingDecoy; + u8 pokemonTargetingDecoy; + bool8 pokemonIsEnemy; + bool8 targetIsEnemy; + bool8 targetIsDecoy; + if (pokemon == targetPokemon) + { + return TARGET_CAPABILITY_CANNOT_ATTACK; + } + if (pokemonData->shopkeeperMode == SHOPKEEPER_FRIENDLY || + targetData->shopkeeperMode == SHOPKEEPER_FRIENDLY || + pokemonData->clientType == CLIENT_TYPE_DONT_MOVE || + targetData->clientType == CLIENT_TYPE_DONT_MOVE || + pokemonData->clientType == CLIENT_TYPE_CLIENT || + targetData->clientType == CLIENT_TYPE_CLIENT || + (checkPetrified && !pokemonData->isEnemy && targetData->immobilizeStatus == IMMOBILIZE_STATUS_PETRIFIED) || + (!ignoreInvisible && targetData->transformStatus == TRANSFORM_STATUS_INVISIBLE && !CanSeeInvisible(pokemon))) + { + return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET; + } + pokemonTargetingDecoy = pokemonData->targetingDecoy; + targetingDecoy = TARGETING_DECOY_NONE; + if (pokemonTargetingDecoy != TARGETING_DECOY_NONE) + { + targetingDecoy = TARGETING_DECOY_WILD; + if (pokemonTargetingDecoy == TARGETING_DECOY_TEAM) + { + targetingDecoy = TARGETING_DECOY_TEAM; + } + } + if (pokemonData->shopkeeperMode != SHOPKEEPER_NONE) + { + pokemonIsEnemy = FALSE; + if (pokemonData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) + { + pokemonIsEnemy = TRUE; + } + } + else + { + pokemonIsEnemy = pokemonData->isEnemy ? TRUE : FALSE; + } + if (targetData->shopkeeperMode != SHOPKEEPER_NONE) + { + targetIsEnemy = FALSE; + if (targetData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) + { + targetIsEnemy = TRUE; + } + } + else + { + targetIsEnemy = targetData->isEnemy ? TRUE : FALSE; + } + targetIsDecoy = FALSE; + if (targetData->waitingStatus == WAITING_STATUS_DECOY) + { + targetIsDecoy = TRUE; + } + return gTargetingData[targetingDecoy][pokemonIsEnemy][targetIsEnemy][targetIsDecoy]; +} + +static inline bool8 JoinLocationCannotUseItems_1(struct DungeonEntityData *pokemonData) +{ + if (pokemonData->joinLocation == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) + { + return TRUE; + } + if (pokemonData->joinLocation == DUNGEON_RESCUE_TEAM_BASE) + { + return TRUE; + } + return FALSE; +} + +u8 sub_807167C(struct DungeonEntity * pokemon, struct DungeonEntity * target) +{ + bool8 bVar1; + struct DungeonEntityData * iVar3; + struct DungeonEntityData * iVar4; + + iVar4 = pokemon->entityData; + iVar3 = target->entityData; + if (iVar4->clientType != CLIENT_TYPE_CLIENT) { + bVar1 = JoinLocationCannotUseItems_1(iVar4); + if (!bVar1 && (iVar4->shopkeeperMode == SHOPKEEPER_NONE) && (iVar3->clientType != CLIENT_TYPE_CLIENT)) { + bVar1 = JoinLocationCannotUseItems_1(iVar3); + if (bVar1 || (iVar3->shopkeeperMode != SHOPKEEPER_NONE)) { +error: + return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET; + } + else + { + if ((iVar4->isEnemy) != (iVar3->isEnemy)) { + return TARGET_CAPABILITY_CAN_TARGET; + } + else { + return TARGET_CAPABILITY_CANNOT_ATTACK; + } + } + } + } + goto error; +} + diff --git a/src/dungeon_ai_targeting_1.c b/src/dungeon_ai_targeting_1.c deleted file mode 100644 index 4d96c1cd7..000000000 --- a/src/dungeon_ai_targeting_1.c +++ /dev/null @@ -1,278 +0,0 @@ -#include "global.h" -#include "dungeon_ai_targeting_1.h" - -#include "constants/ability.h" -#include "constants/dungeon.h" -#include "constants/iq_skill.h" -#include "constants/status.h" -#include "constants/tactic.h" -#include "constants/targeting.h" - -#include "dungeon_engine.h" -#include "dungeon_global_data.h" -#include "dungeon_items.h" -#include "dungeon_map_access.h" -#include "dungeon_movement.h" -#include "dungeon_pokemon_attributes.h" -#include "dungeon_random.h" -#include "dungeon_util.h" -#include "tile_types.h" - - -extern u8 gDungeonWaterType[]; - -extern bool8 SetVisualFlags(struct DungeonEntityData *, u32, bool8); -extern void ShowVisualFlags(struct DungeonEntity *r0); - -const u8 gTargetingData[3][2][2][2] = { - { - { - {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, - {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} - }, - { - {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, - {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} - } - }, - { - { - {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, - {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} - }, - { - {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET}, - {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET} - } - }, - { - { - {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET}, - {TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET, TARGET_CAPABILITY_CAN_TARGET} - }, - { - {TARGET_CAPABILITY_CAN_TARGET, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET}, - {TARGET_CAPABILITY_CANNOT_ATTACK, TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET} - } - } -}; - - -bool8 IsAtJunction(struct DungeonEntity *pokemon) -{ - char cVar2; - u32 crossableTerrain; - struct MapTile *mapTile; - struct DungeonEntityData *iVar7; - - crossableTerrain = GetCrossableTerrain(pokemon->entityData->entityID); - if (!IsFixedDungeon()) { - if ((pokemon->entityData->transformStatus == TRANSFORM_STATUS_MOBILE) || (HasItem(pokemon, ITEM_ID_MOBILE_SCARF))) { - crossableTerrain = CROSSABLE_TERRAIN_WALL; - } - else if (HasIQSkill(pokemon, IQ_SKILL_ALL_TERRAIN_HIKER)) { - crossableTerrain = CROSSABLE_TERRAIN_CREVICE; - } - else if (HasIQSkill(pokemon, IQ_SKILL_SUPER_MOBILE)) { - crossableTerrain = CROSSABLE_TERRAIN_WALL; - } - } - if (crossableTerrain == CROSSABLE_TERRAIN_WALL) { - iVar7 = pokemon->entityData; - iVar7->mobileTurnTimer += DungeonRandomCapped(100); - if (iVar7->mobileTurnTimer < 200) { - return FALSE; - } - else - iVar7->mobileTurnTimer = 0; - } - else { - if ((gDungeonWaterType[gDungeonGlobalData->tileset] == DUNGEON_WATER_TYPE_LAVA) - && (crossableTerrain == CROSSABLE_TERRAIN_LIQUID) - && (HasIQSkill(pokemon, IQ_SKILL_LAVA_EVADER))) { - crossableTerrain = CROSSABLE_TERRAIN_REGULAR; - } - mapTile = GetMapTile_1(pokemon->posWorld.x, pokemon->posWorld.y); - cVar2 = mapTile->canMoveAdjacent[crossableTerrain]; - if ((cVar2 != 0x54) && (cVar2 != 0x51) && (cVar2 != 0x45) && (cVar2 != 0x15) && (cVar2 != 0x55)) return FALSE; - } - return TRUE; -} - -bool8 ShouldAvoidFirstHit(struct DungeonEntity *pokemon, bool8 forceAvoid) -{ - if (!HasTactic(pokemon, TACTIC_AVOID_THE_FIRST_HIT)) - return FALSE; - if (!forceAvoid) - return FALSE; - return TRUE; -} - -bool8 ShouldAvoidEnemies(struct DungeonEntity *pokemon) -{ - if (!EntityExists(pokemon)) - { - return FALSE; - } - else - { - struct DungeonEntityData *pokemonData = pokemon->entityData; - if (pokemonData->terrifiedTurnsLeft != 0) - { - return TRUE; - } - if (pokemonData->isLeader) - { - return FALSE; - } - if (HasAbility(pokemon, ABILITY_RUN_AWAY)) - { - bool8 runAwayActive = pokemonData->HP < pokemonData->maxHP / 2; - if (runAwayActive) - { - return TRUE; - } - } - if (HasTactic(pokemon, TACTIC_GET_AWAY) || - (HasTactic(pokemon, TACTIC_AVOID_TROUBLE) && pokemonData->HP <= pokemonData->maxHP / 2)) - { - return TRUE; - } - return FALSE; - } -} - -bool8 ShouldAvoidEnemiesAndShowEffect(struct DungeonEntity *pokemon, bool8 showRunAwayEffect) -{ - if (ShouldAvoidEnemies(pokemon)) - { - CheckRunAwayVisualFlag(pokemon, showRunAwayEffect); - return TRUE; - } - return FALSE; -} - -void CheckRunAwayVisualFlag(struct DungeonEntity *pokemon, bool8 showRunAwayEffect) -{ - bool8 cVar1; - struct DungeonEntityData *iVar2; - struct DungeonEntityData *iVar3; - - iVar2 = pokemon->entityData; - iVar3 = iVar2; - - if (((!iVar2->isLeader) && HasAbility(pokemon,ABILITY_RUN_AWAY) && - (cVar1 = SetVisualFlags(iVar3,4,iVar2->HP <= iVar2->maxHP / 2), showRunAwayEffect)) && - (cVar1)) { - ShowVisualFlags(pokemon); - } -} - -u8 CanTarget(struct DungeonEntity *pokemon, struct DungeonEntity *targetPokemon, bool8 ignoreInvisible, bool8 checkPetrified) -{ - struct DungeonEntityData *pokemonData = pokemon->entityData; - struct DungeonEntityData *targetData = targetPokemon->entityData; - u8 targetingDecoy; - u8 pokemonTargetingDecoy; - bool8 pokemonIsEnemy; - bool8 targetIsEnemy; - bool8 targetIsDecoy; - if (pokemon == targetPokemon) - { - return TARGET_CAPABILITY_CANNOT_ATTACK; - } - if (pokemonData->shopkeeperMode == SHOPKEEPER_FRIENDLY || - targetData->shopkeeperMode == SHOPKEEPER_FRIENDLY || - pokemonData->clientType == CLIENT_TYPE_DONT_MOVE || - targetData->clientType == CLIENT_TYPE_DONT_MOVE || - pokemonData->clientType == CLIENT_TYPE_CLIENT || - targetData->clientType == CLIENT_TYPE_CLIENT || - (checkPetrified && !pokemonData->isEnemy && targetData->immobilizeStatus == IMMOBILIZE_STATUS_PETRIFIED) || - (!ignoreInvisible && targetData->transformStatus == TRANSFORM_STATUS_INVISIBLE && !CanSeeInvisible(pokemon))) - { - return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET; - } - pokemonTargetingDecoy = pokemonData->targetingDecoy; - targetingDecoy = TARGETING_DECOY_NONE; - if (pokemonTargetingDecoy != TARGETING_DECOY_NONE) - { - targetingDecoy = TARGETING_DECOY_WILD; - if (pokemonTargetingDecoy == TARGETING_DECOY_TEAM) - { - targetingDecoy = TARGETING_DECOY_TEAM; - } - } - if (pokemonData->shopkeeperMode != SHOPKEEPER_NONE) - { - pokemonIsEnemy = FALSE; - if (pokemonData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) - { - pokemonIsEnemy = TRUE; - } - } - else - { - pokemonIsEnemy = pokemonData->isEnemy ? TRUE : FALSE; - } - if (targetData->shopkeeperMode != SHOPKEEPER_NONE) - { - targetIsEnemy = FALSE; - if (targetData->shopkeeperMode == SHOPKEEPER_AGGRESSIVE_TO_PLAYER) - { - targetIsEnemy = TRUE; - } - } - else - { - targetIsEnemy = targetData->isEnemy ? TRUE : FALSE; - } - targetIsDecoy = FALSE; - if (targetData->waitingStatus == WAITING_STATUS_DECOY) - { - targetIsDecoy = TRUE; - } - return gTargetingData[targetingDecoy][pokemonIsEnemy][targetIsEnemy][targetIsDecoy]; -} - -static inline bool8 JoinLocationCannotUseItems_1(struct DungeonEntityData *pokemonData) -{ - if (pokemonData->joinLocation == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) - { - return TRUE; - } - if (pokemonData->joinLocation == DUNGEON_RESCUE_TEAM_BASE) - { - return TRUE; - } - return FALSE; -} - -u8 sub_807167C(struct DungeonEntity * pokemon, struct DungeonEntity * target) -{ - bool8 bVar1; - struct DungeonEntityData * iVar3; - struct DungeonEntityData * iVar4; - - iVar4 = pokemon->entityData; - iVar3 = target->entityData; - if (iVar4->clientType != CLIENT_TYPE_CLIENT) { - bVar1 = JoinLocationCannotUseItems_1(iVar4); - if (!bVar1 && (iVar4->shopkeeperMode == SHOPKEEPER_NONE) && (iVar3->clientType != CLIENT_TYPE_CLIENT)) { - bVar1 = JoinLocationCannotUseItems_1(iVar3); - if (bVar1 || (iVar3->shopkeeperMode != SHOPKEEPER_NONE)) { -error: - return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET; - } - else - { - if ((iVar4->isEnemy) != (iVar3->isEnemy)) { - return TARGET_CAPABILITY_CAN_TARGET; - } - else { - return TARGET_CAPABILITY_CANNOT_ATTACK; - } - } - } - } - goto error; -} diff --git a/src/dungeon_engine.c b/src/dungeon_engine.c index 20c3a5004..61f5a9d8d 100644 --- a/src/dungeon_engine.c +++ b/src/dungeon_engine.c @@ -3,6 +3,14 @@ #include "constants/dungeon.h" #include "dungeon_global_data.h" +extern bool8 sub_8044B28(void); +extern bool8 xxx_dungeon_80442D0(u8); +extern void sub_8044994(void); +extern void sub_807E378(void); +extern void sub_8044574(void); +extern void sub_8044820(void); +extern void sub_8044AB4(void); + bool8 IsBossBattle() { if (gDungeonGlobalData->bossBattleIndex != 0 && gDungeonGlobalData->bossBattleIndex <= 0x31) @@ -19,4 +27,45 @@ bool8 IsFixedDungeon() return TRUE; } return FALSE; -} \ No newline at end of file +} + +bool8 sub_8044210(void) +{ + if( (u8)(gDungeonGlobalData->unk644 - 0x4B) < 0x17) + return TRUE; + else + return FALSE; +} + +void RunDungeon(u8 param_1) +{ + bool8 cVar2; + + if (!sub_8044B28()) { + sub_8044994(); + if (!sub_8044B28()) { + cVar2 = xxx_dungeon_80442D0(param_1); + if (!sub_8044B28()) { + if (cVar2 != '\0') { + sub_807E378(); + if (sub_8044B28()) { + return; + } + } + if (!sub_8044B28()) { + sub_8044574(); + if (!sub_8044B28()) { + sub_8044820(); + if (!sub_8044B28()) { + sub_8044AB4(); + gDungeonGlobalData->speedTurnCounter++; + if ( (s16)gDungeonGlobalData->speedTurnCounter == 0x18) { + gDungeonGlobalData->speedTurnCounter = 0; + } + } + } + } + } + } + } +} diff --git a/src/dungeon_pokemon_attributes.c b/src/dungeon_pokemon_attributes.c index 0550d7d7e..2a0d0c7c4 100644 --- a/src/dungeon_pokemon_attributes.c +++ b/src/dungeon_pokemon_attributes.c @@ -257,3 +257,26 @@ bool8 sub_8071A8C(struct DungeonEntity *pokemon) } return FALSE; } + +bool8 SetVisualFlags(struct DungeonEntityData *entityData, u16 newFlag, bool8 param_3) +{ + if ((entityData->visualFlags & newFlag)) { + entityData->previousVisualFlags = newFlag | entityData->previousVisualFlags; + } + else { + entityData->previousVisualFlags = entityData->previousVisualFlags & ~newFlag; + } + + if (param_3) { + entityData->visualFlags = newFlag | entityData->visualFlags; + } + else { + entityData->visualFlags = entityData->visualFlags & ~newFlag; + } + if ( ((entityData->previousVisualFlags & newFlag) == 0) && ((entityData->visualFlags & newFlag)) ) { + return TRUE; + } + else { + return FALSE; + } +} diff --git a/src/dungeon_range.c b/src/dungeon_range.c index 00b827d3c..e504a609f 100644 --- a/src/dungeon_range.c +++ b/src/dungeon_range.c @@ -5,6 +5,8 @@ #include "dungeon_map_access.h" #include "map.h" +extern bool8 IsTargetTwoTilesAway(struct Position *, struct Position *); + bool8 InSameRoom_2(struct Position *pos1, struct Position *pos2) { u8 pos1RoomIndex; @@ -46,3 +48,53 @@ bool8 InSameRoom_2(struct Position *pos1, struct Position *pos2) goto returnTrue; } } + +bool8 InSameRoom_3(struct Position *pos1, struct Position *pos2) +{ + struct MapTile *iVar2; + u8 pos1RoomIndex; + s32 xDiff; + s32 yDiff; + s32 x1; + s32 x2; + s32 y1; + s32 y2; + + iVar2 = GetMapTile_1(pos1->x,pos1->y); + pos1RoomIndex = iVar2->roomIndex; + if (pos1RoomIndex != CORRIDOR_ROOM_INDEX) { + struct MapRoom *pos1Room = &gDungeonGlobalData->roomData[pos1RoomIndex]; + if (pos1Room->startX - 1 > pos2->x || pos1Room->startY - 1 > pos2->y || + pos1Room->endX + 1 <= pos2->x || pos1Room->endY + 1 <= pos2->y) + { + goto _08083394; + } + } + else + { +_08083394: + + x1 = pos1->x; + x2 = pos2->x; + + y1 = pos1->y; + y2 = pos2->y; + + yDiff = y1 - y2; + xDiff = x1 - x2; + + xDiff = xDiff < 0 ? -xDiff : xDiff; + yDiff = yDiff < 0 ? -yDiff : yDiff; + + if (yDiff < xDiff) { + yDiff = xDiff; + } + if ((2 < yDiff)) +returnFalse: + return FALSE; + else if((yDiff == 2) && (!IsTargetTwoTilesAway(pos1,pos2))) { + goto returnFalse; + } + } + return TRUE; +} diff --git a/src/mailbox.c b/src/mailbox.c index 395701fc0..09598c7f8 100644 --- a/src/mailbox.c +++ b/src/mailbox.c @@ -19,11 +19,54 @@ extern void sub_802E7D0(void); extern void sub_802E0A0(void); extern void sub_802E1AC(void); -extern struct UnkTextStruct2 gUnknown_80E0284; -extern struct UnkTextStruct2 gUnknown_80E029C; -extern struct UnkTextStruct2 gUnknown_80E02B4; -extern struct UnkTextStruct2 gUnknown_80E02CC; +const struct UnkTextStruct2 gUnknown_80E0284 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; +const struct UnkTextStruct2 gUnknown_80E029C = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x03, 0x00, + 0x07, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E02B4 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x06, 0x00, + 0x07, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E02CC = +{ + 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x0f, 0x00, + 0x06, 0x03, + 0x03, 0x00, + NULL +}; + +const u8 gMailboxCheckMail[] = "Check Mail"; +const u8 gMailboxJobList[] = "Job List"; +const u8 gMailboxPKMNNews[] = "PKMN News"; +const u8 gMailActionStore[] = "Store"; +const u8 gMailActionRead[] = "Read"; +const u8 gMailAccepted[] = "Accepted"; +const u8 gUnknown_80E0324[] = "/"; +static const u8 mailbox_fill[] = "pksdir0"; extern struct unkStruct_203B304 *gUnknown_203B304; extern void sub_802E088(u32); diff --git a/src/moves.c b/src/moves.c index db325abf8..6c1cd6e5d 100644 --- a/src/moves.c +++ b/src/moves.c @@ -260,7 +260,7 @@ u32 GetMoveMaxPP(struct PokemonMove *move) return gMovesData[move->moveID].maxPP; } -u8 GetMoveUnk12(struct PokemonMove *move) +u32 GetMoveMaxPowerBoost(struct PokemonMove *move) { return gMovesData[move->moveID].unk12; } diff --git a/src/pelipper_board.c b/src/pelipper_board.c index 41bb02374..e9c4c7e42 100644 --- a/src/pelipper_board.c +++ b/src/pelipper_board.c @@ -26,10 +26,47 @@ struct unkStruct_203B308 }; extern struct unkStruct_203B308 *gUnknown_203B308; extern void SetPelipperBoardState(u32); -extern struct UnkTextStruct2 gUnknown_80E0330; -extern struct UnkTextStruct2 gUnknown_80E0348; -extern struct UnkTextStruct2 gUnknown_80E0360; -extern struct UnkTextStruct2 gUnknown_80E0378; + +const struct UnkTextStruct2 gUnknown_80E0330 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E0348 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x03, 0x00, + 0x07, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E0360 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x06, 0x00, + 0x07, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E0378 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x0f, 0x00, + 0x06, 0x03, + 0x03, 0x00, + NULL +}; + extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *); extern void sub_802ECB4(void); extern void nullsub_134(void); diff --git a/src/personality_test.c b/src/personality_test.c index 9a5474468..58814693b 100644 --- a/src/personality_test.c +++ b/src/personality_test.c @@ -11,7 +11,27 @@ #include "text.h" #include "menu.h" -EWRAM_DATA struct PersonalityStruct_203B400 *gUnknown_203B400; +enum +{ + PERSONALITY_GENERATE_NEW_QUESTION, + PERSONALITY_ASK_QUESTION, + PERSONALITY_UPDATE_TOTALS, + PERSONALITY_PLAYER_GENDER, + PERSONALITY_REVEAL, + PERSONALITY_STARTER_REVEAL, + PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_1, + PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_2, + PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_3, + PERSONALITY_PARTNER_SELECTION, + PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_1, + PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_2, + PERSONALITY_PARTNER_NICKNAME, + PERSONALITY_END_INTRO, + PERSONALITY_ADVANCE_TO_TEST_END, + PERSONALITY_TEST_END, +}; + +EWRAM_DATA struct PersonalityTestTracker *gPersonalityTestTracker; EWRAM_DATA struct PersonalityStruct_203B404 *gUnknown_203B404; @@ -393,8 +413,8 @@ const char personality_test_fill[] = "pksdir0"; u8 CreateTestTracker(void) { - gUnknown_203B400 = MemoryAlloc(sizeof(struct PersonalityStruct_203B400),8); - sub_801317C(&gUnknown_203B400->unkb4); + gPersonalityTestTracker = MemoryAlloc(sizeof(struct PersonalityTestTracker),8); + sub_801317C(&gPersonalityTestTracker->unkb4); InitializeTestStats(); sub_8099690(1); return 1; @@ -404,19 +424,19 @@ void InitializeTestStats(void) { s32 counter; - sub_8001024(&gUnknown_203B400->unk4); - gUnknown_203B400->FrameCounter = 0; - gUnknown_203B400->TestState = 0; - gUnknown_203B400->QuestionCounter = 0; + sub_8001024(&gPersonalityTestTracker->unk4); + gPersonalityTestTracker->FrameCounter = 0; + gPersonalityTestTracker->TestState = 0; + gPersonalityTestTracker->QuestionCounter = 0; for(counter = 0; counter < NUM_PERSONALITIES; counter++){ - gUnknown_203B400->NatureTotals[counter] = 0; + gPersonalityTestTracker->NatureTotals[counter] = 0; } - gUnknown_203B400->currQuestionIndex = 0; + gPersonalityTestTracker->currQuestionIndex = 0; for(counter = 0; counter < NUM_QUIZ_QUESTIONS; counter++){ - gUnknown_203B400->QuestionTracker[counter] = 0; + gPersonalityTestTracker->QuestionTracker[counter] = 0; } - gUnknown_203B400->playerNature = 0; - gUnknown_203B400->playerGender = 0; + gPersonalityTestTracker->playerNature = 0; + gPersonalityTestTracker->playerGender = 0; } u8 HandleTestTrackerState(void) @@ -425,60 +445,60 @@ u8 HandleTestTrackerState(void) s32 iVar1; - gUnknown_203B400->FrameCounter++; - switch(gUnknown_203B400->TestState) + gPersonalityTestTracker->FrameCounter++; + switch(gPersonalityTestTracker->TestState) { - case 0: + case PERSONALITY_GENERATE_NEW_QUESTION: GenerateNewQuestionOrGender(); break; - case 1: + case PERSONALITY_ASK_QUESTION: CallPromptNewQuestion(); break; - case 2: + case PERSONALITY_UPDATE_TOTALS: UpdateNatureTotals(); break; - case 3: + case PERSONALITY_PLAYER_GENDER: SetPlayerGender(); break; - case 4: + case PERSONALITY_REVEAL: RevealPersonality(); break; - case 5: + case PERSONALITY_STARTER_REVEAL: RevealStarter(); break; - case 6: + case PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_1: AdvanceToPickPartnerPrompt(); break; - case 7: + case PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_2: PromptPickPartner(); break; - case 8: + case PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_3: AdvanceToPartnerSelection(); break; - case 9: + case PERSONALITY_PARTNER_SELECTION: CallCreatePartnerSelectionMenu(); break; - case 10: + case PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_1: PromptForPartnerNickname(); break; - case 11: + case PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_2: AdvanceToPartnerNickhameScreen(); break; - case 12: + case PERSONALITY_PARTNER_NICKNAME: NicknamePartner(); break; - case 13: + case PERSONALITY_END_INTRO: PrintEndIntroText(); break; - case 14: + case PERSONALITY_ADVANCE_TO_TEST_END: AdvanceToTestEnd(); break; - case 15: - iVar1 = Random() * gUnknown_203B400->FrameCounter; + case PERSONALITY_TEST_END: + iVar1 = Random() * gPersonalityTestTracker->FrameCounter; sub_8094D28(Random()); for(counter = 0; counter < NUM_PERSONALITIES; counter++){ - iVar1 *= (gUnknown_203B400->NatureTotals[counter] + counter + 3); + iVar1 *= (gPersonalityTestTracker->NatureTotals[counter] + counter + 3); } iVar1 += sub_8094E4C(); @@ -495,9 +515,9 @@ u8 HandleTestTrackerState(void) void DeleteTestTracker(void) { - sub_8001044(&gUnknown_203B400->unk4); - MemoryFree(gUnknown_203B400); - gUnknown_203B400 = NULL; + sub_8001044(&gPersonalityTestTracker->unk4); + MemoryFree(gPersonalityTestTracker); + gPersonalityTestTracker = NULL; } void GenerateNewQuestionOrGender(void) @@ -506,36 +526,36 @@ void GenerateNewQuestionOrGender(void) int counter; int newQuestion; - gUnknown_203B400->QuestionCounter++; - if (gUnknown_203B400->QuestionCounter > MAX_ASKED_QUESTIONS) { + gPersonalityTestTracker->QuestionCounter++; + if (gPersonalityTestTracker->QuestionCounter > MAX_ASKED_QUESTIONS) { // We've asked enough questions sub_8014248(gGenderText, 0, 0, gGenderMenu, 0, 3, 0, 0, 257); - gUnknown_203B400->TestState = 3; + gPersonalityTestTracker->TestState = PERSONALITY_PLAYER_GENDER; } else { do { // Generate new question number and make sure we haven't done it newQuestion = RandomCapped(NUM_QUIZ_QUESTIONS); - gUnknown_203B400->currQuestionIndex = newQuestion; - } while (gUnknown_203B400->QuestionTracker[newQuestion] == 1); + gPersonalityTestTracker->currQuestionIndex = newQuestion; + } while (gPersonalityTestTracker->QuestionTracker[newQuestion] == 1); // Found one so let's get the category - category = gNatureQuestionTable[gUnknown_203B400->currQuestionIndex]; + category = gNatureQuestionTable[gPersonalityTestTracker->currQuestionIndex]; // Mark all of the questions in the category as used for(counter = 0; counter < NUM_QUIZ_QUESTIONS; counter++){ if (gNatureQuestionTable[counter] == category) - gUnknown_203B400->QuestionTracker[counter] = 1; + gPersonalityTestTracker->QuestionTracker[counter] = 1; } - gUnknown_203B400->TestState = 1; + gPersonalityTestTracker->TestState = PERSONALITY_ASK_QUESTION; } } void CallPromptNewQuestion(void) { PromptNewQuestion(); - gUnknown_203B400->TestState = 2; + gPersonalityTestTracker->TestState = PERSONALITY_UPDATE_TOTALS; } void UpdateNatureTotals() @@ -550,20 +570,20 @@ void UpdateNatureTotals() if (answerIndex == BRAVE_2B_TRIGGER) { // Set question to BRAVE_2B and ask the question.. - gUnknown_203B400->currQuestionIndex = NUM_QUIZ_QUESTIONS; - gUnknown_203B400->TestState = 1; + gPersonalityTestTracker->currQuestionIndex = NUM_QUIZ_QUESTIONS; + gPersonalityTestTracker->TestState = PERSONALITY_ASK_QUESTION; } else { - pointArray = gPersonalityQuestionPointerTable[gUnknown_203B400->currQuestionIndex]->effects; + pointArray = gPersonalityQuestionPointerTable[gPersonalityTestTracker->currQuestionIndex]->effects; // Skip until we get to the one for our answer // Each Answer has 16 bytes. 13 are currently used with 3 remaining pointArray += (NUM_PERSONALITIES + 3) * answerIndex; for (natureIndex = 0; natureIndex < NUM_PERSONALITIES; natureIndex++) { - gUnknown_203B400->NatureTotals[natureIndex] += pointArray[natureIndex]; + gPersonalityTestTracker->NatureTotals[natureIndex] += pointArray[natureIndex]; } - gUnknown_203B400->TestState = 0; + gPersonalityTestTracker->TestState = PERSONALITY_GENERATE_NEW_QUESTION; } } } @@ -575,16 +595,16 @@ void SetPlayerGender(void) if (sub_80144A4(&gender) == 0) { if (gender == MALE) { - gUnknown_203B400->playerGender = MALE; + gPersonalityTestTracker->playerGender = MALE; gUnknown_203B46C->playerGender = MALE; } else { - gUnknown_203B400->playerGender = FEMALE; + gPersonalityTestTracker->playerGender = FEMALE; gUnknown_203B46C->playerGender = FEMALE; } sub_8099690(0); - gUnknown_203B400->TestState = 4; + gPersonalityTestTracker->TestState = PERSONALITY_REVEAL; } } @@ -593,8 +613,8 @@ void RevealPersonality(void) s32 currentNature; s32 counter; - gUnknown_203B400->playerNature = RandomCapped(NUM_PERSONALITIES); - currentNature = gUnknown_203B400->playerNature; + gPersonalityTestTracker->playerNature = RandomCapped(NUM_PERSONALITIES); + currentNature = gPersonalityTestTracker->playerNature; for(counter = 0; counter < NUM_PERSONALITIES - 1; counter++){ currentNature++; @@ -604,13 +624,13 @@ void RevealPersonality(void) currentNature = HARDY; } - if (gUnknown_203B400->NatureTotals[currentNature] > gUnknown_203B400->NatureTotals[gUnknown_203B400->playerNature]) { - gUnknown_203B400->playerNature = currentNature; + if (gPersonalityTestTracker->NatureTotals[currentNature] > gPersonalityTestTracker->NatureTotals[gPersonalityTestTracker->playerNature]) { + gPersonalityTestTracker->playerNature = currentNature; } } - gUnknown_203B400->StarterID = gStarters[gUnknown_203B400->playerNature][gUnknown_203B400->playerGender]; + gPersonalityTestTracker->StarterID = gStarters[gPersonalityTestTracker->playerNature][gPersonalityTestTracker->playerGender]; PrintPersonalityTypeDescription(); - gUnknown_203B400->TestState = 5; + gPersonalityTestTracker->TestState = PERSONALITY_STARTER_REVEAL; } void RevealStarter(void) @@ -620,7 +640,7 @@ void RevealStarter(void) if (sub_80144A4(&temp) == 0) { sub_80141B4(gStarterReveal,0,0,0x101); PersonalityTest_DisplayStarterSprite(); - gUnknown_203B400->TestState = 6; + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_1; } } @@ -629,14 +649,14 @@ void AdvanceToPickPartnerPrompt(void) s32 temp; if (sub_80144A4(&temp) == 0) { - gUnknown_203B400->TestState = 7; + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_2; } } void PromptPickPartner(void) { sub_80141B4(gPartnerPrompt, 0, 0, 0x301); - gUnknown_203B400->TestState = 8; + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_SELECTION_3; } void AdvanceToPartnerSelection(void) @@ -644,14 +664,14 @@ void AdvanceToPartnerSelection(void) s32 temp; if (sub_80144A4(&temp) == 0) { - gUnknown_203B400->TestState = 9; + gPersonalityTestTracker->TestState = PERSONALITY_PARTNER_SELECTION; } } void CallCreatePartnerSelectionMenu(void) { - CreatePartnerSelectionMenu(gUnknown_203B400->StarterID); - gUnknown_203B400->TestState = 10; + CreatePartnerSelectionMenu(gPersonalityTestTracker->StarterID); + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_1; } void PromptForPartnerNickname(void) @@ -663,9 +683,9 @@ void PromptForPartnerNickname(void) { if(selectedPartner != 0xfffe) { sub_803CE6C(); - gUnknown_203B400->PartnerID = selectedPartner; + gPersonalityTestTracker->PartnerID = selectedPartner; sub_80141B4(gPartnerNickPrompt, 0, 0, 0x301); - gUnknown_203B400->TestState = 11; + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_PARTNER_NICKNAME_2; } } } @@ -675,15 +695,15 @@ void AdvanceToPartnerNickhameScreen(void) s32 temp; if (sub_80144A4(&temp) == 0) { - gUnknown_203B400->TestState = 12; + gPersonalityTestTracker->TestState = PERSONALITY_PARTNER_NICKNAME; } } void NicknamePartner(void) { - CopyStringtoBuffer(gUnknown_203B400->PartnerNick, GetMonSpecies(gUnknown_203B400->PartnerID)); - sub_801602C(3, gUnknown_203B400->PartnerNick); - gUnknown_203B400->TestState = 13; + CopyStringtoBuffer(gPersonalityTestTracker->PartnerNick, GetMonSpecies(gPersonalityTestTracker->PartnerID)); + sub_801602C(3, gPersonalityTestTracker->PartnerNick); + gPersonalityTestTracker->TestState = PERSONALITY_END_INTRO; } void PrintEndIntroText(void) @@ -691,7 +711,7 @@ void PrintEndIntroText(void) if (sub_8016080() != 0) { sub_80160D8(); sub_80141B4(gEndIntroText, 0, 0, 0x301); - gUnknown_203B400->TestState = 14; + gPersonalityTestTracker->TestState = PERSONALITY_ADVANCE_TO_TEST_END; } } @@ -700,22 +720,22 @@ void AdvanceToTestEnd(void) s32 temp; if (sub_80144A4(&temp) == 0) { - gUnknown_203B400->TestState = 15; + gPersonalityTestTracker->TestState = PERSONALITY_TEST_END; } } void PromptNewQuestion(void) { - sub_8014248(gPersonalityQuestionPointerTable[gUnknown_203B400->currQuestionIndex]->question, + sub_8014248(gPersonalityQuestionPointerTable[gPersonalityTestTracker->currQuestionIndex]->question, 0, 0, - (struct MenuItem *)gPersonalityQuestionPointerTable[gUnknown_203B400->currQuestionIndex]->answers, + (struct MenuItem *)gPersonalityQuestionPointerTable[gPersonalityTestTracker->currQuestionIndex]->answers, 0, 3, 0, 0, 0x101); } void PrintPersonalityTypeDescription(void) { - CopySpeciesNametoBuffer(gAvailablePokemonNames, gUnknown_203B400->StarterID); - sub_80141B4(gPersonalityTypeDescriptionTable[gUnknown_203B400->playerNature],0, + CopySpeciesNametoBuffer(gAvailablePokemonNames, gPersonalityTestTracker->StarterID); + sub_80141B4(gPersonalityTypeDescriptionTable[gPersonalityTestTracker->playerNature],0, 0,0x101); } @@ -728,7 +748,7 @@ void PersonalityTest_DisplayStarterSprite(void) u32 faceIndex; struct UnkTextStruct2 stackArray[4]; - starterID = gUnknown_203B400->StarterID; + starterID = gPersonalityTestTracker->StarterID; sub_8006518(stackArray); stackArray[1] = gUnknown_80F4244; ResetUnusedInputStruct(); diff --git a/src/post_office_guide.c b/src/post_office_guide.c index 2103e5f09..ca3ceb2d1 100644 --- a/src/post_office_guide.c +++ b/src/post_office_guide.c @@ -47,15 +47,6 @@ extern const char FriendRescue_80E0A80[]; extern const char Delivery_Text[]; extern const char BulletinBoard_Text[]; extern const char PostOffice_Text[]; -extern u8 gUnknown_80E1F30[]; -extern u8 gUnknown_80E1F3C[]; -extern u8 gUnknown_80E1F60[]; -extern u8 gUnknown_80E1F70[]; -extern u8 gUnknown_202DE58[]; -extern u8 gUnknown_80E1F80[]; -extern u8 gUnknown_80E1F40[]; -extern u8 gUnknown_80E1F54[]; -extern u8 gUnknown_80E1F94[]; enum PostOfficeStates { @@ -171,6 +162,20 @@ const struct UnkTextStruct2 gUnknown_80E1F18 = gUnkData_80E1F14 }; +ALIGNED(4) const u8 gUnknown_80E1F30[] = "Objectives"; +ALIGNED(4) const u8 gUnknown_80E1F3C[] = "%dF"; +ALIGNED(4) const u8 gUnknown_80E1F40[] = _(" Rescue {COLOR_1 YELLOW}%s{END_COLOR_TEXT_1}"); +ALIGNED(4) const u8 gUnknown_80E1F54[] = "Just go!"; +ALIGNED(4) const u8 gUnknown_80E1F60[] = _(" Bring {COLOR_1 GREEN}%s{END_COLOR_TEXT_1}"); +ALIGNED(4) const u8 gUnknown_80E1F70[] = _(" Find {COLOR_1 GREEN}%s{END_COLOR_TEXT_1}"); +ALIGNED(4) const u8 gUnknown_80E1F80[] = _(" Escort to {COLOR_1 YELLOW}%s{END_COLOR_TEXT_1}"); +ALIGNED(4) const u8 gUnknown_80E1F94[] = _("{COLOR_1 RED_2}???{END_COLOR_TEXT_1}"); +ALIGNED(4) static const u8 post_office_fill[] = "pksdir0"; + +extern u8 gUnknown_202DE58[]; +extern u8 gUnknown_202E5D8[]; +extern u8 gAvailablePokemonNames[]; + extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32); extern void sub_8014248(const char *r0, u32, u32, const struct MenuItem *r4, u32, u32, u32, struct OpenedFile **r5, u32); extern u32 sub_8012A64(struct UnkInputStruct**, u32); @@ -190,8 +195,6 @@ extern void sub_803B6B0(u32, u32, u32, u32); extern s16 sub_80A2688(u8 r0); extern u8 sub_80992E0(s16 *, s16 *); -extern u8 gUnknown_202E5D8[]; -extern u8 gAvailablePokemonNames[]; extern void sub_8031A2C(void); extern void sub_801317C(void *); diff --git a/src/rescue_password_menu.c b/src/rescue_password_menu.c index f170a0054..0df817896 100644 --- a/src/rescue_password_menu.c +++ b/src/rescue_password_menu.c @@ -2,19 +2,25 @@ #include "memory.h" #include "input.h" #include "item.h" +#include "menu.h" +#include "pokemon.h" +#include "save.h" #include "sub_8095228.h" #include "text.h" #include "main_menu.h" #include "rescue_password_menu.h" +#include "code_8094F88.h" +#include "wonder_mail.h" extern u8 gUnknown_202EC50[]; extern u32 gUnknown_202EC4C; +extern struct unkStruct_203B484 *gUnknown_203B484; +extern struct UnkTextStruct2 gUnknown_80E71E4; EWRAM_DATA u8 gUnknown_203B368; EWRAM_DATA u32 gUnknown_203B36C; EWRAM_DATA struct RescuePasswordMenu *gRescuePasswordMenu; -extern struct UnkTextStruct2 gUnknown_80E71E4; extern s32 sub_8035D74(void); extern void sub_80151C0(u32, u8 *); extern void sub_8031D70(u32, u32); @@ -22,6 +28,56 @@ extern u32 ConvertMenutoRescuePasswordState(u32); extern void sub_8039174(void); extern void sub_80155F0(void); extern void sub_8031E10(void); +extern void sub_8038F98(void); + + +extern u32 sub_8039068(u32, u8 *r1, struct unkStruct_8095228 *r0); + +extern void sub_80951BC(struct unkStruct_8095228 *r0); +extern void sub_80951FC(struct unkStruct_8095228 *r0); +extern u8 sub_8012FD8(u32 *r0); +extern void sub_8013114(u32 *, s32 *); +extern u32 sub_80154F0(void); +extern u8 sub_809539C(u32, u32); +extern void sub_8095274(u32); +extern u32 sub_8031DCC(void); +extern void sub_80391F8(void); +extern void sub_8031E00(); +extern void sub_8038DC0(u32); +extern struct MainMenu *GetMainMenu(void); + + +extern void sub_8039174(void); +extern void SetMenuItems(void *, struct UnkTextStruct2 *, u32, const struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32); +extern void sub_8035CF4(u32 *r0, u32, u32); +bool8 IsInvalidItemReward(u8); +bool8 sub_80952F0(u32, u32); +bool8 sub_8095298(u32); +bool8 sub_803D204(u8 *, struct unkStruct_8095228 *); +extern s32 GetDungeonFloorCount(u8); +extern s32 sub_8095190(void); + +extern struct UnkTextStruct2 gUnknown_80E71FC; +extern struct UnkTextStruct2 gUnknown_80E7278; +extern struct UnkTextStruct2 gUnknown_80E72EC; +extern struct UnkTextStruct2 gUnknown_80E7344; +extern struct UnkTextStruct2 gUnknown_80E73AC; +extern struct UnkTextStruct2 gUnknown_80E7408; +extern struct UnkTextStruct2 gUnknown_80E7468; +extern struct UnkTextStruct2 gUnknown_80E74C8; +extern struct UnkTextStruct2 gUnknown_80E752C; +extern struct UnkTextStruct2 gUnknown_80E7588; + +extern struct MenuItem gUnknown_80E7214[]; +extern struct MenuItem gUnknown_80E7290[]; +extern struct MenuItem gUnknown_80E7304[]; +extern struct MenuItem gUnknown_80E735C[]; +extern struct MenuItem gUnknown_80E73C4[]; +extern struct MenuItem gUnknown_80E7420[]; +extern struct MenuItem gUnknown_80E7480[]; +extern struct MenuItem gUnknown_80E74E0[]; +extern struct MenuItem gUnknown_80E7544[]; +extern struct MenuItem gUnknown_80E75A0[]; void CreateRescuePasswordMenu(u32 currMenu) { @@ -91,3 +147,360 @@ void CleanRescuePasswordMenu(void) gRescuePasswordMenu = NULL; } } + +static inline s32 UpdateRescuePasswordMenu_sub(s32 otherMenu) +{ + u32 iVar1; + s32 nextMenu; + + iVar1 = sub_8031DCC(); + nextMenu = otherMenu; + if (iVar1 != 0) + return nextMenu; + else + return MENU_NO_SCREEN_CHANGE; +} + +s32 UpdateRescuePasswordMenu(void) +{ + struct unkStruct_8095228 *puVar5; + struct unkStruct_8095228 *puVar6; + u32 iVar7; + struct MainMenu *iVar9; + s32 nextMenu; + struct unkStruct_8095228 local_44; + u32 local_14; + u32 subtract; + + local_14 = 0xb; + nextMenu = MENU_NO_SCREEN_CHANGE; + switch(gRescuePasswordMenu->state) { + case 0: + case 2: + case 4: + nextMenu = UpdateRescuePasswordMenu_sub(MENU_FRIEND_RESCUE); + break; + case 1: + case 3: + case 5: + iVar7 = sub_80154F0(); + MemoryFill8((u8 *)&local_44, 0, sizeof(struct unkStruct_8095228)); + switch(iVar7) + { + case 1: + sub_8031E00(); + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0: + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 2: + nextMenu = MENU_FRIEND_RESCUE; + break; + case 3: + switch(sub_8039068(gRescuePasswordMenu->currMenu, gUnknown_202EC50, &local_44)) { + case 0x11: + nextMenu = 0x11; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0xd: + nextMenu = 0xD; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0x12: + nextMenu = 0x12; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 7: + nextMenu = 7; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0x16: + sub_8095274(local_44.unk10); + sub_8038F98(); + gRescuePasswordMenu->state = 9; + nextMenu = MENU_NO_SCREEN_CHANGE; + local_44.mailType = 2; + sub_80951BC(&local_44); + break; + case 0x13: + nextMenu = 0x13; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 9: + nextMenu = 0x9; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0x17: + sub_8038F98(); + gRescuePasswordMenu->state = 9; + nextMenu = MENU_NO_SCREEN_CHANGE; + local_44.mailType = 5; + sub_80951FC(&local_44); + puVar5 = sub_8095228(sub_809539C(1, local_44.unk10)); + puVar5->mailType = 7; + MemoryFill8((u8 *)&gUnknown_203B484, 0, sizeof(struct unkStruct_203B484)); + break; + default: + break; + case 0x14: + nextMenu = 0x14; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0xb: + nextMenu = 0xb; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0x18: + sub_8038F98(); + gRescuePasswordMenu->state = 9; + nextMenu = MENU_NO_SCREEN_CHANGE; + puVar6 = sub_8095228(sub_809539C(4, local_44.unk10)); + *puVar6 = local_44; + puVar6->mailType = 6; + iVar9 = GetMainMenu(); + iVar9->unk3A = 1; + break; + } + break; + default: + break; + } + break; + case 6: + nextMenu = UpdateRescuePasswordMenu_sub(MENU_WONDER_MAIL); + break; + case 7: + switch(sub_80154F0()) + { + case 3: + nextMenu = 0x15; + sub_8038DC0(nextMenu); + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 0: + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + case 1: + sub_8031E00(); + nextMenu = MENU_NO_SCREEN_CHANGE; + break; + default: + break; + case 2: + nextMenu = MENU_WONDER_MAIL; + break; + } + break; + case 8: + if (sub_8012FD8(&gRescuePasswordMenu->unk8) == '\0') { + sub_8013114(&gRescuePasswordMenu->unk8, &local_14); + } + switch(local_14) + { + default: + case 0xD: + break; + case 0xA: + case 0xC: + sub_8039174(); + ResetUnusedInputStruct(); + sub_800641C(0,1,1); + sub_80151C0(4,gUnknown_202EC50); + gRescuePasswordMenu->state = 8; + subtract = gRescuePasswordMenu->currMenu - 0x21; + nextMenu = MENU_FRIEND_RESCUE; + if (1 < subtract) break; + nextMenu = MENU_WONDER_MAIL; + break; + case 11: + gRescuePasswordMenu->state = 8; + nextMenu = MENU_NO_SCREEN_CHANGE; + sub_80391F8(); + break; + } + break; + case 9: + if (sub_8012FD8(&gRescuePasswordMenu->unk8) == '\0') { + sub_8013114(&gRescuePasswordMenu->unk8, &local_14); + } + switch(local_14) + { + default: + case 0xD: + break; + case 0xA: + case 0xC: + sub_8039174(); + ResetUnusedInputStruct(); + sub_800641C(0,1,1); + sub_80151C0(4,gUnknown_202EC50); + gRescuePasswordMenu->state = ConvertMenutoRescuePasswordState(gRescuePasswordMenu->currMenu); + subtract = gRescuePasswordMenu->currMenu - 0x21; + nextMenu = 0x2a; + if (subtract < 2) { + nextMenu = 0x2b; + } + break; + case 0xB: + gRescuePasswordMenu->state = 9; + nextMenu = MENU_NO_SCREEN_CHANGE; + sub_80391F8(); + break; + } + } + return nextMenu; +} + +void sub_8038DC0(u32 param_1) +{ + sub_8006518(gRescuePasswordMenu->unk1A8); + ResetUnusedInputStruct(); + sub_800641C(0,1,1); + sub_80155F0(); + switch(param_1) { + case 0x11: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E71FC,gUnknown_80E7214,0,0xd,0); + break; + case 0x12: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E72EC,gUnknown_80E7304,0,0xd,0); + break; + case 7: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7344,gUnknown_80E735C,0,0xd,0); + break; + case 0xd: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7588,gUnknown_80E75A0,0,0xd,0); + break; + case 0x13: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E73AC,gUnknown_80E73C4,0,0xd,0); + break; + case 9: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7408,gUnknown_80E7420,0,0xd,0); + break; + case 0x14: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7468,gUnknown_80E7480,0,0xd,0); + break; + case 0xb: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E74C8,gUnknown_80E74E0,0,0xd,0); + break; + case 0x15: + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E752C,gUnknown_80E7544,0,0xd,0); + break; + default: + break; + } + sub_8035CF4(&gRescuePasswordMenu->unk8,0,1); +} + +void sub_8038F98(void) +{ + sub_8006518(gRescuePasswordMenu->unk1A8); + ResetUnusedInputStruct(); + sub_800641C(0,1,1); + sub_80155F0(); + SetMenuItems(&gRescuePasswordMenu->unk8,gRescuePasswordMenu->unk148,0,&gUnknown_80E7278,gUnknown_80E7290,0,0xd,0); + sub_8035CF4(&gRescuePasswordMenu->unk8,0,1); +} + +u32 ConvertMenutoRescuePasswordState(u32 unused) +{ + u32 uVar1; + + uVar1 = 0xb; + switch(gRescuePasswordMenu->currMenu) { + case 0x1b: + uVar1 = 0; + break; + case 0x1f: + uVar1 = 4; + break; + case 0x1d: + uVar1 = 2; + break; + case MENU_DISPLAY_RESCUE_PASSWORD: + uVar1 = 6; + break; + case 0x1c: + uVar1 = 1; + break; + case 0x20: + uVar1 = 5; + break; + case 0x1e: + uVar1 = 3; + break; + case MENU_RESCUE_PASSWORD_ENTRY: + uVar1 = 7; + break; + } + return uVar1; +} + +u32 sub_8039068(u32 param_1, u8 *param_2,struct unkStruct_8095228 *param_3) +{ + if ( (!sub_803D204(param_2,param_3)) || (7 < param_3->mailType) || + (param_3->floor >= GetDungeonFloorCount(param_3->dungeon)) || + (param_3->clientSpecies == SPECIES_NONE) || (SPECIES_RAYQUAZA_CUTSCENE < param_3->clientSpecies) || + (IsInvalidItemReward(param_3->unk20.itemIndex))) { + return 0x11; + } + else + switch(param_1) + { + case 0x1C: + if (param_3->mailType != WONDER_MAIL_TYPE_SOS) { + return 0x12; + } + else if ( (sub_80952F0(2, param_3->unk10)) || (sub_80952F0(4, param_3->unk10)) || (sub_80952F0(6, param_3->unk10)) || (sub_8095298(param_3->unk10))) { + return 0x7; + } + else if (sub_8095190() == -1) { + return 0xd; + } + else { + return 0x16; + } + break; + case 0x1E: + if (param_3->mailType != WONDER_MAIL_TYPE_AOK) { + return 0x13; + } + else if (!sub_80952F0(1, param_3->unk10)) { + return 0x9; + } + else { + return 0x17; + } + break; + case 0x20: + if (param_3->mailType != WONDER_MAIL_TYPE_THANK_YOU) { + return 0x14; + } + else if ((!sub_80952F0(4, param_3->unk10)) || (param_3->unk28 != sub_8011C34())) { + return 0xb; + } + else { + return 0x18; + } + break; + default: + return -1; + } +} diff --git a/src/weather.c b/src/weather.c index fb951a008..9e9e35be6 100644 --- a/src/weather.c +++ b/src/weather.c @@ -38,7 +38,7 @@ void sub_807E5E4(u8 weather) gDungeonGlobalData->unkE265 = weather; gDungeonGlobalData->weather = gDungeonGlobalData->unkE265; - gDungeonGlobalData->unkE279 = 0; + gDungeonGlobalData->negateWeatherEffects = FALSE; for(index = 0; index < 8; index++) { gDungeonGlobalData->unkE267[index] = 0; gDungeonGlobalData->startingWeather[index] = 0; diff --git a/src/wonder_mail_4_1.c b/src/wonder_mail_4_1.c new file mode 100644 index 000000000..bd0e3ac3d --- /dev/null +++ b/src/wonder_mail_4_1.c @@ -0,0 +1,21 @@ +#include "global.h" + +extern u32 sub_8030DA0(void); +extern void sub_8030DE4(); +extern void sub_80310E4(u32); + + +void sub_8031498(void) +{ + switch(sub_8030DA0()) + { + case 0: + case 1: + break; + case 2: + case 3: + sub_8030DE4(); + sub_80310E4(0); + break; + } +} diff --git a/src/wonder_mail_5.c b/src/wonder_mail_5.c new file mode 100644 index 000000000..fbd7f03e3 --- /dev/null +++ b/src/wonder_mail_5.c @@ -0,0 +1,78 @@ +#include "global.h" +#include "memory.h" +#include "text.h" +#include "input.h" + +struct unkStruct_203B324 +{ + u8 fill0[0xC]; + u8 unkC; + u32 unk10; + struct UnkTextStruct2 *unk14; + struct UnkTextStruct2 unk18[4]; +}; +extern struct unkStruct_203B324 *gUnknown_203B324; + + +extern const struct UnkTextStruct2 gUnknown_80E091C; +extern const struct UnkTextStruct2 gUnknown_80E0900; +extern void sub_8030DD4(void); +extern void sub_801317C(void *); +extern void PlayMenuSoundEffect(u32); +extern u32 sub_8012A64(void *, u32); + +void sub_8030E2C(void); +void sub_8030E48(void); + +bool8 sub_8030D40(u8 param_1, s32 param_2) +{ + gUnknown_203B324 = MemoryAlloc(0x78,8); + gUnknown_203B324->unkC = param_1; + sub_801317C(gUnknown_203B324); + gUnknown_203B324->unk10 = param_2; + gUnknown_203B324->unk14 = &gUnknown_203B324->unk18[param_2]; + sub_8006518(gUnknown_203B324->unk18); + gUnknown_203B324->unk18[gUnknown_203B324->unk10] = gUnknown_80E091C; + sub_8030DD4(); + return 1; +} + +u8 sub_8030DA0(void) +{ + switch(sub_8012A64(gUnknown_203B324, gUnknown_203B324->unk10)) + { + case 2: + PlayMenuSoundEffect(1); + return 2; + case 1: + PlayMenuSoundEffect(0); + return 3; + default: + return 0; + } +} + +void sub_8030DD4(void) +{ + sub_8030E2C(); + sub_8030E48(); +} + +void sub_8030DE4(void) +{ + if(gUnknown_203B324 != NULL) + { + gUnknown_203B324->unk18[gUnknown_203B324->unk10] = gUnknown_80E0900; + ResetUnusedInputStruct(); + sub_800641C(gUnknown_203B324->unk18, 1, 1); + MemoryFree(gUnknown_203B324); + gUnknown_203B324 = NULL; + } +} + +void sub_8030E2C(void) +{ + ResetUnusedInputStruct(); + sub_800641C(gUnknown_203B324->unk18, 1, 1); +} + diff --git a/src/wonder_mail_802DF88.c b/src/wonder_mail_802DF88.c index 010a3efe2..74d3fdac0 100644 --- a/src/wonder_mail_802DF88.c +++ b/src/wonder_mail_802DF88.c @@ -56,8 +56,6 @@ const struct UnkTextStruct2 gUnknown_80E016C = 0x00, 0x00, NULL }; -extern struct UnkTextStruct2 gUnknown_80E0248; -extern struct UnkTextStruct2 gUnknown_80E0264; ALIGNED(4) const u8 gWonderMailClientThanksForRescuingMe[] = " Thank you for rescuing me!"; @@ -79,6 +77,30 @@ ALIGNED(4) const u8 gWonderMailClientItemDelivered2[] = _( static const u8 wonder_mail_802DF88_fill[] = "pksdir0"; +const struct UnkTextStruct2 gUnknown_80E0248 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; + +const u8 UnkData_80E0260[] = {0x01, 0x00, 0x12, 0x00}; + +const struct UnkTextStruct2 gUnknown_80E0264 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x02, 0x00, + 0x1A, 0x10, + 0x10, 0x00, + UnkData_80E0260 +}; + +static const u8 wonder_mail_802DF88_fill1[] = "pksdir0"; + extern void sub_80073B8(u32); extern void sub_80073E0(u32); extern void CreateRescueDescription(u32 *); diff --git a/sym_ewram2.txt b/sym_ewram2.txt index c23cc46df..d5b428e25 100644 --- a/sym_ewram2.txt +++ b/sym_ewram2.txt @@ -524,7 +524,7 @@ gUnknown_203B3F8 = .; /* 203B3F8 */ gUnknown_203B3FC = .; /* 203B3FC */ . += 0x4; -gUnknown_203B400 = .; /* 203B400 */ +gPersonalityTestTracker = .; /* 203B400 */ . += 0x4; gUnknown_203B404 = .; /* 203B404 */ diff --git a/tools/dungeonjson/dungeonjson.cpp b/tools/dungeonjson/dungeonjson.cpp index d28f16097..d11c39c8a 100644 --- a/tools/dungeonjson/dungeonjson.cpp +++ b/tools/dungeonjson/dungeonjson.cpp @@ -494,7 +494,7 @@ string generate_move_data_text(Json data) { << read_json_int(data_entry["accuracyOffensive"], 1) << read_json_int(data_entry["accuracyUseChance"], 1) << read_json_int(data_entry["hitCount"], 1) - << read_json_int(data_entry["unk12"], 1) + << read_json_int(data_entry["maxPowerBoost"], 1) << read_json_int(data_entry["criticalHitChance"], 1) << read_json_bool(data_entry["affectedByMagicCoat"]) << read_json_bool(data_entry["targetsUser"])