1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 23:41:24 +00:00

Cleanup around some generic animation info structs (#1059)

* Name generic anim info structs and cleanup usage

* Make `EnDaiku` use generic struct

* Add `/* decimalid */` comments to all added enums

* small fixes

* Two more generic animinfo structs

* Cleanup usage of newly generic structs

* Cleanup x2 usage of newly generic structs

* `transitionRate` -> `morphFrames`

* Properly name generic anim structs (attempt to at least)

* `anim` -> `animation`

* fixes

* run formatter

* Use consistent prototypes for each actor's ChangeAnim helper

* run formatter

* minor cleanup

* Run formatter

* `Animation_ChangeInfo` -> `Animation_ChangeByInfo`
This commit is contained in:
Dragorn421 2022-01-12 03:10:43 +01:00 committed by GitHub
parent d3a8ade6ba
commit 11917bf640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 675 additions and 467 deletions

View file

@ -47,7 +47,14 @@ static ColliderJntSphInit sJntSphInit = {
static CollisionCheckInfoInit2 D_80B0F074 = { 1, 2, 25, 25, MASS_IMMOVABLE };
static struct_80034EC0_Entry D_80B0F080[] = {
typedef enum {
/* 0 */ ENSW_ANIM_0,
/* 1 */ ENSW_ANIM_1,
/* 2 */ ENSW_ANIM_2,
/* 3 */ ENSW_ANIM_3
} EnSwAnimation;
static AnimationInfo sAnimationInfo[] = {
{ &object_st_Anim_000304, 1.0f, 0.0f, -1.0f, 0x01, 0.0f },
{ &object_st_Anim_000304, 1.0f, 0.0f, -1.0f, 0x01, -8.0f },
{ &object_st_Anim_0055A8, 1.0f, 0.0f, -1.0f, 0x01, -8.0f },
@ -229,7 +236,7 @@ void EnSw_Init(Actor* thisx, GlobalContext* globalCtx) {
}
SkelAnime_Init(globalCtx, &this->skelAnime, &object_st_Skel_005298, NULL, this->jointTable, this->morphTable, 30);
func_80034EC0(&this->skelAnime, D_80B0F080, 0);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENSW_ANIM_0);
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->sphs);