diff options
-rw-r--r-- | .gitattributes | 15 | ||||
-rwxr-xr-x | constants/type_constants.asm | 4 | ||||
-rw-r--r-- | engine/bank3f/main.asm | 25 | ||||
-rw-r--r-- | home.asm | 1 | ||||
-rw-r--r-- | home/overworld.asm | 13 | ||||
-rwxr-xr-x | main.asm | 58 | ||||
-rwxr-xr-x | wram.asm | 10 |
7 files changed, 59 insertions, 67 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..925ed5fb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +# Auto detect text files and perform LF normalization +* text eol=lf + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.asm text + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.2bpp binary +*.1bpp binary +*.rle binary +*.tilecoll binary +*.bst binary +*.map binary
\ No newline at end of file diff --git a/constants/type_constants.asm b/constants/type_constants.asm index b36dc179..095a3d28 100755 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -13,4 +13,8 @@ GRASS EQU $16 ELECTRIC EQU $17 PSYCHIC EQU $18 ICE EQU $19 +<<<<<<< HEAD DRAGON EQU $1A +======= +DRAGON EQU $1A +>>>>>>> d48ea223eaad84af95e4f29043c279b56aa4ae88 diff --git a/engine/bank3f/main.asm b/engine/bank3f/main.asm index 38aa9878..b02829eb 100644 --- a/engine/bank3f/main.asm +++ b/engine/bank3f/main.asm @@ -207,9 +207,32 @@ Func_fc5fa:: ; fc5fa (3f:45fa) jr z,.asm_fc645 jr .asm_fc641 .asm_fc635 + ld a,$3 + jr .asm_fc647 +.asm_fc639 + ld a,$4 + jr .asm_fc647 +.asm_fc63d + ld a,$6 + jr .asm_fc647 +.asm_fc641 + ld a,$1 + jr .asm_fc647 +.asm_fc645 + ld a,$3 +.asm_fc647 + ld [wd431],a + ret + +Pointer_fc64b:: ; fc64b (3f:464b) + db $c2,$4c,$4f,$ba,$be,$b8,$54,$ff -Func_fc65b:: ; fc65b (3f:465b) +Pointer_fc653:: ; fc653 (3f:4653) + db $2f,$e6,$3e,$5e,$80,$31,$a4,$ff +Func_fc65b:: ; fc65b (3f:465b) + ld a,[W_CURMAP] + Func_fc69a:: ; fc69a (3f:469a) Func_fcc08:: ; fcc08 (3f:4c08) @@ -165,7 +165,6 @@ Joypad:: ; 01b9 ReadJoypad:: ; 01c8 (0:01c8) homecall_jump ReadJoypad_ -;INCLUDE "data/map_header_pointers.asm" INCLUDE "home/overworld.asm" diff --git a/home/overworld.asm b/home/overworld.asm index a0d52843..1530f8b3 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -287,16 +287,11 @@ OverworldLoopLessDelay:: ; 0245 (0:0245) callab AnyPartyAlive ld a,d and a - jr z,.allPokemonFainted + jr z,AllPokemonFainted .noFaintCheck ld c,$0a call DelayFrames jp EnterMap -.allPokemonFainted -; ld a,$ff -; ld [W_ISINBATTLE],a -; call RunMapScript -; jp HandleBlackOut StepCountCheck:: ; 0457 (0:0457) ld a,[wd730] @@ -316,6 +311,12 @@ StepCountCheck:: ; 0457 (0:0457) .doneStepCounting ret +AllPokemonFainted:: ; 0475 (0:0475) + ld a,$ff + ld [W_ISINBATTLE],a + call RunMapScript + jp HandleBlackOut + ; function to determine if there will be a battle and execute it (either a trainer battle or wild battle) ; sets carry if a battle occurred and unsets carry if not NewBattle:: ; 0480 (0:0480) @@ -19,57 +19,9 @@ SECTION "bank1",ROMX,BANK[$1] INCLUDE "data/facing.asm" -;ResetStatusAndHalveMoneyOnBlackout:: -; Reset player status on blackout. - xor a - ld [wBattleResult], a - ld [wWalkBikeSurfState], a - ld [W_ISINBATTLE], a - ld [wMapPalOffset], a - ld [wNPCMovementScriptFunctionNum], a - ld [hJoyHeld], a - ld [wNPCMovementScriptPointerTableNum], a - ld [wFlags_0xcd60], a - - ld [$ff9f], a - ld [$ff9f + 1], a - ld [$ff9f + 2], a - call HasEnoughMoney - jr c, .lostmoney ; never happens - - ; Halve the player's money. - ld a, [wPlayerMoney] - ld [$ff9f], a - ld a, [wPlayerMoney + 1] - ld [$ff9f + 1], a - ld a, [wPlayerMoney + 2] - ld [$ff9f + 2], a - xor a - ld [$ffa2], a - ld [$ffa3], a - ld a, 2 - ld [$ffa4], a - predef DivideBCDPredef3 - ld a, [$ffa2] - ld [wPlayerMoney], a - ld a, [$ffa2 + 1] - ld [wPlayerMoney + 1], a - ld a, [$ffa2 + 2] - ld [wPlayerMoney + 2], a - -.lostmoney - ld hl, wd732 - set 2, [hl] - res 3, [hl] - set 6, [hl] - ld a, %11111111 - ld [wJoyIgnore], a - predef_jump HealParty - - -MewPicFront:: INCBIN "pic/bmon/mew.pic" -MewPicBack:: INCBIN "pic/monback/mewb.pic" -INCLUDE "data/baseStats/mew.asm" +;MewPicFront:: INCBIN "pic/bmon/mew.pic" +;MewPicBack:: INCBIN "pic/monback/mewb.pic" +;INCLUDE "data/baseStats/mew.asm" INCLUDE "engine/battle/safari_zone.asm" @@ -4858,8 +4810,6 @@ INCLUDE "data/mapHeaders/fuchsiacity.asm" INCLUDE "data/mapObjects/fuchsiacity.asm" FuchsiaCityBlocks: INCBIN "maps/fuchsiacity.blk" -INCLUDE "home/play_time.asm" - INCLUDE "scripts/pallettown.asm" INCLUDE "scripts/viridiancity.asm" INCLUDE "scripts/pewtercity.asm" @@ -6681,4 +6631,4 @@ SECTION "bank3e",ROMX,BANK[$3E] SECTION "bank3f",ROMX,BANK[$3F] -INCLUDE "engine/bank3f/main.asm"
\ No newline at end of file +INCLUDE "engine/bank3f/main.asm" @@ -236,7 +236,6 @@ wLastMenuItem:: ; cc2a ; id of previously selected menu item ds 1 -; group these 3 addresses together because of an ld a,[hli] wcc2b:: ds 1 ; used in party menu wcc2c:: ds 1 ; used in item related menus (inventory, pc) wcc2d:: ds 1 ; also used in inventory, supposed to save an item id @@ -273,7 +272,6 @@ wTradeCenterPointerTableIndex:: ; cc38 ds 1 -; group these two together wcc3a:: ds 1 ; both used in home/text.asm wcc3b:: ds 1 @@ -291,7 +289,7 @@ wLinkMenuSelectionReceiveBuffer:: ; cc3d ; two byte buffer ; the received menu selection is stored twice -wcc3d:: ds 1 ; not used for anything other than mentioned above (haha link function) +wcc3d:: ds 1 ; not used for anything other than mentioned above wSerialExchangeNybbleReceiveData:: ; cc3e ; the final received nybble is stored here by Serial_ExchangeNybble @@ -630,6 +628,7 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f wHiddenObjectIndex:: ; cd3f wTrainerFacingDirection:: ; cd3f + wcd3f:: ; used with daycare text for money amount ds 1 @@ -745,6 +744,7 @@ wAnimSoundID:: ; cf07 wcf08:: ds 1 ; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank) wcf09:: ds 1 ; used as a temp storage value for the bank to switch to wcf0a:: ds 1 ; used as flags for Poke Mart + wBattleResult:: ; cf0b ; $00 - win ; $01 - lose @@ -953,6 +953,7 @@ W_TRAINERCLASS:: ; d031 wTrainerPicPointer:: ; wd033 ds 2 ds 1 + wd036:: ds 16 ; used as a temporary buffer to print "XXX learned YYY" wd046:: ds 1 ; used with trainer pointer stuff (not exactly sure, but the label is incremented and loaded with a value, so wd047 is accessed) wd047:: ds 1 ; used with unloading trainer data? @@ -1428,7 +1429,6 @@ wd153:: ds 3 ; written to during pokedex flag action but doesn't seem to be read wd156:: ds 1 ; evolution stone ID used wd157:: ds 1 ; used with oak's lab script (related to npc movement directions), possibly indirectly accessed with values below - wPlayerName:: ; d158 ds 11 @@ -2093,7 +2093,7 @@ wCardKeyDoorX:: ; d740 wd743:: ds 1 ; used with surge gym trash cans wd744:: ds 3 ; also used with surge gym trash cans -wd747:: ds 3 ; and we're getting to flags, which I'm not going to bother commenting +wd747:: ds 3 ; below here are mostly in game flags wd74a:: ds 1 wd74b:: ; d74b |