mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Use compound assignment operators
This commit is contained in:
parent
64e2b66a61
commit
865d37e02a
8 changed files with 23 additions and 23 deletions
|
|
@ -261,8 +261,8 @@ event_fill_start = event_start_byte + 1
|
|||
event_fill_count = event_end_byte - event_start_byte - 1
|
||||
|
||||
IF ((\1) % 8) == 0
|
||||
event_fill_start = event_fill_start - 1
|
||||
event_fill_count = event_fill_count + 1
|
||||
event_fill_start -= 1
|
||||
event_fill_count += 1
|
||||
ELSE
|
||||
ld a, [wEventFlags + event_start_byte]
|
||||
or $ff - ((1 << ((\1) % 8)) - 1)
|
||||
|
|
@ -270,7 +270,7 @@ event_fill_count = event_fill_count + 1
|
|||
ENDC
|
||||
|
||||
IF ((\2) % 8) == 7
|
||||
event_fill_count = event_fill_count + 1
|
||||
event_fill_count += 1
|
||||
ENDC
|
||||
|
||||
IF event_fill_count == 1
|
||||
|
|
@ -323,8 +323,8 @@ event_fill_start = event_start_byte + 1
|
|||
event_fill_count = event_end_byte - event_start_byte - 1
|
||||
|
||||
IF ((\1) % 8) == 0
|
||||
event_fill_start = event_fill_start - 1
|
||||
event_fill_count = event_fill_count + 1
|
||||
event_fill_start -= 1
|
||||
event_fill_count += 1
|
||||
ELSE
|
||||
ld a, [wEventFlags + event_start_byte]
|
||||
and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff
|
||||
|
|
@ -332,7 +332,7 @@ event_fill_count = event_fill_count + 1
|
|||
ENDC
|
||||
|
||||
IF ((\2) % 8) == 7
|
||||
event_fill_count = event_fill_count + 1
|
||||
event_fill_count += 1
|
||||
ENDC
|
||||
|
||||
IF event_fill_count == 1
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ object_event: MACRO
|
|||
ELSE
|
||||
db \6
|
||||
ENDC
|
||||
{_NUM_OBJECT_EVENTS} = {_NUM_OBJECT_EVENTS} + 1
|
||||
{_NUM_OBJECT_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
def_warp_events: MACRO
|
||||
|
|
@ -46,7 +46,7 @@ warp_event: MACRO
|
|||
db \2, \1, \4 - 1, \3
|
||||
_WARP_{d:{_NUM_WARP_EVENTS}}_X = \1
|
||||
_WARP_{d:{_NUM_WARP_EVENTS}}_Y = \2
|
||||
{_NUM_WARP_EVENTS} = {_NUM_WARP_EVENTS} + 1
|
||||
{_NUM_WARP_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
def_bg_events: MACRO
|
||||
|
|
@ -60,7 +60,7 @@ ENDM
|
|||
;\3 sign id
|
||||
bg_event: MACRO
|
||||
db \2, \1, \3
|
||||
{_NUM_BG_EVENTS} = {_NUM_BG_EVENTS} + 1
|
||||
{_NUM_BG_EVENTS} += 1
|
||||
ENDM
|
||||
|
||||
;\1 source map
|
||||
|
|
@ -101,7 +101,7 @@ _cur_bit = CURRENT_TRAINER_BIT % 8
|
|||
db \2 << 4
|
||||
dw wEventFlags + (\1 - CURRENT_TRAINER_BIT) / 8
|
||||
dw \3, \5, \4, \4
|
||||
CURRENT_TRAINER_BIT = CURRENT_TRAINER_BIT + 1
|
||||
CURRENT_TRAINER_BIT += 1
|
||||
ENDM
|
||||
|
||||
;\1 x position
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue