mirror of
https://github.com/zeldaret/oot
synced 2026-08-04 01:03:36 -04:00
[cc0 oot] object_tp and z_en_tp (#2785)
* [cc0 oot] object_tp and z_en_tp * docs * fixup
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
#include "object_tp.h"
|
||||
#include "gfx.h"
|
||||
|
||||
Gfx gTailpasaranTailSegmentDL[14] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranTailSegmentDL.inc.c"
|
||||
};
|
||||
|
||||
Vtx gTailpasaranTailSegmentVtx[] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranTailSegmentVtx.inc.c"
|
||||
};
|
||||
|
||||
Vtx gTailpasaranHeadClawVtx[] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadClawVtx.inc.c"
|
||||
};
|
||||
|
||||
Vtx gTailpasaranHeadMouthpartsVtx[] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadMouthpartsVtx.inc.c"
|
||||
};
|
||||
|
||||
Gfx gTailpasaranHeadClawDL[54] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadClawDL.inc.c"
|
||||
};
|
||||
|
||||
Gfx gTailpasaranHeadMouthpartsDL[18] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadMouthpartsDL.inc.c"
|
||||
};
|
||||
|
||||
Gfx gTailpasaranHeadDL[3] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadDL.inc.c"
|
||||
};
|
||||
|
||||
u64 gTailpasaranHeadRearTex[TEX_LEN(u64, gTailpasaranHeadRearTex_WIDTH, gTailpasaranHeadRearTex_HEIGHT, 16)] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadRearTex.rgba16.inc.c"
|
||||
};
|
||||
|
||||
u64 gTailpasaranHeadClawBaseTex[TEX_LEN(u64, gTailpasaranHeadClawBaseTex_WIDTH, gTailpasaranHeadClawBaseTex_HEIGHT,
|
||||
16)] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadClawBaseTex.rgba16.inc.c"
|
||||
};
|
||||
|
||||
u64 gTailpasaranHeadClawTex[TEX_LEN(u64, gTailpasaranHeadClawTex_WIDTH, gTailpasaranHeadClawTex_HEIGHT, 16)] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadClawTex.rgba16.inc.c"
|
||||
};
|
||||
|
||||
u64 gTailpasaranTailSegmentTex[TEX_LEN(u64, gTailpasaranTailSegmentTex_WIDTH, gTailpasaranTailSegmentTex_HEIGHT, 8)] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranTailSegmentTex.ia8.inc.c"
|
||||
};
|
||||
|
||||
u64 gTailpasaranHeadMouthpartsTex[TEX_LEN(u64, gTailpasaranHeadMouthpartsTex_WIDTH,
|
||||
gTailpasaranHeadMouthpartsTex_HEIGHT, 16)] = {
|
||||
#include "assets/objects/object_tp/gTailpasaranHeadMouthpartsTex.rgba16.inc.c"
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
#ifndef OBJECT_TP_H
|
||||
#define OBJECT_TP_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "tex_len.h"
|
||||
|
||||
extern Gfx gTailpasaranTailSegmentDL[14];
|
||||
extern Vtx gTailpasaranTailSegmentVtx[];
|
||||
|
||||
extern Gfx gTailpasaranHeadClawDL[54];
|
||||
extern Gfx gTailpasaranHeadMouthpartsDL[18];
|
||||
extern Gfx gTailpasaranHeadDL[3];
|
||||
|
||||
#define gTailpasaranHeadRearTex_WIDTH 8
|
||||
#define gTailpasaranHeadRearTex_HEIGHT 16
|
||||
extern u64 gTailpasaranHeadRearTex[TEX_LEN(u64, gTailpasaranHeadRearTex_WIDTH, gTailpasaranHeadRearTex_HEIGHT, 16)];
|
||||
|
||||
#define gTailpasaranHeadClawBaseTex_WIDTH 8
|
||||
#define gTailpasaranHeadClawBaseTex_HEIGHT 8
|
||||
extern u64 gTailpasaranHeadClawBaseTex[TEX_LEN(u64, gTailpasaranHeadClawBaseTex_WIDTH, gTailpasaranHeadClawBaseTex_HEIGHT, 16)];
|
||||
|
||||
#define gTailpasaranHeadClawTex_WIDTH 16
|
||||
#define gTailpasaranHeadClawTex_HEIGHT 16
|
||||
extern u64 gTailpasaranHeadClawTex[TEX_LEN(u64, gTailpasaranHeadClawTex_WIDTH, gTailpasaranHeadClawTex_HEIGHT, 16)];
|
||||
|
||||
#define gTailpasaranTailSegmentTex_WIDTH 64
|
||||
#define gTailpasaranTailSegmentTex_HEIGHT 64
|
||||
extern u64 gTailpasaranTailSegmentTex[TEX_LEN(u64, gTailpasaranTailSegmentTex_WIDTH, gTailpasaranTailSegmentTex_HEIGHT, 8)];
|
||||
|
||||
#define gTailpasaranHeadMouthpartsTex_WIDTH 8
|
||||
#define gTailpasaranHeadMouthpartsTex_HEIGHT 8
|
||||
extern u64 gTailpasaranHeadMouthpartsTex[TEX_LEN(u64, gTailpasaranHeadMouthpartsTex_WIDTH, gTailpasaranHeadMouthpartsTex_HEIGHT, 16)];
|
||||
|
||||
#endif
|
||||
@@ -1,26 +1,22 @@
|
||||
<Root>
|
||||
<File Name="object_tp" Segment="6">
|
||||
|
||||
<!-- Tailpasaran vertices and displaylists -->
|
||||
<DList Name="gTailpasaranTailSegmentDL" Offset="0x0000"/>
|
||||
<Array Name="gTailpasaranTailSegmentVtx" Count="4" Offset="0x70">
|
||||
<DList Name="gTailpasaranBodyElemDL" Offset="0x0"/>
|
||||
<Array Name="gTailpasaranBodyElemVtx" Count="4" Offset="0x70">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<Array Name="gTailpasaranHeadClawVtx" Count="70" Offset="0xB0">
|
||||
<Array Name="gTailpasaranHeadBodyVtx" Count="70" Offset="0xB0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<Array Name="gTailpasaranHeadMouthpartsVtx" Count="24" Offset="0x510">
|
||||
<Array Name="gTailpasaranHeadElectricityVtx" Count="24" Offset="0x510">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="gTailpasaranHeadClawDL" Offset="0x0690"/>
|
||||
<DList Name="gTailpasaranHeadMouthpartsDL" Offset="0x0840"/>
|
||||
<DList Name="gTailpasaranHeadDL" Offset="0x08D0"/>
|
||||
|
||||
<!-- Tailpasaran textures -->
|
||||
<Texture Name="gTailpasaranHeadRearTex" Format="rgba16" Width="8" Height="16" Offset="0x08E8"/>
|
||||
<Texture Name="gTailpasaranHeadClawBaseTex" Format="rgba16" Width="8" Height="8" Offset="0x09E8"/>
|
||||
<Texture Name="gTailpasaranHeadClawTex" Format="rgba16" Width="16" Height="16" Offset="0x0A68"/>
|
||||
<Texture Name="gTailpasaranTailSegmentTex" Format="ia8" Width="64" Height="64" Offset="0x0C68"/>
|
||||
<Texture Name="gTailpasaranHeadMouthpartsTex" Format="rgba16" Width="8" Height="8" Offset="0x1C68"/>
|
||||
<DList Name="gTailpasaranHeadBodyDL" Offset="0x690"/>
|
||||
<DList Name="gTailpasaranHeadElectricityDL" Offset="0x840"/>
|
||||
<DList Name="gTailpasaranHeadDL" Offset="0x8D0"/>
|
||||
<Texture Name="gTailpasaranHeadBackTex" Format="rgba16" Width="8" Height="16" Offset="0x8E8"/>
|
||||
<Texture Name="gTailpasaranHeadCoreTex" Format="rgba16" Width="8" Height="8" Offset="0x9E8"/>
|
||||
<Texture Name="gTailpasaranHeadClawTex" Format="rgba16" Width="16" Height="16" Offset="0xA68"/>
|
||||
<Texture Name="gTailpasaranBodyElemTex" Format="ia8" Width="64" Height="64" Offset="0xC68"/>
|
||||
<Texture Name="gTailpasaranHeadElectricityTex" Format="rgba16" Width="8" Height="8" Offset="0x1C68"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,36 +4,36 @@
|
||||
#include "ultra64.h"
|
||||
#include "actor.h"
|
||||
|
||||
struct EnTp;
|
||||
|
||||
typedef void (*EnTpActionFunc)(struct EnTp*, struct PlayState*);
|
||||
|
||||
typedef struct EnTp {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ s32 actionIndex;
|
||||
/* 0x0150 */ s32 unk_150; // Some kind of state indicator
|
||||
/* 0x0154 */ EnTpActionFunc actionFunc;
|
||||
/* 0x0158 */ u8 damageReaction; // Used to propagate the reaction to the other segments' actors
|
||||
/* 0x015A */ s16 timer;
|
||||
/* 0x015C */ s16 unk_15C; // Multipurpose, used to change the horizontal position of tail segments
|
||||
/* 0x015E */ s16 alpha; // The dying types fade away
|
||||
/* 0x0160 */ s16 red;
|
||||
/* 0x0162 */ s16 kiraSpawnTimer;
|
||||
/* 0x0164 */ s16 unk_164; // Used once, never set to nonzero
|
||||
/* 0x0168 */ f32 heightPhase;
|
||||
/* 0x016C */ f32 horizontalVariation;
|
||||
/* 0x0170 */ f32 extraHeightVariation;
|
||||
/* 0x0174 */ ColliderJntSph collider;
|
||||
/* 0x0194 */ ColliderJntSphElement colliderElements[1];
|
||||
/* 0x01D4 */ struct EnTp* head;
|
||||
} EnTp; // size = 0x01D8
|
||||
|
||||
typedef enum EnTpType {
|
||||
/* -1 */ TAILPASARAN_HEAD = -1, // Used when scenes spawn them: code only cares about < 0
|
||||
/* 0 */ TAILPASARAN_TAIL,
|
||||
/* 10 */ TAILPASARAN_FRAGMENT = 10,
|
||||
/* 11 */ TAILPASARAN_TAIL_DYING,
|
||||
/* 12 */ TAILPASARAN_HEAD_DYING
|
||||
ENTP_TYPE_HEAD = -1, // To be used for the initial spawn
|
||||
ENTP_TYPE_BODYELEM,
|
||||
ENTP_TYPE_BODYELEMREMNANT = 10,
|
||||
ENTP_TYPE_BODYELEM_DYING,
|
||||
ENTP_TYPE_HEAD_DYING
|
||||
} EnTpType;
|
||||
|
||||
struct EnTp;
|
||||
|
||||
typedef struct EnTp {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x14C */ s32 action;
|
||||
/* 0x150 */ s32 modeVar;
|
||||
/* 0x154 */ void (*actionFunc)(struct EnTp*, struct PlayState*);
|
||||
/* 0x158 */ u8 unk_158;
|
||||
/* 0x159 */ char pad_159[1];
|
||||
/* 0x15A */ s16 timer;
|
||||
/* 0x15C */ s16 timer2;
|
||||
/* 0x15E */ s16 bodyElemAlpha;
|
||||
/* 0x160 */ s16 redShineAmount;
|
||||
/* 0x162 */ s16 sparkTimer;
|
||||
/* 0x164 */ s16 unk_164;
|
||||
/* 0x166 */ char pad_166[2];
|
||||
/* 0x168 */ f32 unk_168;
|
||||
/* 0x16C */ f32 bodyElemDist;
|
||||
/* 0x170 */ f32 unk_170;
|
||||
/* 0x174 */ ColliderJntSph collider;
|
||||
/* 0x194 */ ColliderJntSphElement colliderElements[1];
|
||||
/* 0x1D4 */ struct EnTp* headInstance;
|
||||
} EnTp; // size = 0x1D8
|
||||
|
||||
#endif
|
||||
|
||||
@@ -343,6 +343,7 @@ assets/objects/object_tk/object_tk.c
|
||||
assets/objects/object_toki_objects/object_toki_objects.c
|
||||
assets/objects/object_torch2/object_torch2.c
|
||||
assets/objects/object_toryo/object_toryo.c
|
||||
assets/objects/object_tp/object_tp.c
|
||||
assets/objects/object_trap/object_trap.c
|
||||
assets/objects/object_tr/object_tr.c
|
||||
assets/objects/object_ts/object_ts.c
|
||||
|
||||
Reference in New Issue
Block a user