You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
rgbds supports 'X - 1' instead of 'X + -1'
This commit is contained in:
@@ -244,7 +244,7 @@ BattleAnim_ClearOAM:
|
||||
ld a, [hl]
|
||||
and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; PAL_BATTLE_OB_ENEMY (0)
|
||||
ld [hli], a
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
dec c
|
||||
|
||||
@@ -395,10 +395,10 @@ ValidateBTParty:
|
||||
ld a, [hl]
|
||||
and a
|
||||
x = $ff
|
||||
rept ($ff + -NUM_POKEMON)
|
||||
rept ($ff - NUM_POKEMON)
|
||||
jr z, .invalid
|
||||
cp x
|
||||
x = x + -1
|
||||
x = x - 1
|
||||
endr
|
||||
jr nz, .valid
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ DetermineContestWinners:
|
||||
CopyTempContestant:
|
||||
; Could've just called CopyBytes.
|
||||
ld de, wBugContestTempWinnerID
|
||||
rept BUG_CONTESTANT_SIZE + -1
|
||||
rept BUG_CONTESTANT_SIZE - 1
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
|
||||
@@ -57,7 +57,7 @@ CelebiShrineEvent:
|
||||
ld c, 4
|
||||
.OAMloop:
|
||||
ld [hli], a ; tile id
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
inc a
|
||||
|
||||
@@ -383,7 +383,7 @@ FlyToAnim:
|
||||
ld c, 4
|
||||
.OAMloop
|
||||
ld [hli], a ; tile id
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
inc a
|
||||
|
||||
@@ -98,10 +98,10 @@ RotateUnownFrontpic:
|
||||
gbprinterrect: MACRO
|
||||
y = 0
|
||||
rept \1
|
||||
x = \1 * (\2 + -1) + y
|
||||
x = \1 * (\2 - 1) + y
|
||||
rept \2
|
||||
dw wGameboyPrinterRAM tile x
|
||||
x = x + -\2
|
||||
x = x - \2
|
||||
endr
|
||||
y = y + 1
|
||||
endr
|
||||
|
||||
@@ -261,7 +261,7 @@ Unreferenced_Function9282c:
|
||||
ld a, [hl]
|
||||
xor %00100000
|
||||
ld [hli], a ; tile id
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
dec c
|
||||
|
||||
@@ -538,7 +538,7 @@ PokeAnim_CopyBitmaskToBuffer:
|
||||
poke_anim_box: MACRO
|
||||
y = 7
|
||||
rept \1
|
||||
x = 7 + -\1
|
||||
x = 7 - \1
|
||||
rept \1
|
||||
db x + y
|
||||
x = x + 1
|
||||
|
||||
@@ -114,7 +114,7 @@ Options_TextSpeed:
|
||||
ld a, c ; right pressed
|
||||
cp OPT_TEXT_SPEED_SLOW
|
||||
jr c, .Increase
|
||||
ld c, OPT_TEXT_SPEED_FAST + -1
|
||||
ld c, OPT_TEXT_SPEED_FAST - 1
|
||||
|
||||
.Increase:
|
||||
inc c
|
||||
|
||||
@@ -1796,16 +1796,16 @@ endr
|
||||
hue = 31
|
||||
rept 8
|
||||
RGB hue, hue, hue
|
||||
hue = hue + -1
|
||||
hue = hue - 1
|
||||
RGB hue, hue, hue
|
||||
hue = hue + -2
|
||||
hue = hue - 2
|
||||
endr
|
||||
|
||||
.SlowFadePalettes:
|
||||
hue = 31
|
||||
rept 16
|
||||
RGB hue, hue, hue
|
||||
hue = hue + -1
|
||||
hue = hue - 1
|
||||
endr
|
||||
|
||||
Intro_LoadTilemap:
|
||||
|
||||
@@ -339,7 +339,7 @@ EvolutionAnimation:
|
||||
ld a, [hl]
|
||||
or b
|
||||
ld [hli], a ; attributes
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
dec c
|
||||
|
||||
@@ -356,7 +356,7 @@ AnimateTitleCrystal:
|
||||
ld a, [hl]
|
||||
add 2
|
||||
ld [hli], a ; y
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
inc hl
|
||||
endr
|
||||
dec c
|
||||
|
||||
@@ -1472,7 +1472,7 @@ BillsPC_UpdateSelectionCursor:
|
||||
inc hl
|
||||
ld [de], a ; y
|
||||
inc de
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
@@ -1520,7 +1520,7 @@ BillsPC_UpdateInsertCursor:
|
||||
inc hl
|
||||
ld [de], a ; y
|
||||
inc de
|
||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
|
||||
@@ -117,7 +117,7 @@ GeneratePartyMonStats:
|
||||
and a
|
||||
jr nz, .randomlygeneratemoves
|
||||
ld de, wEnemyMonMoves
|
||||
rept NUM_MOVES + -1
|
||||
rept NUM_MOVES - 1
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
@@ -128,7 +128,7 @@ endr
|
||||
|
||||
.randomlygeneratemoves
|
||||
xor a
|
||||
rept NUM_MOVES + -1
|
||||
rept NUM_MOVES - 1
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hl], a
|
||||
|
||||
@@ -216,7 +216,7 @@ CheckOwnMon:
|
||||
|
||||
ld hl, wPlayerName
|
||||
|
||||
rept NAME_LENGTH_JAPANESE + -2 ; should be PLAYER_NAME_LENGTH + -2
|
||||
rept NAME_LENGTH_JAPANESE - 2 ; should be PLAYER_NAME_LENGTH - 2
|
||||
ld a, [de]
|
||||
cp [hl]
|
||||
jr nz, .notfound
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const PINK_PAGE ; 1
|
||||
const GREEN_PAGE ; 2
|
||||
const BLUE_PAGE ; 3
|
||||
NUM_STAT_PAGES EQU const_value + -1
|
||||
NUM_STAT_PAGES EQU const_value - 1
|
||||
|
||||
STAT_PAGE_MASK EQU %00000011
|
||||
|
||||
|
||||
Reference in New Issue
Block a user