Skip to content

Commit 8875f8e

Browse files
committed
Require RGBDS 1.0.0
and fix warnings
1 parent 314c708 commit 8875f8e

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@master
1717
with:
1818
path: rgbds
19-
ref: v0.9.3
19+
ref: v1.0.0
2020
repository: gbdev/rgbds
2121

2222
- name: Install rgbds

src/constants/text_constants.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ DEF TX_HALFWIDTH EQU $06 ; sets wFontWidth to HALF_WIDTH
2727
DEF TX_HALF2FULL EQU $07 ; sets wFontWidth to FULL_WIDTH, and hJapaneseSyllabary to TX_KATAKANA
2828

2929
DEF TX_RAM1 EQU $09 ; prints the player's name or, in a duel, the turn duelist's name
30-
DEF TX_LINE EQU "\n" ; advances to a new line
30+
DEF TX_LINE EQU '\n' ; advances to a new line
3131
DEF TX_RAM2 EQU $0b ; prints text from wTxRam2 or wTxRam2_b
3232
DEF TX_RAM3 EQU $0c ; prints a number from wTxRam3 or wTxRam3_b
3333

src/engine/copy_card_name.asm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,20 @@ _CopyCardNameAndLevel_HalfwidthText:
109109
or a
110110
jr z, .level_done
111111
ld c, a
112-
ld a, " "
112+
ld a, ' '
113113
ld [hli], a
114114
dec b
115-
ld a, "L"
115+
ld a, 'L'
116116
ld [hli], a
117117
dec b
118-
ld a, "v"
118+
ld a, 'v'
119119
ld [hli], a
120120
dec b
121121
ld a, c
122122
cp 10
123123
jr c, .got_level
124124
push bc
125-
ld b, "0" - 1
125+
ld b, '0' - 1
126126
.first_digit_loop
127127
inc b
128128
sub 10
@@ -135,12 +135,12 @@ _CopyCardNameAndLevel_HalfwidthText:
135135
dec b
136136
.got_level
137137
ld a, c
138-
add "0"
138+
add '0'
139139
ld [hli], a ; last (or only) digit
140140
dec b
141141
.level_done
142142
push hl
143-
ld a, " "
143+
ld a, ' '
144144
.fill_spaces_loop
145145
ld [hli], a
146146
dec b

src/engine/menus/deck_selection.asm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,15 @@ InputCurDeckName:
354354
ld hl, wCurDeckName
355355
ld [hl], $6
356356
inc hl
357-
ld [hl], "D"
357+
ld [hl], 'D'
358358
inc hl
359-
ld [hl], "e"
359+
ld [hl], 'e'
360360
inc hl
361-
ld [hl], "c"
361+
ld [hl], 'c'
362362
inc hl
363-
ld [hl], "k"
363+
ld [hl], 'k'
364364
inc hl
365-
ld [hl], " "
365+
ld [hl], ' '
366366
inc hl
367367
ld de, wDefaultText + 2
368368
ld a, [de]

src/home/print_text.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CountLinesOfTextFromID::
6767
jr nc, .char_loop
6868
cp TX_HALFWIDTH
6969
jr c, .skip
70-
cp "\n"
70+
cp '\n'
7171
jr nz, .char_loop
7272
inc c
7373
jr .char_loop
@@ -410,7 +410,7 @@ TwoByteNumberToText_CountLeadingZeros::
410410
ld c, 4
411411
.digit_loop
412412
ld a, [hl]
413-
cp "0"
413+
cp '0'
414414
ret nz
415415
inc hl
416416
dec c

src/home/process_text.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ProcessSpecialTextCharacter::
5555
jr z, .set_syllabary
5656
cp TX_KATAKANA
5757
jr z, .set_syllabary
58-
cp "\n"
58+
cp '\n'
5959
jr z, .end_of_line
6060
cp TX_SYMBOL
6161
jr z, .tx_symbol
@@ -270,7 +270,7 @@ TerminateHalfWidthText::
270270
push hl
271271
push de
272272
push bc
273-
ld e, " "
273+
ld e, ' '
274274
call Func_22ca
275275
pop bc
276276
pop de
@@ -400,7 +400,7 @@ CaseHalfWidthLetter::
400400
ret c
401401
cp $7b
402402
ret nc
403-
sub "a" - "A"
403+
sub 'a' - 'A'
404404
ld e, a
405405
ret
406406

@@ -498,7 +498,7 @@ CopyTextData::
498498
jr c, .hw_text_done
499499
push hl
500500
.fill_hw_loop
501-
ld a, " "
501+
ld a, ' '
502502
ld [hli], a
503503
dec d
504504
jr nz, .fill_hw_loop

src/home/write_number.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ WriteBCDNumberInTextFormat::
7777
; format to hl. numbers above 9 end up converted to half-width font tiles.
7878
WriteBCDDigitInTextFormat::
7979
and $0f
80-
add "0"
81-
cp "9" + 1
80+
add '0'
81+
cp '9' + 1
8282
jr c, .write_num
8383
add $07
8484
.write_num
@@ -142,7 +142,7 @@ TwoByteNumberToText::
142142
pop bc
143143
ret
144144
.get_digit
145-
ld a, "0" - 1
145+
ld a, '0' - 1
146146
.subtract_loop
147147
inc a
148148
add hl, bc

src/macros/text.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ MACRO ldfw
7373
IF CHARSIZE(\2) > 1
7474
ld \1, CHARVAL(\2, 0) << 8 + CHARVAL(\2, 1)
7575
ELSE
76-
ld \1, \2
76+
ld \1, CHARVAL(\2)
7777
ENDC
7878
POPC
7979
ENDM

src/rgbdscheck.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
2-
fail "poketcg requires rgbds v0.9.3 or newer."
1+
IF !DEF(__RGBDS_MAJOR__)
2+
fail "poketcg requires rgbds v1.0.0 or newer."
33
ENDC
4-
IF __RGBDS_MAJOR__ == 0 && (__RGBDS_MINOR__ < 9 || (__RGBDS_MINOR__ == 9 && __RGBDS_PATCH__ < 3))
5-
fail "poketcg requires rgbds v0.9.3 or newer."
4+
IF __RGBDS_MAJOR__ < 1
5+
fail "poketcg requires rgbds v1.0.0 or newer."
66
ENDC

0 commit comments

Comments
 (0)