diff options
author | Thomas Winwood <twwinwood@gmail.com> | 2018-07-21 02:06:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-21 02:06:31 +0100 |
commit | 23ef2f50a7b94c23b50e9e690a7482ac349c9ef3 (patch) | |
tree | 63c20c67efbdf8334c6e273f78065b83135e3886 /macros | |
parent | 17a4d0540acc00e3f5ad260009115eb36e72b7d2 (diff) | |
parent | 2d73d040d16a7836f935a7a6cb2a311aed2ca5a2 (diff) |
Merge branch 'master' into the-diffening
Diffstat (limited to 'macros')
-rw-r--r-- | macros/code.asm | 5 | ||||
-rw-r--r-- | macros/data.asm | 5 | ||||
-rw-r--r-- | macros/enum.asm | 2 | ||||
-rw-r--r-- | macros/legacy.asm | 3 | ||||
-rw-r--r-- | macros/scripts/battle_anims.asm | 2 | ||||
-rw-r--r-- | macros/scripts/maps.asm | 2 | ||||
-rw-r--r-- | macros/scripts/text.asm | 8 | ||||
-rw-r--r-- | macros/scripts/trade_anims.asm | 1 | ||||
-rw-r--r-- | macros/wram.asm | 24 |
9 files changed, 18 insertions, 34 deletions
diff --git a/macros/code.asm b/macros/code.asm index 09b15255e..9429884ca 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -1,11 +1,11 @@ ; Syntactic sugar macros lb: MACRO ; r, hi, lo - ld \1, (((\2) & $ff) << 8) | (((\3) & $ff)) + ld \1, ((\2) & $ff) << 8 | ((\3) & $ff) ENDM ln: MACRO ; r, hi, lo - ld \1, (((\2) & $f) << 4) | (((\3) & $f)) + ld \1, ((\2) & $f) << 4 | ((\3) & $f) ENDM ldpixel: MACRO @@ -19,7 +19,6 @@ ENDM depixel EQUS "ldpixel de," bcpixel EQUS "ldpixel bc," - ; Design patterns jumptable: MACRO diff --git a/macros/data.asm b/macros/data.asm index ad2d9b8ef..08a23ad29 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -2,7 +2,6 @@ percent EQUS "* $ff / 100" - ; Constant data (db, dw, dl) macros dwb: MACRO @@ -87,7 +86,6 @@ dba_pic: MACRO ; dbw bank, address dw \1 ENDM - dbpixel: MACRO if _NARG >= 4 ; x tile, x pxl, y tile, y pxl @@ -103,14 +101,12 @@ dsprite: MACRO db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6 ENDM - menu_coords: MACRO ; x1, y1, x2, y2 db \2, \1 ; start coords db \4, \3 ; end coords ENDM - bcd: MACRO rept _NARG dn ((\1) % 100) / 10, (\1) % 10 @@ -118,7 +114,6 @@ rept _NARG endr ENDM - sine_table: MACRO ; \1 samples of sin(x) from x=0 to x<32768 (pi radians) x = 0 diff --git a/macros/enum.asm b/macros/enum.asm index 385aee6f8..009400743 100644 --- a/macros/enum.asm +++ b/macros/enum.asm @@ -22,7 +22,6 @@ enum_set: MACRO __enum__ = \1 ENDM - ; Enumerate constants const_def: MACRO @@ -43,7 +42,6 @@ shift_const: MACRO const_value = const_value + 1 ENDM - ; Enumerate strings define: MACRO diff --git a/macros/legacy.asm b/macros/legacy.asm index 9e452da28..35e6e9ccb 100644 --- a/macros/legacy.asm +++ b/macros/legacy.asm @@ -8,7 +8,6 @@ callab EQUS "callfar" ; macros/scripts/audio.asm unknownmusic0xde EQUS "sound_duty" - ; macros/scripts/events.asm checkmorn EQUS "checktime MORN" @@ -54,7 +53,6 @@ displaylocation EQUS "landmarktotext" givepokeitem EQUS "givepokemail" checkpokeitem EQUS "checkpokemail" - ; macros/scripts/maps.asm mapconst: MACRO @@ -94,7 +92,6 @@ PERSONTYPE_SCRIPT EQUS "OBJECTTYPE_SCRIPT" PERSONTYPE_ITEMBALL EQUS "OBJECTTYPE_ITEMBALL" PERSONTYPE_TRAINER EQUS "OBJECTTYPE_TRAINER" - ; macros/scripts/movement.asm show_person EQUS "show_object" diff --git a/macros/scripts/battle_anims.asm b/macros/scripts/battle_anims.asm index 76300e78f..f25b6da22 100644 --- a/macros/scripts/battle_anims.asm +++ b/macros/scripts/battle_anims.asm @@ -295,7 +295,7 @@ anim_call: MACRO dw \1 ; address ENDM - enum anim_ret_command ; $ff +anim_ret_command EQU -1 ; $ff anim_ret: MACRO db anim_ret_command ENDM diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index d5f5b00e1..7f5947a55 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -3,7 +3,6 @@ map_id: MACRO db GROUP_\1, MAP_\1 ENDM - scene_script: MACRO ;\1: script pointer dw \1 @@ -75,7 +74,6 @@ object_event: MACRO dw \9 ENDM - trainer: MACRO ;\1: trainer group ;\2: trainer id diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index bff18c7ea..d1fec35db 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -46,9 +46,9 @@ text_low: MACRO db TX_LOW ENDM - enum WAIT_BUTTON ; $06 + enum TX_WAIT_BUTTON ; $06 text_waitbutton: MACRO - db WAIT_BUTTON + db TX_WAIT_BUTTON ENDM enum TX_SCROLL ; $07 @@ -56,9 +56,9 @@ text_scroll: MACRO db TX_SCROLL ENDM - enum START_ASM ; $08 + enum TX_START_ASM ; $08 start_asm: MACRO - db START_ASM + db TX_START_ASM ENDM enum TX_NUM ; $09 diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm index 633047b82..6227f2022 100644 --- a/macros/scripts/trade_anims.asm +++ b/macros/scripts/trade_anims.asm @@ -166,7 +166,6 @@ tradeanim_wait_180_if_ot_egg: MACRO db tradeanim_wait_180_if_ot_egg_command ENDM - ; Mobile enum_start $01 diff --git a/macros/wram.asm b/macros/wram.asm index 6096d2bba..eec839b7d 100644 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -76,7 +76,6 @@ red_party_struct: MACRO \1Special:: dw ENDM - battle_struct: MACRO \1Species:: db \1Item:: db @@ -114,7 +113,6 @@ box: MACRO \1End:: ds 2 ; padding ENDM - map_connection_struct: MACRO \1ConnectedMapGroup:: db \1ConnectedMapNumber:: db @@ -146,30 +144,30 @@ channel_struct: MACRO \1Octave:: db ; 7-0 (0 is highest) \1PitchOffset:: db ; raises existing octaves (to repeat phrases) \1NoteDuration:: db ; frames remaining for the current note -\1Field16:: ds 1 ; c117 - ds 1 ; c118 +\1Field16:: ds 1 + ds 1 \1LoopCount:: db \1Tempo:: dw \1Tracks:: db ; hi:left lo:right -\1SFXDutyLoop:: db ; c11d +\1SFXDutyLoop:: db \1VibratoDelayCount:: db ; initialized by \1VibratoDelay \1VibratoDelay:: db ; number of frames a note plays until vibrato starts \1VibratoExtent:: db \1VibratoRate:: db ; hi:frames for each alt lo:frames to the next alt \1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel -\1PitchWheelAmount:: db ; c124 -\1PitchWheelAmountFraction:: db ; c125 -\1Field25:: db ; c126 - ds 1 ; c127 +\1PitchWheelAmount:: db +\1PitchWheelAmountFraction:: db +\1Field25:: db + ds 1 \1CryPitch:: dw \1Field29:: ds 1 \1Field2a:: ds 2 \1Field2c:: ds 1 \1NoteLength:: db ; frames per 16th note -\1Field2e:: ds 1 ; c12f -\1Field2f:: ds 1 ; c130 -\1Field30:: ds 1 ; c131 - ds 1 ; c132 +\1Field2e:: ds 1 +\1Field2f:: ds 1 +\1Field30:: ds 1 + ds 1 ENDM battle_tower_struct: MACRO |