diff options
| author | dannye <33dannye@gmail.com> | 2025-11-12 17:56:10 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-11-12 17:56:10 -0600 |
| commit | 324ae167d15ae4eef3cda411e10201661e57d88d (patch) | |
| tree | 86c2b73ce1262f12c1b3eb82874e8572e80e583f /home | |
| parent | Separate surfing Pikachu graphics from audio engine code (diff) | |
| parent | Use features of RGBDS 1.0.0 (#537) (diff) | |
| download | pokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.tar.gz pokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.tar.xz pokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'home')
| -rw-r--r-- | home/copy2.asm | 24 | ||||
| -rw-r--r-- | home/copy_string.asm | 2 | ||||
| -rw-r--r-- | home/list_menu.asm | 8 | ||||
| -rw-r--r-- | home/names.asm | 8 | ||||
| -rw-r--r-- | home/names2.asm | 2 | ||||
| -rw-r--r-- | home/pokemon.asm | 10 | ||||
| -rw-r--r-- | home/print_bcd.asm | 10 | ||||
| -rw-r--r-- | home/print_num.asm | 8 | ||||
| -rw-r--r-- | home/text.asm | 86 | ||||
| -rw-r--r-- | home/vcopy.asm | 2 | ||||
| -rw-r--r-- | home/window.asm | 16 |
11 files changed, 88 insertions, 88 deletions
diff --git a/home/copy2.asm b/home/copy2.asm index 4acedf82..a9232034 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -172,39 +172,39 @@ GetFarByte:: ClearScreenArea:: ; Clear tilemap area cxb at hl. - ld a, " " ; blank tile - ld de, 20 ; screen width -.y + ld a, ' ' + ld de, SCREEN_WIDTH +.loopRows push hl push bc -.x +.loopTiles ld [hli], a dec c - jr nz, .x + jr nz, .loopTiles pop bc pop hl add hl, de dec b - jr nz, .y + jr nz, .loopRows ret CopyScreenTileBufferToVRAM:: ; Copy wTileMap to the BG Map starting at b * $100. ; This is done in thirds of 6 rows, so it takes 3 frames. - ld c, 6 + ld c, SCREEN_HEIGHT / 3 - ld hl, $600 * 0 + lb hl, 0, 0 decoord 0, 6 * 0 call .setup call DelayFrame - ld hl, $600 * 1 + lb hl, SCREEN_HEIGHT / 3, 0 decoord 0, 6 * 1 call .setup call DelayFrame - ld hl, $600 * 2 + lb hl, 2 * SCREEN_HEIGHT / 3, 0 decoord 0, 6 * 2 call .setup jp DelayFrame @@ -226,10 +226,10 @@ CopyScreenTileBufferToVRAM:: ClearScreen:: ; Clear wTileMap, then wait ; for the bg map to update. - ld bc, 20 * 18 + ld bc, SCREEN_AREA inc b hlcoord 0, 0 - ld a, " " + ld a, ' ' .loop ld [hli], a dec c diff --git a/home/copy_string.asm b/home/copy_string.asm index 05f9ba80..3531aaf8 100644 --- a/home/copy_string.asm +++ b/home/copy_string.asm @@ -8,6 +8,6 @@ CopyString:: ld a, [de] inc de ld [hli], a - cp "@" + cp '@' jr nz, CopyString ret diff --git a/home/list_menu.asm b/home/list_menu.asm index b09f1ebc..cae0a1d5 100644 --- a/home/list_menu.asm +++ b/home/list_menu.asm @@ -66,7 +66,7 @@ DisplayListMenuIDLoop:: and a ; is it the Old Man battle? jr z, .notOldManBattle .oldManBattle - ld a, "▶" + ld a, '▶' ldcoord_a 5, 4 ; place menu cursor in front of first menu entry ld c, 20 call DelayFrames @@ -475,7 +475,7 @@ PrintListMenuEntries:: push hl ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right add hl, bc - ld a, "×" + ld a, '×' ld [hli], a ld a, [wNamedObjectIndex] push af @@ -503,7 +503,7 @@ PrintListMenuEntries:: cp c ; is it this item? jr nz, .nextListEntry dec hl - ld a, "▷" + ld a, '▷' ld [hli], a .nextListEntry ld bc, 2 * SCREEN_WIDTH ; 2 rows @@ -514,7 +514,7 @@ PrintListMenuEntries:: jp nz, .loop ld bc, -8 add hl, bc - ld a, "▼" + ld a, '▼' ld [hl], a ret .printCancelMenuItem diff --git a/home/names.asm b/home/names.asm index 5848cb19..4b6f6903 100644 --- a/home/names.asm +++ b/home/names.asm @@ -16,7 +16,7 @@ GetMonName:: ld bc, NAME_LENGTH - 1 call CopyData ld hl, wNameBuffer + NAME_LENGTH - 1 - ld [hl], "@" + ld [hl], '@' pop de pop af ldh [hLoadedROMBank], a @@ -74,7 +74,7 @@ GetMachineName:: ; now get the machine number and convert it to text ld a, [wNamedObjectIndex] sub TM01 - 1 - ld b, "0" + ld b, '0' .FirstDigit sub 10 jr c, .SecondDigit @@ -87,11 +87,11 @@ GetMachineName:: ld [de], a inc de pop af - ld b, "0" + ld b, '0' add b ld [de], a inc de - ld a, "@" + ld a, '@' ld [de], a pop af ld [wNamedObjectIndex], a diff --git a/home/names2.asm b/home/names2.asm index d7a95e5c..f58287a1 100644 --- a/home/names2.asm +++ b/home/names2.asm @@ -74,7 +74,7 @@ GetName:: ld e, l .nextChar ld a, [hli] - cp "@" + cp '@' jr nz, .nextChar inc c ld a, b diff --git a/home/pokemon.asm b/home/pokemon.asm index b10861a6..2246e383 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -349,11 +349,11 @@ PrintStatusCondition:: pop de jr nz, PrintStatusConditionNotFainted ; if the pokemon's HP is 0, print "FNT" - ld a, "F" + ld a, 'F' ld [hli], a - ld a, "N" + ld a, 'N' ld [hli], a - ld [hl], "T" + ld [hl], 'T' and a ret @@ -365,7 +365,7 @@ PrintStatusConditionNotFainted:: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevel:: - ld a, "<LV>" ; ":L" tile ID + ld a, '<LV>' ; ":L" tile ID ld [hli], a ld c, 2 ; number of digits ld a, [wLoadedMonLevel] ; level @@ -381,7 +381,7 @@ PrintLevel:: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevelFull:: - ld a, "<LV>" ; ":L" tile ID + ld a, '<LV>' ; ":L" tile ID ld [hli], a ld c, 3 ; number of digits ld a, [wLoadedMonLevel] ; level diff --git a/home/print_bcd.asm b/home/print_bcd.asm index 57ec12a8..2e501be5 100644 --- a/home/print_bcd.asm +++ b/home/print_bcd.asm @@ -20,7 +20,7 @@ PrintBCDNumber:: jr z, .loop bit BIT_LEADING_ZEROES, b jr nz, .loop - ld [hl], "¥" + ld [hl], '¥' inc hl .loop ld a, [de] @@ -40,10 +40,10 @@ PrintBCDNumber:: .skipRightAlignmentAdjustment bit BIT_MONEY_SIGN, b jr z, .skipCurrencySymbol - ld [hl], "¥" + ld [hl], '¥' inc hl .skipCurrencySymbol - ld [hl], "0" + ld [hl], '0' call PrintLetterDelay inc hl .done @@ -59,13 +59,13 @@ PrintBCDDigit:: ; if bit 7 is set, then no numbers have been printed yet bit BIT_MONEY_SIGN, b jr z, .skipCurrencySymbol - ld [hl], "¥" + ld [hl], '¥' inc hl res BIT_MONEY_SIGN, b .skipCurrencySymbol res BIT_LEADING_ZEROES, b .outputDigit - add "0" + add '0' ld [hli], a jp PrintLetterDelay .zeroDigit diff --git a/home/print_num.asm b/home/print_num.asm index 4872d859..e0af0a4e 100644 --- a/home/print_num.asm +++ b/home/print_num.asm @@ -118,14 +118,14 @@ ENDM call .PrintLeadingZero jr .next .past - ld a, "0" + ld a, '0' add c ld [hl], a .next call .NextDigit .ones - ld a, "0" + ld a, '0' add b ld [hli], a pop de @@ -202,7 +202,7 @@ ENDM or c jr z, .PrintLeadingZero - ld a, "0" + ld a, '0' add c ld [hl], a ldh [hPastLeadingZeros], a @@ -211,7 +211,7 @@ ENDM .PrintLeadingZero: bit BIT_LEADING_ZEROES, d ret z - ld [hl], "0" + ld [hl], '0' ret .NextDigit: diff --git a/home/text.asm b/home/text.asm index 6a7b51f4..27c5b422 100644 --- a/home/text.asm +++ b/home/text.asm @@ -3,7 +3,7 @@ TextBoxBorder:: ; top row push hl - ld a, "┌" + ld a, '┌' ld [hli], a inc a ; "─" call .PlaceChars @@ -17,11 +17,11 @@ TextBoxBorder:: ; middle rows .next push hl - ld a, "│" + ld a, '│' ld [hli], a - ld a, " " + ld a, ' ' call .PlaceChars - ld [hl], "│" + ld [hl], '│' pop hl ld de, SCREEN_WIDTH @@ -30,11 +30,11 @@ TextBoxBorder:: jr nz, .next ; bottom row - ld a, "└" + ld a, '└' ld [hli], a - ld a, "─" + ld a, '─' call .PlaceChars - ld [hl], "┘" + ld [hl], '┘' ret .PlaceChars:: @@ -51,7 +51,7 @@ PlaceString:: PlaceNextChar:: ld a, [de] - cp "@" + cp '@' jr nz, .NotTerminator ld b, h ld c, l @@ -59,7 +59,7 @@ PlaceNextChar:: ret .NotTerminator - cp "<NEXT>" + cp '<NEXT>' jr nz, .NotNext ld bc, 2 * SCREEN_WIDTH ldh a, [hUILayoutFlags] @@ -73,7 +73,7 @@ PlaceNextChar:: jp NextChar .NotNext - cp "<LINE>" + cp '<LINE>' jr nz, .NotLine pop hl hlcoord 1, 16 @@ -83,26 +83,26 @@ PlaceNextChar:: .NotLine ; Check against a dictionary - dict "<NULL>", NullChar - dict "<SCROLL>", _ContTextNoPause - dict "<_CONT>", _ContText - dict "<PARA>", Paragraph - dict "<PAGE>", PageChar - dict "<PLAYER>", PrintPlayerName - dict "<RIVAL>", PrintRivalName - dict "#", PlacePOKe - dict "<PC>", PCChar - dict "<ROCKET>", RocketChar - dict "<TM>", TMChar - dict "<TRAINER>", TrainerChar - dict "<CONT>", ContText - dict "<……>", SixDotsChar - dict "<DONE>", DoneText - dict "<PROMPT>", PromptText - dict "<PKMN>", PlacePKMN - dict "<DEXEND>", PlaceDexEnd - dict "<TARGET>", PlaceMoveTargetsName - dict "<USER>", PlaceMoveUsersName + dict '<NULL>', NullChar + dict '<SCROLL>', _ContTextNoPause + dict '<_CONT>', _ContText + dict '<PARA>', Paragraph + dict '<PAGE>', PageChar + dict '<PLAYER>', PrintPlayerName + dict '<RIVAL>', PrintRivalName + dict '#', PlacePOKe + dict '<PC>', PCChar + dict '<ROCKET>', RocketChar + dict '<TM>', TMChar + dict '<TRAINER>', TrainerChar + dict '<CONT>', ContText + dict '<……>', SixDotsChar + dict '<DONE>', DoneText + dict '<PROMPT>', PromptText + dict '<PKMN>', PlacePKMN + dict '<DEXEND>', PlaceDexEnd + dict '<TARGET>', PlaceMoveTargetsName + dict '<USER>', PlaceMoveUsersName ld [hli], a call PrintLetterDelay @@ -202,7 +202,7 @@ ContCharText:: text_end PlaceDexEnd:: - ld [hl], "." + ld [hl], '.' pop hl ret @@ -210,12 +210,12 @@ PromptText:: ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, .ok - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 .ok call ProtectedDelay3 call ManualTextScroll - ld a, " " + ld a, ' ' ldcoord_a 18, 16 DoneText:: @@ -229,7 +229,7 @@ DoneText:: Paragraph:: push de - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 call ManualTextScroll @@ -246,12 +246,12 @@ PageChar:: ldh a, [hUILayoutFlags] bit BIT_PAGE_CHAR_IS_NEXT, a jr z, .pageChar - ld a, "<NEXT>" + ld a, '<NEXT>' jp PlaceNextChar.NotTerminator .pageChar push de - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 call ManualTextScroll @@ -267,13 +267,13 @@ PageChar:: jp NextChar _ContText:: - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 call ProtectedDelay3 push de call ManualTextScroll pop de - ld a, " " + ld a, ' ' ldcoord_a 18, 16 _ContTextNoPause:: push de @@ -298,7 +298,7 @@ ScrollTextUpOneLine:: dec b jr nz, .copyText hlcoord 1, 16 - ld a, " " + ld a, ' ' ld b, SCREEN_WIDTH - 2 .clearText ld [hli], a @@ -443,12 +443,12 @@ TextCommand_PROMPT_BUTTON:: ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, TextCommand_WAIT_BUTTON - ld a, "▼" + ld a, '▼' ldcoord_a 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed pop bc - ld a, " " + ld a, ' ' ldcoord_a 18, 16 ; overwrite down arrow with blank space pop hl jp NextTextCommand @@ -456,7 +456,7 @@ TextCommand_PROMPT_BUTTON:: TextCommand_SCROLL:: ; pushes text up two lines and sets the BC cursor to the border tile ; below the first character column of the text box. - ld a, " " + ld a, ' ' ldcoord_a 18, 16 ; place blank space in lower right corner of dialogue text box call ScrollTextUpOneLine call ScrollTextUpOneLine @@ -571,7 +571,7 @@ TextCommand_DOTS:: ld l, c .loop - ld a, "…" + ld a, '…' ld [hli], a push de call Joypad diff --git a/home/vcopy.asm b/home/vcopy.asm index 25997fcc..1a67cdb5 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -19,7 +19,7 @@ GetRowColAddressBgMap:: ; clears a VRAM background map with blank space tiles ; INPUT: h - high byte of background tile map address in VRAM ClearBgMap:: - ld a, " " + ld a, ' ' jr .next ld a, l .next diff --git a/home/window.asm b/home/window.asm index 18c00e79..c34b4f69 100644 --- a/home/window.asm +++ b/home/window.asm @@ -151,7 +151,7 @@ PlaceMenuCursor:: jr nz, .oldMenuItemLoop .checkForArrow1 ld a, [hl] - cp "▶" ; was an arrow next to the previously selected menu item? + cp '▶' ; was an arrow next to the previously selected menu item? jr nz, .skipClearingArrow .clearArrow ld a, [wTileBehindCursor] @@ -175,11 +175,11 @@ PlaceMenuCursor:: jr nz, .currentMenuItemLoop .checkForArrow2 ld a, [hl] - cp "▶" ; has the right arrow already been placed? + cp '▶' ; has the right arrow already been placed? jr z, .skipSavingTile ; if so, don't lose the saved tile ld [wTileBehindCursor], a ; save tile before overwriting with right arrow .skipSavingTile - ld a, "▶" ; place right arrow + ld a, '▶' ; place right arrow ld [hl], a ld a, l ld [wMenuCursorLocation], a @@ -199,7 +199,7 @@ PlaceUnfilledArrowMenuCursor:: ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld [hl], "▷" + ld [hl], '▷' ld a, b ret @@ -209,7 +209,7 @@ EraseMenuCursor:: ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld [hl], " " + ld [hl], ' ' ret ; This toggles a blinking down arrow at hl on and off after a delay has passed. @@ -223,7 +223,7 @@ EraseMenuCursor:: HandleDownArrowBlinkTiming:: ld a, [hl] ld b, a - ld a, "▼" + ld a, '▼' cp b jr nz, .downArrowOff .downArrowOn @@ -235,7 +235,7 @@ HandleDownArrowBlinkTiming:: dec a ldh [hDownArrowBlinkCount2], a ret nz - ld a, " " + ld a, ' ' ld [hl], a ld a, $ff ldh [hDownArrowBlinkCount1], a @@ -257,7 +257,7 @@ HandleDownArrowBlinkTiming:: ret nz ld a, $06 ldh [hDownArrowBlinkCount2], a - ld a, "▼" + ld a, '▼' ld [hl], a ret |
