You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Use compound assignment operators
This commit is contained in:
@@ -5,7 +5,7 @@ frame: MACRO
|
||||
x = \2
|
||||
if _NARG > 2
|
||||
rept _NARG - 2
|
||||
x = x | (1 << (\3 + 1))
|
||||
x |= 1 << (\3 + 1)
|
||||
shift
|
||||
endr
|
||||
endc
|
||||
|
@@ -17,7 +17,7 @@ scene_script: MACRO
|
||||
;\1: script pointer
|
||||
dw \1
|
||||
dw 0 ; filler
|
||||
{_NUM_SCENE_SCRIPTS} = {_NUM_SCENE_SCRIPTS} + 1
|
||||
{_NUM_SCENE_SCRIPTS} += 1
|
||||
ENDM
|
||||
|
||||
def_callbacks: MACRO
|
||||
@@ -30,7 +30,7 @@ callback: MACRO
|
||||
;\1: type: a MAPCALLBACK_* constant
|
||||
;\2: script pointer
|
||||
dbw \1, \2
|
||||
{_NUM_CALLBACKS} = {_NUM_CALLBACKS} + 1
|
||||
{_NUM_CALLBACKS} += 1
|
||||
ENDM
|
||||
|
||||
def_warp_events: MACRO
|
||||
@@ -46,7 +46,7 @@ warp_event: MACRO
|
||||
;\4: warp destination: starts at 1
|
||||
db \2, \1, \4
|
||||
map_id \3
|
||||
{_NUM_WARP_EVENTS} = {_NUM_WARP_EVENTS} + 1
|
||||
{_NUM_WARP_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
def_coord_events: MACRO
|
||||
@@ -64,7 +64,7 @@ coord_event: MACRO
|
||||
db 0 ; filler
|
||||
dw \4
|
||||
dw 0 ; filler
|
||||
{_NUM_COORD_EVENTS} = {_NUM_COORD_EVENTS} + 1
|
||||
{_NUM_COORD_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
def_bg_events: MACRO
|
||||
@@ -80,7 +80,7 @@ bg_event: MACRO
|
||||
;\4: script pointer
|
||||
db \2, \1, \3
|
||||
dw \4
|
||||
{_NUM_BG_EVENTS} = {_NUM_BG_EVENTS} + 1
|
||||
{_NUM_BG_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
def_object_events: MACRO
|
||||
@@ -114,7 +114,7 @@ object_event: MACRO
|
||||
dw \<12>, \<13>
|
||||
; the dummy PlayerObjectTemplate object_event has no def_object_events
|
||||
if DEF(_NUM_OBJECT_EVENTS)
|
||||
{_NUM_OBJECT_EVENTS} = {_NUM_OBJECT_EVENTS} + 1
|
||||
{_NUM_OBJECT_EVENTS} += 1
|
||||
endc
|
||||
ENDM
|
||||
|
||||
|
Reference in New Issue
Block a user