mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +00:00
"Decompile" more objects. (#784)
* Object_hakach_objects OK and fix a warning in z_play.c * Object Warp1 OK * Object_spot16_obj OK * object_cs Skeleton and limbs OK * Limbs are broken * Limbs OK * Object_CS OK * Object_jya_door OK * fix errors and add new lines * PR fixes (AngheloAlf) * PR fixes (EllipticEllipsis) * PR fixes (Fig) * Rename Spot16 and Jya * GraveYard -> Graveyard * PR fixes * -s * PR fixes
This commit is contained in:
parent
515ebdce9d
commit
f6470eaa08
26 changed files with 291 additions and 151 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "z_en_cs.h"
|
||||
#include "objects/object_cs/object_cs.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
|
||||
#define FLAGS 0x00000009
|
||||
|
@ -16,8 +17,6 @@ void EnCs_Wait(EnCs* this, GlobalContext* globalCtx);
|
|||
s32 EnCs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx);
|
||||
void EnCs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
|
||||
|
||||
extern FlexSkeletonHeader D_06008540; // Graveyard boy skeleton
|
||||
|
||||
const ActorInit En_Cs_InitVars = {
|
||||
ACTOR_EN_CS,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -52,13 +51,46 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit2 = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static DamageTable sDamageTable = { 0 };
|
||||
static DamageTable sDamageTable[] = {
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(0, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Explosive */ DMG_ENTRY(0, 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0x0),
|
||||
/* Normal arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(0, 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Master sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Light arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Light magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static struct_D_80AA1678 sAnimations[] = {
|
||||
{ 0x06000700, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ 0x06000E10, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ 0x06001588, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ 0x0600195C, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ &gGraveyardKidWalkAnim, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ &gGraveyardKidSwingStickUpAnim, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ &gGraveyardKidGrabStickTwoHandsAnim, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
{ &gGraveyardKidIdleAnim, 1.0f, ANIMMODE_ONCE, -10.0f },
|
||||
};
|
||||
|
||||
void EnCs_SetAnimFromIndex(EnCs* this, s32 animIndex, s32* currentAnimIndex) {
|
||||
|
@ -94,12 +126,12 @@ void EnCs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f);
|
||||
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008540, NULL, this->jointTable, this->morphTable, 16);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGraveyardKidSkel, NULL, this->jointTable, this->morphTable, 16);
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, sDamageTable, &sColChkInfoInit2);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
Animation_Change(&this->skelAnime, sAnimations[0].animation, 1.0f, 0.0f,
|
||||
|
@ -416,7 +448,11 @@ void EnCs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static u64* eyeTextures[] = { 0x06002130, 0x06002930, 0x06003130 };
|
||||
static u64* eyeTextures[] = {
|
||||
gGraveyardKidEyesOpenTex,
|
||||
gGraveyardKidEyesHalfTex,
|
||||
gGraveyardKidEyesClosedTex,
|
||||
};
|
||||
EnCs* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue