1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-14 20:05:02 +00:00

Fix most compiler warnings in the boot and code segments (#674)

* Less warnings in boot & code segments

* few more warnings gone

* Ran formatter

* z_view warning gone

* -> 1

* f31 -> 31

* Remove function casts

* Few more small improvements

* Separate declaration and assignment in func_80091738 and Item_Give

Co-authored-by: Thar0 <maximilianc64@gmail.com>
This commit is contained in:
Tharo 2021-02-14 00:49:40 +00:00 committed by GitHub
parent d615ec4f31
commit f9d96d9f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
208 changed files with 1702 additions and 1846 deletions

View file

@ -161,8 +161,13 @@ Gfx sWipeSyncDList[] = {
gsSPEndDisplayList(),
};
void TransitionWipe_Start(TransitionWipe* this) {
#define THIS ((TransitionWipe*)thisx)
void TransitionWipe_Start(void* thisx) {
TransitionWipe* this = THIS;
this->isDone = 0;
if (this->direction) {
this->texY = 0x14D;
} else {
@ -173,15 +178,18 @@ void TransitionWipe_Start(TransitionWipe* this) {
guLookAt(&this->lookAt, 0.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
}
TransitionWipe* TransitionWipe_Init(TransitionWipe* this) {
void* TransitionWipe_Init(void* thisx) {
TransitionWipe* this = THIS;
bzero(this, sizeof(*this));
return this;
}
void TransitionWipe_Destroy(TransitionWipe* this) {
void TransitionWipe_Destroy(void* thisx) {
}
void TransitionWipe_Update(TransitionWipe* this, s32 updateRate) {
void TransitionWipe_Update(void* thisx, s32 updateRate) {
TransitionWipe* this = THIS;
u8 unk1419;
if (this->direction != 0) {
@ -201,13 +209,15 @@ void TransitionWipe_Update(TransitionWipe* this, s32 updateRate) {
}
}
void TransitionWipe_Draw(TransitionWipe* this, Gfx** gfxP) {
void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
Gfx* gfx = *gfxP;
Mtx* modelView;
char pad[0x14];
TransitionWipe* this = THIS;
s32 pad[4];
Gfx* tex;
modelView = this->modelView[this->frame];
this->frame ^= 1;
guScale(&modelView[0], 0.56f, 0.56f, 1.0f);
guRotate(&modelView[1], 0.0f, 0.0f, 0.0f, 1.0f);
@ -227,11 +237,15 @@ void TransitionWipe_Draw(TransitionWipe* this, Gfx** gfxP) {
*gfxP = gfx;
}
s32 TransitionWipe_IsDone(TransitionWipe* this) {
s32 TransitionWipe_IsDone(void* thisx) {
TransitionWipe* this = THIS;
return this->isDone;
}
void TransitionWipe_SetType(TransitionWipe* this, s32 type) {
void TransitionWipe_SetType(void* thisx, s32 type) {
TransitionWipe* this = THIS;
if (type == 1) {
this->direction = 1;
} else {
@ -245,10 +259,14 @@ void TransitionWipe_SetType(TransitionWipe* this, s32 type) {
}
}
void TransitionWipe_SetColor(TransitionWipe* this, u32 color) {
void TransitionWipe_SetColor(void* thisx, u32 color) {
TransitionWipe* this = THIS;
this->color.rgba = color;
}
void TransitionWipe_SetEnvColor(TransitionWipe* this, u32 color) {
void TransitionWipe_SetEnvColor(void* thisx, u32 color) {
TransitionWipe* this = THIS;
this->envColor.rgba = color;
}