AW2 Battle Animation notes

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
Post Reply
User avatar
x0_000
Rank: Clothes shopping is NP-Complete.
Location: a thing

AW2 Battle Animation notes

Post by x0_000 » Wed Apr 09, 2014 12:28 pm

085d64a8 - Location of the battle animation table. The table starts at infantry and follows the usual internal order. Each entry is 20 bytes long (5 pointers for each country).

A standard entry looks like:

Code: Select all

GFX GFX GFX GFX GFX GFX
ANIM B B B B B B B B
ANIM B B B B B B B B
ANIM B B B B B B B B
GFX and ANIM is a word, B is a byte.

Each GFX is a pointer pointing to raw graphics. ANIM is a pointer that points to animation metadata which is used in conjunction with the B bytes.

the ANIM pointer points to a structure that looks like this:

Code: Select all

OAM SEQ SEQ SEQ ...
OAM is a pointer to a table of pointers, each of which points to what I assume is OAM data. I haven't explored that specifically yet.
SEQ is a pointer that points to actual metadata. The number of SEQs are variable, and my guess is the B bytes earlier refer to a SEQ pointer, so there needs to be a SEQ pointer for each B index. So to summarize, the game handles animations as follows: First, an animation is divided into sequences. For example, the tank firing is separated into 5 sequences:
0 - moving in (tread animating)
1 - stop tread animating?
2 - play brake animation
3 - fire
4 - ending?
The game then executes these in order (the exact order is 0 1 2 3 3 3 4 0).

I have no idea exactly how metadata works. The stuff I know so far is: each metadata atom is a variable number of bytes. I think if you have XX 10, then the next 2 bytes are also part of the atom, making XX 10 YY 00 an atom. XX corresponds to an OAM frame, and I think YY is duration? Other atoms I've seen are:

1C E0 - plays a sound effect (used by tanks and missiles, haven't checked other units)
00 20 - ??
00 FE - ??

I think the firing spark is handled separately from these animations, also based on my messing around with tanks.
Only in math can you buy 600 cantaloupes and not look like a nutter.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest