mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Document En_Racedog (and some low-hanging fruit in En_Dg) (#782)
* Dog color documentation * Simplify floats * Text ID and some speed doc * Macros for condition * Index documentation * Name the sprint speed multiplier * Racedog animations * Document a few things regarding the race start * Doc selection arrow stuff * Some low-hanging fruit * Some path stuff, mostly copied from Jg * Some speed docs * More race stuff * Add a ton of documentation, mostly so I can go to bed * Document rotation stuff (but I'm not super confident in it) * Port very low-hanging fruit from Racedog to Dg * Document cross-product stuff * Finish docs * Fix Aob_01 * First response to reviews * Change it to GetFloorRot
This commit is contained in:
@@ -598,7 +598,7 @@ s32 func_809C2504(EnAob01* this, GlobalContext* globalCtx) {
|
||||
Actor* npc = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
|
||||
|
||||
while (npc != NULL) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (func_800F2178(this->unk_430) == ((EnRacedog*)npc)->unk_1E8)) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (func_800F2178(this->unk_430) == ((EnRacedog*)npc)->currentPoint)) {
|
||||
ActorCutscene_Stop(this->unk_430);
|
||||
this->unk_3F4 = npc;
|
||||
this->unk_430 = ActorCutscene_GetAdditionalCutscene(this->unk_430);
|
||||
@@ -614,7 +614,7 @@ s32 func_809C2594(EnAob01* this, GlobalContext* globalCtx) {
|
||||
Actor* npc = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
|
||||
|
||||
while (npc != NULL) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (((EnRacedog*)npc)->unk_290 == ((EnRacedog*)npc)->unk_292)) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (((EnRacedog*)npc)->index == ((EnRacedog*)npc)->selectedDogIndex)) {
|
||||
this->unk_3F4 = npc;
|
||||
return true;
|
||||
}
|
||||
@@ -629,7 +629,7 @@ s32 func_809C25E4(EnAob01* this, GlobalContext* globalCtx) {
|
||||
s16 count = 0;
|
||||
|
||||
while (npc != NULL) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (((EnRacedog*)npc)->unk_29C == 3)) {
|
||||
if ((npc->id == ACTOR_EN_RACEDOG) && (((EnRacedog*)npc)->raceStatus == RACEDOG_RACE_STATUS_FINISHED)) {
|
||||
count++;
|
||||
}
|
||||
npc = npc->next;
|
||||
@@ -853,12 +853,12 @@ s32 func_809C2EC4(EnAob01* this, GlobalContext* globalCtx) {
|
||||
|
||||
while (dog != NULL) {
|
||||
if (dog->id == ACTOR_EN_DG) {
|
||||
this->unk_432 = ((EnDg*)dog)->unk_288;
|
||||
this->unk_432 = ((EnDg*)dog)->selectedDogIndex;
|
||||
if (this->unk_432 == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->unk_432 == ENDG_GET_3E0(dog)) {
|
||||
if (this->unk_432 == ENDG_GET_INDEX(dog)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,19 +57,32 @@ typedef struct {
|
||||
|
||||
static D_8098C2A4_s D_8098C2A4 = { 0x0063, 0x0000 };
|
||||
|
||||
/**
|
||||
* Stores the state for the dogs milling about at the Doggy Racetrack.
|
||||
*/
|
||||
typedef struct {
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
s16 unk_04;
|
||||
} D_8098C2A8_s;
|
||||
s16 color; // The dog's color, which is used as an index into sBaseSpeeds
|
||||
s16 index; // The dog's index within sDogInfo
|
||||
s16 textId; // The ID of the text to display when the dog is picked up
|
||||
} RacetrackDogInfo;
|
||||
|
||||
static D_8098C2A8_s D_8098C2A8[] = {
|
||||
{ 3, 0, 0x3539 }, { 1, 1, 0x353A }, { 5, 2, 0x353B }, { 2, 3, 0x353C }, { 4, 4, 0x3538 },
|
||||
{ 2, 5, 0x353E }, { 3, 6, 0x353F }, { 1, 7, 0x3540 }, { 1, 8, 0x3541 }, { 6, 9, 0x3542 },
|
||||
{ 2, 10, 0x3543 }, { 3, 11, 0x3544 }, { 1, 12, 0x3545 }, { 4, 13, 0x3546 },
|
||||
/**
|
||||
* A table of RacetrackDogInfo for every dog at the Doggy Racetrack. Note that the textId values
|
||||
* in this table are updated by functions within this actor.
|
||||
*/
|
||||
static RacetrackDogInfo sRacetrackDogInfo[] = {
|
||||
{ DOG_COLOR_BEIGE, 0, 0x3539 }, { DOG_COLOR_WHITE, 1, 0x353A }, { DOG_COLOR_BLUE, 2, 0x353B },
|
||||
{ DOG_COLOR_GRAY, 3, 0x353C }, { DOG_COLOR_BROWN, 4, 0x3538 }, { DOG_COLOR_GRAY, 5, 0x353E },
|
||||
{ DOG_COLOR_BEIGE, 6, 0x353F }, { DOG_COLOR_WHITE, 7, 0x3540 }, { DOG_COLOR_WHITE, 8, 0x3541 },
|
||||
{ DOG_COLOR_GOLD, 9, 0x3542 }, { DOG_COLOR_GRAY, 10, 0x3543 }, { DOG_COLOR_BEIGE, 11, 0x3544 },
|
||||
{ DOG_COLOR_WHITE, 12, 0x3545 }, { DOG_COLOR_BROWN, 13, 0x3546 },
|
||||
};
|
||||
|
||||
static D_8098C2A8_s D_8098C2FC = { 0, -1, 0x353E };
|
||||
/**
|
||||
* Stores the RacetrackDogInfo for the dog that is selected by the player. These values are just
|
||||
* placeholders, and the actual value gets grabbed from sRacetrackDogInfo in func_80989E18.
|
||||
*/
|
||||
static RacetrackDogInfo sSelectedRacetrackDogInfo = { DOG_COLOR_DEFAULT, -1, 0x353E };
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
@@ -252,29 +265,29 @@ void func_80989674(EnDg* this, GlobalContext* globalCtx) {
|
||||
s16 phi_a1;
|
||||
f32 sp30;
|
||||
|
||||
if (this->unk_1DC != NULL) {
|
||||
phi_a1 = func_809895B4(this->unk_1DC, this->unk_1E0, &this->actor.world.pos, &sp30);
|
||||
if (this->path != NULL) {
|
||||
phi_a1 = func_809895B4(this->path, this->unk_1E0, &this->actor.world.pos, &sp30);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
phi_a1 = this->actor.wallYaw;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, phi_a1, 4, 0x3E8, 1);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
if (func_80989418(this, this->unk_1DC, this->unk_1E0)) {
|
||||
if (this->unk_1E0 >= (this->unk_1DC->count - 1)) {
|
||||
if (func_80989418(this, this->path, this->unk_1E0)) {
|
||||
if (this->unk_1E0 >= (this->path->count - 1)) {
|
||||
this->unk_1E0 = 0;
|
||||
} else {
|
||||
this->unk_1E0++;
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->unk_286 == 21) || ((this->unk_286 == 20) && (globalCtx->sceneNum == SCENE_OMOYA))) {
|
||||
if ((this->index == 21) || ((this->index == 20) && (globalCtx->sceneNum == SCENE_OMOYA))) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f);
|
||||
} else if (this->unk_286 == 20) {
|
||||
} else if (this->index == 20) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
|
||||
} else if (globalCtx->sceneNum == SCENE_CLOCKTOWER) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
|
||||
} else if (D_8098C2A8[this->unk_286].unk_04 & 0x11) {
|
||||
} else if (sRacetrackDogInfo[this->index].textId & 0x11) {
|
||||
Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f);
|
||||
} else {
|
||||
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
|
||||
@@ -289,7 +302,7 @@ void func_80989864(EnDg* this, GlobalContext* globalCtx) {
|
||||
s16 mod = (this->actor.speedXZ > 6.0f) ? 2 : 3;
|
||||
Vec3f sp38;
|
||||
|
||||
if (((this->unk_286 + frame) % mod) == 0) {
|
||||
if (((this->index + frame) % mod) == 0) {
|
||||
sp38.x = randPlusMinusPoint5Scaled(15.0f) + this->actor.world.pos.x;
|
||||
sp38.y = this->actor.world.pos.y;
|
||||
sp38.z = randPlusMinusPoint5Scaled(15.0f) + this->actor.world.pos.z;
|
||||
@@ -329,13 +342,13 @@ void func_80989A9C(EnDg* this, f32 arg1) {
|
||||
|
||||
void func_80989ADC(EnDg* this, GlobalContext* globalCtx) {
|
||||
if (!(this->actor.bgCheckFlags & 0x20)) {
|
||||
if ((this->unk_286 == 21) || ((this->unk_286 == 20) && (globalCtx->sceneNum == SCENE_OMOYA))) {
|
||||
if ((this->index == 21) || ((this->index == 20) && (globalCtx->sceneNum == SCENE_OMOYA))) {
|
||||
func_80989140(&this->skelAnime, sAnimations, 1);
|
||||
} else if (this->unk_286 == 20) {
|
||||
} else if (this->index == 20) {
|
||||
func_80989140(&this->skelAnime, sAnimations, 2);
|
||||
} else if (globalCtx->sceneNum == SCENE_CLOCKTOWER) {
|
||||
func_80989140(&this->skelAnime, sAnimations, 2);
|
||||
} else if (D_8098C2A8[this->unk_286].unk_04 & 0x11) {
|
||||
} else if (sRacetrackDogInfo[this->index].textId & 0x11) {
|
||||
func_80989140(&this->skelAnime, sAnimations, 1);
|
||||
} else {
|
||||
func_80989140(&this->skelAnime, sAnimations, 2);
|
||||
@@ -345,38 +358,37 @@ void func_80989ADC(EnDg* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80989BF8(EnDg* this) {
|
||||
if (this->unk_286 < 14) {
|
||||
if (this->unk_286 % 2) {
|
||||
D_8098C2A8[this->unk_286].unk_04 =
|
||||
0x3538 +
|
||||
((gSaveContext.save.weekEventReg[42 + (this->unk_286 / 2)] & (0x10 | 0x20 | 0x40 | 0x80)) >> 4);
|
||||
if (this->index < 14) {
|
||||
if (this->index % 2) {
|
||||
sRacetrackDogInfo[this->index].textId =
|
||||
0x3538 + ((gSaveContext.save.weekEventReg[42 + (this->index / 2)] & (0x10 | 0x20 | 0x40 | 0x80)) >> 4);
|
||||
} else {
|
||||
D_8098C2A8[this->unk_286].unk_04 =
|
||||
0x3538 + (gSaveContext.save.weekEventReg[42 + (this->unk_286 / 2)] & (1 | 2 | 4 | 8));
|
||||
sRacetrackDogInfo[this->index].textId =
|
||||
0x3538 + (gSaveContext.save.weekEventReg[42 + (this->index / 2)] & (1 | 2 | 4 | 8));
|
||||
}
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
|
||||
if ((D_8098C2A8[this->unk_286].unk_04 >= 0x3547) || (D_8098C2A8[this->unk_286].unk_04 < 0x3538)) {
|
||||
D_8098C2A8[this->unk_286].unk_04 = 0x353E;
|
||||
if ((sRacetrackDogInfo[this->index].textId >= 0x3547) || (sRacetrackDogInfo[this->index].textId < 0x3538)) {
|
||||
sRacetrackDogInfo[this->index].textId = 0x353E;
|
||||
}
|
||||
|
||||
if (D_8098C2A8[this->unk_286].unk_04 == 0x353D) {
|
||||
D_8098C2A8[this->unk_286].unk_04 = 0x3538;
|
||||
if (sRacetrackDogInfo[this->index].textId == 0x353D) {
|
||||
sRacetrackDogInfo[this->index].textId = 0x3538;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80989D38(EnDg* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_286 == 21) {
|
||||
if (this->index == 21) {
|
||||
if (CURRENT_DAY == 1) {
|
||||
Message_StartTextbox(globalCtx, 0x91C, NULL);
|
||||
} else {
|
||||
Message_StartTextbox(globalCtx, 0x91E, NULL);
|
||||
}
|
||||
} else if ((this->unk_286 >= 0) && (this->unk_286 < 14)) {
|
||||
Message_StartTextbox(globalCtx, D_8098C2A8[this->unk_286].unk_04, NULL);
|
||||
} else if (this->unk_286 == 20) {
|
||||
} else if ((this->index >= 0) && (this->index < 14)) {
|
||||
Message_StartTextbox(globalCtx, sRacetrackDogInfo[this->index].textId, NULL);
|
||||
} else if (this->index == 20) {
|
||||
Message_StartTextbox(globalCtx, 0x353D, NULL);
|
||||
} else {
|
||||
Message_StartTextbox(globalCtx, 0x627, NULL);
|
||||
@@ -384,7 +396,7 @@ void func_80989D38(EnDg* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80989E18(EnDg* this, GlobalContext* globalCtx) {
|
||||
D_8098C2A8_s* temp;
|
||||
RacetrackDogInfo* temp;
|
||||
|
||||
if ((D_8098C2A0 != 0) && !(this->unk_280 & 1)) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
@@ -397,7 +409,7 @@ void func_80989E18(EnDg* this, GlobalContext* globalCtx) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
|
||||
this->unk_290 = 1;
|
||||
D_8098C2FC = D_8098C2A8[this->unk_286];
|
||||
sSelectedRacetrackDogInfo = sRacetrackDogInfo[this->index];
|
||||
if (D_8098C2A0 == 0) {
|
||||
this->actor.flags |= ACTOR_FLAG_8000000;
|
||||
D_8098C2A0 = 1;
|
||||
@@ -427,13 +439,13 @@ s32 func_80989FC8(GlobalContext* globalCtx) {
|
||||
while (enemy != NULL) {
|
||||
if (enemy->actor.id == ACTOR_EN_DG) {
|
||||
if (enemy->actor.isTargeted) {
|
||||
D_8098C2A4.unk_00 = enemy->unk_286;
|
||||
D_8098C2A4.unk_00 = enemy->index;
|
||||
return true;
|
||||
}
|
||||
|
||||
dist = enemy->actor.xzDistToPlayer;
|
||||
if (dist < minDist) {
|
||||
D_8098C2A4.unk_00 = enemy->unk_286;
|
||||
D_8098C2A4.unk_00 = enemy->index;
|
||||
minDist = dist;
|
||||
}
|
||||
}
|
||||
@@ -455,7 +467,7 @@ void func_8098A064(EnDg* this, GlobalContext* globalCtx) {
|
||||
func_80989FC8(globalCtx);
|
||||
}
|
||||
|
||||
if (this->unk_286 == D_8098C2A4.unk_00) {
|
||||
if (this->index == D_8098C2A4.unk_00) {
|
||||
if (!(this->unk_280 & 0x20)) {
|
||||
this->unk_280 |= 0x20;
|
||||
func_80989140(&this->skelAnime, sAnimations, 1);
|
||||
@@ -467,7 +479,7 @@ void func_8098A064(EnDg* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (this->unk_286 == D_8098C2A4.unk_00) {
|
||||
} else if (this->index == D_8098C2A4.unk_00) {
|
||||
this->unk_280 &= ~0x20;
|
||||
D_8098C2A4.unk_00 = 99;
|
||||
func_80989ADC(this, globalCtx);
|
||||
@@ -1053,8 +1065,8 @@ void func_8098BA64(EnDg* this, GlobalContext* globalCtx) {
|
||||
D_8098C2A0 = 0;
|
||||
this->unk_280 &= ~1;
|
||||
}
|
||||
this->unk_288 = -1;
|
||||
D_8098C2FC.unk_02 = this->unk_288;
|
||||
this->selectedDogIndex = -1;
|
||||
sSelectedRacetrackDogInfo.index = this->selectedDogIndex;
|
||||
this->unk_28A = 100;
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
this->unk_280 |= 0x10;
|
||||
@@ -1114,7 +1126,7 @@ void EnDg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->unk_1DC = SubS_GetPathByIndex(globalCtx, ENDG_GET_FC00(&this->actor), 0x3F);
|
||||
this->path = SubS_GetPathByIndex(globalCtx, ENDG_GET_PATH(&this->actor), 0x3F);
|
||||
Actor_SetScale(&this->actor, 0.0075f);
|
||||
this->actor.targetMode = 1;
|
||||
this->actor.gravity = -3.0f;
|
||||
@@ -1122,7 +1134,7 @@ void EnDg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->unk_280 = 0;
|
||||
this->unk_28E = 20;
|
||||
this->unk_284 = 10;
|
||||
this->unk_286 = ENDG_GET_3E0(&this->actor);
|
||||
this->index = ENDG_GET_INDEX(&this->actor);
|
||||
this->unk_28C = 0;
|
||||
this->unk_290 = 0;
|
||||
if (globalCtx->sceneNum == SCENE_F01_B) {
|
||||
@@ -1144,7 +1156,7 @@ void EnDg_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
Vec3f sp28 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
this->unk_288 = D_8098C2FC.unk_02;
|
||||
this->selectedDogIndex = sSelectedRacetrackDogInfo.index;
|
||||
if (!(player->stateFlags1 & 0x20) || (globalCtx->sceneNum != SCENE_CLOCKTOWER)) {
|
||||
if (func_8098A1B4(this, globalCtx)) {
|
||||
func_8098A234(this, globalCtx);
|
||||
@@ -1194,25 +1206,31 @@ void EnDg_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
switch (D_8098C2A8[this->unk_286].unk_00) {
|
||||
case 3:
|
||||
switch (sRacetrackDogInfo[this->index].color) {
|
||||
case DOG_COLOR_BEIGE:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 200, 0);
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case DOG_COLOR_WHITE:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 0);
|
||||
break;
|
||||
case 5:
|
||||
|
||||
case DOG_COLOR_BLUE:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 79, 79, 143, 0);
|
||||
break;
|
||||
case 6:
|
||||
|
||||
case DOG_COLOR_GOLD:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 207, 47, 0);
|
||||
break;
|
||||
case 4:
|
||||
|
||||
case DOG_COLOR_BROWN:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 143, 79, 47, 0);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
case DOG_COLOR_GRAY:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 143, 143, 143, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 200, 0);
|
||||
break;
|
||||
|
||||
@@ -4,12 +4,22 @@
|
||||
#include "global.h"
|
||||
#include "objects/object_dog/object_dog.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DOG_COLOR_DEFAULT, // ends up just being treated as beige
|
||||
/* 1 */ DOG_COLOR_WHITE,
|
||||
/* 2 */ DOG_COLOR_GRAY,
|
||||
/* 3 */ DOG_COLOR_BEIGE,
|
||||
/* 4 */ DOG_COLOR_BROWN,
|
||||
/* 5 */ DOG_COLOR_BLUE,
|
||||
/* 6 */ DOG_COLOR_GOLD,
|
||||
} DogColors;
|
||||
|
||||
struct EnDg;
|
||||
|
||||
typedef void (*EnDgActionFunc)(struct EnDg*, GlobalContext*);
|
||||
|
||||
#define ENDG_GET_FC00(thisx) (((thisx)->params & 0xFC00) >> 0xA)
|
||||
#define ENDG_GET_3E0(thisx) (((thisx)->params & 0x3E0) >> 5)
|
||||
#define ENDG_GET_INDEX(thisx) (((thisx)->params & 0x3E0) >> 5)
|
||||
#define ENDG_GET_PATH(thisx) (((thisx)->params & 0xFC00) >> 0xA)
|
||||
|
||||
typedef struct EnDg {
|
||||
/* 0x000 */ Actor actor;
|
||||
@@ -17,15 +27,15 @@ typedef struct EnDg {
|
||||
/* 0x148 */ UNK_TYPE1 unk_148[0x4];
|
||||
/* 0x14C */ SkelAnime skelAnime;
|
||||
/* 0x190 */ ColliderCylinder collider;
|
||||
/* 0x1DC */ Path* unk_1DC;
|
||||
/* 0x1DC */ Path* path;
|
||||
/* 0x1E0 */ s32 unk_1E0;
|
||||
/* 0x1E4 */ Vec3s jointTable[DOG_LIMB_MAX];
|
||||
/* 0x232 */ Vec3s morphTable[DOG_LIMB_MAX];
|
||||
/* 0x280 */ u16 unk_280;
|
||||
/* 0x282 */ s16 unk_282;
|
||||
/* 0x284 */ s16 unk_284;
|
||||
/* 0x286 */ s16 unk_286;
|
||||
/* 0x288 */ s16 unk_288;
|
||||
/* 0x286 */ s16 index;
|
||||
/* 0x288 */ s16 selectedDogIndex;
|
||||
/* 0x28A */ s16 unk_28A;
|
||||
/* 0x28C */ s16 unk_28C;
|
||||
/* 0x28E */ s16 unk_28E;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,20 @@
|
||||
#include "global.h"
|
||||
#include "objects/object_dog/object_dog.h"
|
||||
|
||||
#define ENRACEDOG_GET_3E0(thisx) (((thisx)->params & 0x3E0) >> 5)
|
||||
#define ENRACEDOG_GET_INDEX(thisx) (((thisx)->params & 0x3E0) >> 5)
|
||||
#define ENRACEDOG_GET_PATH(thisx) (((thisx)->params & 0xFC00) >> 10)
|
||||
|
||||
/**
|
||||
* The main point of this seems to be some very light anti-cheat detection. The dog
|
||||
* must progress through these statuses in a linear order to finish the race.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ RACEDOG_RACE_STATUS_BEFORE_POINT_9,
|
||||
/* 1 */ RACEDOG_RACE_STATUS_BETWEEN_POINTS_9_AND_11,
|
||||
/* 2 */ RACEDOG_RACE_STATUS_AFTER_POINT_11,
|
||||
/* 3 */ RACEDOG_RACE_STATUS_FINISHED
|
||||
} RacedogRaceStatus;
|
||||
|
||||
struct EnRacedog;
|
||||
|
||||
typedef void (*EnRacedogActionFunc)(struct EnRacedog*, GlobalContext*);
|
||||
@@ -18,26 +29,26 @@ typedef struct EnRacedog {
|
||||
/* 0x14C */ SkelAnime skelAnime;
|
||||
/* 0x190 */ ColliderCylinder collider;
|
||||
/* 0x1DC */ UNK_TYPE1 unk_1DC[0x4];
|
||||
/* 0x1E0 */ Path* unk_1E0;
|
||||
/* 0x1E0 */ Path* path;
|
||||
/* 0x1E4 */ UNK_TYPE1 unk_1E4[0x4];
|
||||
/* 0x1E8 */ s32 unk_1E8;
|
||||
/* 0x1E8 */ s32 currentPoint;
|
||||
/* 0x1EC */ Vec3s jointTable[DOG_LIMB_MAX];
|
||||
/* 0x23A */ Vec3s morphTable[DOG_LIMB_MAX];
|
||||
/* 0x288 */ s16 unk_288;
|
||||
/* 0x28A */ s16 unk_28A;
|
||||
/* 0x28C */ s16 unk_28C;
|
||||
/* 0x288 */ s16 selectionArrowTimer;
|
||||
/* 0x28A */ s16 raceStartTimer;
|
||||
/* 0x28C */ s16 extraTimeBeforeRaceStart;
|
||||
/* 0x28A */ UNK_TYPE1 unk_28E[0x2];
|
||||
/* 0x290 */ s16 unk_290;
|
||||
/* 0x292 */ s16 unk_292;
|
||||
/* 0x290 */ s16 index;
|
||||
/* 0x292 */ s16 selectedDogIndex;
|
||||
/* 0x294 */ UNK_TYPE1 unk_294[0x4];
|
||||
/* 0x298 */ f32 unk_298;
|
||||
/* 0x29C */ s16 unk_29C;
|
||||
/* 0x2A0 */ Vec3f unk_2A0;
|
||||
/* 0x2AC */ Vec3f unk_2AC;
|
||||
/* 0x2B8 */ s32 unk_2B8;
|
||||
/* 0x2BC */ s32 unk_2BC;
|
||||
/* 0x2C0 */ s32 unk_2C0;
|
||||
/* 0x2C4 */ f32 unk_2C4;
|
||||
/* 0x298 */ f32 targetSpeed;
|
||||
/* 0x29C */ s16 raceStatus;
|
||||
/* 0x2A0 */ Vec3f prevRot;
|
||||
/* 0x2AC */ Vec3f curRot;
|
||||
/* 0x2B8 */ s32 pointForCurrentTargetSpeed;
|
||||
/* 0x2BC */ s32 selectionArrowGreenPrimColor;
|
||||
/* 0x2C0 */ s32 selectionArrowGreenEnvColor;
|
||||
/* 0x2C4 */ f32 selectionArrowScale;
|
||||
} EnRacedog; // size = 0x2C8
|
||||
|
||||
extern const ActorInit En_Racedog_InitVars;
|
||||
|
||||
+17
-17
@@ -13277,26 +13277,26 @@
|
||||
0x80B23F50:("ObjWind_Destroy",),
|
||||
0x80B23F60:("ObjWind_Update",),
|
||||
0x80B243C0:("ObjWind_Draw",),
|
||||
0x80B24630:("func_80B24630",),
|
||||
0x80B246F4:("func_80B246F4",),
|
||||
0x80B2478C:("func_80B2478C",),
|
||||
0x80B248B8:("func_80B248B8",),
|
||||
0x80B24630:("EnRacedog_ChangeAnimation",),
|
||||
0x80B246F4:("EnRacedog_UpdateCollision",),
|
||||
0x80B2478C:("EnRacedog_GetYRotation",),
|
||||
0x80B248B8:("EnRacedog_GetFloorRot",),
|
||||
0x80B24930:("EnRacedog_Init",),
|
||||
0x80B24BE8:("EnRacedog_Destroy",),
|
||||
0x80B24C14:("func_80B24C14",),
|
||||
0x80B24CB4:("func_80B24CB4",),
|
||||
0x80B24E14:("func_80B24E14",),
|
||||
0x80B24F08:("func_80B24F08",),
|
||||
0x80B251EC:("func_80B251EC",),
|
||||
0x80B252F8:("func_80B252F8",),
|
||||
0x80B2538C:("func_80B2538C",),
|
||||
0x80B25448:("func_80B25448",),
|
||||
0x80B25490:("func_80B25490",),
|
||||
0x80B255AC:("func_80B255AC",),
|
||||
0x80B256BC:("func_80B256BC",),
|
||||
0x80B24C14:("EnRacedog_RaceStart",),
|
||||
0x80B24CB4:("EnRacedog_Race",),
|
||||
0x80B24E14:("EnRacedog_UpdateTextId",),
|
||||
0x80B24F08:("EnRacedog_UpdateSpeed",),
|
||||
0x80B251EC:("EnRacedog_CalculateFinalStretchTargetSpeed",),
|
||||
0x80B252F8:("EnRacedog_UpdateRaceVariables",),
|
||||
0x80B2538C:("EnRacedog_CheckForFinish",),
|
||||
0x80B25448:("EnRacedog_UpdateRunAnimationPlaySpeed",),
|
||||
0x80B25490:("EnRacedog_IsOverFinishLine",),
|
||||
0x80B255AC:("EnRacedog_SpawnFloorDustRing",),
|
||||
0x80B256BC:("EnRacedog_PlayWalkSfx",),
|
||||
0x80B25708:("EnRacedog_Update",),
|
||||
0x80B2583C:("func_80B2583C",),
|
||||
0x80B258D8:("func_80B258D8",),
|
||||
0x80B2583C:("EnRacedog_UpdateSelectionArrow",),
|
||||
0x80B258D8:("EnRacedog_DrawSelectionArrow",),
|
||||
0x80B25A74:("EnRacedog_OverrideLimbDraw",),
|
||||
0x80B25A90:("EnRacedog_PostLimbDraw",),
|
||||
0x80B25B14:("EnRacedog_Draw",),
|
||||
|
||||
Reference in New Issue
Block a user