From 469c51d08637dc9951e4068ecb3700a363294b54 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 15 Feb 2019 02:54:35 +0100 Subject: [PATCH] dorepeat -> dowait for oam animations Having the pic animation macros be the same as the oam animation macros isn't really turning out so well... I wonder if we should split them up eventually. --- data/battle_anims/framesets.asm | 90 ++++++++++++++++----------------- data/sprite_anims/framesets.asm | 14 ++--- macros/scripts/gfx_anims.asm | 35 ++++++++----- 3 files changed, 74 insertions(+), 65 deletions(-) diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm index e0fe57007..a5641570c 100644 --- a/data/battle_anims/framesets.asm +++ b/data/battle_anims/framesets.asm @@ -230,11 +230,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_4C, 2 frame BATTLEANIMOAMSET_4D, 4 frame BATTLEANIMOAMSET_4E, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2 delanim @@ -243,11 +243,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP frame BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP delanim @@ -256,11 +256,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP frame BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP, OAM_Y_FLIP frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP delanim @@ -272,11 +272,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_50, 1 frame BATTLEANIMOAMSET_51, 1 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 delanim @@ -288,11 +288,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_50, 1, OAM_X_FLIP frame BATTLEANIMOAMSET_51, 1, OAM_X_FLIP frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP delanim @@ -368,13 +368,13 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_10, 3 frame BATTLEANIMOAMSET_0F, 3 frame BATTLEANIMOAMSET_12, 1 - dorepeat 1 + dowait 1 frame BATTLEANIMOAMSET_12, 1 - dorepeat 1 + dowait 1 frame BATTLEANIMOAMSET_12, 1 - dorepeat 1 + dowait 1 frame BATTLEANIMOAMSET_12, 1 - dorepeat 1 + dowait 1 frame BATTLEANIMOAMSET_12, 3 delanim @@ -535,13 +535,13 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_34, 32 frame BATTLEANIMOAMSET_35, 32 ; fallthrough .Frameset_2f: - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_35, 4 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_35, 4 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_35, 4 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_35, 4 delanim @@ -579,13 +579,13 @@ BattleAnimFrameData: .Frameset_35: frame BATTLEANIMOAMSET_40, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_40, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_41, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_41, 2 - dorepeat 2 + dowait 2 dorestart .Frameset_36: @@ -597,7 +597,7 @@ BattleAnimFrameData: .Frameset_37: frame BATTLEANIMOAMSET_19, 2 - dorepeat 2 + dowait 2 dorestart .Frameset_38: @@ -607,7 +607,7 @@ BattleAnimFrameData: .Frameset_39: frame BATTLEANIMOAMSET_18, 2 - dorepeat 2 + dowait 2 dorestart .Frameset_3a: @@ -639,15 +639,15 @@ BattleAnimFrameData: endanim .Frameset_44: - dorepeat 20 + dowait 20 frame BATTLEANIMOAMSET_55, 40 frame BATTLEANIMOAMSET_54, 40 frame BATTLEANIMOAMSET_53, 20 - dorepeat 4 + dowait 4 frame BATTLEANIMOAMSET_53, 4 - dorepeat 4 + dowait 4 frame BATTLEANIMOAMSET_53, 4 - dorepeat 4 + dowait 4 frame BATTLEANIMOAMSET_53, 4 delanim @@ -658,11 +658,11 @@ BattleAnimFrameData: delanim .Frameset_45: - dorepeat 0 + dowait 0 frame BATTLEANIMOAMSET_14, 0 frame BATTLEANIMOAMSET_15, 0 frame BATTLEANIMOAMSET_14, 0, OAM_X_FLIP - dorepeat 0 + dowait 0 frame BATTLEANIMOAMSET_16, 0, OAM_X_FLIP frame BATTLEANIMOAMSET_15, 0 frame BATTLEANIMOAMSET_16, 0 @@ -867,7 +867,7 @@ BattleAnimFrameData: delanim .Frameset_68: - dorepeat 15 + dowait 15 frame BATTLEANIMOAMSET_84, 15 frame BATTLEANIMOAMSET_85, 15 frame BATTLEANIMOAMSET_29, 15 @@ -970,11 +970,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_9C, 2 frame BATTLEANIMOAMSET_9D, 2 frame BATTLEANIMOAMSET_9E, 8 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_9E, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_9E, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_9E, 2 delanim @@ -1160,11 +1160,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_50, 1 frame BATTLEANIMOAMSET_51, 1 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2 delanim @@ -1178,11 +1178,11 @@ BattleAnimFrameData: frame BATTLEANIMOAMSET_50, 1, OAM_X_FLIP, OAM_Y_FLIP frame BATTLEANIMOAMSET_51, 1, OAM_X_FLIP, OAM_Y_FLIP frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP - dorepeat 2 + dowait 2 frame BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP delanim diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm index 666f2b2e2..549b4b637 100644 --- a/data/sprite_anims/framesets.asm +++ b/data/sprite_anims/framesets.asm @@ -129,12 +129,12 @@ SpriteAnimFrameData: .Frameset_TextEntryCursor: frame SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR, 1 - dorepeat 1 + dowait 1 dorestart .Frameset_TextEntryCursorBig: frame SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG, 1 - dorepeat 1 + dowait 1 dorestart .Frameset_GameFreakLogo: @@ -285,11 +285,11 @@ SpriteAnimFrameData: ; unused frame SPRITE_ANIM_OAMSET_UNUSED_4E, 3 - dorepeat 3 + dowait 3 dorestart .Frameset_Unused1C: - dorepeat 32 + dowait 32 endanim .Frameset_Leaf: @@ -299,9 +299,9 @@ SpriteAnimFrameData: .Frameset_CutTree: frame SPRITE_ANIM_OAMSET_TREE_1, 2 frame SPRITE_ANIM_OAMSET_CUT_TREE_2, 16 - dorepeat 1 + dowait 1 frame SPRITE_ANIM_OAMSET_CUT_TREE_3, 1 - dorepeat 1 + dowait 1 frame SPRITE_ANIM_OAMSET_CUT_TREE_4, 1 delanim @@ -483,7 +483,7 @@ SpriteAnimFrameData: endanim .Frameset_IntroUnownF: - dorepeat 0 + dowait 0 endanim .Frameset_CelebiLeft: diff --git a/macros/scripts/gfx_anims.asm b/macros/scripts/gfx_anims.asm index 8f33512ec..3756481dd 100644 --- a/macros/scripts/gfx_anims.asm +++ b/macros/scripts/gfx_anims.asm @@ -15,20 +15,20 @@ ENDM enum_start $fc enum delanim_command ; $fc -delanim: MACRO ; used for oam +delanim: MACRO +; Removes the object from the screen, as opposed to `endanim` which just stops all motion db delanim_command ENDM - enum dorepeat_command ; $fd -dorepeat: MACRO - db dorepeat_command - db \1 ; # + enum dowait_command ; $fd +dowait: MACRO + db dowait_command + db \1 ; frames ENDM - enum setrepeat_command ; $fe -setrepeat: MACRO - db setrepeat_command - db \1 ; # + enum dorestart_command ; $fe +dorestart: MACRO + db dorestart_command ENDM enum endanim_command ; $ff @@ -36,9 +36,18 @@ endanim: MACRO db endanim_command ENDM -__enum__ = $fe - enum dorestart_command ; $fe -dorestart: MACRO ; used for oam - db dorestart_command +; Used for pic animations +__enum__ = $fd + + enum dorepeat_command ; $fd +dorepeat: MACRO + db dorepeat_command + db \1 ; command offset to jump to +ENDM + + enum setrepeat_command ; $fe +setrepeat: MACRO + db setrepeat_command + db \1 ; amount of times to repeat ENDM