mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 14:24:56 +00:00
More CAutoMapper fixes
This commit is contained in:
@@ -1130,33 +1130,30 @@ void CAutoMapper::ProcessControllerInput(const CFinalInput& input, CStateManager
|
||||
|
||||
if (x300_textpane_instructions)
|
||||
{
|
||||
if (x84_)
|
||||
if (x78_areaHintDesc.IsLoaded())
|
||||
{
|
||||
if (x78_areaHintDesc.IsLoaded())
|
||||
{
|
||||
x2fc_textpane_hint->TextSupport().SetText(x78_areaHintDesc->GetString(0));
|
||||
x304_textpane_instructions1->TextSupport().SetText(u"");
|
||||
x300_textpane_instructions->TextSupport().SetText(u"");
|
||||
x308_textpane_instructions2->TextSupport().SetText(u"");
|
||||
}
|
||||
else
|
||||
{
|
||||
x2fc_textpane_hint->TextSupport().SetText(u"");
|
||||
std::u16string str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=SI,0.6,1.0,%8.8X;", u32(g_tweakPlayerRes->x24_lStick[x2e4_lStickPos].Value())));
|
||||
str += g_MainStringTable->GetString(46); // Rotate
|
||||
x300_textpane_instructions->TextSupport().SetText(str);
|
||||
str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=SI,0.6,1.0,%8.8X;", u32(g_tweakPlayerRes->x4c_cStick[x2e8_rStickPos].Value())));
|
||||
str += g_MainStringTable->GetString(47); // Move
|
||||
x304_textpane_instructions1->TextSupport().SetText(str);
|
||||
str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=%8.8X;", u32(g_tweakPlayerRes->x74_lTrigger[x2ec_lTriggerPos].Value())));
|
||||
str += g_MainStringTable->GetString(48); // Zoom
|
||||
str += hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=%8.8X;", u32(g_tweakPlayerRes->x80_rTrigger[x2f0_rTriggerPos].Value())));
|
||||
x308_textpane_instructions2->TextSupport().SetText(str);
|
||||
}
|
||||
x2fc_textpane_hint->TextSupport().SetText(x78_areaHintDesc->GetString(0));
|
||||
x304_textpane_instructions1->TextSupport().SetText(u"");
|
||||
x300_textpane_instructions->TextSupport().SetText(u"");
|
||||
x308_textpane_instructions2->TextSupport().SetText(u"");
|
||||
}
|
||||
else
|
||||
{
|
||||
x2fc_textpane_hint->TextSupport().SetText(u"");
|
||||
std::u16string str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=SI,0.6,1.0,%8.8X;", u32(g_tweakPlayerRes->x24_lStick[x2e4_lStickPos].Value())));
|
||||
str += g_MainStringTable->GetString(46); // Rotate
|
||||
x300_textpane_instructions->TextSupport().SetText(str);
|
||||
str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=SI,0.6,1.0,%8.8X;", u32(g_tweakPlayerRes->x4c_cStick[x2e8_rStickPos].Value())));
|
||||
str += g_MainStringTable->GetString(47); // Move
|
||||
x304_textpane_instructions1->TextSupport().SetText(str);
|
||||
str = hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=%8.8X;", u32(g_tweakPlayerRes->x74_lTrigger[x2ec_lTriggerPos].Value())));
|
||||
str += g_MainStringTable->GetString(48); // Zoom
|
||||
str += hecl::UTF8ToChar16(
|
||||
hecl::Format("&image=%8.8X;", u32(g_tweakPlayerRes->x80_rTrigger[x2f0_rTriggerPos].Value())));
|
||||
x308_textpane_instructions2->TextSupport().SetText(str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1233,13 +1230,15 @@ void CAutoMapper::Update(float dt, const CStateManager& mgr)
|
||||
std::u16string string;
|
||||
if (x1bc_state == EAutoMapperState::MapScreenUniverse ||
|
||||
(x1bc_state == EAutoMapperState::MapScreen && HasCurrentMapUniverseWorld()))
|
||||
string = hecl::UTF8ToChar16(hecl::Format("image=%8.8X", u32(g_tweakPlayerRes->x98_aButton[x2f4_aButtonPos].Value())));
|
||||
string = hecl::UTF8ToChar16(hecl::Format("&image=%8.8X;", u32(g_tweakPlayerRes->x98_aButton[x2f4_aButtonPos].Value())));
|
||||
right1->TextSupport().SetText(string);
|
||||
CGuiTextPane* right = static_cast<CGuiTextPane*>(x28_frmeMapScreen->FindWidget("textpane_right"));
|
||||
if (x1bc_state == EAutoMapperState::MapScreenUniverse)
|
||||
string = g_MainStringTable->GetString(45);
|
||||
else if (x1bc_state == EAutoMapperState::MapScreen)
|
||||
else if (x1bc_state == EAutoMapperState::MapScreen && HasCurrentMapUniverseWorld())
|
||||
string = g_MainStringTable->GetString(44);
|
||||
else
|
||||
string = std::u16string();
|
||||
right->TextSupport().SetText(string);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,6 @@ private:
|
||||
rstl::reserved_vector<TLockedToken<CTexture>, 5> x48_mapIcons;
|
||||
CAssetId x74_areaHintDescId;
|
||||
TLockedToken<CStringTable> x78_areaHintDesc;
|
||||
u32 x84_ = 0;
|
||||
CAssetId x88_mapAreaStringId;
|
||||
TLockedToken<CStringTable> x8c_mapAreaString; // Used to be optional
|
||||
u32 x9c_worldIdx = 0;
|
||||
|
||||
@@ -379,14 +379,21 @@ void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms& parms, int selAre
|
||||
const CMapArea::CMapAreaSurface& surf = mapa->GetSurface(info.GetLocalObjectIndex());
|
||||
zeus::CColor color(std::max(0.f, (-parms.GetCameraTransform().basis[1]).dot(
|
||||
areaPostXf.rotate(surf.GetNormal()))) * g_tweakAutoMapper->GetMapSurfaceNormColorLinear() +
|
||||
g_tweakAutoMapper->GetMapSurfaceNormColorConstant());
|
||||
g_tweakAutoMapper->GetMapSurfaceNormColorConstant());
|
||||
color *= info.GetSurfaceColor();
|
||||
if (lastAreaIdx != info.GetAreaIndex() || lastType != CMapObjectSortInfo::EObjectCode::Surface)
|
||||
CGraphics::SetModelMatrix(parms.GetPlaneProjectionTransform() * areaPostXf);
|
||||
surf.Draw(mapa->GetVertices(), color, info.GetOutlineColor(), parms.GetOutlineWidthScale());
|
||||
|
||||
lastAreaIdx = info.GetAreaIndex();
|
||||
lastType = info.GetObjectCode();
|
||||
}
|
||||
else if (info.GetObjectCode() == CMapObjectSortInfo::EObjectCode::Door ||
|
||||
info.GetObjectCode() == CMapObjectSortInfo::EObjectCode::Object)
|
||||
}
|
||||
for (const CMapObjectSortInfo& info : sortInfos)
|
||||
{
|
||||
const CMapArea* mapa = GetMapArea(info.GetAreaIndex());
|
||||
if (info.GetObjectCode() == CMapObjectSortInfo::EObjectCode::Door ||
|
||||
info.GetObjectCode() == CMapObjectSortInfo::EObjectCode::Object)
|
||||
{
|
||||
const CMappableObject& mapObj = mapa->GetMappableObject(info.GetLocalObjectIndex());
|
||||
zeus::CTransform objXf =
|
||||
@@ -403,6 +410,7 @@ void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms& parms, int selAre
|
||||
zeus::CMatrix3f(parms.GetObjectScale())));
|
||||
}
|
||||
mapObj.Draw(selArea, mwInfo, parms.GetAlpha(), lastType != info.GetObjectCode());
|
||||
lastType = info.GetObjectCode();
|
||||
}
|
||||
else if (info.GetObjectCode() == CMapObjectSortInfo::EObjectCode::DoorSurface)
|
||||
{
|
||||
@@ -413,9 +421,8 @@ void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms& parms, int selAre
|
||||
CGraphics::SetModelMatrix(objXf);
|
||||
mapObj.DrawDoorSurface(selArea, mwInfo, parms.GetAlpha(), info.GetLocalObjectIndex() % 6,
|
||||
lastType != info.GetObjectCode());
|
||||
lastType = info.GetObjectCode();
|
||||
}
|
||||
lastAreaIdx = info.GetAreaIndex();
|
||||
lastType = info.GetObjectCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user