Merge pull request #383 from garakmon/createsprite

Update createsprite macro and rename BANK to BATTLER
This commit is contained in:
Diegoisawesome 2018-11-15 14:45:13 -06:00 committed by GitHub
commit 032dd251e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2124 additions and 2120 deletions

View File

@ -10,10 +10,14 @@
.2byte \param0 .2byte \param0
.endm .endm
.macro createsprite template, priority, argv:vararg .macro createsprite template, anim_battler, subpriority_offset, argv:vararg
.byte 0x02 .byte 0x02
.4byte \template .4byte \template
.byte \priority .if \anim_battler == ANIM_TARGET
.byte 0x80 | (\subpriority_offset & 0x7F)
.else
.byte (\subpriority_offset & 0x7F)
.endif
.byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2 .byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
.Lsprite_\@_1: .Lsprite_\@_1:
.2byte \argv .2byte \argv

File diff suppressed because it is too large Load Diff

View File

@ -298,8 +298,8 @@
#define ANIM_TAG_BLUE_RING_2 (ANIM_SPRITES_START + 288) #define ANIM_TAG_BLUE_RING_2 (ANIM_SPRITES_START + 288)
// battlers // battlers
#define ANIM_ATTACKER 0 #define ANIM_ATTACKER 0
#define ANIM_TARGET 1 #define ANIM_TARGET 1
#define ANIM_ATK_PARTNER 2 #define ANIM_ATK_PARTNER 2
#define ANIM_DEF_PARTNER 3 #define ANIM_DEF_PARTNER 3