-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompiles z_bg_dodoago.c #334
Conversation
@@ -22,7 +22,7 @@ typedef struct EnBom { | |||
|
|||
typedef enum { | |||
/* 0x00 */ BOMB_BODY, | |||
/* 0x01 */ BOMB_EXPLOSION, | |||
/* 0x01 */ BOMB_EXPLOSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes a little warning from the compiler
|
||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Dodoago/func_8087227C.s") | ||
if (this->dyna.actor.attachedA == NULL) { | ||
if (((s32)(this->colliders[1].base.maskA & 2) != 0) || ((this->colliders[2].base.maskA & 2) != 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These casts are required, otherwise a temp has to be introduced
* Removes data
} | ||
} else { | ||
D_80872824++; | ||
Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really looking for any changes here but this is interesting considering the function call is meaningless as is.
It was probably a if
condition, followed by something that was optimized out, or &&
'd with something that was always false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this was super weird 🤷♂️
Color_RGBA8_n D_8087259C = { 100, 100, 100, 0 }; | ||
Color_RGBA8_n D_808725A0 = { 40, 40, 40, 0 }; | ||
|
||
static Vec3f sVelocity = { 0.0f, -1.5f, 0.0f }; | ||
static Vec3f sAcceleration = { 0.0f, -0.2f, 0.0f }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these would make alot more sense as inline data imo. for the colors you can put them right in without a temp, and you can inline the static vectors
(dont commit my suggestion directly, cause this really belongs below where the actual function is lol)
Color_RGBA8_n D_8087259C = { 100, 100, 100, 0 }; | |
Color_RGBA8_n D_808725A0 = { 40, 40, 40, 0 }; | |
static Vec3f sVelocity = { 0.0f, -1.5f, 0.0f }; | |
static Vec3f sAcceleration = { 0.0f, -0.2f, 0.0f }; | |
void func_80871A08(Vec3f* vec, GlobalContext* globalCtx) { | |
Vec3f pos; | |
Color_RGBA8_n primColor = { 100, 100, 100, 0 }; | |
Color_RGBA8_n envColor = { 40, 40, 40, 0 }; | |
static Vec3f velocity = { 0.0f, -1.5f, 0.0f }; | |
static Vec3f acceleration = { 0.0f, -0.2f, 0.0f }; | |
s32 i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhmm this causes some mismatches in the function unfortunately... maybe I didn't got your suggestion right... could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont have to worry about it for now. ill go ahead and merge and take a look myself in a bit. Ill let you know if i figure it out
* Starts decompiling z_bg_dodoago.c * Removes data * * BgDodoago_SetupAction * * BgDodoago_Destroy * * func_80872288 * * BgDodoago_Draw * * func_80871A08 * * BgDodoago_Init * WIP * * func_80871CF4 * * func_80871CF4 * WIP * * BgDodoago_Update * Finishes z_bg_dodoago * Addresses PR comments * Addresses PR comments #2 * Removes Setup forward declared function * Addresses PR comments #3 Co-authored-by: i82orbom <i82orbom i82orbom@github>
No description provided.