diff options
author | Remy Oukaour <remy.oukaour@gmail.com> | 2017-12-14 00:36:24 -0500 |
---|---|---|
committer | Remy Oukaour <remy.oukaour@gmail.com> | 2017-12-14 00:36:24 -0500 |
commit | e48a401290e794854880f06fc230a369f37e6b9b (patch) | |
tree | dcad6cd5d1a7e62a2f2a92522c5619d41dc416cf /macros/wram.asm | |
parent | 8745915dbd38e9647e0b27d20cb73da0fdde353f (diff) |
Reorganize macros
Diffstat (limited to 'macros/wram.asm')
-rwxr-xr-x | macros/wram.asm | 267 |
1 files changed, 138 insertions, 129 deletions
diff --git a/macros/wram.asm b/macros/wram.asm index ce53dc5c7..c70da2a74 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 @@ -81,7 +82,7 @@ battle_struct: MACRO \1Item:: db \1Moves:: ds NUM_MOVES \1MovesEnd:: -\1DVs:: ds 2 +\1DVs:: dw \1PP:: ds NUM_MOVES \1Happiness:: db \1Level:: db @@ -103,7 +104,7 @@ ENDM box: MACRO \1:: -\1Count:: ds 1 +\1Count:: db \1Species:: ds MONS_PER_BOX + 1 \1Mons:: \1Mon1:: box_struct \1Mon1 @@ -134,14 +135,14 @@ channel_struct: MACRO \1FrequencyHi:: db \1Pitch:: db ; 0:rest 1-c:note \1Octave:: db ; 7-0 (0 is highest) -\1PitchOffset:: db ; raises existing octaves (to repeat phrases) +\1PitchOffset:: db ; raises existing octaves (to repeat phrases) \1NoteDuration:: db ; frames remaining for the current note \1Field0x16:: ds 1 ; c117 ds 1 ; c118 \1LoopCount:: db \1Tempo:: dw \1Tracks:: db ; hi:left lo:right -\1SFXDutyLoop:: ds 1 ; c11d +\1SFXDutyLoop:: db ; c11d \1VibratoDelayCount:: db ; initialized by \1VibratoDelay \1VibratoDelay:: db ; number of frames a note plays until vibrato starts \1VibratoExtent:: db @@ -149,7 +150,7 @@ channel_struct: MACRO \1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel \1PitchWheelAmount:: db ; c124 \1PitchWheelAmountFraction:: db ; c125 -\1Field0x25:: ds 1 ; c126 +\1Field0x25:: db ; c126 ds 1 ; c127 \1CryPitch:: dw \1Field0x29:: ds 1 @@ -179,22 +180,13 @@ battle_tower_struct: MACRO 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 PKMN_NAME_LENGTH +- 1 +\1AuthorID:: dw +\1Species:: db +\1Type:: db \1End:: endm @@ -203,19 +195,28 @@ roam_struct: MACRO \1Level:: db \1MapGroup:: db \1MapNumber:: db -\1HP:: ds 1 -\1DVs:: ds 2 +\1HP:: db +\1DVs:: dw ENDM bugcontestwinner: macro -\1PersonID:: ds 1 -\1Mon:: ds 1 -\1Score:: ds 2 +\1PersonID:: db +\1Mon:: db +\1Score:: dw +endm + +hof_mon: MACRO +\1Species:: db +\1ID:: dw +\1DVs:: dw +\1Level:: db +\1Nickname:: ds PKMN_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 @@ -225,26 +226,34 @@ hall_of_fame: MACRO \1End:: ds 1 ENDM +link_battle_record: MACRO +\1Name:: ds NAME_LENGTH +- 1 +\1ID:: dw +\1Wins:: dw +\1Losses:: dw +\1Draws:: dw +ENDM + trademon: MACRO -\1Species:: ds 1 ; wc6d0 | wc702 +\1Species:: db ; wc6d0 | wc702 \1SpeciesName:: ds PKMN_NAME_LENGTH ; wc6d1 | wc703 -\1Nickname:: ds PKMN_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 -\1CaughtData:: ds 1 ; wc701 | wc733 +\1Nickname:: ds PKMN_NAME_LENGTH ; wc6dc | wc70e +\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719 +\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724 +\1DVs:: dw ; wc6fd | wc72f +\1ID:: dw ; wc6ff | wc731 +\1CaughtData:: db ; wc701 | wc733 \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 +\1Animation:: db +\1Effect:: db +\1Power:: db +\1Type:: db +\1Accuracy:: db +\1PP:: db +\1EffectChance:: db endm slot_reel: MACRO @@ -266,109 +275,109 @@ 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 +\1Object28:: ds 1 +\1Object29:: ds 1 +\1Object30:: ds 1 +\1Object31:: ds 1 +\1Range:: db ds 7 \1StructEnd:: ENDM map_object: MACRO \1Object:: -\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 sprite_anim_struct: MACRO -\1Index:: ds 1 ; 0 -\1FramesetID:: ds 1 ; 1 -\1AnimSeqID:: ds 1 ; 2 -\1TileID:: ds 1 ; 3 -\1XCoord:: ds 1 ; 4 -\1YCoord:: ds 1 ; 5 -\1XOffset:: ds 1 ; 6 -\1YOffset:: ds 1 ; 7 -\1Duration:: ds 1 ; 8 -\1DurationOffset:: ds 1 ; 9 -\1FrameIndex:: ds 1 ; a -\1Sprite0b:: ds 1 -\1Sprite0c:: ds 1 -\1Sprite0d:: ds 1 -\1Sprite0e:: ds 1 -\1Sprite0f:: ds 1 +\1Index:: db +\1FramesetID:: db +\1AnimSeqID:: db +\1TileID:: db +\1XCoord:: db +\1YCoord:: db +\1XOffset:: db +\1YOffset:: db +\1Duration:: db +\1DurationOffset:: db +\1FrameIndex:: db +\1Sprite0b:: ds 1 +\1Sprite0c:: ds 1 +\1Sprite0d:: ds 1 +\1Sprite0e:: ds 1 +\1Sprite0f:: ds 1 ENDM battle_anim_struct: MACRO ; Placeholder until we can figure out what it all means -\1_Index:: ds 1 -\1_Anim01:: ds 1 -\1_Anim02:: ds 1 -\1_FramesetIndex:: ds 1 -\1_FunctionIndex:: ds 1 -\1_Anim05:: ds 1 -\1_TileID:: ds 1 -\1_XCoord:: ds 1 -\1_YCoord:: ds 1 -\1_XOffset:: ds 1 -\1_YOffset:: ds 1 -\1_Anim0b:: ds 1 -\1_Anim0c:: ds 1 -\1_Anim0d:: ds 1 -\1_AnonJumptableIndex:: ds 1 -\1_Anim0f:: ds 1 -\1_Anim10:: ds 1 -\1_Anim11:: ds 1 -\1_Anim12:: ds 1 -\1_Anim13:: ds 1 -\1_Anim14:: ds 1 -\1_Anim15:: ds 1 -\1_Anim16:: ds 1 -\1_Anim17:: ds 1 +\1_Index:: db +\1_Anim01:: ds 1 +\1_Anim02:: ds 1 +\1_FramesetIndex:: db +\1_FunctionIndex:: db +\1_Anim05:: ds 1 +\1_TileID:: db +\1_XCoord:: db +\1_YCoord:: db +\1_XOffset:: db +\1_YOffset:: db +\1_Anim0b:: ds 1 +\1_Anim0c:: ds 1 +\1_Anim0d:: ds 1 +\1_AnonJumptableIndex:: db +\1_Anim0f:: ds 1 +\1_Anim10:: ds 1 +\1_Anim11:: ds 1 +\1_Anim12:: ds 1 +\1_Anim13:: ds 1 +\1_Anim14:: ds 1 +\1_Anim15:: ds 1 +\1_Anim16:: ds 1 +\1_Anim17:: ds 1 endm battle_bg_effect: MACRO -\1_Function:: ds 1 -\1_01:: ds 1 -\1_02:: ds 1 -\1_03:: ds 1 +\1_Function:: db +\1_01:: ds 1 +\1_02:: ds 1 +\1_03:: ds 1 endm |