1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-23 05:45:03 +00:00
oot/src/code/z_bgcheck.c

461 lines
14 KiB
C
Raw Normal View History

#include "global.h"
2020-03-17 04:31:30 +00:00
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038600.s")
2020-03-22 21:19:43 +00:00
void func_80038708(s16* puParm1, s16* puParm2, u16 uParm3) {
*puParm1 = *puParm2;
puParm1[1] = uParm3;
2020-03-17 04:31:30 +00:00
}
2020-03-22 21:19:43 +00:00
void func_8003871C(u16* puParm1) {
*puParm1 = 0xFFFF;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038728.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038780.s")
2020-03-22 21:19:43 +00:00
void func_800387FC(u32 uParm1, u32* puParm2) {
*puParm2 = 0;
puParm2[1] = 0;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003880C.s")
void func_80038870(s32 iParm1) {
2020-03-22 21:19:43 +00:00
*(u32*)(iParm1 + 4) = 0;
2020-03-17 04:31:30 +00:00
}
2020-03-22 21:19:43 +00:00
u32 func_80038878(s32 iParm1) {
u32 uVar1;
uVar1 = *(u32*)(iParm1 + 4) & 0xffff;
*(s32*)(iParm1 + 4) = *(u32*)(iParm1 + 4) + 1;
2020-03-22 21:19:43 +00:00
if (*(s32*)(iParm1 + 8) <= (s32)uVar1) {
2020-03-22 21:19:43 +00:00
return 0xffff;
}
return uVar1;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800388A8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800388E8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038924.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800389D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038A28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038B7C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038BE0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038C78.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038D48.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038E78.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038F20.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80038F60.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80039000.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800390A0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003937C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80039448.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003965C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800396F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003992C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80039A3C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80039AEC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003A3E0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003A5B8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003A7D8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003A95C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003AB28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003AC54.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003AD00.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003ADC8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003AEA8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003B04C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003B218.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003B3C8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003BB18.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003BF18.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003BF5C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003BFF4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C078.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/T_BGCheck_getBGDataInfo.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C55C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C614.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C890.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C8EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C940.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003C9A4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003CA0C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003CA64.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003CB30.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003CCA4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003CDD4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D464.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D52C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D594.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D600.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D7A0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003D7F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003DD28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003DD6C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003DFA0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E02C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E0B8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E0FC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E188.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E214.s")
2020-03-22 21:19:43 +00:00
void func_8003E398(u16* puParm1) {
*puParm1 = 0;
puParm1[1] = 0;
*(u32*)(puParm1 + 2) = 0;
*(u32*)(puParm1 + 4) = 0;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E3AC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E4DC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E530.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E568.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E5B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E688.s")
2020-03-22 21:19:43 +00:00
void func_8003E6C4(u16* puParm1) {
*puParm1 = 0;
func_8003E688();
2020-03-17 04:31:30 +00:00
}
2020-03-22 21:19:43 +00:00
void func_8003E6E4(u16* a0) {
2020-03-17 04:31:30 +00:00
*a0 = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E6EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E750.s")
void func_8003E804(s32 iParm1) {
2020-03-22 21:19:43 +00:00
func_8003E5B4(iParm1 + 0x14, iParm1 + 0x34);
2020-03-17 04:31:30 +00:00
}
2020-03-22 21:19:43 +00:00
void func_8003E82C(u32* a0) {
2020-03-17 04:31:30 +00:00
*a0 = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E834.s")
2020-03-22 21:19:43 +00:00
void func_8003E888(u32* a0) {
2020-03-17 04:31:30 +00:00
*a0 = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E890.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E8EC.s")
/*
NON-MATCHING
2020-03-22 21:19:43 +00:00
void func_8003E8EC(u32 uParm1, u32* iParm2) {
2020-03-17 04:31:30 +00:00
iParm2[0x06] = iParm2[0x0E];
iParm2[0x05] = iParm2[0x0D];
iParm2[0x07] = iParm2[0x0F];
iParm2[0x08] = iParm2[0x10];
iParm2[0x0A] = iParm2[0x12];
iParm2[0x09] = iParm2[0x11];
iParm2[0x0B] = iParm2[0x13];
iParm2[0x0C] = iParm2[0x14];
2020-03-22 21:19:43 +00:00
//s32 i;
2020-03-22 21:19:43 +00:00
//for (i = 0; i < 4; i++) {
2020-03-17 04:31:30 +00:00
//iParm2[0x06 + (i * 2)] = iParm2[0x0E + (i * 2)];
//iParm2[0x07 + (i * 2)] = iParm2[0x0D + (i * 2)];
//}
}
*/
u32 func_8003E934(s32 iParm1) {
2020-03-22 21:19:43 +00:00
if (!((-1 < iParm1) && (iParm1 < 0x32))) {
return 0;
}
2020-03-17 04:31:30 +00:00
2020-03-22 21:19:43 +00:00
return 1;
2020-03-17 04:31:30 +00:00
}
2020-03-22 21:19:43 +00:00
void func_8003E954(u32 uParm1, u8* puParm2) {
*puParm2 = 1;
func_8003E82C(puParm2 + 0x13f0);
func_8003E888(puParm2 + 0x13f4);
func_800387FC(uParm1, puParm2 + 0x13f8);
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003E9A0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003EA74.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003EB84.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003ECA8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003ED58.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003EE6C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003EE80.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003F8EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003F984.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003FB64.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003FBF4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8003FDDC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80040284.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800409A8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80040BE4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80040E40.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80040FA4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041128.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041240.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800413F8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041510.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041648.s")
typedef struct {
/* 0x00 */ char unk_00[0x10];
/* 0x10 */ void* unk_10;
/* 0x14 */ char unk_[0x04];
/* 0x18 */ void* unk_18;
/* 0x1C */ void* unk_1C;
/* 0x20 */ void* unk_20;
/* 0x24 */ char unk_24[4];
/* 0x28 */ void* unk_28;
} Struct800417A0; // size = 0x32
// called by func_800418D0 with actorMesh->unk_08
void func_800417A0(Struct800417A0* arg0) {
arg0->unk_10 = SEGMENTED_TO_VIRTUAL(arg0->unk_10);
arg0->unk_18 = SEGMENTED_TO_VIRTUAL(arg0->unk_18);
arg0->unk_1C = SEGMENTED_TO_VIRTUAL(arg0->unk_1C);
arg0->unk_20 = SEGMENTED_TO_VIRTUAL(arg0->unk_20);
arg0->unk_28 = SEGMENTED_TO_VIRTUAL(arg0->unk_28);
}
2020-03-17 04:31:30 +00:00
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041880.s")
void func_800418D0(CollisionContext* colCtx, GlobalContext* globalCtx) {
ActorMesh* actorMesh;
DynaCollisionContext* dynaColCtx;
s32 i;
u16 flag;
dynaColCtx = &colCtx->dyna;
for (i = 0; i < 50; i++) {
flag = dynaColCtx->flags[i];
if ((flag & 1) && !(flag & 2)) {
actorMesh = &dynaColCtx->actorMeshArr[i];
Actor_SetObjectDependency(globalCtx, actorMesh->actor);
func_800417A0(actorMesh->unk_08);
}
}
}
2020-03-17 04:31:30 +00:00
#ifdef NON_MATCHING
void func_80041978(s32 iParm1, s32 iParm2) {
2020-03-22 21:19:43 +00:00
u8* puVar1;
puVar1 = *(u8**)(iParm1 + 8);
if (puVar1 < puVar1 + iParm2) {
*puVar1 = 0;
while (puVar1++ < (u8*)(*(s32*)(iParm1 + 8) + iParm2)) {
2020-03-22 21:19:43 +00:00
*puVar1 = 0;
}
2020-03-17 04:31:30 +00:00
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041978.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800419B0.s")
decompile z_camera (#398) * cleanup * name camera action functions * decompile a few small functions, name a few Camera struct members * decompile camera data, decompile a few camera functions * Split ASM for code_800BB0A0 * removing code_800BB0A0.s * PR Requests, Camera WIP * remove #define NON_MATCHING from db_camera * rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c * camera wip * rename some struct memebers, some decomp wip * pr updates * camera wip * name some fields in Camera Struct, being making sense of Camera_Update * Camera WIP * wip * wip * add z64camera.h header, begin creating CameraSetting macros * wip * wip * wip * wip * migrate camera bss to c * match a couple functions in db_camera * match some small db_camera functions * wip * migrate db_camera rodata, match a few functions * remote db_camera.rodata.s * match some of db_camera * identify types of some unknown data pieces * some small wip * Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs * add naming for a few more Camera struct members * wip * match func_80043F94 * Match Camera_Jump1 * document some of Camera_Jump1 * wip * match Camera_Jump3 * Match Camera_Update, FeelsAmazing * wip * wip * match Camera_SetParam * minor cleanup * wip * wip * match Camera_KeepOn0 * some documentation, modify some matching functions to match style of others. * match Camera_Demo1 * match camera_demo9 * document Camera_Demo1 and Camera_Demo9 * wip * Match camera_battle4 * match camera_unique2 * Match Camera_Unique3 * match camera_special6 * match Camera_Special5 * wip * document camera_special6 * naming updates * match camera_Unique1 * match Camera_Unique0 * wip * Match Camera_CalcUpFromPitchYawRoll * match func_80045508 * document Camera_Battle4 * document several camera functions, move camera data to separate file * rename phi/theta to pitch/yaw * wip * uniq9 wip * Camera_Unqiue9 OK * document Camera_Unique9 * name unk_160 in camera struct * wip * wip * minor updates * fix conflicts * wip * wip * Olib updates * wip * wip * rename most Math3D functions, few matches, documentation * wip * document most of math3d * wip * wip * wip * pr updates * Match Camera_Fixed4 * match func_80058E8C * pr updates * add missing comment block finalizer * Merge math3dupdates * match Camera_ChangeSetting * Match Camera_ChangeMode * match func_80058148 * Match Camera_Special9 * decompile the rest of camera data * match Camera_Demo5 * name a few camera functions in z_play * match func_80046CB4, some work on other fucntions * wip * impove some non matchings * fix function rename * match func_800588B4 * match Camera_Subj4 * wip * Camera_Demo3 matching, Camera_Battle1 big progress * Camera_Normal2 OK * wip * match Camera_Parallel1 * normalize some things across functions * match Camera_Normal1 * Match Camera_Normal3 * some cleanup * more cleanup * more cleanup , match Camera_CalcDefaultPitch * data formatting * Match Camera_Jump2 * document Camera_Jump2 * Match Camera_KeepOn3 * document some of Camera_KeepOn3 * improve some non_matchings * match func_80045C74 and func_800460A8 * code cleanup, documentation * match Camera_KeepOn1 * Match Camera_Subj3 * Match Camera_Battle1 * remove non_matching from func_80044adc and func_80046e20 * name several members of Battle1 * more documentation on Battle1 * cleanup * renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector * reorganize update structs, remove final references to params, remove CameraParams union * implement camera enums into player * Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player * remove non-global camera variables from variables.h * clean up some variable declarations * finish pr comment updates * fix some warnings * data formatting * finish commenting on data * delete unused asm * remove asm Co-authored-by: fig <fig02srl@gmail.com>
2020-12-06 22:39:47 +00:00
s32 func_80041A28(CollisionContext* a0, CollisionPoly* a1, u32 a2) {
2020-03-22 21:19:43 +00:00
u32 uVar1;
uVar1 = func_800419B0(a0, a1, a2, 0);
return uVar1 & 0xff;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041A4C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041B24.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041B80.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041C10.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041C98.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041D28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041D4C.s")
2020-03-22 21:19:43 +00:00
u32 func_80041D94(u32 a0, u32 a1, u32 a2) {
u32 uVar1;
uVar1 = func_800419B0(a0, a1, a2, 0);
return uVar1 >> 0x15 & 0x1f;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041DB8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041DE4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041E18.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041E4C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041EC8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041EEC.s")
2020-03-22 21:19:43 +00:00
u32 func_80041F10(u32 a0, u32 a1, u32 a2) {
u32 uVar1;
uVar1 = func_800419B0(a0, a1, a2, 1);
return uVar1 & 0xf;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041F34.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041F7C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041FA0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80041FC4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8004200C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042048.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042084.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800420E4.s")
s32 func_80042108(CollisionContext* a0, CollisionPoly* a1, u32 a2) {
2020-03-22 21:19:43 +00:00
u32 result;
s32 var1;
2020-03-17 04:31:30 +00:00
2020-03-22 21:19:43 +00:00
var1 = func_800419B0(a0, a1, a2, 1);
2020-03-17 04:31:30 +00:00
2020-03-22 21:19:43 +00:00
if (var1 << 4 < 0) {
result = 1;
} else {
result = 0;
}
2020-03-17 04:31:30 +00:00
2020-03-22 21:19:43 +00:00
return result;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8004213C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042244.s")
decompile z_camera (#398) * cleanup * name camera action functions * decompile a few small functions, name a few Camera struct members * decompile camera data, decompile a few camera functions * Split ASM for code_800BB0A0 * removing code_800BB0A0.s * PR Requests, Camera WIP * remove #define NON_MATCHING from db_camera * rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c * camera wip * rename some struct memebers, some decomp wip * pr updates * camera wip * name some fields in Camera Struct, being making sense of Camera_Update * Camera WIP * wip * wip * add z64camera.h header, begin creating CameraSetting macros * wip * wip * wip * wip * migrate camera bss to c * match a couple functions in db_camera * match some small db_camera functions * wip * migrate db_camera rodata, match a few functions * remote db_camera.rodata.s * match some of db_camera * identify types of some unknown data pieces * some small wip * Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs * add naming for a few more Camera struct members * wip * match func_80043F94 * Match Camera_Jump1 * document some of Camera_Jump1 * wip * match Camera_Jump3 * Match Camera_Update, FeelsAmazing * wip * wip * match Camera_SetParam * minor cleanup * wip * wip * match Camera_KeepOn0 * some documentation, modify some matching functions to match style of others. * match Camera_Demo1 * match camera_demo9 * document Camera_Demo1 and Camera_Demo9 * wip * Match camera_battle4 * match camera_unique2 * Match Camera_Unique3 * match camera_special6 * match Camera_Special5 * wip * document camera_special6 * naming updates * match camera_Unique1 * match Camera_Unique0 * wip * Match Camera_CalcUpFromPitchYawRoll * match func_80045508 * document Camera_Battle4 * document several camera functions, move camera data to separate file * rename phi/theta to pitch/yaw * wip * uniq9 wip * Camera_Unqiue9 OK * document Camera_Unique9 * name unk_160 in camera struct * wip * wip * minor updates * fix conflicts * wip * wip * Olib updates * wip * wip * rename most Math3D functions, few matches, documentation * wip * document most of math3d * wip * wip * wip * pr updates * Match Camera_Fixed4 * match func_80058E8C * pr updates * add missing comment block finalizer * Merge math3dupdates * match Camera_ChangeSetting * Match Camera_ChangeMode * match func_80058148 * Match Camera_Special9 * decompile the rest of camera data * match Camera_Demo5 * name a few camera functions in z_play * match func_80046CB4, some work on other fucntions * wip * impove some non matchings * fix function rename * match func_800588B4 * match Camera_Subj4 * wip * Camera_Demo3 matching, Camera_Battle1 big progress * Camera_Normal2 OK * wip * match Camera_Parallel1 * normalize some things across functions * match Camera_Normal1 * Match Camera_Normal3 * some cleanup * more cleanup * more cleanup , match Camera_CalcDefaultPitch * data formatting * Match Camera_Jump2 * document Camera_Jump2 * Match Camera_KeepOn3 * document some of Camera_KeepOn3 * improve some non_matchings * match func_80045C74 and func_800460A8 * code cleanup, documentation * match Camera_KeepOn1 * Match Camera_Subj3 * Match Camera_Battle1 * remove non_matching from func_80044adc and func_80046e20 * name several members of Battle1 * more documentation on Battle1 * cleanup * renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector * reorganize update structs, remove final references to params, remove CameraParams union * implement camera enums into player * Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player * remove non-global camera variables from variables.h * clean up some variable declarations * finish pr comment updates * fix some warnings * data formatting * finish commenting on data * delete unused asm * remove asm Co-authored-by: fig <fig02srl@gmail.com>
2020-12-06 22:39:47 +00:00
u32 func_80042538(CollisionContext* colCtx, WaterBox* arg1) {
Updated Texture Asset Handling (#478) * Auto stash before rebase of "upstream/master" * A large number of scenes have been decompiled. * Fixed makefile * Decompiled around 40 scenes. * Removed old file * Finished matching remaining scenes. * Removed old commented out spec lines * Decompiled a few object files. * Reorganized xmls a bit. Updated pu_box overlay to use proper symbol. * Updated texture and object file decomp * Fixed newline issue with ZAPD * Moved scenes/ into the assets/ folder * Fixed a few compile errors * Auto stash before rebase of "upstream/master" * A large number of scenes have been decompiled. * Fixed makefile * Decompiled around 40 scenes. * Removed old file * Finished matching remaining scenes. * Removed old commented out spec lines * Decompiled a few object files. * Reorganized xmls a bit. Updated pu_box overlay to use proper symbol. * Updated texture and object file decomp * Moved scenes/ into the assets/ folder * Fixed a few compile errors * Fixed merge issues. * Fixed makefile merge error * Fixed additional merge error * Fixed several more merge issues * Commented out gameplay_keep and sk2 extraction, since currently unused. * Reenabled gameplay_keep extraction since it's used in the spec * Fixed build error * Removed test struct * Fixed makefile error that would happen on fresh builds * Fixed merge issue * Removed relative paths * Multithreading on extraction, spec uses numbers, few changes to XMLs * Removed redundant code from the extract_assets script * object_sk2 and object_spot09_obj OK * object_spot11_obj OK * object_spot17_obj OK * Test: One of the gameplay_keep dlists given a proper symbol * Updated asset symbol names based on new naming scheme * XMLs use "Offset" instead of "Address" now * Fixed merge issues, updated ovl_Magic_Dark xml and gfx file * Updated to use latest build of ZAPD * Updated ZAPD again * Updated ZAP to remove assimp dependency * Jenkins Test: Added .gitkeep file * Updated ZAP once more * Updated png file name to comply with new naming scheme. * Fixed bad include Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
2020-12-26 11:39:52 +00:00
u32 properties = arg1->properties;
return properties & 0xFF;
2020-03-17 04:31:30 +00:00
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042548.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_8004259C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_800427B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042868.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042B2C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042C3C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042CB8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042EF8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/func_80042FC4.s")