Merge branch 'master' into libc

This commit is contained in:
PikalaxALT 2018-01-21 20:38:34 -05:00 committed by GitHub
commit 097da4e011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1157 changed files with 713 additions and 1196 deletions

View File

@ -8,12 +8,12 @@ Make sure that there is an environment variable called DEVKITARM with the path o
Then get the compiler from https://github.com/pret/agbcc and run the following commands.
build.sh
install.sh PATH_OF_POKEEMERALD_DIRECTORY
./build.sh
./install.sh PATH_OF_POKEEMERALD_DIRECTORY
Then in the pokeemerald directory, build the tools.
build_tools.sh
./build_tools.sh
Finally, build the rom.

View File

@ -1,12 +1,14 @@
# Pokémon Emerald
[![Build Status][travis-badge]][travis]
This is a disassembly of Pokémon Emerald.
It builds the following rom:
* pokeemerald.gba `sha1: f3ae088181bf583e55daf962a92bb46f4f1d07b7`
To set up the repository, see [**INSTALL.md**](INSTALL.md).
To set up the repository, see [INSTALL.md](INSTALL.md).
## See also
@ -32,3 +34,5 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md).
[pokefirered]: https://github.com/pret/pokefirered
[Discord]: https://discord.gg/cJxDDVP
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret
[travis]: https://travis-ci.org/pret/pokeemerald
[travis-badge]: https://travis-ci.org/pret/pokeemerald.svg?branch=master

0
asm/battle_anim_80D51AC.s Executable file → Normal file
View File

0
asm/battle_anim_815A0D4.s Executable file → Normal file
View File

0
asm/battle_frontier_1.s Executable file → Normal file
View File

2
asm/battle_frontier_2.s Executable file → Normal file
View File

@ -18556,7 +18556,7 @@ _081A4202:
thumb_func_start sub_81A4224
sub_81A4224: @ 81A4224
push {lr}
bl sub_81652B4
bl ValidateEReaderTrainer
pop {r0}
bx r0
thumb_func_end sub_81A4224

0
asm/battle_tent.s Executable file → Normal file
View File

6
asm/battle_tower.s Executable file → Normal file
View File

@ -5898,8 +5898,8 @@ _08165294:
.pool
thumb_func_end GetEreaderTrainerName
thumb_func_start sub_81652B4
sub_81652B4: @ 81652B4
thumb_func_start ValidateEReaderTrainer
ValidateEReaderTrainer: @ 81652B4
push {r4-r6,lr}
ldr r2, =gSpecialVar_Result
movs r0, 0
@ -5951,7 +5951,7 @@ _08165316:
pop {r0}
bx r0
.pool
thumb_func_end sub_81652B4
thumb_func_end ValidateEReaderTrainer
thumb_func_start sub_8165328
sub_8165328: @ 8165328

0
asm/contest_link_81D9DE4.s Executable file → Normal file
View File

0
asm/fldeff_cut.s Executable file → Normal file
View File

0
asm/fldeff_groundshake.s Executable file → Normal file
View File

0
asm/fldeff_softboiled.s Executable file → Normal file
View File

0
asm/fossil_specials.s Executable file → Normal file
View File

View File

@ -1,73 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start AccessHallOfFamePC
AccessHallOfFamePC: @ 8137C28
push {lr}
ldr r0, =CB2_DoHallOfFamePC
bl SetMainCallback2
bl ScriptContext2_Enable
pop {r0}
bx r0
.pool
thumb_func_end AccessHallOfFamePC
thumb_func_start ReturnFromHallOfFamePC
ReturnFromHallOfFamePC: @ 8137C3C
push {lr}
ldr r0, =c2_exit_to_overworld_2_switch
bl SetMainCallback2
ldr r1, =gFieldCallback
ldr r0, =ReshowPCMenuAfterHallOfFamePC
str r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end ReturnFromHallOfFamePC
thumb_func_start ReshowPCMenuAfterHallOfFamePC
ReshowPCMenuAfterHallOfFamePC: @ 8137C5C
push {lr}
sub sp, 0x4
bl ScriptContext2_Enable
bl Overworld_PlaySpecialMapMusic
bl sp109_CreatePCMenu
bl sub_80E2514
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
ldr r0, =Task_WaitForPaletteFade
movs r1, 0xA
bl CreateTask
add sp, 0x4
pop {r0}
bx r0
.pool
thumb_func_end ReshowPCMenuAfterHallOfFamePC
thumb_func_start Task_WaitForPaletteFade
Task_WaitForPaletteFade: @ 8137C94
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gPaletteFade
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _08137CAC
adds r0, r2, 0
bl DestroyTask
_08137CAC:
pop {r0}
bx r0
.pool
thumb_func_end Task_WaitForPaletteFade

0
asm/international_string_util.s Executable file → Normal file
View File

0
asm/item_icon.s Executable file → Normal file
View File

0
asm/item_menu.s Executable file → Normal file
View File

0
asm/item_menu_icons.s Executable file → Normal file
View File

0
asm/learn_move.s Executable file → Normal file
View File

View File

@ -38868,7 +38868,7 @@ _0801D7D0:
ldr r1, [r4, 0x18]
movs r2, 0xBC
bl memcpy
bl sub_81652B4
bl ValidateEReaderTrainer
b _0801D804
.pool
_0801D7F0:

0
asm/list_menu.s Executable file → Normal file
View File

View File

@ -262,6 +262,13 @@
.2byte \output
.2byte SPECIAL_\function
.endm
@ temporary solution
.macro specialvar_ output, functionId
.byte 0x26
.2byte \output
.2byte \functionId
.endm
@ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock state, the script will remain blocked indefinitely (essentially a hang).
.macro waitstate

0
asm/map_name_popup.s Executable file → Normal file
View File

0
asm/menu.s Executable file → Normal file
View File

0
asm/menu_indicators.s Executable file → Normal file
View File

View File

@ -468,7 +468,7 @@ _08178D74:
bne _08178E58
ldr r5, =0x0201c000
adds r0, r5, 0
bl sub_81538A0
bl RunMysteryEventScript
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16

View File

@ -1,870 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_81537CC
sub_81537CC: @ 81537CC
push {r4,lr}
adds r4, r3, 0
lsls r0, 16
lsrs r0, 16
lsls r2, 16
lsrs r2, 16
movs r3, 0x1
ands r0, r3
cmp r0, 0
beq _081537FC
ands r1, r3
cmp r1, 0
beq _081537FC
movs r0, 0x4
ands r2, r0
cmp r2, 0
beq _081537FC
movs r0, 0x80
lsls r0, 2
ands r0, r4
cmp r0, 0
beq _081537FC
movs r0, 0x1
b _081537FE
_081537FC:
movs r0, 0
_081537FE:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_81537CC
thumb_func_start sub_8153804
sub_8153804: @ 8153804
push {lr}
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftCantBeUsed
bl StringExpandPlaceholders
movs r0, 0x3
bl SetMysteryEventScriptStatus
pop {r0}
bx r0
.pool
thumb_func_end sub_8153804
thumb_func_start sub_8153820
sub_8153820: @ 8153820
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r1, =gUnknown_082DED2C
ldr r2, =gUnknown_082DED2C + 0x44
bl InitScriptContext
adds r0, r4, 0
adds r1, r5, 0
bl SetupBytecodeScript
str r5, [r4, 0x64]
movs r0, 0
str r0, [r4, 0x68]
str r0, [r4, 0x6C]
str r0, [r4, 0x70]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8153820
thumb_func_start sub_8153850
sub_8153850: @ 8153850
push {r4,lr}
adds r4, r0, 0
bl RunScriptCommand
lsls r0, 24
cmp r0, 0
beq _08153868
ldr r0, [r4, 0x70]
cmp r0, 0
beq _08153868
movs r0, 0x1
b _0815386A
_08153868:
movs r0, 0
_0815386A:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8153850
thumb_func_start sub_8153870
sub_8153870: @ 8153870
push {lr}
adds r1, r0, 0
ldr r0, =gUnknown_0203BBC0
bl sub_8153820
pop {r0}
bx r0
.pool
thumb_func_end sub_8153870
thumb_func_start sub_8153884
sub_8153884: @ 8153884
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, =gUnknown_0203BBC0
adds r0, r4, 0
bl sub_8153850
ldr r1, [r4, 0x6C]
str r1, [r5]
pop {r4,r5}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153884
thumb_func_start sub_81538A0
sub_81538A0: @ 81538A0
push {r4,lr}
adds r1, r0, 0
ldr r4, =gUnknown_0203BBC0
adds r0, r4, 0
bl sub_8153820
_081538AC:
adds r0, r4, 0
bl sub_8153850
cmp r0, 0
bne _081538AC
ldr r0, [r4, 0x6C]
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_81538A0
thumb_func_start SetMysteryEventScriptStatus
SetMysteryEventScriptStatus: @ 81538C4
ldr r1, =gUnknown_0203BBC0
str r0, [r1, 0x6C]
bx lr
.pool
thumb_func_end SetMysteryEventScriptStatus
thumb_func_start sub_81538D0
sub_81538D0: @ 81538D0
push {lr}
movs r2, 0
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003b18
adds r3, r0, r1
movs r1, 0
_081538DE:
adds r0, r3, r1
ldrb r0, [r0]
adds r2, r0
adds r1, 0x1
cmp r1, 0xB
bls _081538DE
adds r0, r2, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_81538D0
thumb_func_start sub_81538F8
sub_81538F8: @ 81538F8
push {r4,r5,lr}
ldr r5, =gSaveBlock1Ptr
ldr r0, [r5]
ldr r1, =0x00003b18
adds r4, r0, r1
bl sub_81538D0
adds r1, r0, 0
ldrb r0, [r4]
cmp r0, 0
beq _0815392A
ldrb r0, [r4, 0x1]
cmp r0, 0
beq _0815392A
ldrh r0, [r4, 0x2]
cmp r0, 0
beq _0815392A
cmp r1, 0
beq _0815392A
ldr r0, [r5]
ldr r2, =0x00003b14
adds r0, r2
ldr r0, [r0]
cmp r1, r0
beq _0815393C
_0815392A:
movs r0, 0
b _0815393E
.pool
_0815393C:
movs r0, 0x1
_0815393E:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_81538F8
thumb_func_start sub_8153944
sub_8153944: @ 8153944
push {lr}
sub sp, 0x4
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b14
adds r1, r0
ldr r2, =0x01000008
mov r0, sp
bl CpuSet
add sp, 0x4
pop {r0}
bx r0
.pool
thumb_func_end sub_8153944
thumb_func_start sub_8153970
sub_8153970: @ 8153970
push {r4-r6,lr}
lsls r0, 24
lsrs r0, 24
adds r3, r0, 0
lsls r1, 24
lsrs r1, 24
adds r5, r1, 0
lsls r2, 16
lsrs r2, 16
adds r6, r2, 0
cmp r3, 0
beq _08153990
cmp r1, 0
beq _08153990
cmp r2, 0
bne _08153996
_08153990:
bl sub_8153944
b _081539BC
_08153996:
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldr r1, =0x00003b18
adds r0, r1
strb r3, [r0]
ldr r0, [r4]
ldr r2, =0x00003b19
adds r0, r2
strb r5, [r0]
ldr r0, [r4]
adds r1, 0x2
adds r0, r1
strh r6, [r0]
bl sub_81538D0
ldr r1, [r4]
ldr r2, =0x00003b14
adds r1, r2
str r0, [r1]
_081539BC:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8153970
thumb_func_start sub_81539D4
sub_81539D4: @ 81539D4
push {r4-r6,lr}
ldr r6, =gSaveBlock1Ptr
ldr r0, [r6]
ldr r1, =0x00003b18
adds r4, r0, r1
bl sub_81538F8
cmp r0, 0
bne _081539F8
bl sub_8153944
movs r0, 0
b _08153A1A
.pool
_081539F8:
ldrh r5, [r4, 0x2]
ldrb r0, [r4, 0x1]
subs r0, 0x1
strb r0, [r4, 0x1]
lsls r0, 24
cmp r0, 0
bne _08153A0C
bl sub_8153944
b _08153A18
_08153A0C:
bl sub_81538D0
ldr r1, [r6]
ldr r2, =0x00003b14
adds r1, r2
str r0, [r1]
_08153A18:
adds r0, r5, 0
_08153A1A:
pop {r4-r6}
pop {r1}
bx r1
.pool
thumb_func_end sub_81539D4
thumb_func_start script_status_stop_and_ret_1
script_status_stop_and_ret_1: @ 8153A24
push {lr}
bl StopScript
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end script_status_stop_and_ret_1
thumb_func_start sub_8153A30
sub_8153A30: @ 8153A30
push {r4-r7,lr}
adds r7, r0, 0
bl ScriptReadWord
str r0, [r7, 0x68]
adds r0, r7, 0
bl ScriptReadHalfword
adds r5, r0, 0
lsls r5, 16
lsrs r5, 16
adds r0, r7, 0
bl ScriptReadWord
adds r6, r0, 0
adds r0, r7, 0
bl ScriptReadHalfword
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
adds r0, r7, 0
bl ScriptReadWord
adds r3, r0, 0
adds r0, r5, 0
adds r1, r6, 0
adds r2, r4, 0
bl sub_81537CC
cmp r0, 0x1
bne _08153A74
str r0, [r7, 0x70]
b _08153A78
_08153A74:
bl sub_8153804
_08153A78:
movs r0, 0x1
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8153A30
thumb_func_start sub_8153A80
sub_8153A80: @ 8153A80
movs r0, 0
bx lr
thumb_func_end sub_8153A80
thumb_func_start sub_8153A84
sub_8153A84: @ 8153A84
ldr r1, [r0, 0x8]
ldrb r2, [r1]
adds r1, 0x1
str r1, [r0, 0x8]
str r2, [r0, 0x6C]
movs r0, 0
bx lr
thumb_func_end sub_8153A84
thumb_func_start sub_8153A94
sub_8153A94: @ 8153A94
push {r4,r5,lr}
adds r4, r0, 0
ldr r0, [r4, 0x8]
ldrb r5, [r0]
adds r0, 0x1
str r0, [r4, 0x8]
adds r0, r4, 0
bl ScriptReadWord
ldr r1, [r4, 0x68]
subs r0, r1
ldr r1, [r4, 0x64]
adds r1, r0, r1
cmp r5, 0xFF
beq _08153AB8
ldr r0, [r4, 0x6C]
cmp r5, r0
bne _08153ABE
_08153AB8:
ldr r0, =gStringVar4
bl StringExpandPlaceholders
_08153ABE:
movs r0, 0
pop {r4,r5}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153A94
thumb_func_start sub_8153ACC
sub_8153ACC: @ 8153ACC
push {r4,lr}
adds r4, r0, 0
bl ScriptReadWord
ldr r1, [r4, 0x68]
subs r0, r1
ldr r1, [r4, 0x64]
adds r0, r1
bl ScriptContext2_RunNewScript
movs r0, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8153ACC
thumb_func_start sub_8153AE8
sub_8153AE8: @ 8153AE8
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
bl IsEnigmaBerryValid
mov r8, r0
adds r0, r7, 0
bl ScriptReadWord
adds r4, r0, 0
ldr r0, [r7, 0x68]
subs r4, r0
ldr r0, [r7, 0x64]
adds r4, r0
ldr r0, =gStringVar1
mov r9, r0
ldr r6, =gSaveBlock1Ptr
ldr r1, [r6]
ldr r5, =0x000031f8
adds r1, r5
movs r2, 0x7
bl StringCopyN
adds r0, r4, 0
bl SetEnigmaBerry
ldr r4, =gStringVar2
ldr r1, [r6]
adds r1, r5
adds r0, r4, 0
movs r2, 0x7
bl StringCopyN
mov r0, r8
cmp r0, 0
bne _08153B54
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftBerry
b _08153B74
.pool
_08153B54:
mov r0, r9
adds r1, r4, 0
bl StringCompare
cmp r0, 0
beq _08153B70
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftBerryTransform
b _08153B74
.pool
_08153B70:
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftBerryObtained
_08153B74:
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r7, 0x6C]
bl IsEnigmaBerryValid
cmp r0, 0x1
bne _08153B9C
ldr r0, =0x0000402d
movs r1, 0x1
bl VarSet
b _08153BA0
.pool
_08153B9C:
movs r0, 0x1
str r0, [r7, 0x6C]
_08153BA0:
movs r0, 0
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8153AE8
thumb_func_start sub_8153BB0
sub_8153BB0: @ 8153BB0
push {r4,lr}
adds r4, r0, 0
ldr r2, [r4, 0x8]
ldrb r0, [r2]
adds r2, 0x1
str r2, [r4, 0x8]
ldrb r1, [r2]
adds r2, 0x1
str r2, [r4, 0x8]
bl GiveGiftRibbonToParty
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftSpecialRibbon
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153BB0
thumb_func_start sub_8153BE4
sub_8153BE4: @ 8153BE4
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x4
adds r4, r0, 0
ldr r0, [r4, 0x8]
ldrb r1, [r0]
mov r9, r1
adds r0, 0x1
str r0, [r4, 0x8]
ldrb r1, [r0]
mov r8, r1
adds r1, r0, 0x1
str r1, [r4, 0x8]
ldrb r6, [r0, 0x1]
adds r1, 0x1
str r1, [r4, 0x8]
adds r0, r4, 0
bl ScriptReadWord
adds r5, r0, 0
ldr r0, [r4, 0x68]
subs r5, r0
ldr r0, [r4, 0x64]
adds r5, r0
adds r0, r4, 0
bl ScriptReadWord
adds r1, r0, 0
ldr r0, [r4, 0x68]
subs r1, r0
ldr r0, [r4, 0x64]
adds r1, r0
subs r1, r5
lsls r1, 16
lsrs r1, 16
str r6, [sp]
adds r0, r5, 0
mov r2, r9
mov r3, r8
bl InitRamScript
movs r0, 0
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8153BE4
thumb_func_start sub_8153C4C
sub_8153C4C: @ 8153C4C
push {r4,lr}
adds r4, r0, 0
bl EnableNationalPokedex
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftNationalDex
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153C4C
thumb_func_start sub_8153C70
sub_8153C70: @ 8153C70
push {r4,lr}
adds r4, r0, 0
ldr r1, [r4, 0x8]
ldrb r0, [r1]
adds r1, 0x1
str r1, [r4, 0x8]
bl sub_811EFC0
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftRareWord
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153C70
thumb_func_start sub_8153C9C
sub_8153C9C: @ 8153C9C
push {r4,r5,lr}
ldr r1, [r0, 0x8]
ldrb r5, [r1]
adds r1, 0x1
str r1, [r0, 0x8]
ldrb r4, [r1]
adds r1, 0x1
str r1, [r0, 0x8]
bl ScriptReadHalfword
adds r2, r0, 0
lsls r2, 16
lsrs r2, 16
adds r0, r5, 0
adds r1, r4, 0
bl sub_8153970
movs r0, 0
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8153C9C
thumb_func_start sub_8153CC8
sub_8153CC8: @ 8153CC8
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x88
adds r6, r0, 0
bl ScriptReadWord
ldr r1, [r6, 0x68]
subs r0, r1
ldr r1, [r6, 0x64]
adds r5, r0, r1
movs r0, 0x64
adds r0, r5
mov r8, r0
add r4, sp, 0x24
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0x64
bl memcpy
adds r0, r4, 0
movs r1, 0x41
bl GetMonData
lsls r0, 16
lsrs r4, r0, 16
movs r0, 0xCE
lsls r0, 1
cmp r4, r0
bne _08153D18
ldr r0, =gStringVar1
ldr r1, =gText_EggNickname
movs r2, 0xB
bl StringCopyN
b _08153D22
.pool
_08153D18:
ldr r0, =gStringVar1
ldr r1, =gText_Pokemon
movs r2, 0xB
bl StringCopyN
_08153D22:
ldr r0, =gPlayerPartyCount
ldrb r0, [r0]
cmp r0, 0x6
bne _08153D4C
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftFullParty
bl StringExpandPlaceholders
movs r0, 0x3
b _08153DB6
.pool
_08153D4C:
ldr r7, =gPlayerParty + 500
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x64
bl memcpy
mov r0, sp
mov r1, r8
movs r2, 0x24
bl memcpy
movs r0, 0xCE
lsls r0, 1
cmp r4, r0
beq _08153D86
adds r0, r4, 0
bl SpeciesToNationalPokedexNum
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
adds r0, r4, 0
movs r1, 0x2
bl GetSetPokedexFlag
adds r0, r4, 0
movs r1, 0x3
bl GetSetPokedexFlag
_08153D86:
adds r0, r7, 0
movs r1, 0xC
bl GetMonData
lsls r0, 16
lsrs r0, 16
bl ItemIsMail
lsls r0, 24
cmp r0, 0
beq _08153DA4
adds r0, r7, 0
mov r1, sp
bl GiveMailToMon2
_08153DA4:
bl CompactPartySlots
bl CalculatePlayerPartyCount
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftSentOver
bl StringExpandPlaceholders
movs r0, 0x2
_08153DB6:
str r0, [r6, 0x6C]
movs r0, 0
add sp, 0x88
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153CC8
thumb_func_start sub_8153DD4
sub_8153DD4: @ 8153DD4
push {r4,lr}
adds r4, r0, 0
bl ScriptReadWord
adds r1, r0, 0
ldr r0, [r4, 0x68]
subs r1, r0
ldr r0, [r4, 0x64]
adds r1, r0
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bec
adds r0, r2
movs r2, 0xBC
bl memcpy
bl sub_81652B4
ldr r0, =gStringVar4
ldr r1, =gText_MysteryGiftNewTrainer
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153DD4
thumb_func_start sub_8153E1C
sub_8153E1C: @ 8153E1C
push {r4,lr}
adds r4, r0, 0
bl EnableResetRTC
ldr r0, =gStringVar4
ldr r1, =gText_InGameClockUsable
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8153E1C
thumb_func_start sub_8153E40
sub_8153E40: @ 8153E40
push {r4-r6,lr}
adds r6, r0, 0
bl ScriptReadWord
adds r5, r0, 0
adds r0, r6, 0
bl ScriptReadWord
adds r4, r0, 0
ldr r0, [r6, 0x68]
subs r4, r0
ldr r0, [r6, 0x64]
adds r4, r0
adds r0, r6, 0
bl ScriptReadWord
adds r1, r0, 0
ldr r0, [r6, 0x68]
subs r1, r0
ldr r0, [r6, 0x64]
adds r1, r0
subs r1, r4
adds r0, r4, 0
bl CalcByteArraySum
cmp r5, r0
beq _08153E7E
movs r0, 0
str r0, [r6, 0x70]
movs r0, 0x1
str r0, [r6, 0x6C]
_08153E7E:
movs r0, 0x1
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8153E40
thumb_func_start sub_8153E88
sub_8153E88: @ 8153E88
push {r4-r6,lr}
adds r6, r0, 0
bl ScriptReadWord
adds r5, r0, 0
adds r0, r6, 0
bl ScriptReadWord
adds r4, r0, 0
ldr r0, [r6, 0x68]
subs r4, r0
ldr r0, [r6, 0x64]
adds r4, r0
adds r0, r6, 0
bl ScriptReadWord
adds r1, r0, 0
ldr r0, [r6, 0x68]
subs r1, r0
ldr r0, [r6, 0x64]
adds r1, r0
subs r1, r4
adds r0, r4, 0
bl CalcCRC16
lsls r0, 16
lsrs r0, 16
cmp r5, r0
beq _08153ECA
movs r0, 0
str r0, [r6, 0x70]
movs r0, 0x1
str r0, [r6, 0x6C]
_08153ECA:
movs r0, 0x1
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8153E88
.align 2, 0 @ Don't pad with nop.

0
asm/new_menu_helpers.s Executable file → Normal file
View File

0
asm/party_menu.s Executable file → Normal file
View File

0
asm/pokemon_icon.s Executable file → Normal file
View File

0
asm/pokemon_storage_system.s Executable file → Normal file
View File

0
asm/pokemon_summary_screen.s Executable file → Normal file
View File

0
asm/pokenav.s Executable file → Normal file
View File

0
asm/rayquaza_scene.s Executable file → Normal file
View File

View File

@ -114,7 +114,7 @@ sub_80E6CA0: @ 80E6CA0
lsls r0, 24
cmp r0, 0
bne _080E6D1C
bl sub_81539D4
bl GetRecordMixingGift
ldr r2, =0x000011c8
adds r1, r5, r2
strh r0, [r1]
@ -186,7 +186,7 @@ sub_80E6D54: @ 80E6D54
lsls r0, 24
cmp r0, 0
bne _080E6DEE
bl sub_81539D4
bl GetRecordMixingGift
ldr r2, =0x000011c8
adds r1, r5, r2
strh r0, [r1]
@ -282,7 +282,7 @@ _080E6E60:
lsls r0, 24
cmp r0, 0
bne _080E6EFA
bl sub_81539D4
bl GetRecordMixingGift
ldr r1, [r5]
ldr r2, =0x00001210
adds r1, r2

View File

@ -676,9 +676,9 @@ _080E2360:
.pool
thumb_func_end sub_80E2308
thumb_func_start sp109_CreatePCMenu
@ bool sp109_CreatePCMenu()
sp109_CreatePCMenu: @ 80E236C
thumb_func_start ScrSpecial_CreatePCMenu
@ bool ScrSpecial_CreatePCMenu()
ScrSpecial_CreatePCMenu: @ 80E236C
push {lr}
ldr r0, =sub_80E2058
bl FuncIsActiveTask
@ -698,7 +698,7 @@ _080E2394:
_080E2396:
pop {r1}
bx r1
thumb_func_end sp109_CreatePCMenu
thumb_func_end ScrSpecial_CreatePCMenu
thumb_func_start CreatePCMenu
CreatePCMenu: @ 80E239C
@ -858,8 +858,8 @@ _080E24C6:
.pool
thumb_func_end CreatePCMenu
thumb_func_start sub_80E2514
sub_80E2514: @ 80E2514
thumb_func_start ScriptMenu_DisplayPCStartupPrompt
ScriptMenu_DisplayPCStartupPrompt: @ 80E2514
push {lr}
sub sp, 0x10
movs r0, 0
@ -882,7 +882,7 @@ sub_80E2514: @ 80E2514
pop {r0}
bx r0
.pool
thumb_func_end sub_80E2514
thumb_func_end ScriptMenu_DisplayPCStartupPrompt
thumb_func_start sub_80E2548
sub_80E2548: @ 80E2548

0
asm/script_movement.s Executable file → Normal file
View File

0
asm/smokescreen.s Executable file → Normal file
View File

0
asm/trainer_rematch.s Executable file → Normal file
View File

0
asm/use_pokeblock.s Executable file → Normal file
View File

View File

@ -1771,7 +1771,7 @@ EventScript_271D92:: @ 8271D92
EventScript_271DAC:: @ 8271DAC
message gUnknown_0827266F
waitmessage
special sp109_CreatePCMenu
special ScrSpecial_CreatePCMenu
waitstate
goto EventScript_271DBC
end

View File

@ -8,368 +8,335 @@
.include "asm/macros/event.inc"
.include "constants/constants.inc"
.section .rodata
gText_MysteryGiftBerry:: @ 8674AE4
.string "Obtained a {STR_VAR_2} BERRY!\nDad has it at PETALBURG GYM.$"
gText_MysteryGiftBerryTransform:: @ 8674B16
.string "The {STR_VAR_1} BERRY transformed into\none {STR_VAR_2} BERRY.$"
gText_MysteryGiftBerryObtained:: @ 8674B42
.string "The {STR_VAR_1} BERRY has already been\nobtained.$"
gText_MysteryGiftSpecialRibbon:: @ 8674B6A
.string "A special RIBBON was awarded to\nyour party POKéMON.$"
gText_MysteryGiftNationalDex:: @ 8674B9E
.string "The POKéDEX has been upgraded\nwith the NATIONAL MODE.$"
gText_MysteryGiftRareWord:: @ 8674BD4
.string "A rare word has been added.$"
gText_MysteryGiftSentOver:: @ 8674BF0
.string "{STR_VAR_1} was sent over!$"
gText_MysteryGiftFullParty:: @ 8674C02
.string "Your party is full.\n{STR_VAR_1} could not be sent over.$"
gText_MysteryGiftNewTrainer:: @ 8674C31
.string "A new TRAINER has arrived in\nHOENN.$"
.string "A new adversary has arrived in the\nBATTLE TOWER.$"
gText_MysteryGiftCantBeUsed:: @ 8674C86
.string "This data cant be used in\nthis version.$"
.align 2
gUnknown_08674CB0:: @ 8674CB0
setvaddress gUnknown_08674CB0
setorcopyvar 0x800D, 1
specialvar 0x8008, sub_813986C
setorcopyvar 0x800D, 0
specialvar 0x8009, sub_813986C
subvar 0x8008, 32777
buffernumberstring 0, 0x8008
MysteryEventScript_StampCard:: @ 8674CB0
setvaddress MysteryEventScript_StampCard
setorcopyvar VAR_RESULT, 1
specialvar VAR_0x8008, sub_813986C
setorcopyvar VAR_RESULT, 0
specialvar VAR_0x8009, sub_813986C
subvar VAR_0x8008, 32777
buffernumberstring 0, VAR_0x8008
lock
faceplayer
vmessage gText_MysteryGiftStampCard
vmessage sText_MysteryGiftStampCard
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftStampCard::
sText_MysteryGiftStampCard:
.string "Thank you for using the STAMP CARD\nSystem.\pYou have {STR_VAR_1} more to collect to\nfill your STAMP CARD.$"
gUnknown_08674D3D:: @ 8674D3D
setvaddress gUnknown_08674D3D
checkflag 0x1E4
vgoto_if 0, EventScript_674D4C
MysteryEventScript_SurfPichu:: @ 8674D3D
setvaddress MysteryEventScript_SurfPichu
checkflag FLAG_MYSTERY_EVENT_DONE
vgoto_if 0, SurfPichu_GiveIfPossible
gotoram
EventScript_674D4C:: @ 8674D4C
specialvar 0x40DD, CalculatePlayerPartyCount
compare_var_to_value 0x40DD, 6
vgoto_if 1, EventScript_674D73
setflag 0x1E4
vcall EventScript_674D7E
SurfPichu_GiveIfPossible: @ 8674D4C
specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount
compare_var_to_value VAR_EVENT_PICHU_SLOT, 6
vgoto_if 1, SurfPichu_FullParty
setflag FLAG_MYSTERY_EVENT_DONE
vcall SurfPichu_GiveEgg
lock
faceplayer
vmessage gText_MysteryGiftEgg
vmessage sText_MysteryGiftEgg
waitmessage
waitbuttonpress
playfanfare 370
playfanfare MUS_FANFA4
waitfanfare
release
end
EventScript_674D73:: @ 8674D73
SurfPichu_FullParty: @ 8674D73
lock
faceplayer
vmessage gText_MysteryGiftEgg_2
vmessage sText_FullParty
waitmessage
waitbuttonpress
release
end
EventScript_674D7E:: @ 8674D7E
SurfPichu_GiveEgg: @ 8674D7E
giveegg SPECIES_PICHU
setmonobedient 0x40DD
setmonmetlocation 0x40DD, 255
compare_var_to_value 0x40DD, 1
vgoto_if 1, EventScript_674DC0
compare_var_to_value 0x40DD, 2
vgoto_if 1, EventScript_674DC6
compare_var_to_value 0x40DD, 3
vgoto_if 1, EventScript_674DCC
compare_var_to_value 0x40DD, 4
vgoto_if 1, EventScript_674DD2
compare_var_to_value 0x40DD, 5
vgoto_if 1, EventScript_674DD8
setmonobedient VAR_EVENT_PICHU_SLOT
setmonmetlocation VAR_EVENT_PICHU_SLOT, 255
compare_var_to_value VAR_EVENT_PICHU_SLOT, 1
vgoto_if 1, SurfPichu_Slot1
compare_var_to_value VAR_EVENT_PICHU_SLOT, 2
vgoto_if 1, SurfPichu_Slot2
compare_var_to_value VAR_EVENT_PICHU_SLOT, 3
vgoto_if 1, SurfPichu_Slot3
compare_var_to_value VAR_EVENT_PICHU_SLOT, 4
vgoto_if 1, SurfPichu_Slot4
compare_var_to_value VAR_EVENT_PICHU_SLOT, 5
vgoto_if 1, SurfPichu_Slot5
return
EventScript_674DC0:: @ 8674DC0
setmonmove 1, 2, 57
SurfPichu_Slot1: @ 8674DC0
setmonmove 1, 2, MOVE_SURF
return
EventScript_674DC6:: @ 8674DC6
setmonmove 2, 2, 57
SurfPichu_Slot2:: @ 8674DC6
setmonmove 2, 2, MOVE_SURF
return
EventScript_674DCC:: @ 8674DCC
setmonmove 3, 2, 57
SurfPichu_Slot3: @ 8674DCC
setmonmove 3, 2, MOVE_SURF
return
EventScript_674DD2:: @ 8674DD2
setmonmove 4, 2, 57
SurfPichu_Slot4: @ 8674DD2
setmonmove 4, 2, MOVE_SURF
return
EventScript_674DD8:: @ 8674DD8
setmonmove 5, 2, 57
SurfPichu_Slot5: @ 8674DD8
setmonmove 5, 2, MOVE_SURF
return
gText_MysteryGiftEgg::
sText_MysteryGiftEgg:
.string "Thank you for using the MYSTERY\nGIFT System.\pFrom the POKéMON CENTER we\nhave a gift--a POKéMON EGG!\pPlease raise it with love and\nkindness.$"
gText_MysteryGiftEgg_2::
sText_FullParty:
.string "Oh, your party appears to be full.\pPlease come see me after storing\na POKéMON on a PC.$"
gUnknown_08674EC1:: @ 8674EC1
setvaddress gUnknown_08674EC1
special sub_81652B4
compare_var_to_value 0x800D, 0
vgoto_if 1, EventScript_674EDF
MysteryEventScript_VisitingTrainer:: @ 8674EC1
setvaddress MysteryEventScript_VisitingTrainer
special ValidateEReaderTrainer
compare_var_to_value VAR_RESULT, 0
vgoto_if 1, MysteryEventScript_VisitingTrainerArrived
lock
faceplayer
vmessage gText_MysteryGiftVisitingTrainer
vmessage sText_MysteryGiftVisitingTrainer
waitmessage
waitbuttonpress
release
end
EventScript_674EDF:: @ 8674EDF
MysteryEventScript_VisitingTrainerArrived: @ 8674EDF
lock
faceplayer
vmessage gText_MysteryGiftVisitingTrainer_2
vmessage sText_MysteryGiftVisitingTrainer_2
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftVisitingTrainer::
sText_MysteryGiftVisitingTrainer:
.string "Thank you for using the MYSTERY\nGIFT System.\pBy holding this WONDER CARD, you\nmay take part in a survey at a\lPOKéMON MART.\pUse these surveys to invite\nTRAINERS to SOOTOPOLIS CITY.\pLet me give you a secret\npassword for a survey:\pGIVE ME\nAWESOME TRAINER\pWrite that in on a survey and send\nit to the WIRELESS\lCOMMUNICATION SYSTEM.$"
gText_MysteryGiftVisitingTrainer_2::
sText_MysteryGiftVisitingTrainer_2:
.string "Thank you for using the MYSTERY\nGIFT System.\pA TRAINER has arrived in\nSOOTOPOLIS CITY looking for you.\pWe hope you will enjoy\nbattling the visiting TRAINER.\pYou may invite other TRAINERS by\nentering other passwords.\pTry looking for other passwords\nthat may work.$"
gUnknown_0867513C:: @ 867513C
setvaddress gUnknown_0867513C
checkflag 0x1E4
vgoto_if 1, EventScript_675179
setorcopyvar 0x800D, 2
specialvar 0x8008, sub_813986C
compare_var_to_value 0x8008, 3
vgoto_if 0, EventScript_675179
MysteryEventScript_BattleCard:: @ 867513C
setvaddress MysteryEventScript_BattleCard
checkflag FLAG_MYSTERY_EVENT_DONE
vgoto_if 1, MysteryEventScript_BattleCardInfo
setorcopyvar VAR_RESULT, 2
specialvar VAR_0x8008, sub_813986C
compare_var_to_value VAR_0x8008, 3
vgoto_if 0, MysteryEventScript_BattleCardInfo
lock
faceplayer
vmessage gText_MysteryGiftBattleCountCard_2
vmessage sText_MysteryGiftBattleCountCard_2
waitmessage
waitbuttonpress
giveitem_std 13
giveitem_std ITEM_POTION
release
setflag 0x1E4
setflag FLAG_MYSTERY_EVENT_DONE
end
EventScript_675179:: @ 8675179
MysteryEventScript_BattleCardInfo: @ 8675179
lock
faceplayer
vmessage gText_MysteryGiftBattleCountCard
vmessage sText_MysteryGiftBattleCountCard
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftBattleCountCard::
sText_MysteryGiftBattleCountCard:
.string "Thank you for using the MYSTERY\nGIFT System.\pYour BATTLE COUNT CARD keeps\ntrack of your battle record against\lTRAINERS with the same CARD.\pLook for and battle TRAINERS who\nhave the same CARD as you.\pYou may check the overall rankings\nby reading the NEWS.\pPlease do give it a try!$"
gText_MysteryGiftBattleCountCard_2::
sText_MysteryGiftBattleCountCard_2:
.string "Thank you for using the MYSTERY\nGIFT System.\pCongratulations!\pYou have won a prize for winning\nthree battles!\pWe hope you will be inspired to\nbattle some more.$"
gUnknown_0867533C:: @ 867533C
setvaddress gUnknown_0867533C
MysteryEventScript_AuroraTicket:: @ 867533C
setvaddress MysteryEventScript_AuroraTicket
lock
faceplayer
checkflag 0x13A
vgoto_if 1, EventScript_6753A0
checkflag 0x1AD
vgoto_if 1, EventScript_6753A0
checkitem 371, 1
compare_var_to_value 0x800D, 1
vgoto_if 1, EventScript_6753A0
vmessage gText_MysteryGiftTicket1
checkflag FLAG_0x13A
vgoto_if 1, AuroraTicket_Obtained
checkflag FLAG_0x1AD
vgoto_if 1, AuroraTicket_Obtained
checkitem ITEM_AURORA_TICKET, 1
compare_var_to_value VAR_RESULT, 1
vgoto_if 1, AuroraTicket_Obtained
vmessage sText_AuroraTicket1
waitmessage
waitbuttonpress
checkitemspace 371, 1
compare_var_to_value 0x800D, 0
vgoto_if 1, EventScript_675397
giveitem_std 371
setflag 0x8D5
setflag 0x13A
vmessage gText_MysteryGiftTicket1_1
checkitemspace ITEM_AURORA_TICKET, 1
compare_var_to_value VAR_RESULT, 0
vgoto_if 1, AuroraTicket_NoBagSpace
giveitem_std ITEM_AURORA_TICKET
setflag FLAG_0x8D5
setflag FLAG_0x13A
vmessage sText_AuroraTicket2
waitmessage
waitbuttonpress
release
end
EventScript_675397:: @ 8675397
vmessage gText_MysteryGiftTicket1_3
AuroraTicket_NoBagSpace: @ 8675397
vmessage sText_AuroraTicketNoPlace
waitmessage
waitbuttonpress
release
end
EventScript_6753A0:: @ 86753A0
vmessage gText_MysteryGiftTicket1_2
AuroraTicket_Obtained: @ 86753A0
vmessage sText_AuroraTicketGot
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftTicket1::
sText_AuroraTicket1:
.string "Thank you for using the MYSTERY\nGIFT System.\pYou must be {PLAYER}.\nThere is a ticket here for you.$"
gText_MysteryGiftTicket1_1::
sText_AuroraTicket2:
.string "It appears to be for use at the\nLILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$"
gText_MysteryGiftTicket1_2::
sText_AuroraTicketGot:
.string "Thank you for using the MYSTERY\nGIFT System.$"
gText_MysteryGiftTicket1_3::
sText_AuroraTicketNoPlace:
.string "Oh, Im sorry, {PLAYER}.\nYour BAGs KEY ITEMS POCKET is full.\pPlease store something on your PC,\nthen come back for this.$"
gUnknown_0867550B:: @ 867550B
setvaddress gUnknown_0867550B
MysteryEventScript_MysticTicket:: @ 867550B
setvaddress MysteryEventScript_MysticTicket
lock
faceplayer
checkflag 0x13B
vgoto_if 1, EventScript_675578
checkflag 0x91
vgoto_if 1, EventScript_675578
checkflag 0x92
vgoto_if 1, EventScript_675578
checkitem 370, 1
compare_var_to_value 0x800D, 1
vgoto_if 1, EventScript_675578
vmessage gText_MysteryGiftTicket2
checkflag FLAG_0x13B
vgoto_if 1, MysticTicket_Obtained
checkflag FLAG_0x091
vgoto_if 1, MysticTicket_Obtained
checkflag FLAG_0x092
vgoto_if 1, MysticTicket_Obtained
checkitem ITEM_MYSTIC_TICKET, 1
compare_var_to_value VAR_RESULT, 1
vgoto_if 1, MysticTicket_Obtained
vmessage sText_MysticTicket2
waitmessage
waitbuttonpress
checkitemspace 370, 1
compare_var_to_value 0x800D, 0
vgoto_if 1, EventScript_67556F
giveitem_std 370
setflag 0x8E0
setflag 0x13B
vmessage gText_MysteryGiftTicket2_1
checkitemspace ITEM_MYSTIC_TICKET, 1
compare_var_to_value VAR_RESULT, 0
vgoto_if 1, MysticTicket_NoBagSpace
giveitem_std ITEM_MYSTIC_TICKET
setflag FLAG_0x8E0
setflag FLAG_0x13B
vmessage sText_MysticTicket1
waitmessage
waitbuttonpress
release
end
EventScript_67556F:: @ 867556F
vmessage gText_MysteryGiftTicket2_3
MysticTicket_NoBagSpace: @ 867556F
vmessage sText_MysticTicketNoPlace
waitmessage
waitbuttonpress
release
end
EventScript_675578:: @ 8675578
vmessage gText_MysteryGiftTicket2_2
MysticTicket_Obtained: @ 8675578
vmessage sText_MysticTicketGot
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftTicket2::
sText_MysticTicket2:
.string "Thank you for using the MYSTERY\nGIFT System.\pYou must be {PLAYER}.\nThere is a ticket here for you.$"
gText_MysteryGiftTicket2_1::
sText_MysticTicket1:
.string "It appears to be for use at the\nLILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$"
gText_MysteryGiftTicket2_2::
sText_MysticTicketGot:
.string "Thank you for using the MYSTERY\nGIFT System.$"
gText_MysteryGiftTicket2_3::
sText_MysticTicketNoPlace:
.string "Oh, Im sorry, {PLAYER}.\nYour BAGs KEY ITEMS POCKET is full.\pPlease store something on your PC,\nthen come back for this.$"
gUnknown_086756E3:: @ 86756E3
setvaddress gUnknown_086756E3
addvar 0x403E, 1
compare_var_to_value 0x403E, 10
vgoto_if 0, EventScript_6756FD
setvar 0x403E, 0
EventScript_6756FD:: @ 86756FD
MysteryEventScript_AlteringCave:: @ 86756E3
setvaddress MysteryEventScript_AlteringCave
addvar VAR_ALTERING_CAVE_WILD_SET, 1
compare_var_to_value VAR_ALTERING_CAVE_WILD_SET, 10
vgoto_if 0, MysteryEventScript_AlteringCave_
setvar VAR_ALTERING_CAVE_WILD_SET, 0
MysteryEventScript_AlteringCave_: @ 86756FD
lock
faceplayer
vmessage gText_MysteryGiftAlteringCave
vmessage sText_MysteryGiftAlteringCave
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftAlteringCave::
sText_MysteryGiftAlteringCave::
.string "Thank you for using the MYSTERY\nGIFT System.\pThere appears to be a rumor about\nrare POKéMON sightings.\pThe sightings reportedly came from\nthe ALTERING CAVE on ROUTE 103.\pPerhaps it would be worthwhile for\nyou to investigate this rumor.$"
gUnknown_086757F4:: @ 86757F4
setvaddress gUnknown_086757F4
MysteryEventScript_OldSeaMap:: @ 86757F4
setvaddress MysteryEventScript_OldSeaMap
lock
faceplayer
checkflag 0x13C
vgoto_if 1, EventScript_675858
checkflag 0x1CA
vgoto_if 1, EventScript_675858
checkitem 376, 1
compare_var_to_value 0x800D, 1
vgoto_if 1, EventScript_675858
vmessage gText_MysteryGiftOldSeaMap
checkflag FLAG_0x13C
vgoto_if 1, OldSeaMap_Obtained
checkflag FLAG_0x1CA
vgoto_if 1, OldSeaMap_Obtained
checkitem ITEM_OLD_SEA_MAP, 1
compare_var_to_value VAR_RESULT, 1
vgoto_if 1, OldSeaMap_Obtained
vmessage sText_MysteryGiftOldSeaMap
waitmessage
waitbuttonpress
checkitemspace 376, 1
compare_var_to_value 0x800D, 0
vgoto_if 1, EventScript_67584F
giveitem_std 376
setflag 0x8D6
setflag 0x13C
vmessage gText_MysteryGiftOldSeaMap_1
checkitemspace ITEM_OLD_SEA_MAP, 1
compare_var_to_value VAR_RESULT, 0
vgoto_if 1, OldSeaMap_NoBagSpace
giveitem_std ITEM_OLD_SEA_MAP
setflag FLAG_0x8D6
setflag FLAG_0x13C
vmessage sText_MysteryGiftOldSeaMap_1
waitmessage
waitbuttonpress
release
end
EventScript_67584F:: @ 867584F
vmessage gText_MysteryGiftOldSeaMap_3
OldSeaMap_NoBagSpace: @ 867584F
vmessage sText_MysteryGiftOldSeaMap_3
waitmessage
waitbuttonpress
release
end
EventScript_675858:: @ 8675858
vmessage gText_MysteryGiftOldSeaMap_2
OldSeaMap_Obtained: @ 8675858
vmessage sText_MysteryGiftOldSeaMap_2
waitmessage
waitbuttonpress
release
end
gText_MysteryGiftOldSeaMap::
sText_MysteryGiftOldSeaMap:
.string "Thank you for using the MYSTERY\nGIFT System.\pLet me confirm--you are {PLAYER}?\pWe received this OLD SEA MAP\naddressed to you.$"
gText_MysteryGiftOldSeaMap_1::
sText_MysteryGiftOldSeaMap_1:
.string "It appears to be for use at the\nLILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$"
gText_MysteryGiftOldSeaMap_2::
sText_MysteryGiftOldSeaMap_2:
.string "Thank you for using the MYSTERY\nGIFT System.$"
gText_MysteryGiftOldSeaMap_3::
sText_MysteryGiftOldSeaMap_3:
.string "Oh, Im sorry, {PLAYER}.\nYour BAGs KEY ITEMS POCKET is full.\pPlease store something on your PC,\nthen come back for this.$"
.align 2

View File

@ -0,0 +1,22 @@
.section script_data, "aw", %progbits
.align 2
gMysteryEventScriptCmdTable:: @ 82DED2C
.4byte MEScrCmd_nop
.4byte MEScrCmd_checkcompat
.4byte MEScrCmd_end
.4byte MEScrCmd_setmsg
.4byte MEScrCmd_setstatus
.4byte MEScrCmd_runscript
.4byte MEScrCmd_initramscript
.4byte MEScrCmd_setenigmaberry
.4byte MEScrCmd_giveribbon
.4byte MEScrCmd_givenationaldex
.4byte MEScrCmd_addrareword
.4byte MEScrCmd_setrecordmixinggift
.4byte MEScrCmd_givepokemon
.4byte MEScrCmd_addtrainer
.4byte MEScrCmd_enableresetrtc
.4byte MEScrCmd_checksum
.4byte MEScrCmd_crc
gMysteryEventScriptCmdTableEnd::

View File

@ -1,21 +0,0 @@
.section script_data, "aw", %progbits
.align 2
gUnknown_082DED2C:: @ 82DED2C
.4byte sub_8153A80
.4byte sub_8153A30
.4byte script_status_stop_and_ret_1
.4byte sub_8153A94
.4byte sub_8153A84
.4byte sub_8153ACC
.4byte sub_8153BE4
.4byte sub_8153AE8
.4byte sub_8153BB0
.4byte sub_8153C4C
.4byte sub_8153C70
.4byte sub_8153C9C
.4byte sub_8153CC8
.4byte sub_8153DD4
.4byte sub_8153E1C
.4byte sub_8153E40
.4byte sub_8153E88

View File

@ -393,7 +393,7 @@ PetalburgCity_Gym_EventScript_204DCE:: @ 8204DCE
checkpcitem ITEM_ENIGMA_BERRY, 1
compare VAR_RESULT, 1
goto_eq PetalburgCity_Gym_EventScript_204E17
compare VAR_0x402D, 0
compare VAR_ENIGMA_BERRY_AVAILABLE, 0
goto_eq PetalburgCity_Gym_EventScript_204E17
msgbox PetalburgCity_Gym_Text_2A6D3D, 4
setvar VAR_RESULT, 1
@ -407,7 +407,7 @@ PetalburgCity_Gym_EventScript_204E1D:: @ 8204E1D
giveitem_std ITEM_ENIGMA_BERRY
compare VAR_RESULT, 0
goto_eq PetalburgCity_Gym_EventScript_272054
setvar VAR_0x402D, 0
setvar VAR_ENIGMA_BERRY_AVAILABLE, 0
release
end

View File

@ -257,7 +257,7 @@ gSpecials:: @ 81DBA64
def_special sub_81B9B80
def_special sub_81B9D08
def_special sub_80F9490
def_special sub_81652B4
def_special ValidateEReaderTrainer
def_special sub_8139228
def_special sub_80F94E8
def_special sub_816AE58
@ -273,7 +273,7 @@ gSpecials:: @ 81DBA64
def_special ShowBerryBlenderRecordWindow
def_special ResetTrickHouseEndRoomFlag
def_special SetTrickHouseEndRoomFlag
def_special sp109_CreatePCMenu
def_special ScrSpecial_CreatePCMenu
def_special AccessHallOfFamePC
def_special Special_ShowDiploma
def_special CheckLeadMonCool

0
graphics/battle_anims/backgrounds/00.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/00.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1021 B

After

Width:  |  Height:  |  Size: 1021 B

0
graphics/battle_anims/backgrounds/02.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/02.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
graphics/battle_anims/backgrounds/03.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/03.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

0
graphics/battle_anims/backgrounds/04.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/04.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

0
graphics/battle_anims/backgrounds/05.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/06.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/07.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/07.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 373 B

0
graphics/battle_anims/backgrounds/08.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/09.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/09.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 964 B

0
graphics/battle_anims/backgrounds/10.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/11.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/11.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
graphics/battle_anims/backgrounds/12.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/12.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
graphics/battle_anims/backgrounds/13.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/14.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/15.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/15.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
graphics/battle_anims/backgrounds/16.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/16.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 634 B

0
graphics/battle_anims/backgrounds/17.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/17.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

0
graphics/battle_anims/backgrounds/18.pal Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/20.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/20.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

0
graphics/battle_anims/backgrounds/21.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/21.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 672 B

After

Width:  |  Height:  |  Size: 672 B

0
graphics/battle_anims/backgrounds/22.pal Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/24.pal Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/attract.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/attract.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
graphics/battle_anims/backgrounds/fog.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/sandstorm_brew.bin Executable file → Normal file
View File

0
graphics/battle_anims/backgrounds/sandstorm_brew.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 997 B

0
graphics/battle_anims/backgrounds/scary_face.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 428 B

After

Width:  |  Height:  |  Size: 428 B

View File

View File

View File

0
graphics/battle_anims/backgrounds/water.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
graphics/battle_anims/backgrounds/water_muddy.pal Executable file → Normal file
View File

0
graphics/battle_anims/masks/cure_bubbles.bin Executable file → Normal file
View File

0
graphics/battle_anims/masks/cure_bubbles.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

0
graphics/battle_anims/masks/curse.bin Executable file → Normal file
View File

0
graphics/battle_anims/masks/curse.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

0
graphics/battle_anims/masks/metal_shine.bin Executable file → Normal file
View File

0
graphics/battle_anims/masks/metal_shine.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 183 B

0
graphics/battle_anims/masks/morning_sun.bin Executable file → Normal file
View File

0
graphics/battle_anims/masks/morning_sun.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

Some files were not shown because too many files have changed in this diff Show More