summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-11-05 13:23:47 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-11-05 15:15:37 -0500
commit472f5824a65eaa76f6c92e66bfabb1a1eac66442 (patch)
tree14b4ba61b32f85c88011ad636f323e1da49b1212
parente37300a446f6c5c9612e489305c96515cf88a5ca (diff)
Sync more with pokered
-rwxr-xr-xconstants/item_constants.asm3
-rw-r--r--data/pokemon/unknown_list.asm36
-rwxr-xr-xengine/battle/animations.asm8
-rw-r--r--engine/items/inventory.asm4
-rwxr-xr-xengine/items/item_effects.asm2
-rwxr-xr-xengine/items/tms.asm2
-rwxr-xr-xengine/items/town_map.asm2
-rw-r--r--engine/joypad.asm8
-rw-r--r--engine/link/print_waiting_text.asm9
-rw-r--r--engine/pokemon/add_mon.asm6
-rwxr-xr-xengine/pokemon/evos_moves.asm35
-rwxr-xr-xengine/predefs.asm8
12 files changed, 64 insertions, 59 deletions
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index 67416600..bf99ec9b 100755
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -223,3 +223,6 @@ assert NUM_TMS == const_value - TM01, "NUM_TMS ({d:NUM_TMS}) does not match the
; These fit in 7 bytes, with one unused bit left over.
__tmhm_value__ = NUM_TMS + NUM_HMS + 1
UNUSED_TMNUM EQU __tmhm_value__
+
+; used for Time Capsule held item compatibility
+TWISTEDSPOON_GSC EQU $60
diff --git a/data/pokemon/unknown_list.asm b/data/pokemon/unknown_list.asm
new file mode 100644
index 00000000..010d415b
--- /dev/null
+++ b/data/pokemon/unknown_list.asm
@@ -0,0 +1,36 @@
+; This list is used by a unreferenced function.
+
+Pointer_3b0ee:
+ db NIDOKING
+ db IVYSAUR
+ db EXEGGUTOR
+ db GENGAR
+ db NIDOQUEEN
+ db ARCANINE
+ db GYARADOS
+ db BLASTOISE
+ db GOLEM
+ db DRAGONITE
+ db NINETALES
+ db DRAGONAIR
+ db KABUTOPS
+ db OMASTAR
+ db JIGGLYPUFF
+ db FLAREON
+ db JOLTEON
+ db VAPOREON
+ db BEEDRILL
+ db BUTTERFREE
+ db MACHAMP
+ db CLOYSTER
+ db CLEFABLE
+ db ALAKAZAM
+ db STARMIE
+ db VENUSAUR
+ db TENTACRUEL
+ db CHARMELEON
+ db WARTORTLE
+ db CHARIZARD
+ db VILEPLUME
+ db VICTREEBEL
+ db -1 ; end
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 98d85e02..64bdaa00 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -1327,7 +1327,7 @@ BattleAnimWriteOAMEntry:
; Y coordinate = e (increased by 8 each call, before the write to OAM)
; X coordinate = [wBaseCoordX]
; tile = d
-; attributes = variable (dependant on coords)
+; attributes = variable (depending on coords)
ld a, $1
ld [wdef5], a
ld a, e
@@ -1402,7 +1402,7 @@ AdjustOAMBlockYPos2:
ret
AnimationBlinkEnemyMon:
- ; Make the enemy mon's sprite blink on and off for a second or two
+; Make the enemy mon's sprite blink on and off for a second or two
ld hl, AnimationBlinkMon
jp CallWithTurnFlipped
@@ -1880,7 +1880,7 @@ _AnimationSlideMonOff:
jr nz, .slideLoop
ret
-; Since mon pic tile numbers go from top to bottom, left to right in order,
+; Since mon pic tile numbers go from top to bottom, left to right in order,
; adding the height of the mon pic in tiles to a tile number gives the tile
; number of the tile one column to the right (and thus subtracting the height
; gives the reverse). If the next tile would be past the edge of the pic, the 2
@@ -2246,7 +2246,7 @@ ClearMonPicFromTileMap:
ret
; puts the tile map destination address of a mon sprite in hl, given the row count in b
-; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out,
+; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out,
; in order to show only a portion of the mon sprite.
GetMonSpriteTileMapPointerFromRowCount:
push de
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
diff --git a/engine/joypad.asm b/engine/joypad.asm
index 06a15e4e..d50eea08 100644
--- a/engine/joypad.asm
+++ b/engine/joypad.asm
@@ -7,7 +7,6 @@ ReadJoypad_::
ret nz
ld a, 1 << 5 ; select direction keys
- ;ld c, 0
ldh [rJOYP], a
ldh a, [rJOYP]
@@ -19,9 +18,9 @@ ReadJoypad_::
ld a, 1 << 4 ; select button keys
ldh [rJOYP], a
- REPT 6
+REPT 6
ldh a, [rJOYP]
- ENDR
+ENDR
cpl
and %1111
or b
@@ -32,14 +31,13 @@ ReadJoypad_::
ldh [rJOYP], a
ret
-
_Joypad::
; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput
ldh a, [hJoyInput]
ld b, a
- and $4F
+ and A_BUTTON + B_BUTTON + SELECT + START + D_UP
cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
jp z, TrySoftReset
diff --git a/engine/link/print_waiting_text.asm b/engine/link/print_waiting_text.asm
index 98a44970..a07967fd 100644
--- a/engine/link/print_waiting_text.asm
+++ b/engine/link/print_waiting_text.asm
@@ -3,12 +3,13 @@ PrintWaitingText::
lb bc, 1, 11
ld a, [wIsInBattle]
and a
- jr z, .asm_4b9a
+ jr z, .trade
+; battle
call TextBoxBorder
- jr .asm_4b9d
-.asm_4b9a
+ jr .border_done
+.trade
call CableClub_TextBoxBorder
-.asm_4b9d
+.border_done
hlcoord 4, 11
ld de, WaitingText
call PlaceString
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index d3d08e99..52230099 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -172,10 +172,10 @@ _AddPartyMon::
ld [de], a
ld a, [wcf91]
cp KADABRA
- jr nz, .skipGivingTwistedSpoon
- ld a, $60 ; twistedspoon in gen 2
+ jr nz, .notKadabra
+ ld a, TWISTEDSPOON_GSC
ld [de], a
-.skipGivingTwistedSpoon
+.notKadabra
ld hl, wMonHMoves
ld a, [hli]
inc de
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index 4e48fe30..3df780c1 100755
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -452,40 +452,7 @@ Func_3b0a2:
scf
ret
-Pointer_3b0ee:
- db NIDOKING
- db IVYSAUR
- db EXEGGUTOR
- db GENGAR
- db NIDOQUEEN
- db ARCANINE
- db GYARADOS
- db BLASTOISE
- db GOLEM
- db DRAGONITE
- db NINETALES
- db DRAGONAIR
- db KABUTOPS
- db OMASTAR
- db JIGGLYPUFF
- db FLAREON
- db JOLTEON
- db VAPOREON
- db BEEDRILL
- db BUTTERFREE
- db MACHAMP
- db CLOYSTER
- db CLEFABLE
- db ALAKAZAM
- db STARMIE
- db VENUSAUR
- db TENTACRUEL
- db CHARMELEON
- db WARTORTLE
- db CHARIZARD
- db VILEPLUME
- db VICTREEBEL
- db $ff
+INCLUDE "data/pokemon/unknown_list.asm"
Func_3b10f:
ld c, $0
diff --git a/engine/predefs.asm b/engine/predefs.asm
index 73f69d03..a9877739 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -1,8 +1,8 @@
GetPredefPointer::
- ; Store the contents of the register
- ; pairs (hl, de, bc) at wPredefRegisters.
- ; Then put the bank and address of predef
- ; wPredefID in [wPredefBank] and hl.
+; Store the contents of the register
+; pairs (hl, de, bc) at wPredefRegisters.
+; Then put the bank and address of predef
+; wPredefID in [wPredefBank] and hl.
ld a, h
ld [wPredefRegisters], a