diff options
| author | robojumper <robojumper@gmail.com> | 2026-06-03 21:02:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-03 21:02:01 +0200 |
| commit | 9aac632fd0ec4c06141aa400771cd138fbc9e89a (patch) | |
| tree | 9ffd58ec6aa00a495aac63f2b6c15290a8811292 /src | |
| parent | 560ff1832045cda4247db542c8dacfd2e614d9dc (diff) | |
| parent | 21c7dac9b15dcc05926a4745f6e58e7f0f53bf16 (diff) | |
Merge pull request #328 from compugab/match-d_lyt_map_capture
match d_lyt_map_capture
Diffstat (limited to 'src')
| -rw-r--r-- | src/d/d_stage.cpp | 12 | ||||
| -rw-r--r-- | src/d/lyt/d_lyt_map_capture.cpp | 54 |
2 files changed, 57 insertions, 9 deletions
diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 9e8fde25..0e3a74b9 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -360,15 +360,9 @@ dRoomTable_c::dRoomTable_c() { MapRelated::MapRelated() : field_0x0FC(0.0f, 0.0f, 0.0f), - field_0x108(0.0f), - field_0x10C(0.0f), - field_0x110(0.0f), - field_0x114(0.0f), - field_0x118(0.0f), - field_0x11C(0.0f), - field_0x120(0.0f), - field_0x124(0.0f), - field_0x128(0.0f), + field_0x108(0.0f, 0.0f, 0.0f), + field_0x114(0.0f, 0.0f, 0.0f), + field_0x120(0.0f, 0.0f, 0.0f), field_0x12C(0.0f), field_0x1E0(0), field_0x1E6(0), diff --git a/src/d/lyt/d_lyt_map_capture.cpp b/src/d/lyt/d_lyt_map_capture.cpp index c8ead0c9..20936865 100644 --- a/src/d/lyt/d_lyt_map_capture.cpp +++ b/src/d/lyt/d_lyt_map_capture.cpp @@ -1,6 +1,7 @@ #include "d/lyt/d_lyt_map_capture.h" #include "common.h" #include "d/d_stage.h" +#include "d/lyt/d_lyt_map_global.h" STATE_DEFINE(dLytMapCapture_c, RenderingWait); STATE_DEFINE(dLytMapCapture_c, RenderingWaitStep2); @@ -38,3 +39,56 @@ bool dLytMapCapture_c::isBusyRendering() const{ void dLytMapCapture_c::execute() { mStateMgr.executeState(); } + +void dLytMapCapture_c::fn_8012D6D0(mVec3_c *out) { + *out = dStage_c::GetInstance()->getMapRelated()->field_0x0FC; +} + +void dLytMapCapture_c::fn_8012D610(mVec3_c *out){ + dStage_c::GetInstance()->getMapRelated()->fn_801B50C0(0); + *out = dStage_c::GetInstance()->getMapRelated()->fn_801B4CB0(); +} + +void dLytMapCapture_c::fn_8012D670(mVec3_c *out){ + dStage_c::GetInstance()->getMapRelated()->fn_801B50C0(0); + *out = dStage_c::GetInstance()->getMapRelated()->fn_801B4C90(); +} + + +void dLytMapCapture_c::fn_8012D800(nw4r::lyt::Pane *param_2, const GXTexObj *param_3) { + if (param_3 != nullptr && dStage_c::GetInstance() != nullptr && dStage_c::GetInstance()->getMapRelated()->fn_801B5970(param_3)) { + field_0x070.width = GXGetTexObjWidth(param_3); + field_0x070.height = GXGetTexObjHeight(param_3); + param_2->SetSize(field_0x070); + param_2->GetMaterial()->GetTexMapAry()->ReplaceImage(*param_3); + } +} + + +void dLytMapCapture_c::fn_8012D6F0(){ + + dStage_c * pStage = dStage_c::GetInstance(); + + if (pStage != nullptr) { + dLytMapGlobal_c* pLytMap = dLytMapGlobal_c::GetInstance(); + + f32 zoom = pLytMap->getZoomFrame(); + f32 inv = 1.0f / pLytMap->getField_0x44(); + s32 floor = pLytMap->getFloor(); + + mVec3_c v(field_0x064 * inv, 1, field_0x06C * inv); + + pStage->getMapRelated()->fn_801B50C0(floor); + + pStage->getMapRelated()->field_0x108 = pLytMap->getMapScroll(); + pStage->getMapRelated()->field_0x114 = v; + + pStage->getMapRelated()->field_0x120 = pLytMap->getMapRotationCenter(); + + + pStage->getMapRelated()->field_0x1E6 = (u16)(-pLytMap->getMapRotation()); + pStage->getMapRelated()->field_0x12C = zoom; + pStage->getMapRelated()->field_0x1EE = 1; + } + return; +} |
