mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 11:24:40 +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:
parent
d615ec4f31
commit
f9d96d9f73
208 changed files with 1702 additions and 1846 deletions
|
@ -21,7 +21,7 @@ void func_800434B8(DynaPolyActor* dynaActor) {
|
|||
}
|
||||
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorBgId) {
|
||||
DynaPolyActor* dynaActor = (DynaPolyActor*)DynaPoly_GetActor(colCtx, floorBgId);
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434B8(dynaActor);
|
||||
|
@ -33,7 +33,7 @@ void func_800434F8(DynaPolyActor* dynaActor) {
|
|||
}
|
||||
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorBgId) {
|
||||
DynaPolyActor* dynaActor = (DynaPolyActor*)DynaPoly_GetActor(colCtx, floorBgId);
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
|
||||
if (dynaActor != NULL) {
|
||||
func_800434F8(dynaActor);
|
||||
|
@ -76,41 +76,38 @@ s32 func_800435B4(DynaPolyActor* dynaActor) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_800435D8(GlobalContext* globalCtx, DynaPolyActor* actor, s16 arg2, s16 arg3, s16 arg4) {
|
||||
s32 func_800435D8(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4) {
|
||||
Vec3f posA;
|
||||
Vec3f posB;
|
||||
Vec3f posResult;
|
||||
f32 sin;
|
||||
f32 cos;
|
||||
f32 sin = Math_SinS(dynaActor->unk_158);
|
||||
f32 cos = Math_CosS(dynaActor->unk_158);
|
||||
s32 bgId;
|
||||
CollisionPoly* poly;
|
||||
f32 a2;
|
||||
f32 a3;
|
||||
f32 sign;
|
||||
|
||||
sin = Math_SinS(actor->unk_158);
|
||||
cos = Math_CosS(actor->unk_158);
|
||||
sign = (0.0f <= actor->unk_150) ? 1.0f : -1.0f;
|
||||
f32 sign = (0.0f <= dynaActor->unk_150) ? 1.0f : -1.0f;
|
||||
|
||||
a2 = (f32)arg2 - 0.1f;
|
||||
posA.x = actor->actor.world.pos.x + (a2 * cos);
|
||||
posA.y = actor->actor.world.pos.y + arg4;
|
||||
posA.z = actor->actor.world.pos.z - (a2 * sin);
|
||||
posA.x = dynaActor->actor.world.pos.x + (a2 * cos);
|
||||
posA.y = dynaActor->actor.world.pos.y + arg4;
|
||||
posA.z = dynaActor->actor.world.pos.z - (a2 * sin);
|
||||
|
||||
a3 = (f32)arg3 - 0.1f;
|
||||
posB.x = sign * a3 * sin + posA.x;
|
||||
posB.y = posA.y;
|
||||
posB.z = sign * a3 * cos + posA.z;
|
||||
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &posA, &posB, &posResult, &poly, true, false, false, true, &bgId,
|
||||
actor, 0.0f)) {
|
||||
&dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
posA.x = (actor->actor.world.pos.x * 2) - posA.x;
|
||||
posA.z = (actor->actor.world.pos.z * 2) - posA.z;
|
||||
posA.x = (dynaActor->actor.world.pos.x * 2) - posA.x;
|
||||
posA.z = (dynaActor->actor.world.pos.z * 2) - posA.z;
|
||||
posB.x = sign * a3 * sin + posA.x;
|
||||
posB.z = sign * a3 * cos + posA.z;
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &posA, &posB, &posResult, &poly, true, false, false, true, &bgId,
|
||||
actor, 0.0f)) {
|
||||
&dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue