mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:04:56 +00:00
zeus constexpr refactor and thermal visor fixes
This commit is contained in:
@@ -1420,7 +1420,7 @@ void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, flo
|
||||
|
||||
CMapUniverse::CMapUniverseDrawParms parms(universeInterp, x9c_worldIdx, g_GameState->CurrentWorldAssetId(), hexIdx,
|
||||
x1dc_playerFlashPulse, mgr, planeXf, camXf);
|
||||
x8_mapu->Draw(parms, zeus::CVector3f::skZero, 0.f, 0.f);
|
||||
x8_mapu->Draw(parms, zeus::skZero3f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
if (!IsInMapperState(EAutoMapperState::MapScreenUniverse)) {
|
||||
@@ -1467,7 +1467,7 @@ void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, flo
|
||||
const CMapArea* mapa = mw->GetMapArea(loc.xc_areaId);
|
||||
if (!mapa)
|
||||
continue;
|
||||
zeus::CTransform camRot(camXf.buildMatrix3f(), zeus::CVector3f::skZero);
|
||||
zeus::CTransform camRot(camXf.buildMatrix3f(), zeus::skZero3f);
|
||||
CGraphics::SetModelMatrix(
|
||||
mapXf * zeus::CTransform::Translate(mapa->GetAreaPostTransform(*x24_world, loc.xc_areaId).origin) *
|
||||
zeus::CTransform::Translate(mapa->GetAreaCenterPoint()) * zeus::CTransform::Scale(objectScale) * camRot);
|
||||
@@ -1484,7 +1484,7 @@ void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, flo
|
||||
} else
|
||||
alpha *= xa8_renderStates[0].x34_alphaSurfaceVisited;
|
||||
alpha *= mapAlpha;
|
||||
zeus::CColor color = zeus::CColor::skWhite;
|
||||
zeus::CColor color = zeus::skWhite;
|
||||
color.a() = alpha;
|
||||
filter.drawVerts(color, verts);
|
||||
}
|
||||
@@ -1510,7 +1510,7 @@ void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, flo
|
||||
}
|
||||
}
|
||||
CGraphics::SetDepthRange(DEPTH_NEAR, DEPTH_NEAR);
|
||||
CGuiWidgetDrawParms parms(frmeAlpha, zeus::CVector3f::skZero);
|
||||
CGuiWidgetDrawParms parms(frmeAlpha, zeus::skZero3f);
|
||||
x28_frmeMapScreen->Draw(parms);
|
||||
CGraphics::SetDepthRange(DEPTH_NEAR, DEPTH_HUD);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ const zeus::CVector3f& CMapArea::GetAreaPostTranslate(const IWorld& world, TArea
|
||||
if (world.IGetWorldAssetId() == g_ResFactory->TranslateOriginalToNew(0xB1AC4D65)) // Phazon Mines
|
||||
return MinesPostTransforms[MinesPostTransformIndices[aid]];
|
||||
else
|
||||
return zeus::CVector3f::skZero;
|
||||
return zeus::skZero3f;
|
||||
}
|
||||
|
||||
CMapArea::CMapAreaSurface::CMapAreaSurface(const void* surfBuf) {
|
||||
|
||||
@@ -28,9 +28,9 @@ CMapUniverse::CMapWorldData::CMapWorldData(CInputStream& in, u32 version)
|
||||
else
|
||||
x54_surfColorSelected.fromRGBA32(255 | (u32(x10_worldAssetId.Value()) & 0xFFFFFF00));
|
||||
|
||||
x58_outlineColorSelected = zeus::CColor::lerp(zeus::CColor::skWhite, x54_surfColorSelected, 0.5f);
|
||||
x5c_surfColorUnselected = zeus::CColor::lerp(zeus::CColor::skBlack, x54_surfColorSelected, 0.5f);
|
||||
x60_outlineColorUnselected = zeus::CColor::lerp(zeus::CColor::skWhite, x5c_surfColorUnselected, 0.5f);
|
||||
x58_outlineColorSelected = zeus::CColor::lerp(zeus::skWhite, x54_surfColorSelected, 0.5f);
|
||||
x5c_surfColorUnselected = zeus::CColor::lerp(zeus::skBlack, x54_surfColorSelected, 0.5f);
|
||||
x60_outlineColorUnselected = zeus::CColor::lerp(zeus::skWhite, x5c_surfColorUnselected, 0.5f);
|
||||
|
||||
for (const zeus::CTransform& xf : x44_hexagonXfs)
|
||||
x64_centerPoint += xf.origin;
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
zeus::CColor x58_outlineColorSelected = zeus::CColor(1.0f, 0.0f, 1.0f);
|
||||
zeus::CColor x5c_surfColorUnselected = zeus::CColor(1.0f, 0.0f, 1.0f);
|
||||
zeus::CColor x60_outlineColorUnselected = zeus::CColor(1.0f, 0.0f, 1.0f);
|
||||
zeus::CVector3f x64_centerPoint = zeus::CVector3f::skZero;
|
||||
zeus::CVector3f x64_centerPoint = zeus::skZero3f;
|
||||
|
||||
public:
|
||||
CMapWorldData(CInputStream& in, u32 version);
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
CAssetId x0_hexagonId;
|
||||
TLockedToken<CMapArea> x4_hexagonToken;
|
||||
std::vector<CMapWorldData> x10_worldDatas;
|
||||
zeus::CVector3f x20_universeCenter = zeus::CVector3f::skZero;
|
||||
zeus::CVector3f x20_universeCenter = zeus::skZero3f;
|
||||
float x2c_universeRadius = 1600.f;
|
||||
|
||||
public:
|
||||
|
||||
@@ -259,7 +259,7 @@ void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms& parms, int selAre
|
||||
}
|
||||
|
||||
zeus::CColor hintFlashColor =
|
||||
zeus::CColor::lerp(zeus::CColor::skClear, zeus::CColor{1.f, 1.f, 1.f, 0.f}, parms.GetHintAreaFlashIntensity());
|
||||
zeus::CColor::lerp(zeus::skClear, zeus::CColor{1.f, 1.f, 1.f, 0.f}, parms.GetHintAreaFlashIntensity());
|
||||
|
||||
zeus::CColor finalSurfColor, finalOutlineColor;
|
||||
if (thisArea == selArea && inMapScreen) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Graphics/CTexture.hpp"
|
||||
|
||||
namespace urde {
|
||||
const zeus::CVector3f CMappableObject::skDoorVerts[8] = {};
|
||||
zeus::CVector3f CMappableObject::skDoorVerts[8] = {};
|
||||
|
||||
static const u32 DoorIndices[] = {6, 4, 2, 0, 3, 1, 7, 5, 1, 0, 5, 4, 7, 6, 3, 2, 3, 2, 1, 0, 5, 4, 7, 6};
|
||||
|
||||
@@ -94,7 +94,7 @@ std::pair<zeus::CColor, zeus::CColor> CMappableObject::GetDoorColors(int curArea
|
||||
} else if (mwInfo.IsDoorVisited(x8_objId)) {
|
||||
color = g_tweakAutoMapper->GetOpenDoorColor();
|
||||
} else {
|
||||
color = zeus::CColor::skClear;
|
||||
color = zeus::skClear;
|
||||
}
|
||||
|
||||
color.a() *= alpha;
|
||||
@@ -121,7 +121,7 @@ void CMappableObject::Draw(int curArea, const CMapWorldInfo& mwInfo, float alpha
|
||||
}
|
||||
} else {
|
||||
CAssetId iconRes;
|
||||
zeus::CColor iconColor = zeus::CColor::skWhite;
|
||||
zeus::CColor iconColor = zeus::skWhite;
|
||||
switch (x0_type) {
|
||||
case EMappableObjectType::DownArrowYellow:
|
||||
iconRes = g_tweakPlayerRes->x10_minesBreakFirstTopIcon;
|
||||
@@ -193,7 +193,7 @@ zeus::CVector3f CMappableObject::BuildSurfaceCenterPoint(int surfIdx) const {
|
||||
|
||||
switch (surfIdx) {
|
||||
case 0:
|
||||
return x10_transform * zeus::CVector3f::skZero;
|
||||
return x10_transform * zeus::skZero3f;
|
||||
case 1:
|
||||
return x10_transform * zeus::CVector3f{0.f, 0.f, 2.f * doorCenter.x()};
|
||||
case 2:
|
||||
@@ -235,7 +235,7 @@ boo::ObjToken<boo::IGraphicsBufferS> CMappableObject::g_doorIbo;
|
||||
void CMappableObject::ReadAutoMapperTweaks(const ITweakAutoMapper& tweaks) {
|
||||
const zeus::CVector3f& center = tweaks.GetDoorCenter();
|
||||
zeus::simd_floats centerF(center.mSimd);
|
||||
zeus::CVector3f* doorVerts = const_cast<zeus::CVector3f*>(&CMappableObject::skDoorVerts[0]);
|
||||
zeus::CVector3f* doorVerts = CMappableObject::skDoorVerts;
|
||||
/* Wrap door verts around -Z to build surface */
|
||||
doorVerts[0].assign(-centerF[2], -centerF[1], 0.f);
|
||||
doorVerts[1].assign(-centerF[2], -centerF[1], 2.f * centerF[0]);
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
enum class EVisMode { Always, MapStationOrVisit, Visit, Never, MapStationOrVisit2 };
|
||||
|
||||
private:
|
||||
static const zeus::CVector3f skDoorVerts[8];
|
||||
static zeus::CVector3f skDoorVerts[8];
|
||||
|
||||
EMappableObjectType x0_type;
|
||||
EVisMode x4_visibilityMode;
|
||||
|
||||
Reference in New Issue
Block a user