1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-29 12:04:29 +00:00
oot/include/functions.h

2539 lines
143 KiB
C
Raw Normal View History

2020-03-17 04:31:30 +00:00
#ifndef _FUNCTIONS_H_
#define _FUNCTIONS_H_
2020-03-24 17:29:59 +00:00
#include "z64.h"
2020-03-17 04:31:30 +00:00
f32 fabsf(f32 f);
2020-03-17 04:31:30 +00:00
#pragma intrinsic(fabsf)
f32 sqrtf(f32 f);
2020-03-17 04:31:30 +00:00
#pragma intrinsic(sqrtf)
f64 sqrt(f64 d);
#pragma intrinsic(sqrt)
2020-03-17 04:31:30 +00:00
void cleararena(void);
void bootproc(void);
void Main_ThreadEntry(void* arg);
void Idle_ThreadEntry(void* arg);
void ViConfig_UpdateVi(u32 mode);
void ViConfig_UpdateBlack(void);
2020-03-17 04:31:30 +00:00
s32 DmaMgr_CompareName(const char* name1, const char* name2);
s32 DmaMgr_DMARomToRam(u32 rom, u32 ram, u32 size);
s32 DmaMgr_DmaCallback0(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction);
void DmaMgr_DmaCallback1(u32 ram, u32 rom, u32 size);
void DmaMgr_Error(DmaRequest* req, const char* file, const char* errorName, const char* errorDesc);
const char* DmaMgr_GetFileNameImpl(u32 vrom);
const char* DmaMgr_GetFileName(u32 vrom);
void DmaMgr_ProcessMsg(DmaRequest* req);
void DmaMgr_ThreadEntry(void* arg0);
s32 DmaMgr_SendRequestImpl(DmaRequest* req, u32 ram, u32 vrom, u32 size, u32 unk, OSMesgQueue* queue, OSMesg msg);
s32 DmaMgr_SendRequest0(u32 ram, u32 vrom, u32 size);
void DmaMgr_Init(void);
2020-03-22 21:50:11 +00:00
s32 DmaMgr_SendRequest2(DmaRequest* req, u32 ram, u32 vrom, u32 size, u32 unk5, OSMesgQueue* queue, OSMesg msg,
const char* file, s32 line);
2020-03-17 04:31:30 +00:00
s32 DmaMgr_SendRequest1(void* ram0, u32 vrom, u32 size, const char* file, s32 line);
void* Yaz0_FirstDMA(void);
2020-03-17 04:31:30 +00:00
void* Yaz0_NextDMA(void* curSrcPos);
void Yaz0_DecompressImpl(Yaz0Header* hdr, u8* dst);
void Yaz0_Decompress(u32 romStart, void* dst, u32 size);
void Locale_Init(void);
void Locale_ResetRegion(void);
u32 func_80001F48(void);
u32 func_80001F8C(void);
u32 Locale_IsRegionNative(void);
2020-03-17 04:31:30 +00:00
void __assert(const char* exp, const char* file, s32 line);
void isPrintfInit(void);
2020-03-17 04:31:30 +00:00
void osSyncPrintfUnused(const char* fmt, ...);
void osSyncPrintf(const char* fmt, ...);
void rmonPrintf(const char* fmt, ...);
void* is_proutSyncPrintf(void* arg, const char* str, u32 count);
2020-03-17 04:31:30 +00:00
void func_80002384(const char* exp, const char* file, u32 line);
OSPiHandle* osDriveRomInit(void);
void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
2020-03-22 21:50:11 +00:00
void StackCheck_Init(StackEntry* entry, void* stackTop, void* stackBottom, u32 initValue, s32 minSpace,
const char* name);
2020-03-17 04:31:30 +00:00
void StackCheck_Cleanup(StackEntry* entry);
StackStatus StackCheck_GetState(StackEntry* entry);
u32 StackCheck_CheckAll(void);
2020-03-17 04:31:30 +00:00
u32 StackCheck_Check(StackEntry* entry);
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min,
const char* maxName, f32 max);
s32 LogUtils_CheckIntRange(const char* exp, s32 line, const char* valueName, s32 value, const char* minName, s32 min,
const char* maxName, s32 max);
2020-03-17 04:31:30 +00:00
void LogUtils_LogHexDump(void* ptr, s32 size0);
2020-03-22 21:50:11 +00:00
void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, s32 line);
2020-03-17 04:31:30 +00:00
void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, s32 line);
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, s32 line);
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s32 line);
2020-03-17 04:31:30 +00:00
void LogUtils_LogThreadId(const char* name, s32 line);
void LogUtils_HungupThread(const char* name, s32 line);
void LogUtils_ResetHungup(void);
void* proutSprintf(void* dst, const char* fmt, u32 size);
2020-03-17 04:31:30 +00:00
s32 vsprintf(char* dst, const char* fmt, va_list args);
s32 sprintf(char* dst, const char* fmt, ...);
void __osPiCreateAccessQueue(void);
void __osPiGetAccess(void);
void __osPiRelAccess(void);
s32 osSendMesg(OSMesgQueue* mq, OSMesg mesg, s32 flag);
void osStopThread(OSThread* thread);
void osViExtendVStart(u32 arg0);
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag);
void __createSpeedParam(void);
void __osInitialize_common(void);
void __osInitialize_autodetect(void);
2020-03-17 04:31:30 +00:00
void __osExceptionPreamble();
// ? __osException(?);
void __osEnqueueAndYield(OSThread**);
void __osEnqueueThread(OSThread**, OSThread*);
2020-03-22 21:50:11 +00:00
OSThread* __osPopThread(OSThread**);
2020-03-17 04:31:30 +00:00
// ? __osNop(?);
void __osDispatchThread();
void __osCleanupThread(void);
2020-03-22 21:50:11 +00:00
void __osDequeueThread(OSThread** queue, OSThread* thread);
void osDestroyThread(OSThread* thread);
void bzero(void* __s, u32 __n);
2020-03-17 04:31:30 +00:00
void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri);
void __osSetSR(u32);
u32 __osGetSR();
2020-03-22 21:50:11 +00:00
void osWritebackDCache(void* vaddr, s32 nbytes);
void* osViGetNextFramebuffer(void);
2020-03-22 21:50:11 +00:00
void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQ, OSMesg* cmdBuf, s32 cmdMsgCnt);
2020-03-17 04:31:30 +00:00
void __osDevMgrMain(void* arg);
s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size);
2020-03-17 04:31:30 +00:00
u32 osVirtualToPhysical(void* vaddr);
void osViBlack(u8 active);
2020-03-22 21:50:11 +00:00
s32 __osSiRawReadIo(void* a0, u32* a1);
2020-03-17 04:31:30 +00:00
OSId osGetThreadId(OSThread* thread);
OSIntMask osSetIntMask(OSIntMask);
2020-03-22 21:50:11 +00:00
void osViSetMode(OSViMode* mode);
u32 __osProbeTLB(void*);
2020-03-17 04:31:30 +00:00
u32 osGetMemSize(void);
2020-03-22 21:50:11 +00:00
void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg);
s32 _Printf(PrintCallback, void* arg, const char* fmt, va_list ap);
2020-03-17 04:31:30 +00:00
void osUnmapTLBAll(void);
s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
const char* strchr(const char* str, s32 ch);
u32 strlen(const char* str);
void* memcpy(void* dst, const void* src, u32 size);
2020-03-17 04:31:30 +00:00
void osInvalICache(void* vaddr, s32 nbytes);
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
void osInvalDCache(void* vaddr, s32 nbytes);
s32 __osSiDeviceBusy(void);
s32 osJamMesg(OSMesgQueue* mq, OSMesg mesg, s32 flag);
2020-03-17 04:31:30 +00:00
void osSetThreadPri(OSThread* thread, OSPri pri);
OSPri osGetThreadPri(OSThread* thread);
2020-03-22 21:50:11 +00:00
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
void osViSwapBuffer(void* vaddr);
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
u32 bcmp(void* __sl, void* __s2, u32 __n);
2020-03-17 04:31:30 +00:00
OSTime osGetTime(void);
void __osTimerServicesInit(void);
void __osTimerInterrupt(void);
void __osSetTimerIntr(OSTime time);
OSTime __osInsertTimer(OSTimer* timer);
2020-03-17 04:31:30 +00:00
u32 osGetCount(void);
void __osSetGlobalIntMask(u32 mask);
void __osSetCompare(u32);
2020-03-22 21:50:11 +00:00
void* bcopy(void* __src, void* __dest, u32 __n);
2020-03-17 04:31:30 +00:00
void __osResetGlobalIntMask(u32 mask);
s32 __osDisableInt(void);
void __osRestoreInt(s32);
void __osViInit(void);
void __osViSwapContext(void);
OSMesgQueue* osPiGetCmdQueue(void);
2020-03-17 04:31:30 +00:00
s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
void osViSetSpecialFeatures(u32 func);
OSPiHandle* osCartRomInit(void);
2020-03-17 04:31:30 +00:00
void __osSetFpcCsr(u32);
u32 __osGetFpcCsr();
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
void osMapTLBRdb(void);
void osYieldThread(void);
2020-03-17 04:31:30 +00:00
u32 __osGetCause();
2020-03-22 21:50:11 +00:00
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
void _Litob(_Pft* args, u8 type);
ldiv_t ldiv(s32 num, s32 denom);
lldiv_t lldiv(s64 num, s64 denom);
void _Ldtob(_Pft* args, u8 type);
s32 __osSiRawWriteIo(void* a0, u32 a1);
2020-03-17 04:31:30 +00:00
void osCreateViManager(OSPri pri);
2020-03-22 21:50:11 +00:00
void viMgrMain(void* vargs);
OSViContext* __osViGetCurrentContext(void);
2020-03-17 04:31:30 +00:00
void osStartThread(OSThread* thread);
void osViSetYScale(f32 scale);
2020-03-17 04:31:30 +00:00
void osViSetXScale(f32 value);
void __osSetHWIntrRoutine(s32 idx, OSMesgQueue* queue, OSMesg msg);
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
void __osSetWatchLo(u32);
Decompiled ovl_Shot_Sun (#236) * match ShotSun_Init * match ShotSun_Destroy * match func_80BADDCC * break up unk_19C to add spawnTimer * ShotSun_Update * func_80BADE74 * work on func_80BAE05C * make func_80BAE05C closer * use proper macros for osSyncPrintf * format if statement better and add temp player pointer func_80BAE05C * Reorder spawnPos to match stack args later * match func_80BAE05C * almost match func_80BADF0C * Remove temporary and add parenthesis * change part of comment and move last unk_1A4 assignment to be similar to decompiler * Change do while(false) to if (1) * func_80BADF0C * change comment * update spec * fix vt macro * cleanup and name * remove asm * remove data * remove extern Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> * remove & for function pointers * rename and retype D_02007020 * format * remove tiny whitespace * reorder if statement * finish renaming * replace cast with bitwise operation * move globally used functions to functions.h * reorder description * move headers for EnItem00 and EnAObj to z64actor.h * retype Item_DropCollectible and Item_DropCollectible2 to return EnItem00* * rename ShotSun_StartFairyCountdown to ShotSun_TriggerFairy * rename ShotSun_FairyCountdown to ShotSun_SpawnFairy * add unk_E3EC field to MessageContext * rename to ShotSun_UpdateHyliaSun for now * remove != 0 on flag check * remove unsigned suffix and use enum constant for Item_DropCollectible call * add unk_95C field to Player * add ub comment * retype unk_1A4 and remove explicit struct padding * Update src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-07-12 23:03:38 +00:00
EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 params);
2020-03-17 04:31:30 +00:00
void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3f* spawnPos, s16 params);
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
void EffectBlure_AddSpace(EffectBlure* this);
void EffectBlure_Init1(void* thisx, void* initParamsx);
void EffectBlure_Init2(void* thisx, void* initParamsx);
void EffectBlure_Destroy(void* thisx);
s32 EffectBlure_Update(void* thisx);
void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx);
void EffectShieldParticle_Init(void* thisx, void* initParamsx);
void EffectShieldParticle_Destroy(void* thisx);
s32 EffectShieldParticle_Update(void* thisx);
void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx);
void EffectSpark_Init(void* thisx, void* initParamsx);
void EffectSpark_Destroy(void* thisx);
s32 EffectSpark_Update(void* thisx);
void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx);
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
void func_80026400(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
void func_80026608(GlobalContext* globalCtx);
void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
void func_80026860(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
void func_80026A6C(GlobalContext* globalCtx);
GlobalContext* Effect_GetGlobalCtx(void);
void* Effect_GetByIndex(s32 index);
void Effect_InitContext(GlobalContext* globalCtx);
void Effect_Add(GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
void Effect_DrawAll(GraphicsContext* gfxCtx);
void Effect_UpdateAll(GlobalContext* globalCtx);
void Effect_Delete(GlobalContext* globalCtx, s32 index);
void Effect_DeleteAll(GlobalContext* globalCtx);
void EffectSs_InitInfo(GlobalContext* globalCtx, s32 tableSize);
void EffectSs_ClearAll(GlobalContext* globalCtx);
void EffectSs_Delete(EffectSs* effectSs);
void EffectSs_Reset(EffectSs* effectSs);
void EffectSs_Insert(GlobalContext* globalCtx, EffectSs* effectSs);
void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* initParams);
void EffectSs_UpdateAll(GlobalContext* globalCtx);
void EffectSs_DrawAll(GlobalContext* globalCtx);
s16 func_80027DD4(s16 arg0, s16 arg1, s32 arg2);
s16 func_80027E34(s16 arg0, s16 arg1, f32 arg2);
u8 func_80027E84(u8 arg0, u8 arg1, f32 arg2);
void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* texture);
void EffectSsDust_Spawn(GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life,
u8 updateMode);
void func_8002829C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_80028304(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_8002836C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800283D4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_8002843C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
void func_800284A4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_80028510(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void func_8002857C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void func_800285EC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void func_8002865C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
void func_800286CC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
void func_8002873C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life);
void func_800287AC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life);
void func_8002881C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor);
void func_80028858(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor);
void func_80028990(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
void func_80028A54(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
void EffectSsKiraKira_SpawnFocused(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
void EffectSsBomb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsBomb2_SpawnFade(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep);
void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 sclaeStepDecay, s16 life);
void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep, s16 life);
void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life);
void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsGSpk_SpawnAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void EffectSsGSpk_SpawnNoAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
void EffectSsGSpk_SpawnFuse(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
void EffectSsGSpk_SpawnRandColor(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
s16 scale, s16 scaleStep);
void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor);
void EffectSsDFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 alpha, s16 fadeDelay, s32 life);
void EffectSsDFire_SpawnFixedScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha,
s16 fadeDelay);
void EffectSsBubble_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale,
f32 scale);
void EffectSsGRipple_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
void EffectSsGSplash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
s16 type, s16 scale);
void EffectSsGMagma_Spawn(GlobalContext* globalCtx, Vec3f* pos);
void EffectSsGFire_Spawn(GlobalContext* globalCtx, Vec3f* pos);
void EffectSsLightning_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
s16 scale, s16 yaw, s16 life, s16 numBolts);
void EffectSsDtBubble_SpawnColorProfile(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 life, s16 colorProfile, s16 randXZ);
void EffectSsDtBubble_SpawnCustomColor(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
void EffectSsHahen_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
s16 objId, s16 life, Gfx* dList);
void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
void EffectSsStick_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 yaw);
void EffectSsSibuki_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay,
s16 direction, s16 scale);
void EffectSsSibuki_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos);
void EffectSsSibuki2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
void EffectSsGMagma2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
s16 updateRate, s16 drawMode, s16 scale);
void EffectSsStone1_Spawn(GlobalContext* globalCtx, Vec3f* pos, s32 arg2);
void EffectSsHitMark_Spawn(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
void EffectSsHitMark_SpawnFixedScale(GlobalContext* globalCtx, s32 type, Vec3f* pos);
void EffectSsHitMark_SpawnCustomScale(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
void EffectSsFhgFlash_SpawnLightBall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
u8 param);
void EffectSsFhgFlash_SpawnShock(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 scale, u8 param);
void EffectSsKFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused,
s16* linkDetected);
void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
s16 objId, Gfx* dList);
void EffectSsIcePiece_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 scale);
void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 primR, s16 primG, s16 primB,
s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
void EffectSsEnIce_SpawnFlyingVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* pos, s16 primR, s16 primG, s16 primB,
s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
void EffectSsEnIce_Spawn(GlobalContext* arg0, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
void EffectSsFireTail_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5,
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
f32 colorIntensity);
void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity);
void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 scale, s16 unk_12, s16 flags,
s16 bodyPart);
void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* vec, s16 scale, s16 arg4, s16 flags,
s16 bodyPart);
void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
void EffectSsFCircle_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 radius, s16 height);
void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
s32 arg14, s16 playSound);
void EffectSsDeadDd_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep,
s32 life);
void EffectSsDeadDd_SpawnRandYellow(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale,
s32 randIter, s32 life);
void EffectSsDeadDs_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 alpha, s32 life);
void EffectSsDeadDs_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha,
s32 life);
void EffectSsDeadSound_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId,
s16 lowerPriority, s16 repeatMode, s32 life);
void EffectSsDeadSound_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, u16 sfxId, s16 lowerPriority,
s16 repeatMode, s32 life);
void EffectSsIceSmoke_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
void FlagSet_Update(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale);
void ActorShadow_DrawCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawHorse(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
Vec3f* rightFootPos);
void func_8002BE04(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, f32* arg3);
2020-03-17 04:31:30 +00:00
void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx);
s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
void Flags_SetSwitch(GlobalContext* globalCtx, s32 flag);
void Flags_UnsetSwitch(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag);
void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag);
void Flags_UnsetUnknown(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetTreasure(GlobalContext* globalCtx, s32 flag);
void Flags_SetTreasure(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetClear(GlobalContext* globalCtx, s32 flag);
void Flags_SetClear(GlobalContext* globalCtx, s32 flag);
void Flags_UnsetClear(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetTempClear(GlobalContext* globalCtx, s32 flag);
void Flags_SetTempClear(GlobalContext* globalCtx, s32 flag);
void Flags_UnsetTempClear(GlobalContext* globalCtx, s32 flag);
s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag);
void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag);
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
u8 height);
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
s32 width, s32 height, s32 delay);
2020-03-17 04:31:30 +00:00
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
void Actor_Kill(Actor* actor);
void Actor_SetFocus(Actor* actor, f32 offset);
2020-03-17 04:31:30 +00:00
void Actor_SetScale(Actor* actor, f32 scale);
void Actor_SetObjectDependency(GlobalContext* globalCtx, Actor* actor);
Volvagia (ovl_Boss_Fd) and related actors (#352) * Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * Lots of functions matched. Some big ones are close. * Five left unmatched, one close. * Merged data and decompiled the giant function into something readable. Its branch structure has yet to be matched. * Three unmatched, one essentially matched, the rest matched. * More fixes. * Documented more of the structure and cleaned up a bit. * BossFd2, BgVbSima, and EnVbBall matched and documented * Also removed unneeded .s files * And need to name EnVbBall's functions * give this a shot * fix conflict * one more try * removing darkmeiro changes * and again * now OK from make clean * minor cleanup * One more matching function for BossFd * which means it doesn't need its .s * splitting * splitting * splitting * forgot some .s * fancy new names * fancy new names * trying again * sneaky .s files * sound effects and some hex to decimal conversions * Sound effects and static variable cleanup * format.sh and clean up static variables * sfx and formatting * ZAP and cleanup * small cleanup * cleanup and ZAP * ZAP * looking at the giant function again * looking at the giant function again * Only the big function left. * Those .s files aren't mine, officer * float literals might be fixed. regalloc still a nightmare * almost done with the big function * should make now * not much of a change * all functions match. rodata somehow doesn't. * forgot some things * lots of cleanup * and a little more * small error * large cleanup. Also BossFd has function names and inlined variable declarations * still more cleanup * the quest for 0.1f continues * forgot to put NON_MATCHING back in * Data structures fully documented. Still more cleanup. * DECR now works with BossFd2 * should match now * cleanup * small cleanup * cleanup and names * tiny thing * particles and headers and stuff * now with more enums * merge * test * end test * update * cleanup * object 2 * object 1 * doc object_fd2 * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6f874af4a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6f874af4a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * formatting * .s * merge actor * vertex arrays * a little more * formatting * merge opd * fixed damage check * cleanup * fixes * effect struct * review Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: fig02 <fig02srl@gmail.com>
2021-04-17 17:12:46 +00:00
s16 func_8002D7EC(Actor* actor);
2020-03-17 04:31:30 +00:00
void func_8002D868(Actor* actor);
void Actor_MoveForward(Actor* actor);
void func_8002D908(Actor* actor);
void func_8002D97C(Actor* actor);
void func_8002D9A4(Actor* actor, f32 arg1);
s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldYawTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
f32 Actor_WorldDistXYZToPoint(Actor* actor, Vec3f* refPoint);
s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
2020-03-17 04:31:30 +00:00
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2);
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
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
f32 Player_GetHeight(Player* player);
2020-03-17 04:31:30 +00:00
f32 func_8002DCE4(Player* player);
s32 func_8002DD6C(Player* player);
s32 func_8002DD78(Player* player);
s32 func_8002DDE4(GlobalContext* globalCtx);
s32 func_8002DDF4(GlobalContext* globalCtx);
void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB);
void func_8002DE74(GlobalContext* globalCtx, Player* player);
void Actor_MountHorse(GlobalContext* globalCtx, Player* player, Actor* horse);
2020-03-17 04:31:30 +00:00
s32 func_8002DEEC(Player* player);
void func_8002DF18(GlobalContext* globalCtx, Player* player);
s32 func_8002DF38(GlobalContext* globalCtx, Actor* actor, u8 csMode);
2020-03-17 04:31:30 +00:00
s32 func_8002DF54(GlobalContext* globalCtx, Actor* actor, u8 arg2);
void func_8002DF90(DynaPolyActor* dynaActor);
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
s32 Player_IsFacingActor(Actor* actor, s16 angle, GlobalContext* globalCtx);
s32 Actor_ActorBIsFacingActorA(Actor* actorA, Actor* actorB, s16 angle);
s32 Actor_IsFacingPlayer(Actor* actor, s16 angle);
s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 angle);
s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 angle);
s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s16 angle);
void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius,
f32 ceilingCheckHeight, s32 flags);
2020-03-17 04:31:30 +00:00
Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag);
void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag);
PosRot* Actor_GetFocus(PosRot* arg0, Actor* actor);
PosRot* Actor_GetWorld(PosRot* arg0, Actor* actor);
PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor);
2020-03-17 04:31:30 +00:00
s32 func_8002F0C8(Actor* actor, Player* player, s32 arg2);
u32 func_8002F194(Actor* actor, GlobalContext* globalCtx);
s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u32 arg4);
s32 func_8002F298(Actor* actor, GlobalContext* globalCtx, f32 arg2, u32 arg3);
s32 func_8002F2CC(Actor* actor, GlobalContext* globalCtx, f32 arg2);
s32 func_8002F2F4(Actor* actor, GlobalContext* globalCtx);
u32 func_8002F334(Actor* actor, GlobalContext* globalCtx);
s8 func_8002F368(GlobalContext* globalCtx);
void func_8002F374(GlobalContext* globalCtx, Actor* actor, s16* x, s16* y);
u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
s32 func_8002F434(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange);
void func_8002F554(Actor* actor, GlobalContext* globalCtx, s32 getItemId);
void func_8002F580(Actor* actor, GlobalContext* globalCtx);
u32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_8002F5C4(Actor* actorA, Actor* actorB, GlobalContext* globalCtx);
void func_8002F5F0(Actor* actor, GlobalContext* globalCtx);
s32 Actor_IsMounted(GlobalContext* globalCtx, Actor* horse);
u32 Actor_SetRideActor(GlobalContext* globalCtx, Actor* horse, s32 arg2);
s32 Actor_NotMounted(GlobalContext* globalCtx, Actor* horse);
void func_8002F698(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_8002F6D4(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F71C(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_8002F758(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F7A0(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
2020-03-17 04:31:30 +00:00
void func_8002F7DC(Actor* actor, u16 sfxId);
void Audio_PlayActorSound2(Actor* actor, u16 sfxId);
void func_8002F850(GlobalContext* globalCtx, Actor* actor);
void func_8002F8F0(Actor* actor, u16 sfxId);
void func_8002F91C(Actor* actor, u16 sfxId);
void func_8002F948(Actor* actor, u16 sfxId);
void func_8002F974(Actor* actor, u16 sfxId);
void func_8002F994(Actor* actor, s32 arg1);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos);
2020-03-17 04:31:30 +00:00
void func_800304B0(GlobalContext* globalCtx);
void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry* actorEntry);
void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx);
s32 func_800314D4(GlobalContext* globalCtx, Actor* actorB, Vec3f* arg2, f32 arg3);
void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_80031A28(GlobalContext* globalCtx, ActorContext* actorCtx);
2020-03-17 04:31:30 +00:00
void func_80031B14(GlobalContext* globalCtx, ActorContext* actorCtx);
void func_80031C3C(ActorContext* actorCtx, GlobalContext* globalCtx);
2020-03-22 21:50:11 +00:00
Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId, f32 posX, f32 posY, f32 posZ,
s16 rotX, s16 rotY, s16 rotZ, s16 params);
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 actorId, f32 posX,
f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params);
2020-03-17 04:31:30 +00:00
void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx);
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, GlobalContext* globalCtx);
Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalCtx);
Actor* func_80032AF0(GlobalContext* globalCtx, ActorContext* actorCtx, Actor** actorPtr, Player* player);
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
void Enemy_StartFinishingBlow(GlobalContext* globalCtx, Actor* actor);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3);
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, GlobalContext* globalCtx);
void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
s16 objectId);
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, GlobalContext* globalCtx, s16 type);
void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne, f32 randAccelWeight,
s16 scale, s16 scaleStep, u8 useLighting);
2020-03-17 04:31:30 +00:00
void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s16 arg4, s16 arg5, u8 arg6);
Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider);
2020-03-17 04:31:30 +00:00
Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor);
Actor* Actor_GetProjectileActor(GlobalContext* globalCtx, Actor* refActor, f32 radius);
void Actor_ChangeCategory(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
2020-03-17 04:31:30 +00:00
void Actor_SetTextWithPrefix(GlobalContext* globalCtx, Actor* actor, s16 textIdLower);
s16 Actor_TestFloorInDirection(Actor* actor, GlobalContext* globalCtx, f32 distance, s16 angle);
s32 Actor_IsTargeted(GlobalContext* globalCtx, Actor* actor);
s32 Actor_OtherIsTargeted(GlobalContext* globalCtx, Actor* actor);
2020-03-17 04:31:30 +00:00
f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx);
void func_80033DB8(GlobalContext* globalCtx, s16 arg1, s16 arg2);
void func_80033E1C(GlobalContext* globalCtx, s16 arg1, s16 arg2, s16 arg3);
void func_80033E88(Actor* actor, GlobalContext* globalCtx, s16 arg2, s16 arg3);
f32 Rand_ZeroFloat(f32 f);
f32 Rand_CenteredFloat(f32 f);
void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 arg1, s32 arg2);
2020-03-17 04:31:30 +00:00
void func_8003424C(GlobalContext* globalCtx, Vec3f* arg1);
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration);
2020-03-17 04:31:30 +00:00
Hilite* func_800342EC(Vec3f* object, GlobalContext* globalCtx);
Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx);
2020-03-22 21:50:11 +00:00
s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u16 (*unkFunc1)(GlobalContext*, Actor*),
s16 (*unkFunc2)(GlobalContext*, Actor*));
2020-03-17 04:31:30 +00:00
s16 func_800347E8(s16 arg0);
void func_80034A14(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3);
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
Decompiled z_en_md.c (#246) * Decompile z_bg_haka_trap.c * Update spec delete old .reloc.s file Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> * Deleted reloc.s and made style changes to function pointers and local vars * Renamed timer field, added more useful temp names * Implemented Roman's suggestions, including moving enum to header file, moving some static variables inside functions, removing unnecessary casts, removing unnecessary temps, and fixing a few style issues * Commented dual purpose of unk_16A and formatted file again * Decompiled z_en_md.c decompiled EnMd_Init Decompiled EnMd_Draw Decompiled EnMd_Destroy and EnMd_Update Decompiled func_80AAC104 Decompiled func_80AAA92C Decompiled func_80AAA93C Decompiled func_80AAA274 Decompiled func_80AAA308 Decompiled func_80AAA39C Decompiled func_80AAA474 Decompiled func_80AAA508 Decompiled func_80AAA5A4 Decompiled func_80AAA638 Decompiled func_80AAA6D4 Decompiled func_80AAA768 Decompiled func_80AAA7FC Decompiled func_80AAA890 Decompiled func_80AAA93C Decompiled func_80AAA250 Decompiled func_80AAB874 Decompile func_80AAAA24 Decompiled func_80AABD0C Decompiled func_80AAB8F8 Decompiled func_80AAAE94 Decompiled func_80AAACF8 Decompiled func_80AAADE0 Decompiled func_80AAAE14 Decompiled func_80AAB03C Decompiled func_80AAB0E0 Decompiled func_80AAB370 Decompiled func_80AAB4DC Decompiled func_80AAB5A4 Decompiled func_80AABC10 Decompiled func_80AAAC78 Decompiled func_80AABEF0 Decompiled func_80AAB158 Decompiled func_80AAAF04 Decompiled func_80AAB948 Migrated data into C file Commented out data file (migrated data) Removed data file from spec about to try changing alpha type cleaned up functions except for last two fixed player and player2 issue Decompiled z_en_md.c * updated actor field names to match upstream changes * deleted old asm nonmatchings (whoops) * Update src/overlays/actors/ovl_En_Md/z_en_md.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * removed unnecessary forward declarations * got rid of unnecessary temps in path functions, added names based on strong copy paste similarity with en_kz, minor formatting changes * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * pass EnMd* to appropriate functions instead of Actor* * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * finish renaming limb draw funcs * inlined vector data and moved static data * Update src/overlays/actors/ovl_En_Md/z_en_md.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * ran formatter and completed name change in PostLimbDraw * removed address-of array for sAnimations Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-07-14 19:59:45 +00:00
s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3);
void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* animations, s32 index);
void func_80034F54(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
2020-03-17 04:31:30 +00:00
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist);
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* refActor, s16 actorId, u8 actorCategory, f32 range);
2020-03-17 04:31:30 +00:00
s32 func_800354B4(GlobalContext* globalCtx, Actor* actor, f32 range, s16 arg3, s16 arg4, s16 arg5);
void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3);
void func_800355B8(GlobalContext* globalCtx, Vec3f* arg1);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
u8 func_800355E4(GlobalContext* globalCtx, Collider* collider);
2020-03-17 04:31:30 +00:00
u8 Actor_ApplyDamage(Actor* actor);
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colBody, s32 freezeFlag);
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* colBody, s32 freezeFlag);
void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
GlobalContext* globalCtx, s16 params, s32 arg8);
2020-03-17 04:31:30 +00:00
void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
s32 Flags_GetEventChkInf(s32 flag);
void Flags_SetEventChkInf(s32 flag);
s32 Flags_GetInfTable(s32 flag);
void Flags_SetInfTable(s32 flag);
u16 func_80037C30(GlobalContext* globalCtx, s16 arg1);
s32 func_80037D98(GlobalContext* globalCtx, Actor* actor, s16 arg2, s32* arg3);
s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
void ActorOverlayTable_LogPrint(void);
void ActorOverlayTable_Init(void);
void ActorOverlayTable_Cleanup(void);
// ? func_80038600(?);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList*);
void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
f32 checkHeight, CollisionPoly** outPoly);
s32 BgCheck_CheckLineAgainstSSList(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
Vec3f* posA, Vec3f* posB, Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq,
f32 chkDist, s32 bccFlags);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* arg2);
void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, CollisionHeader* colHeader);
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly,
Vec3f* pos);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor,
Vec3f* arg4);
f32 BgCheck_EntityRaycastFloor5(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId,
Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos,
f32 chkDist);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev,
f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
CollisionPoly** outPoly, f32 checkHeight);
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly,
s32* outBgId, Actor* actor);
s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 chkDist,
u32 bccFlags);
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
Actor* actor);
s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
Actor* actor, f32 chkDist);
s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace,
s32* bgId);
s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
s32 chkOneFace);
s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void SSNodeList_Initialize(SSNodeList*);
void SSNodeList_Alloc(GlobalContext* globalCtx, SSNodeList* this, s32 tblMax, s32 numPolys);
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
s32 DynaPoly_IsBgIdBgActor(s32 bgId);
void DynaPoly_Init(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void DynaPoly_Alloc(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void func_8003EBF8(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_8003EC50(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_8003ECA8(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
s32 DynaPoly_SetBgActor(GlobalContext* globalCtx, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader);
DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void DynaPoly_DeleteBgActor(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_8003EE6C(GlobalContext* globalCtx, DynaCollisionContext* dyna);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void func_8003F8EC(GlobalContext* globalCtx, DynaCollisionContext* dyna, Actor* actor);
void DynaPoly_Setup(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void DynaPoly_UpdateBgActorTransforms(GlobalContext* globalCtx, DynaCollisionContext* dyna);
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist,
s32 bccFlags);
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
void func_800418D0(CollisionContext* colCtx, GlobalContext* globalCtx);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
u32 SurfaceType_GetCamDataIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 func_80041A4C(CollisionContext* colCtx, u32 camId, s32 bgId);
u16 SurfaceType_GetCameraSType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 SurfaceType_GetNumCameras(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
Vec3s* func_80041C10(CollisionContext* colCtx, s32 camId, s32 bgId);
Vec3s* SurfaceType_GetCamPosData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetSceneExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
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_80041D4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_80041DE4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_80041E18(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_80041E4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_80041EA4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_80041EC8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_80041F10(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetLightSettingIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox);
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
WaterBox** outWaterBox);
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
u32 WaterBox_GetCamDataIndex(CollisionContext* colCtx, WaterBox* waterBox);
u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox);
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox);
s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint);
s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
void BgCheck_DrawDynaCollision(GlobalContext*, CollisionContext*);
void BgCheck_DrawStaticCollision(GlobalContext*, CollisionContext*);
void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId);
s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags);
2020-03-17 04:31:30 +00:00
void func_800434A0(DynaPolyActor* dynaActor);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void func_800434A8(DynaPolyActor* dynaActor);
void func_800434C8(CollisionContext* colCtx, s32 floorBgId);
void func_80043508(CollisionContext* colCtx, s32 floorBgId);
z_bgcheck.c, 800430A0.c, 80043480.c (#256) * beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 11:12:58 +00:00
void func_80043538(DynaPolyActor* dynaActor);
s32 func_80043548(DynaPolyActor* dynaActor);
s32 func_8004356C(DynaPolyActor* dynaActor);
s32 func_80043590(DynaPolyActor* dynaActor);
s32 func_800435B4(DynaPolyActor* dynaActor);
s32 func_800435D8(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
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
void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalContext* globalCtx);
void Camera_InitPlayerSettings(Camera* camera, Player* player);
s16 Camera_ChangeStatus(Camera* camera, s16 status);
Vec3s Camera_Update(Camera* camera);
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
void Camera_Finish(Camera* camera);
s32 Camera_ChangeMode(Camera* camera, s16 mode);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
s32 Camera_CheckValidMode(Camera* camera, s16 mode);
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 Camera_ChangeSetting(Camera* camera, s16 setting);
s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx);
s16 Camera_GetInputDirYaw(Camera* camera);
Vec3s* Camera_GetCamDir(Vec3s* dir, Camera* camera);
s16 Camera_GetCamDirPitch(Camera* camera);
s16 Camera_GetCamDirYaw(Camera* camera);
s32 Camera_AddQuake(Camera* camera, s32 arg1, s16 y, s32 countdown);
s32 Camera_SetParam(Camera* camera, s32 param, void* value);
s32 func_8005AC48(Camera* camera, s16 arg1);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
s16 func_8005ACFC(Camera* camera, s16 arg1);
s16 func_8005AD1C(Camera* camera, s16 arg1);
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 Camera_ResetAnim(Camera* camera);
s32 Camera_SetCSParams(Camera* camera, CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints, Player* player,
s16 relativeToPlayer);
s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 arg3, s16 timer1, s16 timer2,
s16 timer3);
s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
Vec3f* Camera_GetSkyboxOffset(Vec3f* dst, Camera* camera);
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
UNK_TYPE arg6);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
s32 func_8005B198(void);
s16 func_8005B1A4(Camera* camera);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
DamageTable* DamageTable_Get(s32 index);
void DamageTable_Clear(DamageTable* table);
void Collider_DrawRedPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_InitJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_FreeJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_DestroyJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_SetJntSphToActor(GlobalContext* globalCtx, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
s32 Collider_SetJntSphAllocType1(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor,
ColliderJntSphInitType1* src);
s32 Collider_SetJntSphAlloc(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src);
s32 Collider_SetJntSph(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src,
ColliderJntSphElement* elements);
s32 Collider_ResetJntSphAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetJntSphAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetJntSphOC(GlobalContext* globalCtx, Collider* collider);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_InitCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
s32 Collider_DestroyCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
s32 Collider_SetCylinderToActor(GlobalContext* globalCtx, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
s32 Collider_SetCylinderType1(GlobalContext* globalCtx, ColliderCylinder* collider, Actor* actor,
ColliderCylinderInitType1* src);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_SetCylinder(GlobalContext* globalCtx, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src);
s32 Collider_ResetCylinderAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetCylinderAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetCylinderOC(GlobalContext* globalCtx, Collider* collider);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_InitTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_FreeTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_DestroyTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_SetTrisAllocType1(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInitType1* src);
s32 Collider_SetTrisAlloc(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit* src);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_SetTris(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit* src,
ColliderTrisElement* elements);
s32 Collider_ResetTrisAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetTrisAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetTrisOC(GlobalContext* globalCtx, Collider* collider);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_InitQuad(GlobalContext* globalCtx, ColliderQuad* collider);
s32 Collider_DestroyQuad(GlobalContext* globalCtx, ColliderQuad* collider);
s32 Collider_SetQuadType1(GlobalContext* globalCtx, ColliderQuad* collider, Actor* actor, ColliderQuadInitType1* src);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 Collider_SetQuad(GlobalContext* globalCtx, ColliderQuad* collider, Actor* actor, ColliderQuadInit* src);
s32 Collider_ResetQuadAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetQuadAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetQuadOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitLine(GlobalContext* globalCtx, OcLine* line);
s32 Collider_DestroyLine(GlobalContext* globalCtx, OcLine* line);
s32 Collider_SetLinePoints(GlobalContext* globalCtx, OcLine* ocLine, Vec3f* a, Vec3f* b);
s32 Collider_SetLine(GlobalContext* globalCtx, OcLine* dest, OcLine* src);
s32 Collider_ResetLineOC(GlobalContext* globalCtx, OcLine* line);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
void CollisionCheck_InitContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_DestroyContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_ClearContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
void CollisionCheck_EnableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_DisableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void Collider_Draw(GlobalContext* globalCtx, Collider* collider);
void CollisionCheck_DrawCollision(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetAT_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
s32 CollisionCheck_SetOCLine(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, OcLine* collider);
void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3f* v);
void CollisionCheck_AT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
z_collision_check.c (#73) * func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
2020-04-26 02:43:35 +00:00
void CollisionCheck_OC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_InitInfo(CollisionCheckInfo* info);
void CollisionCheck_ResetDamage(CollisionCheckInfo* info);
void CollisionCheck_SetInfoNoDamageTable(CollisionCheckInfo* info, CollisionCheckInfoInit* init);
void CollisionCheck_SetInfo(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit* init);
void CollisionCheck_SetInfo2(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit2* init);
void CollisionCheck_SetInfoGetDamageTable(CollisionCheckInfo* info, s32 index, CollisionCheckInfoInit2* init);
void CollisionCheck_Damage(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_LineOCCheckAll(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
s32 CollisionCheck_LineOCCheck(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b,
Actor** exclusions, s32 numExclusions);
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider);
void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos);
void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
void Collider_SetTrisDim(GlobalContext* globalCtx, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* init);
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* actorPos);
void CollisionCheck_SpawnShieldParticlesMetal2(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* b, Vec3f* actorPos);
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos,
Vec3f* itemProjPos, Vec3f* out1, Vec3f* out2);
u8 CollisionCheck_GetSwordDamage(s32 dmgFlags);
2020-03-17 04:31:30 +00:00
void SaveContext_Init(void);
s32 func_800635D0(s32);
void func_800636C0(void);
void func_8006375C(s32 arg0, s32 arg1, const char* text);
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
void func_8006376C(u8 x, u8 y, u8 colorId, const char* text);
2020-03-17 04:31:30 +00:00
// ? func_80063828(?);
void func_8006390C(Input* input);
2020-03-17 04:31:30 +00:00
// ? func_80063C04(?);
void func_80063D7C(GraphicsContext* gfxCtx);
2020-03-17 04:31:30 +00:00
void DebugDisplay_Init(void);
2020-03-22 21:50:11 +00:00
DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX,
f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type,
GraphicsContext* gfxCtx);
2020-03-17 04:31:30 +00:00
void DebugDisplay_DrawObjects(GlobalContext* globalCtx);
void func_8006450C(GlobalContext* globalCtx, CutsceneContext* csCtx);
En_Clear_Tag OK and documented (#689) * Decompile and document En_Clear_Tag * Adds a define for setting the total count of ClearTag particles. * Fixes swap in particle effect struct member names. Additionally, implements the DECR macro where available. Additionally, implements the CLAMP_MIN macro. Additionally, adds more comments inside of functions explaining how the Arwing works. * Reformats z_en_clear_tag.c after recent fixes. * Removes not OK DECR and CLAMP_MIN macros. I don't know why they built locally OK for me. May have had a stale build. * Added static to data declarations. Additionally added white spacing between data definitions. * Various syling fixes in EnClearTag Fixes inconsistent usage of particle/effect. They're Effect is the better name, so I went with that. Fixed a naming issue in CalculateFloorTangent. Adds s prefix to all the static variables. Renames clearTagParticlesBuffer to sClearTagEffects Consistent capitalization in comments. Adds more descriptive comments to function level comments that didn't say a lot already. Renamed gameplay.particleEffects to gameplay.specialEffects. Renames cameraNumber to cameraId. Fixed capitalization in display list variable names. * Always capitalize the A in arwing. * Fixes issue with overzealous replacement of arwing -> Arwing * Renames arwing display lists to include the g prefix. * Renames effect seed -> random * Removes unnecessary decrement timer comments. * Updates Arwing comments to detail why it's important that the roll is updated to zero. * Updates stack variable names in EnClearTag_Update to be more consistent with each other. * Updates Arwing crashing documentation. * Further update documentation on arwing crashing. * Even further updates to Arwing crashing docs. * Fixes issue of missing newline in En_Clear_Tag.xml * targetDirection reset now has a chained assignment * Rotation angle to hex * Fixes rotation hex and identifies float. * Updates arwing fire check. * Arwing cutscene timer is multiplied by 128 rather than shifting 7 * Updates scaledCrashingTimer assignment to be more consistent. * Updates max scale to multiply by 2 * Gives name to the work buffer indices. Additionally, makes enum names more consistent. * Removes unnecessary globalCtx2 in EnClearTag_CreateFlashEffect * Runs format.sh after recent changes. * Updated path of ClearTag assets. * Clear tag now uses Arwing in the display list name for all effects. * Updates work buffer to expand and contract as new enums are added. * Uses c99 defines in my c89 * Updates the unknown 8 bytes in en_clear_tag * review Co-authored-by: fig02 <fig02srl@gmail.com>
2021-03-29 17:14:08 +00:00
void func_80064520(GlobalContext* globalCtx, CutsceneContext* csCtx);
2020-03-17 04:31:30 +00:00
void func_80064534(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx);
void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx);
void Cutscene_SetSegment(GlobalContext* globalCtx, u32 segment);
void* MemCopy(void* dest, void* src, s32 size);
void GetItem_Draw(GlobalContext* globalCtx, s16 drawId);
void func_8006BA00(GlobalContext* globalCtx);
void func_8006BA30(GlobalContext* globalCtx);
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
u16 ElfMessage_GetSariaText(GlobalContext* globalCtx);
u16 ElfMessage_GetCUpText(GlobalContext* globalCtx);
u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet);
void Flags_UnsetAllEnv(GlobalContext* globalCtx);
void Flags_SetEnv(GlobalContext* globalCtx, s16 flag);
void Flags_UnsetEnv(GlobalContext* globalCtx, s16 flag);
s32 Flags_GetEnv(GlobalContext* globalCtx, s16 flag);
f32 func_8006C5A8(f32 target, TransformData* transData, s32 refIdx);
void SkelCurve_Clear(SkelAnimeCurve* skelCurve);
s32 SkelCurve_Init(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, SkelCurveLimbList* limbListSeg,
ovl_demo_effect 100% OK (#466) * Fully decompiles demo_effect actor. * Formats z_demo_effect.c * GET_ACTOR_TYPE is renamed to GET_EFFECT_TYPE * Implements OPEN_DISPS macros for all draw functions. * Fixes ugly float values * Removes unnecessary union structs in the DemoEffect actor struct * Renames DemoEffect SkelAnimeCurve member to skelCurve * Names initObjectBankIndex DemoEffect struct member * Renames jewel display list holders * Renames initialization function pointers to initUpdateFunc and initDrawFunc * Renames primitive and environment color DemoEffect struct members. * Fixes a couple missed floats. * Renames most draw and update functions. * Finishes naming all update functions. * Adds additional SFX defines. * Renames the rest of the functions * Renames all external object display lists and vertex references * Renames DemoEffect global data variables * Renames DemoEffect Medal function to GetItem because it's used by LightArrows too * Fixes DemoEffect Timewarp_Timeblock documentation. * DemoEffect_TimewarpTimeblock updates shrink functions to use decimal * Converts DemoEffect hex to decimal where appopriate * Names the rest of DemoEffect struct members. * Names DemoEffect triforceSpot crystalLightOpacity * Adds DemoEffect enums for light effect color and god lgt types. * Renames DemoEffect_UpdateBlueOrb to DemoEffect_UpdateBlueOrbGrow * Fixes compiler warning in DemoEffect_JewelSparkle * Renames DemoEffect_MedalSparkle argument * Reformatting DemoEffect struct offset comments. * Formats z_demo_effect * Updates DemoEffect oGfxCtx to use the new macros. * Adds comments detailing what each function in the DemoEffect system does. * Removes z_demo_effect.data.s * Renames DemoEffect global variables and sets them to static * Removes pointer from DemoEffect function references * Removes unncecessary default: break; statements in DemoEffect * Converts rotation values to hex in DemoEffect * DemoEffect effectFlags now uses ~1 rather than 65534 * DemoEffect_DrawGodLgt now uses a cleaner conditional statement * eventChkInf in DemoEffect now uses 1 << 9 and 1 << 11 * DemoEffect now uses VT macros. * Converts DemoEffect colors to hex. * Changes M_PI / 32768.0f to M_PI / 0x8000 * Updates demo_effect enums to be all caps * ovl_demo_effect reloc info is now included via build process rather than included from original asm * Adds param packing macro * DemoEffect struct unions are now typedef'd outside of the main struct * Reformats DemoEffect sJewelSparkleColors * Removes an if(globalCtx){} in DemoEffect_Init * Removes ActorFunc cast in DemoEffect_Wait * Removes unncessary comment in DemoEffect_MedalSparkle * Timer check in DemoEffect_UpdateLightRingShrinking now uses <= 255 rather than < 256 * Removes unnecessary comment in DemoEffect_SetJewelColor * Removes unncessary comment in DemoEffect_MoveJewelActivateDoorOfTime * Converts an angle to hex in DemoEffect_MoveJewelActivateDoorOfTime * Converts a while to for loop in DemoEffect_JewelSparkle * Moves stack variables in DemoEffect_UpdateDust to a new line for each one * Removes globalCtx2 assignment to the beginning of the function in DemoEffect_DrawJewel * Removes unnecessary comment in DemoEffect_DrawCrystalLight * No longer wrapping rotation reset in if(1){} in DemoEffect_DrawGodLgt * Converts DemoEffect if statements to use != 0 and == 0 when non-boolean ints are checked. * DemoEffect initDrawFunc now uses type ActorFunc rather than DemoEffectFunc * review 2 Co-authored-by: fig <fig02srl@gmail.com>
2020-12-07 17:48:29 +00:00
TransformUpdateIndex* transUpdIdx);
void SkelCurve_Destroy(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve);
void SkelCurve_SetAnim(SkelAnimeCurve* skelCurve, TransformUpdateIndex* transUpdIdx, f32 arg2, f32 animFinalFrame,
f32 animCurFrame, f32 animSpeed);
s32 SkelCurve_Update(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve);
void SkelCurve_Draw(Actor* actor, GlobalContext* globalCtx, SkelAnimeCurve* skelCurve,
OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, void* data);
s32 func_8006CFC0(s32 scene);
void func_8006D074(GlobalContext* globalCtx);
void func_8006D0AC(GlobalContext* globalCtx);
void func_8006D0EC(GlobalContext* globalCtx, Player* player);
void func_8006D684(GlobalContext* globalCtx, Player* player);
void func_8006DC68(GlobalContext* globalCtx, Player* player);
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
2021-06-01 19:27:07 +00:00
s32 Jpeg_Decode(void* data, void* zbuffer, void* workBuff, u32 workSize);
void KaleidoSetup_Update(GlobalContext* globalCtx);
void KaleidoSetup_Init(GlobalContext* globalCtx);
void KaleidoSetup_Destroy(GlobalContext* globalCtx);
void func_8006EE50(Font* font, s16 arg1, s16 arg2);
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon);
void Font_LoadOrderedFont(Font* font);
s32 func_8006F0A0(s32 arg0);
2020-03-17 04:31:30 +00:00
// ? func_8006F0D4(?);
// ? func_8006F0FC(?);
u8 func_8006F140(GlobalContext*, EnvironmentContext*, UNK_TYPE);
2020-03-17 04:31:30 +00:00
f32 func_8006F93C(u16, u16, u16);
f32 func_8006F9BC(u16 endFrame, u16 startFrame, u16 frames, u16, u16);
2020-03-17 04:31:30 +00:00
// ? func_8006FB94(?);
void func_8006FC88(u8 skyboxId, EnvironmentContext* envCtx, SkyboxContext* skyboxCtx);
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
void func_80070600(GlobalContext* globalCtx, s32 waterboxProperties);
void func_800706A0(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
// ? func_80070718(?);
void func_80070C24(GlobalContext* globalCtx, EnvironmentContext* envCtx, LightContext* lightCtx, PauseContext* pauseCtx,
MessageContext* msgCtx, GameOverContext* gameOverCtx, GraphicsContext* gfxCtx);
void func_800730DC(GlobalContext*);
void func_80073988(GlobalContext*, EnvironmentContext*, View*, GraphicsContext*, Vec3f, UNK_TYPE);
2020-03-17 04:31:30 +00:00
// ? func_80073A5C(?);
f32 func_800746DC();
void func_80074704(GlobalContext*, View*, GraphicsContext*);
void func_80074CE8(GlobalContext* globalCtx, s32 arg1);
void func_80074D6C(GlobalContext*);
2020-03-17 04:31:30 +00:00
// ? func_80074FF4(?);
void func_800750C0(GlobalContext*);
void func_800753C4(GlobalContext*, u8);
void func_8007542C(GlobalContext*, u8);
void func_800758AC(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
// ? func_80075B44(?);
void func_80075E68(GlobalContext* globalCtx);
void Kankyo_InitGameOverLights(GlobalContext* globalCtx);
void Kankyo_FadeInGameOverLights(GlobalContext* globalCtx);
void Kankyo_FadeOutGameOverLights(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
// ? func_800766C4(?);
void func_8007672C(GraphicsContext*, u8, u8, u8, u8, UNK_TYPE);
void func_80076934(GlobalContext* globalCtx, u8);
2020-03-27 20:26:10 +00:00
void func_800773A8(GlobalContext* globalCtx, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
2020-03-17 04:31:30 +00:00
s32 func_800775CC();
void func_800775D8();
s32 func_800775E4();
void func_800775F0(u16);
s32 func_80077600(void);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
void func_80077624(GlobalContext* globalCtx);
void func_80077684(GlobalContext* globalCtx);
void func_800776E4(GlobalContext* globalCtx);
2020-03-20 00:25:53 +00:00
void Lib_MemSet(u8* dest, size_t size, u8 val);
f32 Math_CosS(s16 angle);
f32 Math_SinS(s16 angle);
s32 Math_ScaledStepToS(s16* pValue, s16 target, s16 step);
s32 Math_StepToS(s16* pValue, s16 target, s16 step);
s32 Math_StepToF(f32* pValue, f32 target, f32 step);
s32 Math_StepUntilAngleS(s16* pValue, s16 limit, s16 step);
s32 Math_StepUntilS(s16* pValue, s16 limit, s16 step);
s32 Math_StepToAngleS(s16* pValue, s16 target, s16 step);
s32 Math_StepUntilF(f32* pValue, f32 limit, f32 step);
s32 Math_AsymStepToF(f32* pValue, f32 target, f32 incrStep, f32 decrStep);
void func_80077D10(f32* arg0, s16* arg1, Input* input);
s16 Rand_S16Offset(s16 base, s16 range);
2020-03-17 04:31:30 +00:00
void Math_Vec3f_Copy(Vec3f* dest, Vec3f* src);
void Math_Vec3s_ToVec3f(Vec3f* dest, Vec3s* src);
void Math_Vec3f_Sum(Vec3f* a, Vec3f* b, Vec3f* dest);
void Math_Vec3f_Diff(Vec3f* a, Vec3f* b, Vec3f* dest);
void Math_Vec3s_DiffToVec3f(Vec3f* dest, Vec3s* a, Vec3s* b);
void Math_Vec3f_Scale(Vec3f* vec, f32 scaleF);
f32 Math_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
f32 Math_Vec3f_DistXYZAndStoreDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
f32 Math_Vec3f_DistXZ(Vec3f* a, Vec3f* b);
s16 Math_Vec3f_Yaw(Vec3f* a, Vec3f* b);
s16 Math_Vec3f_Pitch(Vec3f* a, Vec3f* b);
void Actor_ProcessInitChain(Actor* actor, InitChainEntry* initChain);
f32 Math_SmoothStepToF(f32* pValue, f32 target, f32 fraction, f32 step, f32 minStep);
void Math_ApproachF(f32* pValue, f32 target, f32 fraction, f32 step);
void Math_ApproachZeroF(f32* pValue, f32 fraction, f32 step);
f32 Math_SmoothStepToDegF(f32* pValue, f32 target, f32 fraction, f32 step, f32 minStep);
s16 Math_SmoothStepToS(s16* pValue, s16 target, s16 scale, s16 step, s16 minStep);
void Math_ApproachS(s16* pValue, s16 target, s16 scale, s16 step);
2020-03-17 04:31:30 +00:00
void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src);
void func_80078884(u16 sfxId);
void func_800788CC(u16 sfxId);
void func_80078914(Vec3f* arg0, u16 sfxId);
void HealthMeter_Init(GlobalContext* globalCtx);
void HealthMeter_Update(GlobalContext* globalCtx);
void HealthMeter_Draw(GlobalContext* globalCtx);
void HealthMeter_HandleCriticalAlarm(GlobalContext* globalCtx);
u32 HealthMeter_IsCritical(void);
void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type);
void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius);
void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius);
void Lights_PointSetColorAndRadius(LightInfo* info, u8 r, u8 g, u8 b, s16 radius);
void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8 b);
void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB);
void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx);
void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec);
void LightContext_Init(GlobalContext* globalCtx, LightContext* lightCtx);
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b);
void func_8007A698(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLights, s16 arg5);
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx);
void LightContext_InitList(GlobalContext* globalCtx, LightContext* lightCtx);
void LightContext_DestroyList(GlobalContext* globalCtx, LightContext* lightCtx);
LightNode* LightContext_InsertLight(GlobalContext* globalCtx, LightContext* lightCtx, LightInfo* info);
void LightContext_RemoveLight(GlobalContext* globalCtx, LightContext* lightCtx, LightNode* node);
Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g,
u8 b, s8 x, s8 y, s8 z);
Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB);
void Lights_GlowCheck(GlobalContext* globalCtx);
void Lights_DrawGlow(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
void* ZeldaArena_Malloc(u32 size);
void* ZeldaArena_MallocDebug(u32 size, const char* file, s32 line);
void* ZeldaArena_MallocR(u32 size);
void* ZeldaArena_MallocRDebug(u32 size, const char* file, s32 line);
void* ZeldaArena_Realloc(void* ptr, u32 newSize);
void* ZeldaArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
void ZeldaArena_Free(void* ptr);
void ZeldaArena_FreeDebug(void* ptr, const char* file, s32 line);
void* ZeldaArena_Calloc(u32 num, u32 size);
void ZeldaArena_Display();
void ZeldaArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
void ZeldaArena_Check();
void ZeldaArena_Init(void* start, u32 size);
void ZeldaArena_Cleanup();
u8 ZeldaArena_IsInitalized();
void MapMark_Init(GlobalContext* globalCtx);
void MapMark_ClearPointers(GlobalContext* globalCtx);
void MapMark_Draw(GlobalContext* globalCtx);
void PreNmiBuff_Init(PreNmiBuff* this);
void PreNmiBuff_SetReset(PreNmiBuff* this);
u32 PreNmiBuff_IsResetting(PreNmiBuff* this);
void MsgEvent_SendNullTask(void);
f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
f32 OLib_ClampMinDist(f32 val, f32 min);
f32 OLib_ClampMaxDist(f32 val, f32 max);
Vec3f* OLib_Vec3fDistNormalize(Vec3f* dest, Vec3f* a, Vec3f* b);
Vec3f* OLib_VecSphGeoToVec3f(Vec3f* dest, VecSph* sph);
VecSph* OLib_Vec3fToVecSph(VecSph* dest, Vec3f* vec);
VecSph* OLib_Vec3fToVecSphGeo(VecSph* arg0, Vec3f* arg1);
VecSph* OLib_Vec3fDiffToVecSphGeo(VecSph* arg0, Vec3f* a, Vec3f* b);
Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b);
s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 camIdx);
s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx);
s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor);
s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId);
void OnePointCutscene_EnableAttention(void);
void OnePointCutscene_DisableAttention(void);
s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 actorCategory);
void OnePointCutscene_Noop(GlobalContext* globalCtx, s32 arg1);
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor);
void Map_InitData(GlobalContext* globalCtx, s16 room);
void Map_InitRoomData(GlobalContext* globalCtx, s16 room);
void Map_Destroy(GlobalContext* globalCtx);
void Map_Init(GlobalContext* globalCtx);
void Minimap_Draw(GlobalContext* globalCtx);
void Map_Update(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void Interface_ChangeAlpha(u16 alphaType);
void Interface_SetSceneRestrictions(GlobalContext* globalCtx);
void Inventory_SwapAgeEquipment(void);
void Interface_InitHorsebackArchery(GlobalContext* globalCtx);
void func_800849EC(GlobalContext* globalCtx);
void Interface_LoadItemIcon1(GlobalContext* globalCtx, u16 button);
void Interface_LoadItemIcon2(GlobalContext* globalCtx, u16 button);
void func_80084BF4(GlobalContext* globalCtx, u16 flag);
u8 Item_Give(GlobalContext* globalCtx, u8 item);
u8 Item_CheckObtainability(u8 item);
void Inventory_DeleteItem(u16 item, u16 invSlot);
s32 Inventory_ReplaceItem(GlobalContext* globalCtx, u16 oldItem, u16 newItem);
s32 Inventory_HasEmptyBottle(void);
s32 Inventory_HasSpecificBottle(u8 bottleItem);
void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton);
s32 Inventory_ConsumeFairy(GlobalContext* globalCtx);
void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);
s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange);
void Rupees_ChangeBy(s16 rupeeChange);
void Inventory_ChangeAmmo(s16 item, s16 ammoChange);
void Magic_Fill(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_800876C8(GlobalContext* globalCtx);
s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2);
void func_80088AA0(s16 seconds);
void func_80088AF0(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_80088B34(s16 arg0);
void Interface_Draw(GlobalContext* globalCtx);
void Interface_Update(GlobalContext* globalCtx);
Path* Path_GetByIndex(GlobalContext* globalCtx, s16 index, s16 max);
f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
void Path_CopyLastPoint(Path* path, Vec3f* dest);
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx);
s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input);
void Player_SetBootData(GlobalContext* globalCtx, Player* player);
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* player);
s32 Player_InCsMode(GlobalContext* globalCtx);
s32 func_8008E9C4(Player* player);
s32 Player_IsChildWithHylianShield(Player* player);
s32 Player_ActionToModelGroup(Player* player, s32 actionParam);
void Player_SetModelsForHoldingShield(Player* player);
void Player_SetModels(Player* player, s32 modelGroup);
void Player_SetModelGroup(Player* player, s32 modelGroup);
void func_8008EC70(Player* player);
void Player_SetEquipmentData(GlobalContext* globalCtx, Player* player);
void Player_UpdateBottleHeld(GlobalContext* globalCtx, Player* player, s32 item, s32 actionParam);
void func_8008EDF0(Player* player);
void func_8008EE08(Player* player);
void func_8008EEAC(GlobalContext* globalCtx, Actor* actor);
s32 func_8008EF44(GlobalContext* globalCtx, s32 ammo);
s32 Player_IsBurningStickInRange(GlobalContext* globalCtx, Vec3f* pos, f32 radius, f32 arg3);
s32 Player_GetStrength(void);
u8 Player_GetMask(GlobalContext* globalCtx);
Player* Player_UnsetMask(GlobalContext* globalCtx);
s32 Player_HasMirrorShieldEquipped(GlobalContext* globalCtx);
s32 Player_HasMirrorShieldSetToDraw(GlobalContext* globalCtx);
s32 Player_ActionToMagicSpell(Player* player, s32 actionParam);
s32 Player_HoldsHookshot(Player* player);
s32 func_8008F128(Player* player);
s32 Player_ActionToSword(s32 actionParam);
s32 Player_GetSwordHeld(Player* player);
s32 Player_HoldsTwoHandedWeapon(Player* player);
s32 Player_HoldsBrokenKnife(Player* player);
s32 Player_ActionToBottle(Player* player, s32 actionParam);
s32 Player_GetBottleHeld(Player* player);
s32 Player_ActionToExplosive(Player* player, s32 actionParam);
s32 Player_GetExplosiveHeld(Player* player);
s32 func_8008F2BC(Player* player, s32 actionParam);
s32 func_8008F2F8(GlobalContext* globalCtx);
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* this);
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
s32 func_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip,
Vec3f* newBase);
void Player_DrawGetItem(GlobalContext* globalCtx, Player* player);
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* data);
u32 func_80091738(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime);
void func_8009214C(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
s32 sword, s32 tunic, s32 shield, s32 boots);
void PreNMI_Init(GameState* thisx);
Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2);
void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 y, f32 x);
s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_Callback2(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_Callback3(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_Callback4(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_Callback5(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_Callback6(QuakeRequest* req, ShakeInfo* shake);
s16 Quake_GetFreeIndex(void);
QuakeRequest* Quake_AddImpl(Camera* cam, u32 callbackIdx);
void Quake_Remove(QuakeRequest* req);
QuakeRequest* Quake_GetRequest(s16 idx);
QuakeRequest* Quake_SetValue(s16 idx, s16 valueType, s16 value);
u32 Quake_SetSpeed(s16 idx, s16 value);
u32 Quake_SetCountdown(s16 idx, s16 value);
s16 Quake_GetCountdown(s16 idx);
u32 Quake_SetQuakeValues(s16 idx, s16 y, s16 x, s16 zoom, s16 rotZ);
u32 Quake_SetUnkValues(s16 idx, s16 arg1, SubQuakeRequest14 arg2);
void Quake_Init(void);
s16 Quake_Add(Camera* cam, u32 callbackIdx);
u32 Quake_RemoveFromIdx(s16 idx);
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
s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData);
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
Gfx* Gfx_CallSetupDL(Gfx* gfx, u32 i);
Gfx* func_800937C0(Gfx* gfx);
Gfx* func_80093808(Gfx* gfx);
void func_800938B4(GraphicsContext* gfxCtx);
void func_8009398C(GraphicsContext* gfxCtx);
void func_80093AD0(GraphicsContext* gfxCtx);
2020-03-17 04:31:30 +00:00
void func_80093BA8(GraphicsContext* gfxCtx);
void func_80093C14(GraphicsContext* gfxCtx);
void func_80093C80(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_80093D18(GraphicsContext* gfxCtx);
void func_80093D84(GraphicsContext* gfxCtx);
Gfx* func_80093F34(Gfx* gfx);
Gfx* func_80093F58(Gfx* gfx);
2020-03-22 21:50:11 +00:00
void func_80094044(GraphicsContext* gfxCtx);
void func_800940B0(GraphicsContext* gfxCtx);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
void func_80094140(GraphicsContext* gfxCtx);
Gfx* func_8009411C(Gfx* gfx);
void func_800942F0(GraphicsContext* gfxCtx);
void func_8009435C(GraphicsContext* gfxCtx);
void func_800943C8(GraphicsContext* gfxCtx);
Gfx* func_800944A0(Gfx* gfx);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
void func_800944C4(GraphicsContext* gfxCtx);
void func_80094520(GraphicsContext* gfxCtx);
void func_8009457C(Gfx** gfxp);
void func_800945A0(GraphicsContext* gfxCtx);
void func_8009460C(GraphicsContext* gfxCtx);
void func_80094678(GraphicsContext* gfxCtx);
Gfx* func_80094968(Gfx* gfx);
Gfx* func_800946E4(Gfx* gfx);
Gfx* func_800947AC(Gfx* gfx);
void func_800949A8(GraphicsContext* gfxCtx);
void func_80094A14(GraphicsContext* gfxCtx);
void func_80094B58(GraphicsContext* gfxCtx);
void func_80094BC4(GraphicsContext* gfxCtx);
void func_80094C50(GraphicsContext* gfxCtx);
void func_80094D28(Gfx** gfxp);
Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height);
2020-03-17 04:31:30 +00:00
Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2,
u32 y2, s32 width2, s32 height2);
Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2,
u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a);
Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a);
void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
void func_80095974(GraphicsContext* gfxCtx);
void func_80095AA0(GlobalContext* globalCtx, Room* room, Input* arg2, UNK_TYPE arg3);
void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0,
u16 tlutCount, f32 frameX, f32 frameY);
2020-03-17 04:31:30 +00:00
void func_80096FD4(GlobalContext* globalCtx, Room* room);
u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx);
s32 func_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx, s32 roomNum);
s32 func_800973FC(GlobalContext* globalCtx, RoomContext* roomCtx);
void Room_Draw(GlobalContext* globalCtx, Room* room, u32 flags);
void func_80097534(GlobalContext* globalCtx, RoomContext* roomCtx);
void Sample_Destroy(GameState* thisx);
void Sample_Init(GameState* thisx);
2020-03-17 04:31:30 +00:00
void Inventory_ChangeEquipment(s16 equipment, u16 value);
u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment);
void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
void Object_InitBank(GlobalContext* globalCtx, ObjectContext* objectCtx);
void Object_UpdateBank(ObjectContext* objectCtx);
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId);
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 bankIndex);
void func_800981B8(ObjectContext* objectCtx);
s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd);
void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx);
2020-03-17 04:31:30 +00:00
void func_800994A0(GlobalContext* globalCtx);
void Scene_Draw(GlobalContext* globalCtx);
void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg, s32 dListIndex);
void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg,
s32 dListIndex);
void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
s16 Animation_GetLength(void* animation);
s16 Animation_GetLastFrame(void* animation);
s32 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Vec3s* frameTable);
s16 Animation_GetLimbCountLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLengthLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLastFrameLegacy(LegacyAnimationHeader* animation);
Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight);
void AnimationContext_Reset(AnimationContext* animationCtx);
void AnimationContext_SetNextQueue(GlobalContext* globalCtx);
void AnimationContext_DisableQueue(GlobalContext* globalCtx);
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
Vec3s* frameTable);
void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
void AnimationContext_Update(GlobalContext* globalCtx, AnimationContext* animationCtx);
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
LinkAnimationHeader* animation, s32 initFlags, Vec3s* jointTable, Vec3s* morphTable,
s32 limbCount);
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime);
s32 LinkAnimation_Update(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime);
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 morphFrames);
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 playSpeed,
f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames);
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation);
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed);
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation);
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed);
void LinkAnimation_CopyJointToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_CopyMorphToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame);
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame);
void LinkAnimation_InterpJointMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
s32 SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation);
s32 SkelAnime_Update(SkelAnime* skelAnime);
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
u8 mode, f32 morphFrames, s8 taper);
void Animation_Change(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
u8 mode, f32 morphFrames);
void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animation);
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
void Animation_PlayOnceSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animation);
void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
void Animation_EndLoop(SkelAnime* skelAnime);
void Animation_Reverse(SkelAnime* skelAnime);
void SkelAnime_CopyFrameTableTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
void SkelAnime_CopyFrameTableFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame);
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx);
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx* arg3, Vec3f* arg4);
void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3);
void func_800A5E28(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3, s32 arg4);
void func_800A5F60(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, Gfx* arg3, s32 arg4);
void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4,
s32 arg5, s32 arg6, s32 arg7);
void func_800A6330(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, s32 arg4);
Fix most actor compiler warnings (#656) * functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
2021-02-02 23:44:24 +00:00
void func_800A6360(Actor* this, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4,
s32 arg5);
void func_800A63CC(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4,
s32 arg5, s32 arg6, s32 arg7);
void func_800A6408(PSkinAwb* skin, s32 joint, Vec3f* arg2, Vec3f* arg3);
void func_800A6460(GlobalContext* globalCtx, PSkinAwb* skin, s32 arg2);
void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* skeletonHeader,
AnimationHeader* animationHeader);
void func_800A6888(GlobalContext* globalCtx, PSkinAwb* skin);
s32 func_800A698C(PSkinAwb* skin, SkinLimb** limbs, MtxF* arg2, u8 arg3, u8 arg4);
s32 func_800A6AC4(PSkinAwb* skin, MtxF* arg1, Actor* actor, s32 arg3);
z_skin_matrix.c decompiled (1 non matching, 1 non equivalent) (#243) * func_800A7BE4 and func_800A7C20 done - func_800A7BE4 copy of "Math_Vec3f_ToVec3s" in z_lib.c - func_800A7C20 copy of "Math_Vec3s_ToVec3f" in z_lib.c * done func_800A7A24 * func_800A76A4 done * func_800A6E10 done * func_800A6EF4 done * func_800A6FA0 done * func_800A72FC done * Deleted z_skin_matrix.data.s and updated spec * func_800A730C done * func_800A735C done * func_800A7E70 done, func_800A7C60 matching but I'm not happy with it (weird types in function params) * Corrections. func_800A7C60 in skin_matrix done, Matrix_MtxFToMtx in sys_matrix done. * func_800A7EC0 nonmatching * func_800A8030 nonmatching but VERY close (two registers swapped) * func_800A8030 done * updating comments * func_800A7704 done * func_800A7894 done * halfway through deciphering mips_to_c for func_800A73E0 * func_800A73E0 functional but non-matching (saved register differences and probably regalloc) * Renaming some arguments and rewriting comments * Renamed files across whole project and deleted asm nonmatchings * ran format.sh * fixed function name * fixing multiplcation order in SkinMatrix_MtxFMtxFMult * Corrections in SkinMatrix_MtxFMtxFMult * Formatting changes after review * Changes as per code review * fixing rename error * fixing rename error * rename fixes * fixing function rename error * ran ./format.sh * last couple of changes as per code review * renamed SetScaling -> SetScale * Skin_Matrix_Invert -> SkinMatrix_Invert * Renaming and fixing debug message print * Renamed argument "mf" to more specific "clear" in SkinMatrix_GetClear * renamed again to "mfp" * snake case to camel case changes
2020-08-08 15:23:16 +00:00
void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
void SkinMatrix_MtxFMtxFMult(MtxF* mfB, MtxF* mfA, MtxF* dest);
void SkinMatrix_GetClear(MtxF** mf);
void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
void SkinMatrix_SetRotateRPY(MtxF* mf, s16 roll, s16 pitch, s16 yaw);
void SkinMatrix_SetTranslate(MtxF* mf, f32 x, f32 y, f32 z);
void SkinMatrix_SetScaleRotateYRPTranslate(MtxF* mf, f32 scaleX, f32 scaleY, f32 scaleZ, s16 yaw, s16 roll, s16 pitch,
f32 dx, f32 dy, f32 dz);
void SkinMatrix_SetRotateRPYTranslate(MtxF* mf, s16 roll, s16 pitch, s16 yaw, f32 dx, f32 dy, f32 dz);
z_skin_matrix.c decompiled (1 non matching, 1 non equivalent) (#243) * func_800A7BE4 and func_800A7C20 done - func_800A7BE4 copy of "Math_Vec3f_ToVec3s" in z_lib.c - func_800A7C20 copy of "Math_Vec3s_ToVec3f" in z_lib.c * done func_800A7A24 * func_800A76A4 done * func_800A6E10 done * func_800A6EF4 done * func_800A6FA0 done * func_800A72FC done * Deleted z_skin_matrix.data.s and updated spec * func_800A730C done * func_800A735C done * func_800A7E70 done, func_800A7C60 matching but I'm not happy with it (weird types in function params) * Corrections. func_800A7C60 in skin_matrix done, Matrix_MtxFToMtx in sys_matrix done. * func_800A7EC0 nonmatching * func_800A8030 nonmatching but VERY close (two registers swapped) * func_800A8030 done * updating comments * func_800A7704 done * func_800A7894 done * halfway through deciphering mips_to_c for func_800A73E0 * func_800A73E0 functional but non-matching (saved register differences and probably regalloc) * Renaming some arguments and rewriting comments * Renamed files across whole project and deleted asm nonmatchings * ran format.sh * fixed function name * fixing multiplcation order in SkinMatrix_MtxFMtxFMult * Corrections in SkinMatrix_MtxFMtxFMult * Formatting changes after review * Changes as per code review * fixing rename error * fixing rename error * rename fixes * fixing function rename error * ran ./format.sh * last couple of changes as per code review * renamed SetScaling -> SetScale * Skin_Matrix_Invert -> SkinMatrix_Invert * Renaming and fixing debug message print * Renamed argument "mf" to more specific "clear" in SkinMatrix_GetClear * renamed again to "mfp" * snake case to camel case changes
2020-08-08 15:23:16 +00:00
Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src);
void func_800A7EC0(MtxF* mf, s16 a, f32 x, f32 y, f32 z);
void Sram_InitNewSave(void);
void Sram_InitDebugSave(void);
void Sram_OpenSave(SramContext* sramCtx);
void Sram_WriteSave(SramContext* sramCtx);
void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChoose, SramContext* sramCtx);
void Sram_InitSave(FileChooseContext* fileChoose, SramContext* sramCtx);
void Sram_EraseSave(FileChooseContext* fileChoose, SramContext* sramCtx);
void Sram_CopySave(FileChooseContext* fileChoose, SramContext* sramCtx);
void Sram_Write16Bytes(SramContext* sramCtx);
void Sram_InitSram(GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(GameState* gameState, SramContext* sramCtx);
void Sram_Init(GlobalContext* globalCtx, SramContext* sramCtx);
void SsSram_Init(u32 addr, u8 handleType, u8 handleDomain, u8 handleLatency, u8 handlePageSize, u8 handleRelDuration,
u8 handlePulse, u32 handleSpeed);
void SsSram_Dma(void* dramAddr, size_t size, s32 direction);
void SsSram_ReadWrite(u32 addr, void* dramAddr, size_t size, s32 direction);
void func_800A9F30(PadMgr*, s32);
2020-03-17 04:31:30 +00:00
void func_800A9F6C(f32, u8, u8, u8);
void func_800AA000(f32, u8, u8, u8);
void func_800AA0B4();
void func_800AA0F0(void);
2020-03-17 04:31:30 +00:00
u32 func_800AA148();
void func_800AA15C();
void func_800AA16C();
void func_800AA178(u32);
View* View_New(GraphicsContext* gfxCtx);
void View_Free(View* view);
void View_Init(View*, GraphicsContext*);
void func_800AA358(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up);
void func_800AA3F0(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up);
void View_SetScale(View* view, f32 scale);
void View_GetScale(View* view, f32* scale);
void func_800AA460(View* view, f32 fovy, f32 near, f32 far);
void func_800AA48C(View* view, f32* fovy, f32* near, f32* far);
void func_800AA4A8(View* view, f32 fovy, f32 near, f32 far);
void func_800AA4E0(View* view, f32* fovy, f32* near, f32* far);
void View_SetViewport(View* view, Viewport* viewport);
void View_GetViewport(View* view, Viewport* viewport);
2020-04-04 17:17:56 +00:00
void func_800AA76C(View* view, f32 arg1, f32 arg2, f32 arg3);
void func_800AA78C(View* view, f32 arg1, f32 arg2, f32 arg3);
s32 func_800AA7AC(View* view, f32 arg1);
2020-04-04 17:17:56 +00:00
void func_800AA7B8(View* view);
void func_800AA814(View* view);
void func_800AA840(View* view, Vec3f vec1, Vec3f vec2, f32 arg3);
s32 func_800AA890(View* view, Mtx* mtx);
void func_800AAA50(View* view, s32 arg1);
s32 func_800AAA9C(View* view);
s32 func_800AB0A8(View* view);
s32 func_800AB2C4(View* view);
s32 func_800AB560(View* view);
s32 func_800AB944(View* view);
s32 func_800AB9EC(View* view, s32 arg1, Gfx** p);
2020-04-04 17:17:56 +00:00
s32 func_800ABE74(f32 eyeX, f32 eyeY, f32 eyeZ);
void ViMode_LogPrint(OSViMode* viMode);
void ViMode_Configure(ViMode* viMode, s32 mode, s32 type, s32 unk_70, s32 unk_74, s32 unk_78, s32 unk_7C, s32 width,
s32 height, s32 unk_left, s32 unk_right, s32 unk_top, s32 unk_bottom);
void ViMode_Save(ViMode* viMode);
void ViMode_Load(ViMode* viMode);
void ViMode_Init(ViMode* viMode);
void ViMode_Destroy(ViMode* viMode);
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
void ViMode_Update(ViMode* viMode, Input* input);
void func_800ACE70(struct_801664F0* this);
void func_800ACE90(struct_801664F0* this);
void func_800ACE98(struct_801664F0* this, Gfx** gfxp);
void VisMono_Init(VisMono* this);
void VisMono_Destroy(VisMono* this);
void VisMono_UpdateTexture(VisMono* this, u16* tex);
Gfx* VisMono_DrawTexture(VisMono* this, Gfx* gfx);
void VisMono_Draw(VisMono* this, Gfx** gfxp);
void VisMono_DrawOld(VisMono* this);
void func_800AD920(struct_80166500* this);
void func_800AD950(struct_80166500* this);
void func_800AD958(struct_80166500* this, Gfx** gfxp);
void Skybox_Init(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyboxId);
Mtx* SkyboxDraw_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z);
void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId, s16 alpha, f32 x, f32 y, f32 z);
void SkyboxDraw_Update(SkyboxContext* skyboxCtx);
void PlayerCall_InitFuncPtrs(void);
void TransitionUnk_InitGraphics(TransitionUnk* this);
void TransitionUnk_InitData(TransitionUnk* this);
void TransitionUnk_Destroy(TransitionUnk* this);
TransitionUnk* TransitionUnk_Init(TransitionUnk* this, s32 row, s32 col);
void TransitionUnk_SetData(TransitionUnk* this);
void TransitionUnk_Draw(TransitionUnk* this, Gfx**);
void func_800B23E8(TransitionUnk* this);
void TransitionTriforce_Start(void* this);
void* TransitionTriforce_Init(void* this);
void TransitionTriforce_Destroy(void* this);
void TransitionTriforce_Update(void* this, s32 updateRate);
void TransitionTriforce_SetColor(void* this, u32 color);
void TransitionTriforce_SetType(void* this, s32 type);
void TransitionTriforce_Draw(void* this, Gfx** gfxP);
s32 TransitionTriforce_IsDone(void* this);
void TransitionWipe_Start(void* this);
void* TransitionWipe_Init(void* this);
void TransitionWipe_Destroy(void* this);
void TransitionWipe_Update(void* this, s32 updateRate);
void TransitionWipe_Draw(void* this, Gfx** gfxP);
s32 TransitionWipe_IsDone(void* this);
void TransitionWipe_SetType(void* this, s32 type);
void TransitionWipe_SetColor(void* this, u32 color);
void TransitionCircle_Start(void* thisx);
void* TransitionCircle_Init(void* thisx);
void TransitionCircle_Destroy(void* thisx);
void TransitionCircle_Update(void* thisx, s32 updateRate);
void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
s32 TransitionCircle_IsDone(void* thisx);
void TransitionCircle_SetType(void* thisx, s32 type);
void TransitionCircle_SetColor(void* thisx, u32 color);
void TransitionCircle_SetEnvColor(void* thisx, u32 color);
void TransitionFade_Start(void* this);
void* TransitionFade_Init(void* this);
void TransitionFade_Destroy(void* this);
void TransitionFade_Update(void* this, s32 updateRate);
void TransitionFade_Draw(void* this, Gfx** gfxP);
s32 TransitionFade_IsDone(void* this);
void TransitionFade_SetColor(void* this, u32 color);
void TransitionFade_SetType(void* this, s32 type);
2020-07-09 01:54:39 +00:00
void ShrinkWindow_SetVal(s32 value);
u32 ShrinkWindow_GetVal(void);
void ShrinkWindow_SetCurrentVal(s32 nowVal);
u32 ShrinkWindow_GetCurrentVal(void);
void ShrinkWindow_Init(void);
void ShrinkWindow_Destroy(void);
void ShrinkWindow_Update(s32 updateRate);
// ? DbCamera_AddVecSph(?);
// ? DbCamera_CalcUpFromPitchYawRoll(?);
// ? DbCamera_SetTextValue(?);
// ? DbCamera_Vec3SToF(?);
// ? DbCamera_Vec3FToS(?);
// ? DbCamera_CopyVec3f(?);
// ? DbCamera_Vec3SToF2(?);
2020-03-17 04:31:30 +00:00
// ? func_800B3F94(?);
// ? func_800B3FF4(?);
// ? func_800B404C(?);
// ? func_800B4088(?);
// ? func_800B41DC(?);
// ? func_800B42C0(?);
// ? func_800B4370(?);
// ? func_800B44E0(?);
// ? DbCamera_PrintPoints(?);
// ? DbCamera_PrintF32Bytes(?);
// ? DbCamera_PrintU16Bytes(?);
// ? DbCamera_PrintS16Bytes(?);
// ? DbCamera_PrintCutBytes(?);
void DbCamera_Init(DbCamera* dbCamera, Camera* cameraPtr);
// ? DbgCamera_Enable(?);
void DbCamera_Update(DbCamera* dbCamera, Camera* cam);
// ? DbCamera_GetFirstAvailableLetter(?);
// ? DbCamera_InitCut(?);
// ? DbCamera_ResetCut(?);
// ? DbCamera_CalcMempakAllocSize(?);
// ? DbCamera_GetMempakAllocSize(?);
// ? DbCamera_DrawSlotLetters(?);
// ? DbCamera_PrintAllCuts(?);
2020-03-17 04:31:30 +00:00
// ? func_800B91B0(?);
void DbCamera_Reset(Camera* cam, DbCamera* dbCam);
// ? DbCamera_UpdateDemoControl(?);
2020-03-17 04:31:30 +00:00
// ? func_800BB0A0(?);
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_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyframe, f32* curFrame);
2020-06-07 23:38:33 +00:00
s32 Mempak_Init(s32 controllerNb);
s32 Mempak_GetFreeBytes(s32 controllerNb);
s32 Mempak_FindFile(s32 controllerNb, char start, char end);
s32 Mempak_Write(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
s32 Mempak_Read(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
s32 Mempak_Alloc(s32 controllerNb, char* idx, s32 size);
s32 Mempak_DeleteFile(s32 controllerNb, char idx);
s32 Mempak_GetFileSize(s32 controllerNb, char idx);
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
2020-03-17 04:31:30 +00:00
void KaleidoManager_Init(GlobalContext* globalCtx);
void KaleidoManager_Destroy();
void* KaleidoManager_GetRamAddr(void* vram);
void KaleidoScopeCall_LoadPlayer();
void KaleidoScopeCall_Init(GlobalContext* globalCtx);
void KaleidoScopeCall_Destroy(GlobalContext* globalCtx);
void KaleidoScopeCall_Update(GlobalContext* globalCtx);
2020-03-22 21:50:11 +00:00
void KaleidoScopeCall_Draw(GlobalContext* globalCtx);
void func_800BC490(GlobalContext* globalCtx, s16 point);
s32 func_800BC56C(GlobalContext* globalCtx, s16 arg1);
void func_800BC590(GlobalContext* globalCtx);
void func_800BC5E0(GlobalContext* globalCtx, s32 arg1);
Gfx* func_800BC8A0(GlobalContext* globalCtx, Gfx* gfx);
void Gameplay_Destroy(GameState* thisx);
void Gameplay_Init(GameState* thisx);
void Gameplay_Main(GameState* thisx);
s32 Gameplay_InCsMode(GlobalContext* globalCtx);
f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec);
void* Gameplay_LoadFile(GlobalContext* globalCtx, RomFile* file);
void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn);
void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest);
s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx);
s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx);
s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status);
void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId);
void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx);
Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId);
EnDivingGame OK (#745) * update * EnDivingGame_Draw OK * dont feel like working on this function today * fixed build errors * fixing some merge conflicts Signed-off-by: Angie <angheloalf95@gmail.com> * more conflict fixing Signed-off-by: Angie <angheloalf95@gmail.com> * all merge conflicts fixed Signed-off-by: Angie <angheloalf95@gmail.com> * EnDivingGame_Update OK Signed-off-by: Angie <angheloalf95@gmail.com> * remove DECR Signed-off-by: Angie <angheloalf95@gmail.com> * format and unused_asm Signed-off-by: Angie <angheloalf95@gmail.com> * change reloc in spec Signed-off-by: Angie <angheloalf95@gmail.com> * damn reloc Signed-off-by: Angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * use OPEN_DISPS macro Signed-off-by: Angie <angheloalf95@gmail.com> * batch of suggestions Signed-off-by: Angie <angheloalf95@gmail.com> * more suggestions Signed-off-by: Angie <angheloalf95@gmail.com> * more changes, but this isn't ready yet Signed-off-by: Angie <angheloalf95@gmail.com> * rename two timers Signed-off-by: angie <angheloalf95@gmail.com> * Update src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * grabbedRuppiesCounter Signed-off-by: angie <angheloalf95@gmail.com> * a lot of vec Signed-off-by: angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * fix some typos Signed-off-by: angie <angheloalf95@gmail.com> * allRupeesThrowed Signed-off-by: angie <angheloalf95@gmail.com> * rupeesLeftToThrow Signed-off-by: Angie <angheloalf95@gmail.com> * boolean changes and minor comments Signed-off-by: Angie <angheloalf95@gmail.com> * and more renaming Signed-off-by: Angie <angheloalf95@gmail.com> * renaiming and chained assign Signed-off-by: Angie <angheloalf95@gmail.com> * rename 3 functions Signed-off-by: Angie <angheloalf95@gmail.com> * final rename and add two enums Signed-off-by: angie <angheloalf95@gmail.com> * format Signed-off-by: angie <angheloalf95@gmail.com> * enum naming Signed-off-by: angie <angheloalf95@gmail.com> Co-authored-by: Lucas Shaw <lgs84@cornell.edu> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
2021-04-03 16:15:16 +00:00
s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye);
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 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up);
s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov);
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll);
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2);
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 arg3);
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 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 arg2);
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2);
void Gameplay_SaveSceneFlags(GlobalContext* globalCtx);
void Gameplay_SetupRespawnPoint(GlobalContext* globalCtx, s32 respawnMode, s32 playerParams);
void Gameplay_TriggerVoidOut(GlobalContext* globalCtx);
void Gameplay_TriggerRespawn(GlobalContext* globalCtx);
s32 func_800C0CB8(GlobalContext* globalCtx);
s32 FrameAdvance_IsEnabled(GlobalContext* globalCtx);
s32 func_800C0D34(GlobalContext* globalCtx, Actor* actor, s16* yaw);
EnDivingGame OK (#745) * update * EnDivingGame_Draw OK * dont feel like working on this function today * fixed build errors * fixing some merge conflicts Signed-off-by: Angie <angheloalf95@gmail.com> * more conflict fixing Signed-off-by: Angie <angheloalf95@gmail.com> * all merge conflicts fixed Signed-off-by: Angie <angheloalf95@gmail.com> * EnDivingGame_Update OK Signed-off-by: Angie <angheloalf95@gmail.com> * remove DECR Signed-off-by: Angie <angheloalf95@gmail.com> * format and unused_asm Signed-off-by: Angie <angheloalf95@gmail.com> * change reloc in spec Signed-off-by: Angie <angheloalf95@gmail.com> * damn reloc Signed-off-by: Angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * use OPEN_DISPS macro Signed-off-by: Angie <angheloalf95@gmail.com> * batch of suggestions Signed-off-by: Angie <angheloalf95@gmail.com> * more suggestions Signed-off-by: Angie <angheloalf95@gmail.com> * more changes, but this isn't ready yet Signed-off-by: Angie <angheloalf95@gmail.com> * rename two timers Signed-off-by: angie <angheloalf95@gmail.com> * Update src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * grabbedRuppiesCounter Signed-off-by: angie <angheloalf95@gmail.com> * a lot of vec Signed-off-by: angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * fix some typos Signed-off-by: angie <angheloalf95@gmail.com> * allRupeesThrowed Signed-off-by: angie <angheloalf95@gmail.com> * rupeesLeftToThrow Signed-off-by: Angie <angheloalf95@gmail.com> * boolean changes and minor comments Signed-off-by: Angie <angheloalf95@gmail.com> * and more renaming Signed-off-by: Angie <angheloalf95@gmail.com> * renaiming and chained assign Signed-off-by: Angie <angheloalf95@gmail.com> * rename 3 functions Signed-off-by: Angie <angheloalf95@gmail.com> * final rename and add two enums Signed-off-by: angie <angheloalf95@gmail.com> * format Signed-off-by: angie <angheloalf95@gmail.com> * enum naming Signed-off-by: angie <angheloalf95@gmail.com> Co-authored-by: Lucas Shaw <lgs84@cornell.edu> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
2021-04-03 16:15:16 +00:00
s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* pos);
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_Destroy(PreRender* this);
void func_800C0F28(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_800C1258(PreRender* this, Gfx** gfxp);
void func_800C170C(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave, u32 r, u32 g, u32 b, u32 a);
void func_800C1AE8(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave);
void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave);
void func_800C1E9C(PreRender* this, Gfx** gfxp);
void func_800C1F20(PreRender* this, Gfx** gfxp);
void func_800C1FA4(PreRender* this, Gfx** gfxp);
void func_800C20B4(PreRender* this, Gfx** gfxp);
void func_800C2118(PreRender* this, Gfx** gfxp);
void func_800C213C(PreRender* this, Gfx** gfxp);
void func_800C24BC(PreRender* this, Gfx** gfxp);
void func_800C24E0(PreRender* this, Gfx** gfxp);
void func_800C2500(PreRender* this, s32 x, s32 y);
void func_800C2FE4(PreRender* this);
void PreRender_Calc(PreRender* this);
2020-03-17 04:31:30 +00:00
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, u32 size);
void THGA_Dt(TwoHeadGfxArena* thga);
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
void THGA_Init(TwoHeadGfxArena* thga);
s32 THGA_GetSize(TwoHeadGfxArena* thga);
Gfx* THGA_GetHead(TwoHeadGfxArena* thga);
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start);
Gfx* THGA_GetTail(TwoHeadGfxArena* thga);
Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga);
Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga);
Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, u32 size);
Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga);
Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga);
void* THA_GetHead(TwoHeadArena* tha);
void THA_SetHead(TwoHeadArena* tha, void* start);
void* THA_GetTail(TwoHeadArena* tha);
void* THA_AllocStart(TwoHeadArena* tha, u32 size);
void* THA_AllocStart1(TwoHeadArena* tha);
void* THA_AllocEnd(TwoHeadArena* tha, u32 size);
void* THA_AllocEndAlign16(TwoHeadArena* tha, u32 size);
void* THA_AllocEndAlign(TwoHeadArena* tha, u32 size, u32 mask);
s32 THA_GetSize(TwoHeadArena* tha);
u32 THA_IsCrash(TwoHeadArena* tha);
void THA_Init(TwoHeadArena* tha);
void THA_Ct(TwoHeadArena* tha, void* ptr, u32 size);
void THA_Dt(TwoHeadArena* tha);
void func_800C3C20(void);
void func_800C3C80(AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);
void AudioMgr_HandlePRENMI(AudioMgr* audioMgr);
void AudioMgr_ThreadEntry(void* arg0);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
2020-03-17 04:31:30 +00:00
void TitleSetup_InitImpl(GameState* gameState);
void TitleSetup_Destroy(GameState* gameState);
void TitleSetup_Init(GameState* gameState);
void GameState_FaultPrint(void);
void GameState_SetFBFilter(Gfx** gfx);
2020-03-17 04:31:30 +00:00
// ? func_800C4344(?);
void GameState_DrawInputDisplay(u16 input, Gfx** gfx);
void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx);
void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
2020-03-17 04:31:30 +00:00
// ? func_800C49F4(?);
void GameState_ReqPadData(GameState* gameState);
void GameState_Update(GameState* gameState);
void GameState_InitArena(GameState* gameState, size_t size);
void GameState_Realloc(GameState* gameState, size_t size);
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx);
void GameState_Destroy(GameState* gameState);
GameStateFunc GameState_GetInit(GameState* gameState);
u32 GameState_IsRunning(GameState* gameState);
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line);
2020-03-17 04:31:30 +00:00
void func_800C55D0(GameAlloc* this);
void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, s32 line);
void* GameAlloc_Malloc(GameAlloc* this, u32 size);
void GameAlloc_Free(GameAlloc* this, void* data);
void GameAlloc_Cleanup(GameAlloc* this);
void GameAlloc_Init(GameAlloc* this);
void Graph_FaultClient();
void Graph_DisassembleUCode(Gfx* workBuf);
void Graph_UCodeFaultClient(Gfx* workBuf);
void* Graph_InitTHGA(GraphicsContext* gfxCtx);
GameStateOverlay* Graph_GetNextGameState(GameState* gameState);
void Graph_Init(GraphicsContext* gfxCtx);
void Graph_Destroy(GraphicsContext* gfxCtx);
void Graph_TaskSet00(GraphicsContext* gfxCtx);
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState);
2020-03-17 04:31:30 +00:00
void Graph_ThreadEntry(void*);
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, s32 line);
void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, s32 line);
Gfx* Graph_GfxPlusOne(Gfx* gfx);
Gfx* Graph_BranchDlist(Gfx* gfx, Gfx* dst);
void* Graph_DlistAlloc(Gfx** gfx, u32 size);
2020-03-17 04:31:30 +00:00
ListAlloc* ListAlloc_Init(ListAlloc* this);
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
void ListAlloc_Free(ListAlloc* this, void* data);
void ListAlloc_FreeAll(ListAlloc* this);
void Main_LogSystemHeap(void);
void Main(void* arg);
OSMesgQueue* PadMgr_LockSerialMesgQueue(PadMgr* padmgr);
void PadMgr_UnlockSerialMesgQueue(PadMgr* padmgr, OSMesgQueue* ctrlrqueue);
void PadMgr_LockPadData(PadMgr* padmgr);
void PadMgr_UnlockPadData(PadMgr* padmgr);
void PadMgr_RumbleControl(PadMgr* padmgr);
void PadMgr_RumbleStop(PadMgr* padmgr);
void PadMgr_RumbleReset(PadMgr* padmgr);
void PadMgr_RumbleSet(PadMgr* padmgr, u8* ctrlrRumbles);
void PadMgr_ProcessInputs(PadMgr* padmgr);
void PadMgr_HandleRetraceMsg(PadMgr* padmgr);
void PadMgr_HandlePreNMI(PadMgr* padmgr);
// This function must remain commented out, because it is called incorrectly in
// fault.c (actual bug in game), and the compiler notices and won't compile it
// void PadMgr_RequestPadData(PadMgr* padmgr, Input* inputs, s32 mode);
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
void Sched_SwapFrameBuffer(CfbInfo* cfbInfo);
void func_800C84E4(SchedContext* sc, CfbInfo* cfbInfo);
void Sched_HandleReset(SchedContext* sc);
void Sched_HandleStart(SchedContext* sc);
void Sched_QueueTask(SchedContext* sc, OSScTask* task);
void Sched_Yield(SchedContext* sc);
OSScTask* func_800C89D4(SchedContext* sc, OSScTask* task);
s32 Sched_Schedule(SchedContext* sc, OSScTask** sp, OSScTask** dp, s32 state);
void func_800C8BC4(SchedContext* sc, OSScTask* task);
u32 Sched_IsComplete(SchedContext* sc, OSScTask* task);
void Sched_RunTask(SchedContext* sc, OSScTask* spTask, OSScTask* dpTask);
void Sched_HandleEntry(SchedContext* sc);
void Sched_HandleRetrace(SchedContext* sc);
void Sched_HandleRSPDone(SchedContext* sc);
void Sched_HandleRDPDone(SchedContext* sc);
void Sched_SendEntryMsg(SchedContext* sc);
void Sched_ThreadEntry(void* arg);
void Sched_Init(SchedContext* sc, void* stack, OSPri priority, UNK_TYPE arg3, UNK_TYPE arg4, IrqMgr* irqMgr);
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y);
void SpeedMeter_Init(SpeedMeter* this);
void SpeedMeter_Destroy(SpeedMeter* this);
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx);
void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* entry, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx,
u32 lrx, u32 uly, u32 lry);
void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxCtx);
void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, GameState* state);
2020-03-17 04:31:30 +00:00
void SysCfb_Init(s32 n64dd);
u32 SysCfb_GetFbPtr(s32 idx);
u32 SysCfb_GetFbEnd();
f32 Math_FactorialF(f32 n);
f32 Math_Factorial(s32 n);
f32 Math_PowF(f32 base, s32 exp);
f32 Math_SinF(f32 angle);
f32 Math_CosF(f32 angle);
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB,
f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB,
Vec3f* closestPoint);
void Math3D_LineClosestToPoint(Linef* line, Vec3f* pos, Vec3f* closestPoint);
s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA,
f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* point, Vec3f* closestPoint);
void Math3D_LineSplitRatio(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret);
f32 Math3D_Cos(Vec3f* a, Vec3f* b);
s32 Math3D_CosOut(Vec3f* a, Vec3f* b, f32* dst);
void Math3D_Vec3fReflect(Vec3f* vec, Vec3f* normal, Vec3f* reflVec);
s32 Math3D_PointInSquare2D(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y);
f32 Math3D_Dist1DSq(f32 a, f32 b);
f32 Math3D_Dist2DSq(f32 x0, f32 y0, f32 x1, f32 y1);
f32 Math3D_Vec3fMagnitudeSq(Vec3f* vec);
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
void Math3D_Vec3f_Cross(Vec3f* a, Vec3f* b, Vec3f* ret);
void Math3D_SurfaceNorm(Vec3f* va, Vec3f* vb, Vec3f* vc, Vec3f* normal);
f32 Math3D_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
s32 Math3D_PointRelativeToCubeFaces(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_PointRelativeToCubeEdges(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_PointRelativeToCubeVertices(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
void Math3D_RotateXZPlane(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d);
void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist);
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
s32 Math3D_TriChkPointParaYSlopedY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x);
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z,
f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist,
f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z,
f32 x, f32* yIntersect, f32 y0, f32 y1);
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 z, f32 x, f32 chkDist);
s32 Math3D_TriChkPointParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y,
f32 z, f32* xIntersect);
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y,
f32 z, f32* xIntersect, f32 x0, f32 x1);
s32 Math3D_TriChkPointParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 y, f32 z, f32 chkDist);
s32 Math3D_TriChkPointParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x,
f32 y, f32* zIntersect);
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x,
f32 y, f32* zIntersect, f32 z0, f32 z1);
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 x, f32 y, f32 chkDist);
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB,
Vec3f* intersect, s32 fromFront);
void Math3D_TriNorm(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc);
s32 Math3D_PointDistToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
s32 Math3D_LineVsSph(Sphere16* sphere, Linef* line);
s32 Math3D_TriVsSphIntersect(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersectA, Vec3f* intersectB);
s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri);
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace);
s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist);
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
void Math3D_DrawSphere(GlobalContext* globalCtx, Sphere16* sph);
void Math3D_DrawCylinder(GlobalContext* globalCtx, Cylinder16* cyl);
s16 Math_Atan2S(f32 x, f32 y);
f32 Math_Atan2F(f32 x, f32 y);
2020-03-17 04:31:30 +00:00
void Matrix_Init(GameState* gameState);
void Matrix_Push(void);
void Matrix_Pop(void);
2020-03-17 04:31:30 +00:00
void Matrix_Get(MtxF* dest);
void Matrix_Put(MtxF* src);
void Matrix_Mult(MtxF* mf, u8 mode);
void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode);
void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode);
void Matrix_RotateX(f32 x, u8 mode);
void Matrix_RotateY(f32 y, u8 mode);
void Matrix_RotateZ(f32 z, u8 mode);
void Matrix_RotateRPY(s16 x, s16 y, s16 z, u8 mode);
void Matrix_JointPosition(Vec3f* position, Vec3s* rotation);
2020-03-17 04:31:30 +00:00
void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec);
Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest);
Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line);
Mtx* Matrix_NewMtx(GraphicsContext* gfxCtx, char* file, s32 line);
Mtx* Matrix_MtxFToNewMtx(MtxF* src, GraphicsContext* gfxCtx);
2020-03-17 04:31:30 +00:00
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
void Matrix_MtxFCopy(MtxF* dest, MtxF* src);
void Matrix_MtxToMtxF(Mtx* src, MtxF* dest);
void Matrix_MultVec3fExt(Vec3f* src, Vec3f* dest, MtxF* mf);
void Matrix_Transpose(MtxF* mf);
2020-03-17 04:31:30 +00:00
void func_800D1FD4(MtxF* mf);
void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
void Matrix_RotateAxis(f32 f, Vec3f* vec, u8 mode);
2020-03-17 04:31:30 +00:00
MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line);
void func_800D2CEC(Mtx* mtx, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6);
u32 SysUcode_GetUCodeBoot(void);
u32 SysUcode_GetUCodeBootSize(void);
u32 SysUcode_GetUCode(void);
u32 SysUcode_GetUCodeData(void);
void func_800D2E30(UnkRumbleStruct* arg0);
void func_800D3140(UnkRumbleStruct* arg0);
void func_800D3178(UnkRumbleStruct* arg0);
void func_800D31A0(void);
void func_800D31F0(void);
void func_800D3210(void);
2020-03-17 04:31:30 +00:00
void IrqMgr_AddClient(IrqMgr* this, IrqMgrClient* c, OSMesgQueue* msgQ);
void IrqMgr_RemoveClient(IrqMgr* this, IrqMgrClient* c);
void IrqMgr_SendMesgForClient(IrqMgr* this, OSMesg msg);
void IrqMgr_JamMesgForClient(IrqMgr* this, OSMesg msg);
2020-03-22 21:50:11 +00:00
void IrqMgr_HandlePreNMI(IrqMgr* this);
2020-03-17 04:31:30 +00:00
void IrqMgr_CheckStack();
void IrqMgr_HandlePRENMI450(IrqMgr* this);
void IrqMgr_HandlePRENMI480(IrqMgr* this);
void IrqMgr_HandlePRENMI500(IrqMgr* this);
void IrqMgr_HandleRetrace(IrqMgr* this);
void IrqMgr_ThreadEntry(void* arg0);
void IrqMgr_Init(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount);
2020-03-17 04:31:30 +00:00
void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
void* DebugArena_Malloc(u32 size);
void* DebugArena_MallocDebug(u32 size, const char* file, s32 line);
void* DebugArena_MallocR(u32 size);
void* DebugArena_MallocRDebug(u32 size, const char* file, s32 line);
void* DebugArena_Realloc(void* ptr, u32 newSize);
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
void DebugArena_Free(void* ptr);
void DebugArena_FreeDebug(void* ptr, const char* file, s32 line);
void* DebugArena_Calloc(u32 num, u32 size);
void DebugArena_Display(void);
2020-03-17 04:31:30 +00:00
void DebugArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
void DebugArena_Check(void);
2020-03-17 04:31:30 +00:00
void DebugArena_Init(void* start, u32 size);
void DebugArena_Cleanup(void);
u8 DebugArena_IsInitalized(void);
2020-03-17 04:31:30 +00:00
void Fault_SleepImpl(u32);
void Fault_ClientProcessThread(void* arg);
2020-03-17 04:31:30 +00:00
void Fault_ProcessClientContext(FaultClientContext*);
u32 Fault_ProcessClient(u32, u32, u32);
void Fault_AddClient(FaultClient*, void*, void*, void*);
void Fault_RemoveClient(FaultClient*);
void Fault_AddAddrConvClient(FaultAddrConvClient*, void*, void*);
void Fault_RemoveAddrConvClient(FaultAddrConvClient*);
u32 Fault_ConvertAddress(FaultAddrConvClient*);
void Fault_Sleep(u32);
void Fault_PadCallback(Input*);
void Fault_UpdatePadImpl();
u32 Fault_WaitForInputImpl();
2020-03-17 04:31:30 +00:00
void Fault_WaitForInput();
void Fault_DrawRec(s32, s32, s32, s32, u16);
void Fault_FillScreenBlack();
void Fault_FillScreenRed();
void Fault_DrawCornerRec(u16);
void Fault_PrintFReg(s32, f32*);
void Fault_LogFReg(s32, f32*);
void Fault_PrintFPCR(u32);
void Fault_LogFPCR(u32);
void Fault_PrintThreadContext(OSThread*);
void Fault_LogThreadContext(OSThread*);
OSThread* Fault_FindFaultedThread();
void Fault_Wait5Seconds();
void Fault_WaitForButtonCombo();
void Fault_DrawMemDumpPage(const char*, u32*, u32);
void Fault_DrawMemDump(u32, u32, u32, u32);
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32* raPtr);
void Fault_DrawStackTrace(OSThread* thread, s32 x, s32 y, s32 height);
void Fault_LogStackTrace(OSThread* thread, s32 height);
2020-03-17 04:31:30 +00:00
void Fault_ResumeThread(OSThread*);
void Fault_CommitFB();
void Fault_ProcessClients();
void Fault_UpdatePad();
void Fault_ThreadEntry(void*);
void Fault_SetFB(void*, u16, u16);
void Fault_Init(void);
2020-03-17 04:31:30 +00:00
void Fault_HangupFaultClient(const char*, const char*);
void Fault_AddHungupAndCrashImpl(const char*, const char*);
void Fault_AddHungupAndCrash(const char*, u32);
void FaultDrawer_SetOsSyncPrintfEnabled(u32);
void FaultDrawer_DrawRecImpl(s32, s32, s32, s32, u16);
void FaultDrawer_DrawChar(char);
s32 FaultDrawer_ColorToPrintColor(u16);
void FaultDrawer_UpdatePrintColor();
void FaultDrawer_SetForeColor(u16);
void FaultDrawer_SetBackColor(u16);
void FaultDrawer_SetFontColor(u16);
void FaultDrawer_SetCharPad(s8, s8);
void FaultDrawer_SetCursor(s32, s32);
void FaultDrawer_FillScreen();
void* FaultDrawer_FormatStringFunc(void*, const char*, u32);
2020-03-17 04:31:30 +00:00
void FaultDrawer_VPrintf(const char*, char*);
void FaultDrawer_Printf(const char*, ...);
void FaultDrawer_DrawText(s32, s32, const char*, ...);
void FaultDrawer_SetDrawerFB(void*, u16, u16);
2020-03-22 21:50:11 +00:00
void FaultDrawer_SetInputCallback(void (*)());
2020-03-17 04:31:30 +00:00
void FaultDrawer_SetDefault();
// ? UCodeDisas_TranslateAddr(?);
// ? UCodeDisas_ParseCombineColor(?);
// ? UCodeDisas_ParseCombineAlpha(?);
void UCodeDisas_Init(UCodeDisas*);
void UCodeDisas_Destroy(UCodeDisas*);
// ? UCodeDisas_SetCurUCodeImpl(?);
// ? UCodeDisas_ParseGeometryMode(?);
// ? UCodeDisas_ParseRenderMode(?);
// ? UCodeDisas_PrintVertices(?);
void UCodeDisas_Disassemble(UCodeDisas*, Gfx*);
void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
2020-03-17 04:31:30 +00:00
// ? func_800DACC0(?);
// ? func_800DB03C(?);
Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
2020-03-17 04:31:30 +00:00
// ? func_800DB2C0(?);
// ? func_800DB330(?);
// ? func_800DB3D8(?);
// ? func_800DB480(?);
// ? func_800DB4E4(?);
// ? func_800DB680(?);
// ? func_800DB828(?);
// ? func_800DBA40(?);
// ? func_800DBAE8(?);
// ? func_800DBB9C(?);
// ? func_800DBBD4(?);
// ? AudioSynth_SetBuffer(?);
// ? AudioSynth_DMemMove(?);
// ? AudioSynth_InterL(?);
2020-03-17 04:31:30 +00:00
// ? func_800DBCD4(?);
// ? func_800DBD10(?);
// ? AudioSynth_SaveBuffer(?);
// ? AudioSynth_EnvSetup2(?);
// ? AudioSynth_UnkCmd17(?);
// ? AudioSynth_HiLoGain(?);
// ? AudioSynth_UnkCmd19(?);
// ? AudioSynth_UnkCmd3(?);
// ? AudioSynth_SetFilter(?);
// ? AudioSynth_SetFilterCount(?);
2020-03-17 04:31:30 +00:00
// ? func_800DBEB0(?);
// ? func_800DBF5C(?);
// ? AudioSynth_LoadRingBuffer(?);
// ? AudioSynth_SaveRingBuffer(?);
// ? AudioSynth_SaveBuffer(?);
2020-03-17 04:31:30 +00:00
// ? func_800DC124(?);
// ? func_800DC164(?);
// ? func_800DC1D8(?);
// ? func_800DC2DC(?);
// ? func_800DC384(?);
// ? func_800DC910(?);
// ? func_800DD62C(?);
// ? func_800DD6CC(?);
// ? func_800DD9F4(?);
// ? func_800DDB64(?);
f32 func_800DDE20(f32 arg0);
void func_800DDE3C(void);
void Audio_ResetLoadStatus(void);
void Audio_DiscardBank(s32 bankId);
void Audio_DiscardSequence(s32 seqId);
void func_800DE238(void* mem, u32 size);
void* func_800DE258(SoundAllocPool* pool, u32 size);
void* func_800DE2B0(SoundAllocPool* pool, u32 size);
void* Audio_AllocDmaMemory(SoundAllocPool* pool, u32 size);
void* Audio_AllocDmaMemoryZeroed(SoundAllocPool* pool, u32 size);
void* Audio_AllocZeroed(SoundAllocPool* pool, u32 size);
void* Audio_Alloc(SoundAllocPool* pool, u32 size);
void Audio_SoundAllocPoolInit(SoundAllocPool* pool, void* memAddr, u32 size);
void Audio_PersistentPoolClear(PersistentPool* persistent);
void Audio_TemporaryPoolClear(TemporaryPool* temporary);
void func_800DE4B0(s32 poolIdx);
void Audio_InitMainPools(s32 sizeForAudioInitPool);
void Audio_SessionPoolsInit(AudioPoolSplit4* split);
void Audio_SeqAndBankPoolInit(AudioPoolSplit2* split);
void Audio_PersistentPoolsInit(AudioPoolSplit3* split);
void Audio_TemporaryPoolsInit(AudioPoolSplit3* split);
void* Audio_AllocBankOrSeq(s32 poolIdx, s32 size, s32 arg2, s32 id);
void* func_800DF074(s32 poolIdx, s32 arg1, s32 id);
void* func_800DF0CC(s32 poolIdx, s32 arg1, s32 id);
void func_800DF5DC(s16* arg0, s32 arg1);
void func_800DF630(s16* arg0, s32 arg1);
void func_800DF688(s16* arg0, s32 arg1, s32 arg2);
void func_800DF7C4(void);
void func_800DF888(void);
s32 Audio_ResetStep(void);
void Audio_InitHeap(void);
void* func_800E04E8(s32 poolIdx, s32 id);
void* func_800E0540(s32 poolIdx, s32 id, u32 size);
void* func_800E05C4(u32 size, s32 arg1, void* arg2, s8 arg3, s32 arg4);
void func_800E0634(u32 arg0, u32 arg1);
UnkHeapEntry* func_800E06CC(u32 size);
void func_800E0964(UnkHeapEntry* entry, s32 bankId);
void func_800E0AD8(UnkHeapEntry* entry);
void func_800E0BB4(UnkHeapEntry* entry, AudioBankSample* sample);
UnkHeapEntry* func_800E0BF8(u32 size);
2020-03-17 04:31:30 +00:00
// ? func_800E0C80(?);
void func_800E0CBC(void);
void func_800E0E6C(s32 id);
void func_800E0E90(s32 id);
void func_800E0EB4(s32 arg0, s32 id);
void func_800E1148(void);
void func_800E11F0(void);
s32 func_800E12DC(s32 arg0, s32 arg1, s32 arg2, u8* arg3, s32 arg4);
void func_800E1618(s32 arg0);
s32 Audio_IsBankLoadComplete(s32 bankId);
s32 Audio_IsSeqLoadComplete(s32 seqId);
void Audio_SetBankLoadStatus(s32 bankId, s32 status);
void Audio_SetSeqLoadStatus(s32 seqId, s32 status);
void func_800E1C18(s32 channelIdx, s32 arg1);
s32 func_800E1D64(s32 arg0, s32 arg1, s32 arg2);
void Audio_AudioSeqAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
void Audio_AudioTableAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
void Audio_AudioBankAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
u8* func_800E1F38(s32 arg0, u32* arg1);
void func_800E1F7C(s32 arg0);
s32 func_800E20D4(s32 playerIdx, s32 seqId, s32 arg2);
s32 func_800E2124(s32 playerIdx, s32 seqId, s32 arg2);
void Audio_ProcessLoads(s32 resetStatus);
void func_800E301C(void* callback);
void Audio_ContextInit(void* heap, u32 heapSize);
void Audio_SyncLoadsInit(void);
s32 Audio_SyncLoadSample(s32 arg0, s32 arg1, u8* arg2);
s32 Audio_SyncLoadSeq(s32 seqIdx, u8* ramAddr, u8* arg2);
void Audio_AsyncLoadReqInit(void);
void func_800E4D94(void);
void func_800E4EEC(s32 arg0, s32 arg1, u8* arg2);
void func_800E4F58(void);
void func_800E4FB0(void);
AudioTask* func_800E4FE0(void);
void Audio_QueueCmdF32(u32 arg0, f32 arg1);
void Audio_QueueCmdS32(u32 arg0, s32 arg1);
void Audio_QueueCmdS8(u32 arg0, s8 arg1);
void Audio_QueueCmdU16(u32 arg0, u16 arg1);
s32 Audio_ScheduleProcessCmds(void);
u32 func_800E5E20(u32* arg0);
u8* func_800E5E84(s32 arg0, u32* arg1);
s32 func_800E5EDC(void);
s32 func_800E5F88(u32 arg0);
void Audio_PreNMIInternal(void);
s32 func_800E6680(void);
u32 Audio_NextRandom(void);
void Audio_InitMesgQueues(void);
void Audio_osInvalDCache(void* buf, s32 size);
void Audio_osWritebackDCache(void* mem, s32 size);
s32 osAiSetNextBuffer(void*, u32);
void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb);
void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
void Audio_NoteInit(Note* note);
void Audio_NoteDisable(Note* note);
void Audio_ProcessNotes(void);
AudioBankSound* Audio_InstrumentGetAudioBankSound(Instrument* instrument, s32 semitone);
Instrument* Audio_GetInstrumentInner(s32 bankId, s32 instId);
Drum* Audio_GetDrum(s32 bankId, s32 drumId);
AudioBankSound* Audio_GetSfx(s32 bankId, s32 sfxId);
s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, void* arg3);
void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target);
void Audio_SeqChanLayerNoteDecay(SequenceChannelLayer* seqLayer);
void Audio_SeqChanLayerNoteRelease(SequenceChannelLayer* seqLayer);
s32 Audio_BuildSyntheticWave(Note* note, SequenceChannelLayer* seqLayer, s32 waveId);
void Audio_InitSyntheticWave(Note* note, SequenceChannelLayer* seqLayer);
void Audio_InitNoteList(AudioListItem* list);
void Audio_InitNoteLists(NotePool* pool);
void Audio_InitNoteFreeList(void);
void Audio_NotePoolClear(NotePool* pool);
void Audio_NotePoolFill(NotePool* pool, s32 count);
void Audio_AudioListPushFront(AudioListItem* list, AudioListItem* item);
void Audio_AudioListRemove(AudioListItem* item);
Note* Audio_PopNodeWithValueLessEqual(AudioListItem* list, s32 limit);
void Audio_NoteInitForLayer(Note* note, SequenceChannelLayer* seqLayer);
void func_800E82C0(Note* note, SequenceChannelLayer* seqLayer);
void Audio_NoteReleaseAndTakeOwnership(Note* note, SequenceChannelLayer* seqLayer);
Note* Audio_AllocNoteFromDisabled(NotePool* pool, SequenceChannelLayer* seqLayer);
Note* Audio_AllocNoteFromDecaying(NotePool* pool, SequenceChannelLayer* seqLayer);
Note* Audio_AllocNoteFromActive(NotePool* pool, SequenceChannelLayer* seqLayer);
Note* Audio_AllocNote(SequenceChannelLayer* seqLayer);
void Audio_NoteInitAll(void);
void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalculateVolume, s32 b);
void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer);
f32 Audio_GetPortamentoFreqScale(Portamento* p);
s16 Audio_GetVibratoPitchChange(VibratoState* vib);
f32 Audio_GetVibratoFreqScale(VibratoState* vib);
void Audio_NoteVibratoUpdate(Note* note);
void Audio_NoteVibratoInit(Note* note);
void Audio_NotePortamentoInit(Note* note);
void Audio_AdsrInit(AdsrState* adsr, AdsrEnvelope* envelope, s16* volOut);
f32 Audio_AdsrUpdate(AdsrState* adsr);
void Audio_SequenceChannelDisable(SequenceChannel* seqChannel);
void Audio_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer);
void Audio_SequencePlayerDisable(SequencePlayer* seqPlayer);
void Audio_AudioListPushBack(AudioListItem* list, AudioListItem* item);
void* Audio_AudioListPopBack(AudioListItem* list);
void Audio_ProcessSequences(s32 arg0);
void Audio_ProcessSequence(SequencePlayer* seqPlayer);
void Audio_ResetSequencePlayer(SequencePlayer* seqPlayer);
void func_800EC734(s32 seqPlayerIdx);
void Audio_InitSequencePlayers(void);
// ? Audio_GetOcaInput(?);
// ? Audio_OcaAdjStick(?);
2020-03-17 04:31:30 +00:00
// ? func_800ECAF0(?);
// ? Audio_OcaMapNoteValue(?);
2020-03-17 04:31:30 +00:00
// ? func_800ECB7C(?);
void func_800ECC04(u16);
2020-03-17 04:31:30 +00:00
// ? func_800ECDBC(?);
// ? func_800ECDF8(?);
// ? func_800ED200(?);
// ? func_800ED458(?);
void func_800ED858(u8);
void func_800ED93C(s8 songIdx, s8 arg1);
2020-03-17 04:31:30 +00:00
// ? func_800EDA3C(?);
// ? func_800EDD68(?);
// ? func_800EE170(?);
// ? func_800EE29C(?);
// ? func_800EE2D4(?);
// ? func_800EE318(?);
// ? func_800EE3C8(?);
OcarinaStaff* func_800EE3D4(void);
OcarinaStaff* Audio_OcaGetDisplayStaff(void);
2020-03-17 04:31:30 +00:00
// ? func_800EE404(?);
// ? func_800EE57C(?);
// ? func_800EE5EC(?);
// ? func_800EE6F4(?);
void func_800EE824(void);
2020-03-17 04:31:30 +00:00
// ? func_800EE930(?);
// ? func_800EE97C(?);
// ? func_800EE9D0(?);
void func_800EEA50(GfxPrint* printer);
2020-03-17 04:31:30 +00:00
// ? func_800F1BDC(?);
// ? func_800F2150(?);
// ? func_800F227C(?);
// ? func_800F2464(?);
// ? func_800F27A0(?);
// ? func_800F28AC(?);
// ? func_800F28B4(?);
// ? func_800F29FC(?);
// ? func_800F2A04(?);
void func_800F2D6C(const s8* str, u16 num);
2020-03-17 04:31:30 +00:00
// ? func_800F2E28(?);
void func_800F3054(void);
2020-03-17 04:31:30 +00:00
// ? func_800F3188(?);
// ? func_800F32F0(?);
// ? func_800F3468(?);
// ? func_800F35EC(?);
// ? func_800F37B8(?);
// ? func_800F3990(?);
void func_800F3A08(u8, u8, u8);
2020-03-17 04:31:30 +00:00
// ? func_800F3ED4(?);
void func_800F3F3C(u8);
2020-03-17 04:31:30 +00:00
// ? func_800F3F84(?);
void func_800F4010(Vec3f*, u16 sfxId, f32);
void func_800F41E0(Vec3f*, u16 sfxId, u8);
void func_800F4138(Vec3f*, u16 sfxId, f32);
void func_800F4190(Vec3f*, u16 sfxId);
void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2);
void func_800F4414(Vec3f* pos, u16 sfxId, f32);
void func_800F44EC(s8 arg0, s8 arg1);
void func_800F4524(Vec3f* arg0, u16 arg1, s8 arg2);
void func_800F4254(Vec3f* pos, u8 arg1);
void func_800F436C(Vec3f*, u16 sfxId, f32 arg2);
void func_800F4414(Vec3f*, u16 sfxId, f32 arg2);
void func_800F4634(Vec3f*, f32);
void func_800F46E0(Vec3f* pos, f32 arg0);
2020-03-17 04:31:30 +00:00
// ? func_800F4784(?);
void func_800F47BC(void);
void func_800F47FC(void);
void func_800F483C(u8 arg0, u8 arg1);
void func_800F4870(u8);
2020-03-17 04:31:30 +00:00
// ? func_800F491C(?);
void func_800F4A54(u8);
2020-03-17 04:31:30 +00:00
// ? func_800F4A70(?);
Morpha (ovl_Boss_Mo) (#438) * Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * it begins * more functions * another match * starting documentation * the big function works. also two more matches * small fix * data cleanup * removed .s * match with player * inching closer to matching * two more matches. almost there * OH MY GOD IT MATCHES * cleanup: part 1 of infinity * named a bunch of stuff * Naming particle fields * terminal commas * terminal commas * small enum fix * added description of droplet widths * merge * updating * Gfx * vt * xml * bgcheck * more on objects * unused stuff * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "44f5d7cb9" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "44f5d7cb9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6f874af4a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6f874af4a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * object names * fixes * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6f874af4a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6f874af4a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * ZAPD works * .s * merge * starting work * more stuff * builds OK * first pass * PR fixes (Louis) * Bg_toki_hikari all functions matching (#781) * starting toki_hikari * func_808BA018 matched and some work on other func * init and draw matched, one to go * matched final function, removed ASM, updated spec * adding suggested changes * Volvagia (ovl_Boss_Fd) and related actors (#352) * Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * Lots of functions matched. Some big ones are close. * Five left unmatched, one close. * Merged data and decompiled the giant function into something readable. Its branch structure has yet to be matched. * Three unmatched, one essentially matched, the rest matched. * More fixes. * Documented more of the structure and cleaned up a bit. * BossFd2, BgVbSima, and EnVbBall matched and documented * Also removed unneeded .s files * And need to name EnVbBall's functions * give this a shot * fix conflict * one more try * removing darkmeiro changes * and again * now OK from make clean * minor cleanup * One more matching function for BossFd * which means it doesn't need its .s * splitting * splitting * splitting * forgot some .s * fancy new names * fancy new names * trying again * sneaky .s files * sound effects and some hex to decimal conversions * Sound effects and static variable cleanup * format.sh and clean up static variables * sfx and formatting * ZAP and cleanup * small cleanup * cleanup and ZAP * ZAP * looking at the giant function again * looking at the giant function again * Only the big function left. * Those .s files aren't mine, officer * float literals might be fixed. regalloc still a nightmare * almost done with the big function * should make now * not much of a change * all functions match. rodata somehow doesn't. * forgot some things * lots of cleanup * and a little more * small error * large cleanup. Also BossFd has function names and inlined variable declarations * still more cleanup * the quest for 0.1f continues * forgot to put NON_MATCHING back in * Data structures fully documented. Still more cleanup. * DECR now works with BossFd2 * should match now * cleanup * small cleanup * cleanup and names * tiny thing * particles and headers and stuff * now with more enums * merge * test * end test * update * cleanup * object 2 * object 1 * doc object_fd2 * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6f874af4a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6f874af4a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * formatting * .s * merge actor * vertex arrays * a little more * formatting * merge opd * fixed damage check * cleanup * fixes * effect struct * review Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: fig02 <fig02srl@gmail.com> * fix mistake in z_bg_hidan_hamstep (#771) if you're just going to close this pr just wait a week and review it then. * ovl_En_River_Sound 1 non-matching (#786) * ovl_En_River_Sound * Implement review suggestions, run through clang-format * Responding to PR comments * Use CHECK_QUEST_ITEM, run through clang-tidy. * EnTp, 1 nonmatching, and object_tp (#782) * Data imported, 8 easy functions matched * Init only remaining nonmatching, data in * some renaming & fiddling with Init, still nonmatching * fix colours * Init still not matching * Decompile object_tp * renames * Rename func_80B20DE0 * Horrible new idea * Known equivalent, docs next * Another attempt * Finished naming in object_tp * Named functions, more enums * DrawBridge -> Drawbridge * skulltulla -> Skulltula * Name almost all struct variables * Named most of the temps * delete asm * spec * Missed data file, whoops * Review * More review changes * cleanup en_dha (#787) * Set __FILE__ in asm_processor (#793) * Set __FILE__ in asm_processor * bss fix * Update to upstream version Co-authored-by: zelda2774 <zelda2774@invalid> * ovl_Efc_Erupc OK (#773) * a few good dead Gfx_TwoTexScrolls * EfcErupc OK, mostly documented * review * remove fake match Co-authored-by: Fig02 <fig02srl@gmail.com> * z_bg_mizu_movebg and object_mizu_objects (#747) * OK a few functions * BgMizuMovebg_Draw OK, make tweaks to bg_mizu_bwall * migrate data * create mizu_objects, defines for water temple water level * clean up some code * implement most suggestions * review * review2 * formatting Co-authored-by: Fig02 <fig02srl@gmail.com> * Document BodyBreak (en_part, body part spawner) (#797) * done * status defines * whoops * comment wording * size calc change * elseif * Improve the format in z_map_mark_data.c and cleanup mapmark.py (#798) * Cleanup mapmark.py script * Rename map mark defines * Remove unused entries from map_mark_data * `assert` macro OK (#755) * create assert macro and replace a bunch of __assert Signed-off-by: angie <angheloalf95@gmail.com> * Another bunch of assert Signed-off-by: angie <angheloalf95@gmail.com> * more assert Signed-off-by: angie <angheloalf95@gmail.com> * assert(false) Signed-off-by: angie <angheloalf95@gmail.com> * last assert used in matching code Signed-off-by: angie <angheloalf95@gmail.com> * the non-matchings Signed-off-by: angie <angheloalf95@gmail.com> * typo Signed-off-by: angie <angheloalf95@gmail.com> * format Signed-off-by: angie <angheloalf95@gmail.com> * change macro to uppercase Signed-off-by: angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Change ASSERT(false) to ASSERT(0) Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * General object cleanup (#799) * Object cleanup * Fix running man * fix mm symbols * Updated to use latest version of ZAPD (#777) * Updated config file * Added missing files * Temporarily removed asm_processor changes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "96ffc1e62" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "96ffc1e62" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "179af7d11" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "179af7d11" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Cleanup and fixes. * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "50ad2fe78" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "50ad2fe78" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Makefile fix * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "b9120803e" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "b9120803e" git-subrepo: version: "0.4.3" origin: "???" commit: "???" Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com> * Decompile `object_zo` :dolphin: (#794) * Initial xml * most of in-code references * Add limbs and evrything else * Functions used by EnRiverSound * Fix forearm and use void* for textures * Run formatter * Change Hints in scene's XMLs (#800) * Remove blobhint * Add segments and offsets, and remove most hints * Change PathHint to Path * Add missing final new lines in scenes xmls * finished object_skb (#790) * finished object_skb * neglected the limbs and dlists, so I added them * adding the textures * fixing some names * ....forgot to change the c file.... * hopefully fixed formatting issue * EnFish, OK and documented (#795) * Matching * Some naming * spec * Name another function * Name animations, clarify use of GI_MAX and GI_NONE * Documented bottle range functions * Simplify squared distance function in EnIceHono, actor descriptions * Functions for dropped fish * More naming * Change 65535.5f to (0xFFFF + 0.5f) * Change 65535.5f to (0xFFFF + 0.5f) * name phases * Named other types, Docile functions * Naming complete * delete asm * format, remove outdated comment * Fix a few DrawFlexOpa arguments * Review changes * Change back to original playSound * Function comments per review * Update asm-processor and add make dependencies for global asm and early includes (#801) * Update asm-processor to latest master * Add make dependencies for global asm and early includes * Update asm-processor to latest master * Decompile the pause menu aka. ovl_kaleido_scope (+ minor changes) (#803) * Decompile ovl_kaleido_scope + minor cleanups * Add a common header for ovl_kaleido_scope * Start cleaning up and documenting kaleido_scope (+ some interface docs) * Improve and fix some kaleido_scope non matchings * Match KaleidoSetup_Init * Extract icon_item_fra/ger_static files * Add more documentation and matches to kaleido_scope * Improve the z_kaleido_collect.c non matching * Rename z_kaleido_8081EFF0.c to z_kaleido_prompt.c * Update most kaleido variables to be static * Improve GS flag macros * Improve z_lmap_mark.c and extract z_lmap_mark_data.c with a script * Various minor fixes and improvements * Minor fixes and review changes * Review changes part 2 * Rename gSetTileCustom to gDPSetTileCustom * Review changes part 3 * Delete `-j` from `make setup` and document use of `-jN` and `-j` in readme (#804) * Add nproc to make setup * Add cross-platform nproc equivalents * Scrap that, just ditch -j in makefile altogether * Clarified thread advice * ViMode progress (#802) * ViMode OK * Fix variable name in regconvert tool * ViMode: fix formatting * Add nonmatching impl for ViMode_Configure, respond to PR - Fixed struct field naming (unkXX -> unk_XX) - ViMode_Configure args are not flags for top/left etc; seem to be for video mode - Used @Random06457's implementation of `ViMode_LogPrint` * Use plain LOG_ADDRESS in ViMode_LogPrint * Incorporate PR feedback from Roman971 * Add scene macros (#792) * add scene macros * SCENECMD -> SCENE_CMD * light renaming * SCENE_CMD_ROOM_BEHAVIOR * update params names * Remove extra spaces * More review changes by fig * remove MM cmd ids * more review changes * last minute edit * I keep confusing both lights commands * Review changes * Yet another cutscene change * Unused02 is unused * Add UNK_09 macro and other minor fixes (#813) (cherry picked from commit d3a6d4d2e1794f3b12f22d7808d65f24ef4c220a) * Match BossFd_Fly (ovl_Boss_Fd OK) (#807) * Simplify PNGs rules in the makefile (#814) * simplify rules * update `-eh` * Add every unreserved object in an automated way (#805) * it's crashing * fix stuff * fix xmls * problematic objects * fix tabs * Fix suffixes * add missing new lines * Add comments to the problematic objects * Find and replace fixes * Add Fig's objects * I forgot to add a Name in a cutscene, so I'm adding it here * Update object decomp tutorial a little bit * Update problematic objects * Update docs/tutorial/object_decomp.md Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Change comments * comment out a few blobs * dammit tluts * Change a bunch of objects * update the last bunch * update comments on oA11 and oB2 * Ninja-edit to fix compatibility with ZAPD's PR 142 Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Add clean assets (#785) * makefile change * also delete * Add cleantools * rename cleanassets and assetclean * add rules to PHONY in makefile * Remove toolsclean * object_hata OK (#806) * everything except limbs * spec * object_hata OK * Replace symbols, unused data, enums, some cleanup * Fix compiler warnings in EnRiverSound * Address Roman's review * Correct limbs name * Changed unk_192 to timer, as well as add missing trailing comma for formating (#817) * Remove some unused duplicated C files (#818) * Removes qemu from the README.md (#819) * Removes qemu from the README.md * Increments the step references in other parts of the README.md * Update README.md Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * Update README.md Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * Update README.md Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * Update README.md Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * Match EnSkb_PostLimbDraw (obl_en_skb OK) (#821) * Small bgcheck documentation pass (#816) * implement some documentation * remove unnecessary comments related to decomp * eliminate comment function prototypes * Add `actorfixer.py` ~~and `graphovl.py`~~; and a few improvements to `extract_assets.py` (#783) * Only process touched files and abort the extraction if one file wasn't extracted properly Signed-off-by: angie <angheloalf95@gmail.com> * add actorfixer and graphovl Signed-off-by: angie <angheloalf95@gmail.com> * Re set execution permisions to diff.py Signed-off-by: angie <angheloalf95@gmail.com> * Add graphs/ to gitignore Signed-off-by: angie <angheloalf95@gmail.com> * Add looners flag to graphovl Signed-off-by: angie <angheloalf95@gmail.com> * Parse macros Signed-off-by: angie <angheloalf95@gmail.com> * cleanup Signed-off-by: angie <angheloalf95@gmail.com> * Add enum parser to graphovl Signed-off-by: angie <angheloalf95@gmail.com> * Remove redundant code Signed-off-by: angie <angheloalf95@gmail.com> * cleanup Signed-off-by: angie <angheloalf95@gmail.com> * Custom colors to graphovl! * Select multiples styles for graphovl * Add solarized light style * Add renames of #796 * Add unaccounted warning flag * remove graphovl * git subrepo clone https://github.com/AngheloAlf/graphovl.git tools/graphovl subrepo: subdir: "tools/graphovl" merged: "577e71592" upstream: origin: "https://github.com/AngheloAlf/graphovl.git" branch: "master" commit: "577e71592" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * remove graphovl * Add `graphovl/` to gitignore * Label a bug in Door_Shutter (#810) * comment * Update src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Update src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c Co-authored-by: pixel-stuck <mathmcclintic@gmail.com> * change message * typo * repeated myself * extra space lmao * change wording again * Update src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c * indent Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: pixel-stuck <mathmcclintic@gmail.com> * en_weather_tag Quick documentation pass (#808) * Quick documentation pass * Fill out the En_Weather_Tag enum * move the enum into the header * implement roman's suggestion * object_sa OK (#789) * object_sa OK * PR fixes (AngheloAlf) * PR fixes (Roman) * Improve z_jpeg documentation (#825) * Improve z_jpeg documentation * JpegWork::data is probably better than address * Rename Jpeg_SendTask to Jpeg_ScheduleDecoderTask * Rename njpegUCode to gJpegUCode * Rename GetU16 to GetUnalignedU16 and improve docs * Decompile a bunch of objects (#603) * Mostly done but shifted * still messed up * Almost OK * OBJECT_JYA_OBJ OK, OBJECT_GR OK * Done * Merge master and format * Cleanup * Cleanup 2 * Start object MB dont merge yet * Object_MB OK * Object_ydan_objects OK * General 'ydan' actor cleanup * Forgot some small things * Object_EC OK * add .gitkeep and run format * Object_sd OK but no textures cause of a zap issue * PR fixes * Fix object_sd * fix ydan * delete .gitkeep files * OBJECT_BOX as far as it can go with current ZAP * Fix undefined_syms * Start child link object * Push progress, dont merge yet * Object_mori_objects OK * Fixed? * Fix conflicts again * Seems like i missed some textures * Extract data for BgBombwall * More field * ZAP YEP 2.0 * Object_Box OK * Object_SD ok. Ready to merge * remove ASM and merge master * remove ASM * remove files wrongfully added to docs/ * Almost done * Change comment in z_player_lib.c * forgot some DLists in player_lib.c * Fix conflict, run format * Same as before but this time with Tex and TLUT * Last few things * fix object_GR and add limbs to object_sd * Nane -> Name * gChildDekuShieldMtx is now a matrix and not a blob * PR fixes (Fig) * add a space for comment in z_player_lib.c * re push and new lines * PR fixes (AngheloAlf) * PR fixes (Roman) * Fix Heishi2 * PR fixes (Fig) * Replace spacing in a file * PR fixes (Roman) * Track XML extraction time (#826) * extracted-assets.json * delete `.extracted-assets.json` in distclean * Move `rm .extracted-assets.json` to `assetclean` * Outname -> OutName for OBJECT_LINK_CHILD (#827) * Outname -> OutName * ANother child fix * TLUT -> tlut * Change nanoseconds to seconds in extract_assets.py (#829) * Match 2 more functions in z_eff_blure.c (#831) * Match ViMode_Configure (z_vimode.c OK) (#830) * warnings fixed (#835) * ZAPD update: libpng, zroom improvements and others (#811) * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "769f5702a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "769f5702a" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Add `libpng` to readme * Remove `-ifp` since it doesn't exists anymore in ZAPD * Remove extra print I added * Add UNK_09 macro and other minor fixes * Simplify PNG rules * simplify gitignore * Update README.md Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update dockerfile * basic instructions for cygwin and mac * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "86160be69" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "86160be69" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Change nanoseconds to seconds in extract_assets.py Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * "Decompile" more objects. (#784) * Object_hakach_objects OK and fix a warning in z_play.c * Object Warp1 OK * Object_spot16_obj OK * object_cs Skeleton and limbs OK * Limbs are broken * Limbs OK * Object_CS OK * Object_jya_door OK * fix errors and add new lines * PR fixes (AngheloAlf) * PR fixes (EllipticEllipsis) * PR fixes (Fig) * Rename Spot16 and Jya * GraveYard -> Graveyard * PR fixes * -s * PR fixes * Object_RU1, Object_MA1, and warp pad objects Decompiled (#828) * Ruto limbs * RutoLimb enum * the enum doesn't go in en_door * Limb DLists * Name almost all textures and clean up EnRu1.c * remove padding * Name all but 1 animation and remove undefined syms * Object MA limbs OK * (MA1)Most textures * Small renames in EnMa1.c * Object MA1 OK * add base object for Mjin * Mjin OK * Update object_ma1.xml * PR fixes (Fig) * PR fixes * Missed one * Update assets/xml/objects/object_ru1.xml Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * En_River_Sound OK (#833) * match en_river_sound * remove asm * some docs * more docs * saria song * review stuff * z_sram OK (#834) * match z_sram * format and remove unused asm, also make some data static * review comments * another change * Match Jpeg_Decode (z_jpeg.c OK) (#839) * Match EnDaiku_UpdateText (En_Daiku OK) (#841) * Match 1 of the 2 remaining functions in Bg_Mizu_Movebg (#840) * Improve Audio_SequencePlayerProcessSequence (#844) Co-authored-by: zelda2774 <zelda2774@invalid> * Fix and rename nes_font_static (#753) * renames * change digits and control pad names * Add codepoints, rename blank char 0x7F * BgGndFiremeiro OK and documented (#850) * OK, data imported * Name everything * Delete asm * Add struct `LegacyLimb` and rename `AnimationHeader2` for `object_human` (#849) * Add LegacyLimb and rename AnimationHeader2 * Simplify SkelAnime_GetFrameDataLegacy * Minor fixes * Move LegacyLimb with the rest of the limbs * EnVali OK and documented, object_vali and object_bl completely analysed and documented (#845) * OK * Some naming * Name more, correct typo in Biri, extract skel * just Draws need names, fix typos in bili and warp1 * Decompile object_vali and add symbols * Few more names * Bari naming done * object_bl completed, symbols added * Label object_bl * Formatter * delete asm * review changes * review changes * review * Interface improvements (#822) * Add symbols, does NOT build OK * parameter OK with syms * Use `static` more and inline arrays * wip docs * Start on Interface_Draw, NOT OK yet * rename variables since interface dev is weird * nonmatching for now * kaleido * Update src/code/z_parameter.c Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * Make most texture rectangles use shifts * fix symbols for all interface things * done with interface_draw for now * Update z_parameter.c * format files * fix wrong function calls * fix bss * improvements in matching * remove button enum for now * (void)0 to fix warning * make conditional look nicer * fix * fix wrong combiner * Update src/overlays/actors/ovl_kaleido_scope/z_lmap_mark.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * format * remove "HUD" naming * review suggestions Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Migrate .bss for fault drawer and .data for item00 (#823) * Item00 and fault drawer * Test * Test2 * test3 * test4 * remove .data file for item00 * revert hex * WHY * PLEASE * PR fixes (Roman) and run clang-format version 10 * Fault_drawer was swapped ...again) * Decompile and label EnEiyer (#852) * En_Eiyer OK * Label EnEiyer * Style fixes * Rename colCyl -> collider * Use CLAMP_MIN * Format * Review changes * Match Camera_PrintSettings (z_camera OK) (#853) * Match Camera_PrintSettings * rm asm * Match Math3D_LineSegMakePerpLineSeg (#854) * Match Math3D_LineSegMakePerpLineSeg Also renamed to Math3D_LineVsLineClosestTwoPoints * Fix UB * Some actor.c docs (in preparation for en_test) (#820) * renames * format * format functions.h * clean * arg name * remove asm * Decompile obj_bean (magic bean and soft soil). 2 NON_MATCHINGs (#846) * did a bunch * Do a bunch more * all functions in C * Macros for draw and collision part of state flags * Done for now * remove ASM * PR fixes (Elliptic) * all angles are hex and take away bad names * PR fixes (Roman) * PR fixes * PR fixes (Fig) * restore map mark * Fix the other messed with files * Decompile some more objects (#848) * Object_FU limbs and skel OK * limbs OK * Object_FU textures OK * Object_FU face textures OK * Symbols in en_fu.c * en_fu.c limb enum * Remove Object_fu from undefined_syms, move textures to draw, and small cleanup * Object_bird OK * Object_Bird OK, added cutscene for shot sun, and song of storms * Rainbow Bridge CS * Great fairy CS * Cutscene -> Cs * remove '&' from Cutscenes * Cleanup object_bird * Update z_en_fu.c * Update z_en_fu.h * Update z_en_fu.c * Update z_en_fu.h * Update z_en_fu.h * DC intro CS * Zeldas lullaby CS * Nabooru Knuckle CS * Owl Lake Hylia CS * Sun song CS * Undefined sym in Boss Dodongo * Missed a few more * DC tex name * Windmill man limbs * z_En_Ossan and dependencies (#824) * fix colliderinit typo * fix initchain * reloc * progress * progress * Pick off a few easy functions, reduce number of warnings * more tough OKs * Getting closer to all OK, fix en_girla header * some hard OKs, 7 to go * two funcs remaining * func_80AC7094 OK! * Fix warnings, begin documentation * get most of object_ossan documented, document some of en_ossan * improve en_girla function names * more EnOssan documentation * more documentation * en_tana basically complete, en_girla vars all named, en_ossan documentation improvements * delete TIME ITSELF * object_oF1d_map OK * more names, fixed a poition typo * Nearly all en_ossan functions named, all variables named * format.sh * forgot to delete data * implement pr changes * EnOssan OK! implement most of Roman's suggestions * ugh * implement figs suggestions * implement roman's suggestion * Can't tell my left from my other left Co-authored-by: fig02 <fig02srl@gmail.com> * Some progress on z_vr_box.c (#838) * z_vr_box.c progress * Rename dpList to dlistBuf and SKYBOX_CLEAR_SKY to SKYBOX_NORMAL_SKY * Fix * renamed dlistBuf to dListBuf and split large string further * Change PreRenderContext to just be PreRender (#862) * Decompile Fishing and document object_fish (#856) * Start decompiling Fishing * Decompile more functions in Fishing * Decompile a few more functions in Fishing * Decompile func_80B6E9E0 and func_80B7825C (non matching) * Minor Fishing cleanups * Migrate fishing bss to C and match 3 functions * Decompile and match Fishing_Update * Migrate fishing data to C and minor cleanups * Fix the object_fish xml and use its symbols in Fishing * Partially document Fishing and object_fish * Add more documentation/cleanups to Fishing and object_fish * Use object_fish symbols in Demo_Ec and fix naming * Minor fixes to Fishing docs * Apply review suggestions for Fishing * Apply 2 more review suggestions for Fishing * Apply some review suggestions for Fishing * Extract all "place name" title cards (#858) * Forest and shadow temple * fire temple * Water temple * Spirit temple * Deku tree * jabu jabu * DC * Inside Ganons castle * GTG * Castle courtyard * great fairy's fountain * chamber of sages * shooting gallery * Temple of time * market * back alley * kokir shop * goron shop * zora shop * House of skulltula * bazarr * potion shop * gravekeepers hut * lakeside lab * hyrule field * kak * graveyard * zoras river * kokiri forest * lake hylia * zoras domain * zoras fountain * gerudo valley * lost woods * the rest of them * cleanup * final cleanup * PR fixes (Zel) * (Re) fix case * segment 0 * Fix map name static conflict * Comment about ZAPD * number 0 * Update place_title_cards.xml * Update spec * Fix all xmls to explicitly use offsets (#859) * Forest and shadow temple * fire temple * Water temple * Spirit temple * Deku tree * jabu jabu * DC * Inside Ganons castle * GTG * Castle courtyard * great fairy's fountain * chamber of sages * shooting gallery * Temple of time * market * back alley * kokir shop * goron shop * zora shop * House of skulltula * bazarr * potion shop * gravekeepers hut * lakeside lab * hyrule field * kak * graveyard * zoras river * kokiri forest * lake hylia * zoras domain * zoras fountain * gerudo valley * lost woods * the rest of them * cleanup * final cleanup * PR fixes (Zel) * Fra -> FRA and cleanup map_name_static * map_name_static * DONE * SHould be it * Done done done done * vector * remove another pr * ? * EnDekubaba OK and documented, object_dekubaba documented (#864) * 13 functions left, data imported * 2 left * 1 left * OK * Begin naming * sfx rename * spec * Begin naming, add LINK_IS_CHILD to EnDu * Fix spelling of its/it's * Document most of object_dekubaba, import symbols * Document draw functions, begin on actionfuncs * New actor function names, some float constants * Name almost everything * Delete asm * Name size, format * Review changes * Review changes * Brackets, format * Fix Sheik typo (#867) * db_camera (#842) * Decompile shrink_window.c * progress * progress * makefile * progress * match 8 functions * 1 more match * match 2 functions * decompile func_800B9638 * fix flow * migrate .bss * doc * name some stuff * fixes * comment fix * remove scene .c files * old z_camera .s files * revert z_camera change * revert unwanted z_camera change * fixes * remove unused files, run clang-format and fix non-matching * fix clang-format causing non-matching * remove newline + old comment in func_800B3BD4 * make db_camera global variables static * add s prefix to startic variables * change magic constants * rename "unk_50" * Match func_800B3BD4 and Match DbCamera_UpdateDemoControl (-bss) * Lots of progress on update * Mainly cleanup * run format.sh + remove unused asm * replace chevrons with add quotes * remove useless cast + use correct empty argument function declaration Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * Match Interface_Draw (z_parameter OK) (#876) * Interface_Draw down to permuter score = 175 * Fix typo * Matched Interface_Draw! * clean-up * Another touch-up * a little more cleanup * No more direct gGameInfo->data access * Audio WIP (#836) * being code_800EC960 * wip * wip * more audio progress * migrate data in code_800E11F0 * wip * make ok * remove asm * wip * move some variables outside of gAudioContext to the AudioContext structure due to the size used in func_800E3094 * more progress * wip * wip * split code_800E11F0 * migrate rodata in code_800E11F0 * match functions that couldn't because of data issues * move code_800E4FE0 asm files * wip * more wip * fix global functions, and forward declarations * wip * wip * wip * ocarina wip * match a couple functions * some progress * separate some bss * match func_800EDA3C * some matching * more matches * migrate audio rodata * some matches * more matchess * start on synthesis * work on synthesis * fix function declaration * Merge branch 'master' into audio * match a few more functions * wip * wip * more matching, rename Audio_SetBGM to Audio_QueueSeqCmd * name several audio functions, and audiocontext members * more naming, rename code_800E11F0 to audio_load, code_800DAAC0 to audio_synthesis * audio wip * match a few more functions. * wip * add missing NON_MATCHING directive * wip * some matching, data reogranization * match cursed function * wip * wip * formatting * remove prefix from struct memebers * missed function rename * review Co-authored-by: fig02 <fig02srl@gmail.com> * ZAPD update: Gotta go fast! (#877) * copy over the xml * Rename anims * A bunch of renames * minor extract_assets fixes * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "820678b4e" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "820678b4e" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Change rgb5a1 to rgba16 * eye and eyebrows * some dlists * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6be9af65d" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6be9af65d" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Dancing Couple (ovl_En_Tg) (#866) * Match EnTg_Destroy * Match EnTg_Init * Matching EnTg_Update * Match func_80B18360 Moving both 'return phi;'s into a single return at the end of the function causes the assembly to not match. * Probably equivalent, non-matching func_80B183F8 * Matching EnTg_Draw * Matching update function * Matching func_80B18778 * All functions decompiled * Move data to C code * All functions matched excepted weird switch/case * Last matching function * Remove unused ASM * Name obvious symbols * Clang format * Name text-related functions and variables * Describe actor as Dancing Couple See https://github.com/zeldaret/oot/pull/866#discussion_r664726581 * Use named constants * Name drawing constants * Use THIS macro for void* * Name the function that sets environment color * Add comments to parts of code that aren't clear * Rename timesSpokenTo to nextDialogue, treat isTalking as boolean * z_en_ko OK (#869) * .data OK * Progress * push some old stuff * Finish a chain * Progress * Progress * Run mathfixer.py * Progress * match one more * Up to date * Match func_80A97610 * func_80A96FD0 * most of the way through the mega switch * small formatting thing. still stuck on the switch * start a big switch function * a little closer * done with matching for now starting objects * func_80A97738 OK! * func_80A995CC OK! * func_80A99864 OK! * en_ko OK! * Code clean-up pass * more EnKo cleanups, object_fa and object_kw1 textures documented * complete object_km1, more EnKo documentation * More documentation * delete asm * Clean-up rebase issues * bleh * Implement Dragorn's suggestions * fix spec, implement fig's suggestions * whoops (ill leave it for the docs tho lol) * whoops again * i made an ouchie * smile * last one for real Co-authored-by: Louis <35883445+louist103@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com> * z_en_bigokuta OK (#878) * start * Did some more * Progress * More * IDK * Chip away a little * im done * func_809BEBBC OK! * get rid of graphovl * revert random changes * Big Okuta OK! * more clean-ups * implement dragorn's suggestions * implement fig and louist's suggestions Co-authored-by: Louis <35883445+louist103@users.noreply.github.com> * z_obj_mure OK (#875) * almost matching init, matching data * more matchings, some non-matching progress * finishing up SpawnActor, fixing .data types * first decompile pass done, few non matchings * cleanup/update matchings and remove asm * format code * pick up some OKs * 1 non_matching left, some documentation * z_obj_mure OK... but at what cost? * implement suggested changes, some more documentation * Implement Fig's suggestions * review Co-authored-by: Sam Lyon <sam.c.lyon@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> * convert remaining RGB5a1 to RGBA16 (#879) * Stalfos (en_test) OK and object_sk2 documented (#868) * fix colliderinit typo * migrate data * init has 1 problem * progress * progress * builds now * progress * progress * lots of funcs matched * many functions, fix warnings * 1 left * done * docs progress * remove graphovl * missed some * change some funcs * some more * another * format * more docs * cleanups1 * limbs, DLs, textures * limbs named (thanks elliptic) * more docs * Name animations, import symbols * Named sections of xml * more docs * rename limbs and use flag macros * name * review1 and use limb enum * review2 * agro -> aggro * review3 * review4 * review5 Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> * Use a temp symbol for RomStart/RomEnd symbols, makes the map show the right value for actual RomStart/RomEnd symbols (#880) * builds OK * first pass * PR fixes (Louis) * fixes * a little more * format * dragorn's stuff * more cleanup, merge, and format * now with work buffers * forgot sfx * update and draw Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Louis <35883445+louist103@users.noreply.github.com> Co-authored-by: Parker Burnett <burnettparker@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Zelllll <56516451+Zelllll@users.noreply.github.com> Co-authored-by: glankk <glankk@users.noreply.github.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Co-authored-by: zelda2774 <69368340+zelda2774@users.noreply.github.com> Co-authored-by: zelda2774 <zelda2774@invalid> Co-authored-by: mzxrules <mzxrules@gmail.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com> Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com> Co-authored-by: Zach Banks <zjbanks@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> Co-authored-by: pixel-stuck <mathmcclintic@gmail.com> Co-authored-by: Vijfhoek <me@vijf.life> Co-authored-by: Synray <31429825+Synray@users.noreply.github.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: Random <28494085+Random06457@users.noreply.github.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com> Co-authored-by: Aly Cerruti <aprime2003@gmail.com> Co-authored-by: Sam Lyon <sam.c.lyon@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-08-08 19:26:56 +00:00
void func_800F4B58(Vec3f*, s16, u8*);
void func_800F4BE8(void);
void func_800F4BF4(Vec3f*, u16 sfxId, s8);
void func_800F4C58(Vec3f*, u16 sfxId, u8);
void func_800F4E30(Vec3f*, f32);
2020-03-17 04:31:30 +00:00
// ? func_800F50CC(?);
void* func_800F50EC(Vec3f*);
2020-03-17 04:31:30 +00:00
// ? func_800F510C(?);
void func_800F52A0(Vec3f*, u16, u16);
void func_800F5504();
2020-03-17 04:31:30 +00:00
// ? func_800F5510(?);
// ? func_800F5550(?);
// ? func_800F56A8(?);
void func_800F574C(f32 arg0, u8 arg2);
Bg_Relay_Objects OK (#536) * bg_relay_objects OK * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update z_bg_relay_objects.c Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2020-12-19 04:46:52 +00:00
void func_800F5718(void);
void func_800F5918(void);
2020-03-17 04:31:30 +00:00
void func_800F595C(u16);
void func_800F59E8(u16);
s32 func_800F5A58(u8);
void func_800F5ACC(u16 bgmID);
ovl_En_Ik (#461) * merge upstream * Merge upstream * Progress * Progress * Fixes * Migrate bss for now ig * func_80A772EC * Use rom reloc * Cleanup * Correct prototype * Rename to _PlayBGM * Eh revert to _StartMusic * Match func_80A74398 more * Fixes * Work on func_80A74398 * Work on func_80A74398 * Match func_80A74398 * Use thisx * Name, static, and move some stuff * Match some graphics functions * Rename asm for named functions * Forgot one * More graphics stuff * Progress * More progress * Fix jump table * Figure out types for a lot of data * Fix data * Type remaining data * Work on func_80A7492C * Ugly match for func_80A7492C * Fix func_80A7492C * Match some interesting stuff * Move and remove forward declarations * Sort declarations * Progress * Use quotes for vt import * Slightly better diff * Better diff again * Fix stack on func_80A74BA4 * match func_80A74BA4 * func_80A74674 * Progress * Progress * Progress * Progress * Eh early return probably makes more sense here * Progress * Progress * Progress * Autocomplete sucks * Name stuff in func_80A76E2C * Work a bit on func_80A75C38 * Ugly match func_80A75FA0 * Name it prevInvincibilityTimer * EnIk_PostLimbDraw3 * Use hex for line numbers in EnIk_PostLimbDraw3 * EnIk_PostLimbDraw2 * EnIk_PostLimbDraw1 * Use hex for line numbers in EnIk_PostLimbDraw1 * Use ACTORTYPE_ENEMY * Progress * Possible fake match of func_80A75C38 * Update spec and remove asm * Cleanup forward declarations * Move data to fun places * Move data into func_80A76E2C * Move data into func_80A75A38 * Make D_80A7847C an array * Remove struct padding * Revert "Remove struct padding" This reverts commit 87b0bd73da689beb65242e95fc81290c522a06f8. * Name colliders * Use else * Name shieldColliderItems * Use new graphics macros * Cleanup
2020-11-23 13:53:21 +00:00
void func_800F5B58(void);
void func_800F5BF0(u8 arg0);
void func_800F5C64(u16);
void func_800F5C2C(void);
2020-03-17 04:31:30 +00:00
// ? func_800F5CF8(?);
// ? func_800F5E18(?);
void func_800F5E90(u8);
void func_800F6114(f32);
void func_800F6268(f32, u16);
void func_800F64E0(u8 arg0);
void func_800F6584(u8 arg0);
void func_800F66C0(s8 echo);
void func_800F66DC(s8);
void func_800F6700(s8 outputMode);
void func_800F67A0(u8);
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
void func_800F6828(u8);
2020-03-17 04:31:30 +00:00
void func_800F68BC(s8);
// ? func_800F68D4(?);
// ? func_800F691C(?);
void func_800F6964(u16);
void func_800F6AB0(u16);
// ? Audio_DisableAllSeq(?);
2020-03-17 04:31:30 +00:00
// ? func_800F6BB8(?);
void Audio_PreNMI();
2020-03-17 04:31:30 +00:00
// ? func_800F6C34(?);
void func_800F6D58(u8, u8, u8);
2020-03-17 04:31:30 +00:00
// ? func_800F6E7C(?);
void func_800F6FB4(u8);
void func_800F70F8();
void func_800F711C();
void func_800F7170(void);
2020-03-17 04:31:30 +00:00
// ? func_800F71BC(?);
void func_800F7260(u16);
void Audio_QueueSeqCmdMute(u8);
void Audio_ClearBGMMute(u8);
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u8 a2, f32* a3, f32* a4, s8* a5);
2020-03-17 04:31:30 +00:00
// ? func_800F74E0(?);
void func_800F7680(void);
void func_800F7B54(u8, u8);
void func_800F7CEC(u8);
void func_800F8480(u8);
void func_800F87A0(u8);
void func_800F8884(u8, Vec3f*);
void func_800F89A0(u8, Vec3f*);
void func_800F89E8(Vec3f*);
void func_800F9280(u8 seqIdx, u8 seqId, u8 arg2, u16 fadeTimer);
void Audio_QueueSeqCmd(u32 bgmID);
u16 func_800FA0B4(u8 a0);
s32 func_800FA11C(u32, u32);
void func_800F8A44(Vec3f* pos, u16 sfxId);
void func_800F8BA0(u8, u16);
void Audio_StopSfx(u32 sfxId);
void func_800F8E3C(void);
void func_800F8EA0(u8, u8, u16);
void func_800F8F34(u8);
void func_800F8F88(void);
u8 func_800F8FF4(u32 sfxId);
void func_800F905C(void);
void func_800F9474(u8, u16);
void Audio_ProcessSeqCmd(u32);
void Audio_ProcessSeqCmds(void);
void func_800FA174(u8);
void func_800FA18C(u8, u8);
void Audio_SetVolScale(u8, u8, u8, u8);
void func_800FA3DC(void);
u8 func_800FAD34(void);
void func_800FADF8(void);
void func_800FAEB4(void);
2020-03-17 04:31:30 +00:00
void GfxPrint_InitDlist(GfxPrint*);
void GfxPrint_SetColor(GfxPrint*, u32, u32, u32, u32);
void GfxPrint_SetPosPx(GfxPrint*, s32, s32);
void GfxPrint_SetPos(GfxPrint*, s32, s32);
void GfxPrint_SetBasePosPx(GfxPrint*, s32, s32);
void GfxPrint_PrintCharImpl(GfxPrint*, u8);
void GfxPrint_PrintChar(GfxPrint*, u8);
2020-03-17 04:31:30 +00:00
void GfxPrint_PrintStringWithSize(GfxPrint*, const void*, size_t, size_t);
GfxPrint* GfxPrint_Callback(GfxPrint*, const char*, size_t);
void GfxPrint_Init(GfxPrint*);
void GfxPrint_Destroy(GfxPrint*);
2020-03-17 04:31:30 +00:00
void GfxPrint_Open(GfxPrint*, Gfx*);
Gfx* GfxPrint_Close(GfxPrint*);
void GfxPrint_VPrintf(GfxPrint*, const char*, va_list);
void GfxPrint_Printf(GfxPrint*, const char*, ...);
void func_800FBCE0();
void func_800FBFD8(void);
2020-03-22 21:50:11 +00:00
void* Overlay_AllocateAndLoad(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd);
void MtxConv_F2L(MatrixInternal* m1, MtxF* m2);
void MtxConv_L2F(MtxF* m1, MatrixInternal* m2);
void Overlay_Relocate(void* allocatedVRamAddress, OverlayRelocationSection* overlayInfo, void* vRamAddress);
2020-03-22 21:50:11 +00:00
s32 Overlay_Load(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddress);
2020-03-17 04:31:30 +00:00
// ? func_800FC800(?);
// ? func_800FC83C(?);
// ? func_800FCAB4(?);
2020-03-22 21:50:11 +00:00
void SystemHeap_Init(void* start, u32 size);
void PadUtils_Init(Input* input);
void func_800FCB70(void);
void PadUtils_ResetPressRel(Input* input);
u32 PadUtils_CheckCurExact(Input* input, u16 value);
u32 PadUtils_CheckCur(Input* input, u16 key);
u32 PadUtils_CheckPressed(Input* input, u16 key);
u32 PadUtils_CheckReleased(Input* input, u16 key);
u16 PadUtils_GetCurButton(Input* input);
u16 PadUtils_GetPressButton(Input* input);
s8 PadUtils_GetCurX(Input* input);
s8 PadUtils_GetCurY(Input* input);
void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
s8 PadUtils_GetRelXImpl(Input* input);
s8 PadUtils_GetRelYImpl(Input* input);
s8 PadUtils_GetRelX(Input* input);
s8 PadUtils_GetRelY(Input* input);
void PadUtils_UpdateRelXY(Input* input);
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
f32 Math_FTanF(f32 x);
f32 Math_FFloorF(f32 x);
f32 Math_FCeilF(f32 x);
f32 Math_FRoundF(f32 x);
f32 Math_FNearbyIntF(f32 x);
f32 Math_FTruncF(f32 x);
f32 Math_FAtanF(f32 x);
f32 Math_FAtan2F(f32 y, f32 x);
f32 Math_FAsinF(f32 x);
f32 Math_FAcosF(f32 x);
2020-03-21 02:09:42 +00:00
f32 ceilf(f32 x);
f32 truncf(f32 x);
f32 roundf(f32 x);
f32 nearbyintf(f32 x);
2020-03-17 04:31:30 +00:00
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
void* SystemArena_Malloc(u32 size);
void* SystemArena_MallocDebug(u32 size, const char* file, s32 line);
void* SystemArena_MallocR(u32 size);
void* SystemArena_MallocRDebug(u32 size, const char* file, s32 line);
void* SystemArena_Realloc(void* ptr, u32 newSize);
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
void SystemArena_Free(void* ptr);
void SystemArena_FreeDebug(void* ptr, const char* file, s32 line);
void* SystemArena_Calloc(u32 num, u32 size);
void SystemArena_Display(void);
2020-03-17 04:31:30 +00:00
void SystemArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
void SystemArena_Check(void);
2020-03-17 04:31:30 +00:00
void SystemArena_Init(void* start, u32 size);
void SystemArena_Cleanup(void);
u8 SystemArena_IsInitalized(void);
u32 Rand_Next(void);
void Rand_Seed(u32 seed);
f32 Rand_ZeroOne(void);
f32 Rand_Centered(void);
void Rand_Seed_Variable(u32* rndNum, u32 seed);
u32 Rand_Next_Variable(u32* rndNum);
f32 Rand_ZeroOne_Variable(u32* rndNum);
f32 Rand_Centered_Variable(u32* rndNum);
2020-03-17 04:31:30 +00:00
bool ArenaImpl_GetFillAllocBlock(Arena* arena);
bool ArenaImpl_GetFillFreeBlock(Arena* arena);
bool ArenaImpl_GetCheckFreeBlock(Arena* arena);
void ArenaImpl_SetFillAllocBlock(Arena* arena);
void ArenaImpl_SetFillFreeBlock(Arena* arena);
void ArenaImpl_SetCheckFreeBlock(Arena* arena);
void ArenaImpl_UnsetFillAllocBlock(Arena* arena);
void ArenaImpl_UnsetFillFreeBlock(Arena* arena);
void ArenaImpl_UnsetCheckFreeBlock(Arena* arena);
void ArenaImpl_SetDebugInfo(ArenaNode* node, const char* file, s32 line, Arena* arena);
void ArenaImpl_LockInit(Arena* arena);
void ArenaImpl_Lock(Arena* arena);
void ArenaImpl_Unlock(Arena* arena);
ArenaNode* ArenaImpl_GetNextBlock(ArenaNode* node);
ArenaNode* ArenaImpl_GetPrevBlock(ArenaNode* node);
ArenaNode* ArenaImpl_GetLastBlock(Arena* arena);
void __osMallocInit(Arena* arena, void* start, u32 size);
void __osMallocAddBlock(Arena* arena, void* start, s32 size);
void ArenaImpl_RemoveAllBlocks(Arena* arena);
void __osMallocCleanup(Arena* arena);
u8 __osMallocIsInitalized(Arena* arena);
void __osMalloc_FreeBlockTest(Arena* arena, ArenaNode* node);
void* __osMalloc_NoLockDebug(Arena* arena, u32 size, const char* file, s32 line);
void* __osMallocDebug(Arena* arena, u32 size, const char* file, s32 line);
2020-03-22 21:50:11 +00:00
void* __osMallocRDebug(Arena* arena, u32 size, const char* file, s32 line);
void* __osMalloc_NoLock(Arena* arena, u32 size);
2020-03-17 04:31:30 +00:00
void* __osMalloc(Arena* arena, u32 size);
2020-03-22 21:50:11 +00:00
void* __osMallocR(Arena* arena, u32 size);
2020-03-17 04:31:30 +00:00
void __osFree_NoLock(Arena* arena, void* ptr);
void __osFree(Arena* arena, void* ptr);
void __osFree_NoLockDebug(Arena* arena, void* ptr, const char* file, s32 line);
void __osFreeDebug(Arena* arena, void* ptr, const char* file, s32 line);
void* __osRealloc(Arena* arena, void* ptr, u32 newSize);
void* __osReallocDebug(Arena* arena, void* ptr, u32 newSize, const char* file, s32 line);
void ArenaImpl_GetSizes(Arena* arena, u32* outMaxFree, u32* outFree, u32* outAlloc);
void __osDisplayArena(Arena* arena);
void ArenaImpl_FaultClient(Arena* arena);
u32 __osCheckArena(Arena* arena);
u8 func_800FF334(Arena* arena);
void PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args);
void PrintUtils_Printf(PrintCallback* pfn, const char* fmt, ...);
void Sleep_Cycles(OSTime cycles);
void Sleep_Nsec(u32 nsec);
void Sleep_Usec(u32 usec);
void Sleep_Msec(u32 ms);
void Sleep_Sec(u32 sec);
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths);
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes);
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc);
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes);
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state);
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
u16 JpegDecoder_ReadBits(u8 len);
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
void guScale(Mtx* m, f32 x, f32 y, f32 z);
2020-03-17 04:31:30 +00:00
f32 sinf(f32);
s16 sins(u16);
OSTask* _VirtualToPhysicalTask(OSTask* intp);
void osSpTaskLoad(OSTask* task);
void osSpTaskStartGo(OSTask* task);
s32 osSetRumble(OSPfs* pfs, u32 vibrate);
void osSetUpMempakWrite(s32 channel, OSPifRam* buf);
s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, OSPfs* pfs, u32 channel);
void __osSiCreateAccessQueue(void);
void __osSiGetAccess(void);
void __osSiRelAccess(void);
s32 osContInit(OSMesgQueue* mq, u8* ctl_present_bitfield, OSContStatus* status);
void __osContGetInitData(u8* ctl_present_bitfield, OSContStatus* status);
void __osPackRequestData(u8 poll);
s32 osContStartReadData(OSMesgQueue* mq);
void osContGetReadData(OSContPad* pad);
void __osPackReadData(void);
void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size);
s32 __osSiRawStartDma(s32 dir, void* addr);
void osSpTaskYield(void);
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
void __osPfsRequestOneChannel(s32 channel, u8 poll);
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
void guMtxIdentF(f32 mf[4][4]);
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 length, s32* fileNo);
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared,
s32* finalPage);
s32 osStopTimer(OSTimer* timer);
u16 __osSumcalc(u8* ptr, s32 length);
s32 __osIdCheckSum(u16* ptr, u16* csum, u16* icsum);
s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
s32 __osGetId(OSPfs* pfs);
s32 __osCheckId(OSPfs* pfs);
s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
void guMtxL2F(MtxF* m1, Mtx* m2);
s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo);
s32 osAfterPreNMI(void);
s32 osContStartQuery(OSMesgQueue* mq);
void osContGetQuery(OSContStatus* data);
void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
s32 hiliteHeight);
void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp,
f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
s32 hiliteHeight);
u32 __osSpDeviceBusy(void);
void guMtxIdent(Mtx*);
void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z);
void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32);
OSYieldResult osSpTaskYielded(OSTask* task);
void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z);
void guRotate(Mtx*, f32 angle, f32 x, f32 y, f32 z);
s32 osAiSetFrequency(u32 frequency);
OSThread* __osGetActiveQueue(void);
void guNormalize(f32* x, f32* y, f32* z);
2020-03-17 04:31:30 +00:00
u32 osDpGetStatus(void);
void osDpSetStatus(u32 status);
s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName);
s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
2020-03-17 04:31:30 +00:00
f32 cosf(f32);
s16 coss(u16);
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
void __osPfsRequestData(u8 poll);
void __osPfsGetInitData(u8* pattern, OSContStatus* contData);
void guS2DInitBg(uObjBg* bg);
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);
s32 osContSetCh(u8 ch);
s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state);
s32 osPfsInitPak(OSMesgQueue* mq, OSPfs* pfs, s32 channel);
s32 __osPfsCheckRamArea(OSPfs* pfs);
s32 osPfsChecker(OSPfs* pfs);
s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache);
s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache);
u32 osAiGetLength(void);
void guTranslate(Mtx* m, f32 x, f32 y, f32 z);
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
u8 __osContAddressCrc(u16 addr);
u8 __osContDataCrc(u8* data);
s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
u32 __osSpGetStatus(void);
2020-03-17 04:31:30 +00:00
void __osSpSetStatus(u32 status);
void osWritebackDCacheAll(void);
OSThread* __osGetCurrFaultedThread(void);
void guMtxF2L(MtxF* m1, Mtx* m2);
2020-03-17 04:31:30 +00:00
// ? __d_to_ll(?);
// ? __f_to_ll(?);
// ? __d_to_ull(?);
// ? __f_to_ull(?);
// ? __ll_to_d(?);
// ? __ll_to_f(?);
// ? __ull_to_d(?);
// ? __ull_to_f(?);
u32* osViGetCurrentFramebuffer(void);
s32 __osSpSetPc(void* pc);
2020-03-17 04:31:30 +00:00
f32 absf(f32);
void* func_80106860(void* ptr, s32 val, size_t size);
void* func_801068B0(void* dst, void* src, size_t size);
2020-03-17 04:31:30 +00:00
// ? func_801069B0(?);
void func_80106AA8(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
u8 func_80106BC8(GlobalContext* globalCtx);
// ? func_80106C88(?);
2020-03-18 19:42:43 +00:00
void func_80106CCC(GlobalContext*);
2020-03-17 04:31:30 +00:00
// ? func_80106D40(?);
// ? func_80106F1C(?);
// ? func_80107244(?);
// ? func_80107448(?);
// ? func_80107628(?);
// ? func_801076CC(?);
// ? func_80107980(?);
// ? func_801080B4(?);
// ? func_801083F8(?);
// ? func_801086B0(?);
// ? func_80109968(?);
// ? func_80109B3C(?);
// ? func_8010B0C0(?);
void func_8010B680(GlobalContext*, u16 textID, Actor* actor);
2020-03-17 04:31:30 +00:00
void func_8010B720(GlobalContext* globalCtx, u16 textId);
// ? func_8010B820(?);
// ? func_8010BD58(?);
void func_8010BD58(GlobalContext* globalCtx, u16 arg1);
void func_8010BD88(GlobalContext* globalCtx, u16 arg1);
2020-03-17 04:31:30 +00:00
u8 func_8010BDBC(MessageContext* msgCtx);
// ? func_8010BED8(?);
// ? func_8010C358(?);
// ? func_8010C39C(?);
// ? func_8010F2CC(?);
// ? func_8010F494(?);
void func_8010F58C(GlobalContext* globalCtx);
void func_8010F6F0(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_8011040C(void);
void GameOver_Init(GlobalContext* globalCtx);
void GameOver_FadeInLights(GlobalContext* globalCtx);
void GameOver_Update(GlobalContext* globalCtx);
2020-03-17 04:31:30 +00:00
void func_80110990(GlobalContext* globalCtx);
void func_801109B0(GlobalContext* globalCtx);
void func_80110F68(GlobalContext* globalCtx);
void func_80112098(GlobalContext* globalCtx);
void Title_Init(GameState* thisx);
void Title_Destroy(GameState* thisx);
void Select_Init(GameState* thisx);
void Select_Destroy(GameState* thisx);
void Opening_Init(GameState* thisx);
void Opening_Destroy(GameState* thisx);
void func_80811A20(GameState* thisx); // FileChoose_Init
void func_80811A18(GameState* thisx); // FileChoose_Destroy
2020-03-17 04:31:30 +00:00
#endif