1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

arrow_ice OK

This commit is contained in:
fig02 2020-03-29 12:47:58 -04:00
parent 7cc6b00fac
commit da159ec528
8 changed files with 661 additions and 65 deletions

7
spec
View file

@ -677,16 +677,13 @@ endseg
beginseg
name "ovl_Arrow_Fire"
include "build/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o"
include "build/data/overlays/actors/z_arrow_fire.data.o"
include "build/data/overlays/actors/z_arrow_fire.reloc.o"
include "build/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire_reloc.o"
endseg
beginseg
name "ovl_Arrow_Ice"
include "build/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o"
include "build/data/overlays/actors/z_arrow_ice.data.o"
include "build/data/overlays/actors/z_arrow_ice.rodata.o"
include "build/data/overlays/actors/z_arrow_ice.reloc.o"
include "build/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice_reloc.o"
endseg
beginseg

View file

@ -1,3 +1,9 @@
/*
* File: z_arrow_fire.c
* Overlay: ovl_Arrow_Fire
* Description: Fire Arrow actor. Spawned by and attached to a normal arrow.
*/
#include "z_arrow_fire.h"
#include "../ovl_En_Arrow/z_en_arrow.h"
@ -9,10 +15,12 @@ void ArrowFire_Destroy(ArrowFire* this, GlobalContext* globalCtx);
void ArrowFire_Update(ArrowFire* this, GlobalContext* globalCtx);
void ArrowFire_Draw(ArrowFire* this, GlobalContext* globalCtx);
void func_80865DD8(ArrowFire* this, GlobalContext* globalCtx);
void func_808660E8(ArrowFire* this, GlobalContext* globalCtx);
void func_80865F1C(ArrowFire* this, GlobalContext* globalCtx);
/*
void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx);
void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx);
void ArrowFire_Hit(ArrowFire* this, GlobalContext* globalCtx);
#include "z_arrow_fire_gfx.c"
const ActorInit Arrow_Fire_InitVars = {
ACTOR_ARROW_FIRE,
ACTORTYPE_ITEMACTION,
@ -25,25 +33,20 @@ const ActorInit Arrow_Fire_InitVars = {
(ActorFunc)ArrowFire_Update,
(ActorFunc)ArrowFire_Draw,
};
*/
static InitChainEntry initChain[] = {
ICHAIN_VEC3F(unk_F4, 2000, ICHAIN_STOP),
ICHAIN_F32(unk_F4, 2000, ICHAIN_STOP),
};
extern Gfx D_80867990;
extern Gfx D_80867A40;
// EnFire_SetupAction
void func_80865D10(ArrowFire* this, ActorFunc* actionFunc) {
void ArrowFire_SetupAction(ArrowFire* this, ActorFunc* actionFunc) {
this->actionFunc = actionFunc;
}
void ArrowFire_Init(ArrowFire* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, initChain);
this->fireRadius = 0;
this->radius = 0;
this->unk_158 = 1.0f;
func_80865D10(this, func_80865DD8);
ArrowFire_SetupAction(this, ArrowFire_Charge);
Actor_SetScale(this, 0.01);
this->alpha = 0xA0;
this->timer = 0;
@ -53,11 +56,11 @@ void ArrowFire_Init(ArrowFire* this, GlobalContext* globalCtx) {
void ArrowFire_Destroy(ArrowFire* this, GlobalContext* globalCtx) {
func_800876C8(globalCtx);
LogUtils_LogThreadId("../z_arrow_fire.c", 421);
// Translates to: ""Disappearance" = Disappearance"
osSyncPrintf("\"消滅\" = %s\n", "消滅");
}
// ArrowFire_DrawBack
void func_80865DD8(ArrowFire* this, GlobalContext* globalCtx) {
void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) {
EnArrow* arrow;
arrow = this->actor.attachedA;
@ -66,8 +69,8 @@ void func_80865DD8(ArrowFire* this, GlobalContext* globalCtx) {
return;
}
if (this->fireRadius < 10) {
this->fireRadius += 1;
if (this->radius < 10) {
this->radius += 1;
}
// copy position and rotation from the attached arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
@ -77,21 +80,20 @@ void func_80865DD8(ArrowFire* this, GlobalContext* globalCtx) {
// If arrow's attached is null, Link has fired the arrow
if (arrow->actor.attachedA == NULL) {
this->translatedPos = this->actor.posRot.pos;
this->fireRadius = 10;
func_80865D10(this, &func_808660E8);
this->unkPos = this->actor.posRot.pos;
this->radius = 10;
ArrowFire_SetupAction(this, ArrowFire_Fly);
this->alpha = 0xFF;
}
}
void func_80865ECC(Vec3f* translatedPos, Vec3f* firePos, f32 scale) {
translatedPos->x += ((firePos->x - translatedPos->x) * scale);
translatedPos->y += ((firePos->y - translatedPos->y) * scale);
translatedPos->z += ((firePos->z - translatedPos->z) * scale);
void func_80865ECC(Vec3f* unkPos, Vec3f* firePos, f32 scale) {
unkPos->x += ((firePos->x - unkPos->x) * scale);
unkPos->y += ((firePos->y - unkPos->y) * scale);
unkPos->z += ((firePos->z - unkPos->z) * scale);
}
// ArrowFire_Hit
void func_80865F1C(ArrowFire* this, GlobalContext* globalCtx) {
void ArrowFire_Hit(ArrowFire* this, GlobalContext* globalCtx) {
f32 scale;
f32 offset;
u16 timer;
@ -114,7 +116,7 @@ void func_80865F1C(ArrowFire* this, GlobalContext* globalCtx) {
if (this->timer >= 8){
offset = ((this->timer - 8) * 0.041666668f);
offset = SQ(offset);
this->fireRadius = (((1.0f - offset) * scale) + 10.0f);
this->radius = (((1.0f - offset) * scale) + 10.0f);
this->unk_158 += ((2.0f - this->unk_158) * 0.1f);
if (this->timer < 0x10) {
if (1){}
@ -143,8 +145,7 @@ void func_80865F1C(ArrowFire* this, GlobalContext* globalCtx) {
}
}
// ArrowFire_Fly
void func_808660E8(ArrowFire* this, GlobalContext* globalCtx) {
void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) {
EnArrow* arrow;
f32 distanceScaled;
s32 pad;
@ -157,16 +158,16 @@ void func_808660E8(ArrowFire* this, GlobalContext* globalCtx) {
// copy position and rotation from the attached arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
this->actor.shape.rot = arrow->actor.shape.rot;
distanceScaled = Math_Vec3f_DistXYZ(&this->translatedPos, &this->actor.posRot.pos) * 0.041666668f;
distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * 0.041666668f;
this->unk_158 = distanceScaled;
if (distanceScaled < 1.0f) {
this->unk_158 = 1.0f;
}
func_80865ECC(&this->translatedPos, &this->actor.posRot.pos, 0.05f);
func_80865ECC(&this->unkPos, &this->actor.posRot.pos, 0.05f);
if (arrow->hitWall & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_FRAME);
func_80865D10(this, &func_80865F1C);
ArrowFire_SetupAction(this, ArrowFire_Hit);
this->timer = 32;
this->alpha = 0xFF;
} else if (arrow->timer < 0x22) {
@ -193,23 +194,20 @@ void ArrowFire_Draw(ArrowFire* this, GlobalContext* globalCtx){
GraphicsContext* gfxCtx;
Actor* tranform;
EnArrow* arrow;
s32 pad3;
s32 pad4;
Gfx* gfxArr[2];
if (1) {
stateFrames = globalCtx->state.frames;
arrow = this->actor.attachedA;
}
Gfx* gfxArr[4];
stateFrames = globalCtx->state.frames;
arrow = this->actor.attachedA;
if (1) {}
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 0xFF)) {
if (1) {}
tranform = (arrow->hitWall & 2) ? &this->actor : &arrow->actor;
gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618);
Matrix_Translate(tranform->posRot.pos.x, tranform->posRot.pos.y, tranform->posRot.pos.z, MTXMODE_NEW);
Matrix_RotateY(tranform->shape.rot.y * 9.58738E-05f, MTXMODE_APPLY); // 2*PI/65536, do we have a pi define?
Matrix_RotateX(tranform->shape.rot.x * 9.58738E-05f, MTXMODE_APPLY); // 2*PI/65536, do we have a pi define?
Matrix_RotateZ(tranform->shape.rot.z * 9.58738E-05f, MTXMODE_APPLY); // 2*PI/65536, do we have a pi define?
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY);
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw red effect over the screen when arrow hits
@ -232,15 +230,15 @@ void ArrowFire_Draw(ArrowFire* this, GlobalContext* globalCtx){
} else {
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
}
Matrix_Scale(this->fireRadius * 0.2f, this->unk_158 * 4.0f, this->fireRadius * 0.2f, MTXMODE_APPLY);
Matrix_Scale(this->radius * 0.2f, this->unk_158 * 4.0f, this->radius * 0.2f, MTXMODE_APPLY);
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 666), G_MTX_NOPUSH |
G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyXlu.p++, &D_80867990);
gSPDisplayList(gfxCtx->polyXlu.p++, textureDL);
gSPDisplayList(gfxCtx->polyXlu.p++, Draw_TwoTexScroll(globalCtx->state.gfxCtx, 0,
255 - (stateFrames * 2) % 256, 0, 64, 32, 1, 255 - stateFrames % 256,
511 - (stateFrames * 10) % 512, 64, 64));
gSPDisplayList(gfxCtx->polyXlu.p++, &D_80867A40);
gSPDisplayList(gfxCtx->polyXlu.p++, vertexDL);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_fire.c", 682);
}
}

View file

@ -6,11 +6,11 @@
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ Vec3f translatedPos;
/* 0x014C */ Vec3f unkPos;
/* 0x0158 */ f32 unk_158;
/* 0x015C */ f32 unk_15C;
/* 0x0160 */ ActorFunc actionFunc;
/* 0x0164 */ s16 fireRadius;
/* 0x0164 */ s16 radius;
/* 0x0166 */ u16 timer;
/* 0x0168 */ u8 alpha;
} ArrowFire; // size = 0x016C

View file

@ -0,0 +1,193 @@
#include <ultra64.h>
#include <global.h>
static UNK_TYPE texture1[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00000102, 0x01000001, 0x00000000, 0x00000000, 0x00010000, 0x00000000,
0x00000001, 0x00000000, 0x00000204, 0x02000101, 0x00000000, 0x00000000, 0x00010101, 0x00000001, 0x00000001,
0x00000000, 0x00000307, 0x03010102, 0x00000000, 0x00000000, 0x01010102, 0x00000002, 0x01010001, 0x00000000,
0x00010509, 0x04010103, 0x01000000, 0x00000000, 0x01020202, 0x00000104, 0x03020101, 0x00000000, 0x0001060C,
0x06010103, 0x01000000, 0x00000000, 0x02020202, 0x00000206, 0x05040101, 0x00000000, 0x0001080F, 0x07010103,
0x01000001, 0x00000000, 0x03030202, 0x00010408, 0x07060201, 0x00000000, 0x00010911, 0x08010103, 0x01000001,
0x00000001, 0x04040303, 0x0101050B, 0x0A080301, 0x00000000, 0x00020B14, 0x0A010103, 0x01000001, 0x00010102,
0x06060403, 0x0203070D, 0x0C0A0401, 0x00000000, 0x00030D17, 0x0B020103, 0x01010001, 0x00010205, 0x09080503,
0x0205090E, 0x0E0D0501, 0x00000000, 0x01050F18, 0x0C020102, 0x01010001, 0x00010408, 0x0D0B0502, 0x03070B0F,
0x0F0F0601, 0x00000000, 0x02081219, 0x0D030102, 0x00010001, 0x0001050B, 0x130F0702, 0x04080B0F, 0x10110801,
0x00000000, 0x030C1419, 0x0E040101, 0x00010001, 0x0001070F, 0x19140A03, 0x05090B0E, 0x10130A02, 0x00000001,
0x05121719, 0x0E040100, 0x00010102, 0x01020A13, 0x1F1A0F06, 0x06090A0C, 0x10150B03, 0x01000001, 0x08181B19,
0x0F050201, 0x01020102, 0x02040D18, 0x2721140A, 0x080A0A0C, 0x11160D04, 0x02020001, 0x0B1E1E19, 0x10070403,
0x02030202, 0x0408111D, 0x2F2A1B0F, 0x0A0B0B0D, 0x12180F06, 0x04040101, 0x0E242119, 0x11090606, 0x04040304,
0x070C1623, 0x38322214, 0x0E0D0E10, 0x141A1108, 0x06060102, 0x112A241A, 0x120B0909, 0x06050507, 0x0B111C29,
0x413B291B, 0x13101216, 0x181B1209, 0x08080304, 0x152F271B, 0x140E0C0C, 0x0907080B, 0x10172230, 0x4A433223,
0x1813161D, 0x1D1E140B, 0x0A0A0608, 0x1A342B1E, 0x17110F0F, 0x0C0B0D11, 0x171F2A38, 0x534C3B2B, 0x1E161C25,
0x2221160D, 0x0B0C0A0E, 0x21393023, 0x1B151211, 0x0F0F1217, 0x1E273240, 0x5C564534, 0x251B242F, 0x2924190F,
0x0E0E0F17, 0x293E372B, 0x21181513, 0x1113181E, 0x26303B48, 0x655F4E3E, 0x2D222D3A, 0x30271C13, 0x11111520,
0x32453F35, 0x281D1714, 0x14181E25, 0x2F3A4551, 0x6F695746, 0x362B3744, 0x372A1F17, 0x15151D2A, 0x3D4D483F,
0x31231A14, 0x171E252E, 0x38444F5B, 0x7974614F, 0x4036404C, 0x3C2D231D, 0x1A1A2637, 0x4957524A, 0x3A2A1D15,
0x1A252E37, 0x43505B66, 0x837F6C59, 0x4A414750, 0x3F2E2723, 0x21213245, 0x57625D54, 0x43312216, 0x1F2D3741,
0x4D5B6671, 0x8E8B7662, 0x544B4D51, 0x3F302C2C, 0x2B2D4054, 0x656D675E, 0x4C3A281A, 0x2536414B, 0x5867717B,
0x9896816C, 0x5E545150, 0x3F323337, 0x383C5063, 0x71777168, 0x56432F21, 0x2C3F4B56, 0x63727C86, 0xA2A08B76,
0x685D5651, 0x3F343A43, 0x484D5F70, 0x7D827B71, 0x5F4C3829, 0x34465462, 0x6F7C8690, 0xACA99581, 0x72655B53,
0x42394450, 0x585E6D7C, 0x878C8479, 0x68574334, 0x3D4E5E6E, 0x7B88919A, 0xB4B09E8C, 0x7C6E6155, 0x46414F5F,
0x676E7B87, 0x92958C80, 0x71625041, 0x4857697A, 0x86929BA3, 0xBBB7A796, 0x86776658, 0x4D4B5C6E, 0x777D8791,
0x9C9F9487, 0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x32376DD4, 0xA2633907, 0x0B387DA2, 0x6D81470C, 0x3C5C60AC,
0xA5571801, 0x154C97B9, 0x68533236, 0x304276D6, 0x9B533108, 0x154A96B7, 0x7C9B400B, 0x3E756FAE, 0xAF5D1301,
0x1D59B4BF, 0x53432C38, 0x2F487DCC, 0x8A4A2406, 0x1F5DB0C8, 0x90B55110, 0x408B7FAA, 0xB76D1503, 0x286ACCBE,
0x43312030, 0x2B4C82BA, 0x77431607, 0x2B70C7D5, 0xA6B95B13, 0x409C93A6, 0xB87D1D08, 0x367FE1C1, 0x3C261629,
0x2A508AAB, 0x69410C0C, 0x3986DDDB, 0xB5AE6316, 0x40A0A7A1, 0xAA7D2610, 0x4596F1CD, 0x47281E36, 0x365C97A3,
0x63450713, 0x499DF0D8, 0xB49E721A, 0x409AB59F, 0x8A662D1C, 0x57AEFBDF, 0x6B404456, 0x536EA49B, 0x6A4D061E,
0x5CB6FCC6, 0x9A8E7F20, 0x428EBEA0, 0x623F2E2A, 0x69C6FFF0, 0x9A686569, 0x6F83AC92, 0x7F5D0B2A, 0x70CDFFB2,
0x77848D29, 0x4787C4A0, 0x401D2E3E, 0x7ED9FFFC, 0xC48F7973, 0x8598AE86, 0x9A701339, 0x85E1FFA6, 0x5E859534,
0x5189C99B, 0x2C0B3455, 0x92E9FFFA, 0xDCAB8071, 0x94ACAD7A, 0xB1882249, 0x9AF1FFB0, 0x6A8F9746, 0x6394CD8D,
0x290C416F, 0xA5EEFFF4, 0xDCB46B6D, 0xA1BFAD77, 0xB6A43A58, 0xAAF8FFC8, 0x84959963, 0x7BA4CE78, 0x351A588E,
0xB5E3F9F1, 0xCFAC6077, 0xABCFAC77, 0xA8C05A6A, 0xB2F3FFE1, 0xA3959471, 0x94B9D065, 0x473274A9, 0xBDCDECEF,
0xC2A05F86, 0xBADDAC78, 0x92D87C7D, 0xAFDEFDF1, 0xBC8C8971, 0xA6D2D45A, 0x584B95BB, 0xC1B3D5ED, 0xB8956697,
0xC5E9A670, 0x7AE6978F, 0xA4BEF0EF, 0xB9797360, 0xB1E8DD5D, 0x5D5FAFC7, 0xC49CB8E3, 0xAF8C78A5, 0xCBF19D5F,
0x6AE5A6A3, 0x9398DBE7, 0xB46A5841, 0xB8F2E871, 0x586DC1CD, 0xC78C9DD5, 0xAA878CB1, 0xD8F89249, 0x63DCABB3,
0x8576C5D8, 0xA95E4430, 0xC0EBEE91, 0x5378CACE, 0xC58087C5, 0xA4859EAE, 0xE1FD8A36, 0x60D0ACBD, 0x7765B9C5,
0x9C563A2B, 0xCED7E7B4, 0x5484C7CC, 0xB66F7CBB, 0x9F81A898, 0xE3FF8D2E, 0x63C8B0BA, 0x6D69B8B0, 0x93573B2E,
0xE0C2CED2, 0x6898C0C3, 0x97587EBC, 0x9D749570, 0xDEFF9D36, 0x67C8B4A8, 0x6682BD9B, 0x93643E37, 0xF0B4A8DE,
0x86A9B6B0, 0x70448BBE, 0x99617545, 0xD1FFB84E, 0x70CAB48C, 0x64A4BD8D, 0x96763D41, 0xFAAC82DA, 0xA7B6AE9A,
0x4D359AC0, 0x90494F27, 0xC0FFD675, 0x80CCAD6D, 0x63C1B681, 0x9C85374E, 0xFFA069C9, 0xC1BAA785, 0x3936A4B6,
0x7D342E18, 0xA9FFEEA5, 0x9AC59F56, 0x60D0A873, 0x9288315E, 0xFB8669B6, 0xD0B6A473, 0x3C47A39A, 0x6228241B,
0x8BFFF6CD, 0xB7BB8F47, 0x57CFA169, 0x77782C6B, 0xE56478AA, 0xD6AC9E64, 0x4E61977C, 0x4B232428, 0x6FFFEBE5,
0xD0AF813C, 0x44C2A266, 0x5B61296E, 0xC04188A8, 0xD4A09051, 0x5D788B61, 0x3E202234, 0x58F9D7DF, 0xDEA27332,
0x31AE9A6C, 0x3E4B2F62, 0x902688B3, 0xD0937A3F, 0x5D7D8B58, 0x37241F35, 0x46F2C5BF, 0xD7956528, 0x1E918E76,
0x3442424A, 0x601774C3, 0xCB8F6630, 0x48698261, 0x333C2729, 0x3CECBF95, 0xC2885420, 0x11717B78, 0x4952673A,
0x3D1153CD, 0xC994602F, 0x2D496F6D, 0x31674418, 0x32E7CA6C, 0xA77D4318, 0x09526672, 0x6B6F963E, 0x2B1036D0,
0xCAA26E3C, 0x1B2A5A7B, 0x3798700F, 0x2BDFD94D, 0x8C773712, 0x043C606C, 0x9086B955, 0x281225C9, 0xC7AD8954,
0x141B4085, 0x53CB9C10, 0x26D3E63A, 0x757A3B11, 0x0131666F, 0xAB87BA6A, 0x2E151FBF, 0xC1AEA16A, 0x1721388C,
0x81ECBB17, 0x23C1EE30, 0x6688561E, 0x02317381, 0xA36A9566, 0x3B171FB9, 0xB5A5AF7A, 0x1B384395, 0xABFBC81D,
0x20AAEB28, 0x61987838, 0x05358299, 0x85405D4E, 0x45181FB5, 0xA695B083, 0x1C55569C, 0xCEFFCF1E, 0x1A8CDA24,
0x62A39755, 0x0A398FAE, 0x601A2A2C, 0x49161FB1, 0x9A8BAC8A, 0x23736DA0, 0xE0FFD61E, 0x136BAF23, 0x70ABAD6D,
0x143D95BD, 0x41030D16, 0x41151DAA, 0x938BAA94, 0x2E8A8BA7, 0xE6FFD921, 0x0C4A7D2D, 0x7CACAB70, 0x244093C3,
0x38020F11, 0x2F151CA3, 0x9293ABA1, 0x3995AAB7, 0xEDF7D924, 0x072F5842, 0x83AE9C66, 0x3F498EC7, 0x420D2812,
0x1E151F9B, 0x989CB0B2, 0x4697C5CE, 0xF5F0D626, 0x061B435B, 0x85B18A5B, 0x5F568BCD, 0x54245213, 0x12172593,
0x9FA1BAC0, 0x5291D4E1, 0xFAF0D123, 0x0711416F, 0x82B2765B, 0x84668FCB, 0x684D8212, 0x1318308A, 0xA3A2C2C6,
0x5F88D3EE, 0xFEF6C81B, 0x0B104276, 0x85B06A72, 0xA97896C3, 0x7C81AC19, 0x24194083, 0xA2A0C6C4, 0x6A82CCF1,
0xFFFFB910, 0x14173E77, 0x8BAE6992, 0xC6879BB4, 0x92B3C933, 0x3C1D4F7D, 0x9DA2CCBE, 0x7381C6E6, 0xFFFFB111,
0x26233975, 0x92AF6DAF, 0xDB949AA3, 0xADDBDD64, 0x5927597B, 0x99AAD4B9, 0x7687C6D5, 0xFCFFB736, 0x432D3A78,
0x98B371BD, 0xE5A0989E, 0xCCF2EAA0, 0x753C5C80, 0x9DB9E3BC, 0x7896CFBF, 0xF6FFCB72, 0x64323F81, 0x9CBC70B4,
0xE3AC9EAD, 0xE6FBF6CF, 0x8B5C5C85, 0xA7C8F4C2, 0x7AA6D9A3, 0xF0FFE2A9, 0x8032448D, 0xA4C970A0, 0xDBB5AAC6,
0xF7FEFDE7, 0xA3806187, 0xB0D6FFC9, 0x7FB5D686, 0xE7FFF0D2, 0x8D2F4E98, 0xABD7768D, 0xCFB9B4E1, 0xF8F8FFE7,
0xB29B7089, 0xB7E4FFCD, 0x8CB8BF65, 0xD5FFF0D7, 0x8D34609D, 0xB4E48385, 0xC3BAB0F1, 0xE2E8FEDC, 0xB5A07A8D,
0xBDEFFFD0, 0x9AAB9543, 0xB9FFE9C3, 0x80447497, 0xC0EF9C90, 0xBDB997E5, 0xC2CCFBD4, 0xAB8F7387, 0xC8F8FFD4,
0xA4936324, 0x98FFE5B3, 0x6F577E8A, 0xCEFABCA8, 0xC0BC71C7, 0x9EADF4D2, 0x916D5D7B, 0xD4FEFFD6, 0xA575390F,
0x76FFE4A6, 0x656A7F7D, 0xDDFFDABF, 0xC8BF4CA1, 0x8095E8CC, 0x744A3B66, 0xDAFFFFD6, 0x9D5B1E04, 0x5DFDDF9A,
0x6075787A, 0xECFFF1CD, 0xCEC42E7C, 0x7087D6BF, 0x5A311F49, 0xD4FFFFD0, 0x8E4B1100, 0x50F7D892, 0x68767788,
0xF6FFFDCE, 0xCDC31E65, 0x6E88C3A8, 0x4922153A, 0xC3FFFDC4, 0x7F410B03, 0x4BEED08B, 0x747682A0, 0xFDFFFEBF,
0xBCB61456, 0x7792B18B, 0x3E19153D, 0xB5FFF8B2, 0x733B0908, 0x4DE0C487, 0x827797BC, 0xFFFFF8AB, 0x9E9B0E50,
0x869E9F6E, 0x3714184D, 0xB5FFF09E, 0x67380C11, 0x56CFB285, 0x8F7EADD4, 0xFFFFED96, 0x78730A53, 0x9CA98F57,
0x310F1C69, 0xC8FFE18A, 0x5D35161D, 0x64BC9E84, 0x978BBFE7, 0xFFFFDD81, 0x5348075A, 0xB5B07F48, 0x290A2088,
0xE1FFCF75, 0x5335272B, 0x74AD877F, 0x9C9DCFF3, 0xFFFEC86E, 0x35260864, 0xC6B16F3E, 0x200422A6, 0xF8FCB95F,
0x47373A3C, 0x86A36F73, 0x9FB0D9FA, 0xFFF7B15B, 0x21110E70, 0xCDAB6139, 0x160027C1, 0xFFF09F4C, 0x3B3A4B4D,
0x989D5B5D, 0x9DB5D9FE, 0xFFEA994C, 0x1509177B, 0xC8A15C3C, 0x0E022BD1, 0xFFE1873B, 0x2F3E5460, 0xA8954F44,
0x96A6CEFF, 0xFFD7823C, 0x0C0A2784, 0xB9956343, 0x0B0731DB, 0xFFCE722C, 0x22415672, 0xB58C4A31, 0x8A88BAFF,
0xFAC56E2E, 0x060F398F, 0xA989764A, 0x0A0C3AE1, 0xFFB85F20, 0x17425787, 0xBF824826, 0x775FA3FF, 0xF1B66121,
0x03164B98, 0x9A818E4A, 0x0A1040D4, 0xE8974D14, 0x11405495, 0xBB74401F, 0x603D86F1, 0xD7A35414, 0x02195694,
0x8476943E, 0x171A46C5, 0xCC7D3D0C, 0x0D3E599E, 0xAE6C371C, 0x4A2D72E3, 0xC38F4C0E, 0x03205F96, 0x766A792A,
0x242B4FB8, 0xB66A2E06, 0x0D3E66AA, 0x9B663322, 0x3B2D6CDD, 0xB47B450A, 0x062B6E9C, 0x6E705D17
};
static UNK_TYPE vertices1[] = {
0x00420271, 0xFFBE0000, 0x060006C2, 0x3E52C2FF, 0x000002BC, 0x00000000, 0x07000800, 0x007800FF, 0x005D0271,
0x00000000, 0x080006C2, 0x575200FF, 0x00BD01DB, 0xFFB20000, 0x07000419, 0x5E3FD9FF, 0x00BD01DB, 0x004E0000,
0x09000419, 0x5E3F27FF, 0x01AF001B, 0x00000000, 0x08000005, 0x6B3500FF, 0x0131001B, 0x01310000, 0x0A000005,
0x4C354CFF, 0x000002BC, 0x00000000, 0x09000800, 0x007800FF, 0x00420271, 0x00420000, 0x0A0006C2, 0x3E523EFF,
0x004E01DB, 0x00BD0000, 0x0B000419, 0x273F5EFF, 0x0000001B, 0x01AF0000, 0x0C000005, 0x00356BFF, 0x000002BC,
0x00000000, 0x0B000800, 0x007800FF, 0x00000271, 0x005D0000, 0x0C0006C2, 0x005257FF, 0xFFB201DB, 0x00BD0000,
0x0D000419, 0xD93F5EFF, 0xFECF001B, 0x01310000, 0x0E000005, 0xB4354CFF, 0x000002BC, 0x00000000, 0x0D000800,
0x007800FF, 0xFFBE0271, 0x00420000, 0x0E0006C2, 0xC2523EFF, 0xFF4301DB, 0x004E0000, 0x0F000419, 0xA23F27FF,
0xFE51001B, 0x00000000, 0x10000005, 0x953500FF, 0xFFA30271, 0x00000000, 0x100006C2, 0xA95200FF, 0xFF4301DB,
0xFFB20000, 0x11000419, 0xA23FD9FF, 0xFE51001B, 0x00000000, 0x00000005, 0x953500FF, 0xFF4301DB, 0xFFB20000,
0x01000419, 0xA23FD9FF, 0xFECF001B, 0xFECF0000, 0x02000005, 0xB435B4FF, 0xFFA30271, 0x00000000, 0x000006C2,
0xA95200FF, 0x000002BC, 0x00000000, 0x01000800, 0x007800FF, 0xFFBE0271, 0xFFBE0000, 0x020006C2, 0xC252C2FF,
0xFFB201DB, 0xFF430000, 0x03000419, 0xD93FA2FF, 0x0000001B, 0xFE510000, 0x04000005, 0x003595FF, 0x000002BC,
0x00000000, 0x03000800, 0x007800FF, 0x00000271, 0xFFA30000, 0x040006C2, 0x0052A9FF, 0x004E01DB, 0xFF430000,
0x05000419, 0x273FA2FF,
};
static UNK_TYPE vertices2[] = {
0x0000001B, 0xFE510000, 0x04000005, 0x003595FF, 0x004E01DB, 0xFF430000, 0x05000419, 0x273FA2FF, 0x0131001B,
0xFECF0000, 0x06000005, 0x4C35B4FF, 0x00000271, 0xFFA30000, 0x040006C2, 0x0052A9FF, 0x000002BC, 0x00000000,
0x05000800, 0x007800FF, 0x00420271, 0xFFBE0000, 0x060006C2, 0x3E52C2FF, 0x00BD01DB, 0xFFB20000, 0x07000419,
0x5E3FD9FF, 0x01AF001B, 0x00000000, 0x08000005, 0x6B3500FF, 0xFFBE0271, 0x00420000, 0x060006C2, 0xC2523EFF,
0x000002BC, 0x00000000, 0x07000800, 0x007800FF, 0xFFA30271, 0x00000000, 0x080006C2, 0xA95200FF,
};
static Gfx textureDL[] = {
gsDPPipeSync(),
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(texture1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, 5, 6, 1, 15),
gsDPLoadMultiBlock(texture2, 0x0100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, 5, 6, 1, G_TX_NOLOD),
gsDPSetCombineLERP(TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, TEXEL1, 1, ENVIRONMENT, TEXEL0, PRIMITIVE, ENVIRONMENT,
COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0),
gsDPSetRenderMode(Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL |
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1),
G_RM_ZB_CLD_SURF2),
gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
static Gfx vertexDL[] = {
gsSPVertex(vertices1, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(3, 2, 4, 0, 3, 4, 5, 0),
gsSP2Triangles(5, 4, 6, 0, 2, 7, 8, 0),
gsSP2Triangles(2, 8, 4, 0, 4, 8, 9, 0),
gsSP2Triangles(4, 9, 6, 0, 6, 9, 10, 0),
gsSP2Triangles(8, 11, 12, 0, 8, 12, 9, 0),
gsSP2Triangles(9, 12, 13, 0, 9, 13, 10, 0),
gsSP2Triangles(10, 13, 14, 0, 12, 15, 16, 0),
gsSP2Triangles(12, 16, 13, 0, 13, 16, 17, 0),
gsSP2Triangles(13, 17, 14, 0, 14, 17, 18, 0),
gsSP2Triangles(16, 19, 17, 0, 17, 19, 20, 0),
gsSP2Triangles(17, 20, 18, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 24, 26, 22, 0),
gsSP2Triangles(22, 26, 27, 0, 22, 27, 23, 0),
gsSP2Triangles(23, 27, 28, 0, 26, 29, 30, 0),
gsSP2Triangles(26, 30, 27, 0, 27, 30, 31, 0),
gsSP1Triangle(27, 31, 28, 0),
gsSPVertex(vertices2, 11, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(3, 5, 1, 0, 1, 5, 6, 0),
gsSP2Triangles(1, 6, 2, 0, 2, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSPEndDisplayList(),
};

View file

@ -1,4 +1,11 @@
/*
* File: z_arrow_ice.c
* Overlay: ovl_Arrow_Ice
* Description: Ice Arrow actor. Spawned by and attached to a normal arrow.
*/
#include "z_arrow_ice.h"
#include "../ovl_En_Arrow/z_en_arrow.h"
#define ROOM 0x00
#define FLAGS 0x02000010
@ -8,7 +15,12 @@ void ArrowIce_Destroy(ArrowIce* this, GlobalContext* globalCtx);
void ArrowIce_Update(ArrowIce* this, GlobalContext* globalCtx);
void ArrowIce_Draw(ArrowIce* this, GlobalContext* globalCtx);
/*
void ArrowIce_Charge(ArrowIce* this, GlobalContext* globalCtx);
void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx);
void ArrowIce_Hit(ArrowIce* this, GlobalContext* globalCtx);
#include "z_arrow_ice_gfx.c"
const ActorInit Arrow_Ice_InitVars = {
ACTOR_ARROW_ICE,
ACTORTYPE_ITEMACTION,
@ -21,21 +33,212 @@ const ActorInit Arrow_Ice_InitVars = {
(ActorFunc)ArrowIce_Update,
(ActorFunc)ArrowIce_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/func_80867CD0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/ArrowIce_Init.s")
static InitChainEntry initChain[] = {
ICHAIN_F32(unk_F4, 2000, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/ArrowIce_Destroy.s")
void ArrowIce_SetupAction(ArrowIce* this, ActorFunc* actionFunc) {
this->actionFunc = actionFunc;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/func_80867D98.s")
void ArrowIce_Init(ArrowIce* this, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, initChain);
this->radius = 0;
this->unk_160 = 1.0f;
ArrowIce_SetupAction(this, ArrowIce_Charge);
Actor_SetScale(this, 0.01);
this->alpha = 0x64;
this->timer = 0;
this->unk_164 = 0.0f;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/func_80867E8C.s")
void ArrowIce_Destroy(ArrowIce* this, GlobalContext* globalCtx) {
func_800876C8(globalCtx);
LogUtils_LogThreadId("../z_arrow_ice.c", 415);
// Translates to: ""Disappearance" = Disappearance"
osSyncPrintf("\"消滅\" = %s\n", "消滅");
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/func_80867EDC.s")
void ArrowIce_Charge(ArrowIce* this, GlobalContext* globalCtx) {
EnArrow* arrow;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/func_808680A8.s")
arrow = this->actor.attachedA;
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
Actor_Kill(&this->actor);
return;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/ArrowIce_Update.s")
if (this->radius < 10) {
this->radius += 1;
}
// copy position and rotation from the attached arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
this->actor.shape.rot = arrow->actor.shape.rot;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Arrow_Ice/ArrowIce_Draw.s")
func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE);
// If arrow's attached is null, Link has fired the arrow
if (arrow->actor.attachedA == NULL) {
this->unkPos = this->actor.posRot.pos;
this->radius = 10;
ArrowIce_SetupAction(this, ArrowIce_Fly);
this->alpha = 0xFF;
}
}
void func_80867E8C(Vec3f* unkPos, Vec3f* icePos, f32 scale) {
unkPos->x += ((icePos->x - unkPos->x) * scale);
unkPos->y += ((icePos->y - unkPos->y) * scale);
unkPos->z += ((icePos->z - unkPos->z) * scale);
}
void ArrowIce_Hit(ArrowIce* this, GlobalContext* globalCtx) {
f32 scale;
f32 offset;
u16 timer;
if (this->actor.unk_F0 < 50.0f) {
scale = 10.0f;
} else {
if (950.0f < this->actor.unk_F0) {
scale = 310.0f;
} else {
scale = this->actor.unk_F0;
scale = ((scale - 50.0f) * 0.33333334f) + 10.0f;
}
}
timer = this->timer;
if (timer != 0) {
this->timer -= 1;
if (this->timer >= 8){
offset = ((this->timer - 8) * 0.041666668f);
offset = SQ(offset);
this->radius = (((1.0f - offset) * scale) + 10.0f);
this->unk_160 += ((2.0f - this->unk_160) * 0.1f);
if (this->timer < 0x10) {
if (1){}
this->alpha = ((this->timer * 0x23) - 0x118);
}
}
}
if (this->timer >= 9) {
if (this->unk_164 < 1.0f) {
this->unk_164 += 0.25f;
}
} else {
if (this->unk_164 > 0.0f) {
this->unk_164 -= 0.125f;
}
}
if (this->timer < 8) {
this->alpha = 0;
}
if (this->timer == 0) {
this->timer = 0xFF;
Actor_Kill(&this->actor);
}
}
void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) {
EnArrow* arrow;
f32 distanceScaled;
s32 pad;
arrow = this->actor.attachedA;
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
Actor_Kill(&this->actor);
return;
}
// copy position and rotation from the attached arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
this->actor.shape.rot = arrow->actor.shape.rot;
distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * 0.041666668f;
this->unk_160 = distanceScaled;
if (distanceScaled < 1.0f) {
this->unk_160 = 1.0f;
}
func_80867E8C(&this->unkPos, &this->actor.posRot.pos, 0.05f);
if (arrow->hitWall & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_ICE);
ArrowIce_SetupAction(this, &ArrowIce_Hit);
this->timer = 32;
this->alpha = 0xFF;
} else if (arrow->timer < 0x22) {
if (this->alpha < 0x23) {
Actor_Kill(&this->actor);
} else {
this->alpha -= 0x19;
}
}
}
void ArrowIce_Update(ArrowIce* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.msgMode == 0xD || globalCtx->msgCtx.msgMode == 0x11) {
Actor_Kill(&this->actor);
} else {
this->actionFunc(this, globalCtx);
}
}
void ArrowIce_Draw(ArrowIce* this, GlobalContext* globalCtx){
s32 pad1;
s32 pad2;
Actor* tranform;
u32 stateFrames;
GraphicsContext* gfxCtx;
EnArrow* arrow;
Gfx* gfxArr[4];
stateFrames = globalCtx->state.frames;
arrow = this->actor.attachedA;
if (1) {}
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 0xFF)) {
if (1) {}
tranform = (arrow->hitWall & 2) ? &this->actor : &arrow->actor;
gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610);
Matrix_Translate(tranform->posRot.pos.x, tranform->posRot.pos.y, tranform->posRot.pos.z, MTXMODE_NEW);
Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY);
Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw blue effect over the screen when arrow hits
if (this->unk_164 > 0) {
gfxCtx->polyXlu.p = func_800937C0(gfxCtx->polyXlu.p);
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_DISABLE);
gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE);
gDPFillRectangle(gfxCtx->polyXlu.p++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
}
// Draw ice on the arrow
func_80093D84(globalCtx->state.gfxCtx);
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xAA, 0xFF, 0xFF, this->alpha);
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xFF, 0x80);
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
if (this->timer != 0) {
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
} else {
Matrix_Translate(0.0f, 1500.0f, 0.0f, MTXMODE_APPLY);
}
Matrix_Scale(this->radius * 0.2f, this->unk_160 * 3.0f, this->radius * 0.2f, MTXMODE_APPLY);
Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY);
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 660), G_MTX_NOPUSH |
G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyXlu.p++, textureDL);
gSPDisplayList(gfxCtx->polyXlu.p++, Draw_TwoTexScroll(globalCtx->state.gfxCtx, 0,
511 - (stateFrames * 5) % 512, 0, 128, 32, 1, 511 - (stateFrames * 10) % 512,
511 - (stateFrames * 10) % 512, 4, 16));
gSPDisplayList(gfxCtx->polyXlu.p++, vertexDL);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_arrow_ice.c", 676);
}
}

View file

@ -6,7 +6,13 @@
typedef struct {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x20];
/* 0x014C */ s16 radius;
/* 0x014E */ u16 timer;
/* 0x0150 */ u8 alpha;
/* 0x0154 */ Vec3f unkPos;
/* 0x0160 */ f32 unk_160;
/* 0x0164 */ f32 unk_164;
/* 0x0168 */ ActorFunc actionFunc;
} ArrowIce; // size = 0x016C
extern const ActorInit Arrow_Ice_InitVars;

View file

@ -0,0 +1,193 @@
#include <ultra64.h>
#include <global.h>
static UNK_TYPE texture1[] = {
0x00061507, 0x00000000, 0x295A2B08, 0x10030F03, 0x0D070006, 0x00031625, 0x3F230012, 0x79590000, 0x00102C2A,
0x254A1B0E, 0xAFF66600, 0x00467E29, 0x08020000, 0x03383E0B, 0x0501000A, 0x31211C05, 0x00031C27, 0x4CA92F13,
0xB2EF5500, 0x057EBF37, 0x00000000, 0x0E493F13, 0x00000002, 0x335C3E03, 0x00000E07, 0x3C761200, 0x447E2200,
0x00426710, 0x00000000, 0x071C2208, 0x00000168, 0xE18F0F00, 0x00060E00, 0x0A100000, 0x0514022D, 0x1B020400,
0x00000000, 0x093A3F0A, 0x050010AE, 0xDA360000, 0x00070500, 0x00000000, 0x00001461, 0x3E050024, 0x24000000,
0x184E3755, 0x9132043C, 0x2F000000, 0x12020A54, 0x3C000200, 0x00000F3E, 0x2B041159, 0x2C000000, 0x030B22CE,
0xF9420000, 0x00000301, 0x371160EF, 0xAC6D2B00, 0x00000008, 0x05000D27, 0x06000000, 0x00001A91, 0x760B0000,
0x000B030A, 0x747DB0BD, 0xBDA31D00, 0x00000000, 0x00000000, 0x00000511, 0x01000209, 0x03020015, 0x583A0010,
0xC1E0892D, 0x532D0000, 0x03160600, 0x00050001, 0x15142E4E, 0x07000500, 0x100D004C, 0xB65C001B, 0xB2DF9417,
0x00000020, 0x57420400, 0x45882F00, 0x18093B3E, 0x01182F0D, 0x1405003F, 0xB75B001E, 0x5DC2E14F, 0x00000161,
0xBC4A005A, 0xECF84A00, 0x0011330F, 0x0044591C, 0x01001C7C, 0xB122001F, 0x5DE4FF71, 0x00000177, 0xBA3218D9,
0xFFC41700, 0x1E7B5A1C, 0x2B769635, 0x0044D5FA, 0x9E000530, 0xC7FFCE35, 0x00000035, 0x663441CF, 0xC9380000,
0x3D733C28, 0x3E709726, 0x0086FAF1, 0x9B170D4C, 0xC9812700, 0x000E1A02, 0x4C642544, 0x2B000000, 0x0D0E0508,
0x0A252F03, 0x00335297, 0xC75B014E, 0x77470600, 0x00160F00, 0x3A350016, 0x29070000, 0x0C3A3911, 0x00000003,
0x0100004B, 0x8F4B051C, 0x7F6C1C00, 0x00000000, 0x00000437, 0x2E030001, 0x2A6E6B2C, 0x0604000E, 0x0B000004,
0x19350814, 0x3E63813D, 0x13000000, 0x00000117, 0x06000000, 0x14362911, 0x312E021F, 0x13000000, 0x010C000C,
0x10B9EF72, 0x2D010000, 0x040C0C10, 0x02000000, 0x33410306, 0x3B30071D, 0x07000000, 0x00000000, 0x1BC2A129,
0x0D000000, 0x050E1112, 0x0100002E, 0xD2C22E00, 0x21593403, 0x00000000, 0x01010000, 0x0E451B00, 0x00000000,
0x0000060D, 0x00000061, 0xFFEA2E00, 0x3DA04200, 0x00000000, 0x06140B00, 0x00040200, 0x00000000, 0x00061B0C,
0x00000037, 0x8D620500, 0x2A8F5801, 0x00000000, 0x082E3404, 0x00000000, 0x00000003, 0x0A201B02, 0x00000000,
0x06000000, 0x11826503, 0x00060400, 0x07303402, 0x07010007, 0x2F1E0B0A, 0x09080000, 0x03000000, 0x00000000,
0x07452500, 0x0E361100, 0x000B0A00, 0x06000018, 0x3E170600, 0x00060F0D, 0x3E190000, 0x00000000, 0x00000000,
0x21360700, 0x00000000, 0x00000007, 0x09000000, 0x0A857124, 0x703C0000, 0x01000000, 0x00000000, 0x08050000,
0x00000000, 0x00000000, 0x00000000, 0x32D97112, 0x4A1B0001, 0x02050000, 0x00000000, 0x021A0A00, 0x00000613,
0x07000000, 0x00000000, 0x1E5D1700, 0x04000000, 0x37550400, 0x00000000, 0x14300600, 0x00003E5B, 0x08000000,
0x00000000, 0x2F2F0000, 0x00000007, 0x90840300, 0x0F070000, 0x06070000, 0x00055A62, 0x00000000, 0x00000020,
0xA77B0700, 0x0106000F, 0x612D0006, 0x1B030000, 0x00000001, 0x0000211A, 0x00000000, 0x0000002E, 0x944A0103,
0x3B390200, 0x04000011, 0x14000005, 0x302F0D10, 0x01000000, 0x00000000, 0x00000009, 0x10000015, 0x5D290000,
0x00000015, 0x09000027, 0x73510F09, 0x37410700, 0x00061408, 0x00000000, 0x25582D09, 0x12020E03, 0x0C070007,
0x00031627, 0x41240011, 0x795B0000, 0x00102D29, 0x244B1C0D, 0xB0F76600, 0x00467C28, 0x08020000, 0x02383E0B,
0x0401000A, 0x32231C04, 0x00031B28, 0x4CA83112, 0xB2EF5500, 0x057EBE38, 0x00000000, 0x0D493D13, 0x00000002,
0x325C3F03, 0x00000E08, 0x3D761200, 0x457F2200, 0x0043660F, 0x00000000, 0x071D2208, 0x00000168, 0xE1901000,
0x00070E00, 0x09110000, 0x0515022D, 0x1B020400, 0x00000000, 0x093B3E09, 0x050011AE, 0xD9370000, 0x00070500,
0x00000000, 0x00001462, 0x3E050024, 0x25000000, 0x184E3554, 0x9431043C, 0x2E000000, 0x12010955, 0x3C000300,
0x0000103E, 0x2B04115A, 0x2D000000, 0x030B22CE, 0xF9420000, 0x00000301, 0x361161EF, 0xAC6B2B00, 0x00000008,
0x05000D27, 0x07000000, 0x00001A8F, 0x760B0000, 0x000B030A, 0x727DB1BD, 0xBCA21C00, 0x00000000, 0x00000000,
0x00000610, 0x00000208, 0x03030016, 0x57390010, 0xC1E1892E, 0x522C0000, 0x03160600, 0x00060001, 0x14142F4E,
0x07000500, 0x100E004B, 0xB55C001B, 0xB0DD9416, 0x0000001F, 0x57430500, 0x468A3000, 0x16093B3E, 0x01192F0D,
0x1405003E, 0xB65B001D, 0x5CC1E04E, 0x0000005E, 0xBC4B0058, 0xEBFA4B00, 0x0011340E, 0x0045591C, 0x02001C7C,
0xB223001E, 0x5CE5FF71, 0x00000176, 0xB93216D8, 0xFFC21700, 0x1D7B5B1C, 0x2B759636, 0x0041D4FC, 0x9D000530,
0xC7FFCE36, 0x00000036, 0x663540CE, 0xC6360000, 0x3C743E29, 0x3E719827, 0x0085FAF0, 0x9B160D4E, 0xC9812600,
0x000F1A03, 0x4B642646, 0x2B000000, 0x0D0E0608, 0x0A253002, 0x00345299, 0xC85B014E, 0x75470600, 0x00160F00,
0x39350015, 0x29070000, 0x0C3A3911, 0x00000003, 0x0100004B, 0x914B051E, 0x7D6C1C01, 0x00000000, 0x00000437,
0x2E030001, 0x2A6F6A2A, 0x0604000E, 0x0B000003, 0x1A350814, 0x3E63813E, 0x13000000, 0x00000118, 0x07000000,
0x13382911, 0x302E0320, 0x14000000, 0x010D000C, 0x0FB9EE73, 0x2F000000, 0x040B0C11, 0x02000000, 0x36440307,
0x3B30071D, 0x07000000, 0x00000000, 0x1ABF9F29, 0x0E000000, 0x050F1112, 0x0100002D, 0xD3C42B00, 0x22593404,
0x00000000, 0x01010000, 0x0E451B00, 0x00000000, 0x0000070C, 0x00000061, 0xFFED2F00, 0x3EA04300, 0x00000000,
0x05140B00, 0x00030200, 0x00000000, 0x00061C0B, 0x00000037, 0x8F640500, 0x2A8F5901, 0x00000000, 0x082D3504,
0x00000000, 0x00010003, 0x0A201B02, 0x00000000, 0x07000000, 0x11826503, 0x00050400, 0x072F3503, 0x07010007,
0x2F1E0C0B, 0x09080000, 0x03000000, 0x00000000, 0x07462500, 0x0E361100, 0x000B0900, 0x04000018, 0x3E160600,
0x00060F0B, 0x3D190000, 0x00000000, 0x00000000, 0x21370600, 0x00000000, 0x00000007, 0x09000000, 0x0B866F22,
0x713C0000, 0x02000000, 0x00000000, 0x08060000, 0x00000000, 0x00000000, 0x00000000, 0x30D76F12, 0x4B1A0001,
0x02050000, 0x00000000, 0x021A0A00, 0x00000714, 0x08000000, 0x00000000, 0x1E5C1700, 0x03000000, 0x36560400,
0x00000000, 0x15300600, 0x00003F5D, 0x07000000, 0x00000000, 0x2E2F0000, 0x00000008, 0x8F840300, 0x0F060000,
0x06070000, 0x00065B61, 0x00000000, 0x00000020, 0xA67C0700, 0x0006000E, 0x612D0006, 0x1B030000, 0x00000001,
0x0001211B, 0x00000000, 0x0000002F, 0x93490103, 0x3B390200, 0x04000011, 0x13000005, 0x2F2E0C11, 0x02000000,
0x00000000, 0x00000008, 0x14030015, 0x5D2C0000, 0x00000115, 0x08000027, 0x724F0F0A, 0x353D0600,
};
static UNK_TYPE texture2[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x02030404,
0x04040303, 0x03030303, 0x03020202, 0x02020201, 0x01010000, 0x00000000, 0x01010305, 0x090B0D0D, 0x0C0B0A0A,
0x0A0A0B0A, 0x09080707, 0x07070707, 0x07070705, 0x04030201, 0x0304070B, 0x11141717, 0x16141313, 0x14151514,
0x110D0B0B, 0x0C0D0F12, 0x13141413, 0x110C0905, 0x07070B12, 0x181E2121, 0x201F1F20, 0x2225221D, 0x17120F0F,
0x13171D23, 0x292D2D2A, 0x2219120A, 0x07080C13, 0x1B202223, 0x22232629, 0x2C2B261F, 0x17121112, 0x18202B36,
0x4046453D, 0x3022150C, 0x07080D15, 0x1C202325, 0x272A2E33, 0x3431281E, 0x16121217, 0x202E3F4F, 0x595D5A4E,
0x3B27170C, 0x07090F16, 0x1C202327, 0x2B32383C, 0x3B34291E, 0x1613161E, 0x2D425866, 0x6D6E6856, 0x3F28160B,
0x070A1117, 0x1C20252A, 0x333B4245, 0x41382C21, 0x18161B28, 0x3D586E7A, 0x7D7A6F58, 0x3C231309, 0x070C1318,
0x1E222932, 0x3C464E4F, 0x4A413529, 0x1F1D2232, 0x4C6A8189, 0x88816D50, 0x331D0E07, 0x090F181F, 0x252B343F,
0x4A555E5F, 0x5C524537, 0x2B272D40, 0x5D7C9197, 0x91816444, 0x29160B07, 0x0F19222A, 0x323B4550, 0x5D6D787D,
0x796B5B49, 0x3C373E52, 0x7190A2A2, 0x93785537, 0x20110A0A, 0x1D28343E, 0x47505A64, 0x738698A1, 0x9C8D7761,
0x534E566D, 0x8DA6B0A6, 0x8D69472C, 0x190F0E13, 0x36434F57, 0x5F676E77, 0x869BB0BC, 0xBBAF9A84, 0x74717D93,
0xADBCBBA5, 0x835E412A, 0x1D1A1E27, 0x5360696E, 0x73777C82, 0x8C9EB3C5, 0xCECBBEAB, 0x9F9FA9BC, 0xCACEBFA0,
0x7A593F2F, 0x282B3545, 0x6F767778, 0x78787A7F, 0x8593A8C2, 0xD6DDDAD2, 0xCCCBD2DA, 0xDFD7BE9B, 0x775A473C,
0x3A445463, 0x7E7D7875, 0x716D6D71, 0x78849BBA, 0xD8EAEDED, 0xEBEBEDED, 0xEBDABB97, 0x7862554F, 0x5562727B,
0x7F766E67, 0x625D5C5F, 0x697991B2, 0xD6EFF7F5, 0xF3F4F7F7, 0xEDD5B496, 0x7F70696B, 0x74808787, 0x796C5F57,
0x514D4C52, 0x5E738EAF, 0xD1EAF1ED, 0xEBEDF4F4, 0xE6CCB099, 0x8A818087, 0x91959288, 0x7261534A, 0x4541434A,
0x597290AE, 0xCADCE0DC, 0xDADDE5E6, 0xD9C2AD9D, 0x9390949D, 0xA2A09584, 0x6C5A4B41, 0x3B3B3D46, 0x57718EA9,
0xBDC9CBCA, 0xCACED2CF, 0xC3B3A398, 0x92939AA1, 0xA39D907F, 0x6955453C, 0x38373C46, 0x58718DA5, 0xB7C1C5C6,
0xC9CCCAC2, 0xB4A59A91, 0x8D91979D, 0x9E998D7D, 0x6752423A, 0x38383C46, 0x576F8AA2, 0xB3BFC6CB, 0xCECCC5B7,
0xA7988D86, 0x83868E95, 0x98968D7D, 0x644F403B, 0x393A3E47, 0x566C859C, 0xAFBDC7CE, 0xCEC8BCAA, 0x9A8A7F78,
0x777A838D, 0x94958C7A, 0x5E4C423E, 0x3E3E4047, 0x54677D94, 0xA9BAC7CD, 0xC9C0AF9F, 0x8E80746D, 0x6B707A86,
0x91928975, 0x5A4B4543, 0x43434448, 0x5161768C, 0xA3B5C3C7, 0xC1B4A394, 0x85776D66, 0x63687480, 0x8C8D836F,
0x574D4848, 0x4848484A, 0x505D7087, 0x9DB1BDBE, 0xB6A9998B, 0x7F746A63, 0x62656F7B, 0x84847A67, 0x554F4D4D,
0x4D4D4E4F, 0x535F6F85, 0x9BAEB8B8, 0xAFA29488, 0x7E756B65, 0x62656D75, 0x7B797061, 0x56535353, 0x5556585A,
0x6069788A, 0x9EAEB6B4, 0xAB9F948A, 0x817A726B, 0x67686B6F, 0x726E665D, 0x585A5C5E, 0x62676C70, 0x767E8A98,
0xA6B2B6B4, 0xACA1978E, 0x89837C76, 0x716E6C6C, 0x6A66605C, 0x5F62686F, 0x7680888F, 0x94999FA7, 0xAFB6B7B5,
0xAEA49C96, 0x928E8983, 0x7D76716B, 0x67625F5D, 0x676D7681, 0x8E9BA6AD, 0xB0B1B1B2, 0xB4B7B9B6, 0xB1A8A29E,
0x9B999590, 0x877F7770, 0x6A656364, 0x71788392, 0xA3B2BDC3, 0xC3BFBAB7, 0xB6B8B9B7, 0xB3ABA6A3, 0xA3A19E98,
0x91888079, 0x736E6C6D, 0x7A818C9C, 0xAFB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FB, 0xFBFBFBFA, 0xFAF9F8F7, 0xF7F7F8F8,
0xF9FAFBFC, 0xFEFFFFFF, 0xFFFFFEFD, 0xFCFCFBFB, 0xFBFBFBFC, 0xFCFCFCFB, 0xFBFAFAFA, 0xFAFAFAFA, 0xFBFBFCFD,
0xFEFFFFFF, 0xFFFFFEFE, 0xFDFCFCFC, 0xFBFCFCFD, 0xFDFDFDFC, 0xFCFCFBFB, 0xFBFBFBFC, 0xFCFCFDFE, 0xFFFFFFFF,
0xFFFFFFFE, 0xFEFDFDFD, 0xFDFDFDFD, 0xFEFEFDFD, 0xFDFDFDFD, 0xFDFDFDFD, 0xFDFDFEFE, 0xFFFFFFFF, 0xFFFFFFFE,
0xFEFEFEFD, 0xFDFEFEFE, 0xFEFEFEFE, 0xFEFEFEFE, 0xFEFEFEFE, 0xFEFEFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE,
0xFEFEFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
};
static UNK_TYPE vertices1[] = {
0x00420271, 0xFFBE0000, 0x060006C2, 0x3E52C2FF, 0x000002BC, 0x00000000, 0x07000800, 0x007800FF, 0x005D0271,
0x00000000, 0x080006C2, 0x575200FF, 0x00BD01DB, 0xFFB20000, 0x07000419, 0x5E3FD9FF, 0x00BD01DB, 0x004E0000,
0x09000419, 0x5E3F27FF, 0x01AF001B, 0x00000000, 0x08000005, 0x6B3500FF, 0x0131001B, 0x01310000, 0x0A000005,
0x4C354CFF, 0x000002BC, 0x00000000, 0x09000800, 0x007800FF, 0x00420271, 0x00420000, 0x0A0006C2, 0x3E523EFF,
0x004E01DB, 0x00BD0000, 0x0B000419, 0x273F5EFF, 0x0000001B, 0x01AF0000, 0x0C000005, 0x00356BFF, 0x000002BC,
0x00000000, 0x0B000800, 0x007800FF, 0x00000271, 0x005D0000, 0x0C0006C2, 0x005257FF, 0xFFB201DB, 0x00BD0000,
0x0D000419, 0xD93F5EFF, 0xFECF001B, 0x01310000, 0x0E000005, 0xB4354CFF, 0x000002BC, 0x00000000, 0x0D000800,
0x007800FF, 0xFFBE0271, 0x00420000, 0x0E0006C2, 0xC2523EFF, 0xFF4301DB, 0x004E0000, 0x0F000419, 0xA23F27FF,
0xFE51001B, 0x00000000, 0x10000005, 0x953500FF, 0xFFA30271, 0x00000000, 0x100006C2, 0xA95200FF, 0xFF4301DB,
0xFFB20000, 0x11000419, 0xA23FD9FF, 0xFE51001B, 0x00000000, 0x00000005, 0x953500FF, 0xFF4301DB, 0xFFB20000,
0x01000419, 0xA23FD9FF, 0xFECF001B, 0xFECF0000, 0x02000005, 0xB435B4FF, 0xFFA30271, 0x00000000, 0x000006C2,
0xA95200FF, 0x000002BC, 0x00000000, 0x01000800, 0x007800FF, 0xFFBE0271, 0xFFBE0000, 0x020006C2, 0xC252C2FF,
0xFFB201DB, 0xFF430000, 0x03000419, 0xD93FA2FF, 0x0000001B, 0xFE510000, 0x04000005, 0x003595FF, 0x000002BC,
0x00000000, 0x03000800, 0x007800FF, 0x00000271, 0xFFA30000, 0x040006C2, 0x0052A9FF, 0x004E01DB, 0xFF430000,
0x05000419, 0x273FA2FF,
};
static UNK_TYPE vertices2[] = {
0x0000001B, 0xFE510000, 0x04000005, 0x003595FF, 0x004E01DB, 0xFF430000, 0x05000419, 0x273FA2FF, 0x0131001B,
0xFECF0000, 0x06000005, 0x4C35B4FF, 0x00000271, 0xFFA30000, 0x040006C2, 0x0052A9FF, 0x000002BC, 0x00000000,
0x05000800, 0x007800FF, 0x00420271, 0xFFBE0000, 0x060006C2, 0x3E52C2FF, 0x00BD01DB, 0xFFB20000, 0x07000419,
0x5E3FD9FF, 0x01AF001B, 0x00000000, 0x08000005, 0x6B3500FF, 0xFFBE0271, 0x00420000, 0x060006C2, 0xC2523EFF,
0x000002BC, 0x00000000, 0x07000800, 0x007800FF, 0xFFA30271, 0x00000000, 0x080006C2, 0xA95200FF,
};
static Gfx textureDL[] = {
gsDPPipeSync(),
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(texture2, G_IM_FMT_I, G_IM_SIZ_8b, 32, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, 5, 6, 1, 15),
gsDPLoadMultiBlock(texture1, 0x0100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_MIRROR | G_TX_WRAP, 5, 6, 13, 14),
gsDPSetCombineLERP(TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, TEXEL1, 0, ENVIRONMENT, TEXEL0, PRIMITIVE, ENVIRONMENT,
COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0),
gsDPSetRenderMode(Z_CMP | IM_RD | CVG_DST_SAVE | ZMODE_XLU | FORCE_BL |
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1),
G_RM_ZB_CLD_SURF2),
gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
static Gfx vertexDL[] = {
gsSPVertex(vertices1, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(3, 2, 4, 0, 3, 4, 5, 0),
gsSP2Triangles(5, 4, 6, 0, 2, 7, 8, 0),
gsSP2Triangles(2, 8, 4, 0, 4, 8, 9, 0),
gsSP2Triangles(4, 9, 6, 0, 6, 9, 10, 0),
gsSP2Triangles(8, 11, 12, 0, 8, 12, 9, 0),
gsSP2Triangles(9, 12, 13, 0, 9, 13, 10, 0),
gsSP2Triangles(10, 13, 14, 0, 12, 15, 16, 0),
gsSP2Triangles(12, 16, 13, 0, 13, 16, 17, 0),
gsSP2Triangles(13, 17, 14, 0, 14, 17, 18, 0),
gsSP2Triangles(16, 19, 17, 0, 17, 19, 20, 0),
gsSP2Triangles(17, 20, 18, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 24, 26, 22, 0),
gsSP2Triangles(22, 26, 27, 0, 22, 27, 23, 0),
gsSP2Triangles(23, 27, 28, 0, 26, 29, 30, 0),
gsSP2Triangles(26, 30, 27, 0, 27, 30, 31, 0),
gsSP1Triangle(27, 31, 28, 0),
gsSPVertex(vertices2, 11, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(3, 5, 1, 0, 1, 5, 6, 0),
gsSP2Triangles(1, 6, 2, 0, 2, 6, 7, 0),
gsSP1Triangle(8, 9, 10, 0),
gsSPEndDisplayList(),
};

View file

@ -1,3 +1,9 @@
/*
* File: z_en_dog.c
* Overlay: ovl_En_Dog
* Description: Dog actor that Link can interact with
*/
#include "z_en_dog.h"
#define ROOM 0x00