Refresh 3

This commit is contained in:
n64
2019-11-03 14:36:27 -05:00
parent 6b8bc9b9ec
commit a7c423cb43
4603 changed files with 475500 additions and 437701 deletions

View File

@@ -5,6 +5,7 @@
// have an appropriate header.
#include <ultra64.h>
#include "macros.h"
struct Controller
{
@@ -28,6 +29,15 @@ typedef s16 Vec4s[4];
typedef f32 Mat4[4][4];
typedef uintptr_t GeoLayout;
typedef uintptr_t LevelScript;
typedef s16 Movtex;
typedef s16 MacroObject;
typedef s16 Collision;
typedef s16 Trajectory;
typedef s16 PaintingData;
typedef uintptr_t BehaviorScript;
enum SpTaskState {
SPTASK_STATE_NOT_STARTED,
SPTASK_STATE_RUNNING,
@@ -50,9 +60,6 @@ struct VblankHandler
OSMesg msg;
};
// NOTE: Since ObjectNode is the first member of Object, it is difficult to determine
// whether some of these pointers point to ObjectNode or Object.
#define ANIM_FLAG_NOLOOP (1 << 0) // 0x01
#define ANIM_FLAG_FORWARD (1 << 1) // 0x02
#define ANIM_FLAG_2 (1 << 2) // 0x04
@@ -69,11 +76,13 @@ struct Animation {
/*0x06*/ s16 unk06;
/*0x08*/ s16 unk08;
/*0x0A*/ s16 unk0A;
/*0x0C*/ void *values;
/*0x10*/ void *index;
/*0x0C*/ const s16 *values;
/*0x10*/ const u16 *index;
/*0x14*/ u32 length; // only used with Mario animations to determine how much to load. 0 otherwise.
};
#define ANIMINDEX_NUMPARTS(animindex) (sizeof(animindex) / sizeof(u16) / 6 - 1)
struct GraphNode
{
/*0x00*/ s16 type; // structure type
@@ -96,7 +105,6 @@ struct GraphNodeObject_sub
/*0x10 0x48*/ s32 animAccel;
};
// TODO this is the first member of ObjectNode/Object
struct GraphNodeObject
{
/*0x00*/ struct GraphNode node;
@@ -119,6 +127,9 @@ struct ObjectNode
struct ObjectNode *prev;
};
// NOTE: Since ObjectNode is the first member of Object, it is difficult to determine
// whether some of these pointers point to ObjectNode or Object.
struct Object
{
/*0x000*/ struct ObjectNode header;
@@ -136,6 +147,7 @@ struct Object
s32 asS32[0x50];
s16 asS16[0x50][2];
f32 asF32[0x50];
#if !IS_64_BIT
s16 *asS16P[0x50];
s32 *asS32P[0x50];
struct Animation **asAnims[0x50];
@@ -144,9 +156,24 @@ struct Object
struct Object *asObject[0x50];
struct Surface *asSurface[0x50];
void *asVoidPtr[0x50];
const void *asConstVoidPtr[0x50];
#endif
} rawData;
#if IS_64_BIT
union {
s16 *asS16P[0x50];
s32 *asS32P[0x50];
struct Animation **asAnims[0x50];
struct Waypoint *asWaypoint[0x50];
struct ChainSegment *asChainSegment[0x50];
struct Object *asObject[0x50];
struct Surface *asSurface[0x50];
void *asVoidPtr[0x50];
const void *asConstVoidPtr[0x50];
} ptrData;
#endif
/*0x1C8*/ u32 unused1;
/*0x1CC*/ uintptr_t *behScript;
/*0x1CC*/ const BehaviorScript *behScript;
/*0x1D0*/ u32 stackIndex;
/*0x1D4*/ uintptr_t stack[8];
/*0x1F4*/ s16 unk1F4;
@@ -156,7 +183,7 @@ struct Object
/*0x200*/ f32 hurtboxRadius;
/*0x204*/ f32 hurtboxHeight;
/*0x208*/ f32 hitboxDownOffset;
/*0x20C*/ void *behavior;
/*0x20C*/ const BehaviorScript *behavior;
/*0x210*/ u32 unused2;
/*0x214*/ struct Object *platform;
/*0x218*/ void *collisionData;
@@ -219,7 +246,7 @@ struct MarioBodyState
u8 padding[4];
};
struct MarioAnimSub
struct OffsetSizePair
{
u32 offset;
u32 size;
@@ -229,7 +256,7 @@ struct MarioAnimDmaRelatedThing
{
u32 count;
u8 *srcAddr;
struct MarioAnimSub anim[1]; // dynamic size
struct OffsetSizePair anim[1]; // dynamic size
};
struct MarioAnimation
@@ -304,10 +331,4 @@ struct MarioState
/*0xC4*/ f32 unkC4;
};
struct StructGeo802D2360
{
s32 unk0;
s32 *unk4;
};
#endif