More enumeration of constants, more annotations of scripts.

This commit is contained in:
PikalaxALT
2015-07-15 15:48:44 -04:00
parent 67e56102ef
commit 39524cdb76
96 changed files with 2634 additions and 2501 deletions

View File

@@ -2452,7 +2452,7 @@ Function3cfa4: ; 3cfa4
and a and a
ld a, b ld a, b
call z, Function3d0ea call z, Function3d0ea
callab Function39939 callab Battle_GetTrainerName
ld hl, BattleText_0x809da ld hl, BattleText_0x809da
call StdBattleTextBox call StdBattleTextBox
call IsMobileBattle call IsMobileBattle
@@ -2493,7 +2493,7 @@ Function3cfa4: ; 3cfa4
call DelayFrames call DelayFrames
call EmptyBattleTextBox call EmptyBattleTextBox
ld c, $3 ld c, $3
callba Function11c000 callba StoreText
call Functiona80 call Functiona80
ld hl, wPayDayMoney ld hl, wPayDayMoney
ld a, [hli] ld a, [hli]
@@ -2903,7 +2903,7 @@ Function3d227: ; 3d227
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call Function3eda6 call Function3eda6
call Function1c17 call WriteBackup
call ClearSGB call ClearSGB
call Function32f9 call Function32f9
call Function3f26d call Function3f26d
@@ -3100,7 +3100,7 @@ LostBattle: ; 3d38e
call EmptyBattleTextBox call EmptyBattleTextBox
ld c, 2 ld c, 2
callba Function11c000 callba StoreText
call Functiona80 call Functiona80
call ClearTileMap call ClearTileMap
call WhiteBGMap call WhiteBGMap
@@ -3644,7 +3644,7 @@ Function3d714: ; 3d714
Function3d74b: ; 3d74b Function3d74b: ; 3d74b
ld a, [CurPartyMon] ld a, [CurPartyMon]
push af push af
callab Function39939 callab Battle_GetTrainerName
ld hl, BattleText_0x80aca ld hl, BattleText_0x80aca
call StdBattleTextBox call StdBattleTextBox
lb bc, 1, 7 lb bc, 1, 7
@@ -3695,7 +3695,7 @@ Function3d7a0: ; 3d7a0
; 3d7b8 ; 3d7b8
Function3d7b8: ; 3d7b8 Function3d7b8: ; 3d7b8
callab Function39939 callab Battle_GetTrainerName
ld hl, BattleText_0x80af8 ld hl, BattleText_0x80af8
call StdBattleTextBox call StdBattleTextBox
jp WaitBGMap jp WaitBGMap
@@ -5312,7 +5312,7 @@ Function3e299:
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call Function3eda6 call Function3eda6
call Function1c17 call WriteBackup
call Function309d call Function309d
call ClearSGB call ClearSGB
call Function32f9 call Function32f9
@@ -5395,7 +5395,7 @@ Function3e358: ; 3e358
call DelayFrame call DelayFrame
call ClearSprites call ClearSprites
call Function3eda6 call Function3eda6
call Function1c17 call WriteBackup
call ClearSGB call ClearSGB
call Function32f9 call Function32f9
ld a, [CurPartyMon] ld a, [CurPartyMon]
@@ -5411,7 +5411,7 @@ Function3e3ad: ; 3e3ad
jr z, .asm_3e3c1 jr z, .asm_3e3c1
call Function1d6e call Function1d6e
call Function3e8e4 call Function3e8e4
call Function1c17 call WriteBackup
.asm_3e3c1 .asm_3e3c1
call Function3e7c1 call Function3e7c1
@@ -9455,7 +9455,7 @@ BattleStartMessage: ; 3fc8b
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
callba Function39939 callba Battle_GetTrainerName
ld hl, WantsToBattleText ld hl, WantsToBattleText
jr .asm_3fd0e jr .asm_3fd0e

View File

@@ -9710,7 +9710,7 @@ BattleCommand67: ; 379c9
; Return to battle scene ; Return to battle scene
call ClearPalettes call ClearPalettes
callba Function3ed9f callba Function3ed9f
call Function1c17 call WriteBackup
call ClearSprites call ClearSprites
hlcoord 1, 0 hlcoord 1, 0
lb bc, 4, 10 lb bc, 4, 10
@@ -9779,7 +9779,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
call Function1d6e call Function1d6e
ld hl, Function3e8e4 ld hl, Function3e8e4
call CallBattleCore call CallBattleCore
call Function1c17 call WriteBackup
xor a xor a
ld [wd0ec], a ld [wd0ec], a
@@ -9810,7 +9810,7 @@ BatonPass_LinkEnemySwitch: ; 37a82
add NUM_MOVES add NUM_MOVES
ld [wBattleAction], a ld [wBattleAction], a
.asm_37aa8 .asm_37aa8
jp Function1c17 jp WriteBackup
; 37aab ; 37aab

View File

@@ -19,6 +19,7 @@ INCLUDE "constants/engine_flags.asm"
INCLUDE "constants/music_constants.asm" INCLUDE "constants/music_constants.asm"
INCLUDE "constants/sfx_constants.asm" INCLUDE "constants/sfx_constants.asm"
INCLUDE "constants/animation_constants.asm" INCLUDE "constants/animation_constants.asm"
INCLUDE "constants/phone_constants.asm"
INCLUDE "constants/gfx_constants.asm" INCLUDE "constants/gfx_constants.asm"
INCLUDE "constants/pokemon_data_constants.asm" INCLUDE "constants/pokemon_data_constants.asm"
INCLUDE "constants/misc_constants.asm" INCLUDE "constants/misc_constants.asm"

View File

@@ -81,7 +81,7 @@
const ENGINE_LUCKY_NUMBER_SHOW const ENGINE_LUCKY_NUMBER_SHOW
const ENGINE_4F const ENGINE_4F
const ENGINE_KURT_MAKING_BALLS const ENGINE_KURT_MAKING_BALLS
const ENGINE_51 const ENGINE_DAILY_BUG_CONTEST
const ENGINE_SPECIAL_WILDDATA const ENGINE_SPECIAL_WILDDATA
const ENGINE_TIME_CAPSULE const ENGINE_TIME_CAPSULE
const ENGINE_ALL_FRUIT_TREES const ENGINE_ALL_FRUIT_TREES

View File

@@ -777,7 +777,7 @@
const EVENT_WAREHOUSE_LAYOUT_2 const EVENT_WAREHOUSE_LAYOUT_2
const EVENT_WAREHOUSE_LAYOUT_3 const EVENT_WAREHOUSE_LAYOUT_3
const EVENT_WAREHOUSE_BLOCKED_OFF const EVENT_WAREHOUSE_BLOCKED_OFF
const EVENT_308 const EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
const EVENT_309 const EVENT_309
const EVENT_WILLS_ROOM_EXIT_OPEN const EVENT_WILLS_ROOM_EXIT_OPEN
const EVENT_WILLS_ROOM_ENTRANCE_CLOSED const EVENT_WILLS_ROOM_ENTRANCE_CLOSED
@@ -788,10 +788,10 @@
const EVENT_KARENS_ROOM_EXIT_OPEN const EVENT_KARENS_ROOM_EXIT_OPEN
const EVENT_LANCES_ROOM_ENTRANCE_CLOSED const EVENT_LANCES_ROOM_ENTRANCE_CLOSED
const EVENT_312 const EVENT_312
const EVENT_313 const EVENT_CONTEST_OFFICER_HAS_SUN_STONE
const EVENT_314 const EVENT_CONTEST_OFFICER_HAS_EVERSTONE
const EVENT_315 const EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
const EVENT_316 const EVENT_CONTEST_OFFICER_HAS_BERRY
const EVENT_FOUGHT_HO_OH const EVENT_FOUGHT_HO_OH
const EVENT_FOUGHT_LUGIA const EVENT_FOUGHT_LUGIA
const EVENT_BEAT_RIVAL_IN_MT_MOON const EVENT_BEAT_RIVAL_IN_MT_MOON
@@ -1848,8 +1848,8 @@
const EVENT_734 const EVENT_734
const EVENT_735 const EVENT_735
const EVENT_736 const EVENT_736
const EVENT_737 const EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
const EVENT_738 const EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
const EVENT_739 const EVENT_739
const EVENT_73A const EVENT_73A
const EVENT_73B const EVENT_73B

View File

@@ -266,6 +266,7 @@ SAFARI_BALL EQU 8 ; MOON_STONE
MOON_STONE_RED EQU 10 ; BURN_HEAL MOON_STONE_RED EQU 10 ; BURN_HEAL
FULL_HEAL_RED EQU 52 ; X_SPEED FULL_HEAL_RED EQU 52 ; X_SPEED
MAIL_MAX_LENGTH EQU $20
; pockets ; pockets
ITEM EQU 1 ITEM EQU 1

View File

@@ -473,110 +473,112 @@ MAP_N_A EQU -1
; sprites ; sprites
const_def const_def
const SPRITE_NONE const SPRITE_NONE ; 00
const SPRITE_CHRIS const SPRITE_CHRIS ; 01
const SPRITE_CHRIS_BIKE const SPRITE_CHRIS_BIKE ; 02
const SPRITE_GAMEBOY_KID const SPRITE_GAMEBOY_KID ; 03
const SPRITE_SILVER const SPRITE_SILVER ; 04
const SPRITE_OAK const SPRITE_OAK ; 05
const SPRITE_RED const SPRITE_RED ; 06
const SPRITE_BLUE const SPRITE_BLUE ; 07
const SPRITE_BILL const SPRITE_BILL ; 08
const SPRITE_ELDER const SPRITE_ELDER ; 09
const SPRITE_JANINE const SPRITE_JANINE ; 0a
const SPRITE_KURT const SPRITE_KURT ; 0b
const SPRITE_MOM const SPRITE_MOM ; 0c
const SPRITE_BLAINE const SPRITE_BLAINE ; 0d
const SPRITE_REDS_MOM const SPRITE_REDS_MOM ; 0e
const SPRITE_DAISY const SPRITE_DAISY ; 0f
const SPRITE_ELM const SPRITE_ELM ; 10
const SPRITE_WILL const SPRITE_WILL ; 11
const SPRITE_FALKNER const SPRITE_FALKNER ; 12
const SPRITE_WHITNEY const SPRITE_WHITNEY ; 13
const SPRITE_BUGSY const SPRITE_BUGSY ; 14
const SPRITE_MORTY const SPRITE_MORTY ; 15
const SPRITE_CHUCK const SPRITE_CHUCK ; 16
const SPRITE_JASMINE const SPRITE_JASMINE ; 17
const SPRITE_PRYCE const SPRITE_PRYCE ; 18
const SPRITE_CLAIR const SPRITE_CLAIR ; 19
const SPRITE_BROCK const SPRITE_BROCK ; 1a
const SPRITE_KAREN const SPRITE_KAREN ; 1b
const SPRITE_BRUNO const SPRITE_BRUNO ; 1c
const SPRITE_MISTY const SPRITE_MISTY ; 1d
const SPRITE_LANCE const SPRITE_LANCE ; 1e
const SPRITE_SURGE const SPRITE_SURGE ; 1f
const SPRITE_ERIKA const SPRITE_ERIKA ; 20
const SPRITE_KOGA const SPRITE_KOGA ; 21
const SPRITE_SABRINA const SPRITE_SABRINA ; 22
const SPRITE_COOLTRAINER_M const SPRITE_COOLTRAINER_M ; 23
const SPRITE_COOLTRAINER_F const SPRITE_COOLTRAINER_F ; 24
const SPRITE_BUG_CATCHER const SPRITE_BUG_CATCHER ; 25
const SPRITE_TWIN const SPRITE_TWIN ; 26
const SPRITE_YOUNGSTER const SPRITE_YOUNGSTER ; 27
const SPRITE_LASS const SPRITE_LASS ; 28
const SPRITE_TEACHER const SPRITE_TEACHER ; 29
const SPRITE_BUENA const SPRITE_BUENA ; 2a
const SPRITE_SUPER_NERD const SPRITE_SUPER_NERD ; 2b
const SPRITE_ROCKER const SPRITE_ROCKER ; 2c
const SPRITE_POKEFAN_M const SPRITE_POKEFAN_M ; 2d
const SPRITE_POKEFAN_F const SPRITE_POKEFAN_F ; 2e
const SPRITE_GRAMPS const SPRITE_GRAMPS ; 2f
const SPRITE_GRANNY const SPRITE_GRANNY ; 30
const SPRITE_SWIMMER_GUY const SPRITE_SWIMMER_GUY ; 31
const SPRITE_SWIMMER_GIRL const SPRITE_SWIMMER_GIRL ; 32
const SPRITE_BIG_SNORLAX const SPRITE_BIG_SNORLAX ; 33
const SPRITE_SURFING_PIKACHU const SPRITE_SURFING_PIKACHU ; 34
const SPRITE_ROCKET const SPRITE_ROCKET ; 35
const SPRITE_ROCKET_GIRL const SPRITE_ROCKET_GIRL ; 36
const SPRITE_NURSE const SPRITE_NURSE ; 37
const SPRITE_LINK_RECEPTIONIST const SPRITE_LINK_RECEPTIONIST ; 38
const SPRITE_CLERK const SPRITE_CLERK ; 39
const SPRITE_FISHER const SPRITE_FISHER ; 3a
const SPRITE_FISHING_GURU const SPRITE_FISHING_GURU ; 3b
const SPRITE_SCIENTIST const SPRITE_SCIENTIST ; 3c
const SPRITE_KIMONO_GIRL const SPRITE_KIMONO_GIRL ; 3d
const SPRITE_SAGE const SPRITE_SAGE ; 3e
const SPRITE_UNUSED_GUY const SPRITE_UNUSED_GUY ; 3f
const SPRITE_GENTLEMAN const SPRITE_GENTLEMAN ; 40
const SPRITE_BLACK_BELT const SPRITE_BLACK_BELT ; 41
const SPRITE_RECEPTIONIST const SPRITE_RECEPTIONIST ; 42
const SPRITE_OFFICER const SPRITE_OFFICER ; 43
const SPRITE_CAL const SPRITE_CAL ; 44
const SPRITE_SLOWPOKE const SPRITE_SLOWPOKE ; 45
const SPRITE_CAPTAIN const SPRITE_CAPTAIN ; 46
const SPRITE_BIG_LAPRAS const SPRITE_BIG_LAPRAS ; 47
const SPRITE_GYM_GUY const SPRITE_GYM_GUY ; 48
const SPRITE_SAILOR const SPRITE_SAILOR ; 49
const SPRITE_BIKER const SPRITE_BIKER ; 4a
const SPRITE_PHARMACIST const SPRITE_PHARMACIST ; 4b
const SPRITE_MONSTER const SPRITE_MONSTER ; 4c
const SPRITE_FAIRY const SPRITE_FAIRY ; 4d
const SPRITE_BIRD const SPRITE_BIRD ; 4e
const SPRITE_DRAGON const SPRITE_DRAGON ; 4f
const SPRITE_BIG_ONIX const SPRITE_BIG_ONIX ; 50
const SPRITE_N64 const SPRITE_N64 ; 51
const SPRITE_SUDOWOODO const SPRITE_SUDOWOODO ; 52
const SPRITE_SURF const SPRITE_SURF ; 53
const SPRITE_POKE_BALL const SPRITE_POKE_BALL ; 54
const SPRITE_POKEDEX const SPRITE_POKEDEX ; 55
const SPRITE_PAPER const SPRITE_PAPER ; 56
const SPRITE_VIRTUAL_BOY const SPRITE_VIRTUAL_BOY ; 57
const SPRITE_OLD_LINK_RECEPTIONIST const SPRITE_OLD_LINK_RECEPTIONIST ; 58
const SPRITE_ROCK const SPRITE_ROCK ; 59
const SPRITE_BOULDER const SPRITE_BOULDER ; 5a
const SPRITE_SNES const SPRITE_SNES ; 5b
const SPRITE_FAMICOM const SPRITE_FAMICOM ; 5c
const SPRITE_FRUIT_TREE const SPRITE_FRUIT_TREE ; 5d
const SPRITE_GOLD_TROPHY const SPRITE_GOLD_TROPHY ; 5e
const SPRITE_SILVER_TROPHY const SPRITE_SILVER_TROPHY ; 5f
const SPRITE_KRIS const SPRITE_KRIS ; 60
const SPRITE_KRIS_BIKE const SPRITE_KRIS_BIKE ; 61
const SPRITE_KURT_OUTSIDE const SPRITE_KURT_OUTSIDE ; 62
const SPRITE_SUICUNE const SPRITE_SUICUNE ; 63
const SPRITE_ENTEI const SPRITE_ENTEI ; 64
const SPRITE_RAIKOU const SPRITE_RAIKOU ; 65
const SPRITE_STANDING_YOUNGSTER const SPRITE_STANDING_YOUNGSTER ; 66
const_value SET $80 const_value SET $80
SPRITE_POKEMON EQU const_value SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN const SPRITE_UNOWN
const SPRITE_GEODUDE const SPRITE_GEODUDE
@@ -663,20 +665,20 @@ const_value SET 1
; object struct ; object struct
const_def const_def
const OBJECT_00
const OBJECT_01
const OBJECT_SPRITE const OBJECT_SPRITE
const OBJECT_MAP_OBJECT_INDEX
const OBJECT_SPRITE_TILE
const OBJECT_03 const OBJECT_03
const OBJECT_04 const OBJECT_04
const OBJECT_FLAGS const OBJECT_FLAGS
const OBJECT_PALETTE const OBJECT_PALETTE
const OBJECT_07 const OBJECT_DIRECTION_WALKING
const OBJECT_08 const OBJECT_FACING
const OBJECT_09 const OBJECT_09
const OBJECT_STEP_DURATION const OBJECT_STEP_DURATION
const OBJECT_11 const OBJECT_11
const OBJECT_12 const OBJECT_12
const OBJECT_FACING const OBJECT_FACING_STEP
const OBJECT_STANDING_TILE const OBJECT_STANDING_TILE
const OBJECT_NEXT_TILE const OBJECT_NEXT_TILE
const OBJECT_MAP_X const OBJECT_MAP_X
@@ -697,3 +699,43 @@ const_value SET 1
const OBJECT_31 const OBJECT_31
const OBJECT_32 const OBJECT_32
; 33-39 are not used ; 33-39 are not used
const_def
const MAPOBJECT_VRAM_ID ; 0
const MAPOBJECT_SPRITE ; 1
const MAPOBJECT_Y_COORD ; 2
const MAPOBJECT_X_COORD ; 3
const MAPOBJECT_FACING ; 4
const MAPOBJECT_MOVEMENT ; 5
const MAPOBJECT_HOUR ; 6
const MAPOBJECT_TIMEOFDAY ; 7
const MAPOBJECT_COLOR ; 8
const MAPOBJECT_RANGE ; 9
const MAPOBJECT_POINTER_LO ; a
const MAPOBJECT_POINTER_HI ; b
const MAPOBJECT_FLAG_LO ; c
const MAPOBJECT_FLAG_HI ; d
const MAPOBJECT_E
const MAPOBJECT_F
MAPOBJECT_NOT_VISIBLE EQU -1
MAPOBJECT_SCREEN_HEIGHT EQU 11
MAPOBJECT_SCREEN_WIDTH EQU 12
OBJECT_STRUCT_3_DATA_WIDTH EQU 6
OBJECT_STRUCT_3_DATA_HEIGHT EQU 37
const_def
const EMOTE_SHOCK ; 0
const EMOTE_QUESTION ; 1
const EMOTE_HAPPY ; 2
const EMOTE_SAD ; 3
const EMOTE_HEART ; 4
const EMOTE_BOLT ; 5
const EMOTE_SLEEP ; 6
const EMOTE_FISH ; 7
const EMOTE_ROD_DOWN ; 8
const EMOTE_ROD_UP ; 9
const EMOTE_ROD_LEFT ; a
const EMOTE_ROD_RIGHT ; b

View File

@@ -96,3 +96,4 @@ ALWAYS_USE EQU 1 << ALWAYS_USE_F
SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F
SWITCH_RARELY EQU 1 << SWITCH_RARELY_F SWITCH_RARELY EQU 1 << SWITCH_RARELY_F
SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F
SPRITE_GFX_LIST_CAPACITY EQU $20

View File

@@ -68,3 +68,8 @@ PLAYER_BIKE EQU 1
PLAYER_SLIP EQU 2 PLAYER_SLIP EQU 2
PLAYER_SURF EQU 4 PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8 PLAYER_SURF_PIKA EQU 8
OBJECT_STRUCT_LENGTH EQU 40
NUM_OBJECT_STRUCTS EQU 13
PARTYMON_STRUCT_LENGTH EQU 48

View File

@@ -2,7 +2,7 @@ UnknownScript_0xa0b14:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73 iftrue UnknownScript_0xa0b73
checkcode VAR_HOUR checkcode VAR_HOUR
if_greater_than $11, UnknownScript_0xa0b4b if_greater_than 17, UnknownScript_0xa0b4b
scall UnknownScript_0xa0b32 scall UnknownScript_0xa0b32
jump UnknownScript_0xa0c0e jump UnknownScript_0xa0c0e
@@ -37,7 +37,7 @@ UnknownScript_0xa0b4b:
UnknownScript_0xa0b4f: UnknownScript_0xa0b4f:
checkcode VAR_HOUR checkcode VAR_HOUR
if_greater_than $11, UnknownScript_0xa0b6e if_greater_than 17, UnknownScript_0xa0b6e
checkmorn checkmorn
iftrue UnknownScript_0xa0b64 iftrue UnknownScript_0xa0b64
checkday checkday
@@ -68,27 +68,27 @@ UnknownScript_0xa0b73:
UnknownScript_0xa0b77: UnknownScript_0xa0b77:
checkevent EVENT_BEAT_ELITE_FOUR checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0xa0b82 iftrue UnknownScript_0xa0b82
random $b random 11
jump UnknownScript_0xa0b84 jump UnknownScript_0xa0b84
UnknownScript_0xa0b82: UnknownScript_0xa0b82:
random $e random 14
UnknownScript_0xa0b84: UnknownScript_0xa0b84:
if_equal $0, UnknownScript_0xa0bbc if_equal 0, UnknownScript_0xa0bbc
if_equal $1, UnknownScript_0xa0bc2 if_equal 1, UnknownScript_0xa0bc2
if_equal $2, UnknownScript_0xa0bc8 if_equal 2, UnknownScript_0xa0bc8
if_equal $3, UnknownScript_0xa0bce if_equal 3, UnknownScript_0xa0bce
if_equal $4, UnknownScript_0xa0bd4 if_equal 4, UnknownScript_0xa0bd4
if_equal $5, UnknownScript_0xa0bda if_equal 5, UnknownScript_0xa0bda
if_equal $6, UnknownScript_0xa0be0 if_equal 6, UnknownScript_0xa0be0
if_equal $7, UnknownScript_0xa0be6 if_equal 7, UnknownScript_0xa0be6
if_equal $8, UnknownScript_0xa0bec if_equal 8, UnknownScript_0xa0bec
if_equal $9, UnknownScript_0xa0bf2 if_equal 9, UnknownScript_0xa0bf2
if_equal $a, UnknownScript_0xa0bf8 if_equal 10, UnknownScript_0xa0bf8
if_equal $b, UnknownScript_0xa0bfe if_equal 11, UnknownScript_0xa0bfe
if_equal $c, UnknownScript_0xa0c04 if_equal 12, UnknownScript_0xa0c04
if_equal $d, UnknownScript_0xa0c0a if_equal 13, UnknownScript_0xa0c0a
UnknownScript_0xa0bbc: UnknownScript_0xa0bbc:
writetext UnknownText_0xa0efb writetext UnknownText_0xa0efb
@@ -149,10 +149,10 @@ UnknownScript_0xa0c0d:
end end
UnknownScript_0xa0c0e: UnknownScript_0xa0c0e:
random $3 random 3
if_equal $0, UnknownScript_0xa0c1c if_equal 0, UnknownScript_0xa0c1c
if_equal $1, UnknownScript_0xa0c20 if_equal 1, UnknownScript_0xa0c20
if_equal $2, UnknownScript_0xa0c24 if_equal 2, UnknownScript_0xa0c24
UnknownScript_0xa0c1c: UnknownScript_0xa0c1c:
writetext UnknownText_0xa1c88 writetext UnknownText_0xa1c88

View File

@@ -806,8 +806,7 @@ Function9764: ; 9764
Function976b: ; 976b Function976b: ; 976b
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add_n_times hl, hl, 2
add hl, hl
ld bc, TrainerPalettes ld bc, TrainerPalettes
add hl, bc add hl, bc
ret ret
@@ -1975,9 +1974,7 @@ Functionb1de: ; b1de
push hl push hl
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add_n_times hl, hl, 3
add hl, hl
add hl, hl
ld de, TilesetBGPalette ld de, TilesetBGPalette
add hl, de add hl, de
ld e, l ld e, l
@@ -2017,9 +2014,7 @@ Functionb1de: ; b1de
ld a, [MapGroup] ld a, [MapGroup]
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add_n_times hl, hl, 3
add hl, hl
add hl, hl
ld de, RoofPals ld de, RoofPals
add hl, de add hl, de
ld a, [TimeOfDayPal] ld a, [TimeOfDayPal]

File diff suppressed because it is too large Load Diff

View File

@@ -125,8 +125,8 @@ Function97cc0:: ; 97cc0
jr .asm_97cf4 jr .asm_97cf4
.asm_97ced .asm_97ced
ld a, BANK(UnknownScript_0x135eb) ld a, BANK(BugCatchingContestBattleScript)
ld hl, UnknownScript_0x135eb ld hl, BugCatchingContestBattleScript
jr .asm_97cf4 jr .asm_97cf4
.asm_97cf4 .asm_97cf4

File diff suppressed because it is too large Load Diff

View File

@@ -306,7 +306,7 @@ MapSetupCommands: ; 15440
dbw BANK(Function24cd), Function24cd dbw BANK(Function24cd), Function24cd
dbw BANK(Function28e3), Function28e3 dbw BANK(Function28e3), Function28e3
dbw BANK(Function289d), Function289d dbw BANK(Function289d), Function289d
dbw BANK(Function2879), Function2879 dbw BANK(BufferScreen), BufferScreen
dbw BANK(Function1047cf), Function1047cf dbw BANK(Function1047cf), Function1047cf
dbw BANK(LoadTilesetHeader), LoadTilesetHeader dbw BANK(LoadTilesetHeader), LoadTilesetHeader
dbw BANK(Function104750), Function104750 dbw BANK(Function104750), Function104750

View File

@@ -62,7 +62,7 @@ Function10056: ; 10056 (4:4056)
Function10067: ; 10067 (4:4067) Function10067: ; 10067 (4:4067)
ld hl, MenuDataHeader_0x10a4f ld hl, MenuDataHeader_0x10a4f
call Function1d3c call CopyMenuDataHeader
ld a, [wd0d9] ld a, [wd0d9]
ld [wcf88], a ld [wcf88], a
ld a, [wd0df] ld a, [wd0df]
@@ -90,7 +90,7 @@ Function10094: ; 10094 (4:4094)
Function100a6: ; 100a6 (4:40a6) Function100a6: ; 100a6 (4:40a6)
ld hl, MenuDataHeader_0x10a7f ld hl, MenuDataHeader_0x10a7f
call Function1d3c call CopyMenuDataHeader
ld a, [wd0da] ld a, [wd0da]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e0] ld a, [wd0e0]
@@ -137,7 +137,7 @@ Function100e8: ; 100e8 (4:40e8)
.asm_10110 .asm_10110
push de push de
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1d81 call InterpretMenu2
call Function1c07 call Function1c07
pop hl pop hl
ret c ret c
@@ -220,7 +220,7 @@ Function10186: ; 10186 (4:4186)
Function10198: ; 10198 (4:4198) Function10198: ; 10198 (4:4198)
ld hl, MenuDataHeader_0x10aaf ld hl, MenuDataHeader_0x10aaf
call Function1d3c call CopyMenuDataHeader
ld a, [wd0db] ld a, [wd0db]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e1] ld a, [wd0e1]
@@ -289,7 +289,7 @@ Function101c5: ; 101c5 (4:41c5)
.asm_10235 .asm_10235
push de push de
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1d81 call InterpretMenu2
call Function1c07 call Function1c07
pop hl pop hl
ret c ret c
@@ -709,7 +709,7 @@ Function104e9: ; 104e9 (4:44e9)
Function104fa: ; 104fa (4:44fa) Function104fa: ; 104fa (4:44fa)
ld hl, MenuDataHeader_0x10a4f ld hl, MenuDataHeader_0x10a4f
call Function1d3c call CopyMenuDataHeader
ld a, [wd0d9] ld a, [wd0d9]
ld [wcf88], a ld [wcf88], a
ld a, [wd0df] ld a, [wd0df]
@@ -737,7 +737,7 @@ Function10527: ; 10527 (4:4527)
Function10539: ; 10539 (4:4539) Function10539: ; 10539 (4:4539)
ld hl, MenuDataHeader_0x10a7f ld hl, MenuDataHeader_0x10a7f
call Function1d3c call CopyMenuDataHeader
ld a, [wd0da] ld a, [wd0da]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e0] ld a, [wd0e0]
@@ -788,7 +788,7 @@ Function10594: ; 10594 (4:4594)
Function105a6: ; 105a6 (4:45a6) Function105a6: ; 105a6 (4:45a6)
ld hl, MenuDataHeader_0x10aaf ld hl, MenuDataHeader_0x10aaf
call Function1d3c call CopyMenuDataHeader
ld a, [wd0db] ld a, [wd0db]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e1] ld a, [wd0e1]
@@ -821,7 +821,7 @@ Function105dc: ; 105dc (4:45dc)
.asm_105ed .asm_105ed
push de push de
call LoadMenuDataHeader call LoadMenuDataHeader
call Function1d81 call InterpretMenu2
call Function1c07 call Function1c07
pop hl pop hl
ret c ret c
@@ -992,7 +992,7 @@ Function106d9: ; 106d9 (4:46d9)
xor a xor a
call Function10762 call Function10762
ld hl, MenuDataHeader_0x10a67 ld hl, MenuDataHeader_0x10a67
call Function1d3c call CopyMenuDataHeader
ld a, [wd0d9] ld a, [wd0d9]
ld [wcf88], a ld [wcf88], a
ld a, [wd0df] ld a, [wd0df]
@@ -1008,7 +1008,7 @@ Function106ff: ; 106ff (4:46ff)
ld a, $2 ld a, $2
call Function10762 call Function10762
ld hl, MenuDataHeader_0x10a97 ld hl, MenuDataHeader_0x10a97
call Function1d3c call CopyMenuDataHeader
ld a, [wd0da] ld a, [wd0da]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e0] ld a, [wd0e0]
@@ -1033,7 +1033,7 @@ Function1073b: ; 1073b (4:473b)
ld a, $1 ld a, $1
call Function10762 call Function10762
ld hl, MenuDataHeader_0x10ac7 ld hl, MenuDataHeader_0x10ac7
call Function1d3c call CopyMenuDataHeader
ld a, [wd0db] ld a, [wd0db]
ld [wcf88], a ld [wcf88], a
ld a, [wd0e1] ld a, [wd0e1]
@@ -1223,7 +1223,7 @@ Function1085a: ; 1085a (4:485a)
push hl push hl
call Function10762 call Function10762
pop hl pop hl
call Function1d3c call CopyMenuDataHeader
call Function350c call Function350c
ret ret

View File

@@ -654,7 +654,7 @@ UnknownScript_0xbd3d1:
UnknownScript_0xbd3f6: UnknownScript_0xbd3f6:
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd412 if_equal $0, UnknownScript_0xbd412
checkflag ENGINE_51 checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbd412 iftrue UnknownScript_0xbd412
checkcode VAR_WEEKDAY checkcode VAR_WEEKDAY
if_equal $2, UnknownScript_0xbd416 if_equal $2, UnknownScript_0xbd416
@@ -680,7 +680,7 @@ UnknownScript_0xbd428:
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd44c if_equal $0, UnknownScript_0xbd44c
checkflag ENGINE_51 checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbd44c iftrue UnknownScript_0xbd44c
checkcode VAR_WEEKDAY checkcode VAR_WEEKDAY
if_equal $2, UnknownScript_0xbd480 if_equal $2, UnknownScript_0xbd480
@@ -1381,7 +1381,7 @@ UnknownScript_0xbda35:
iftrue UnknownScript_0xbda67 iftrue UnknownScript_0xbda67
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbda5f if_equal $0, UnknownScript_0xbda5f
checkflag ENGINE_51 checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbda5f iftrue UnknownScript_0xbda5f
checkcode VAR_WEEKDAY checkcode VAR_WEEKDAY
if_equal $2, UnknownScript_0xbda63 if_equal $2, UnknownScript_0xbda63
@@ -1403,7 +1403,7 @@ UnknownScript_0xbda6e:
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbda92 if_equal $0, UnknownScript_0xbda92
checkflag ENGINE_51 checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbda92 iftrue UnknownScript_0xbda92
checkcode VAR_WEEKDAY checkcode VAR_WEEKDAY
if_equal $2, UnknownScript_0xbda9e if_equal $2, UnknownScript_0xbda9e
@@ -3104,27 +3104,27 @@ String_be65b: db "Sister@"
String_be662: db "Brother@" String_be662: db "Brother@"
UnknownScript_0xbe66a:: ; 0xbe66a TalkToTrainerScript:: ; 0xbe66a
faceplayer faceplayer
trainerstatus $2 trainerstatus $2
iftrue UnknownScript_0xbe698 iftrue AlreadyBeatenTrainerScript
loadtrainerdata loadtrainerdata
playrammusic playrammusic
jump UnknownScript_0xbe68a jump StartBattleWithMapTrainerScript
; 0xbe675 ; 0xbe675
UnknownScript_0xbe675:: ; 0xbe675 SeenByTrainerScript:: ; 0xbe675
loadtrainerdata loadtrainerdata
playrammusic playrammusic
showemote $0, $fe, 30 showemote EMOTE_SHOCK, $fe, 30
callasm Function831e callasm Function831e
applymovement2 MovementBuffer applymovement2 MovementBuffer
writepersonxy $fe writepersonxy $fe
faceperson $0, $fe faceperson $0, $fe
jump UnknownScript_0xbe68a jump StartBattleWithMapTrainerScript
; 0xbe68a ; 0xbe68a
UnknownScript_0xbe68a: ; 0xbe68a StartBattleWithMapTrainerScript: ; 0xbe68a
loadfont loadfont
trainertext $0 trainertext $0
closetext closetext
@@ -3135,6 +3135,6 @@ UnknownScript_0xbe68a: ; 0xbe68a
trainerstatus $1 trainerstatus $1
loadvar wd04d, $ff loadvar wd04d, $ff
UnknownScript_0xbe698: AlreadyBeatenTrainerScript:
scripttalkafter scripttalkafter
; 0xbe699 ; 0xbe699

File diff suppressed because it is too large Load Diff

View File

@@ -41,22 +41,22 @@ ENDM
spawn BLACKTHORN, BLACKTHORN_CITY, 21, 30 spawn BLACKTHORN, BLACKTHORN_CITY, 21, 30
spawn MT_SILVER, SILVER_CAVE_OUTSIDE, 23, 20 spawn MT_SILVER, SILVER_CAVE_OUTSIDE, 23, 20
spawn FAST_SHIP, FAST_SHIP_CABINS_SW_SSW_NW, 6, 2 spawn FAST_SHIP, FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
const_value = -1
spawn N_A, N_A, -1, -1
db -1, -1, -1, -1 NUM_SPAWNS EQU const_value
const NUM_SPAWNS
LoadSpawnPoint: ; 1531f LoadSpawnPoint: ; 1531f
; loads the spawn point in wd001
push hl push hl
push de push de
ld a, [wd001] ld a, [wd001]
cp -1 cp SPAWN_N_A
jr z, .asm_15341 jr z, .spawn_n_a
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add_n_times hl, hl, 2 ; multiply hl by 4
add hl, hl
ld de, SpawnPoints ld de, SpawnPoints
add hl, de add hl, de
ld a, [hli] ld a, [hli]
@@ -67,7 +67,7 @@ LoadSpawnPoint: ; 1531f
ld [XCoord], a ld [XCoord], a
ld a, [hli] ld a, [hli]
ld [YCoord], a ld [YCoord], a
.asm_15341 .spawn_n_a
pop de pop de
pop hl pop hl
ret ret
@@ -75,32 +75,33 @@ LoadSpawnPoint: ; 1531f
IsSpawnPoint: ; 15344 IsSpawnPoint: ; 15344
; Checks if the map loaded in de is a spawn point. Returns carry if it's a spawn point.
ld hl, SpawnPoints ld hl, SpawnPoints
ld c, 0 ld c, 0
.asm_15349 .loop
ld a, [hl] ld a, [hl]
cp -1 cp SPAWN_N_A
jr z, .asm_1535f jr z, .nope
cp d cp d
jr nz, .asm_15356 jr nz, .next
inc hl inc hl
ld a, [hld] ld a, [hld]
cp e cp e
jr z, .asm_15361 jr z, .yes
.asm_15356 .next
push bc push bc
ld bc, 4 ld bc, 4
add hl, bc add hl, bc
pop bc pop bc
inc c inc c
jr .asm_15349 jr .loop
.asm_1535f .nope
and a and a
ret ret
.asm_15361 .yes
scf scf
ret ret
; 15363 ; 15363

View File

@@ -36,10 +36,10 @@ SpecialsPointers:: ; c029
add_special Functionc2f6 add_special Functionc2f6
add_special Functionc309 add_special Functionc309
add_special Function1050b9 add_special Function1050b9
add_special Functionc34a add_special BugContestJudging
add_special Function4d9e5 add_special CheckPartyFullAfterContest
add_special Function13a12 add_special Function13a12
add_special Function13a31 add_special ContestReturnMons
add_special Function135db add_special Function135db
add_special Functionfbb32 add_special Functionfbb32
add_special Functionfbcd2 add_special Functionfbcd2
@@ -71,7 +71,7 @@ SpecialsPointers:: ; c029
add_special WhiteBGMap add_special WhiteBGMap
add_special UpdateTimePals add_special UpdateTimePals
add_special ClearTileMap add_special ClearTileMap
add_special Function1ad2 add_special DrawOnMap
add_special Functione4a add_special Functione4a
add_special Functionc230 add_special Functionc230
add_special SpecialSeenMon add_special SpecialSeenMon
@@ -105,7 +105,7 @@ SpecialsPointers:: ; c029
add_special Function88018 add_special Function88018
add_special SpecialNameRater add_special SpecialNameRater
add_special Functionc2da add_special Functionc2da
add_special Function718d add_special GetFirstPokemonHappiness
add_special Function71ac add_special Function71ac
add_special Function2a4ab add_special Function2a4ab
add_special Function2a51f add_special Function2a51f
@@ -173,7 +173,7 @@ SpecialsPointers:: ; c029
add_special Function10366e add_special Function10366e
add_special Function1037eb add_special Function1037eb
add_special Function10383c add_special Function10383c
add_special Function1060a2 add_special Mobile_HealParty
add_special Function14168 add_special Function14168
add_special Function1037c2 add_special Function1037c2
add_special Function10630f add_special Function10630f
@@ -358,8 +358,8 @@ UnknownText_0xc345: ; 0xc345
db "@" db "@"
; 0xc34a ; 0xc34a
Functionc34a: ; c34a BugContestJudging: ; c34a
callba Function1369d callba _BugContestJudging
ld a, b ld a, b
ld [ScriptVar], a ld [ScriptVar], a
ret ret
@@ -463,7 +463,7 @@ UnknownText_0xc3d6: ; 0xc3d6
Functionc3db: ; c3db Functionc3db: ; c3db
call WhiteBGMap call WhiteBGMap
call Function2879 call BufferScreen
ret ret
; c3e2 ; c3e2
@@ -492,17 +492,18 @@ Functionc3fc: ; c3fc
; c403 ; c403
Functionc403:: ; c403 LoadWildData:: ; c403
ld a, c ld a, c
and a and a
jr nz, .asm_c410 jr nz, .swarm_route35
; swarm dark cave violet entrance
ld a, d ld a, d
ld [wdfcc], a ld [wdfcc], a
ld a, e ld a, e
ld [wdfcd], a ld [wdfcd], a
ret ret
.asm_c410 .swarm_route35
ld a, d ld a, d
ld [wdc5a], a ld [wdc5a], a
ld a, e ld a, e

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