From 6fe56af2cd63abaf30040cc5031e3db5358cf638 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 5 Nov 2020 10:51:02 -0500 Subject: Organize home and macro code --- engine/items/inventory.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/items') diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm index c2e0b2b4..86003319 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -36,7 +36,7 @@ AddItemToInventory_:: inc hl .loop ld a, [hl] - cp a, $ff ; is it the end of the table? + cp $ff ; is it the end of the table? jr nz, .notAtEndOfInventory .addNewItem ; add an item not yet in the inventory pop hl -- cgit v1.2.3 From 472f5824a65eaa76f6c92e66bfabb1a1eac66442 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 5 Nov 2020 13:23:47 -0500 Subject: Sync more with pokered --- engine/items/inventory.asm | 4 ++-- engine/items/item_effects.asm | 2 +- engine/items/tms.asm | 2 +- engine/items/town_map.asm | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/items') diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm index 86003319..e28edc6c 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -34,7 +34,7 @@ AddItemToInventory_:: cp b ; does the current item in the table match the item being added? jp z, .increaseItemQuantity ; if so, increase the item's quantity inc hl -.loop +.addAnotherStackOfItem ld a, [hl] cp $ff ; is it the end of the table? jr nz, .notAtEndOfInventory @@ -74,7 +74,7 @@ AddItemToInventory_:: ; if so, store 99 in the current slot and store the rest in a new slot ld a, 99 ld [hli], a - jp .loop + jp .addAnotherStackOfItem .increaseItemQuantityFailed pop hl and a diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index d4c3ae18..f8a388d5 100755 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -3092,7 +3092,7 @@ SendNewMonToBox: ld a, [wcf91] cp KADABRA jr nz, .notKadabra - ld a, $60 ; twistedspoon in gsc + ld a, TWISTEDSPOON_GSC ld [wBoxMon1CatchRate], a .notKadabra ret diff --git a/engine/items/tms.asm b/engine/items/tms.asm index dcf2665d..40030675 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -11,7 +11,7 @@ CanLearnTM: ld hl, TechnicalMachines .findTMloop ld a, [hli] - cp $ff ; reached terminator? + cp -1 ; reached terminator? jr z, .done cp b jr z, .TMfoundLoop diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index c401d1c1..d385044a 100755 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -152,7 +152,7 @@ LoadTownMap_Fly:: call LoadFontTilePatterns ld de, BirdSprite ld b, BANK(BirdSprite) - ld c, $c + ld c, 12 ld hl, vSprites tile $04 call CopyVideoData ld de, TownMapUpArrow -- cgit v1.2.3 From ed7a2d49d75e3bdd7ecab907574d7cb51f1c81fa Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 5 Nov 2020 15:17:48 -0500 Subject: Remove trailing whitespace --- engine/items/item_effects.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/items') diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f8a388d5..00a575f1 100755 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -386,7 +386,7 @@ ItemUseBall: ldh [hDivisor], a ld b, 4 call Divide - + ; Determine Status2. ; no status ailment: Status2 = 0 ; Burn/Paralysis/Poison: Status2 = 5 -- cgit v1.2.3