Age | Commit message (Collapse) | Author |
|
This was discussed in #706
It also uncovered some off-by-one issues with defining some constants.
A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
|
|
|
|
|
|
|
|
Identify battle animation functions
|
|
Also commented the use of the field surrounding the struct
initialization functions.
SPRITEANIMSTRUCT_0C -> SPRITEANIMSTRUCT_VAR1
SPRITEANIMSTRUCT_0D -> SPRITEANIMSTRUCT_VAR2
SPRITEANIMSTRUCT_0E -> SPRITEANIMSTRUCT_VAR3
SPRITEANIMSTRUCT_0F -> SPRITEANIMSTRUCT_VAR4
BATTLEANIMSTRUCT_01 -> BATTLEANIMSTRUCT_OAMFLAGS
BATTLEANIMSTRUCT_ANON_JT_INDEX -> BATTLEANIMSTRUCT_JUMPTABLE_INDEX
BATTLEANIMSTRUCT_0F -> BATTLEANIMSTRUCT_VAR1
BATTLEANIMSTRUCT_10 -> BATTLEANIMSTRUCT_VAR2
|
|
|
|
|
|
Any access of the wram arrays for battle anim objects and background
effects use appropriate macros and constants, now.
|
|
This variable never decrements, it only increments to give each battle
animation a different, and incremental "index".
|
|
The X and Y flip flags can be applied through the stack consisting of:
- Object attributes
- Animation frame attributes
- OAM Data
Each of these negate eachother.
Confused yet? The same stack is traversed to obtain the final tile ID,
with an added layer on top for the base GFX offset and the offset for
the dynamically loaded GFX requested by the object!
wBattleAnimDelay is populated with the values passed to `anim_wait`.
|
|
This structure member is used for storing the parameter passed to
`anim_obj`.
|
|
QueueBattleAnimation loads an object using these wram addresses. Usually
populated by the anim_obj command, but in a couple of cases also
manually.
|
|
These are used where the head or the feet of the player/enemy have to be
moved in an animation, and shouldn't overlap. These aren't actual GFX
and should be loaded with the proper commands, and they're always loaded
at the end of the VRAM area.
Furthermore, I've defined BATTLEANIM_BASE_TILE, which is the tile from
which battle animation graphics may start to load. This value was picked
to make sure at least an entire pokemon pic fits in the area before it,
even though it doesn't seem very used...
|
|
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
|
|
|
|
|
|
|
|
I have no idea why this was a thing (do people store this repo on FAT32
flash drives or something?), but quite a bit of files had a permission
of 755. This isn't really a problem, but it's inconsistent and weird.
|
|
|
|
Handle edge cases first.
|
|
|