diff options
-rw-r--r-- | constants.asm | 69 | ||||
-rw-r--r-- | constants/battle_anim_constants.asm (renamed from constants/animation_constants.asm) | 0 | ||||
-rwxr-xr-x | constants/battle_tower_constants.asm | 39 | ||||
-rw-r--r--[-rwxr-xr-x] | constants/mobile_constants.asm (renamed from constants/sram_constants.asm) | 2 | ||||
-rw-r--r-- | constants/pokemon_data_constants.asm | 52 | ||||
-rw-r--r--[-rwxr-xr-x] | constants/scgb_constants.asm (renamed from constants/cgb_constants.asm) | 0 | ||||
-rw-r--r-- | constants/tileset_constants.asm (renamed from constants/tilemap_constants.asm) | 18 | ||||
-rw-r--r-- | engine/events/sweet_scent.asm | 66 | ||||
-rw-r--r-- | engine/pokemon/mon_menu.asm | 1 | ||||
-rw-r--r-- | home/battle.asm | 2 | ||||
-rw-r--r-- | home/movement.asm | 6 | ||||
-rwxr-xr-x | items/item_effects.asm | 48 | ||||
-rw-r--r-- | main.asm | 1 | ||||
-rw-r--r-- | wram.asm | 70 |
14 files changed, 106 insertions, 268 deletions
diff --git a/constants.asm b/constants.asm index 0dd77e29..fe23415c 100644 --- a/constants.asm +++ b/constants.asm @@ -3,47 +3,50 @@ INCLUDE "charmap.asm" INCLUDE "macros.asm" INCLUDE "constants/hardware_constants.asm" +INCLUDE "constants/deco_constants.asm" INCLUDE "constants/wram_constants.asm" -INCLUDE "constants/sram_constants.asm" -INCLUDE "constants/pokemon_constants.asm" -INCLUDE "constants/type_constants.asm" -INCLUDE "constants/move_constants.asm" +INCLUDE "constants/misc_constants.asm" +INCLUDE "constants/input_constants.asm" +INCLUDE "constants/gfx_constants.asm" +INCLUDE "constants/text_constants.asm" +INCLUDE "constants/audio_constants.asm" +INCLUDE "constants/battle_anim_constants.asm" INCLUDE "constants/battle_constants.asm" INCLUDE "constants/collision_constants.asm" -INCLUDE "constants/map_constants.asm" -INCLUDE "constants/map_setup_constants.asm" -INCLUDE "constants/landmark_constants.asm" +;INCLUDE "constants/credits_constants.asm" +INCLUDE "constants/cry_constants.asm" +INCLUDE "constants/engine_flags.asm" +INCLUDE "constants/event_flags.asm" +INCLUDE "constants/icon_constants.asm" INCLUDE "constants/item_constants.asm" INCLUDE "constants/item_data_constants.asm" -INCLUDE "constants/trainer_constants.asm" -INCLUDE "constants/trainer_data_constants.asm" -INCLUDE "constants/script_constants.asm" -INCLUDE "constants/event_flags.asm" -INCLUDE "constants/engine_flags.asm" +INCLUDE "constants/landmark_constants.asm" +INCLUDE "constants/map_constants.asm" +INCLUDE "constants/map_data_constants.asm" +INCLUDE "constants/map_object_constants.asm" +INCLUDE "constants/map_setup_constants.asm" +INCLUDE "constants/mart_constants.asm" +INCLUDE "constants/menu_constants.asm" +INCLUDE "constants/mobile_constants.asm" +INCLUDE "constants/move_constants.asm" +;INCLUDE "constants/move_effect_constants.asm" INCLUDE "constants/music_constants.asm" -INCLUDE "constants/sfx_constants.asm" -INCLUDE "constants/animation_constants.asm" +INCLUDE "constants/npc_trade_constants.asm" INCLUDE "constants/phone_constants.asm" -INCLUDE "constants/gfx_constants.asm" -INCLUDE "constants/map_object_constants.asm" -INCLUDE "constants/text_constants.asm" +INCLUDE "constants/pokemon_constants.asm" INCLUDE "constants/pokemon_data_constants.asm" -INCLUDE "constants/misc_constants.asm" -INCLUDE "constants/std_constants.asm" -INCLUDE "constants/deco_constants.asm" +INCLUDE "constants/printer_constants.asm" INCLUDE "constants/radio_constants.asm" +INCLUDE "constants/scgb_constants.asm" +INCLUDE "constants/scene_constants.asm" +INCLUDE "constants/script_constants.asm" +INCLUDE "constants/serial_constants.asm" +INCLUDE "constants/sfx_constants.asm" +;INCLUDE "constants/sprite_anim_constants.asm" INCLUDE "constants/sprite_constants.asm" -INCLUDE "constants/tilemap_constants.asm" -INCLUDE "constants/cgb_constants.asm" -INCLUDE "constants/battle_tower_constants.asm" -INCLUDE "constants/cry_constants.asm" -INCLUDE "constants/audio_constants.asm" -INCLUDE "constants/printer_constants.asm" -INCLUDE "constants/map_data_constants.asm" -INCLUDE "constants/input_constants.asm" INCLUDE "constants/sprite_data_constants.asm" -INCLUDE "constants/serial_constants.asm" -INCLUDE "constants/mart_constants.asm" -INCLUDE "constants/menu_constants.asm" -INCLUDE "constants/scene_constants.asm" -INCLUDE "constants/npc_trade_constants.asm"
\ No newline at end of file +INCLUDE "constants/std_constants.asm" +INCLUDE "constants/tileset_constants.asm" +INCLUDE "constants/trainer_constants.asm" +INCLUDE "constants/trainer_data_constants.asm" +INCLUDE "constants/type_constants.asm" diff --git a/constants/animation_constants.asm b/constants/battle_anim_constants.asm index 2fbbf595..2fbbf595 100644 --- a/constants/animation_constants.asm +++ b/constants/battle_anim_constants.asm diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm deleted file mode 100755 index c690c9b0..00000000 --- a/constants/battle_tower_constants.asm +++ /dev/null @@ -1,39 +0,0 @@ - const_def - const BATTLETOWERACTION_00 - const BATTLETOWERACTION_01 - const BATTLETOWERACTION_02 - const BATTLETOWERACTION_SAVE_AND_QUIT - const BATTLETOWERACTION_CHALLENGECANCELED - const BATTLETOWERACTION_05 - const BATTLETOWERACTION_06 ; reset stuff in SRAM bank 5 - const BATTLETOWERACTION_SAVELEVELGROUP - const BATTLETOWERACTION_LOADLEVELGROUP - const BATTLETOWERACTION_CHECKSAVEFILEISYOURS - const BATTLETOWERACTION_0A - const BATTLETOWERACTION_CHECKMOBILEEVENT - const BATTLETOWERACTION_0C ; more time stuff in SRAM bank 5 - const BATTLETOWERACTION_0D ; more time stuff in SRAM bank 5 - const BATTLETOWERACTION_EGGTICKET ; egg ticket - const BATTLETOWERACTION_0F ; check w3_d090 - const BATTLETOWERACTION_10 ; dw based on 5:a800 - const BATTLETOWERACTION_11 ; store 0 in 5:aa8d - const BATTLETOWERACTION_12 ; store 1 in 5:aa8d - const BATTLETOWERACTION_13 ; check 5:aa8d - const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [s1_be4f] - const BATTLETOWERACTION_15 ; set 0, [s1_be4f] - const BATTLETOWERACTION_16 ; update time in SRAM bank 5 - const BATTLETOWERACTION_17 ; check time in SRAM bank 5 - const BATTLETOWERACTION_18 ; level check - const BATTLETOWERACTION_19 ; ubers check - const BATTLETOWERACTION_RESETDATA ; clear data - const BATTLETOWERACTION_GIVEREWARD ; give reward - const BATTLETOWERACTION_1C ; set won challenge - const BATTLETOWERACTION_1D ; set received reward - const BATTLETOWERACTION_CHOOSEREWARD ; save options - const BATTLETOWERACTION_SAVEOPTIONS - -BATTLETOWER_NO_CHALLENGE EQU 0 -BATTLETOWER_SAVED_AND_LEFT EQU 1 -BATTLETOWER_CHALLENGE_IN_PROGESS EQU 2 -BATTLETOWER_WON_CHALLENGE EQU 3 -BATTLETOWER_RECEIVED_REWARD EQU 4 diff --git a/constants/sram_constants.asm b/constants/mobile_constants.asm index caac8347..fc8b05a6 100755..100644 --- a/constants/sram_constants.asm +++ b/constants/mobile_constants.asm @@ -1,3 +1,3 @@ ; Mobile bank 5 sMobileLoginPassword EQU $aa4b -LOGIN_PASSWORD_LENGTH EQU 17 +MOBILE_LOGIN_PASSWORD_LENGTH EQU 17 diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index d29b4121..caacc8d1 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -62,58 +62,6 @@ GENDER_UNKNOWN EQU -1 const EGG_DRAGON ; e const EGG_NONE ; f (Undiscovered) -; IconPointers indexes (see data/icon_pointers.asm) - const_def - const ICON_NULL - const ICON_POLIWAG - const ICON_JIGGLYPUFF - const ICON_DIGLETT - const ICON_PIKACHU - const ICON_STARYU - const ICON_FISH - const ICON_BIRD - const ICON_MONSTER - const ICON_CLEFAIRY - const ICON_ODDISH - const ICON_BUG - const ICON_GHOST - const ICON_LAPRAS - const ICON_HUMANSHAPE - const ICON_FOX - const ICON_EQUINE - const ICON_SHELL - const ICON_BLOB - const ICON_SERPENT - const ICON_VOLTORB - const ICON_SQUIRTLE - const ICON_BULBASAUR - const ICON_CHARMANDER - const ICON_CATERPILLAR - const ICON_UNOWN - const ICON_GEODUDE - const ICON_FIGHTER - const ICON_EGG - const ICON_JELLYFISH - const ICON_MOTH - const ICON_BAT - const ICON_SNORLAX - const ICON_HO_OH - const ICON_LUGIA - const ICON_GYARADOS - const ICON_SLOWPOKE - const ICON_SUDOWOODO - const ICON_BIGMON - -; LoadMenuMonIcon.Jumptable indexes (see engine/gfx/mon_icons.asm) - const_def - const MONICON_PARTYMENU - const MONICON_NAMINGSCREEN - const MONICON_MOVES - const MONICON_TRADE - const MONICON_MOBILE1 - const MONICON_MOBILE2 - const MONICON_UNUSED - ; maximum number of party pokemon PARTY_LENGTH EQU 6 diff --git a/constants/cgb_constants.asm b/constants/scgb_constants.asm index 36cf369c..36cf369c 100755..100644 --- a/constants/cgb_constants.asm +++ b/constants/scgb_constants.asm diff --git a/constants/tilemap_constants.asm b/constants/tileset_constants.asm index 0ead1444..3d68dba4 100644 --- a/constants/tilemap_constants.asm +++ b/constants/tileset_constants.asm @@ -29,12 +29,14 @@ const_value SET 1 const TILESET_DARK_CAVE ; 1b const TILESET_FOREST ; 1c +; bg palette values (see gfx/tilesets/*_palette_map.asm) +; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal) const_def - const PAL_BG_GRAY - const PAL_BG_RED - const PAL_BG_GREEN - const PAL_BG_WATER - const PAL_BG_YELLOW - const PAL_BG_BROWN - const PAL_BG_ROOF - const PAL_BG_TEXT + const PAL_BG_GRAY ; 0 + const PAL_BG_RED ; 1 + const PAL_BG_GREEN ; 2 + const PAL_BG_WATER ; 3 + const PAL_BG_YELLOW ; 4 + const PAL_BG_BROWN ; 5 + const PAL_BG_ROOF ; 6 + const PAL_BG_TEXT ; 7 diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm deleted file mode 100644 index d382936d..00000000 --- a/engine/events/sweet_scent.asm +++ /dev/null @@ -1,66 +0,0 @@ -SweetScentFromMenu: - ld hl, .SweetScent - call QueueScript - ld a, $1 - ld [wFieldMoveSucceeded], a - ret - -.SweetScent: - reloadmappart - special UpdateTimePals - callasm GetPartyNick - writetext UseSweetScentText - waitbutton - callasm SweetScentEncounter - iffalse SweetScentNothing - checkflag ENGINE_BUG_CONTEST_TIMER - iftrue .BugCatchingContest - randomwildmon - startbattle - reloadmapafterbattle - end - -.BugCatchingContest: - farjump BugCatchingContestBattleScript - -SweetScentNothing: - writetext SweetScentNothingText - waitbutton - closetext - end - -SweetScentEncounter: - farcall CanUseSweetScent - jr nc, .no_battle - ld hl, wStatusFlags2 - bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] - jr nz, .not_in_bug_contest - farcall GetMapEncounterRate - ld a, b - and a - jr z, .no_battle - farcall ChooseWildEncounter - jr nz, .no_battle - jr .start_battle - -.not_in_bug_contest - farcall ChooseWildEncounter_BugContest - -.start_battle - ld a, $1 - ld [wScriptVar], a - ret - -.no_battle - xor a - ld [wScriptVar], a - ld [wBattleType], a - ret - -UseSweetScentText: - text_far _UseSweetScentText - text_end - -SweetScentNothingText: - text_far _SweetScentNothingText - text_end diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm index d40940be..71b86a8a 100644 --- a/engine/pokemon/mon_menu.asm +++ b/engine/pokemon/mon_menu.asm @@ -613,7 +613,6 @@ MonMenu_Fly: jr z, .Fail cp $0 jr z, .Error - ;farcall StubbedTrainerRankings_Fly ld b, $4 ld a, $2 ret diff --git a/home/battle.asm b/home/battle.asm index 9d63a5fe..89ca9459 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -169,7 +169,7 @@ FarCopyRadioText:: ld l, a ld a, d ld h, a - ld de, wcef7 + ld de, wRadioText ld bc, 2 * SCREEN_WIDTH call CopyBytes pop af diff --git a/home/movement.asm b/home/movement.asm index 025fdeb6..f329a3c3 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -3,11 +3,11 @@ InitMovementBuffer:: xor a ld [wMovementBufferCount], a ld a, $0 ; useless - ld [wceef], a + ld [wUnusedMovementBufferBank], a ld a, LOW(wMovementBuffer) - ld [wcef0], a + ld [wUnusedMovementBufferPointer], a ld a, HIGH(wMovementBuffer) - ld [wcef1], a + ld [wUnusedMovementBufferPointer + 1], a ret DecrementMovementBufferCount:: diff --git a/items/item_effects.asm b/items/item_effects.asm index 5cb96ba5..ce3ab464 100755 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -2037,19 +2037,24 @@ XSpeed: ; f515 PokeFlute: ; f55c (3:755c) ld a, [wBattleMode] and a - jr nz, .asm_f562 -.asm_f562 + jr nz, .dummy +.dummy + xor a ld [wceed], a + ld b, $ff ^ SLP - ld hl, wPartyMon1End - call Functionf5a4 + + ld hl, wPartyMon1Status + call .CureSleep + ld a, [wBattleMode] cp $1 - jr z, .asm_f57b - ld hl, wOTPartyMon1End - call Functionf5a4 -.asm_f57b + jr z, .skip_otrainer + ld hl, wOTPartyMon1Status + call .CureSleep +.skip_otrainer + ld hl, wBattleMonStatus ld a, [hl] and b @@ -2058,36 +2063,39 @@ PokeFlute: ; f55c (3:755c) ld a, [hl] and b ld [hl], a - ld a, [wMovementBufferCount] + + ld a, [wceed] and a ld hl, Text_NowThatsACatchyTune ; $75bc jp z, PrintText ld hl, Text_PlayedThePokeFlute ; $75c6 call PrintText + ld a, [wLowHealthAlarm] and $80 - jr nz, .asm_f59e -.asm_f59e + jr nz, .dummy2 +.dummy2 ld hl, Text_AllSleepingMonWokeUp ; $75c1 jp PrintText -Functionf5a4: ; f5a4 (3:75a4) - ld de, $30 - ld c, $6 -.asm_f5a9 +.CureSleep: ; f5a4 (3:75a4) + ld de, PARTYMON_STRUCT_LENGTH + ld c, PARTY_LENGTH + +.loop ld a, [hl] push af - and $7 - jr z, .asm_f5b4 - ld a, $1 + and SLP + jr z, .not_asleep + ld a, 1 ld [wceed], a -.asm_f5b4 +.not_asleep pop af and b ld [hl], a add hl, de dec c - jr nz, .asm_f5a9 + jr nz, .loop ret Text_NowThatsACatchyTune: @@ -1016,7 +1016,6 @@ PrintPartyMenuActionText: LoadFishingGFX: dr $5054f, $506f2 -; INCLUDE "engine/events/sweet_scent.asm" SweetScentFromMenu: dr $506f2, $50763 @@ -2285,6 +2285,17 @@ wBugContestWinnersEnd:: wBugContestWinnerName:: ds NAME_LENGTH NEXTU ; ceed +; radio data +wCurRadioLine:: db +wNextRadioLine:: db +wRadioTextDelay:: db +wNumRadioLinesPrinted:: db +wOaksPKMNTalkSegmentCounter:: db + ds 5 +wRadioText:: ds 2 * SCREEN_WIDTH +wRadioTextEnd:: + +NEXTU ; ceed ; movement buffer data wMovementBufferCount:: db wMovementBufferObject:: db @@ -2294,49 +2305,29 @@ wMovementBuffer:: ds 55 NEXTU ; ceed ; unidentified -wceed:: ds 1 ; ceed -wceee:: ds 1 ; ceee -wceef:: ds 1 ; ceef -wcef0:: ds 1 ; cef0 -wcef1:: ds 1 ; cef1 -wcef2:: ds 1 ; cef2 -wcef3:: ds 1 ; cef3 -wcef4:: ds 1 ; cef4 -wcef5:: ds 1 ; cef5 -wcef6:: ds 1 ; cef6 +wceed:: db ; ceed +wceee:: db ; ceee +wceef:: db ; ceef + +; mobile? + ds 1 +wcef1:: ds 2 ; cef1 +wcef3:: ds 2 ; cef3 + ds 2 wcef7:: ds 1 ; cef7 wcef8:: ds 1 ; cef8 -wcef9:: ds 1 ; cef9 + ds 1 wcefa:: ds 1 ; cefa wcefb:: ds 1 ; cefb wcefc:: ds 1 ; cefc wcefd:: ds 1 ; cefd wcefe:: ds 1 ; cefe -wceff:: ds 1 ; ceff -wcf00:: ds 1 ; cf00 -wcf01:: ds 1 ; cf01 +wceff:: ds 2 ; ceff + ds 1 wcf02:: ds 1 ; cf02 wcf03:: ds 1 ; cf03 wcf04:: ds 1 ; cf04 -wcf05:: ds 1 ; cf05 -wcf06:: ds 1 ; cf06 -wcf07:: ds 1 ; cf07 -wcf08:: ds 1 ; cf08 -wcf09:: ds 1 ; cf09 -wcf0a:: ds 1 ; cf0a -wcf0b:: ds 1 ; cf0b -wcf0c:: ds 1 ; cf0c -wcf0d:: ds 1 ; cf0d -wcf0e:: ds 1 ; cf0e -wcf0f:: ds 1 ; cf0f -wcf10:: ds 1 ; cf10 -wcf11:: ds 1 ; cf11 -wcf12:: ds 1 ; cf12 -wcf13:: ds 1 ; cf13 -wcf14:: ds 1 ; cf14 -wcf15:: ds 1 ; cf15 -wcf16:: ds 1 ; cf16 -wcf17:: ds 1 ; cf17 + ds 19 wcf18:: ds 1 ; cf18 wcf19:: ds 1 ; cf19 wcf1a:: ds 1 ; cf1a @@ -2344,16 +2335,9 @@ wcf1b:: ds 1 ; cf1b wcf1c:: ds 1 ; cf1c wcf1d:: ds 1 ; cf1d wcf1e:: ds 1 ; cf1e -wcf1f:: ds 1 ; cf1f -wcf20:: ds 1 ; cf20 -wcf21:: ds 1 ; cf21 -wcf22:: ds 1 ; cf22 -wcf23:: ds 1 ; cf23 -wcf24:: ds 1 ; cf24 -wcf25:: ds 1 ; cf25 -wcf26:: ds 1 ; cf26 -wcf27:: ds 1 ; cf27 -wcf28:: ds 1 ; cf28 +wcf1f:: ds 2 ; cf1f +wcf21:: ds 2 ; cf21 + ds 6 UNION ; cf29 ; trainer data |