diff options
| author | Lucas Shaw <49287729+shawlucas@users.noreply.github.com> | 2020-04-18 18:40:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-18 21:40:27 -0400 |
| commit | 21750d5aee057f5352d945b7cad3c9394efe25b7 (patch) | |
| tree | 4bd52e862a8e91fdc50dcc7a01b072ab44d6d312 /src/code | |
| parent | 4961eb0a9072540ab698d032a92f8e649631935b (diff) | |
Naming some functions in libultra_code, decompiling a decent amount. (#77)
* osgetactivequeue ok
* osspdevicebusy ok
* osGetCurrFaultedThread ok
* osSpRawStartDma OK
* __osSpSetPc and osViGetCurrentFramebuffer OK
* sinf, sins, and sptask OK
* coss OK
* cosf OK
* ran format.sh
* Updated PR to use ultratypes
* osContStartQuery OK
* ran format.sh
* Updated PR to fix issues
* Made suggested changes
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/fault.c | 2 | ||||
| -rw-r--r-- | src/code/padmgr.c | 2 | ||||
| -rw-r--r-- | src/code/z_play.c | 2 | ||||
| -rw-r--r-- | src/code/z_view.c | 34 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/code/fault.c b/src/code/fault.c index 469ef799d..7350ac1ac 100644 --- a/src/code/fault.c +++ b/src/code/fault.c @@ -499,7 +499,7 @@ void Fault_LogThreadContext(OSThread* t) { } OSThread* Fault_FindFaultedThread() { - OSThread* iter = func_80104140(); + OSThread* iter = __osGetActiveQueue(); while (iter->priority != -1) { if (iter->priority > 0 && iter->priority < 0x7f && (iter->flags & 3)) { return iter; diff --git a/src/code/padmgr.c b/src/code/padmgr.c index db3cd151f..1f9daad36 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -298,7 +298,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padmgr) { bzero(&padmgr->pads[0], 0x18); } PadMgr_ProcessInputs(padmgr); - func_80103210(queue); + osContStartQuery(queue); osRecvMesg(queue, NULL, OS_MESG_BLOCK); func_8010328C(padmgr); PadMgr_UnlockSerialMesgQueue(padmgr, queue); diff --git a/src/code/z_play.c b/src/code/z_play.c index 647a310d2..662bb1ecf 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1094,7 +1094,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p); gfxCtx->polyXlu.p = func_800BC8A0(globalCtx, gfxCtx->polyXlu.p); - func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.near, globalCtx->lightCtx.unk_0C); + func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.zNear, globalCtx->lightCtx.unk_0C); func_800AAA50(&globalCtx->view, 15); Matrix_MtxToMtxF(&globalCtx->view.viewing, &globalCtx->mf_11DA0); diff --git a/src/code/z_view.c b/src/code/z_view.c index 83147cceb..12a92eb33 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -44,8 +44,8 @@ void View_Init(View* view, GraphicsContext* gfxCtx) { view->eye.y = 0.0f; view->scale = 1.0f; view->fovy = 60.0f; - view->near = 10.0f; - view->far = 12800.0f; + view->zNear = 10.0f; + view->zFar = 12800.0f; view->unk_34.x = 0.0f; view->unk_40.x = 0.0f; view->unk_40.y = 1.0f; @@ -91,29 +91,29 @@ void View_GetScale(View* view, f32* scale) { void func_800AA460(View* view, f32 fovy, f32 near, f32 far) { view->fovy = fovy; - view->near = near; - view->far = far; + view->zNear = near; + view->zFar = far; view->flags |= 4; } void func_800AA48C(View* view, f32* fovy, f32* near, f32* far) { *fovy = view->fovy; - *near = view->near; - *far = view->far; + *near = view->zNear; + *far = view->zFar; } void func_800AA4A8(View* view, f32 fovy, f32 near, f32 far) { view->fovy = fovy; - view->near = near; - view->far = far; + view->zNear = near; + view->zFar = far; view->flags |= 8; view->scale = 1.0f; } void func_800AA4E0(View* view, f32* fovy, f32* near, f32* far) { *fovy = view->fovy; - *near = view->near; - *far = view->far; + *near = view->zNear; + *far = view->zFar; } void View_SetViewport(View* view, Viewport* viewport) { @@ -313,14 +313,14 @@ s32 func_800AAA9C(View* view) { } guPerspective(projection, &view->normal, HREG(83), HREG(84) / 10000.0f, HREG(85), HREG(86), HREG(87) / 100.0f); } else { - guPerspective(projection, &view->normal, view->fovy, aspect, view->near, view->far, view->scale); + guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale); } if (QREG(88) & 1) { s32 i; MtxF mf; - osSyncPrintf("fovy %f near %f far %f scale %f aspect %f normal %08x\n", view->fovy, view->near, view->far, + osSyncPrintf("fovy %f near %f far %f scale %f aspect %f normal %08x\n", view->fovy, view->zNear, view->zFar, view->scale, aspect, view->normal); Matrix_MtxToMtxF(projection, &mf); @@ -401,7 +401,7 @@ s32 func_800AB0A8(View* view) { view->projectionPtr = projection; func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f, - (f32)gScreenHeight * 0.5f, view->near, view->far, view->scale); + (f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale); view->projection = *projection; @@ -439,7 +439,7 @@ s32 func_800AB2C4(View* view) { view->projectionPtr = projection; func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f, - (f32)gScreenHeight * 0.5f, view->near, view->far, view->scale); + (f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale); view->projection = *projection; @@ -482,7 +482,7 @@ s32 func_800AB560(View* view) { height = view->viewport.bottomY - view->viewport.topY; aspect = (f32)width / (f32)height; - guPerspective(projection, &view->normal, view->fovy, aspect, view->near, view->far, view->scale); + guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale); view->projection = *projection; @@ -552,7 +552,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) { view->projectionPtr = projection; func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f, - (f32)gScreenHeight * 0.5f, view->near, view->far, view->scale); + (f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale); view->projection = *projection; @@ -567,7 +567,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) { width = view->viewport.rightX - view->viewport.leftX; height = view->viewport.bottomY - view->viewport.topY; - guPerspective(projection, &view->normal, view->fovy, (f32)width / (f32)height, view->near, view->far, + guPerspective(projection, &view->normal, view->fovy, (f32)width / (f32)height, view->zNear, view->zFar, view->scale); view->projection = *projection; |
