Add some structs related to model animation (#331)

* Add some structs related to model animation

Also reorder some of the data in the course files that have model
 animation.

Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran 2023-07-12 01:21:13 -04:00 committed by GitHub
parent 890aaee162
commit ab86bf2d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1927 additions and 699 deletions

View File

@ -5,6 +5,7 @@
#include <actor_types.h>
#include <waypoints.h>
#include <course.h>
#include <code_80004740.h>
#include <courses/mushroom_cup/koopa_troopa_beach/packed.inc.h>
@ -8096,89 +8097,284 @@ u8 d_course_koopa_troopa_beach_crab_frames[][4096] = {
},
};
// 0x14828
// 0x06014828
// animations? lights?
u8 d_course_koopa_troopa_beach_unk_data[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x02, 0x00, 0x03, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x07,
0x00, 0x07, 0x00, 0x06, 0x00, 0x05, 0x00, 0x03, 0x00, 0x02, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
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x00, 0x01, 0x01, 0x8A, 0x00, 0x01, 0x00, 0xA9, 0x00, 0x37, 0x00, 0xAA,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x72,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x3B,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x87,
0x00, 0x01, 0x01, 0x88, 0x00, 0x01, 0x01, 0x4F, 0x00, 0x37, 0x01, 0x50,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x01, 0x18,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0xE1,
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x37, 0x00, 0x0A, 0x06, 0x01, 0x48, 0x38, 0x06, 0x01, 0x4B, 0x50,
u32 d_course_koopa_troopa_beach_unk_data1[] = {
0x00000000,
0x00000001,
0x00000000,
0x00000001,
};
// 0x06014838
s16 d_course_koopa_troopa_beach_unk_data2[] = {
0x0000, 0x0000,
0x0000, 0x0001,
0x0002, 0x0003,
0x0005, 0x0006,
0x0007, 0x0007,
0x0007, 0x0006,
0x0005, 0x0003,
0x0002, 0x0001,
0x0000, 0x0000,
0x0000, 0xffff,
0xffff, 0xffff,
0xffff, 0xffff,
0xffff, 0xffff,
0xffff, 0xffff,
0xffff, 0xffff,
0x0000, 0x0000,
0x0000, 0x0000,
0x0000, 0x0000,
0x0000, 0xffff,
0x0000, 0x0000,
0x0001, 0x0001,
0x0000, 0x0000,
0xffff, 0xffff,
0xffff, 0xffff,
0x0000, 0x0000,
0x0001, 0x0001,
0x0001, 0x0000,
0x0000, 0x0000,
0x3fff, 0x3fff,
0x3fff, 0x18a7,
0x0e34, 0x03c1,
0xfaa6, 0xf434,
0xf1c2, 0xf434,
0xfaa7, 0x03c3,
0x0e36, 0x18a8,
0x21c6, 0x2838,
0x2aaa, 0x2845,
0x216b, 0x1728,
0x0b90, 0x00b6,
0xf8af, 0xf58c,
0xf8e3, 0x003c,
0x0795, 0x0aed,
0x0aaa, 0x09ed,
0x08cc, 0x0759,
0x05ab, 0x03d3,
0x01e8, 0xfffe,
0xfe26, 0xfc78,
0xfb05, 0xf9e4,
0xf927, 0xf8e4,
0x0000, 0x071c,
0x0652, 0x044a,
0x0183, 0xfe7d,
0xfbb6, 0xf9ae,
0xf8e4, 0xf9f5,
0xfcea, 0x0163,
0x0705, 0x0d71,
0x1449, 0x1b2f,
0xfac3, 0xf4e1,
0xf2ba, 0xf570,
0xfc94, 0x06ac,
0x1240, 0x1dd3,
0x27ec, 0x2f11,
0x31c6, 0x2e8b,
0x263e, 0x1afb,
0x0edc, 0x03f9,
0xfcee, 0xfa23,
0xfa72, 0xfcb3,
0xffbd, 0x0268,
0x038e, 0x0387,
0x0373, 0x0355,
0x032f, 0x0305,
0x02d8, 0x02ab,
0x0280, 0x025b,
0x023d, 0x0229,
0x0222, 0x05b0,
0x0143, 0xf90d,
0xf4a0, 0x071c,
0x0dfa, 0x1110,
0x11c6, 0x0f68,
0x097b, 0x01c7,
0xfa14, 0xf427,
0xf1c8, 0xfc72,
0x071c, 0x0716,
0x06e6, 0x065d,
0x054b, 0xfdde,
0xe698, 0xeea7,
0xfa0b, 0x0719,
0x1428, 0x1f8d,
0x279b, 0x2aaa,
0x2816, 0x2131,
0x173d, 0x0b7b,
0xff2d, 0xf394,
0xe9f3, 0xe38a,
0xe234, 0xe55c,
0xea9a, 0xef85,
0xf1b8, 0xf1ba,
0xf1b7, 0xf1b7,
0xf1c4, 0xf1d8,
0xf1e7, 0xf1f3,
0xf1f9, 0xf1fc,
0xf1fa, 0xf1f4,
0xf1e9, 0xf1db,
0xf1c8, 0xee3a,
0xf4b0, 0x02ae,
0x103a, 0x1555,
0x0b47, 0xfa83,
0xf1c8, 0xf05c,
0xee3a, 0xf330,
0xfe33, 0x0939,
0x0e38, 0x0bd6,
0x05bb, 0xfd65,
0xf451, 0xebfd,
0xe5e6, 0xe741,
0xf1ad, 0xfc24,
0x054b, 0x0bc7,
0x0e3e, 0x0bcc,
0x0559, 0xfc3d,
0xf1ca, 0xe758,
0xde3a, 0xd7c8,
0xd556, 0xd7c8,
0xde95, 0xe8b9,
0xf44d, 0xff32,
0x0749, 0x0a74,
0x071d, 0xffc4,
0xf86b, 0xf513,
0xf559, 0xf61d,
0xf74a, 0xf8cb,
0xfa8a, 0xfc74,
0xfe73, 0x0071,
0x025b, 0x041a,
0x059b, 0x06c8,
0x078c, 0x07d2,
0x005b, 0xf8e4,
0xf9ae, 0xfbb6,
0xfe7d, 0x0183,
0x044a, 0x0652,
0x071c, 0x060a,
0x0312, 0xfe95,
0xf8ef, 0xf281,
0xebaa, 0xe4c8,
0x051e, 0x0b0f,
0x0d46, 0x0a90,
0x036c, 0xf954,
0xedc0, 0xe22d,
0xd814, 0xd0ef,
0xce3a, 0xd176,
0xd9c4, 0xe508,
0xf128, 0xfc07,
0x030e, 0x05d8,
0x0589, 0x034a,
0x0041, 0xfd97,
0xfc72, 0xfc79,
0xfc8d, 0xfcab,
0xfcd1, 0xfcfb,
0xfd28, 0xfd55,
0xfd80, 0xfda5,
0xfdc3, 0xfdd7,
0xfdde, 0xfa50,
0xfe8e, 0x066d,
0x0aaa, 0xf8e4,
0xf08a, 0xee33,
0xee3a, 0xf098,
0xf685, 0xfe39,
0x05ec, 0x0bd9,
0x0e38, 0x0333,
0xf82e, 0xf848,
0xf8a7, 0xf968,
0xfaa7, 0x0222,
0x1968, 0x1159,
0x05f5, 0xf8e7,
0xebd8, 0xe073,
0xd865, 0xd556,
0xd865, 0xe073,
0xebd8, 0xf8e7,
0x05f5, 0x1159,
0x1968, 0x1c76,
0x1afd, 0x1778,
0x1346, 0x0fc2,
0x0e48, 0x0e46,
0x0e42, 0x0e3e,
0x0e3c, 0x0e3c,
0x0e3c, 0x0e3b,
0x0e3b, 0x0e3a,
0x0e3a, 0x0e39,
0x0e39, 0x0e38,
0x0e38, 0x11c6,
0x0b51, 0xfd4c,
0xefbd, 0xeaab,
0xf4b6, 0x056a,
0x0e38, 0x0fa4,
0x11c6, 0x0cd6,
0x01d4, 0xf6cd,
0xf1c8, 0xf425,
0xfa3e, 0x0294,
0x0ba9, 0x1400,
0x1a19, 0x3fff,
0x3fff, 0xc001,
0x3fff, 0x8001,
};
// 0x06014B50
animation_type_3_triplet d_course_koopa_troopa_beach_unk_data3[] = {
{
{ 0x0001, 0x0000 },
{ 0x0037, 0x0001 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0038 },
{ 0x0001, 0x0039 },
{ 0x0001, 0x003a },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x018b },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0189 },
{ 0x0001, 0x018a },
},
{
{ 0x0001, 0x00a9 },
{ 0x0037, 0x00aa },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0037, 0x0072 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0037, 0x003b },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0187 },
{ 0x0001, 0x0188 },
},
{
{ 0x0001, 0x014f },
{ 0x0037, 0x0150 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0037, 0x0118 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0037, 0x00e1 },
{ 0x0001, 0x0000 },
},
};
// 0x06014BD4
animation_type_2 d_course_koopa_troopa_beach_unk_data4 = {
0x00010000,
0x00000000,
0x0037,
0x000a,
d_course_koopa_troopa_beach_unk_data2,
d_course_koopa_troopa_beach_unk_data3,
};
// 0x14BE8
@ -8342,46 +8538,158 @@ Gfx d_course_koopa_troopa_beach_dl_16990[] =
gsSPEndDisplayList(),
};
// Likely lighting data
u8 d_course_koopa_troopa_beach_unk3[456] = {
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x66, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFB, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x68, 0x50,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x68, 0xF0,
0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x69, 0x90,
0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFB,
0xFF, 0xFF, 0xFF, 0xFB, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
0x06, 0x01, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
0x06, 0x01, 0x68, 0xF0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
0x06, 0x01, 0x69, 0x90, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
0x06, 0x01, 0x4B, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
// 0x60169b0
u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16630,
0x00000000,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0xfffffffb,
0x00000005,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16850,
0x00000000,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_168F0,
0x00000024,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16990,
0x00000019,
0x00000000,
0x00000000,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0xfffffffb,
0xfffffffb,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16850,
0x00000000,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_168F0,
0x00000024,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16990,
0x00000019,
0x00000000,
0x00000000,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000003,
0x00000002,
};
// 0x06016B60
animation_type_2 *d_course_koopa_troopa_beach_unk_data5[] = {
&d_course_koopa_troopa_beach_unk_data4,
};
// No idea what this stuff is
u32 d_course_koopa_troopa_beach_unk_data6[] = {
0x00000000,
0x00000000,
0x00000001,
0x00000000,
0x00000001,
};
// 0x16B78

View File

@ -5,6 +5,7 @@
#include <actor_types.h>
#include <waypoints.h>
#include <course.h>
#include <code_80004740.h>
#include <courses/special_cup/rainbow_road/packed.inc.h>
@ -3412,102 +3413,126 @@ Gfx d_course_rainbow_road_dl_15F18[] =
gsSPEndDisplayList(),
};
// 0x15FC8 todo: Format
u32 d_rainbow_road_chomp_jaw_animation[] = {
// Unknown data, probably not vertexes
// Seemingly handled by func_80004C30
0x00003fff,
0x96029483,
0x90d28c1b,
0x878e845a,
0x83ac88ae,
0x92649bc5,
0x9fc99c7c,
0x950f8c27,
0x846d808a,
0x83488abb,
0x92739602,
0x6fb270c6,
0x736976ba,
0x79d67bdd,
0x7beb7752,
0x6ed766ca,
0x63796692,
0x6d54756c,
0x7c878054,
0x7e7c78b0,
0x728d6fb2,
0x96029483,
0x90d28c1b,
0x878e845a,
0x83ac88ae,
0x92649bc5,
0x9fc99c7c,
0x950f8c27,
0x846d808a,
0x83488abb,
0x92739602,
0x6fb270c6,
0x736976ba,
0x79d67bdd,
0x7beb7752,
0x6ed766ca,
0x63796692,
0x6d54756c,
0x7c878054,
0x7e7c78b0,
0x728d6fb2,
0x6fb270c6,
0x736976ba,
0x79d67bdd,
0x7beb7752,
0x6ed766ca,
0x63796692,
0x6d54756c,
0x7c878054,
0x7e7c78b0,
0x728d6fb2,
0x3fff0000,
// 0x06015FC8
s16 d_rainbow_road_chomp_jaw_animation[] = {
0x0000, 0x3fff,
0x9602, 0x9483,
0x90d2, 0x8c1b,
0x878e, 0x845a,
0x83ac, 0x88ae,
0x9264, 0x9bc5,
0x9fc9, 0x9c7c,
0x950f, 0x8c27,
0x846d, 0x808a,
0x8348, 0x8abb,
0x9273, 0x9602,
0x6fb2, 0x70c6,
0x7369, 0x76ba,
0x79d6, 0x7bdd,
0x7beb, 0x7752,
0x6ed7, 0x66ca,
0x6379, 0x6692,
0x6d54, 0x756c,
0x7c87, 0x8054,
0x7e7c, 0x78b0,
0x728d, 0x6fb2,
0x9602, 0x9483,
0x90d2, 0x8c1b,
0x878e, 0x845a,
0x83ac, 0x88ae,
0x9264, 0x9bc5,
0x9fc9, 0x9c7c,
0x950f, 0x8c27,
0x846d, 0x808a,
0x8348, 0x8abb,
0x9273, 0x9602,
0x6fb2, 0x70c6,
0x7369, 0x76ba,
0x79d6, 0x7bdd,
0x7beb, 0x7752,
0x6ed7, 0x66ca,
0x6379, 0x6692,
0x6d54, 0x756c,
0x7c87, 0x8054,
0x7e7c, 0x78b0,
0x728d, 0x6fb2,
0x6fb2, 0x70c6,
0x7369, 0x76ba,
0x79d6, 0x7bdd,
0x7beb, 0x7752,
0x6ed7, 0x66ca,
0x6379, 0x6692,
0x6d54, 0x756c,
0x7c87, 0x8054,
0x7e7c, 0x78b0,
0x728d, 0x6fb2,
0x3fff, 0x0000,
};
// 0x16098
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010001,
0x00010000,
0x00010000,
0x00010000,
0x0014002a,
0x00010000,
0x00010000,
0x00140002,
0x00010000,
0x00010066,
0x00010000,
0x00010000,
0x00010000,
0x00140052,
0x00010000,
0x00010000,
0x0014003e,
0x00010000,
0x00010000,
// 0x06016098
animation_type_3_triplet d_rainbow_road_unk1[] = {
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0001 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0014, 0x002a },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0014, 0x0002 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0066 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0014, 0x0052 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0014, 0x003e },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0014, 0x0016 },
},
};
// 0x160f8
0x00140016,
// 0x060160F8
animation_type_2 d_rainbow_road_unk2 = {
0x00010000,
0x00000000,
0x00140007,
0x0014,
0x0007,
d_rainbow_road_chomp_jaw_animation,
d_rainbow_road_unk1,
};
// 0x16108
0x06015FC8,
0x06016098,
0x060160F8,
// 0x0601610C
animation_type_2 *d_rainbow_road_unk3[] = {
&d_rainbow_road_unk2,
};
// 0x16114
// 0x06016110
u32 d_rainbow_road_unk4[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -3518,6 +3543,7 @@ u32 d_rainbow_road_chomp_jaw_animation[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -3536,6 +3562,7 @@ u32 d_rainbow_road_chomp_jaw_animation[] = {
0x00000002,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -3546,6 +3573,7 @@ u32 d_rainbow_road_chomp_jaw_animation[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -3572,10 +3600,16 @@ u32 d_rainbow_road_chomp_jaw_animation[] = {
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000003,
0x00000002,
};
// No idea what this stuff is
u32 d_rainbow_road_unk5[] = {
0x00000000,
0x00000000,
0x00000002,

View File

@ -5,6 +5,7 @@
#include <actor_types.h>
#include <waypoints.h>
#include <course.h>
#include <code_80004740.h>
#include <courses/special_cup/yoshi_valley/packed.inc.h>
@ -10705,127 +10706,154 @@ Gfx d_course_yoshi_valley_dl_145D0[] =
gsSPEndDisplayList(),
};
// 0x145E8 Flag animation?
u32 d_course_yoshi_valley_unk2[] = {
// Unknown data, doesn't appear to be vertexes.
0x000012e3,
0x0f43099f,
0x02d1fbb3,
0xf51befe3,
0xecc0ea97,
0xe905e817,
0xe7dae85a,
0xe9a5ebc7,
0xef2bf51f,
0xfcd4053b,
0x0d4913ee,
0x181e1a24,
0x1b1b1b28,
0x1a71191c,
0x174f152f,
0x0dfd0b37,
0x064a006d,
0xfadaf6c7,
0xf4d9f371,
0xf25df1a3,
0xf148f152,
0xf1c6f2aa,
0xf404f622,
0xfa11ff44,
0x04fd0a7d,
0x0f0811dd,
0x132a13b1,
0x139312f3,
0x11f210b2,
0x0f55f43f,
0xf376f2f2,
0xf2b7f2c3,
0xf319f3b9,
0xf4a5f64b,
0xf8e8fc2a,
0xffc50367,
0x06c3098b,
0x0b730c85,
0x0ce40ca5,
0x0bdd0aa2,
0x08f806a5,
0x03d300b6,
0xfd87fa7a,
0xf7c5f59f,
0xf5bcf61a,
0xf722f8ba,
0xfac7fd30,
0xffd802a6,
0x05800829,
0x0a3a0bbc,
0x0cb90d3f,
0x0d4c0c44,
0x0a3b0785,
0x04780169,
0xfeadfc97,
0xfb3efa01,
0xf8dbf7d5,
0xf6f8f64f,
0xf5e204ea,
0x04b30421,
0x034c0250,
0x0147004b,
0xff77feaa,
0xfdc3fcd9,
0xfc02fb55,
0xfae7fad0,
0xfb25fbdc,
0xfcd6fdf4,
0xff170020,
0x00f201a2,
0x025302fe,
0x039a0422,
0x048c04d1,
0x3fffc001,
0x3fff0000,
// 0x060145E8 Flag animation?
s16 d_course_yoshi_valley_unk1[] = {
0x0000, 0x12e3,
0x0f43, 0x099f,
0x02d1, 0xfbb3,
0xf51b, 0xefe3,
0xecc0, 0xea97,
0xe905, 0xe817,
0xe7da, 0xe85a,
0xe9a5, 0xebc7,
0xef2b, 0xf51f,
0xfcd4, 0x053b,
0x0d49, 0x13ee,
0x181e, 0x1a24,
0x1b1b, 0x1b28,
0x1a71, 0x191c,
0x174f, 0x152f,
0x0dfd, 0x0b37,
0x064a, 0x006d,
0xfada, 0xf6c7,
0xf4d9, 0xf371,
0xf25d, 0xf1a3,
0xf148, 0xf152,
0xf1c6, 0xf2aa,
0xf404, 0xf622,
0xfa11, 0xff44,
0x04fd, 0x0a7d,
0x0f08, 0x11dd,
0x132a, 0x13b1,
0x1393, 0x12f3,
0x11f2, 0x10b2,
0x0f55, 0xf43f,
0xf376, 0xf2f2,
0xf2b7, 0xf2c3,
0xf319, 0xf3b9,
0xf4a5, 0xf64b,
0xf8e8, 0xfc2a,
0xffc5, 0x0367,
0x06c3, 0x098b,
0x0b73, 0x0c85,
0x0ce4, 0x0ca5,
0x0bdd, 0x0aa2,
0x08f8, 0x06a5,
0x03d3, 0x00b6,
0xfd87, 0xfa7a,
0xf7c5, 0xf59f,
0xf5bc, 0xf61a,
0xf722, 0xf8ba,
0xfac7, 0xfd30,
0xffd8, 0x02a6,
0x0580, 0x0829,
0x0a3a, 0x0bbc,
0x0cb9, 0x0d3f,
0x0d4c, 0x0c44,
0x0a3b, 0x0785,
0x0478, 0x0169,
0xfead, 0xfc97,
0xfb3e, 0xfa01,
0xf8db, 0xf7d5,
0xf6f8, 0xf64f,
0xf5e2, 0x04ea,
0x04b3, 0x0421,
0x034c, 0x0250,
0x0147, 0x004b,
0xff77, 0xfeaa,
0xfdc3, 0xfcd9,
0xfc02, 0xfb55,
0xfae7, 0xfad0,
0xfb25, 0xfbdc,
0xfcd6, 0xfdf4,
0xff17, 0x0020,
0x00f2, 0x01a2,
0x0253, 0x02fe,
0x039a, 0x0422,
0x048c, 0x04d1,
0x3fff, 0xc001,
0x3fff, 0x0000,
};
// 0x14714
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010000,
0x00010094,
0x00010092,
0x00010000,
0x00010093,
0x00010000,
0x00010000,
0x001d0075,
0x00010000,
0x00010000,
0x001d0058,
0x00010000,
0x00010000,
0x001d003b,
0x00010000,
0x00010000,
0x001d001e,
0x00010000,
0x00010000,
0x001d0001,
// 0x06014714
animation_type_3_triplet d_course_yoshi_valley_unk2[] = {
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x0094 },
},
{
{ 0x0001, 0x0092 },
{ 0x0001, 0x0000 },
{ 0x0001, 0x0093 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x001d, 0x0075 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x001d, 0x0058 },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x001d, 0x003b },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x001d, 0x001e },
},
{
{ 0x0001, 0x0000 },
{ 0x0001, 0x0000 },
{ 0x001d, 0x0001 },
},
};
// 0x14780
// 0x06014780
animation_type_2 d_course_yoshi_valley_unk3 = {
0x00010000,
0x00000000,
0x001d0008,
0x001d,
0x0008,
d_course_yoshi_valley_unk1,
d_course_yoshi_valley_unk2,
};
// 0x1478C
0x060145E8,
0x06014714,
0x06014780,
// 0x06014794
animation_type_2 *d_course_yoshi_valley_unk4[] = {
&d_course_yoshi_valley_unk3,
};
// 0x14798
// 0x06014798
u32 d_course_yoshi_valley_unk5[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10836,6 +10864,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10846,6 +10875,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10856,6 +10886,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10866,6 +10897,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10876,6 +10908,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10886,6 +10919,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10896,6 +10930,7 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
@ -10906,22 +10941,34 @@ u32 d_course_yoshi_valley_unk2[] = {
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000002,
0x00000003,
0x00000002,
};
// No idea what this stuff is
u32 d_course_yoshi_valley_unk6[] = {
0x00000000,
0x00000001,
};

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,9 @@
#include "math_util.h"
#include "code_80004740.h"
#include "memory.h"
#include <main.h>
#include <variables.h>
#include <PR/gbi.h>
Vec3s D_80162D70;
s16 D_80162D76;
@ -62,211 +65,134 @@ void func_800048D8(Mat4 dest, Vec3f b, Vec3s c) {
dest[3][3] = 1.0f;
}
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern ? D_80162D70;
extern s16 D_80162D76;
extern s16 D_80162D7A;
void func_80004A1C(void *arg0, s32 arg1, void *arg2, s32 arg3) {
f32 sp94;
? sp92;
s16 sp8C;
u32 sp3C;
Gfx *temp_v1;
Gfx *temp_v1_2;
f32 *var_v0;
f32 *var_v0_2;
f32 temp_f18;
s16 *var_v1_3;
s16 temp_t0;
s16 temp_t3;
s16 var_t9;
s32 temp_v0;
s32 var_a0_2;
s32 var_t4;
s32 var_t8;
void *var_a0;
void *var_v0_3;
void *var_v1;
void *var_v1_2;
temp_t0 = D_80162D76;
sp3C = arg0->unkC;
if (temp_t0 == 0) {
var_v1 = arg0;
var_v0 = &sp94;
var_a0 = &D_80162D70 + 2;
var_t9 = var_a0->unk-2;
var_t8 = var_v1->unk10;
if (var_a0 != &D_80162D76) {
do {
var_a0 += 2;
var_v0 += 4;
temp_f18 = (f32) (var_t8 + var_t9);
var_v1 += 4;
var_t9 = var_a0->unk-2;
var_v0->unk-4 = temp_f18;
var_t8 = var_v1->unk10;
} while (var_a0 != &D_80162D76);
#if 1
/*
https://decomp.me/scratch/v615X
Leaving this as non-matching due to all the animation stuff being in flux
But, as stuff currently stands, it is technically matching
*/
void func_80004A1C(animation_type_1 *arg0, s16 *arg1, animation_type_3_triplet arg2, s32 arg3) {
Vec3f sp94;
Vec3s sp8C;
Mat4 sp4C;
s32 someIndex;
s32 some_offset;
Gfx *some_dl;
Gfx *some_segmented_dl;
some_segmented_dl = arg0->optional_segmented_dl_address;
if (D_80162D76 == 0) {
for (someIndex = 0; someIndex < 3; someIndex++) {
sp94[someIndex] = D_80162D70[someIndex] + arg0->thing[someIndex];
}
(var_v0 + 4)->unk-4 = (f32) (var_t8 + var_t9);
D_80162D76 = temp_t0 + 1;
D_80162D76 += 1;
} else {
var_v1_2 = arg0;
var_v0_2 = &sp94 + 4;
var_t4 = var_v1_2->unk10;
if (var_v0_2 != &arg0) {
do {
var_v0_2 += 4;
var_v1_2 += 4;
var_v0_2->unk-8 = (f32) var_t4;
var_t4 = var_v1_2->unk10;
} while (var_v0_2 != &arg0);
for (someIndex = 0; someIndex < 3; someIndex++) {
sp94[someIndex] = arg0->thing[someIndex];
}
var_v0_2->unk-4 = (f32) var_t4;
}
var_v0_3 = arg2;
var_v1_3 = &sp8C;
do {
var_a0_2 = 0;
if (arg3 < (s32) var_v0_3->unk0) {
var_a0_2 = arg3;
for (someIndex = 0; someIndex < 3; someIndex++) {
if (arg3 < arg2[someIndex].some_limiter) {
some_offset = arg3;
} else {
some_offset = 0;
}
var_v1_3 += 2;
temp_t3 = *(arg1 + (var_v0_3->unk2 * 2) + (var_a0_2 * 2));
var_v0_3 += 4;
var_v1_3->unk-2 = temp_t3;
} while (var_v1_3 != &sp92);
func_800048D8((f32 (*)[4]) &sp4C[0], &sp94, &sp8C);
func_80004740(&gGfxPool->mtxPool[D_8018D120] + 0x2C0, (f32 (*)[4]) &sp4C[0]);
temp_v1 = gDisplayListHead;
sp8C[someIndex] = arg1[arg2[someIndex].some_offset + some_offset];
}
func_800048D8(sp4C, sp94, sp8C);
func_80004740(&gGfxPool->mtxPool[D_8018D120 + 11], sp4C);
D_80162D7A += 1;
gDisplayListHead = temp_v1 + 8;
temp_v1->words.w0 = 0x01040040;
temp_v1->words.w1 = (u32) (&gGfxPool->mtxPool[D_8018D120] + 0x800002C0);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&gGfxPool->mtxPool[D_8018D120 + 11]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
D_8018D120 += 1;
if (sp3C != 0) {
temp_v0 = segmented_to_virtual(sp3C);
temp_v1_2 = gDisplayListHead;
gDisplayListHead = temp_v1_2 + 8;
temp_v1_2->words.w1 = (u32) temp_v0;
temp_v1_2->words.w0 = 0x06000000;
if (some_segmented_dl != NULL) {
some_dl = segmented_to_virtual(some_segmented_dl);
gSPDisplayList(gDisplayListHead++, some_dl);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80004740/func_80004A1C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_80004A1C(void *, s32, s32, s16); // extern
extern ? D_80162D70;
extern s16 D_80162D76;
extern s16 D_80162D78;
extern s16 D_80162D7A;
extern void *gDisplayListHead;
#ifdef NON_MATCHING
/*
https://decomp.me/scratch/DCV5v
Leaving this as non-matching due to all the animation stuff being in flux
But, as stuff currently stands, it is technically matching
There is some really silly type-casting being done to arg0. I don't see a way around it :/
*/
void func_80004C30(u32 *arg0, animation_type_2 *arg1, s16 arg2) {
u32 *temp;
s16 *sp40;
s32 some_offset;
animation_type_3_triplet *temp_v0;
s32 new_var;
s32 someIndex;
void func_80004C30(void *arg0, void *arg1, s16 arg2) {
s32 sp40;
? *temp_v1;
s32 temp_s0;
s32 temp_v0;
void *temp_v1_2;
void *temp_v1_3;
void *phi_a0;
s16 phi_a1;
? *phi_v1;
void *phi_s2;
s16 phi_a3;
s32 phi_s4;
arg2 = arg2;
sp40 = segmented_to_virtual(arg1->unkC);
temp_v0 = segmented_to_virtual(arg1->unk10);
sp40 = segmented_to_virtual(arg1->type_2_array_pointer);
temp_v0 = segmented_to_virtual(arg1->type_3_array_pointer);
D_80162D7A = 0;
D_80162D76 = 0;
phi_a0 = temp_v0;
phi_v1 = &D_80162D70;
phi_s2 = arg0;
phi_a3 = arg2;
do {
phi_a1 = 0;
if (arg2 < phi_a0->unk0) {
phi_a1 = arg2;
}
temp_v1 = phi_v1 + 2;
temp_v1->unk-2 = *(sp40 + (phi_a0->unk2 * 2) + (phi_a1 * 2));
phi_a0 += 4;
phi_v1 = temp_v1;
} while (temp_v1 != &D_80162D76);
D_80162D78 = 0;
phi_s4 = temp_v0 + 0xC;
do {
temp_s0 = phi_s2->unk0;
if (temp_s0 != 0) {
if (temp_s0 != 1) {
if (temp_s0 != 2) {
if (temp_s0 != 3) {
}
} else {
temp_v1_2 = gDisplayListHead;
gDisplayListHead = temp_v1_2 + 8;
temp_v1_2->unk4 = 0;
temp_v1_2->unk0 = 0xBD000000;
D_80162D7A = D_80162D7A - 1;
}
} else {
D_80162D78 = 1;
}
for (someIndex = 0; someIndex < 3; someIndex++) {
if (arg2 < (*temp_v0)[someIndex].some_limiter) {
some_offset = arg2;
} else {
if (D_80162D78 == 0) {
temp_v1_3 = gDisplayListHead;
gDisplayListHead = temp_v1_3 + 8;
temp_v1_3->unk4 = 0;
temp_v1_3->unk0 = 0xBD000000;
D_80162D7A = D_80162D7A - 1;
}
arg2 = phi_a3;
func_80004A1C(phi_s2, sp40, phi_s4, phi_a3);
D_80162D78 = 0;
phi_a3 = arg2;
phi_s4 += 0xC;
some_offset = 0;
}
phi_s2 += phi_s2->unk4 * 4;
} while (temp_s0 != 3);
D_80162D70[someIndex] = sp40[(*temp_v0)[someIndex].some_offset + some_offset];
}
temp_v0++;
D_80162D78 = 0;
do {
new_var = ((animation_type_1 *) arg0)->type;
switch (new_var) { /* irregular */
case 3:
break;
case 1:
D_80162D78 = 1;
break;
case 2:
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
D_80162D7A -= 1;
break;
case 0:
if (D_80162D78 == 0) {
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
D_80162D7A -= 1;
}
func_80004A1C(arg0, sp40, *temp_v0, (s32) arg2);
D_80162D78 = 0;
temp_v0++;
break;
}
arg0 += ((animation_type_1*)arg0)->size;
} while (new_var != 3);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80004740/func_80004C30.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_80004C30(s32, void *, s16); // extern
s16 func_80004DFC(u32 arg0, u32 arg1, s16 arg2, s16 arg3) {
s32 sp24;
void *sp20;
s16 temp_s0;
void *temp_v0;
s16 phi_s0;
s16 phi_s0_2;
#ifdef NON_MATCHING
/*
Leaving this as non-matching due to all the animation stuff being in flux
But, as stuff currently stands, it is technically matching
*/
s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 arg3) {
animation_type_1 *sp24;
animation_type_2 *temp_v0;
animation_type_2 **sp20;
sp24 = segmented_to_virtual(arg0);
temp_v0 = segmented_to_virtual(*(segmented_to_virtual(arg1) + (arg2 * 4)));
phi_s0 = arg3;
if (arg3 >= temp_v0->unk8) {
phi_s0 = 0;
sp20 = segmented_to_virtual(arg1); // Convert the array's address
temp_v0 = segmented_to_virtual(sp20[arg2]); // Convert an array element's address
if (arg3 >= temp_v0->animation_length) {
arg3 = 0;
}
sp20 = temp_v0;
func_80004C30(sp24, temp_v0, phi_s0);
temp_s0 = phi_s0 + 1;
phi_s0_2 = temp_s0;
if (temp_s0 >= temp_v0->unk8) {
phi_s0_2 = 0;
func_80004C30(sp24, temp_v0, arg3);
arg3++;
if (arg3 >= temp_v0->animation_length) {
arg3 = 0;
}
return phi_s0_2;
return arg3;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80004740/func_80004DFC.s")

View File

@ -3,6 +3,185 @@
#include "common_structs.h"
/*
What I know about animation stuff so far
Its not clear to me exactly what animations even are in MK64, my speculation is that their some form of matrix manipulation sequence.
Presumably the "models" of the objects that are getting animated are a bunch of matrices and the animations somehow change them.
code_80004740 appears to be responsible for the handling of animations.
Animation seem to be reserved for objects, namely: seagulls in KTB, flags in YV, chain chomps in RR, and penguins in SL.
Each object has 2 pointers of interest, at offsets 0x70 and 0x74 (unk_070 and unk_074).
These are passed to func_80004DFC, along with what appears to be an index and a timer.
func_80004DFC(unk70, unk74, index, timer)
unk_070 points to what I will call a "Type 1" array.
I call it an array, but I don't think that's entirely accurate.
There are 4 potential "types" of "type 1" arrays: 0, 1, 2, and 3
Only type 0 has anything below the "size" entry.
The rest only have the type and size.
The contents look like this struct
struct {
s32 type;
s32 size;
s32 always_zero_never_used;
s32 maybe_a_dl_pointer_maybe_null;
s32 thing1;
s32 thing2;
s32 thing3;
}
Again, note that types 1, 2, and 3 only have the "type" and "size" elements.
They are handled in func_80004C30.
Each "type" indicates a different action to take while iterating over the array.
Type 1: Only used to modify Type 0's behaviour
Type 2: Pop a matrix
Type 3: End of array, stop processing
Type 0: Always handles some part of the animation. If preceded by a Type 1 entry it will pop a matrix prior to the animation handling.
The "size" entry is used in a weird way. If you have a set of entries like:
0x00000001, <- Our unk_070 pointer starts here
0x00000002,
0x00000000,
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000001,
0x00000002,
Then the size of 2 in the first entry is used to move the pointer 2 words forward
0x00000001,
0x00000002,
0x00000000, <- Goes here
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0xfffffffb, (this is really -5)
0x00000005,
0x00000001,
0x00000002,
Then, the 7 does the same thing
0x00000001,
0x00000002,
0x00000000,
0x00000007,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000001, <- Now we're here
0x00000002,
This is why I don't think referring to this as an "array" is really correct.
Iterating over this data not like iterating over a proper array at all.
I don't really understand the "thing" entries yet.
They seem to be used in func_80004A1C to set some values in Vec3f which is then used to set some values in a Mat4.
This, I assume, is related to the matrix maniplation stuff that's used to actually accomplish the animation.
The unk_074 pointer points to a list of other pointers.
As best as I can tell only the penguins actually have multiple entries in this list, all the other animated objects have just 1 entry.
The pointers in this list have entires that look like this struct:
struct {
s32 always_set_to_something_but_never_used;
s32 always_zero_never_used;
s/u16 animation_length;
s/u16 has_value_but_never_used;
s32 type_2_array_pointer;
s32 type_3_array_pointer;
}
I will refer to these structs as Struct 2's.
Type 2 arrays appear to be just s/u16 arrays.
Their use will be discussed later
Type 3 arrays appear to be arrays of pairs of s/u16 numbers that look like this struct:
struct {
s/u16 some_limiter;
s/u16 some_offset;
};
Type 3 entires are interesting.
They're used in func_80004C30 and func_80004A1C, and they're always used in triples
The `timer` argument to func_80004DFC is compared to the `some_limiter` entry.
If it less than the limiter then its value it used elsewhere, otherwise 0 is used (more details below).
The `some_offset` value is always used.
Then, the 2 chosen values are used to select a value from the Type 2 array.
So, for example, if you have a Struct 2 like:
0x00010000,
0x00000000,
0x0037, <- animation lenght
0x000a,
d_course_koopa_troopa_beach_unk_data2,
d_course_koopa_troopa_beach_unk_data3,
d_course_koopa_troopa_beach_unk_data2 should be a Type 2 array while d_course_koopa_troopa_beach_unk_data3 is a Type 3 array.
d_course_koopa_troopa_beach_unk_data3 has entries that look like:
//limiter //offset
0x0001, 0x0000,
0x0037, 0x0001,
0x0001, 0x0000,
In practice the limiter value is always 1 or the animation length, meaning that you either choose 0 or the current animation timer.
There's never a situation where you will choose the animation timer until it hits X and then swap to 0.
Its always one or the other, never swapping.
The first triplet is used in func_80004C30 to access the Type 2 array and the values accessed is placed into D_80162D70.
D_80162D70 is a Vec3s is then used to set the values of some Vec3f in func_80004A1C.
All further triplets are used in func_80004A1C to collect Type 2 values to another Vec3s local to the function.
Both the local Vec3s and Vec3f are used to create a Mat4, which is then converted to a Mtx, which is then pushed into the matrix pool.
The chosen values are then used to access the Type 2 array and the value accessed is placed into D_80162D70.
D_80162D70 is a Vec3s that is used to set values in the some Vec3f that goes on to be used to modify the same Mat4 that the `thing` values are placed into.
*/
typedef struct {
/* 0x00 */ s32 type;
/* 0x04 */ s32 size;
/* 0x08 */ s32 always_zero_never_used;
/* 0x0C */ Gfx *optional_segmented_dl_address;
/* 0x10 */ s32 thing[3];
} animation_type_1;
typedef struct {
/* 0x00 */ u16 some_limiter;
/* 0x02 */ u16 some_offset;
} animation_type_3;
typedef animation_type_3 animation_type_3_triplet[3];
typedef struct {
/* 0x00 */ s32 always_set_to_something_but_never_used;
/* 0x04 */ s32 always_zero_never_used;
/* 0x08 */ s16 animation_length;
/* 0x0A */ u16 has_value_but_never_used;
/* 0x0C */ s16 *type_2_array_pointer;
/* 0x10 */ animation_type_3_triplet *type_3_array_pointer;
} animation_type_2;
struct stru_80004EAC {
s32 unk0;
s32 unk4;
@ -14,5 +193,8 @@ struct stru_80004EAC {
void func_80004740(Mtx *dest, Mat4 src);
void func_800048D8(Mat4 dest, Vec3f b, Vec3s c);
s16 func_80004EAC(void*, s16);
void func_80004A1C(animation_type_1*, s16*, animation_type_3_triplet, s32);
void func_80004C30(u32*, animation_type_2*, s16);
s16 func_80004DFC(animation_type_1*, animation_type_2**, s16, s16);
#endif