diff options
author | entrpntr <entrpntr@gmail.com> | 2020-03-17 14:36:59 -0400 |
---|---|---|
committer | entrpntr <entrpntr@gmail.com> | 2020-03-17 14:36:59 -0400 |
commit | d7327a64949c5abb607299184507c89e4c4f1387 (patch) | |
tree | 0666f1f620cc06fd71846ffcdd6f7f5fd681cf39 /macros/wram.asm | |
parent | 2101159b63fd4fd30499fe2ab639060d97f043e7 (diff) |
Cleanup macros before continuing.
Diffstat (limited to 'macros/wram.asm')
-rwxr-xr-x | macros/wram.asm | 208 |
1 files changed, 102 insertions, 106 deletions
diff --git a/macros/wram.asm b/macros/wram.asm index 9f408d5a..3f07a891 100755 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -1,3 +1,4 @@ +; Used in wram.asm flag_array: MACRO ds ((\1) + 7) / 8 @@ -15,7 +16,7 @@ box_struct: MACRO \1DefExp:: dw \1SpdExp:: dw \1SpcExp:: dw -\1DVs:: ds 2 +\1DVs:: dw \1PP:: ds NUM_MOVES \1Happiness:: db \1PokerusStatus:: db @@ -60,7 +61,7 @@ red_box_struct: MACRO \1DefenseExp:: dw \1SpeedExp:: dw \1SpecialExp:: dw -\1DVs:: ds 2 +\1DVs:: dw \1PP:: ds NUM_MOVES ENDM @@ -75,13 +76,12 @@ red_party_struct: MACRO \1Special:: dw ENDM - battle_struct: MACRO \1Species:: db \1Item:: db \1Moves:: ds NUM_MOVES \1MovesEnd:: -\1DVs:: ds 2 +\1DVs:: dw \1PP:: ds NUM_MOVES \1Happiness:: db \1Level:: db @@ -102,91 +102,80 @@ battle_struct: MACRO ENDM box: MACRO -\1:: -\1Count:: ds 1 +\1Count:: db \1Species:: ds MONS_PER_BOX + 1 \1Mons:: \1Mon1:: box_struct \1Mon1 -\1Mon2:: ds BOXMON_STRUCT_LENGTH * (MONS_PER_BOX +- 1) +\1Mon2:: ds BOXMON_STRUCT_LENGTH * (MONS_PER_BOX + -1) \1MonOT:: ds NAME_LENGTH * MONS_PER_BOX \1MonNicknames:: ds MON_NAME_LENGTH * MONS_PER_BOX \1MonNicknamesEnd:: \1End:: ds 2 ; padding ENDM - channel_struct: MACRO -; Addreses are Channel1 (c101). +; Addreses are wChannel1 (c101). \1MusicID:: dw \1MusicBank:: db -\1Flags1:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest -\1Flags2:: db ; 0:vibrato on/off 2:duty 4:cry pitch -\1Flags3:: db ; 0:vibrato up/down +\1Flags1:: db ; 0:on/off 1:subroutine 2:looping 3:sfx 4:noise 5:rest +\1Flags2:: db ; 0:vibrato on/off 1:pitch slide 2:duty cycle pattern 4:pitch offset +\1Flags3:: db ; 0:vibrato up/down 1:pitch slide direction \1MusicAddress:: dw \1LastMusicAddress:: dw dw \1NoteFlags:: db ; 5:rest \1Condition:: db ; conditional jumps \1DutyCycle:: db ; bits 6-7 (0:12.5% 1:25% 2:50% 3:75%) -\1Intensity:: db ; hi:pressure lo:velocity +\1VolumeEnvelope:: db ; hi:volume lo:fade \1Frequency:: dw ; 11 bits \1Pitch:: db ; 0:rest 1-c:note \1Octave:: db ; 7-0 (0 is highest) -\1PitchOffset:: db ; raises existing octaves (to repeat phrases) +\1Transposition:: 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:: ds 1 ; c11d +\1DutyCyclePattern:: 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:: ds 1 ; c126 - ds 1 ; c127 -\1CryPitch:: dw +\1PitchSlideTarget:: dw ; frequency endpoint for pitch slide +\1PitchSlideAmount:: db +\1PitchSlideAmountFraction:: db +\1Field25:: db + ds 1 +\1PitchOffset:: 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 mailmsg: MACRO -\1Message:: ds MAIL_MSG_LENGTH +\1Message:: ds MAIL_MSG_LENGTH \1MessageEnd:: ds 1 -\1Author:: ds PLAYER_NAME_LENGTH +\1Author:: ds PLAYER_NAME_LENGTH \1AuthorNationality:: ds 2 -\1AuthorID:: ds 2 -\1Species:: ds 1 -\1Type:: ds 1 -\1End:: -endm - -hof_mon: MACRO -\1Species:: ds 1 -\1ID:: ds 2 -\1DVs:: ds 2 -\1Level:: ds 1 -\1Nickname:: ds MON_NAME_LENGTH +- 1 +\1AuthorID:: dw +\1Species:: db +\1Type:: db \1End:: -endm +ENDM roam_struct: MACRO \1Species:: db \1Level:: db \1MapGroup:: db \1MapNumber:: db -\1HP:: ds 1 -\1DVs:: ds 2 +\1HP:: db +\1DVs:: dw ENDM bugcontestwinner: MACRO @@ -195,38 +184,46 @@ bugcontestwinner: MACRO \1Score:: dw ENDM +hof_mon: MACRO +\1Species:: db +\1ID:: dw +\1DVs:: dw +\1Level:: db +\1Nickname:: ds MON_NAME_LENGTH + -1 +\1End:: +ENDM + hall_of_fame: MACRO -\1:: -\1WinCount:: ds 1 +\1WinCount:: db \1Mon1:: hof_mon \1Mon1 \1Mon2:: hof_mon \1Mon2 \1Mon3:: hof_mon \1Mon3 \1Mon4:: hof_mon \1Mon4 \1Mon5:: hof_mon \1Mon5 \1Mon6:: hof_mon \1Mon6 -\1End:: ds 1 +\1End:: db ENDM trademon: MACRO -\1Species:: ds 1 ; wc6d0 | wc702 +\1Species:: db ; wc6d0 | wc702 \1SpeciesName:: ds MON_NAME_LENGTH ; wc6d1 | wc703 -\1Nickname:: ds MON_NAME_LENGTH ; wc6dc | wc70e -\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719 -\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724 -\1DVs:: ds 2 ; wc6fd | wc72f -\1ID:: ds 2 ; wc6ff | wc731 +\1Nickname:: ds MON_NAME_LENGTH ; wc6dc | wc70e +\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719 +\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724 +\1DVs:: dw ; wc6fd | wc72f +\1ID:: dw ; wc6ff | wc731 \1End:: ENDM move_struct: MACRO -\1Animation:: ds 1 -\1Effect:: ds 1 -\1Power:: ds 1 -\1Type:: ds 1 -\1Accuracy:: ds 1 -\1PP:: ds 1 -\1EffectChance:: ds 1 -endm +\1Animation:: db +\1Effect:: db +\1Power:: db +\1Type:: db +\1Accuracy:: db +\1PP:: db +\1EffectChance:: db +ENDM slot_reel: MACRO \1ReelAction:: db @@ -246,56 +243,55 @@ slot_reel: MACRO endm object_struct: MACRO -\1Struct:: -\1Sprite:: ds 1 -\1MapObjectIndex:: ds 1 -\1SpriteTile:: ds 1 -\1MovementType:: ds 1 -\1Flags:: ds 2 -\1Palette:: ds 1 -\1Walking:: ds 1 -\1Direction:: ds 1 -\1StepType:: ds 1 -\1StepDuration:: ds 1 -\1Action:: ds 1 -\1ObjectStepFrame:: ds 1 -\1Facing:: ds 1 -\1StandingTile:: ds 1 ; collision -\1LastTile:: ds 1 ; collision -\1StandingMapX:: ds 1 -\1StandingMapY:: ds 1 -\1LastMapX:: ds 1 -\1LastMapY:: ds 1 -\1ObjectInitX:: ds 1 -\1ObjectInitY:: ds 1 -\1Radius:: ds 1 -\1SpriteX:: ds 1 -\1SpriteY:: ds 1 -\1SpriteXOffset:: ds 1 -\1SpriteYOffset:: ds 1 -\1MovementByteIndex:: ds 1 -\1Object28:: ds 1 -\1Object29:: ds 1 -\1Object30:: ds 1 -\1Object31:: ds 1 -\1Range:: ds 1 +\1Sprite:: db +\1MapObjectIndex:: db +\1SpriteTile:: db +\1MovementType:: db +\1Flags:: dw +\1Palette:: db +\1Walking:: db +\1Direction:: db +\1StepType:: db +\1StepDuration:: db +\1Action:: db +\1ObjectStepFrame:: db +\1Facing:: db +\1StandingTile:: db ; collision +\1LastTile:: db ; collision +\1StandingMapX:: db +\1StandingMapY:: db +\1LastMapX:: db +\1LastMapY:: db +\1ObjectInitX:: db +\1ObjectInitY:: db +\1Radius:: db +\1SpriteX:: db +\1SpriteY:: db +\1SpriteXOffset:: db +\1SpriteYOffset:: db +\1MovementByteIndex:: db +\1Field1c:: ds 1 +\1Field1d:: ds 1 +\1Field1e:: ds 1 +\1Field1f:: ds 1 +\1Range:: db ds 7 \1StructEnd:: ENDM map_object: MACRO -\1ObjectStructID:: ds 1 -\1ObjectSprite:: ds 1 -\1ObjectYCoord:: ds 1 -\1ObjectXCoord:: ds 1 -\1ObjectMovement:: ds 1 -\1ObjectRadius:: ds 1 -\1ObjectHour:: ds 1 -\1ObjectTimeOfDay:: ds 1 -\1ObjectColor:: ds 1 -\1ObjectRange:: ds 1 -\1ObjectScript:: ds 2 -\1ObjectEventFlag:: ds 2 +\1ObjectStructID:: db +\1ObjectSprite:: db +\1ObjectYCoord:: db +\1ObjectXCoord:: db +\1ObjectMovement:: db +\1ObjectRadius:: db +\1ObjectHour:: db +\1ObjectTimeOfDay:: db +\1ObjectColor:: db +\1ObjectRange:: db +\1ObjectScript:: dw +\1ObjectEventFlag:: dw ds 2 ENDM |