mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
rgbds supports 'X - 1' instead of 'X + -1'
This commit is contained in:
parent
5a5f5ececd
commit
6a6ba10315
@ -1294,7 +1294,7 @@ GetNoiseSample:
|
||||
; load ptr to sample header in wNoiseSampleAddress
|
||||
; are we on the last channel?
|
||||
ld a, [wCurChannel]
|
||||
and NUM_MUSIC_CHANS + -1
|
||||
and NUM_MUSIC_CHANS - 1
|
||||
cp CHAN4
|
||||
; ret if not
|
||||
ret nz
|
||||
|
@ -61,10 +61,10 @@ MOVE_LENGTH EQU const_value
|
||||
const STAT_DEF
|
||||
const STAT_SPD
|
||||
const STAT_SATK
|
||||
NUM_EXP_STATS EQU const_value + -1
|
||||
NUM_EXP_STATS EQU const_value - 1
|
||||
const STAT_SDEF
|
||||
NUM_STATS EQU const_value + -1
|
||||
NUM_BATTLE_STATS EQU NUM_STATS + -1 ; don't count HP
|
||||
NUM_STATS EQU const_value - 1
|
||||
NUM_BATTLE_STATS EQU NUM_STATS - 1 ; don't count HP
|
||||
|
||||
; stat formula constants
|
||||
STAT_MIN_NORMAL EQU 5
|
||||
|
@ -287,7 +287,7 @@ ENDM
|
||||
add_mt FLAMETHROWER
|
||||
add_mt THUNDERBOLT
|
||||
add_mt ICE_BEAM
|
||||
NUM_TM_HM_TUTOR EQU __enum__ + -1
|
||||
NUM_TM_HM_TUTOR EQU __enum__ - 1
|
||||
|
||||
const ITEM_FA ; fa
|
||||
|
||||
|
@ -257,7 +257,7 @@
|
||||
const ROCK_SMASH ; f9
|
||||
const WHIRLPOOL ; fa
|
||||
const BEAT_UP ; fb
|
||||
NUM_ATTACKS EQU const_value + -1
|
||||
NUM_ATTACKS EQU const_value - 1
|
||||
|
||||
const MOVE_OR_ANIM_FC ; fc
|
||||
const MOVE_OR_ANIM_FD ; fd
|
||||
|
@ -271,7 +271,7 @@ JOHTO_POKEMON EQU const_value
|
||||
const LUGIA ; f9
|
||||
const HO_OH ; fa
|
||||
const CELEBI ; fb
|
||||
NUM_POKEMON EQU const_value + -1
|
||||
NUM_POKEMON EQU const_value - 1
|
||||
const MON_FC ; fc
|
||||
const EGG ; fd
|
||||
const MON_FE ; fe
|
||||
@ -311,4 +311,4 @@ NUM_POKEMON EQU const_value + -1
|
||||
const UNOWN_X ; 24
|
||||
const UNOWN_Y ; 25
|
||||
const UNOWN_Z ; 26
|
||||
NUM_UNOWN EQU const_value + -1 ; 26
|
||||
NUM_UNOWN EQU const_value - 1 ; 26
|
||||
|
@ -124,7 +124,7 @@ MONS_PER_BOX EQU 20
|
||||
NUM_BOXES EQU 14
|
||||
|
||||
; hall of fame
|
||||
HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH + -1) ; species, id, dvs, level, nick
|
||||
HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) ; species, id, dvs, level, nick
|
||||
HOF_LENGTH EQU 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
|
||||
NUM_HOF_TEAMS EQU 30
|
||||
|
||||
|
@ -224,7 +224,7 @@ EMOTE_FROM_MEM EQU -1
|
||||
const FRUITTREE_PEWTER_CITY_1 ; 1c
|
||||
const FRUITTREE_PEWTER_CITY_2 ; 1d
|
||||
const FRUITTREE_FUCHSIA_CITY ; 1e
|
||||
NUM_FRUIT_TREES EQU const_value + -1
|
||||
NUM_FRUIT_TREES EQU const_value - 1
|
||||
|
||||
; describedecoration arguments
|
||||
; DescribeDecoration.JumpTable indexes (see engine/overworld/decorations.asm)
|
||||
|
@ -38,7 +38,7 @@ _tgt = 0
|
||||
endc
|
||||
|
||||
if "\1" == "north"
|
||||
_blk = \3_WIDTH * (\3_HEIGHT + -3) + _src
|
||||
_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src
|
||||
_map = _tgt
|
||||
_win = (\3_WIDTH + 6) * \3_HEIGHT + 1
|
||||
_y = \3_HEIGHT * 2 - 1
|
||||
@ -60,9 +60,9 @@ _len = \3_WIDTH
|
||||
endc
|
||||
|
||||
elif "\1" == "west"
|
||||
_blk = (\3_WIDTH * _src) + \3_WIDTH + -3
|
||||
_blk = (\3_WIDTH * _src) + \3_WIDTH - 3
|
||||
_map = (CURRENT_MAP_WIDTH + 6) * _tgt
|
||||
_win = (\3_WIDTH + 6) * 2 + -6
|
||||
_win = (\3_WIDTH + 6) * 2 - 6
|
||||
_y = (\4) * -2
|
||||
_x = \3_WIDTH * 2 - 1
|
||||
_len = CURRENT_MAP_HEIGHT + 3 - (\4)
|
||||
|
@ -4,7 +4,7 @@
|
||||
roam_map: MACRO
|
||||
map_id \1
|
||||
db _NARG - 1
|
||||
rept _NARG + -1
|
||||
rept _NARG - 1
|
||||
map_id \2
|
||||
shift
|
||||
endr
|
||||
|
@ -1840,8 +1840,8 @@ This bug can allow you to talk to Eusine in Celadon City and encounter Ho-Oh wit
|
||||
|
||||
ld hl, wPlayerName
|
||||
|
||||
-rept NAME_LENGTH_JAPANESE + -2 ; should be PLAYER_NAME_LENGTH + -2
|
||||
+rept PLAYER_NAME_LENGTH + -2
|
||||
-rept NAME_LENGTH_JAPANESE - 2 ; should be PLAYER_NAME_LENGTH - 2
|
||||
+rept PLAYER_NAME_LENGTH - 2
|
||||
ld a, [de]
|
||||
cp [hl]
|
||||
jr nz, .notfound
|
||||
|
@ -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:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user