From 010b450834bd595b961582aea5e5771632510ef9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Nov 2015 18:13:31 -0500 Subject: [PATCH] Prepare to merge --- constants/misc_constants.asm | 3 ++ data/odd_eggs.asm | 28 +++++++----- engine/color.asm | 24 ++++++---- engine/scripting.asm | 6 +-- engine/specials.asm | 2 +- event/buena.asm | 2 +- event/kurt.asm | 28 ++++++------ items/item_effects.asm | 4 +- main.asm | 86 +++++++++++++++++++----------------- misc/mobile_45.asm | 68 ++++++++++++++-------------- misc/mobile_5f.asm | 2 +- sram.asm | 4 +- text/common_3.asm | 8 ++-- text/common_4.asm | 6 +-- wram.asm | 12 +++-- 15 files changed, 153 insertions(+), 130 deletions(-) diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index d333a5114..3b7ffb139 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -6,6 +6,9 @@ MAX_BALLS EQU 12 MAX_KEY_ITEMS EQU 25 MAX_PC_ITEMS EQU 50 +LO_NYBBLE EQU $0f +HI_NYBBLE EQU $f0 + ; strings PLAYER_NAME_LENGTH EQU 8 PKMN_NAME_LENGTH EQU 11 diff --git a/data/odd_eggs.asm b/data/odd_eggs.asm index dd6d36ab8..37a63f476 100644 --- a/data/odd_eggs.asm +++ b/data/odd_eggs.asm @@ -43,43 +43,49 @@ GiveOddEgg: ; 1fb4b6 ld a, OddEgg2 - OddEgg1 call AddNTimes - ld de, wEnemyMoveStruct - ld bc, $0046 + ld de, OddEggSpecies + ld bc, party_struct_length + 2 * PKMN_NAME_LENGTH call CopyBytes ld a, EGG_TICKET ld [CurItem], a - ld a, $1 - ld [wd10c], a - ld a, $ff - ld [wd107], a + ld a, 1 + ld [wItemQuantityChangeBuffer], a + ld a, -1 + ld [ItemCountBuffer], a ld hl, NumItems call TossItem + ; load species in wcd2a ld a, EGG ld [wcd2a], a + ; load pointer to wcd29 in wcd20 ld a, wcd29 % $100 - ld [CreditsPos], a + ld [wcd20], a ld a, wcd29 / $100 ld [wcd21], a - ld a, wEnemyMoveStruct % $100 + ; load pointer to OddEggSpecies in wcd22 + ld a, OddEggSpecies % $100 ld [wcd22], a - ld a, wEnemyMoveStruct / $100 + ld a, OddEggSpecies / $100 ld [wcd23], a + ; load Odd Egg Name in wcd2b ld hl, .Odd ld de, wcd2b ld bc, PKMN_NAME_LENGTH call CopyBytes + ; load pointer to wcd2b in wcd24 ld a, wcd2b % $100 ld [wcd24], a ld a, wcd2b / $100 ld [wcd25], a - ld a, BattleMonHappiness % $100 + ; load pointer to wOddEggName in wcd26 + ld a, wOddEggName % $100 ld [wcd26], a - ld a, BattleMonHappiness / $100 + ld a, wOddEggName / $100 ld [wcd27], a callba Function11b98f ret diff --git a/engine/color.asm b/engine/color.asm index ed65f59df..9fde4d77d 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -1,6 +1,12 @@ INCLUDE "predef/sgb.asm" +SHINY_ATK_BIT EQU 5 +SHINY_DEF_VAL EQU 10 +SHINY_SPD_VAL EQU 10 +SHINY_SPC_VAL EQU 10 +LO_NYBBLE EQU $0f +HI_NYBBLE EQU $f0 CheckShininess: ; 8a68 ; Check if a mon is shiny by DVs at bc. @@ -11,25 +17,25 @@ CheckShininess: ; 8a68 ; Attack ld a, [hl] - and %0010 << 4 + and 1 << SHINY_ATK_BIT jr z, .NotShiny ; Defense ld a, [hli] - and %1111 - cp %1010 + and LO_NYBBLE + cp SHINY_DEF_VAL jr nz, .NotShiny ; Speed ld a, [hl] - and %1111 << 4 - cp %1010 << 4 + and HI_NYBBLE + cp SHINY_SPD_VAL << 4 jr nz, .NotShiny ; Special ld a, [hl] - and %1111 - cp %1010 + and LO_NYBBLE + cp SHINY_SPC_VAL jr nz, .NotShiny .Shiny @@ -53,7 +59,7 @@ CheckContestMon: ; 8a88 ; Defense ld a, [hli] - and $f + and LO_NYBBLE cp 10 jr c, .Bad @@ -64,7 +70,7 @@ CheckContestMon: ; 8a88 ; Special ld a, [hl] - and $f + and LO_NYBBLE cp 10 jr c, .Bad diff --git a/engine/scripting.asm b/engine/scripting.asm index a6b0b074c..c7c17b8d7 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -608,7 +608,7 @@ Script_verbosegiveitem2: ; 0x96f8e call GetScriptByte call GetVarAction ld a, [de] - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem ld a, 1 @@ -2344,7 +2344,7 @@ Script_giveitem: ; 0x977ca .ok ld [CurItem], a call GetScriptByte - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem jr nc, .full ; 0x977e3 $6 @@ -2368,7 +2368,7 @@ Script_takeitem: ; 0x977f0 call GetScriptByte ld [CurItem], a call GetScriptByte - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld a, $ff ld [wd107], a ld hl, NumItems diff --git a/engine/specials.asm b/engine/specials.asm index d283a88de..ef53daedc 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -333,7 +333,7 @@ Special_GetMysteryGiftItem: ; c309 ld a, [sMysteryGiftItem] ld [CurItem], a ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem jr nc, .asm_c33d diff --git a/event/buena.asm b/event/buena.asm index c82c61364..8ae1094c8 100644 --- a/event/buena.asm +++ b/event/buena.asm @@ -108,7 +108,7 @@ SpecialBuenaPrize: ; 8afd4 push hl ld [CurItem], a ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem pop hl diff --git a/event/kurt.asm b/event/kurt.asm index 8ed0eeb12..6ed629d23 100644 --- a/event/kurt.asm +++ b/event/kurt.asm @@ -47,7 +47,7 @@ Special_SelectApricornForKurt: ; 88018 call Kurt_SelectQuantity pop bc jr nc, .loop - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld [wKurtApricornQuantity], a call Kurt_GiveUpSelectedQuantityOfSelectedApricorn @@ -115,7 +115,7 @@ Kurt_SelectApricorn: ; 88055 ld [CurItem], a call Kurt_GetQuantityOfApricorn ret z - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld [wcf75], a callba PlaceMenuItemQuantity ret @@ -126,10 +126,10 @@ Kurt_SelectQuantity: ; 880c2 ld [MenuSelection], a call Kurt_GetQuantityOfApricorn jr z, .done - ld a, [wd10c] - ld [wd10d], a + ld a, [wItemQuantityChangeBuffer] + ld [wItemQuantityBuffer], a ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, .MenuDataHeader call LoadMenuDataHeader .loop @@ -149,8 +149,8 @@ Kurt_SelectQuantity: ; 880c2 ld a, b cp -1 jr z, .done - ld a, [wd10c] - ld [wd10c], a ; What is the point of this operation? + ld a, [wItemQuantityChangeBuffer] + ld [wItemQuantityChangeBuffer], a ; What is the point of this operation? scf .done @@ -181,7 +181,7 @@ PlaceApricornQuantity: ; 88126 add hl, de ld [hl], "×" inc hl - ld de, wd10c + ld de, wItemQuantityChangeBuffer lb bc, PRINTNUM_LEADINGZEROS | 1, 2 jp PrintNum ; 88139 @@ -213,7 +213,7 @@ Kurt_GetQuantityOfApricorn: ; 88139 .done2 ld a, b - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a and a pop bc ret @@ -325,7 +325,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161 ld [ItemCountBuffer], a call Kurt_GetRidOfItem pop hl - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] and a jr z, .done push hl @@ -348,7 +348,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161 jr .loop4 .done - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] and a pop bc pop de @@ -389,7 +389,7 @@ endr jr z, .done cp c jr nz, .done - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld c, a ld a, [hl] sub c @@ -402,14 +402,14 @@ endr push bc ld hl, NumItems ld a, b - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a call TossItem pop bc ld a, c sub b .done - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a pop bc ret ; 88248 diff --git a/items/item_effects.asm b/items/item_effects.asm index d40fc855e..7503eeb2b 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -720,7 +720,7 @@ endr .toss ld hl, NumItems inc a - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a jp TossItem .used_park_ball @@ -2944,7 +2944,7 @@ Functionf789: ; f789 Functionf795: ; f795 ld hl, NumItems ld a, 1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a jp TossItem ; f7a0 diff --git a/main.asm b/main.asm index ea861eb53..ca7fbb04d 100644 --- a/main.asm +++ b/main.asm @@ -6790,7 +6790,7 @@ PutItemInPocket: ; d29c sub [hl] add b ld b, a - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] cp b jr z, .ok jr c, .ok @@ -6812,8 +6812,8 @@ PutItemInPocket: ; d29c ld l, e ld a, [CurItem] ld c, a - ld a, [wd10c] - ld [wd10d], a + ld a, [wItemQuantityChangeBuffer] + ld [wItemQuantityBuffer], a .loop2 inc hl ld a, [hli] @@ -6821,7 +6821,7 @@ PutItemInPocket: ; d29c jr z, .terminator2 cp c jr nz, .loop2 - ld a, [wd10d] + ld a, [wItemQuantityBuffer] add [hl] cp 100 jr nc, .newstack @@ -6831,14 +6831,14 @@ PutItemInPocket: ; d29c .newstack ld [hl], 99 sub 99 - ld [wd10d], a + ld [wItemQuantityBuffer], a jr .loop2 .terminator2 dec hl ld a, [CurItem] ld [hli], a - ld a, [wd10d] + ld a, [wItemQuantityBuffer] ld [hli], a ld [hl], -1 ld h, d @@ -6855,9 +6855,9 @@ RemoveItemFromPocket: ; d2ff ld e, l ld a, [hli] ld c, a - ld a, [wd107] + ld a, [ItemCountBuffer] cp c - jr nc, .ok + jr nc, .ok ; memory ld c, a ld b, $0 rept 2 @@ -6884,13 +6884,13 @@ endr jr .loop .skip - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld b, a ld a, [hl] sub b jr c, .nope ld [hl], a - ld [wd10d], a + ld [wItemQuantityBuffer], a and a jr nz, .yup dec hl @@ -7035,7 +7035,7 @@ ReceiveTMHM: ; d3c4 ld b, 0 ld hl, TMsHMs add hl, bc - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] add [hl] cp 100 jr nc, .toomany @@ -7053,13 +7053,13 @@ TossTMHM: ; d3d8 ld b, 0 ld hl, TMsHMs add hl, bc - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld b, a ld a, [hl] sub b jr c, .nope ld [hl], a - ld [wd10d], a + ld [wItemQuantityBuffer], a jr nz, .yup ld a, [wd0e2] and a @@ -11932,7 +11932,7 @@ Function122f8: ; 122f8 ld a, [EngineBuffer1] ld [CurItem], a ld a, [CurFruit] - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem ret nc @@ -13470,7 +13470,7 @@ GetPartyItemLocation: ; 12cd7 Function12cdf: ; 12cdf ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems jp ReceiveItem ; 12cea @@ -13478,7 +13478,7 @@ Function12cdf: ; 12cdf Function12cea: ; 12cea (4:6cea) ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems jp TossItem @@ -18115,7 +18115,7 @@ Function157e9: ; 0x157e9 ; items without quantity are always ×1 ld a, 1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a jr .withdraw .askquantity @@ -18127,7 +18127,7 @@ Function157e9: ; 0x157e9 jr c, .done .withdraw - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld [Buffer1], a ; quantity ld a, [wd107] ld [Buffer2], a @@ -18135,7 +18135,7 @@ Function157e9: ; 0x157e9 call ReceiveItem jr nc, .PackFull ld a, [Buffer1] - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld a, [Buffer2] ld [wd107], a ld hl, PCItems @@ -18288,7 +18288,7 @@ Function1590a: ; 0x1590a and a jr z, .asm_1591d ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a jr .asm_15933 .asm_1591d @@ -18302,7 +18302,7 @@ Function1590a: ; 0x1590a jr c, .asm_1596c .asm_15933 - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld [Buffer1], a ld a, [wd107] ld [Buffer2], a @@ -18310,7 +18310,7 @@ Function1590a: ; 0x1590a call ReceiveItem jr nc, .asm_15965 ld a, [Buffer1] - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld a, [Buffer2] ld [wd107], a ld hl, NumItems @@ -19010,7 +19010,7 @@ Function15cef: ; 15cef Function15d83: ; 15d83 ld a, $63 - ld [wd10d], a + ld [wItemQuantityBuffer], a ld a, $0 call Function15c7d callba Function24fc9 @@ -19028,7 +19028,7 @@ Function15d97: ; 15d97 Function15da5: ; 15da5 ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld a, [wd107] ld e, a ld d, $0 @@ -19072,7 +19072,7 @@ Function15de2: ; 15de2 call Function15c7d call Function15df9 ld a, $63 - ld [wd10d], a + ld [wItemQuantityBuffer], a callba Function24fcf call ExitMenu ret @@ -23084,7 +23084,7 @@ MenuJoyAction: ; 24609 ld a, [MenuSelection] ld [CurItem], a ld a, [wcf75] - ld [wd10d], a + ld [wItemQuantityBuffer], a call Function246fc dec a ld [wcf77], a @@ -24586,7 +24586,7 @@ Function24fe1: ; 24fe1 Function24ff9: ; 24ff9 ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a .asm_24ffe call Function25072 call Function2500e @@ -24629,10 +24629,10 @@ Function2500e: ; 2500e ret .asm_25033 - ld hl, wd10c + ld hl, wItemQuantityChangeBuffer dec [hl] jr nz, .asm_2503d - ld a, [wd10d] + ld a, [wItemQuantityBuffer] ld [hl], a .asm_2503d @@ -24640,9 +24640,9 @@ Function2500e: ; 2500e ret .asm_2503f - ld hl, wd10c + ld hl, wItemQuantityChangeBuffer inc [hl] - ld a, [wd10d] + ld a, [wItemQuantityBuffer] cp [hl] jr nc, .asm_2504b ld [hl], $1 @@ -24652,7 +24652,7 @@ Function2500e: ; 2500e ret .asm_2504d - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] sub $a jr c, .asm_25058 jr z, .asm_25058 @@ -24662,22 +24662,22 @@ Function2500e: ; 2500e ld a, $1 .asm_2505a - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a and a ret .asm_2505f - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] add $a ld b, a - ld a, [wd10d] + ld a, [wItemQuantityBuffer] cp b jr nc, .asm_2506c ld b, a .asm_2506c ld a, b - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a and a ret ; 25072 @@ -24689,7 +24689,7 @@ Function25072: ; 25072 add hl, de ld [hl], $f1 inc hl - ld de, wd10c + ld de, wItemQuantityChangeBuffer lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ld a, [wcf86] @@ -24726,7 +24726,7 @@ Function250a9: ; 250a9 ld [hMultiplicand + 1], a ld a, [Buffer2] ld [hMultiplicand + 2], a - ld a, [wd10c] + ld a, [wItemQuantityChangeBuffer] ld [hMultiplier], a push hl call Multiply @@ -33392,7 +33392,7 @@ Function2c76f: ; 2c76f (b:476f) ld b, $0 add hl, bc ld a, [hl] - ld [wd10d], a + ld [wItemQuantityBuffer], a call Function2c798 scf ret @@ -36628,7 +36628,7 @@ Function4484a: ; 0x4484a dec a call .Function448bb ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, NumItems call ReceiveItem jr c, .asm_4489e @@ -43907,6 +43907,10 @@ FindGreaterThanThatLevel: ; 4dc31 ; 4dc56 FindThatSpecies: ; 4dc56 +; Find species b in your party. +; If you have no Pokemon, returns c = -1 and z. +; If that species is in your party, returns its location in c, and nz. +; Otherwise, returns z. ld c, -1 ld hl, PartySpecies .loop @@ -77286,7 +77290,7 @@ Functionfd0c3: ; fd0c3 ld a, [hl] ld [CurItem], a ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld hl, PCItems call ReceiveItem ret diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm index ce62a30b3..8ea7bdc72 100644 --- a/misc/mobile_45.asm +++ b/misc/mobile_45.asm @@ -16285,29 +16285,29 @@ Function11b93b: ; 11b93b xor a ld [$a800], a ld hl, $a823 - ld de, $c608 + ld de, wEnemyMoveStruct ld bc, $008f call CopyBytes call CloseSRAM - ld a, $8 - ld [BGMapBuffer], a - ld a, $c6 + ld a, wEnemyMoveStruct % $100 + ld [wcd20], a + ld a, wEnemyMoveStruct / $100 ld [wcd21], a - ld a, $11 - ld [CreditsTimer], a - ld a, $c6 + ld a, $c611 % $100 + ld [wcd22], a + ld a, $c611 / $100 ld [wcd23], a - ld a, $41 + ld a, $c641 % $100 ld [wcd24], a - ld a, $c6 + ld a, $c641 / $100 ld [wcd25], a - ld a, $46 + ld a, $c646 % $100 ld [wcd26], a - ld a, $c6 + ld a, $c646 / $100 ld [wcd27], a - ld a, $4b + ld a, $c64b % $100 ld [wcd28], a - ld a, $c6 + ld a, $c64b / $100 ld [wcd29], a call Function11b98f callba Function14a58 @@ -16319,17 +16319,17 @@ Function11b98f: ; 11b98f ld a, [hl] ld e, a inc [hl] - ld a, [BGMapBuffer] + ld a, [wcd20] ld l, a ld a, [wcd21] ld h, a inc hl ld bc, PartySpecies ld d, e -.asm_11b9a2 +.loop1 inc bc dec d - jr nz, .asm_11b9a2 + jr nz, .loop1 ld a, e ld [CurPartyMon], a ld a, [hl] @@ -16341,11 +16341,11 @@ Function11b98f: ; 11b98f ld bc, PartyMon2 - PartyMon1 ld a, e ld [wcd2a], a -.asm_11b9ba +.loop2 add hl, bc dec a and a - jr nz, .asm_11b9ba + jr nz, .loop2 ld e, l ld d, h ld a, [CreditsTimer] @@ -16355,49 +16355,49 @@ Function11b98f: ; 11b98f ld bc, PartyMon2 - PartyMon1 call CopyBytes ld hl, PartyMonOT - ld bc, $000b + ld bc, NAME_LENGTH ld a, [wcd2a] -.asm_11b9d8 +.loop3 add hl, bc dec a and a - jr nz, .asm_11b9d8 + jr nz, .loop3 ld e, l ld d, h ld a, [wcd24] ld l, a ld a, [wcd25] ld h, a - ld bc, $000a + ld bc, PKMN_NAME_LENGTH - 1 call CopyBytes - ld a, $50 + ld a, "@" ld [de], a ld hl, PartyMonNicknames - ld bc, $000b + ld bc, PKMN_NAME_LENGTH ld a, [wcd2a] -.asm_11b9f9 +.loop4 add hl, bc dec a and a - jr nz, .asm_11b9f9 + jr nz, .loop4 ld e, l ld d, h ld a, [wcd26] ld l, a ld a, [wcd27] ld h, a - ld bc, $000a + ld bc, PKMN_NAME_LENGTH - 1 call CopyBytes - ld a, $50 + ld a, "@" ld [de], a - ld hl, $a600 - ld bc, $002f + ld hl, s0_a600 + ld bc, party_struct_length - 1 ld a, [wcd2a] -.asm_11ba1a +.loop5 add hl, bc dec a and a - jr nz, .asm_11ba1a + jr nz, .loop5 ld a, $0 call GetSRAMBank ld e, l @@ -16406,7 +16406,7 @@ Function11b98f: ; 11b98f ld l, a ld a, [wcd29] ld h, a - ld bc, $002f + ld bc, party_struct_length - 1 call CopyBytes call CloseSRAM ret @@ -23950,7 +23950,7 @@ endr ld a, EGG_TICKET ld [CurItem], a ld a, $1 - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a ld a, $ff ld [wd107], a ld hl, NumItems diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm index 96bbfd840..82091ab7a 100644 --- a/misc/mobile_5f.asm +++ b/misc/mobile_5f.asm @@ -2693,7 +2693,7 @@ Function17e0fd: ; 17e0fd ld a, [hli] ld [CurItem], a ld a, [hli] - ld [wd10c], a + ld [wItemQuantityChangeBuffer], a push hl ld hl, NumItems call ReceiveItem diff --git a/sram.asm b/sram.asm index 280f2402d..b5fc9571d 100644 --- a/sram.asm +++ b/sram.asm @@ -5,8 +5,8 @@ sScratch:: SECTION "SRAM Bank 0", SRAM [$a600], BANK [0] -s0_a600:: ds $11a -s0_a71a:: ds $11a +s0_a600:: ds 6 * (party_struct_length + PartyMon1 - PartyMon1Item) +s0_a71a:: ds 6 * (party_struct_length + PartyMon1 - PartyMon1Item) s0_a834:: ds 1 s0_a835:: ds 10 * (party_struct_length + PartyMon1 - PartyMon1Item) s0_aa0b:: ds 1 diff --git a/text/common_3.asm b/text/common_3.asm index ed1bfb83c..f91877a68 100644 --- a/text/common_3.asm +++ b/text/common_3.asm @@ -708,7 +708,7 @@ UnknownText_0x1c0ba5: ; 1c0ba5 UnknownText_0x1c0bbb: ; 1c0bbb text "Throw away @" - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text "" line "@" text_from_ram StringBuffer2 @@ -1293,7 +1293,7 @@ _KrissPCHowManyWithdrawText: ; 1c1381 _KrissPCWithdrewItemsText: ; 1c13a4 text "Withdrew @" - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text "" line "@" text_from_ram StringBuffer2 @@ -1320,7 +1320,7 @@ _KrissPCHowManyDepositText: ; 1c13ef _KrissPCDepositItemsText: ; 1c1411 text "Deposited @" - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text "" line "@" text_from_ram StringBuffer2 @@ -1610,7 +1610,7 @@ UnknownText_0x1c1a90: ; 1c1a90 UnknownText_0x1c1aad: ; 1c1aad text "Throw away @" - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text "" line "@" text_from_ram StringBuffer2 diff --git a/text/common_4.asm b/text/common_4.asm index 5739f7bf2..8788bf24f 100644 --- a/text/common_4.asm +++ b/text/common_4.asm @@ -537,7 +537,7 @@ UnknownText_0x1c4bfd: ; 0x1c4bfd ; 0x1c4c08 UnknownText_0x1c4c08: ; 0x1c4c08 - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text " @" text_from_ram StringBuffer2 text "(S)" @@ -569,7 +569,7 @@ UnknownText_0x1c4ca3: ; 0x1c4ca3 ; 0x1c4cae UnknownText_0x1c4cae: ; 0x1c4cae - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text " @" text_from_ram StringBuffer2 text "(S)" @@ -666,7 +666,7 @@ UnknownText_0x1c4e7e: ; 0x1c4e7e ; 0x1c4e89 UnknownText_0x1c4e89: ; 0x1c4e89 - deciram wd10c, 1, 2 + deciram wItemQuantityChangeBuffer, 1, 2 text " @" text_from_ram StringBuffer2 text "(S)" diff --git a/wram.asm b/wram.asm index df4ff2286..38a3a9ea6 100644 --- a/wram.asm +++ b/wram.asm @@ -432,12 +432,16 @@ TileMapEnd:: SECTION "Battle", WRAM0 + party_struct OddEgg +wOddEggName:: ds PKMN_NAME_LENGTH +wOddEggOTName:: ds PKMN_NAME_LENGTH + ds -70 wMisc:: wBattle:: +wc608:: wBT_OTTempCopy:: ; used to copy the data of the BattleTower-Trainer and the 3 Pkmn -wc608:: wEnemyMoveStruct:: ds MOVE_LENGTH ; c608 wc60f:: wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f @@ -1035,7 +1039,7 @@ OverworldMapEnd:: SECTION "Video", WRAM0 CreditsPos:: BGMapBuffer:: ; cd20 - ds 1 +wcd20:: ds 1 wcd21:: ds 1 wcd22:: CreditsTimer:: ; cd22 @@ -1557,8 +1561,8 @@ CurPartyMon:: ; d109 wd10a:: ds 1 wd10b:: ds 1 -wd10c:: ds 1 -wd10d:: ds 1 +wItemQuantityChangeBuffer:: ds 1 +wItemQuantityBuffer:: ds 1 wd10e:: TempMon::