1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +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

@ -1278,13 +1278,13 @@ void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 arg2, f
}
}
s32 D_8015BBA8[16];
Mtx D_8015BBA8;
Gfx* func_8002E830(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx, Gfx* gfx, Hilite** hilite) {
Gfx* lookAt;
LookAt* lookAt;
f32 correctedEyeX;
lookAt = Graph_Alloc(gfxCtx, 4 * sizeof(Gfx));
lookAt = Graph_Alloc(gfxCtx, sizeof(LookAt));
correctedEyeX = (eye->x == object->x) && (eye->z == object->z) ? eye->x + 0.001f : eye->x;
@ -1777,8 +1777,8 @@ void func_8002FA60(GlobalContext* globalCtx) {
Vec3f D_80116048 = { 0.0f, -0.05f, 0.0f };
Vec3f D_80116054 = { 0.0f, -0.025f, 0.0f };
Color_RGB8 D_80116060 = { 255, 255, 255 };
Color_RGB8 D_80116064 = { 100, 200, 0 };
Color_RGBA8 D_80116060 = { 255, 255, 255, 0 };
Color_RGBA8 D_80116064 = { 100, 200, 0, 0 };
#ifdef NON_MATCHING
// saved register, stack usage and minor ordering differences
@ -2754,7 +2754,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
osSyncPrintf("アクタークライアントは %d 個目です\n", overlayEntry->nbLoaded);
}
Lib_MemSet(actor, actorInit->instanceSize, 0);
Lib_MemSet((u8*)actor, actorInit->instanceSize, 0);
actor->overlayEntry = overlayEntry;
actor->id = actorInit->id;
actor->flags = actorInit->flags;
@ -2982,7 +2982,7 @@ Actor* func_80032AF0(GlobalContext* globalCtx, ActorContext* actorCtx, Actor** a
}
if (D_8015BBE8 == NULL) {
for (i; i < ARRAY_COUNT(D_801160A0); i++) {
for (; i < ARRAY_COUNT(D_801160A0); i++) {
func_800328D4(globalCtx, actorCtx, player, *entry);
entry++;
}
@ -3062,9 +3062,9 @@ void func_80032E24(struct_80032E24* arg0, s32 arg1, GlobalContext* globalCtx) {
sp20 = (arg1 * sizeof(*arg0->unk_04)) + sizeof(*arg0->unk_04);
arg0->unk_04 = ZeldaArena_MallocDebug(sp20, "../z_actor.c", 7546);
if (arg0->unk_04 != NULL) {
Lib_MemSet(arg0->unk_00, sp28, 0);
Lib_MemSet(arg0->unk_0C, sp24, 0);
Lib_MemSet(arg0->unk_04, sp20, 0);
Lib_MemSet((u8*)arg0->unk_00, sp28, 0);
Lib_MemSet((u8*)arg0->unk_0C, sp24, 0);
Lib_MemSet((u8*)arg0->unk_04, sp20, 0);
arg0->unk_10 = 1;
return;
}
@ -3099,7 +3099,7 @@ void func_80032F54(struct_80032E24* arg0, s32 arg1, s32 arg2, s32 arg3, u32 arg4
arg0->unk_08++;
}
if (arg0->unk_08 >= arg4) {
if ((u32)arg0->unk_08 >= arg4) {
arg0->unk_08 = arg0->unk_10 - 1;
arg0->unk_10 = -1;
}
@ -3964,8 +3964,8 @@ s32 func_800354B4(GlobalContext* globalCtx, Actor* actor, f32 range, s16 arg3, s
}
void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3) {
Color_RGB8 color1;
Color_RGB8 color2;
Color_RGBA8 color1;
Color_RGBA8 color2;
color1.r = 200;
color1.g = 160;
@ -3975,6 +3975,7 @@ void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* ar
color2.g = 90;
color2.b = 50;
//! @bug color1 and color2 alpha components not set before being passed on
EffectSsKiraKira_SpawnSmall(globalCtx, arg1, arg2, arg3, &color1, &color2);
}