mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-07 08:24:55 +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
|
@ -1293,7 +1293,6 @@ s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
|||
*/
|
||||
s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
|
||||
if (!(collider->shape <= COLSHAPE_QUAD)) {
|
||||
__assert("pcl_obj->data_type <= CL_DATA_LBL_SWRD", "../z_collision_check.c", 3153);
|
||||
}
|
||||
|
@ -1367,7 +1366,6 @@ s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChk
|
|||
*/
|
||||
s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
|
||||
if (func_800C0D28(globalCtx) == 1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -1591,9 +1589,8 @@ void CollisionCheck_RedBloodUnused(GlobalContext* globalCtx, Collider* collider,
|
|||
* Plays sound effects and displays hitmarks for solid-type AC colliders (METAL, WOOD, HARD, and TREE)
|
||||
*/
|
||||
void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Collider* collider, Vec3f* hitPos) {
|
||||
s32 flags;
|
||||
s32 flags = info->toucherFlags & TOUCH_SFX_NONE;
|
||||
|
||||
flags = info->toucherFlags & TOUCH_SFX_NONE;
|
||||
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
|
@ -1715,7 +1712,6 @@ void CollisionCheck_SetBounce(Collider* at, Collider* ac) {
|
|||
*/
|
||||
s32 CollisionCheck_SetATvsAC(GlobalContext* globalCtx, Collider* at, ColliderInfo* atInfo, Vec3f* atPos, Collider* ac,
|
||||
ColliderInfo* acInfo, Vec3f* acPos, Vec3f* hitPos) {
|
||||
|
||||
if (ac->acFlags & AC_HARD && at->actor != NULL && ac->actor != NULL) {
|
||||
CollisionCheck_SetBounce(at, ac);
|
||||
}
|
||||
|
@ -2477,10 +2473,12 @@ void CollisionCheck_AC_QuadVsQuad(GlobalContext* globalCtx, CollisionCheckContex
|
|||
if (CollisionCheck_NoSharedFlags(&at->info, &ac->info) == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
Math3D_TriNorm(&D_8015E5A8[0], &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
|
||||
Math3D_TriNorm(&D_8015E5A8[1], &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
|
||||
Math3D_TriNorm(&D_8015E530[0], &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
|
||||
Math3D_TriNorm(&D_8015E530[1], &ac->dim.quad[2], &ac->dim.quad[1], &ac->dim.quad[0]);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (Math3D_TriVsTriIntersect(&D_8015E5A8[j], &D_8015E530[i], &D_8015E598) == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue