summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-06-15 13:12:56 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-06-15 13:12:56 -0400
commit9f01e33a0428f8a8c206b3f6018f526a41d65b43 (patch)
tree7f3c8606ebbe0f882955761a899ec9f819412c17 /engine
parent0bc1e91d217fb1a724c08ed6c5826c2379f10507 (diff)
Port miscellaneous recent updates from pokecrystal
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/effect_commands.asm4
-rw-r--r--engine/battle/move_effects/rollout.asm2
-rw-r--r--engine/battle/used_move_text.asm2
-rw-r--r--engine/battle_anims/bg_effects.asm4
-rw-r--r--engine/gfx/color.asm11
-rw-r--r--engine/gfx/sgb_layouts.asm2
-rw-r--r--engine/items/print_item_description.asm2
-rw-r--r--engine/items/tmhm.asm8
-rw-r--r--engine/link/link.asm4
-rw-r--r--engine/link/mystery_gift.asm2
-rw-r--r--engine/menus/menu_2.asm3
-rw-r--r--engine/menus/scrolling_menu.asm4
-rw-r--r--engine/menus/trainer_card.asm10
-rw-r--r--engine/pokemon/mon_menu.asm2
-rw-r--r--engine/pokemon/party_menu.asm4
-rw-r--r--engine/pokemon/print_move_description.asm2
16 files changed, 36 insertions, 30 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 815cc17d..07717114 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -1110,7 +1110,7 @@ CheckMimicUsed:
call GetBattleVar
cp MIMIC
jr z, .mimic
-;
+
ld b, 0
add hl, bc
ld a, [hl]
@@ -1545,7 +1545,7 @@ BattleCommand_DamageVariation:
call Multiply
; ...divide by 100%...
- ld a, $ff ; 100%
+ ld a, 100 percent
ldh [hDivisor], a
ld b, $4
call Divide
diff --git a/engine/battle/move_effects/rollout.asm b/engine/battle/move_effects/rollout.asm
index e2f810e6..64d66ad6 100644
--- a/engine/battle/move_effects/rollout.asm
+++ b/engine/battle/move_effects/rollout.asm
@@ -14,7 +14,7 @@ BattleCommand_CheckCurl:
bit SUBSTATUS_ROLLOUT, a
jr z, .reset
- ld b, $4 ; doturn
+ ld b, doturn_command
jp SkipToBattleCommand
.reset
diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm
index 5b148ab5..afc735f9 100644
--- a/engine/battle/used_move_text.asm
+++ b/engine/battle/used_move_text.asm
@@ -5,9 +5,9 @@ BattleCommand_UsedMoveText:
jp WaitBGMap
UsedMoveText:
-; this is a stream of text and asm from 105db9 to 105ef6
text_far _ActorNameText
text_asm
+
ldh a, [hBattleTurn]
and a
jr nz, .start
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm
index 2c20b40d..de9d0306 100644
--- a/engine/battle_anims/bg_effects.asm
+++ b/engine/battle_anims/bg_effects.asm
@@ -1475,10 +1475,10 @@ Tackle_BGEffect25_2d_two:
Functionc886e:
push af
- ld a, [wFXAnimID + 1] ; FXAnimID + 1
+ ld a, [wFXAnimID + 1]
or a
jr nz, .not_rollout
- ld a, [wFXAnimID] ; FXAnimID
+ ld a, [wFXAnimID]
cp ROLLOUT
jr z, .rollout
.not_rollout
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index d7998019..f8fcffc2 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -247,13 +247,13 @@ Unreferenced_Function91b4:
ldh a, [hCGB]
and a
jr nz, .cgb
- ld hl, wc602
+ ld hl, wBetaPokerSGBPals
jp PushSGBPals
.cgb
- ld a, [wc606] ; col
+ ld a, [wBetaPokerSGBCol]
ld c, a
- ld a, [wc607] ; row
+ ld a, [wBetaPokerSGBRow]
hlcoord 0, 0, wAttrmap
ld de, SCREEN_WIDTH
.loop
@@ -267,7 +267,7 @@ Unreferenced_Function91b4:
ld b, $0
add hl, bc
lb bc, 6, 4
- ld a, [wc605] ; value
+ ld a, [wBetaPokerSGBAttr]
and $3
call FillBoxCGB
call CopyTilemapAtOnce
@@ -1236,6 +1236,9 @@ INCLUDE "gfx/diploma/diploma.pal"
PartyMenuOBPals:
INCLUDE "gfx/stats/party_menu_ob.pal"
+UnusedBattleObjectPals:
+INCLUDE "gfx/battle_anims/unused_battle_anims.pal"
+
GSTitleBGPals:
IF DEF(_GOLD)
INCLUDE "gfx/title/title_bg_gold.pal"
diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm
index db4e929f..561d6063 100644
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -339,7 +339,7 @@ endr
.SGB_BetaPoker:
ld hl, BlkPacket_9ee5
- ld de, wc602
+ ld de, wBetaPokerSGBPals
ld bc, PALPACKET_LENGTH
call CopyBytes
ld hl, PalPacket_BetaPoker
diff --git a/engine/items/print_item_description.asm b/engine/items/print_item_description.asm
index 89a949ad..8ac6f816 100644
--- a/engine/items/print_item_description.asm
+++ b/engine/items/print_item_description.asm
@@ -11,7 +11,7 @@ PrintItemDescription:
pop hl
ld a, [wTempTMHM]
ld [wCurSpecies], a
- call PrintMoveDesc
+ call PrintMoveDescription
ret
.not_a_tm
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm
index f5261123..1d71f695 100644
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -251,7 +251,7 @@ TMHM_ShowTMMoveDescription:
ld a, [wTempTMHM]
ld [wCurSpecies], a
hlcoord 1, 14
- call PrintMoveDesc
+ call PrintMoveDescription
jp TMHM_JoypadLoop
TMHM_ChooseTMorHM:
@@ -416,7 +416,7 @@ TMHM_DisplayPocketItems:
inc hl
inc hl
push de
- ld de, TMHM_String_Cancel
+ ld de, TMHM_CancelString
call PlaceString
pop de
.done
@@ -448,7 +448,7 @@ Unreferenced_Function2c89a:
pop hl
ret
-TMHM_String_Cancel:
+TMHM_CancelString:
db "CANCEL@"
TMHM_GetCurrentPocketPosition:
@@ -471,7 +471,7 @@ TMHM_GetCurrentPocketPosition:
Tutorial_TMHMPocket:
hlcoord 9, 3
push de
- ld de, TMHM_String_Cancel
+ ld de, TMHM_CancelString
call PlaceString
pop de
ret
diff --git a/engine/link/link.asm b/engine/link/link.asm
index 11657f4e..79571fa4 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -1427,10 +1427,10 @@ Function28a16:
ld bc, SCREEN_WIDTH - 2
call ByteFill
hlcoord 2, 16
- ld de, .Cancel
+ ld de, .CancelString
jp PlaceString
-.Cancel:
+.CancelString:
db "CANCEL@"
Function28a3c:
diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm
index 55a35982..92f67093 100644
--- a/engine/link/mystery_gift.asm
+++ b/engine/link/mystery_gift.asm
@@ -979,7 +979,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived:
ld d, $0
ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived
- predef_id SmallFarFlagAction
+ lda_predef SmallFarFlagAction
push hl
push bc
call Predef
diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm
index 2fd65e2b..ed7221e8 100644
--- a/engine/menus/menu_2.asm
+++ b/engine/menus/menu_2.asm
@@ -110,8 +110,7 @@ CoinString:
ShowMoney_TerminatorString:
db "@@"
-Unreferenced_Function24ab8:
-; related to safari?
+Unreferenced_StartMenu_PrintSafariGameStatus:
ld hl, wOptions
ld a, [hl]
push af
diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm
index f051e71c..0574bc73 100644
--- a/engine/menus/scrolling_menu.asm
+++ b/engine/menus/scrolling_menu.asm
@@ -401,11 +401,11 @@ ScrollingMenu_UpdateDisplay:
ld a, [wMenuDataFlags]
bit 0, a ; call function on cancel
jr nz, .call_function
- ld de, .string_24787
+ ld de, .CancelString
call PlaceString
ret
-.string_24787
+.CancelString
db "CANCEL@"
.call_function
diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm
index 7061d4bd..7144c0d9 100644
--- a/engine/menus/trainer_card.asm
+++ b/engine/menus/trainer_card.asm
@@ -367,7 +367,7 @@ TrainerCard_InitBorder:
ld a, $23
ld [hli], a
- ld e, SCREEN_HEIGHT - 1
+ ld e, SCREEN_WIDTH - 3
ld a, " "
.loop2
ld [hli], a
@@ -378,11 +378,12 @@ TrainerCard_InitBorder:
ld [hli], a
ld a, $23
ld [hli], a
+
.loop3
ld a, $23
ld [hli], a
- ld e, SCREEN_HEIGHT
+ ld e, SCREEN_WIDTH - 2
ld a, " "
.loop4
ld [hli], a
@@ -391,6 +392,7 @@ TrainerCard_InitBorder:
ld a, $23
ld [hli], a
+
dec d
jr nz, .loop3
@@ -399,14 +401,16 @@ TrainerCard_InitBorder:
ld a, $24
ld [hli], a
- ld e, SCREEN_HEIGHT - 1
+ ld e, SCREEN_WIDTH - 3
ld a, " "
.loop5
ld [hli], a
dec e
jr nz, .loop5
+
ld a, $23
ld [hli], a
+
ld e, SCREEN_WIDTH
.loop6
ld a, $23
diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm
index aa211ae1..3bf31474 100644
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -1213,7 +1213,7 @@ PlaceMoveData:
.description
hlcoord 1, 14
- predef PrintMoveDesc
+ predef PrintMoveDescription
ld a, $1
ldh [hBGMapMode], a
ret
diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm
index 93f9b93b..c899b5cb 100644
--- a/engine/pokemon/party_menu.asm
+++ b/engine/pokemon/party_menu.asm
@@ -104,11 +104,11 @@ PlacePartyNicknames:
.end
dec hl
dec hl
- ld de, .CANCEL
+ ld de, .CancelString
call PlaceString
ret
-.CANCEL:
+.CancelString:
db "CANCEL@"
PlacePartyHPBar:
diff --git a/engine/pokemon/print_move_description.asm b/engine/pokemon/print_move_description.asm
index e002e3d1..fd12f82b 100644
--- a/engine/pokemon/print_move_description.asm
+++ b/engine/pokemon/print_move_description.asm
@@ -1,4 +1,4 @@
-PrintMoveDesc:
+PrintMoveDescription:
push hl
ld hl, MoveDescriptions
ld a, [wCurSpecies]