field_specials through Task_AnimateElevatorWindowView

This commit is contained in:
PikalaxALT
2019-10-23 15:31:23 -04:00
parent 6e36c22920
commit 661e5d9221
59 changed files with 1522 additions and 2572 deletions
+1 -1
View File
@@ -1802,7 +1802,7 @@ _080D8120:
cmp r1, 0
beq _080D8134
mov r0, sp
bl sub_80E7460
bl CopyEReaderTrainerName5
mov r4, sp
b _080D8382
_080D8134:
+3 -3
View File
@@ -3469,8 +3469,8 @@ _080E7458: .4byte gSaveBlock2Ptr
_080E745C: .4byte 0x000004a1
thumb_func_end GetEreaderTrainerClassId
thumb_func_start sub_80E7460
sub_80E7460: @ 80E7460
thumb_func_start CopyEReaderTrainerName5
CopyEReaderTrainerName5: @ 80E7460
push {r4,lr}
adds r3, r0, 0
movs r2, 0
@@ -3495,7 +3495,7 @@ _080E746E:
.align 2, 0
_080E7488: .4byte gSaveBlock2Ptr
_080E748C: .4byte 0x000004a4
thumb_func_end sub_80E7460
thumb_func_end CopyEReaderTrainerName5
thumb_func_start ValidateEReaderTrainer
ValidateEReaderTrainer: @ 80E7490
+1 -1
View File
@@ -367,7 +367,7 @@ sub_806CAC8: @ 806CAC8
bl MENewsJisanStepCounter
bl IncrementRenewableHiddenItemStepCounter
bl sub_80CC918
bl sub_80CB054
bl IncrementResortGorgeousStepCounter
bl sub_80CCFBC
mov r0, sp
adds r1, r4, 0
+9 -2341
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1653,7 +1653,7 @@ _080E53F4:
movs r2, 0x2
movs r3, 0x2
bl sub_80E559C
ldr r1, _080E5440 @ =gUnknown_84886E8
ldr r1, _080E5440 @ =gMoveDescriptionPointers
subs r0, r5, 0x1
lsls r0, 2
adds r0, r1
@@ -1670,7 +1670,7 @@ _080E53F4:
bx r0
.align 2, 0
_080E543C: .4byte gBattleMoves
_080E5440: .4byte gUnknown_84886E8
_080E5440: .4byte gMoveDescriptionPointers
thumb_func_end sub_80E5340
thumb_func_start sub_80E5444
+2 -2
View File
@@ -6470,7 +6470,7 @@ _08137B1C:
str r1, [sp, 0x4]
str r6, [sp, 0x8]
str r5, [sp, 0xC]
ldr r3, _08137BC8 @ =gUnknown_84886E8
ldr r3, _08137BC8 @ =gMoveDescriptionPointers
mov r4, r8
ldrb r1, [r4]
lsls r1, 1
@@ -6502,7 +6502,7 @@ _08137BB8: .4byte 0x00003004
_08137BBC: .4byte gUnknown_8463FA4
_08137BC0: .4byte 0x0000316c
_08137BC4: .4byte 0x00003188
_08137BC8: .4byte gUnknown_84886E8
_08137BC8: .4byte gMoveDescriptionPointers
_08137BCC: .4byte 0x00003258
thumb_func_end sub_8137AF8
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -807,7 +807,7 @@ gUnknown_83E0248:: @ 83E0248
.4byte gUnknown_841807D, NULL
.4byte gUnknown_841808E, NULL
.4byte gUnknown_841809C, NULL
.4byte gUnknown_8417929, NULL
.4byte gOtherText_Quit, NULL
gUnknown_83E0268:: @ 83E0268
.4byte gUnknown_8417DFE, NULL
+4 -83
View File
@@ -1,3 +1,7 @@
#include "constants/species.h"
#include "constants/items.h"
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
@@ -22,89 +26,6 @@ gUnknown_83F5864:: @ 83F5864
gUnknown_83F5A44:: @ 83F5A44
.incbin "baserom.gba", 0x3F5A44, 0xB4
gUnknown_83F5AF8:: @ 83F5AF8
.incbin "baserom.gba", 0x3F5AF8, 0x22
gUnknown_83F5B1A:: @ 83F5B1A
.incbin "baserom.gba", 0x3F5B1A, 0x16
gUnknown_83F5B30:: @ 83F5B30
.incbin "baserom.gba", 0x3F5B30, 0xC
gUnknown_83F5B3C:: @ 83F5B3C
.incbin "baserom.gba", 0x3F5B3C, 0x8
gUnknown_83F5B44:: @ 83F5B44
.incbin "baserom.gba", 0x3F5B44, 0x50
gUnknown_83F5B94:: @ 83F5B94
.incbin "baserom.gba", 0x3F5B94, 0x12
gUnknown_83F5BA6:: @ 83F5BA6
.incbin "baserom.gba", 0x3F5BA6, 0x12
gUnknown_83F5BB8:: @ 83F5BB8
.incbin "baserom.gba", 0x3F5BB8, 0x9
gUnknown_83F5BC1:: @ 83F5BC1
.incbin "baserom.gba", 0x3F5BC1, 0xB
gUnknown_83F5BCC:: @ 83F5BCC
.incbin "baserom.gba", 0x3F5BCC, 0x150
gUnknown_83F5D1C:: @ 83F5D1C
.incbin "baserom.gba", 0x3F5D1C, 0x10
sStarterMon:: @ 83F5D2C
.incbin "baserom.gba", 0x3F5D2C, 0x6
gUnknown_83F5D32:: @ 83F5D32
.incbin "baserom.gba", 0x3F5D32, 0x26
gUnknown_83F5D58:: @ 83F5D58
.incbin "baserom.gba", 0x3F5D58, 0x198
.align 2
gUnknown_83F5EF0:: @ 83F5EF0
.asciz "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/scr_tool.c"
.align 2
gUnknown_83F5F24:: @ 83F5F24
.asciz "0"
gUnknown_83F5F26:: @ 83F5F26
.incbin "baserom.gba", 0x3F5F26, 0x2A
gUnknown_83F5F50:: @ 83F5F50
.incbin "baserom.gba", 0x3F5F50, 0x160
gUnknown_83F60B0:: @ 83F60B0
.incbin "baserom.gba", 0x3F60B0, 0x20
gUnknown_83F60D0:: @ 83F60D0
.incbin "baserom.gba", 0x3F60D0, 0x100
gUnknown_83F61D0:: @ 83F61D0
.incbin "baserom.gba", 0x3F61D0, 0x20
gUnknown_83F61F0:: @ 83F61F0
.incbin "baserom.gba", 0x3F61F0, 0xB
gUnknown_83F61FB:: @ 83F61FB
.incbin "baserom.gba", 0x3F61FB, 0x8
gUnknown_83F6203:: @ 83F6203
.incbin "baserom.gba", 0x3F6203, 0x3
gUnknown_83F6206:: @ 83F6206
.incbin "baserom.gba", 0x3F6206, 0x160
gUnknown_83F6366:: @ 83F6366
.incbin "baserom.gba", 0x3F6366, 0x16
gUnknown_83F637C:: @ 83F637C
.incbin "baserom.gba", 0x3F637C, 0xC
.section .rodata.83F6C90
gUnknown_83F6C90:: @ 83F6C90
.incbin "baserom.gba", 0x3F6C90, 0x20
+1 -1
View File
@@ -342,7 +342,7 @@ gUnknown_84827B4:: @ 84827B4
.include "data/text/move_descriptions.inc"
.align 2, 0
gUnknown_84886E8:: @ 84886E8
gMoveDescriptionPointers:: @ 84886E8
.4byte gMoveDescription_Pound
.4byte gMoveDescription_KarateChop
.4byte gMoveDescription_DoubleSlap
+6 -6
View File
@@ -227,7 +227,7 @@ gStdScriptsEnd::
.include "data/maps/SevenIsland_TanobyRuins_RixyChamber/scripts.inc"
.include "data/maps/SevenIsland_TanobyRuins_ViapoisChamber/scripts.inc"
.include "data/maps/ThreeIsland_DunsparceTunnel/scripts.inc"
.include "data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc"
.include "data/maps/SevenIsland_SevaultCanyon_TanobyKey/scripts.inc"
.include "data/maps/NavelRock_1F/scripts.inc"
.include "data/maps/NavelRock_Summit/scripts.inc"
.include "data/maps/NavelRock_Base/scripts.inc"
@@ -583,7 +583,7 @@ gStdScriptsEnd::
.include "data/maps/FiveIsland_LostCave_Room4/text.inc"
.include "data/maps/FiveIsland_LostCave_Room10/text.inc"
.include "data/maps/ThreeIsland_DunsparceTunnel/text.inc"
.include "data/maps/SevenIsland_SeavaultCanyon_TanobyKey/text.inc"
.include "data/maps/SevenIsland_SevaultCanyon_TanobyKey/text.inc"
.include "data/maps/OneIsland_KindleRoad_EmberSpa/text.inc"
.include "data/maps/PalletTown/text.inc"
.include "data/maps/ViridianCity/text.inc"
@@ -1922,7 +1922,7 @@ gUnknown_81A6955:: @ 81A6955
setvar VAR_0x8004, 27
special Special_SetSomeVariable
setvar VAR_0x8004, 0
special sub_80CA86C
special Special_AnimatePcTurnOn
playse SE_PC_ON
msgbox Text_1A5075
goto EventScript_1A6998
@@ -1984,7 +1984,7 @@ EventScript_1A6A3D:: @ 81A6A3D
EventScript_1A6A46:: @ 81A6A46
setvar VAR_0x8004, 0
playse SE_PC_OFF
special sub_80CA9A8
special Special_AnimatePcTurnOff
special sub_812B35C
releaseall
end
@@ -2169,7 +2169,7 @@ gUnknown_81A6C32:: @ 81A6C32
compare_var_to_value VAR_RESULT, 2
goto_if eq, EventScript_1A7AE0
fadescreen 1
special sub_80CA7EC
special Special_TownMap
waitstate
releaseall
end
@@ -2410,7 +2410,7 @@ EventScript_1A74B7:: @ 81A74B7
setvar VAR_0x8005, 1
setvar VAR_0x8006, 8
setvar VAR_0x8007, 5
special sub_80CAC28
special Special_ShakeScreen
waitstate
releaseall
end
+382
View File
@@ -0,0 +1,382 @@
#include "constants/species.h"
#include "constants/items.h"
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnknown_83F5AF8:: @ 83F5AF8
.4byte gStringVar1
.4byte gStringVar2
.4byte gStringVar3
gUnknown_83F5B04::
.incbin "baserom.gba", 0x3F5B04, 0x16
sSlotMachineIndices:: @ 83F5B1A
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 0
.byte 1
.byte 1
.byte 2
.byte 2
.byte 2
.byte 3
.byte 3
.byte 3
.byte 4
.byte 4
.byte 5
.align 1
sResortGorgeousDeluxeRewards:: @ 83F5B30
.2byte ITEM_BIG_PEARL
.2byte ITEM_PEARL
.2byte ITEM_STARDUST
.2byte ITEM_STAR_PIECE
.2byte ITEM_NUGGET
.2byte ITEM_RARE_CANDY
.align 2
sElevatorCurrentFloorWindowTemplate:: @ 83F5B3C
.byte 0, 22, 1, 7, 4, 15
.2byte 0x0008
sFloorNamePointers:: @ 83F5B44
.4byte gUnknown_8418069
.4byte gUnknown_8418065
.4byte gUnknown_8418061
.4byte gUnknown_841805D
.4byte gUnknown_841803A
.4byte gUnknown_841803D
.4byte gUnknown_8418040
.4byte gUnknown_8418043
.4byte gUnknown_8418046
.4byte gUnknown_8418049
.4byte gUnknown_841804C
.4byte gUnknown_841804F
.4byte gUnknown_8418052
.4byte gUnknown_8418055
.4byte gUnknown_8418059
.4byte gUnknown_841806D
gUnknown_83F5B84::
.byte 26
.byte 26
.byte 26
.byte 26
.byte 30
.byte 30
.byte 30
.byte 30
.byte 30
.byte 30
.byte 30
.byte 30
.byte 30
.byte 26
.byte 26
.byte 18
.align 1
sElevatorWindowMetatilesGoingUp:: @ 83F5B94
.2byte 0x02e8, 0x02e9, 0x02ea
.2byte 0x02f0, 0x02f1, 0x02f2
.2byte 0x02f8, 0x02f9, 0x02fa
.align 1
sElevatorWindowMetatilesGoingDown:: @ 83F5BA6
.2byte 0x02e8, 0x02ea, 0x02e9
.2byte 0x02f0, 0x02f2, 0x02f1
.2byte 0x02f8, 0x02fa, 0x02f9
sElevatorAnimationDuration:: @ 83F5BB8
.byte 8
.byte 16
.byte 24
.byte 32
.byte 38
.byte 46
.byte 53
.byte 56
.byte 57
sElevatorWindowAnimDuration:: @ 83F5BC1
.byte 3
.byte 6
.byte 9
.byte 12
.byte 15
.byte 18
.byte 21
.byte 24
.byte 27
.align 2
gUnknown_83F5BCC:: @ 83F5BCC
.4byte gUnknown_8417FD9
.4byte gUnknown_8417FE6
.4byte gUnknown_8417FF3
.4byte gUnknown_8418000
.4byte gUnknown_841800D
.4byte gUnknown_8418017
.4byte gUnknown_8418022
.4byte gUnknown_841802F
.4byte gOtherText_Exit
.4byte NULL
.4byte NULL
.4byte NULL
.4byte gUnknown_8418059
.4byte gUnknown_8418055
.4byte gUnknown_8418052
.4byte gUnknown_841804F
.4byte gUnknown_841804C
.4byte gUnknown_8418049
.4byte gUnknown_8418046
.4byte gUnknown_8418043
.4byte gUnknown_8418040
.4byte gUnknown_841803D
.4byte gUnknown_841803A
.4byte gOtherText_Exit
.4byte gUnknown_841805D
.4byte gUnknown_8418061
.4byte gUnknown_8418069
.4byte gOtherText_Exit
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte gUnknown_8418046
.4byte gUnknown_8418043
.4byte gUnknown_8418040
.4byte gUnknown_841803D
.4byte gUnknown_841803A
.4byte gOtherText_Exit
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte gUnknown_841807D
.4byte gUnknown_841808E
.4byte gUnknown_841809C
.4byte gOtherText_Quit
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte gUnknown_84180A7
.4byte gUnknown_84180BC
.4byte gUnknown_84180D0
.4byte gUnknown_84180E4
.4byte gUnknown_84180FA
.4byte gUnknown_841810D
.4byte gUnknown_841811D
.4byte gUnknown_841812F
.4byte gUnknown_8418142
.4byte gUnknown_8418152
.4byte gUnknown_8418163
.4byte gOtherText_Exit
.4byte gUnknown_841806D
.4byte gUnknown_841805D
.4byte gOtherText_Exit
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
.4byte NULL
gUnknown_83F5D1C:: @ 83F5D1C
.byte 2 @ firstArrowType
.byte 0 @ firstX
.byte 0 @ firstY
.byte 3 @ secondArrowType
.byte 0 @ secondX
.byte 0 @ secondY
.2byte 0 @ fullyUpThreshold
.2byte 0 @ fullyDownThreshold
.2byte 2000 @ tileTag
.2byte 100 @ palTag
.byte 0 @ palNum
.align 2
.align 1
sStarterMon:: @ 83F5D2C
.2byte SPECIES_BULBASAUR
.2byte SPECIES_SQUIRTLE
.2byte SPECIES_CHARMANDER
gUnknown_83F5D32:: @ 83F5D32
.byte 0x05, 0x03, 0x01
.byte 0x06, 0x03, 0x03
.byte 0x07, 0x07, 0x01
.byte 0x08, 0x05, 0x01
.byte 0x09, 0x05, 0x01
.byte 0x0b, 0x01, 0x01
.byte 0x0c, 0x07, 0x01
.byte 0x0e, 0x05, 0x01
.byte 0x22, 0x03, 0x01
.byte 0x23, 0x07, 0x01
.byte 0x1f, 0x02, 0x01
.byte 0x25, 0x04, 0x01
.align 2
gUnknown_83F5D58:: @ 83F5D58
.2byte 0x0004, 0x0000, 0x0003, 0x0000
.2byte 0x0004, 0x0003, 0x0003, 0x0000
.2byte 0x0005, 0x0001, 0x0003, 0x0001
.2byte 0x001c, 0x0000, 0x0003, 0x0029
.2byte 0x001c, 0x0000, 0x0003, 0x002a
.2byte 0x0001, 0x0000, 0x000f, 0x0000
.2byte 0x0001, 0x0000, 0x000f, 0x0003
.2byte 0x0006, 0x0000, 0x0003, 0x0002
.2byte 0x0006, 0x0002, 0x0003, 0x0002
.2byte 0x0001, 0x0001, 0x0003, 0x0016
.2byte 0x0001, 0x0002, 0x0003, 0x0016
.2byte 0x0007, 0x0005, 0x0003, 0x0003
.2byte 0x0007, 0x0006, 0x0003, 0x0003
.2byte 0x001e, 0x0000, 0x0003, 0x002c
.2byte 0x0011, 0x0000, 0x0003, 0x0017
.2byte 0x0001, 0x001e, 0x0003, 0x0017
.2byte 0x0001, 0x0020, 0x0003, 0x0018
.2byte 0x0009, 0x0003, 0x0003, 0x0005
.2byte 0x0009, 0x0006, 0x0003, 0x0005
.2byte 0x0001, 0x0005, 0x0003, 0x0005
.2byte 0x0001, 0x0024, 0x0003, 0x0014
.2byte 0x0001, 0x0026, 0x0003, 0x001d
.2byte 0x0001, 0x0051, 0x0003, 0x001c
.2byte 0x0001, 0x0051, 0x0003, 0x001c
.2byte 0x0001, 0x005f, 0x0003, 0x001c
.2byte 0x0001, 0x0058, 0x0003, 0x0004
.2byte 0x0008, 0x0002, 0x0003, 0x0004
.2byte 0x0008, 0x0004, 0x0003, 0x0004
.2byte 0x0001, 0x0023, 0x0003, 0x001a
.2byte 0x0001, 0x0021, 0x0003, 0x0019
.2byte 0x000a, 0x0000, 0x0003, 0x0006
.2byte 0x000a, 0x0007, 0x0003, 0x0006
.2byte 0x000a, 0x000e, 0x0003, 0x0006
.2byte 0x000a, 0x0010, 0x0003, 0x0006
.2byte 0x000a, 0x0011, 0x0003, 0x0006
.2byte 0x0001, 0x002a, 0x000a, 0x000e
.2byte 0x0001, 0x003f, 0x000b, 0x0000
.2byte 0x000b, 0x0003, 0x0003, 0x0007
.2byte 0x000b, 0x0007, 0x0003, 0x0007
.2byte 0x000e, 0x0002, 0x0003, 0x000a
.2byte 0x000e, 0x0003, 0x0003, 0x000a
.2byte 0x0001, 0x002f, 0x0003, 0x000a
.2byte 0x0001, 0x0053, 0x0003, 0x0026
.2byte 0x0001, 0x0053, 0x0003, 0x0026
.2byte 0x0001, 0x003b, 0x0003, 0x0008
.2byte 0x000c, 0x0000, 0x0003, 0x0008
.2byte 0x000c, 0x0001, 0x0003, 0x0008
.2byte 0x0001, 0x0027, 0x0003, 0x002a
.2byte 0x0001, 0x0028, 0x0003, 0x002a
.2byte 0x000d, 0x0000, 0x0003, 0x0009
.2byte 0x0001, 0x0048, 0x0003, 0x0003
.align 2
gUnknown_83F5EF0:: @ 83F5EF0
.asciz "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/scr_tool.c"
.align 2
gUnknown_83F5F24:: @ 83F5F24
.asciz "0"
.align 1
gUnknown_83F5F26:: @ 83F5F26
.2byte 0x0504
.2byte 0x0605
.2byte 0x0703
.2byte 0x0800
.2byte 0x0901
.2byte 0x0a0c
.2byte 0x0b05
.2byte 0x0c05
.2byte 0x0d00
.2byte 0x0e06
.2byte 0x1000
.2byte 0x1500
.2byte 0x2000
.2byte 0x2102
.2byte 0x2201
.2byte 0x2301
.2byte 0x2400
.2byte 0x1f03
.2byte 0x2500
.2byte 0x0004
.2byte 0xffff
gUnknown_83F5F50:: @ 83F5F50
.incbin "baserom.gba", 0x3F5F50, 0x20
.incbin "baserom.gba", 0x3F5F70, 0x20
.incbin "baserom.gba", 0x3F5F90, 0x20
.incbin "baserom.gba", 0x3F5FB0, 0x20
.incbin "baserom.gba", 0x3F5FD0, 0x20
.incbin "baserom.gba", 0x3F5FF0, 0x20
.incbin "baserom.gba", 0x3F6010, 0x20
.incbin "baserom.gba", 0x3F6030, 0x20
.incbin "baserom.gba", 0x3F6050, 0x20
.incbin "baserom.gba", 0x3F6070, 0x20
.incbin "baserom.gba", 0x3F6090, 0x20
gUnknown_83F60B0:: @ 83F60B0
.incbin "baserom.gba", 0x3F60B0, 0x20
gUnknown_83F60D0:: @ 83F60D0
.incbin "baserom.gba", 0x3F60D0, 0x20
.incbin "baserom.gba", 0x3F60F0, 0x20
.incbin "baserom.gba", 0x3F6110, 0x20
.incbin "baserom.gba", 0x3F6130, 0x20
.incbin "baserom.gba", 0x3F6150, 0x20
.incbin "baserom.gba", 0x3F6170, 0x20
.incbin "baserom.gba", 0x3F6190, 0x20
.incbin "baserom.gba", 0x3F61B0, 0x20
gUnknown_83F61D0:: @ 83F61D0
.incbin "baserom.gba", 0x3F61D0, 0x20
gUnknown_83F61F0:: @ 83F61F0
.incbin "baserom.gba", 0x3F61F0, 0xB
gUnknown_83F61FB:: @ 83F61FB
.incbin "baserom.gba", 0x3F61FB, 0x8
gUnknown_83F6203:: @ 83F6203
.incbin "baserom.gba", 0x3F6203, 0x3
gUnknown_83F6206:: @ 83F6206
.incbin "baserom.gba", 0x3F6206, 0x160
gUnknown_83F6366:: @ 83F6366
.incbin "baserom.gba", 0x3F6366, 0x16
gUnknown_83F637C:: @ 83F637C
.incbin "baserom.gba", 0x3F637C, 0xC
+3 -3
View File
@@ -3885,15 +3885,15 @@
},
{
"id": "LAYOUT_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY",
"name": "SevenIsland_SeavaultCanyon_TanobyKey_Layout",
"name": "SevenIsland_SevaultCanyon_TanobyKey_Layout",
"width": 15,
"height": 16,
"border_width": 2,
"border_height": 2,
"primary_tileset": "gTileset_82D4A94",
"secondary_tileset": "gTileset_82D4E0C",
"border_filepath": "data/layouts/SevenIsland_SeavaultCanyon_TanobyKey/border.bin",
"blockdata_filepath": "data/layouts/SevenIsland_SeavaultCanyon_TanobyKey/map.bin"
"border_filepath": "data/layouts/SevenIsland_SevaultCanyon_TanobyKey/border.bin",
"blockdata_filepath": "data/layouts/SevenIsland_SevaultCanyon_TanobyKey/map.bin"
},
{
"id": "LAYOUT_BIRTH_ISLAND_EXTERIOR",
@@ -34,7 +34,7 @@ EventScript_16C418:: @ 816C418
special sub_8110AB4
compare_var_to_value VAR_RESULT, 2
goto_if eq, EventScript_1A7AE0
special sub_80CA618
special Special_ShowDiploma
waitstate
release
end
@@ -7,11 +7,11 @@ CeladonCity_DepartmentStore_Elevator_EventScript_16C153:: @ 816C153
checkflag FLAG_TEMP_2
call_if FALSE, EventScript_1A7AB9
copyvar VAR_0x8005, VAR_ELEVATOR_FLOOR
special sub_80CB580
special Special_DrawElevatorCurrentFloorWindow
message Text_1A535C
waitmessage
setvar VAR_0x8004, 3
specialvar VAR_RESULT, sub_80CB328
specialvar VAR_RESULT, Special_InitElevatorFloorSelectMenuPos
switch VAR_RESULT
case 0, EventScript_16C1B7
case 1, EventScript_16C1C3
@@ -109,15 +109,15 @@ EventScript_16C2E6:: @ 816C2E6
end
EventScript_16C30E:: @ 816C30E
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
releaseall
end
EventScript_16C313:: @ 816C313
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
closemessage
waitse
special sub_80CB498
special Special_AnimateElevator
waitstate
setflag FLAG_TEMP_2
return
+1 -1
View File
@@ -273,7 +273,7 @@ EventScript_16C96C:: @ 816C96C
setfieldeffectarg 2, 14
dofieldeffect 64
waitfieldeffect 64
specialvar VAR_RESULT, sub_80CAABC
specialvar VAR_RESULT, Special_GetRandomSlotMachine
playslotmachine VAR_RESULT
releaseall
end
@@ -10,16 +10,16 @@ FiveIsland_ResortGorgeous_House_EventScript_171EBE:: @ 8171EBE
faceplayer
checkflag FLAG_TEMP_2
goto_if TRUE, EventScript_172043
compare_var_to_value VAR_STORAGE_UNKNOWN, 65535
compare_var_to_value VAR_RESORT_GOREGOUS_REQUESTED_MON, 0xFFFF
goto_if eq, EventScript_171F0B
compare_var_to_value VAR_STORAGE_UNKNOWN, 0
compare_var_to_value VAR_RESORT_GOREGOUS_REQUESTED_MON, SPECIES_NONE
goto_if ne, EventScript_171F19
msgbox gUnknown_81A42A0
goto EventScript_171EFE
end
EventScript_171EFE:: @ 8171EFE
special sub_80CB0A8
special Special_SampleResortGorgeousMonAndReward
msgbox gUnknown_81A4315
release
end
@@ -30,15 +30,15 @@ EventScript_171F0B:: @ 8171F0B
end
EventScript_171F19:: @ 8171F19
copyvar VAR_0x8004, VAR_STORAGE_UNKNOWN
specialvar VAR_RESULT, sub_80CC48C
copyvar VAR_0x8004, VAR_RESORT_GOREGOUS_REQUESTED_MON
specialvar VAR_RESULT, Special_PlayerPartyContainsSpecies
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_171F34
goto EventScript_171EFE
end
EventScript_171F34:: @ 8171F34
special sub_80CB0A8
special Special_SampleResortGorgeousMonAndReward
msgbox gUnknown_81A43F7
addobject 2
applymovement 2, Movement_172060
@@ -62,11 +62,11 @@ EventScript_171F34:: @ 8171F34
call_if eq, EventScript_17201A
moveobjectoffscreen 2
msgbox gUnknown_81A458E
giveitem VAR_0x403B
giveitem VAR_RESORT_GOREGOUS_REWARD
compare_var_to_value VAR_RESULT, 0
goto_if eq, EventScript_172025
setflag FLAG_TEMP_2
setvar VAR_STORAGE_UNKNOWN, 0
setvar VAR_RESORT_GOREGOUS_REQUESTED_MON, 0
release
end
@@ -104,7 +104,7 @@ EventScript_172025:: @ 8172025
textcolor 1
msgbox gUnknown_81A461B
setflag FLAG_TEMP_2
setvar VAR_STORAGE_UNKNOWN, 0
setvar VAR_RESORT_GOREGOUS_REQUESTED_MON, 0
release
end
@@ -13,7 +13,7 @@ FiveIsland_WaterLabyrinth_EventScript_16884E:: @ 816884E
checkflag FLAG_NO_ROOM_FOR_TOGEPI_EGG
goto_if TRUE, EventScript_16892C
msgbox gUnknown_818A80D
specialvar VAR_RESULT, sub_80CA76C
specialvar VAR_RESULT, Special_GetLeadMonFriendship
compare_var_to_value VAR_RESULT, 6
goto_if eq, EventScript_1688AC
msgbox gUnknown_818A88F
+1 -1
View File
@@ -133,7 +133,7 @@ EventScript_167E19:: @ 8167E19
special GetDaycareMonNicknames
msgbox gUnknown_81BF789
special SetDaycareCompatibilityString
special sub_80CA68C
special Special_ShowStringVar4AsFieldMessage
waitmessage
waitbuttonpress
release
@@ -157,7 +157,7 @@ EventScript_16D462:: @ 816D462
countpokemon
compare_var_to_value VAR_RESULT, 6
goto_if ne, EventScript_1A77A9
specialvar VAR_RESULT, sub_80CABD0
specialvar VAR_RESULT, Special_IsThereRoomInAnyBoxForMorePokemon
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_1A77A9
msgbox gUnknown_81BFEAC
+2 -2
View File
@@ -27,14 +27,14 @@ EventScript_16B2AA:: @ 816B2AA
end
EventScript_16B2B4:: @ 816B2B4
specialvar VAR_RESULT, sub_80CAD54
specialvar VAR_RESULT, Special_GetSpeciesOfPartySlot_x8004
compare_var_to_value VAR_RESULT, SPECIES_EGG
goto_if eq, EventScript_16B307
special TV_CopyNicknameToStringVar1AndEnsureTerminated
special TV_CheckMonOTIDEqualsPlayerID
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_16B311
specialvar VAR_RESULT, sub_80CAD7C
specialvar VAR_RESULT, Special_BufferMonOTNameAndCompareToPlayerName
special TV_CopyNicknameToStringVar1AndEnsureTerminated
compare_var_to_value VAR_RESULT, 1
goto_if eq, EventScript_16B311
+2 -2
View File
@@ -46,14 +46,14 @@ NavelRock_Base_EventScript_165134:: @ 8165134
setvar VAR_0x8005, 3
setvar VAR_0x8006, 4
setvar VAR_0x8007, 2
special sub_80CAC28
special Special_ShakeScreen
delay 30
playse SE_T_AME_E
setvar VAR_0x8004, 0
setvar VAR_0x8005, 3
setvar VAR_0x8006, 4
setvar VAR_0x8007, 2
special sub_80CAC28
special Special_ShakeScreen
delay 30
delay 50
waitse
+2 -2
View File
@@ -61,7 +61,7 @@ EventScript_168DB9:: @ 8168DB9
faceplayer
compare_var_to_value VAR_0x8004, 6
goto_if ge, EventScript_168E3C
specialvar VAR_RESULT, sub_80CAD54
specialvar VAR_RESULT, Special_GetSpeciesOfPartySlot_x8004
compare_var_to_value VAR_RESULT, SPECIES_EGG
goto_if eq, EventScript_168E32
msgbox gUnknown_818D8CC
@@ -88,7 +88,7 @@ EventScript_168E3C:: @ 8168E3C
EventScript_168E46:: @ 8168E46
msgbox gUnknown_818D9A5
specialvar VAR_RESULT, sub_80CA76C
specialvar VAR_RESULT, Special_GetLeadMonFriendship
switch VAR_RESULT
case 0, EventScript_168EA6
case 1, EventScript_168EB0
@@ -38,7 +38,7 @@ PalletTown_PlayersHouse_2F_EventScript_168CE4:: @ 8168CE4
setvar VAR_0x8004, 32
special Special_SetSomeVariable
setvar VAR_0x8004, 1
special sub_80CA86C
special Special_AnimatePcTurnOn
playse SE_PC_ON
msgbox gUnknown_81A5420
special sub_80EB6AC
@@ -50,7 +50,7 @@ PalletTown_PlayersHouse_2F_EventScript_168CE4:: @ 8168CE4
EventScript_PalletTown_PlayersHouse_2F_ShutDownPC:: @ 8168D17
setvar VAR_0x8004, 1
playse SE_PC_OFF
special sub_80CA9A8
special Special_AnimatePcTurnOff
special sub_812B35C
releaseall
end
+5 -5
View File
@@ -9,11 +9,11 @@ RocketHideout_Elevator_EventScript_1614D9:: @ 81614D9
checkflag FLAG_TEMP_2
call_if FALSE, EventScript_1A7AB9
copyvar VAR_0x8005, VAR_ELEVATOR_FLOOR
special sub_80CB580
special Special_DrawElevatorCurrentFloorWindow
message Text_1A535C
waitmessage
setvar VAR_0x8004, 2
specialvar VAR_RESULT, sub_80CB328
specialvar VAR_RESULT, Special_InitElevatorFloorSelectMenuPos
switch VAR_RESULT
case 0, EventScript_161530
case 1, EventScript_16153C
@@ -87,15 +87,15 @@ EventScript_161608:: @ 8161608
end
EventScript_161609:: @ 8161609
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
releaseall
end
EventScript_16160E:: @ 816160E
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
closemessage
waitse
special sub_80CB498
special Special_AnimateElevator
waitstate
setflag FLAG_TEMP_2
return
+1 -1
View File
@@ -36,7 +36,7 @@ EventScript_16FF7F:: @ 816FF7F
goto_if eq, EventScript_1A7AE0
special sub_8112364
setvar VAR_0x8004, SPECIES_MAGIKARP
specialvar VAR_RESULT, sub_80CC48C
specialvar VAR_RESULT, Special_PlayerPartyContainsSpecies
compare_var_to_value VAR_RESULT, 0
goto_if eq, EventScript_16FFF5
special sub_80A096C
+1 -1
View File
@@ -27,7 +27,7 @@ Route16_MapScript3_168113:: @ 8168113
.2byte 0
EventScript_16811D:: @ 816811D
special sub_80CA630
special Special_ForcePlayerOntoBike
end
Route16_EventScript_168121:: @ 8168121
+1 -1
View File
@@ -17,7 +17,7 @@ Route18_MapScript2_168211:: @ 8168211
.2byte 0
EventScript_16821B:: @ 816821B
special sub_80CA630
special Special_ForcePlayerOntoBike
end
Route18_EventScript_16821F:: @ 816821F
@@ -90,7 +90,7 @@ EventScript_17097D:: @ 817097D
EventScript_170987:: @ 8170987
special SavePlayerParty
special sub_80CAAAC
special Special_BufferEReaderTrainerName5
msgbox gUnknown_81A0598, MSGBOX_YESNO
compare_var_to_value VAR_RESULT, 0
goto_if eq, EventScript_170A11
@@ -46,14 +46,14 @@ EventScript_170AFE:: @ 8170AFE
EventScript_170B0C:: @ 8170B0C
setvar VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1
special sub_80CA68C
special Special_ShowStringVar4AsFieldMessage
waitmessage
waitbuttonpress
return
EventScript_170B17:: @ 8170B17
setvar VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 2
special sub_80CA68C
special Special_ShowStringVar4AsFieldMessage
waitmessage
waitbuttonpress
return
@@ -1,6 +1,6 @@
{
"id": "MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY",
"name": "SevenIsland_SeavaultCanyon_TanobyKey",
"name": "SevenIsland_SevaultCanyon_TanobyKey",
"layout": "LAYOUT_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY",
"music": "MUS_NANAISEKI",
"region_map_section": "MAPSEC_TANOBY_KEY",
@@ -122,7 +122,7 @@
"elevation": 3,
"var": "VAR_0x4001",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E39"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E39"
},
{
"type": "trigger",
@@ -131,7 +131,7 @@
"elevation": 3,
"var": "VAR_0x4007",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164F0B"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164F0B"
},
{
"type": "trigger",
@@ -140,7 +140,7 @@
"elevation": 3,
"var": "VAR_0x4006",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EE8"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EE8"
},
{
"type": "trigger",
@@ -149,7 +149,7 @@
"elevation": 3,
"var": "VAR_0x4005",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EC5"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EC5"
},
{
"type": "trigger",
@@ -158,7 +158,7 @@
"elevation": 3,
"var": "VAR_0x4004",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EA2"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EA2"
},
{
"type": "trigger",
@@ -167,7 +167,7 @@
"elevation": 3,
"var": "VAR_0x4003",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E7F"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E7F"
},
{
"type": "trigger",
@@ -176,7 +176,7 @@
"elevation": 3,
"var": "VAR_0x4002",
"var_value": 99,
"script": "SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E5C"
"script": "SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E5C"
}
],
"bg_events": []
@@ -1,8 +1,8 @@
SevenIsland_SeavaultCanyon_TanobyKey_MapScripts:: @ 8164DCC
map_script 3, SevenIsland_SeavaultCanyon_TanobyKey_MapScript1_164DD2
SevenIsland_SevaultCanyon_TanobyKey_MapScripts:: @ 8164DCC
map_script 3, SevenIsland_SevaultCanyon_TanobyKey_MapScript1_164DD2
.byte 0
SevenIsland_SeavaultCanyon_TanobyKey_MapScript1_164DD2:: @ 8164DD2
SevenIsland_SevaultCanyon_TanobyKey_MapScript1_164DD2:: @ 8164DD2
setworldmapflag FLAG_WORLD_MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY
checkflag FLAG_SYS_UNLOCKED_TANOBY_RUINS
call_if TRUE, EventScript_164E07
@@ -26,7 +26,7 @@ EventScript_164E07:: @ 8164E07
setobjectxyperm 7, 9, 8
return
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E39:: @ 8164E39
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E39:: @ 8164E39
lockall
compare_var_to_value VAR_0x4001, 100
goto_if eq, EventScript_164F8A
@@ -37,7 +37,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E39:: @ 8164E39
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E5C:: @ 8164E5C
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E5C:: @ 8164E5C
lockall
compare_var_to_value VAR_0x4002, 100
goto_if eq, EventScript_164F8A
@@ -48,7 +48,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E5C:: @ 8164E5C
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E7F:: @ 8164E7F
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164E7F:: @ 8164E7F
lockall
compare_var_to_value VAR_0x4003, 100
goto_if eq, EventScript_164F8A
@@ -59,7 +59,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164E7F:: @ 8164E7F
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EA2:: @ 8164EA2
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EA2:: @ 8164EA2
lockall
compare_var_to_value VAR_0x4004, 100
goto_if eq, EventScript_164F8A
@@ -70,7 +70,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EA2:: @ 8164EA2
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EC5:: @ 8164EC5
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EC5:: @ 8164EC5
lockall
compare_var_to_value VAR_0x4005, 100
goto_if eq, EventScript_164F8A
@@ -81,7 +81,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EC5:: @ 8164EC5
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EE8:: @ 8164EE8
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164EE8:: @ 8164EE8
lockall
compare_var_to_value VAR_0x4006, 100
goto_if eq, EventScript_164F8A
@@ -92,7 +92,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164EE8:: @ 8164EE8
releaseall
end
SevenIsland_SeavaultCanyon_TanobyKey_EventScript_164F0B:: @ 8164F0B
SevenIsland_SevaultCanyon_TanobyKey_EventScript_164F0B:: @ 8164F0B
lockall
compare_var_to_value VAR_0x4007, 100
goto_if eq, EventScript_164F8A
@@ -110,7 +110,7 @@ EventScript_164F2E:: @ 8164F2E
setvar VAR_0x8005, 1
setvar VAR_0x8006, 8
setvar VAR_0x8007, 3
special sub_80CAC28
special Special_ShakeScreen
delay 60
return
@@ -119,13 +119,13 @@ EventScript_164F51:: @ 8164F51
setvar VAR_0x8005, 2
setvar VAR_0x8006, 10
setvar VAR_0x8007, 3
special sub_80CAC28
special Special_ShakeScreen
delay 60
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
setvar VAR_0x8006, 12
setvar VAR_0x8007, 2
special sub_80CAC28
special Special_ShakeScreen
delay 60
playse SE_FU_ZUZUZU
waitse
@@ -9,11 +9,11 @@ SevenIsland_TrainerTower_Elevator_EventScript_164B03:: @ 8164B03
checkflag FLAG_TEMP_2
call_if FALSE, EventScript_1A7AB9
copyvar VAR_0x8005, VAR_ELEVATOR_FLOOR
special sub_80CB580
special Special_DrawElevatorCurrentFloorWindow
message Text_1A535C
waitmessage
setvar VAR_0x8004, 6
specialvar VAR_RESULT, sub_80CB328
specialvar VAR_RESULT, Special_InitElevatorFloorSelectMenuPos
switch VAR_RESULT
case 0, EventScript_164B46
case 1, EventScript_164B52
@@ -44,7 +44,7 @@ EventScript_164B90:: @ 8164B90
goto_if eq, EventScript_164BD3
call EventScript_164BD8
setvar VAR_ELEVATOR_FLOOR, 3
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
delay 25
applymovement 255, Movement_164BE5
waitmovement 0
@@ -58,15 +58,15 @@ EventScript_164BCD:: @ 8164BCD
end
EventScript_164BD3:: @ 8164BD3
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
releaseall
end
EventScript_164BD8:: @ 8164BD8
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
closemessage
waitse
special sub_80CB498
special Special_AnimateElevator
waitstate
setflag FLAG_TEMP_2
return
+5 -5
View File
@@ -7,11 +7,11 @@ SilphCo_Elevator_EventScript_161F6F:: @ 8161F6F
checkflag FLAG_TEMP_2
call_if FALSE, EventScript_1A7AB9
copyvar VAR_0x8005, VAR_ELEVATOR_FLOOR
special sub_80CB580
special Special_DrawElevatorCurrentFloorWindow
message Text_1A535C
waitmessage
setvar VAR_0x8004, 1
specialvar VAR_RESULT, sub_80CB328
specialvar VAR_RESULT, Special_InitElevatorFloorSelectMenuPos
special sub_80CB7C4
waitstate
switch VAR_RESULT
@@ -163,15 +163,15 @@ EventScript_1621E6:: @ 81621E6
end
EventScript_1621E7:: @ 81621E7
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
releaseall
end
EventScript_1621EC:: @ 81621EC
special sub_80CB63C
special Special_CloseElevatorCurrentFloorWindow
closemessage
waitse
special sub_80CB498
special Special_AnimateElevator
waitstate
setflag FLAG_TEMP_2
return
@@ -28,7 +28,7 @@ SixIsland_DottedHole_SapphireRoom_EventScript_1641B5:: @ 81641B5
setvar VAR_0x8005, 0
setvar VAR_0x8006, 12
setvar VAR_0x8007, 3
special sub_80CAC28
special Special_ShakeScreen
delay 60
compare_var_to_value VAR_FACING, 2
call_if eq, EventScript_164325
@@ -9,7 +9,7 @@ SixIsland_WaterPath_House1_EventScript_17206D:: @ 817206D
goto_if eq, EventScript_1A7AE0
special sub_8112364
setvar VAR_0x8004, SPECIES_HERACROSS
specialvar VAR_RESULT, sub_80CC48C
specialvar VAR_RESULT, Special_PlayerPartyContainsSpecies
compare_var_to_value VAR_RESULT, 0
goto_if eq, EventScript_1720E5
special sub_80A0918
@@ -32,7 +32,7 @@ ThreeIsland_BerryForest_EventScript_163C83:: @ 8163C83
giveitem ITEM_IAPAPA_BERRY
compare_var_to_value VAR_RESULT, 0
call_if eq, EventScript_163D19
special sub_80CA6DC
special Special_BufferBigGuyOrBigGirlString
msgbox gUnknown_817AF3B
closemessage
setflag FLAG_RESCUED_LOSTELLE
+1 -1
View File
@@ -4,7 +4,7 @@ ThreeIsland_House1_MapScripts:: @ 8171819
ThreeIsland_House1_EventScript_17181A:: @ 817181A
lock
faceplayer
special sub_80CA6DC
special Special_BufferBigGuyOrBigGirlString
msgbox gUnknown_81A2F3E
release
end
@@ -37,7 +37,7 @@ EventScript_171435:: @ 8171435
textcolor 0
msgbox gUnknown_81A28B2
textcolor 1
special sub_80CA6DC
special Special_BufferBigGuyOrBigGirlString
msgbox gUnknown_81A2931
closemessage
applymovement 3, Movement_1A75ED
+1 -1
View File
@@ -212,7 +212,7 @@
"SevenIsland_TanobyRuins_RixyChamber",
"SevenIsland_TanobyRuins_ViapoisChamber",
"ThreeIsland_DunsparceTunnel",
"SevenIsland_SeavaultCanyon_TanobyKey",
"SevenIsland_SevaultCanyon_TanobyKey",
"NavelRock_1F",
"NavelRock_Summit",
"NavelRock_Base",
+28 -28
View File
@@ -150,15 +150,15 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special sub_80CA68C
def_special Special_ShowStringVar4AsFieldMessage
def_special DrawWholeMapView
def_special sub_80CA69C
def_special Special_GetPlayerXY
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special sub_80CA6BC
def_special sub_80CA6DC
def_special sub_80CA714
def_special Special_GetPlayerTrainerIdOnesDigit
def_special Special_BufferBigGuyOrBigGirlString
def_special Special_BufferSonOrDaughterString
def_special Special_SetHiddenItemFlag
def_special nullsub_75
def_special nullsub_75
@@ -223,8 +223,8 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special Special_GetPokedexCount
def_special sub_80CA524
def_special sub_80CA86C
def_special sub_80CA9A8
def_special Special_AnimatePcTurnOn
def_special Special_AnimatePcTurnOff
def_special Special_GetElevatorFloor
def_special nullsub_75
def_special nullsub_75
@@ -236,10 +236,10 @@ gSpecials:: @ 815FD60
def_special sub_80E4634
def_special nullsub_75
def_special nullsub_75
def_special sub_80CA664
def_special Special_GetPlayerAvatarBike
def_special nullsub_75
def_special nullsub_75
def_special sub_80CA76C
def_special Special_GetLeadMonFriendship
def_special sub_80E5970
def_special sub_80E5C28
def_special sub_80E6648
@@ -260,7 +260,7 @@ gSpecials:: @ 815FD60
def_special sub_80A03D8
def_special sub_80EB6AC
def_special sub_80EB6FC
def_special sub_80CA7EC
def_special Special_TownMap
def_special sub_8053A9C
def_special sub_8053D68
def_special sub_8054440
@@ -273,7 +273,7 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special ScrSpecial_CreatePCMenu
def_special HallOfFamePCBeginFade
def_special sub_80CA618
def_special Special_ShowDiploma
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
@@ -282,7 +282,7 @@ gSpecials:: @ 815FD60
def_special nullsub_61
def_special DoSoftReset
def_special Special_HallOfFame
def_special sub_80CB498
def_special Special_AnimateElevator
def_special nullsub_75
def_special SpawnCameraObject
def_special RemoveCameraObject
@@ -294,32 +294,32 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special sub_80CAAAC
def_special sub_80CAABC
def_special Special_BufferEReaderTrainerName5
def_special Special_GetRandomSlotMachine
def_special GetPlayerFacingDirection
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special LeadMonHasEffortRibbon
def_special GivLeadMonEffortRibbon
def_special GiveLeadMonEffortRibbon
def_special ScrSpecial_AreLeadMonEVsMaxedOut
def_special sub_8069740
def_special sub_8069768
def_special InitRoamer
def_special nullsub_75
def_special sub_80CA804
def_special Special_PlayerHasGrassPokemonInParty
def_special nullsub_75
def_special nullsub_75
def_special sub_80CAB78
def_special Special_IsStarterFirstStageInParty
def_special nullsub_75
def_special sub_80CABD0
def_special Special_IsThereRoomInAnyBoxForMorePokemon
def_special nullsub_75
def_special sub_80CB580
def_special Special_DrawElevatorCurrentFloorWindow
def_special nullsub_75
def_special sub_80CAC08
def_special Special_CheckPartyPokerus
def_special sub_806E99C
def_special sub_80CAC28
def_special Special_ShakeScreen
def_special sub_807FA68
def_special sub_807F9D8
def_special sub_807FABC
@@ -336,7 +336,7 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special nullsub_75
def_special nullsub_75
def_special sub_80CAD54
def_special Special_GetSpeciesOfPartySlot_x8004
def_special sub_80BFC14
def_special nullsub_75
def_special nullsub_75
@@ -345,23 +345,23 @@ gSpecials:: @ 815FD60
def_special nullsub_75
def_special nullsub_75
def_special HasAllKantoMons
def_special sub_80CAD7C
def_special Special_BufferMonOTNameAndCompareToPlayerName
def_special nullsub_75
def_special sub_80E759C
def_special GetNameOfEnigmaBerryInPlayerParty
def_special nullsub_75
def_special sub_810B82C
def_special sub_807F904
def_special sub_80CA630
def_special Special_ForcePlayerOntoBike
def_special sub_80CB7C4
def_special sub_80CBC5C
def_special sub_80CADC4
def_special Special_SetVermilionTrashCans
def_special sub_805D1A8
def_special sub_80CB0A8
def_special Special_SampleResortGorgeousMonAndReward
def_special Special_CheckAddCoins
def_special GetDaycarePokemonCount
def_special sub_80CB63C
def_special Special_CloseElevatorCurrentFloorWindow
def_special sub_80CBD80
def_special ScrSpecial_GetStarter
def_special sub_80CBDCC
@@ -389,7 +389,7 @@ gSpecials:: @ 815FD60
def_special GetNumLevelsGainedForRoute5DaycareMon
def_special TakePokemonFromRoute5Daycare
def_special ScrSpecial_SeaGallopFerry
def_special sub_80CC48C
def_special Special_PlayerPartyContainsSpecies
def_special Special_SetSomeVariable
def_special HelpSystem_BackupSomeVariable
def_special HelpSystem_RestoreSomeVariable
@@ -449,7 +449,7 @@ gSpecials:: @ 815FD60
def_special sub_809C4A8
def_special sub_81537C0
def_special sub_809C5FC
def_special sub_80CB328
def_special Special_InitElevatorFloorSelectMenuPos
def_special Special_ComputeLoreleiDollCollection
def_special sub_80CD1B4
def_special CreateObedientEnemyMon
+1 -1
View File
@@ -1394,7 +1394,7 @@ gUnknown_8417920:: @ 0x8417920
gUnknown_8417926:: @ 0x8417926
.string "OK$"
gUnknown_8417929:: @ 0x8417929
gOtherText_Quit:: @ 0x8417929
.string "QUIT$"
gUnknown_841792E:: @ 0x841792E
+2 -1
View File
@@ -4,9 +4,10 @@
#include "global.h"
u16 sub_8164FCC(u8, u8);
void sub_80E7524(u32 *);
void sub_80E7524(struct BattleTowerEReaderTrainer *);
void ValidateEReaderTrainer(void);
u8 GetBattleTowerTrainerFrontSpriteId(void);
u8 GetEreaderTrainerFrontSpriteId(void);
void CopyEReaderTrainerName5(u8 *dest);
#endif //GUARD_BATTLE_TOWER_H
+3 -3
View File
@@ -95,13 +95,13 @@
#define VAR_ENIGMA_BERRY_AVAILABLE 0x4033
#define VAR_0x4034 0x4034
#define VAR_0x4035 0x4035
#define VAR_STORAGE_UNKNOWN 0x4036
#define VAR_RESORT_GOREGEOUS_STEP_COUNTER 0x4035
#define VAR_RESORT_GOREGOUS_REQUESTED_MON 0x4036
#define VAR_0x4037 0x4037
#define VAR_0x4038 0x4038
#define VAR_0x4039 0x4039
#define VAR_ELEVATOR_FLOOR 0x403A
#define VAR_0x403B 0x403B
#define VAR_RESORT_GOREGOUS_REWARD 0x403B
#define VAR_0x403C 0x403C
#define VAR_0x403D 0x403D
#define VAR_DEOXYS_INTERACTION_NUM 0x403E
+3
View File
@@ -27,5 +27,8 @@ extern u16 gUnknown_03005DE8;
void DrawWholeMapView(void);
void CurrentMapDrawMetatileAt(int x, int y);
void sub_805A658(s16 *x, s16 *y);
void SetCameraPanningCallback(void (*cb)(void));
void SetCameraPanning(s16 x, s16 y);
void InstallCameraPanAheadCallback(void);
#endif //GUARD_FIELD_CAMERA_H
+1
View File
@@ -94,6 +94,7 @@ void npc_paltag_set_load(u8 mode);
bool8 FieldObjectIsMovementOverridden(struct MapObject *mapObject);
u8 FieldObjectCheckHeldMovementStatus(struct MapObject *mapObject);
u8 sub_8063F84(u8 direction);
void CameraObjectSetFollowedObjectId(u8 spriteId);
// Exported data declarations
+20 -7
View File
@@ -194,6 +194,11 @@ struct LinkBattleRecords
u8 languages[LINK_B_RECORDS_COUNT];
};
#include "constants/game_stat.h"
#include "global.fieldmap.h"
#include "global.berry.h"
#include "pokemon.h"
struct UnknownSaveBlock2Struct
{
u8 field_0;
@@ -214,6 +219,20 @@ struct UnknownSaveBlock2Struct
u8 field_EB;
}; // sizeof = 0xEC
struct BattleTowerEReaderTrainer
{
/*0x4A0 0x3F0 0x00*/ u8 unk0;
/*0x4A1 0x3F1 0x01*/ u8 facilityClass;
/*0x4A2 0x3F2 0x02*/ u16 winStreak;
/*0x4A4 0x3F4 0x04*/ u8 name[8];
/*0x4AC 0x3FC 0x0C*/ u8 trainerId[4];
/*0x4B0 0x400 0x10*/ u16 greeting[6];
/*0x4BC 0x40C 0x1C*/ u16 farewellPlayerLost[6];
/*0x4C8 0x418 0x28*/ u16 farewellPlayerWon[6];
/*0x4D4 0x424 0x34*/ struct BattleTowerPokemon party[3];
/*0x558 0x4A8 0xB8*/ u32 checksum;
};
struct UnkSaveBlock2Substruct_55C
{
/* 0x000:0x55C */ u8 unk_00_0:1;
@@ -232,7 +251,7 @@ struct UnkSaveBlock2Substruct_55C
struct UnkSaveBlock2Substruct_B0
{
/* 0x000:0x0B0 */ u8 field_0[0x3F0];
/* 0x3F0:0x4A0 */ u32 field_3F0[0x2F];
/* 0x3F0:0x4A0 */ struct BattleTowerEReaderTrainer field_3F0;
/* 0x4AC:0x55C */ struct UnkSaveBlock2Substruct_55C field_4AC;
/* 0x4C4:0x574 */ u8 field_4C4[0x324];
}; // size: 0x7E8
@@ -261,7 +280,6 @@ struct SaveBlock2
/*0x0A8*/ u32 field_A8;
/*0x0AC*/ u8 field_AC;
/*0x0AD*/ u8 field_AD;
/*0x0AE*/ u8 filler_AE[0x2];
/*0x0B0*/ struct UnkSaveBlock2Substruct_B0 unk_B0;
/*0x898*/ u16 mapView[0x100];
/*0xA98*/ struct LinkBattleRecords linkBattleRecords;
@@ -304,11 +322,6 @@ struct SecretBaseRecord
/*0x1AD0*/ struct SecretBaseParty party;
};
#include "constants/game_stat.h"
#include "global.fieldmap.h"
#include "global.berry.h"
#include "pokemon.h"
struct WarpData
{
s8 mapGroup;
+1 -1
View File
@@ -346,7 +346,7 @@ struct BattleTowerPokemon
u32 gap:1;
u32 abilityNum:1;
/*0x1C*/ u32 personality;
/*0x20*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x20*/ u8 nickname[11];
/*0x2B*/ u8 friendship;
};
+1
View File
@@ -15,5 +15,6 @@ void ScriptMenu_DisplayPCStartupPrompt(void);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
void sub_809D6D4(void);
void sub_809D424(void);
#endif //GUARD_SCRIPT_MENU_H
+7
View File
@@ -475,4 +475,11 @@ extern const u8 gSaveStatName_Time[];
// mail
extern const u8 gText_From[];
// field_specials
extern const u8 gUnknown_8417FBB[];
extern const u8 gUnknown_8417FC3[];
extern const u8 gUnknown_8417FD0[];
extern const u8 gUnknown_8417FCC[];
extern const u8 gUnknown_8418075[];
#endif //GUARD_STRINGS_H
+3
View File
@@ -187,6 +187,7 @@ SECTIONS {
asm/post_battle_event_funcs.o(.text);
src/prof_pc.o(.text);
src/hof_pc.o(.text);
src/field_specials.o(.text);
asm/field_specials.o(.text);
src/battle_records.o(.text);
asm/evolution_scene.o(.text);
@@ -445,6 +446,8 @@ SECTIONS {
data/data_835B488.o(.rodata.83EEC98);
src/battle_ai_script_commands.o(.rodata);
data/data_83F5738.o(.rodata);
src/field_specials.o(.rodata);
data/field_specials.o(.rodata);
src/battle_records.o(.rodata);
data/data_83F5738.o(.rodata.83F6C90);
src/battle_transition.o(.rodata);
+955
View File
@@ -0,0 +1,955 @@
#include "global.h"
#include "quest_log.h"
#include "diploma.h"
#include "script.h"
#include "field_player_avatar.h"
#include "overworld.h"
#include "field_message_box.h"
#include "event_data.h"
#include "string_util.h"
#include "strings.h"
#include "battle.h"
#include "fieldmap.h"
#include "field_specials.h"
#include "region_map.h"
#include "task.h"
#include "battle_tower.h"
#include "field_camera.h"
#include "field_map_obj.h"
#include "random.h"
#include "sound.h"
#include "text.h"
#include "pokemon_storage_system.h"
#include "script_menu.h"
#include "data.h"
#include "pokedex.h"
#include "window.h"
#include "text_window.h"
#include "menu.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/items.h"
#include "constants/map_objects.h"
#include "constants/maps.h"
EWRAM_DATA u8 sElevatorCurrentFloorWindowId = 0;
EWRAM_DATA u16 sElevatorScroll = 0;
EWRAM_DATA u16 sElevatorCursorPos = 0;
static void Task_AnimatePcTurnOn(u8 taskId);
static void PcTurnOnUpdateMetatileId(bool16 flag);
static void Task_ShakeScreen(u8 taskId);
static void Task_EndScreenShake(u8 taskId);
static u16 SampleResortGoregeousMon(void);
static u16 SampleResortGoregeousReward(void);
static void Task_ElevatorShake(u8 taskId);
static void AnimateElevatorWindowView(u16 nfloors, bool8 direction);
static void Task_AnimateElevatorWindowView(u8 taskId);
u16 GetStarterPokemon(u16 starterIdx);
extern const u8 sSlotMachineIndices[22];
extern const u16 sResortGorgeousDeluxeRewards[6];
extern const struct WindowTemplate sElevatorCurrentFloorWindowTemplate;
extern const u8 *const sFloorNamePointers[15];
extern const u16 sElevatorWindowMetatilesGoingUp[3][3];
extern const u16 sElevatorWindowMetatilesGoingDown[3][3];
extern const u8 sElevatorAnimationDuration[9];
extern const u8 sElevatorWindowAnimDuration[9];
void Special_ShowDiploma(void)
{
sub_8112364();
SetMainCallback2(CB2_ShowDiploma);
ScriptContext2_Enable();
}
void Special_ForcePlayerOntoBike(void)
{
if (gPlayerAvatar.flags & 1)
SetPlayerAvatarTransitionFlags(2);
Overworld_SetSavedMusic(MUS_CYCLING);
Overworld_ChangeMusicTo(MUS_CYCLING);
}
void nullsub_74(void)
{
}
u8 Special_GetPlayerAvatarBike(void)
{
if (TestPlayerAvatarFlags(4))
return 1;
else if (TestPlayerAvatarFlags(2))
return 2;
else
return 0;
}
void Special_ShowStringVar4AsFieldMessage(void)
{
ShowFieldMessage(gStringVar4);
}
void Special_GetPlayerXY(void)
{
gSpecialVar_0x8004 = gSaveBlock1Ptr->pos.x;
gSpecialVar_0x8005 = gSaveBlock1Ptr->pos.y;
}
u8 Special_GetPlayerTrainerIdOnesDigit(void)
{
u16 playerId = (gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0];
return playerId % 10;
}
void Special_BufferBigGuyOrBigGirlString(void)
{
if (gSaveBlock2Ptr->playerGender == MALE)
StringCopy(gStringVar1, gUnknown_8417FBB);
else
StringCopy(gStringVar1, gUnknown_8417FC3);
}
void Special_BufferSonOrDaughterString(void)
{
if (gSaveBlock2Ptr->playerGender == MALE)
StringCopy(gStringVar1, gUnknown_8417FD0);
else
StringCopy(gStringVar1, gUnknown_8417FCC);
}
u8 Special_GetBattleOutcome(void)
{
return gBattleOutcome;
}
void Special_SetHiddenItemFlag(void)
{
FlagSet(gSpecialVar_0x8004);
}
u8 Special_GetLeadMonFriendship(void)
{
struct Pokemon * pokemon = &gPlayerParty[GetLeadMonIndex()];
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == 255)
return 6;
else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200)
return 5;
else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150)
return 4;
else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100)
return 3;
else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50)
return 2;
else if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) > 0)
return 1;
else
return 0;
}
void Special_TownMap(void)
{
sub_8112364();
sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
bool8 Special_PlayerHasGrassPokemonInParty(void)
{
u8 i;
struct Pokemon * pokemon;
u16 species;
for (i = 0; i < PARTY_SIZE; i++)
{
pokemon = &gPlayerParty[i];
if ( GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES)
&& !GetMonData(pokemon, MON_DATA_IS_EGG))
{
species = GetMonData(pokemon, MON_DATA_SPECIES);
if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS)
return TRUE;
}
}
return FALSE;
}
void Special_AnimatePcTurnOn(void)
{
u8 taskId;
if (FuncIsActiveTask(Task_AnimatePcTurnOn) != TRUE)
{
taskId = CreateTask(Task_AnimatePcTurnOn, 8);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = 0;
}
}
static void Task_AnimatePcTurnOn(u8 taskId)
{
s16 *data = gTasks[taskId].data;
if (data[1] == 6)
{
PcTurnOnUpdateMetatileId(data[0] & 1);
DrawWholeMapView();
data[1] = 0;
data[0]++;
if (data[0] == 5)
DestroyTask(taskId);
}
data[1]++;
}
static void PcTurnOnUpdateMetatileId(bool16 a0)
{
u16 metatileId = 0;
s8 deltaX = 0;
s8 deltaY = 0;
u8 direction = GetPlayerFacingDirection();
switch (direction)
{
case DIR_NORTH:
deltaX = 0;
deltaY = -1;
break;
case DIR_WEST:
deltaX = -1;
deltaY = -1;
break;
case DIR_EAST:
deltaX = 1;
deltaY = -1;
break;
}
if (a0)
{
if (gSpecialVar_0x8004 == 0)
metatileId = 0x62;
else if (gSpecialVar_0x8004 == 1)
metatileId = 0x28F;
else if (gSpecialVar_0x8004 == 2)
metatileId = 0x28F;
}
else
{
if (gSpecialVar_0x8004 == 0)
metatileId = 0x63;
else if (gSpecialVar_0x8004 == 1)
metatileId = 0x28A;
else if (gSpecialVar_0x8004 == 2)
metatileId = 0x28A;
}
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00);
}
void Special_AnimatePcTurnOff()
{
u16 metatileId = 0;
s8 deltaX = 0;
s8 deltaY = 0;
u8 direction = GetPlayerFacingDirection();
switch (direction)
{
case DIR_NORTH:
deltaX = 0;
deltaY = -1;
break;
case DIR_WEST:
deltaX = -1;
deltaY = -1;
break;
case DIR_EAST:
deltaX = 1;
deltaY = -1;
break;
}
if (gSpecialVar_0x8004 == 0)
metatileId = 0x62;
else if (gSpecialVar_0x8004 == 1)
metatileId = 0x28F;
else if (gSpecialVar_0x8004 == 2)
metatileId = 0x28F;
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + deltaX + 7, gSaveBlock1Ptr->pos.y + deltaY + 7, metatileId | 0xC00);
DrawWholeMapView();
}
void SpawnCameraObject(void)
{
u8 mapObjectId = SpawnSpecialFieldObjectParameterized(MAP_OBJ_GFX_YOUNGSTER, 8, 127, gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7, 3);
gMapObjects[mapObjectId].mapobj_bit_13 = TRUE;
CameraObjectSetFollowedObjectId(gMapObjects[mapObjectId].spriteId);
}
void RemoveCameraObject(void)
{
CameraObjectSetFollowedObjectId(GetPlayerAvatarObjectId());
RemoveFieldObjectByLocalIdAndMap(127, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
}
void Special_BufferEReaderTrainerName5(void)
{
CopyEReaderTrainerName5(gStringVar1);
}
u8 Special_GetRandomSlotMachine(void)
{
u16 rval = Random() % NELEMS(sSlotMachineIndices);
return sSlotMachineIndices[rval];
}
bool8 LeadMonHasEffortRibbon(void)
{
u8 leadMonIdx = GetLeadMonIndex();
return GetMonData(&gPlayerParty[leadMonIdx], MON_DATA_EFFORT_RIBBON, NULL);
}
void GiveLeadMonEffortRibbon(void)
{
u8 leadMonIdx;
bool8 param;
IncrementGameStat(GAME_STAT_RECEIVED_RIBBONS);
FlagSet(FLAG_SYS_RIBBON_GET);
param = TRUE;
leadMonIdx = GetLeadMonIndex();
SetMonData(&gPlayerParty[leadMonIdx], MON_DATA_EFFORT_RIBBON, &param);
}
bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void)
{
u8 leadMonIndex = GetLeadMonIndex();
if (GetMonEVCount(&gPlayerParty[leadMonIndex]) >= 510)
return TRUE;
else
return FALSE;
}
bool8 Special_IsStarterFirstStageInParty(void)
{
u16 species = GetStarterPokemon(VarGet(VAR_STARTER_MON));
u8 partyCount = CalculatePlayerPartyCount();
u8 i;
for (i = 0; i < partyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == species)
return TRUE;
}
return FALSE;
}
bool8 Special_IsThereRoomInAnyBoxForMorePokemon(void)
{
u16 i;
u16 j;
for (i = 0; i < TOTAL_BOXES_COUNT; i++)
{
for (j = 0; j < IN_BOX_COUNT; j++)
{
if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
return TRUE;
}
}
return FALSE;
}
bool8 Special_CheckPartyPokerus(void)
{
if (!CheckPartyPokerus(gPlayerParty, 0x3F))
return FALSE;
else
return TRUE;
}
#define tXtrans data[0]
#define tTimer data[1]
#define tNremain data[2]
#define tDuration data[3]
#define tYtrans data[4]
void Special_ShakeScreen(void)
{
/*
* 0x8004 = x translation
* 0x8005 = y translation
* 0x8006 = num interations
* 0x8007 = duration of an iteration
*/
u8 taskId = CreateTask(Task_ShakeScreen, 9);
gTasks[taskId].tXtrans = gSpecialVar_0x8005;
gTasks[taskId].tTimer = 0;
gTasks[taskId].tNremain = gSpecialVar_0x8006;
gTasks[taskId].tDuration = gSpecialVar_0x8007;
gTasks[taskId].tYtrans = gSpecialVar_0x8004;
SetCameraPanningCallback(NULL);
PlaySE(SE_W070);
}
static void Task_ShakeScreen(u8 taskId)
{
s16 *data = gTasks[taskId].data;
tTimer++;
if (tTimer % tDuration == 0)
{
tTimer = 0;
tNremain--;
tXtrans = -tXtrans;
tYtrans = -tYtrans;
SetCameraPanning(tXtrans, tYtrans);
if (tNremain == 0)
{
Task_EndScreenShake(taskId);
InstallCameraPanAheadCallback();
}
}
}
static void Task_EndScreenShake(u8 taskId)
{
DestroyTask(taskId);
EnableBothScriptContexts();
}
#undef tYtrans
#undef tDuration
#undef tNremain
#undef tTimer
#undef tXtrans
u8 GetLeadMonIndex(void)
{
u8 partyCount = CalculatePlayerPartyCount();
u8 i;
struct Pokemon * pokemon;
for (i = 0; i < partyCount; i++)
{
pokemon = &gPlayerParty[i];
if (GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_NONE)
return i;
}
return 0;
}
u16 Special_GetSpeciesOfPartySlot_x8004(void)
{
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL);
}
bool8 Special_BufferMonOTNameAndCompareToPlayerName(void)
{
GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_NAME, gStringVar1);
if (!StringCompare(gSaveBlock2Ptr->playerName, gStringVar1))
return FALSE;
else
return TRUE;
}
void nullsub_75(void)
{
}
void sub_80CADC4(void)
{
u8 t = EOS;
AddTextPrinterParameterized(0, 2, &t, 0, 1, 0, NULL);
sub_809D424();
}
void Special_SetVermilionTrashCans(void)
{
u16 idx = (Random() % 15) + 1;
gSpecialVar_0x8004 = idx;
gSpecialVar_0x8005 = idx;
switch (gSpecialVar_0x8004)
{
case 1:
idx = Random() % 2;
if (idx == 0)
gSpecialVar_0x8005 += 1;
else
gSpecialVar_0x8005 += 5;
break;
case 2:
case 3:
case 4:
idx = Random() % 3;
if (idx == 0)
gSpecialVar_0x8005 += 1;
else if (idx == 1)
gSpecialVar_0x8005 += 5;
else
gSpecialVar_0x8005 -= 1;
break;
case 5:
idx = Random() % 2;
if (idx == 0)
gSpecialVar_0x8005 += 5;
else
gSpecialVar_0x8005 -= 1;
break;
case 6:
idx = Random() % 3;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else if (idx == 1)
gSpecialVar_0x8005 += 1;
else
gSpecialVar_0x8005 += 5;
break;
case 7:
case 8:
case 9:
idx = Random() % 4;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else if (idx == 1)
gSpecialVar_0x8005 += 1;
else if (idx == 2)
gSpecialVar_0x8005 += 5;
else
gSpecialVar_0x8005 -= 1;
break;
case 10:
idx = Random() % 3;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else if (idx == 1)
gSpecialVar_0x8005 += 5;
else
gSpecialVar_0x8005 -= 1;
break;
case 11:
idx = Random() % 2;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else
gSpecialVar_0x8005 += 1;
break;
case 12:
case 13:
case 14:
idx = Random() % 3;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else if (idx == 1)
gSpecialVar_0x8005 += 1;
else
gSpecialVar_0x8005 -= 1;
break;
case 15:
idx = Random() % 2;
if (idx == 0)
gSpecialVar_0x8005 -= 5;
else
gSpecialVar_0x8005 -= 1;
break;
}
if (gSpecialVar_0x8005 > 15)
{
if (gSpecialVar_0x8004 % 5 == 1)
gSpecialVar_0x8005 = gSpecialVar_0x8004 + 1;
else if (gSpecialVar_0x8004 % 5 == 0)
gSpecialVar_0x8005 = gSpecialVar_0x8004 - 1;
else
gSpecialVar_0x8005 = gSpecialVar_0x8004 + 1;
}
}
void IncrementResortGorgeousStepCounter(void)
{
u16 var4035 = VarGet(VAR_RESORT_GOREGEOUS_STEP_COUNTER);
if (VarGet(VAR_RESORT_GOREGOUS_REQUESTED_MON) != SPECIES_NONE)
{
var4035++;
if (var4035 >= 250)
{
VarSet(VAR_RESORT_GOREGOUS_REQUESTED_MON, 0xFFFF);
VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, 0);
}
else
{
VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, var4035);
}
}
}
void Special_SampleResortGorgeousMonAndReward(void)
{
u16 var4036 = VarGet(VAR_RESORT_GOREGOUS_REQUESTED_MON);
if (var4036 == SPECIES_NONE || var4036 == 0xFFFF)
{
VarSet(VAR_RESORT_GOREGOUS_REQUESTED_MON, SampleResortGoregeousMon());
VarSet(VAR_RESORT_GOREGOUS_REWARD, SampleResortGoregeousReward());
VarSet(VAR_RESORT_GOREGEOUS_STEP_COUNTER, 0);
}
StringCopy(gStringVar1, gSpeciesNames[VarGet(VAR_RESORT_GOREGOUS_REQUESTED_MON)]);
}
static u16 SampleResortGoregeousMon(void)
{
u16 i;
u16 species;
for (i = 0; i < 100; i++)
{
species = (Random() % (NUM_SPECIES - 1)) + 1;
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FALSE) == TRUE)
return species;
}
while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FALSE) != TRUE)
{
if (species == SPECIES_BULBASAUR)
species = NUM_SPECIES - 1;
else
species--;
}
return species;
}
static u16 SampleResortGoregeousReward(void)
{
if ((Random() % 100) >= 30)
return ITEM_LUXURY_BALL;
else
return sResortGorgeousDeluxeRewards[Random() % NELEMS(sResortGorgeousDeluxeRewards)];
}
bool8 Special_CheckAddCoins(void)
{
if (gSpecialVar_Result + gSpecialVar_0x8006 > 9999)
return FALSE;
else
return TRUE;
}
void Special_GetElevatorFloor(void)
{
u16 floor = 4;
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(SILPH_CO_1F):
floor = 4;
break;
case MAP_NUM(SILPH_CO_2F):
floor = 5;
break;
case MAP_NUM(SILPH_CO_3F):
floor = 6;
break;
case MAP_NUM(SILPH_CO_4F):
floor = 7;
break;
case MAP_NUM(SILPH_CO_5F):
floor = 8;
break;
case MAP_NUM(SILPH_CO_6F):
floor = 9;
break;
case MAP_NUM(SILPH_CO_7F):
floor = 10;
break;
case MAP_NUM(SILPH_CO_8F):
floor = 11;
break;
case MAP_NUM(SILPH_CO_9F):
floor = 12;
break;
case MAP_NUM(SILPH_CO_10F):
floor = 13;
break;
case MAP_NUM(SILPH_CO_11F):
floor = 14;
break;
case MAP_NUM(ROCKET_HIDEOUT_B1F):
floor = 3;
break;
case MAP_NUM(ROCKET_HIDEOUT_B2F):
floor = 2;
break;
case MAP_NUM(ROCKET_HIDEOUT_B4F):
floor = 0;
break;
}
}
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F):
floor = 4;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_2F):
floor = 5;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_3F):
floor = 6;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_4F):
floor = 7;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F):
floor = 8;
break;
}
}
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER_1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_1F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_2F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_3F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_4F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_5F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_6F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_7F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_8F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_ROOF):
floor = 15;
break;
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_LOBBY):
floor = 3;
break;
}
}
VarSet(VAR_ELEVATOR_FLOOR, floor);
}
u16 Special_InitElevatorFloorSelectMenuPos(void)
{
sElevatorScroll = 0;
sElevatorCursorPos = 0;
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(ROCKET_HIDEOUT_B1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(SILPH_CO_11F):
sElevatorScroll = 0;
sElevatorCursorPos = 0;
break;
case MAP_NUM(SILPH_CO_10F):
sElevatorScroll = 0;
sElevatorCursorPos = 1;
break;
case MAP_NUM(SILPH_CO_9F):
sElevatorScroll = 0;
sElevatorCursorPos = 2;
break;
case MAP_NUM(SILPH_CO_8F):
sElevatorScroll = 0;
sElevatorCursorPos = 3;
break;
case MAP_NUM(SILPH_CO_7F):
sElevatorScroll = 0;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_6F):
sElevatorScroll = 1;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_5F):
sElevatorScroll = 2;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_4F):
sElevatorScroll = 3;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_3F):
sElevatorScroll = 4;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_2F):
sElevatorScroll = 5;
sElevatorCursorPos = 4;
break;
case MAP_NUM(SILPH_CO_1F):
sElevatorScroll = 5;
sElevatorCursorPos = 5;
break;
case MAP_NUM(ROCKET_HIDEOUT_B1F):
sElevatorScroll = 0;
sElevatorCursorPos = 0;
break;
case MAP_NUM(ROCKET_HIDEOUT_B2F):
sElevatorScroll = 0;
sElevatorCursorPos = 1;
break;
case MAP_NUM(ROCKET_HIDEOUT_B4F):
sElevatorScroll = 0;
sElevatorCursorPos = 2;
break;
}
}
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(CELADON_CITY_DEPARTMENT_STORE_1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_5F):
sElevatorScroll = 0;
sElevatorCursorPos = 0;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_4F):
sElevatorScroll = 0;
sElevatorCursorPos = 1;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_3F):
sElevatorScroll = 0;
sElevatorCursorPos = 2;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_2F):
sElevatorScroll = 0;
sElevatorCursorPos = 3;
break;
case MAP_NUM(CELADON_CITY_DEPARTMENT_STORE_1F):
sElevatorScroll = 0;
sElevatorCursorPos = 4;
break;
}
}
if (gSaveBlock1Ptr->warp2.mapGroup == MAP_GROUP(SEVEN_ISLAND_TRAINER_TOWER_1F))
{
switch (gSaveBlock1Ptr->warp2.mapNum)
{
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_1F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_2F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_3F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_4F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_5F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_6F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_7F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_8F):
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_ROOF):
sElevatorScroll = 0;
sElevatorCursorPos = 0;
break;
case MAP_NUM(SEVEN_ISLAND_TRAINER_TOWER_LOBBY):
sElevatorScroll = 0;
sElevatorCursorPos = 1;
break;
}
}
return sElevatorCursorPos;
}
void Special_AnimateElevator(void)
{
u16 nfloors;
s16 *data = gTasks[CreateTask(Task_ElevatorShake, 9)].data;
data[1] = 0;
data[2] = 0;
data[4] = 1;
if (gSpecialVar_0x8005 > gSpecialVar_0x8006)
{
nfloors = gSpecialVar_0x8005 - gSpecialVar_0x8006;
data[6] = 1;
}
else
{
nfloors = gSpecialVar_0x8006 - gSpecialVar_0x8005;
data[6] = 0;
}
if (nfloors > 8)
nfloors = 8;
data[5] = sElevatorAnimationDuration[nfloors];
SetCameraPanningCallback(NULL);
AnimateElevatorWindowView(nfloors, data[6]);
PlaySE(SE_ELEBETA);
}
static void Task_ElevatorShake(u8 taskId)
{
s16 *data = gTasks[taskId].data;
data[1]++;
if ((data[1] % 3) == 0)
{
data[1] = 0;
data[2]++;
data[4] = -data[4];
SetCameraPanning(0, data[4]);
if (data[2] == data[5])
{
PlaySE(SE_PINPON);
DestroyTask(taskId);
EnableBothScriptContexts();
InstallCameraPanAheadCallback();
}
}
}
void Special_DrawElevatorCurrentFloorWindow(void)
{
const u8 *floorname;
u32 strwidth;
if (sub_81119D4(sub_809D6D4) != TRUE)
{
sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate);
TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0);
DrawStdFrameWithCustomTileAndPalette(sElevatorCurrentFloorWindowId, FALSE, 0x21D, 0xD);
AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, gUnknown_8418075, 0, 2, 0xFF, NULL);
floorname = sFloorNamePointers[gSpecialVar_0x8005];
strwidth = GetStringWidth(2, floorname, 0);
AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, floorname, 56 - strwidth, 16, 0xFF, NULL);
PutWindowTilemap(sElevatorCurrentFloorWindowId);
CopyWindowToVram(sElevatorCurrentFloorWindowId, 3);
}
}
void Special_CloseElevatorCurrentFloorWindow(void)
{
ClearStdWindowAndFrameToTransparent(sElevatorCurrentFloorWindowId, TRUE);
RemoveWindow(sElevatorCurrentFloorWindowId);
}
static void AnimateElevatorWindowView(u16 nfloors, u8 direction)
{
u8 taskId;
if (FuncIsActiveTask(Task_AnimateElevatorWindowView) != TRUE)
{
taskId = CreateTask(Task_AnimateElevatorWindowView, 8);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = 0;
gTasks[taskId].data[2] = direction;
gTasks[taskId].data[3] = sElevatorWindowAnimDuration[nfloors];
}
}
static void Task_AnimateElevatorWindowView(u8 taskId)
{
u8 i;
u8 j;
s16 *data = gTasks[taskId].data;
if (data[1] == 6)
{
data[0]++;
if (data[2] == 0)
{
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
{
MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingUp[i][data[0] % 3] | 0xC00);
}
}
}
else
{
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
{
MapGridSetMetatileIdAt(j + 8, i + 7, sElevatorWindowMetatilesGoingDown[i][data[0] % 3] | 0xC00);
}
}
}
DrawWholeMapView();
data[1] = 0;
if (data[0] == data[3])
DestroyTask(taskId);
}
data[1]++;
}
+1 -1
View File
@@ -588,7 +588,7 @@ void DestroyWonderCard(void)
ClearRamScript();
sub_806E2D0();
sub_806E370();
sub_80E7524(gSaveBlock2Ptr->unk_B0.field_3F0);
sub_80E7524(&gSaveBlock2Ptr->unk_B0.field_3F0);
}
bool32 sub_8143F68(const struct MEventBuffer_32E0_Sub * data)
+1 -1
View File
@@ -226,7 +226,7 @@ static u32 ish_mainseq_4(struct mevent_client * svr)
sub_8069EA4(svr->recvBuffer, 1000);
break;
case 18:
memcpy(gSaveBlock2Ptr->unk_B0.field_3F0, svr->recvBuffer, 0xbc);
memcpy(&gSaveBlock2Ptr->unk_B0.field_3F0, svr->recvBuffer, sizeof(struct BattleTowerEReaderTrainer));
ValidateEReaderTrainer();
break;
case 21:
+1 -1
View File
@@ -281,7 +281,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx)
{
u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0];
memcpy(gSaveBlock2Ptr->unk_B0.field_3F0, (void *)data, 0xBC);
memcpy(&gSaveBlock2Ptr->unk_B0.field_3F0, (void *)data, sizeof(struct BattleTowerEReaderTrainer));
ValidateEReaderTrainer();
StringExpandPlaceholders(gStringVar4, gText_MysteryGiftNewTrainer);
ctx->data[2] = 2;
+3 -8
View File
@@ -847,15 +847,10 @@ gAIScriptPtr: @ 2039A00
gPlayerFacingPosition: @ 2039A04
.space 0x8
gUnknown_2039A0C: @ 2039A0C
.space 0x2
gUnknown_2039A0E: @ 2039A0E
.space 0x2
gUnknown_2039A10: @ 2039A10
.space 0x4
.align 2
.include "src/field_specials.o"
.align 2
gUnknown_2039A14: @ 2039A14
.space 0x4