mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Split headers to be more similar to OOT (#13)
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <PR/sched.h>
|
||||
#include <io/controller.h>
|
||||
#include <osint.h>
|
||||
#include <viint.h>
|
||||
#include <guint.h>
|
||||
#include <os.h>
|
||||
#include <stdlib.h>
|
||||
#include <xstdio.h>
|
||||
#include <unk.h>
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef _COLOR_H_
|
||||
#define _COLOR_H_
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 red;
|
||||
/* 0x1 */ u8 green;
|
||||
/* 0x2 */ u8 blue;
|
||||
/* 0x3 */ u8 alpha;
|
||||
} ColorRGBA8; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 red;
|
||||
/* 0x1 */ u8 green;
|
||||
/* 0x2 */ u8 blue;
|
||||
} RGB; // size = 0x3
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 red;
|
||||
/* 0x1 */ u8 green;
|
||||
/* 0x2 */ u8 blue;
|
||||
/* 0x3 */ u8 alpha;
|
||||
} RGBA8; // size = 0x4
|
||||
|
||||
#endif
|
||||
+13
-13111
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2
-3
@@ -1,10 +1,9 @@
|
||||
#ifndef _GLOBAL_H_
|
||||
#define _GLOBAL_H_
|
||||
|
||||
#include "macros.h"
|
||||
#include "structs.h"
|
||||
#include "functions.h"
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _GLOBAL_OVERLAY_H_
|
||||
#define _GLOBAL_OVERLAY_H_
|
||||
|
||||
#include "global.h"
|
||||
#include "functions_overlay.h"
|
||||
#include "variables_overlay.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
#ifndef _ICHAIN_H_
|
||||
#define _ICHAIN_H_
|
||||
|
||||
typedef struct {
|
||||
u32 cont: 1;
|
||||
u32 type: 4;
|
||||
u32 offset: 11;
|
||||
s32 value: 16;
|
||||
} InitChainEntry;
|
||||
|
||||
#define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member))
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ ICHAINTYPE_U8, // sets byte
|
||||
/* 0x1 */ ICHAINTYPE_S8,
|
||||
/* 0x2 */ ICHAINTYPE_U16, // sets short
|
||||
/* 0x3 */ ICHAINTYPE_S16,
|
||||
/* 0x4 */ ICHAINTYPE_U32, // sets word
|
||||
/* 0x5 */ ICHAINTYPE_S32,
|
||||
/* 0x6 */ ICHAINTYPE_F32, // sets float
|
||||
/* 0x7 */ ICHAINTYPE_F32_DIV1000, // sets float divided by 1000
|
||||
/* 0x8 */ ICHAINTYPE_VEC3F, // sets Vec3f members
|
||||
/* 0x9 */ ICHAINTYPE_VEC3F_DIV1000, // sets Vec3f members divided by 1000
|
||||
/* 0xA */ ICHAINTYPE_VEC3S // sets Vec3s members
|
||||
} InitChainType;
|
||||
|
||||
/**
|
||||
* ICHAIN macros generate an init chain entry of the following form:
|
||||
* * (e >> 31) & 0x0001 == Continue Parsing after this entry
|
||||
* * (e >> 27) & 0x000F == Type
|
||||
* * (e >> 16) & 0x07FF == Offset from start of instance to write initial value
|
||||
* * e & 0xFFFF == Initial Value
|
||||
*
|
||||
* Arguments:
|
||||
* * type ----- value from enum `InitChainType`
|
||||
* * member --- name of member inside `Actor` structure to use as the offset
|
||||
* * value ---- s16 value to use
|
||||
* * cont ----- ICHAIN_CONTINUE (or ICHAIN_STOP) to continue (or stop) parsing
|
||||
*/
|
||||
#define ICHAIN(type, member, value, cont) \
|
||||
{ cont, type, OFFSETOF(Actor, member), value }
|
||||
|
||||
#define ICHAIN_U8(member, val, cont) ICHAIN(ICHAINTYPE_U8, member, val, cont)
|
||||
#define ICHAIN_S8(member, val, cont) ICHAIN(ICHAINTYPE_S8, member, val, cont)
|
||||
#define ICHAIN_U16(member, val, cont) ICHAIN(ICHAINTYPE_U16, member, val, cont)
|
||||
#define ICHAIN_S16(member, val, cont) ICHAIN(ICHAINTYPE_S16, member, val, cont)
|
||||
#define ICHAIN_U32(member, val, cont) ICHAIN(ICHAINTYPE_U32, member, val, cont)
|
||||
#define ICHAIN_S32(member, val, cont) ICHAIN(ICHAINTYPE_S32, member, val, cont)
|
||||
#define ICHAIN_F32(member, val, cont) ICHAIN(ICHAINTYPE_F32, member, val, cont)
|
||||
#define ICHAIN_F32_DIV1000(member, val, cont) ICHAIN(ICHAINTYPE_F32_DIV1000, member, val, cont)
|
||||
#define ICHAIN_VEC3F(member, val, cont) ICHAIN(ICHAINTYPE_VEC3F, member, val, cont)
|
||||
#define ICHAIN_VEC3F_DIV1000(member, val, cont) ICHAIN(ICHAINTYPE_VEC3F_DIV1000, member, val, cont)
|
||||
#define ICHAIN_VEC3S(member, val, cont) ICHAIN(ICHAINTYPE_VEC3S, member, val, cont)
|
||||
|
||||
#define ICHAIN_CONTINUE 1
|
||||
#define ICHAIN_STOP 0
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _SEGMENT_H_
|
||||
#define _SEGMENT_H_
|
||||
|
||||
#include <structs.h>
|
||||
#include <z64.h>
|
||||
|
||||
extern UNK_TYPE D_04029CB0; // D_04029CB0
|
||||
extern UNK_TYPE D_04029CF0; // D_04029CF0
|
||||
|
||||
-4589
File diff suppressed because it is too large
Load Diff
+3
-13776
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1809
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,224 @@
|
||||
#ifndef _Z_COLLISION_CHECK_H_
|
||||
#define _Z_COLLISION_CHECK_H_
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <z64math.h>
|
||||
#include <unk.h>
|
||||
|
||||
struct Actor;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
} ColBumpInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unk0;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 type;
|
||||
} ColCommonInit; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 collidesWith;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 damage;
|
||||
} ColTouch; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
} ColTouchInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 unk0;
|
||||
/* 0x04 */ ColTouchInit unk4;
|
||||
/* 0x0C */ ColBumpInit unkC;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 unk15;
|
||||
/* 0x16 */ u8 unk16;
|
||||
} ColBodyInfoInit; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 collidesWith;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
/* 0x6 */ Vec3s unk6;
|
||||
} ColBump; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 radius;
|
||||
/* 0x2 */ s16 height;
|
||||
/* 0x4 */ s16 yOffset;
|
||||
/* 0x6 */ Vec3s loc;
|
||||
} ColCylinderParams; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pointA;
|
||||
/* 0x0C */ Vec3f pointB;
|
||||
/* 0x18 */ Vec3f pointC;
|
||||
/* 0x24 */ Vec3f pointD;
|
||||
/* 0x30 */ Vec3s unk30;
|
||||
/* 0x36 */ Vec3s unk36;
|
||||
/* 0x3C */ f32 unk3C;
|
||||
} ColQuadParams; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ Vec3s loc;
|
||||
/* 0x6 */ s16 radius;
|
||||
} ColSphereCollisionInfo; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s unk0;
|
||||
/* 0x06 */ s16 unk6;
|
||||
/* 0x08 */ ColSphereCollisionInfo colInfo;
|
||||
/* 0x10 */ f32 unk10;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ UNK_TYPE1 pad15[0x3];
|
||||
} ColSphereParams; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unk0;
|
||||
/* 0x1 */ ColSphereCollisionInfo unk1;
|
||||
/* 0xA */ s16 unkA;
|
||||
} ColSphereParamsInit; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pointA;
|
||||
/* 0x0C */ Vec3f pointB;
|
||||
/* 0x18 */ Vec3f pointC;
|
||||
/* 0x24 */ Vec3f unitNormal;
|
||||
/* 0x30 */ f32 unk30;
|
||||
} ColTriParams; // size = 0x34
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f unkC;
|
||||
/* 0x18 */ Vec3f unk18;
|
||||
} ColTriParamsInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommonInit base;
|
||||
/* 0x08 */ ColBodyInfoInit body;
|
||||
/* 0x20 */ ColCylinderParams info;
|
||||
} ColCylinderInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommonInit base;
|
||||
/* 0x08 */ ColBodyInfoInit body;
|
||||
/* 0x20 */ ColQuadParams params;
|
||||
} ColQuadInit; // size = 0x60
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColBodyInfoInit body;
|
||||
/* 0x18 */ ColSphereParamsInit params;
|
||||
} ColSphereGroupElementInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ ColCommonInit base;
|
||||
/* 0x6 */ UNK_TYPE1 pad6[0x2];
|
||||
/* 0x8 */ u32 count;
|
||||
/* 0xC */ ColSphereGroupElementInit* init;
|
||||
} ColSphereGroupInit; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommonInit base;
|
||||
/* 0x08 */ ColBodyInfoInit body;
|
||||
/* 0x20 */ ColSphereParamsInit info;
|
||||
} ColSphereInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColBodyInfoInit body;
|
||||
/* 0x18 */ ColTriParamsInit params;
|
||||
} ColTriInit; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ ColCommonInit base;
|
||||
/* 0x8 */ u32 count;
|
||||
/* 0xC */ ColTriInit* elemInit;
|
||||
} ColTriGroupInit; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ struct Actor* actor;
|
||||
/* 0x04 */ struct Actor* collisionAT;
|
||||
/* 0x08 */ struct Actor* collisionAC;
|
||||
/* 0x0C */ struct Actor* collisionOT;
|
||||
/* 0x10 */ u8 flagsAT;
|
||||
/* 0x11 */ u8 flagsAC; // bit 1 - collision occured?
|
||||
/* 0x12 */ u8 unk12;
|
||||
/* 0x13 */ u8 unk13;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 type;
|
||||
/* 0x16 */ UNK_TYPE1 pad16[0x2];
|
||||
} ColCommon; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 ATgroupLength;
|
||||
/* 0x002 */ u16 flags; // bit 0: collision bodies can't be added or removed, only swapped out
|
||||
/* 0x004 */ ColCommon* ATgroup[50];
|
||||
/* 0x0CC */ s32 ACgroupLength;
|
||||
/* 0x0D0 */ ColCommon* ACgroup[60];
|
||||
/* 0x1C0 */ s32 OTgroupLength;
|
||||
/* 0x1C4 */ ColCommon* OTgroup[50];
|
||||
/* 0x28C */ s32 group4Length;
|
||||
/* 0x290 */ ColCommon* group4[3];
|
||||
} CollisionCheckContext; // size = 0x29C
|
||||
|
||||
typedef struct ColBodyInfo_t {
|
||||
/* 0x00 */ ColTouch toucher;
|
||||
/* 0x08 */ ColBump bumper;
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 unk15; // bit 0: can be toucher in AT-AC collision
|
||||
/* 0x16 */ u8 unk16; // bit 0: can be bumper in AT-AC collision
|
||||
/* 0x17 */ u8 unk17;
|
||||
/* 0x18 */ ColCommon* unk18;
|
||||
/* 0x1C */ ColCommon* unk1C;
|
||||
/* 0x20 */ struct ColBodyInfo_t* unk20;
|
||||
/* 0x24 */ struct ColBodyInfo_t* unk24;
|
||||
} ColBodyInfo; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColBodyInfo body;
|
||||
/* 0x28 */ ColSphereParams params;
|
||||
} ColSphereGroupElement; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColBodyInfo body;
|
||||
/* 0x28 */ ColTriParams params;
|
||||
} ColTri; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommon base;
|
||||
/* 0x18 */ ColBodyInfo body;
|
||||
/* 0x40 */ ColCylinderParams params;
|
||||
} ColCylinder; // size = 0x4C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommon base;
|
||||
/* 0x18 */ ColBodyInfo body;
|
||||
/* 0x40 */ ColQuadParams params;
|
||||
} ColQuad; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommon base;
|
||||
/* 0x18 */ ColBodyInfo body;
|
||||
/* 0x40 */ ColSphereParams params;
|
||||
} ColSphere; // size = 0x58
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommon base;
|
||||
/* 0x18 */ u32 count;
|
||||
/* 0x1C */ ColSphereGroupElement* spheres;
|
||||
} ColSphereGroup; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColCommon base;
|
||||
/* 0x18 */ u32 count;
|
||||
/* 0x1C */ ColTri* tris;
|
||||
} ColTriGroup; // size = 0x20
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
#ifndef _Z64CUTSCENE_H_
|
||||
#define _Z64CUTSCENE_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <unk.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE1 pad0[0x2];
|
||||
/* 0x02 */ u16 startFrame;
|
||||
/* 0x04 */ u16 endFrame;
|
||||
/* 0x06 */ UNK_TYPE1 pad6[0x2A];
|
||||
} CsCmdActorAction; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 base;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
} CsCmdBase; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 unk0;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
/* 0x6 */ u8 hour;
|
||||
/* 0x7 */ u8 minute;
|
||||
} CsCmdDayTime; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 setting;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
} CsCmdEnvLighting; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 sequence;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
} CsCmdMusicChange; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 type;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
} CsCmdMusicFade; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 base;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
/* 0x6 */ u16 type;
|
||||
/* 0x8 */ u16 textId1;
|
||||
/* 0xA */ u16 textId2;
|
||||
} CsCmdTextbox; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 unk0;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
/* 0x6 */ u8 unk6;
|
||||
/* 0x7 */ u8 unk7;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ UNK_TYPE1 pad9[0x3];
|
||||
} CsCmdUnk190; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE4 unk0;
|
||||
/* 0x4 */ UNK_TYPE4 unk4;
|
||||
} CsCmdUnk5A; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 unk0;
|
||||
/* 0x2 */ u16 startFrame;
|
||||
/* 0x4 */ u16 endFrame;
|
||||
/* 0x6 */ u8 unk6;
|
||||
/* 0x7 */ u8 unk7;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ UNK_TYPE1 pad9[0x3];
|
||||
} CsCmdUnk9B; // size = 0xC
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef _Z64_DMA_H_
|
||||
#define _Z64_DMA_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromAddr; // VROM address (source)
|
||||
/* 0x04 */ void* dramAddr; // DRAM address (destination)
|
||||
/* 0x08 */ u32 size; // File Transfer size
|
||||
/* 0x0C */ char* filename; // Filename for debugging
|
||||
/* 0x10 */ s32 line; // Line for debugging
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ OSMesgQueue* notifyQueue; // Message queue for the notification message
|
||||
/* 0x1C */ OSMesg notifyMsg; // Completion notification message
|
||||
} DmaRequest; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x08 */ u32 romStart;
|
||||
/* 0x0C */ u32 romEnd;
|
||||
} DmaEntry; // size = 0x10
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,296 @@
|
||||
#ifndef _Z64EFFECT_H_
|
||||
#define _Z64EFFECT_H_
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <color.h>
|
||||
#include <z64light.h>
|
||||
#include <z64math.h>
|
||||
#include <unk.h>
|
||||
|
||||
struct GraphicsContext;
|
||||
struct GlobalContext;
|
||||
|
||||
typedef void(*eff_destroy_func)(void* params);
|
||||
|
||||
typedef void(*eff_draw_func)(void* params, struct GraphicsContext* gCtxt);
|
||||
|
||||
typedef void(*eff_init_func)(void* params, void* init);
|
||||
|
||||
typedef s32(*eff_update_func)(void* params);
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 active;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ UNK_TYPE1 pad3[0x1];
|
||||
} EffCommon; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f velocity;
|
||||
/* 0x0C */ Vec3f position;
|
||||
/* 0x18 */ Vec3s unk18;
|
||||
/* 0x1E */ Vec3s unk1E;
|
||||
} EffSparkParticle; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Vec3s position;
|
||||
/* 0x008 */ s32 numParticles; // Will be calculated as particleFactor1 * particleFactor2 + 2
|
||||
/* 0x00C */ EffSparkParticle particles[32];
|
||||
/* 0x48C */ f32 velocity;
|
||||
/* 0x490 */ f32 gravity;
|
||||
/* 0x494 */ u32 particleFactor1;
|
||||
/* 0x498 */ u32 particleFactor2;
|
||||
/* 0x49C */ ColorRGBA8 colorStart[4];
|
||||
/* 0x4AC */ ColorRGBA8 colorEnd[4];
|
||||
/* 0x4BC */ s32 age;
|
||||
/* 0x4C0 */ s32 duration;
|
||||
} EffSparkParams; // size = 0x4C4
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffSparkParams params;
|
||||
} EffSpark; // size = 0x4C8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE1 pad0[0x18];
|
||||
} EffBlureParticle; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ UNK_TYPE1 pad0[0x184];
|
||||
/* 0x184 */ ColorRGBA8 unk184;
|
||||
/* 0x188 */ ColorRGBA8 unk188;
|
||||
/* 0x18C */ ColorRGBA8 unk18C;
|
||||
/* 0x190 */ ColorRGBA8 unk190;
|
||||
/* 0x194 */ UNK_TYPE1 pad194[0xC];
|
||||
} EffBlureInit1; // size = 0x1A0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE1 pad0[0x8];
|
||||
/* 0x08 */ ColorRGBA8 unk8;
|
||||
/* 0x0C */ ColorRGBA8 unkC;
|
||||
/* 0x10 */ ColorRGBA8 unk10;
|
||||
/* 0x14 */ ColorRGBA8 unk14;
|
||||
/* 0x18 */ UNK_TYPE1 pad18[0xC];
|
||||
} EffBlureInit2; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffBlureParticle particles[16];
|
||||
/* 0x180 */ UNK_TYPE1 pad180[0x4];
|
||||
/* 0x184 */ f32 unk184;
|
||||
/* 0x188 */ u16 unk188;
|
||||
/* 0x18A */ UNK_TYPE1 pad18A[0x4];
|
||||
/* 0x18E */ ColorRGBA8 unk18E;
|
||||
/* 0x192 */ ColorRGBA8 unk192;
|
||||
/* 0x196 */ ColorRGBA8 unk196;
|
||||
/* 0x19A */ ColorRGBA8 unk19A;
|
||||
/* 0x19E */ u8 unk19E;
|
||||
/* 0x19F */ u8 unk19F;
|
||||
/* 0x1A0 */ u8 unk1A0;
|
||||
/* 0x1A1 */ u8 unk1A1;
|
||||
/* 0x1A2 */ UNK_TYPE1 pad1A2[0xA];
|
||||
} EffBlureParams; // size = 0x1AC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffBlureParams params;
|
||||
} EffBlure; // size = 0x1B0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 startSpeed;
|
||||
/* 0x04 */ f32 endXChange;
|
||||
/* 0x08 */ f32 endX;
|
||||
/* 0x0C */ f32 startXChange;
|
||||
/* 0x10 */ f32 startX;
|
||||
/* 0x14 */ s16 rotationY;
|
||||
/* 0x16 */ s16 rotationZ;
|
||||
} EffShieldParticleParticle; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 numParticles;
|
||||
/* 0x02 */ Vec3s position;
|
||||
/* 0x08 */ ColorRGBA8 primColorStart;
|
||||
/* 0x0C */ ColorRGBA8 envColorStart;
|
||||
/* 0x10 */ ColorRGBA8 primColorMid;
|
||||
/* 0x14 */ ColorRGBA8 envColorMid;
|
||||
/* 0x18 */ ColorRGBA8 primColorEnd;
|
||||
/* 0x1C */ ColorRGBA8 envColorEnd;
|
||||
/* 0x20 */ f32 acceleration;
|
||||
/* 0x24 */ f32 maxInitialSpeed;
|
||||
/* 0x28 */ f32 lengthCutoff;
|
||||
/* 0x2C */ u8 duration;
|
||||
/* 0x2E */ LightInfoPositionalParams lightParams;
|
||||
/* 0x3C */ s32 hasLight;
|
||||
} EffShieldParticleInit; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffShieldParticleParticle particles[16];
|
||||
/* 0x180 */ u8 numParticles;
|
||||
/* 0x181 */ UNK_TYPE1 pad181[0x1];
|
||||
/* 0x182 */ Vec3s position;
|
||||
/* 0x188 */ ColorRGBA8 primColorStart;
|
||||
/* 0x18C */ ColorRGBA8 envColorStart;
|
||||
/* 0x190 */ ColorRGBA8 primColorMid;
|
||||
/* 0x194 */ ColorRGBA8 envColorMid;
|
||||
/* 0x198 */ ColorRGBA8 primColorEnd;
|
||||
/* 0x19C */ ColorRGBA8 envColorEnd;
|
||||
/* 0x1A0 */ f32 acceleration;
|
||||
/* 0x1A4 */ UNK_TYPE1 pad1A4[0x4];
|
||||
/* 0x1A8 */ f32 maxInitialSpeed;
|
||||
/* 0x1AC */ f32 lengthCutoff;
|
||||
/* 0x1B0 */ u8 duration;
|
||||
/* 0x1B1 */ u8 age;
|
||||
/* 0x1B2 */ LightInfo lightInfo;
|
||||
/* 0x1C0 */ z_Light* light;
|
||||
/* 0x1C4 */ s32 hasLight;
|
||||
} EffShieldParticleParams; // size = 0x1C8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffShieldParticleParams params;
|
||||
} EffShieldParticle; // size = 0x1CC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE2 active;
|
||||
/* 0x02 */ Vec3s position1;
|
||||
/* 0x08 */ Vec3s position2;
|
||||
/* 0x0E */ s16 life;
|
||||
/* 0x10 */ UNK_TYPE1 pad10[0x4];
|
||||
/* 0x14 */ UNK_TYPE4 unk14;
|
||||
} EffTireMarkParticle; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ s16 maxLife;
|
||||
/* 0x4 */ ColorRGBA8 color;
|
||||
} EffTireMarkInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffTireMarkParticle particles[64];
|
||||
/* 0x600 */ s16 unk600;
|
||||
/* 0x602 */ s16 numParticles;
|
||||
/* 0x604 */ s16 maxLife;
|
||||
/* 0x606 */ ColorRGBA8 color;
|
||||
/* 0x60A */ UNK_TYPE1 pad60A[0x2];
|
||||
} EffTireMarkParams; // size = 0x60C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffTireMarkParams params;
|
||||
} EffTireMark; // size = 0x610
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 paramsSize;
|
||||
/* 0x04 */ eff_init_func init;
|
||||
/* 0x08 */ eff_destroy_func destroy;
|
||||
/* 0x0C */ eff_update_func update;
|
||||
/* 0x10 */ eff_draw_func draw;
|
||||
} EffInfo; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ struct GlobalContext* ctxt;
|
||||
/* 0x0004 */ EffSpark sparks[3];
|
||||
/* 0x0E5C */ EffBlure blures[25];
|
||||
/* 0x388C */ EffShieldParticle shieldParticles[3];
|
||||
/* 0x3DF0 */ EffTireMark tireMarks[15];
|
||||
} EffTables; // size = 0x98E0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f position;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f acceleration;
|
||||
/* 0x24 */ ColorRGBA8 color1;
|
||||
/* 0x28 */ ColorRGBA8 color2;
|
||||
/* 0x2C */ s16 scale;
|
||||
/* 0x2E */ s16 scaleChangePerFrame;
|
||||
/* 0x30 */ s16 life;
|
||||
/* 0x32 */ u16 flags; // bit0: ? bit1: ? bit2: randomize colors
|
||||
/* 0x34 */ u8 type; // type0: start small, get big, fade away type1: start big, fade away
|
||||
} EffectDustInit; // size = 0x35
|
||||
|
||||
typedef struct LoadedParticleEntry LoadedParticleEntry;
|
||||
|
||||
typedef void(*effect_func)(struct GlobalContext* ctxt, u32 index, LoadedParticleEntry* particle);
|
||||
|
||||
typedef void(*effect_init_func)(struct GlobalContext* ctxt, u32 index, LoadedParticleEntry* particle, void* init);
|
||||
|
||||
struct LoadedParticleEntry {
|
||||
/* 0x00 */ Vec3f position;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f acceleration;
|
||||
/* 0x24 */ effect_func update;
|
||||
/* 0x28 */ effect_func draw;
|
||||
/* 0x2C */ Vec3f unk2C;
|
||||
/* 0x38 */ u32 displayList;
|
||||
/* 0x3C */ UNK_TYPE4 unk3C;
|
||||
/* 0x40 */ s16 regs[13]; // These are particle-specific
|
||||
/* 0x5A */ u16 flags; // bit 0: set if this entry is not considered free on a priority tie bit 1: ? bit 2: ?
|
||||
/* 0x5C */ s16 life; // -1 means this entry is free
|
||||
/* 0x5E */ u8 priority; // Lower number mean higher priority
|
||||
/* 0x5F */ u8 type;
|
||||
}; // size = 0x60
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ LoadedParticleEntry* data_table; // Name from debug assert
|
||||
/* 0x4 */ s32 searchIndex;
|
||||
/* 0x8 */ s32 size;
|
||||
} EffectTableInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE4 unk0;
|
||||
/* 0x4 */ effect_init_func init;
|
||||
} ParticleOverlayInfo; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr;
|
||||
/* 0x14 */ ParticleOverlayInfo* overlayInfo;
|
||||
/* 0x18 */ u32 unk18; // Always 0x01000000?
|
||||
} ParticleOverlay; // size = 0x1C
|
||||
|
||||
typedef enum EffectSSType {
|
||||
EFFECT_SS2_TYPE_DUST = 0x0,
|
||||
EFFECT_SS2_TYPE_SPARKLE = 0x1,
|
||||
EFFECT_SS2_TYPE_DELETED_2 = 0x2,
|
||||
EFFECT_SS2_TYPE_BOMB2 = 0x3,
|
||||
EFFECT_SS2_TYPE_BLAST = 0x4,
|
||||
EFFECT_SS2_TYPE_G_SPARK = 0x5,
|
||||
EFFECT_SS2_TYPE_DODONGO_FIRE = 0x6,
|
||||
EFFECT_SS2_TYPE_BUBBLE = 0x7,
|
||||
EFFECT_SS2_TYPE_DELETED_8 = 0x8,
|
||||
EFFECT_SS2_TYPE_G_RIPPLE = 0x9,
|
||||
EFFECT_SS2_TYPE_G_SPLASH = 0xA,
|
||||
EFFECT_SS2_TYPE_DELETED_B = 0xB,
|
||||
EFFECT_SS2_TYPE_G_FIRE = 0xC,
|
||||
EFFECT_SS2_TYPE_LIGHTNING = 0xD,
|
||||
EFFECT_SS2_TYPE_BIG_OCTO_BUBBLE = 0xE,
|
||||
EFFECT_SS2_TYPE_FRAGMENT = 0xF,
|
||||
EFFECT_SS2_TYPE_STICK = 0x10,
|
||||
EFFECT_SS2_TYPE_SPLASH = 0x11,
|
||||
EFFECT_SS2_TYPE_DELETED_12 = 0x12,
|
||||
EFFECT_SS2_TYPE_DELETED_13 = 0x13,
|
||||
EFFECT_SS2_TYPE_STONE1 = 0x14,
|
||||
EFFECT_SS2_TYPE_HIT_MARK = 0x15,
|
||||
EFFECT_SS2_TYPE_PHANTOM_GANON_FLASH = 0x16,
|
||||
EFFECT_SS2_TYPE_KAKARIKO_FIRE = 0x17,
|
||||
EFFECT_SS2_TYPE_SOLDIER_SEARCH_BALL = 0x18,
|
||||
EFFECT_SS2_TYPE_SHARD = 0x19,
|
||||
EFFECT_SS2_TYPE_ICE_PIECE = 0x1A,
|
||||
EFFECT_SS2_TYPE_ENEMY_ICE = 0x1B,
|
||||
EFFECT_SS2_TYPE_FIRE_TAIL = 0x1C,
|
||||
EFFECT_SS2_TYPE_ENEMY_FIRE = 0x1D,
|
||||
EFFECT_SS2_TYPE_EXTRA = 0x1E,
|
||||
EFFECT_SS2_TYPE_DELETED_1F = 0x1F,
|
||||
EFFECT_SS2_TYPE_DEAD_DEKU_BABA = 0x20,
|
||||
EFFECT_SS2_TYPE_DEAD_DODONGO = 0x21,
|
||||
EFFECT_SS2_TYPE_DEAD_DEKU_SCRUB = 0x22,
|
||||
EFFECT_SS2_TYPE_DELETED_23 = 0x23,
|
||||
EFFECT_SS2_TYPE_ICE_SMOKE = 0x24,
|
||||
EFFECT_SS2_TYPE_ICE_BLOCK = 0x25,
|
||||
EFFECT_SS2_TYPE_SBN = 0x26,
|
||||
EFFECT_SS2_TYPE_LAST_LABEL = 0x27
|
||||
} EffectSSType;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
#ifndef _Z64LIGHT_H_
|
||||
#define _Z64LIGHT_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <PR/gbi.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ u16 params[6];
|
||||
} LightInfo; // size = 0xE
|
||||
|
||||
typedef struct z_Light_t {
|
||||
/* 0x0 */ LightInfo* info;
|
||||
/* 0x4 */ struct z_Light_t* prev;
|
||||
/* 0x8 */ struct z_Light_t* next;
|
||||
} z_Light; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ z_Light* lightsHead;
|
||||
/* 0x4 */ u8 ambientRed;
|
||||
/* 0x5 */ u8 ambientGreen;
|
||||
/* 0x6 */ u8 ambientBlue;
|
||||
/* 0x7 */ u8 unk7;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 unk9;
|
||||
/* 0xA */ s16 unkA;
|
||||
/* 0xC */ s16 unkC;
|
||||
} LightingContext; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s32 numOccupied;
|
||||
/* 0x004 */ s32 nextFree;
|
||||
/* 0x008 */ z_Light lights[32];
|
||||
} LightsList; // size = 0x188
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s8 dirX;
|
||||
/* 0x1 */ s8 dirY;
|
||||
/* 0x2 */ s8 dirZ;
|
||||
/* 0x3 */ u8 red;
|
||||
/* 0x4 */ u8 green;
|
||||
/* 0x5 */ u8 blue;
|
||||
/* 0x6 */ u16 pad[3];
|
||||
} LightInfoDirectionalParams; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 posX;
|
||||
/* 0x2 */ s16 posY;
|
||||
/* 0x4 */ s16 posZ;
|
||||
/* 0x6 */ u8 red;
|
||||
/* 0x7 */ u8 green;
|
||||
/* 0x8 */ u8 blue;
|
||||
/* 0x9 */ u8 unk9; // func_80102880 sets this only for type 2, func_80102A64 draws something if this is set
|
||||
/* 0xA */ s16 radius;
|
||||
} LightInfoPositionalParams; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 enablePosLights;
|
||||
/* 0x01 */ u8 numLights;
|
||||
/* 0x02 */ UNK_TYPE1 pad2[6];
|
||||
/* 0x08 */ Lights7 lights;
|
||||
} LightMapper; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ LightInfoDirectionalParams params;
|
||||
} LightInfoDirectional; // size = 0xE
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ LightInfoPositionalParams params;
|
||||
} LightInfoPositional; // size = 0xE
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef _Z64MATH_H_
|
||||
#define _Z64MATH_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 x;
|
||||
/* 0x4 */ f32 y;
|
||||
/* 0x8 */ f32 z;
|
||||
} Vec3f; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
} Vec3s; // size = 0x6
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user