From cd649184f556db777d592671a7274bfa4a8423d7 Mon Sep 17 00:00:00 2001 From: "U-Daniel-PC\\Daniel" Date: Fri, 3 Jul 2015 14:37:53 -0500 Subject: Rename/organize part 1 of 4 rename functions, clean up address/wram comments, other misc only broken up so that all changes are viewable on github --- engine/menu/status_screen.asm | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index b5254694..c9261804 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -67,7 +67,7 @@ StatusScreen: ; 12953 (4:6953) call LoadMonData ld a, [wcc49] cp $2 ; 2 means we're in a PC box - jr c, .DontRecalculate ; 0x1295b $14 + jr c, .DontRecalculate ld a, [wLoadedMonBoxLevel] ld [wLoadedMonLevel], a ld [W_CURENEMYLVL], a @@ -82,17 +82,17 @@ StatusScreen: ; 12953 (4:6953) ld [$ff24], a ; Reduce the volume call GBPalWhiteOutWithDelay3 call ClearScreen - call UpdateSprites ; move sprites (?) + call UpdateSprites call LoadHpBarAndStatusTilePatterns - ld de, BattleHudTiles1 ; $6080 ; source + ld de, BattleHudTiles1 ; source ld hl, vChars2 + $6d0 ; dest ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8 call CopyVideoDataDouble ; ·│ :L and halfarrow line end - ld de, BattleHudTiles2 ; $6098 + ld de, BattleHudTiles2 ld hl, vChars2 + $780 ld bc, (BANK(BattleHudTiles2) << 8) + $01 call CopyVideoDataDouble ; │ - ld de, BattleHudTiles3 ; $60b0 + ld de, BattleHudTiles3 ld hl, vChars2 + $760 ld bc, (BANK(BattleHudTiles3) << 8) + $02 call CopyVideoDataDouble ; ─┘ @@ -127,7 +127,7 @@ StatusScreen: ; 12953 (4:6953) hlCoord 16, 6 ld de, wLoadedMonStatus call PrintStatusCondition - jr nz, .StatusWritten ; 0x129fc $9 + jr nz, .StatusWritten hlCoord 16, 6 ld de, OKText call PlaceString ; "OK" @@ -147,14 +147,14 @@ StatusScreen: ; 12953 (4:6953) call PrintNumber ; Pokémon no. hlCoord 11, 10 predef PrintMonType - ld hl, NamePointers2 ; $6a9d - call .unk_12a7e + ld hl, NamePointers2 + call .asm_12a7e ld d, h ld e, l hlCoord 9, 1 call PlaceString ; Pokémon name - ld hl, OTPointers ; $6a95 - call .unk_12a7e + ld hl, OTPointers + call .asm_12a7e ld d, h ld e, l hlCoord 12, 16 @@ -175,7 +175,7 @@ StatusScreen: ; 12953 (4:6953) pop af ld [hTilesetType], a ret -.unk_12a7e ; 0x12a7e ; I don't know what this does, iterates over pointers? +.asm_12a7e ; I don't know what this does, iterates over pointers? ld a, [wcc49] add a ld c, a @@ -221,20 +221,20 @@ OKText: ; 12ac4 (4:6ac4) db "OK@" ; Draws a line starting from hl high b and wide c -DrawLineBox ; 0x12ac7 +DrawLineBox: ; 0x12ac7 ld de, $0014 ; New line .PrintVerticalLine ld [hl], $78 ; │ add hl, de dec b - jr nz, .PrintVerticalLine ; 0x12ace $fa + jr nz, .PrintVerticalLine ld [hl], $77 ; ┘ dec hl .PrintHorizLine ld [hl], $76 ; ─ dec hl dec c - jr nz, .PrintHorizLine ; 0x12ad7 $fa + jr nz, .PrintHorizLine ld [hl], $6f ; ← (halfarrow ending) ret @@ -244,14 +244,14 @@ PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile PrintStatsBox: ; 12ae4 (4:6ae4) ld a, d and a ; a is 0 from the status screen - jr nz, .DifferentBox ; 0x12ae6 $12 + jr nz, .DifferentBox hlCoord 0, 8 ld b, $8 ld c, $8 call TextBoxBorder ; Draws the box hlCoord 1, 9 ; Start printing stats from here ld bc, $0019 ; Number offset - jr .PrintStats ; 0x12af8 $10 + jr .PrintStats .DifferentBox hlCoord 9, 2 ld b, $8 @@ -328,7 +328,7 @@ StatusScreen2: ; 12b57 (4:6b57) call Func_12ccb ; Print "PP" ld a, b and a - jr z, .InitPP ; 0x12bb3 $6 + jr z, .InitPP ld c, a ld a, "-" call Func_12ccb ; Fill the rest with -- @@ -339,7 +339,7 @@ StatusScreen2: ; 12b57 (4:6b57) .PrintPP ; 12bc3 ld a, [hli] and a - jr z, .PPDone ; 0x12bc5 $4a + jr z, .PPDone push bc push hl push de @@ -382,7 +382,7 @@ StatusScreen2: ; 12b57 (4:6b57) inc b ld a, b cp $4 - jr nz, .PrintPP ; 0x12c0f $b2 + jr nz, .PrintPP .PPDone hlCoord 9, 3 ld de, EXPPointsText @@ -390,7 +390,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld a, [wLoadedMonLevel] ; level push af cp MAX_LEVEL - jr z, .Level100 ; 0x12c20 $4 + jr z, .Level100 inc a ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 @@ -434,7 +434,7 @@ StatusScreen2: ; 12b57 (4:6b57) .asm_12c86 ; This does some magic with lvl/exp? ld a, [wLoadedMonLevel] ; Load level cp MAX_LEVEL - jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100 + jr z, .asm_12ca7 ; If 100 inc a ld d, a callab CalcExperience -- cgit v1.2.3 From ef9e59101e10aed82184bd2fd063b1109e2e4f6a Mon Sep 17 00:00:00 2001 From: dannye Date: Tue, 14 Jul 2015 02:16:19 -0500 Subject: Use more screen dimension constants --- engine/menu/status_screen.asm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index c9261804..7b3674e6 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -280,7 +280,7 @@ PrintStat push hl call PrintNumber pop hl - ld de, $0028 + ld de, SCREEN_WIDTH * 2 add hl, de ret @@ -323,15 +323,15 @@ StatusScreen2: ; 12b57 (4:6b57) sub c ld b, a ; Number of moves ? hlCoord 11, 10 - ld de, $0028 - ld a, $72 - call Func_12ccb ; Print "PP" + ld de, SCREEN_WIDTH * 2 + ld a, $72 ; special P tile id + call StatusScreen_PrintPP ; Print "PP" ld a, b and a jr z, .InitPP ld c, a ld a, "-" - call Func_12ccb ; Fill the rest with -- + call StatusScreen_PrintPP ; Fill the rest with -- .InitPP ; 12bbb ld hl, wLoadedMonMoves deCoord 14, 10 @@ -373,7 +373,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld bc, $0102 call PrintNumber pop hl - ld de, $0028 + ld de, SCREEN_WIDTH * 2 add hl, de ld d, h ld e, l @@ -411,9 +411,9 @@ StatusScreen2: ; 12b57 (4:6b57) ld bc, $0307 call PrintNumber hlCoord 9, 0 - call Func_12cc3 + call StatusScreen_ClearName hlCoord 9, 1 - call Func_12cc3 + call StatusScreen_ClearName ld a, [W_MONHDEXNUM] ld [wd11e], a call GetMonName @@ -463,15 +463,16 @@ EXPPointsText: ; 12caf (4:6caf) LevelUpText: ; 12cba (4:6cba) db "LEVEL UP@" -Func_12cc3: ; 12cc3 (4:6cc3) - ld bc, $a - ld a, $7f +StatusScreen_ClearName: ; 12cc3 (4:6cc3) + ld bc, 10 + ld a, " " jp FillMemory -Func_12ccb: ; 12ccb (4:6ccb) +StatusScreen_PrintPP: ; 12ccb (4:6ccb) +; print PP or -- c times, going down two rows each time ld [hli], a ld [hld], a add hl, de dec c - jr nz, Func_12ccb + jr nz, StatusScreen_PrintPP ret -- cgit v1.2.3 From 994c2cbf289efa2e23eabf1af96ba62e4f066005 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Tue, 14 Jul 2015 23:16:06 -0700 Subject: named wram variables --- engine/menu/status_screen.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 7b3674e6..32cbf519 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -316,7 +316,7 @@ StatusScreen2: ; 12b57 (4:6b57) hlCoord 2, 9 ld de, wMovesString call PlaceString ; Print moves - ld a, [wcd6c] + ld a, [wNumMovesMinusOne] inc a ld c, a ld a, $4 @@ -335,7 +335,7 @@ StatusScreen2: ; 12b57 (4:6b57) .InitPP ; 12bbb ld hl, wLoadedMonMoves deCoord 14, 10 - ld b, $0 + ld b, 0 .PrintPP ; 12bc3 ld a, [hli] and a @@ -356,15 +356,15 @@ StatusScreen2: ; 12b57 (4:6b57) pop de pop hl push hl - ld bc, $0014 + ld bc, wPartyMon1PP - wPartyMon1Moves - 1 add hl, bc ld a, [hl] and $3f - ld [wcd71], a + ld [wStatusScreenCurrentPP], a ld h, d ld l, e push hl - ld de, wcd71 + ld de, wStatusScreenCurrentPP ld bc, $0102 call PrintNumber ld a, "/" -- cgit v1.2.3 From bd7d9815936decc5b636f4235c0ee745812dcb48 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Wed, 15 Jul 2015 20:04:58 -0700 Subject: menu stuff --- engine/menu/status_screen.asm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 32cbf519..3f73a84f 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -65,9 +65,10 @@ DrawHP_: ; 128fb (4:68fb) ; Predef 0x37 StatusScreen: ; 12953 (4:6953) call LoadMonData - ld a, [wcc49] - cp $2 ; 2 means we're in a PC box + ld a, [wMonDataLocation] + cp BOX_DATA jr c, .DontRecalculate +; mon is in a box or daycare ld a, [wLoadedMonBoxLevel] ld [wLoadedMonLevel], a ld [W_CURENEMYLVL], a @@ -148,13 +149,13 @@ StatusScreen: ; 12953 (4:6953) hlCoord 11, 10 predef PrintMonType ld hl, NamePointers2 - call .asm_12a7e + call .GetStringPointer ld d, h ld e, l hlCoord 9, 1 call PlaceString ; Pokémon name ld hl, OTPointers - call .asm_12a7e + call .GetStringPointer ld d, h ld e, l hlCoord 12, 16 @@ -175,17 +176,18 @@ StatusScreen: ; 12953 (4:6953) pop af ld [hTilesetType], a ret -.asm_12a7e ; I don't know what this does, iterates over pointers? - ld a, [wcc49] + +.GetStringPointer + ld a, [wMonDataLocation] add a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hli] ld h, [hl] ld l, a - ld a, [wcc49] - cp $3 + ld a, [wMonDataLocation] + cp DAYCARE_DATA ret z ld a, [wWhichPokemon] jp SkipFixedLengthTextEntries -- cgit v1.2.3 From 148d3f3cf28f9c270e3d5043af0692d95bc731c5 Mon Sep 17 00:00:00 2001 From: dannye Date: Sat, 18 Jul 2015 15:52:03 -0500 Subject: Consolidate coord macros --- engine/menu/status_screen.asm | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 3f73a84f..75de182b 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -105,7 +105,7 @@ StatusScreen: ; 12953 (4:6953) push af xor a ld [hTilesetType], a - hlCoord 19, 1 + coord hl, 19, 1 ld bc, $060a call DrawLineBox ; Draws the box around name, HP and status ld de, $fffa @@ -113,54 +113,54 @@ StatusScreen: ; 12953 (4:6953) ld [hl], $f2 ; . after No ("." is a different one) dec hl ld [hl], "№" - hlCoord 19, 9 + coord hl, 19, 9 ld bc, $0806 call DrawLineBox ; Draws the box around types, ID No. and OT - hlCoord 10, 9 + coord hl, 10, 9 ld de, Type1Text call PlaceString ; "TYPE1/" - hlCoord 11, 3 + coord hl, 11, 3 predef DrawHP ld hl, wcf25 call GetHealthBarColor ld b, $3 call GoPAL_SET ; SGB palette - hlCoord 16, 6 + coord hl, 16, 6 ld de, wLoadedMonStatus call PrintStatusCondition jr nz, .StatusWritten - hlCoord 16, 6 + coord hl, 16, 6 ld de, OKText call PlaceString ; "OK" .StatusWritten - hlCoord 9, 6 + coord hl, 9, 6 ld de, StatusText call PlaceString ; "STATUS/" - hlCoord 14, 2 + coord hl, 14, 2 call PrintLevel ; Pokémon level ld a, [W_MONHDEXNUM] ld [wd11e], a ld [wd0b5], a predef IndexToPokedex - hlCoord 3, 7 + coord hl, 3, 7 ld de, wd11e ld bc, $8103 ; Zero-padded, 3 call PrintNumber ; Pokémon no. - hlCoord 11, 10 + coord hl, 11, 10 predef PrintMonType ld hl, NamePointers2 call .GetStringPointer ld d, h ld e, l - hlCoord 9, 1 + coord hl, 9, 1 call PlaceString ; Pokémon name ld hl, OTPointers call .GetStringPointer ld d, h ld e, l - hlCoord 12, 16 + coord hl, 12, 16 call PlaceString ; OT - hlCoord 12, 14 + coord hl, 12, 14 ld de, wLoadedMonOTID ld bc, $8205 ; 5 call PrintNumber ; ID Number @@ -168,7 +168,7 @@ StatusScreen: ; 12953 (4:6953) call PrintStatsBox call Delay3 call GBPalNormal - hlCoord 1, 0 + coord hl, 1, 0 call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture ld a, [wcf91] call PlayCry ; play Pokémon cry @@ -247,19 +247,19 @@ PrintStatsBox: ; 12ae4 (4:6ae4) ld a, d and a ; a is 0 from the status screen jr nz, .DifferentBox - hlCoord 0, 8 + coord hl, 0, 8 ld b, $8 ld c, $8 call TextBoxBorder ; Draws the box - hlCoord 1, 9 ; Start printing stats from here + coord hl, 1, 9 ; Start printing stats from here ld bc, $0019 ; Number offset jr .PrintStats .DifferentBox - hlCoord 9, 2 + coord hl, 9, 2 ld b, $8 ld c, $9 call TextBoxBorder - hlCoord 11, 3 + coord hl, 11, 3 ld bc, $0018 .PrintStats push bc @@ -306,16 +306,16 @@ StatusScreen2: ; 12b57 (4:6b57) ld bc, NUM_MOVES call CopyData callab FormatMovesString - hlCoord 9, 2 + coord hl, 9, 2 ld bc, $050a call ClearScreenArea ; Clear under name - hlCoord 19, 3 + coord hl, 19, 3 ld [hl], $78 - hlCoord 0, 8 + coord hl, 0, 8 ld b, $8 ld c, $12 call TextBoxBorder ; Draw move container - hlCoord 2, 9 + coord hl, 2, 9 ld de, wMovesString call PlaceString ; Print moves ld a, [wNumMovesMinusOne] @@ -324,7 +324,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld a, $4 sub c ld b, a ; Number of moves ? - hlCoord 11, 10 + coord hl, 11, 10 ld de, SCREEN_WIDTH * 2 ld a, $72 ; special P tile id call StatusScreen_PrintPP ; Print "PP" @@ -336,7 +336,7 @@ StatusScreen2: ; 12b57 (4:6b57) call StatusScreen_PrintPP ; Fill the rest with -- .InitPP ; 12bbb ld hl, wLoadedMonMoves - deCoord 14, 10 + coord de, 14, 10 ld b, 0 .PrintPP ; 12bc3 ld a, [hli] @@ -386,7 +386,7 @@ StatusScreen2: ; 12b57 (4:6b57) cp $4 jr nz, .PrintPP .PPDone - hlCoord 9, 3 + coord hl, 9, 3 ld de, EXPPointsText call PlaceString ld a, [wLoadedMonLevel] ; level @@ -396,7 +396,7 @@ StatusScreen2: ; 12b57 (4:6b57) inc a ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 - hlCoord 14, 6 + coord hl, 14, 6 ld [hl], $70 ; 1-tile "to" inc hl inc hl @@ -404,22 +404,22 @@ StatusScreen2: ; 12b57 (4:6b57) pop af ld [wLoadedMonLevel], a ld de, wLoadedMonExp - hlCoord 12, 4 + coord hl, 12, 4 ld bc, $0307 call PrintNumber ; exp call .asm_12c86 ld de, wLoadedMonExp - hlCoord 7, 6 + coord hl, 7, 6 ld bc, $0307 call PrintNumber - hlCoord 9, 0 + coord hl, 9, 0 call StatusScreen_ClearName - hlCoord 9, 1 + coord hl, 9, 1 call StatusScreen_ClearName ld a, [W_MONHDEXNUM] ld [wd11e], a call GetMonName - hlCoord 9, 1 + coord hl, 9, 1 call PlaceString ld a, $1 ld [$ffba], a -- cgit v1.2.3 From c169073eed4f0362ef42170098a141a2fcbd71d0 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 18 Jul 2015 20:49:52 -0700 Subject: misc --- engine/menu/status_screen.asm | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 75de182b..3bf3464a 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -297,8 +297,8 @@ StatusScreen2: ; 12b57 (4:6b57) push af xor a ld [hTilesetType], a - ld [$ffba], a - ld bc, $0005 + ld [H_AUTOBGTRANSFERENABLED], a + ld bc, NUM_MOVES + 1 ld hl, wMoves call FillMemory ld hl, wLoadedMonMoves @@ -307,13 +307,13 @@ StatusScreen2: ; 12b57 (4:6b57) call CopyData callab FormatMovesString coord hl, 9, 2 - ld bc, $050a + lb bc, 5, 10 call ClearScreenArea ; Clear under name coord hl, 19, 3 ld [hl], $78 coord hl, 0, 8 - ld b, $8 - ld c, $12 + ld b, 8 + ld c, 18 call TextBoxBorder ; Draw move container coord hl, 2, 9 ld de, wMovesString @@ -387,9 +387,9 @@ StatusScreen2: ; 12b57 (4:6b57) jr nz, .PrintPP .PPDone coord hl, 9, 3 - ld de, EXPPointsText + ld de, StatusScreenExpText call PlaceString - ld a, [wLoadedMonLevel] ; level + ld a, [wLoadedMonLevel] push af cp MAX_LEVEL jr z, .Level100 @@ -407,11 +407,11 @@ StatusScreen2: ; 12b57 (4:6b57) coord hl, 12, 4 ld bc, $0307 call PrintNumber ; exp - call .asm_12c86 + call CalcExpToLevelUp ld de, wLoadedMonExp coord hl, 7, 6 ld bc, $0307 - call PrintNumber + call PrintNumber ; exp needed to level up coord hl, 9, 0 call StatusScreen_ClearName coord hl, 9, 1 @@ -422,7 +422,7 @@ StatusScreen2: ; 12b57 (4:6b57) coord hl, 9, 1 call PlaceString ld a, $1 - ld [$ffba], a + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call WaitForTextScrollButtonPress ; wait for button pop af @@ -433,25 +433,26 @@ StatusScreen2: ; 12b57 (4:6b57) ld [$ff24], a call GBPalWhiteOut jp ClearScreen -.asm_12c86 ; This does some magic with lvl/exp? - ld a, [wLoadedMonLevel] ; Load level + +CalcExpToLevelUp: ; 12c86 (4:6c86) + ld a, [wLoadedMonLevel] cp MAX_LEVEL - jr z, .asm_12ca7 ; If 100 + jr z, .atMaxLevel inc a ld d, a callab CalcExperience ld hl, wLoadedMonExp + 2 - ld a, [$ff98] + ld a, [hExperience + 2] sub [hl] ld [hld], a - ld a, [$ff97] + ld a, [hExperience + 1] sbc [hl] ld [hld], a - ld a, [$ff96] + ld a, [hExperience] sbc [hl] ld [hld], a ret -.asm_12ca7 +.atMaxLevel ld hl, wLoadedMonExp xor a ld [hli], a @@ -459,11 +460,9 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hl], a ret -EXPPointsText: ; 12caf (4:6caf) - db "EXP POINTS", $4e - -LevelUpText: ; 12cba (4:6cba) - db "LEVEL UP@" +StatusScreenExpText: ; 12caf (4:6caf) + db "EXP POINTS" + next "LEVEL UP@" StatusScreen_ClearName: ; 12cc3 (4:6cc3) ld bc, 10 -- cgit v1.2.3 From 56d75db28ad827d514f3c2c52da0fe4ba2759610 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 27 Jul 2015 18:48:44 -0700 Subject: constants for PrintNumber --- engine/menu/status_screen.asm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 3bf3464a..c6550217 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -50,12 +50,12 @@ DrawHP_: ; 128fb (4:68fb) .printFraction add hl, bc ld de, wLoadedMonHP - ld bc, $203 + lb bc, 2, 3 call PrintNumber ld a, "/" ld [hli], a ld de, wLoadedMonMaxHP - ld bc, $203 + lb bc, 2, 3 call PrintNumber pop hl pop de @@ -144,7 +144,7 @@ StatusScreen: ; 12953 (4:6953) predef IndexToPokedex coord hl, 3, 7 ld de, wd11e - ld bc, $8103 ; Zero-padded, 3 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; Pokémon no. coord hl, 11, 10 predef PrintMonType @@ -162,7 +162,7 @@ StatusScreen: ; 12953 (4:6953) call PlaceString ; OT coord hl, 12, 14 ld de, wLoadedMonOTID - ld bc, $8205 ; 5 + lb bc, LEADING_ZEROES | 2, 5 call PrintNumber ; ID Number ld d, $0 call PrintStatsBox @@ -270,7 +270,7 @@ PrintStatsBox: ; 12ae4 (4:6ae4) pop bc add hl, bc ld de, wLoadedMonAttack - ld bc, $0203 ; three digits + lb bc, 2, 3 call PrintStat ld de, wLoadedMonDefense call PrintStat @@ -367,12 +367,12 @@ StatusScreen2: ; 12b57 (4:6b57) ld l, e push hl ld de, wStatusScreenCurrentPP - ld bc, $0102 + lb bc, 1, 2 call PrintNumber ld a, "/" ld [hli], a ld de, wd11e - ld bc, $0102 + lb bc, 1, 2 call PrintNumber pop hl ld de, SCREEN_WIDTH * 2 @@ -405,12 +405,12 @@ StatusScreen2: ; 12b57 (4:6b57) ld [wLoadedMonLevel], a ld de, wLoadedMonExp coord hl, 12, 4 - ld bc, $0307 + lb bc, 3, 7 call PrintNumber ; exp call CalcExpToLevelUp ld de, wLoadedMonExp coord hl, 7, 6 - ld bc, $0307 + lb bc, 3, 7 call PrintNumber ; exp needed to level up coord hl, 9, 0 call StatusScreen_ClearName -- cgit v1.2.3 From f8a9c37a0019eb085c22c6e3ae53b16ff0cd4f6a Mon Sep 17 00:00:00 2001 From: dannye Date: Wed, 5 Aug 2015 16:20:29 -0500 Subject: Use more lb and other clean up --- engine/menu/status_screen.asm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index c6550217..d8a504bb 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -87,34 +87,34 @@ StatusScreen: ; 12953 (4:6953) call LoadHpBarAndStatusTilePatterns ld de, BattleHudTiles1 ; source ld hl, vChars2 + $6d0 ; dest - ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8 + lb bc, BANK(BattleHudTiles1), $03 call CopyVideoDataDouble ; ·│ :L and halfarrow line end ld de, BattleHudTiles2 ld hl, vChars2 + $780 - ld bc, (BANK(BattleHudTiles2) << 8) + $01 + lb bc, BANK(BattleHudTiles2), $01 call CopyVideoDataDouble ; │ ld de, BattleHudTiles3 ld hl, vChars2 + $760 - ld bc, (BANK(BattleHudTiles3) << 8) + $02 + lb bc, BANK(BattleHudTiles3), $02 call CopyVideoDataDouble ; ─┘ ld de, PTile ld hl, vChars2 + $720 - ld bc,(BANK(PTile) << 8 | $01) + lb bc, BANK(PTile), $01 call CopyVideoDataDouble ; P (for PP), inline ld a, [hTilesetType] push af xor a ld [hTilesetType], a coord hl, 19, 1 - ld bc, $060a + lb bc, 6, 10 call DrawLineBox ; Draws the box around name, HP and status - ld de, $fffa + ld de, -6 add hl, de ld [hl], $f2 ; . after No ("." is a different one) dec hl ld [hl], "№" coord hl, 19, 9 - ld bc, $0806 + lb bc, 8, 6 call DrawLineBox ; Draws the box around types, ID No. and OT coord hl, 10, 9 ld de, Type1Text @@ -224,7 +224,7 @@ OKText: ; 12ac4 (4:6ac4) ; Draws a line starting from hl high b and wide c DrawLineBox: ; 0x12ac7 - ld de, $0014 ; New line + ld de, SCREEN_WIDTH ; New line .PrintVerticalLine ld [hl], $78 ; │ add hl, de -- cgit v1.2.3 From f658aff5383fa1e22343efc17e4551c6e7685a39 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 7 Aug 2015 05:20:37 -0700 Subject: named wram variables --- engine/menu/status_screen.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index d8a504bb..34e2539a 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -371,7 +371,7 @@ StatusScreen2: ; 12b57 (4:6b57) call PrintNumber ld a, "/" ld [hli], a - ld de, wd11e + ld de, wMaxPP lb bc, 1, 2 call PrintNumber pop hl -- cgit v1.2.3 From 40c1ecb4374a83d9511fe2c5fa99704d9cfc521b Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 7 Aug 2015 12:39:29 -0700 Subject: fixed names --- engine/menu/status_screen.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 34e2539a..c13d7c85 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -138,7 +138,7 @@ StatusScreen: ; 12953 (4:6953) call PlaceString ; "STATUS/" coord hl, 14, 2 call PrintLevel ; Pokémon level - ld a, [W_MONHDEXNUM] + ld a, [W_MONHINDEX] ld [wd11e], a ld [wd0b5], a predef IndexToPokedex @@ -416,7 +416,7 @@ StatusScreen2: ; 12b57 (4:6b57) call StatusScreen_ClearName coord hl, 9, 1 call StatusScreen_ClearName - ld a, [W_MONHDEXNUM] + ld a, [W_MONHINDEX] ld [wd11e], a call GetMonName coord hl, 9, 1 -- cgit v1.2.3 From 2b018159997e3b580efd114ff4e3548a0de3cbc5 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 8 Aug 2015 22:32:44 -0700 Subject: commented audio code --- engine/menu/status_screen.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index c13d7c85..bc58ba21 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -80,7 +80,7 @@ StatusScreen: ; 12953 (4:6953) ld hl, wd72c set 1, [hl] ld a, $33 - ld [$ff24], a ; Reduce the volume + ld [rNR50], a ; Reduce the volume call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites @@ -430,7 +430,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld hl, wd72c res 1, [hl] ld a, $77 - ld [$ff24], a + ld [rNR50], a call GBPalWhiteOut jp ClearScreen -- cgit v1.2.3 From 8a6d46f3d9ba4fb6939eb9ea9949f47aa8608d4a Mon Sep 17 00:00:00 2001 From: dannye Date: Sun, 9 Aug 2015 23:56:20 -0500 Subject: Replace some hardcoded data sizes --- engine/menu/status_screen.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index d8a504bb..c959400a 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -99,7 +99,7 @@ StatusScreen: ; 12953 (4:6953) call CopyVideoDataDouble ; ─┘ ld de, PTile ld hl, vChars2 + $720 - lb bc, BANK(PTile), $01 + lb bc, BANK(PTile), (PTileEnd - PTile) / $8 call CopyVideoDataDouble ; P (for PP), inline ld a, [hTilesetType] push af @@ -242,6 +242,7 @@ DrawLineBox: ; 0x12ac7 PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile INCBIN "gfx/p_tile.1bpp" +PTileEnd: PrintStatsBox: ; 12ae4 (4:6ae4) ld a, d -- cgit v1.2.3 From 64cfbcce7a71e6e75553575490fd60cbd61a5665 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Wed, 12 Aug 2015 02:16:56 -0700 Subject: commented SGB palette stuff --- engine/menu/status_screen.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/menu/status_screen.asm') diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index fb4a0dfc..c91d5eda 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -121,10 +121,10 @@ StatusScreen: ; 12953 (4:6953) call PlaceString ; "TYPE1/" coord hl, 11, 3 predef DrawHP - ld hl, wcf25 + ld hl, wStatusScreenHPBarColor call GetHealthBarColor - ld b, $3 - call GoPAL_SET ; SGB palette + ld b, SET_PAL_STATUS_SCREEN + call RunPaletteCommand coord hl, 16, 6 ld de, wLoadedMonStatus call PrintStatusCondition -- cgit v1.2.3