1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +00:00

z_En_Ossan and dependencies (#824)

* fix colliderinit typo

* fix initchain

* reloc

* progress

* progress

* Pick off a few easy functions, reduce number of warnings

* more tough OKs

* Getting closer to all OK, fix en_girla header

* some hard OKs, 7 to go

* two funcs remaining

* func_80AC7094 OK!

* Fix warnings, begin documentation

* get most of object_ossan documented, document some of en_ossan

* improve en_girla function names

* more EnOssan documentation

* more documentation

* en_tana basically complete, en_girla vars all named, en_ossan documentation improvements

* delete TIME ITSELF

* object_oF1d_map OK

* more names, fixed a poition typo

* Nearly all en_ossan functions named, all variables named

* format.sh

* forgot to delete data

* implement pr changes

* EnOssan OK! implement most of Roman's suggestions

* ugh

* implement figs suggestions

* implement roman's suggestion

* Can't tell my left from my other left

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
mzxrules 2021-07-04 11:23:18 -04:00 committed by GitHub
parent 7446e5eb80
commit 3fd05c9147
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
134 changed files with 3479 additions and 7998 deletions

View file

@ -5,6 +5,7 @@
*/
#include "z_demo_go.h"
#include "objects/object_oF1d_map/object_oF1d_map.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -27,7 +28,7 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx);
void func_8097D290(DemoGo* this, GlobalContext* globalCtx);
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx);
static u64* D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 };
static void* sEyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
static DemoGoActionFunc D_8097D44C[] = {
func_8097CFDC, func_8097CFFC, func_8097D01C, func_8097D058, func_8097D088, func_8097D0D0, func_8097D130,
@ -50,11 +51,6 @@ const ActorInit Demo_Go_InitVars = {
(ActorFunc)DemoGo_Draw,
};
extern AnimationHeader D_060029A8;
extern AnimationHeader D_06004930;
extern u64 D_0600E680[];
extern FlexSkeletonHeader D_0600FEF0;
s32 func_8097C870(DemoGo* this) {
s32 ret;
@ -147,9 +143,9 @@ void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
endPos.x = npcAction->endPos.x;
endPos.y = npcAction->endPos.y;
endPos.z = npcAction->endPos.z;
world->pos.x = (((endPos.x - startPos.x) * temp_ret) + startPos.x);
world->pos.y = (((endPos.y - startPos.y) * temp_ret) + startPos.y);
world->pos.z = (((endPos.z - startPos.z) * temp_ret) + startPos.z);
world->pos.x = (endPos.x - startPos.x) * temp_ret + startPos.x;
world->pos.y = (endPos.y - startPos.y) * temp_ret + startPos.y;
world->pos.z = (endPos.z - startPos.z) * temp_ret + startPos.z;
world->rot.y = thisx->shape.rot.y = npcAction->rot.y;
}
}
@ -195,7 +191,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx) {
}
}
UNK_TYPE DemoGo_FrameUpdateMatrix(DemoGo* this) {
s32 DemoGo_FrameUpdateMatrix(DemoGo* this) {
return SkelAnime_Update(&this->skelAnime);
}
@ -242,8 +238,8 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) {
}
}
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
AnimationHeader* animation = &D_060029A8;
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, s32 arg2) {
AnimationHeader* animation = &gGoronAnim_0029A8;
if (arg2 != 0) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
-8.0f);
@ -279,7 +275,8 @@ void func_8097D058(DemoGo* this, GlobalContext* globalCtx) {
}
void func_8097D088(DemoGo* this, GlobalContext* globalCtx) {
UNK_TYPE something;
s32 something;
func_8097CA30(this, globalCtx);
something = DemoGo_FrameUpdateMatrix(this);
func_8097C930(this);
@ -316,10 +313,10 @@ void DemoGo_Update(Actor* thisx, GlobalContext* globalCtx) {
void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx) {
DemoGo* this = THIS;
AnimationHeader* animation = &D_06004930;
AnimationHeader* animation = &gGoronAnim_004930;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, NULL, NULL, 0);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
this->action = 0;
}
@ -329,16 +326,16 @@ void func_8097D290(DemoGo* this, GlobalContext* globalCtx) {
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) {
s32 pad;
s16 temp = this->unk_190;
s16 eyeTexIdx = this->unk_190;
SkelAnime* skelAnime = &this->skelAnime;
void* srcSegment8 = D_8097D440[temp];
void* srcSegment9 = &D_0600E680;
void* eyeTexture = sEyeTextures[eyeTexIdx];
void* mouthTexture = &gGoronCsMouthSmileTex;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_go.c", 732);
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
SkelAnime_DrawFlexOpa(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
this);