diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-09-17 10:05:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-17 10:05:55 -0400 |
| commit | f38b962a5844502889ec00a98d0c9ed2a1151695 (patch) | |
| tree | 26f19c014075891d18af15af95b2764feb63beaf /src/f_op | |
| parent | 78f95573067988ad5812c040d8a6a77a78eb0dea (diff) | |
demo d_file_error OK, fmap/fmap2 work, misc (#1208)
* d_file_error OK, use J2DPane inlines everywhere
* d_menu_fmap demo work
* fmap and fmap2 work
* fix demo regression with ternary fakematch
* inline cleanup, f_pc_profile OK for demo
* fix min/max bss order
* lstair almost for demo
Diffstat (limited to 'src/f_op')
| -rw-r--r-- | src/f_op/f_op_actor_mng.cpp | 25 | ||||
| -rw-r--r-- | src/f_op/f_op_msg_mng.cpp | 8 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 6c10fdf8..e74d173e 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -332,7 +332,7 @@ bool fopAcM_entrySolidHeap(fopAc_ac_c* i_this, heapCallbackFunc createHeapCB, u3 mDoExt_destroySolidHeap(heap); heap = NULL; } else { - u32 allocSize = ALIGN_NEXT(heap->getSize() - heap->getFreeSize(), 0x20); + u32 allocSize = ALIGN_NEXT(heap->getHeapSize() - heap->getFreeSize(), 0x20); if (estimatedHeapSize < allocSize + 0x40) { mDoExt_adjustSolidHeap(heap); i_this->heap = heap; @@ -380,7 +380,7 @@ bool fopAcM_entrySolidHeap(fopAc_ac_c* i_this, heapCallbackFunc createHeapCB, u3 // If fopAcM::HeapAdjustEntry is set, try to reallocate everything a second time. // This time we set the estimated maximum heap size to the exact size allocated last time. JKRSolidHeap * heap1 = NULL; - u32 allocSize = ALIGN_NEXT(heap->getSize() - heap->getFreeSize(), 0x10); + u32 allocSize = ALIGN_NEXT(heap->getHeapSize() - heap->getFreeSize(), 0x10); if (allocSize + 0x10 + sizeof(JKRSolidHeap) < mDoExt_getGameHeap()->getFreeSize()) heap1 = mDoExt_createSolidHeapFromGameToCurrent(allocSize, 0x20); @@ -455,7 +455,8 @@ void fopAcM_calcSpeed(fopAc_ac_c* i_this) { f32 speedF = fopAcM_GetSpeedF(i_this); f32 gravity = fopAcM_GetGravity(i_this); f32 xSpeed = speedF * cM_ssin(i_this->current.angle.y); - f32 ySpeed = i_this->speed.y + gravity; + cXyz* speed_p = fopAcM_GetSpeed_p(i_this); + f32 ySpeed = speed_p->y + gravity; f32 zSpeed = speedF * cM_scos(i_this->current.angle.y); if (ySpeed < fopAcM_GetMaxFallSpeed(i_this)) @@ -466,9 +467,9 @@ void fopAcM_calcSpeed(fopAc_ac_c* i_this) { /* 800251A0-8002520C .text fopAcM_posMove__FP10fopAc_ac_cPC4cXyz */ void fopAcM_posMove(fopAc_ac_c* i_this, const cXyz* move) { - i_this->current.pos.x += i_this->speed.x; - i_this->current.pos.y += i_this->speed.y; - i_this->current.pos.z += i_this->speed.z; + i_this->current.pos.x += fopAcM_GetSpeed_p(i_this)->x; + i_this->current.pos.y += fopAcM_GetSpeed_p(i_this)->y; + i_this->current.pos.z += fopAcM_GetSpeed_p(i_this)->z; if (move != NULL) { i_this->current.pos.x += move->x; @@ -581,10 +582,8 @@ static fopAc_cullSizeSphere l_cullSizeSphere[8] = { }; static void dummy() { - static Vec dummy_4863; - static Vec min; - static Vec dummy_4899; - static Vec max; + static cXyz min; + static cXyz max; } /* 80025660-800259A8 .text fopAcM_cullingCheck__FP10fopAc_ac_c */ @@ -1047,7 +1046,7 @@ fopAc_ac_c* fopAcM_createItemForKP2(cXyz* pos, int i_itemNo, int roomNo, csXyz* if (ac != NULL) { fopAcM_SetSpeedF(ac, speedF); ac->speed.y = speedY; - fopAcM_SetGravity(ac, gravity); + ac->gravity = gravity; } return ac; } @@ -1071,10 +1070,10 @@ void* fopAcM_fastCreateItem(cXyz* pos, int i_itemNo, int roomNo, csXyz* angle, c int i; u8 itemNo = check_itemno(i_itemNo); + u8 itemBitNo = (u8)i_itemBitNo; int type = daItemType_0_e; int action = daItemAct_A_e; int switchNo2 = -1; - u8 itemBitNo = i_itemBitNo; u32 params = MAKE_ITEM_PARAMS(itemNo, itemBitNo, switchNo2, type, action); if (isHeart(i_itemNo)) { @@ -1286,7 +1285,7 @@ fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo) { scene_class* roomProc = fopScnM_SearchByID(dStage_roomControl_c::getStatusProcID(roomNo)); JUT_ASSERT(DEMO_SELECT(3572, 3594), roomProc != NULL); - fpc_ProcID grabProcID = daPy_getPlayerActorClass()->getGrabActorID(); + fpc_ProcID grabProcID = ((daPy_py_c*)dComIfGp_getPlayer(0))->getGrabActorID(); fopAc_ac_c* enemy = fopAcM_SearchByID(grabProcID); if (enemy != NULL && fopAcM_GetGroup(enemy) == fopAc_ENEMY_e) return enemy; diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 42f0cbe8..f741eb4d 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -9800,10 +9800,10 @@ fopMsgM_f2d_class fopMsgM_centerPosCalc(fopMsgM_f2d_class param_1, fopMsgM_f2d_c /* 8003BA40-8003BB34 .text fopMsgM_pane_parts_set__FP18fopMsgM_pane_class */ void fopMsgM_pane_parts_set(fopMsgM_pane_class* i_pane) { - i_pane->mPosTopLeftOrig.x = i_pane->pane->mBounds.i.x; - i_pane->mPosTopLeftOrig.y = i_pane->pane->mBounds.i.y; - i_pane->mSizeOrig.x = i_pane->pane->mBounds.getWidth(); - i_pane->mSizeOrig.y = i_pane->pane->mBounds.getHeight(); + i_pane->mPosTopLeftOrig.x = i_pane->pane->getBounds().i.x; + i_pane->mPosTopLeftOrig.y = i_pane->pane->getBounds().i.y; + i_pane->mSizeOrig.x = i_pane->pane->getWidth(); + i_pane->mSizeOrig.y = i_pane->pane->getHeight(); fopMsgM_f2d_class center = fopMsgM_centerPosCalc(i_pane->mPosTopLeftOrig, i_pane->mSizeOrig); i_pane->mPosCenterOrig.x = center.x; i_pane->mPosCenterOrig.y = center.y; |
