use "x + -1" not "x +- 1"

(TODO: use "x - 1" once rgbds allows it)
This commit is contained in:
Rangi
2018-02-02 22:55:38 -05:00
parent 45373ec601
commit e32e5212af
27 changed files with 36 additions and 37 deletions

View File

@@ -1320,7 +1320,7 @@ GetNoiseSample: ; e86c5
; load ptr to sample header in NoiseSampleAddress
; are we on the last channel?
ld a, [CurChannel]
and NUM_MUSIC_CHANS +- 1
and NUM_MUSIC_CHANS + -1
cp CHAN4
; ret if not
ret nz
@@ -2102,7 +2102,7 @@ Music_Volume: ; e89d2
; e89e1
Music_TempoRelative: ; e89e1
; set global tempo to current channel tempo +- param
; set global tempo to current channel tempo +/- param
; params: 1 signed
call GetMusicByte
ld e, a

View File

@@ -121,8 +121,7 @@ __enum__ = 0
deco GEODUDE_DOLL
deco MACHOP_DOLL
deco TENTACOOL_DOLL
NUM_NON_TROPHY_DECOS = __enum__
deco GOLD_TROPHY_DOLL
deco SILVER_TROPHY_DOLL
NUM_DECOS = __enum__
NUM_NON_TROPHY_DECOS = NUM_DECOS +- 2

View File

@@ -288,7 +288,7 @@ NUM_HMS = const_value - HM01
add_mt FLAMETHROWER
add_mt THUNDERBOLT
add_mt ICE_BEAM
NUM_TM_HM_TUTOR = __enum__ +- 1
NUM_TM_HM_TUTOR = __enum__ + -1
USE_SCRIPT_VAR EQU $00
ITEM_FROM_MEM EQU $ff

View File

@@ -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

View File

@@ -125,7 +125,7 @@ MONS_PER_BOX EQU 20
NUM_BOXES EQU 14
; hall of fame
HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH +- 1) ; species, id, dvs, level, nick
HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH + -1) ; species, id, dvs, level, nick
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
NUM_HOF_TEAMS = 30

View File

@@ -200,7 +200,7 @@ EMOTE_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/decorations.asm)

View File

@@ -4,7 +4,7 @@
roam_map: MACRO
map \1
db _NARG - 1
rept _NARG +- 1
rept _NARG + -1
map \2
shift
endr

View File

@@ -1110,7 +1110,7 @@ In [engine/search.asm](/engine/search.asm):
ld hl, PlayerName
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
@@ -1132,7 +1132,7 @@ endr
ret
```
**Fix:** Change `rept NAME_LENGTH_JAPANESE +- 2` to `rept PLAYER_NAME_LENGTH +- 2`.
**Fix:** Change `rept NAME_LENGTH_JAPANESE + -2` to `rept PLAYER_NAME_LENGTH + -2`.
## Catching a Transformed Pokémon always catches a Ditto

View File

@@ -263,7 +263,7 @@ BattleAnim_ClearCGB_OAMFlags: ; cc23d
ld a, [hl]
and $f0
ld [hli], a
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
inc hl
endr
dec c

View File

@@ -1510,7 +1510,7 @@ BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01)
inc hl
ld [de], a ; y
inc de
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
ld a, [hli]
ld [de], a
inc de
@@ -1560,7 +1560,7 @@ BillsPC_UpdateInsertCursor: ; e2e8c
inc hl
ld [de], a ; y
inc de
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
ld a, [hli]
ld [de], a
inc de

View File

@@ -408,10 +408,10 @@ ValidateBTParty: ; 170394
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

View File

@@ -229,7 +229,7 @@ DetermineContestWinners: ; 1383e
CopyTempContestant: ; 138a0
; 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

View File

@@ -57,7 +57,7 @@ CelebiShrineEvent: ; 4989a
ld c, 4
.OAMloop:
ld [hli], a ; tile id
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
inc hl
endr
inc a

View File

@@ -398,7 +398,7 @@ FlyToAnim: ; 8cb33
ld c, 4
.OAMloop
ld [hli], a ; tile id
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
inc hl
endr
inc a

View File

@@ -98,10 +98,10 @@ RotateUnownFrontpic: ; e0000
overworldmaprect: MACRO
y = 0
rept \1
x = \1 * (\2 +- 1) + y
x = \1 * (\2 + -1) + y
rept \2
dw OverworldMap tile x
x = x +- \2
x = x + -\2
endr
y = y + 1
endr

View File

@@ -352,7 +352,7 @@ EvolutionAnimation: ; 4e5e1
ld a, [hl]
or b
ld [hli], a ; attributes
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
inc hl
endr
dec c

View File

@@ -120,7 +120,7 @@ Options_TextSpeed: ; e42f5
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

View File

@@ -579,7 +579,7 @@ PokeAnim_CopyBitmaskToBuffer: ; d033b
poke_anim_box: MACRO
y = 7
rept \1
x = 7 +- \1
x = 7 + -\1
rept \1
db x + y
x = x + 1

View File

@@ -219,7 +219,7 @@ CheckOwnMon: ; 0x4a7ba
ld hl, PlayerName
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

View File

@@ -267,7 +267,7 @@ Unreferenced_Function9282c: ; 9282c
ld a, [hl]
xor %00100000
ld [hli], a ; tile id
rept SPRITEOAMSTRUCT_LENGTH +- 1
rept SPRITEOAMSTRUCT_LENGTH + -1
inc hl
endr
dec c

Some files were not shown because too many files have changed in this diff Show More