mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #217 from lioncash/sign
AutoMapper/*: Resolve sign conversion warnings
This commit is contained in:
commit
55955973a1
|
@ -1249,7 +1249,7 @@ void CAutoMapper::Update(float dt, const CStateManager& mgr) {
|
|||
} else if (x24_world) {
|
||||
const IGameArea* area = x24_world->IGetAreaAlways(xa0_curAreaId);
|
||||
const CMapWorldInfo& mwInfo = *g_GameState->StateForWorld(x24_world->IGetWorldAssetId()).MapWorldInfo();
|
||||
if (mwInfo.IsMapped(xa0_curAreaId) || mwInfo.IsAreaVisted(xa0_curAreaId))
|
||||
if (mwInfo.IsMapped(xa0_curAreaId) || mwInfo.IsAreaVisited(xa0_curAreaId))
|
||||
stringId = area->IGetStringTableAssetId();
|
||||
else
|
||||
stringId = {};
|
||||
|
|
|
@ -246,9 +246,10 @@ void CMapArea::CMapAreaSurface::PostConstruct(const u8* buf, std::vector<u32>& i
|
|||
}
|
||||
|
||||
void CMapArea::CMapAreaSurface::Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor,
|
||||
const zeus::CColor& lineColor, float lineWidth, int instIdx) const {
|
||||
if (instIdx >= m_instances.size())
|
||||
const zeus::CColor& lineColor, float lineWidth, size_t instIdx) const {
|
||||
if (instIdx >= m_instances.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Instance& instance = const_cast<Instance&>(m_instances[instIdx]);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
CMapAreaSurface(CMapAreaSurface&&) = default;
|
||||
void PostConstruct(const u8* buf, std::vector<u32>& index);
|
||||
void Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor, const zeus::CColor& lineColor,
|
||||
float lineWidth, int instIdx = 0) const;
|
||||
float lineWidth, size_t instIdx = 0) const;
|
||||
const zeus::CVector3f& GetNormal() const { return x0_normal; }
|
||||
const zeus::CVector3f& GetCenterPosition() const { return xc_centroid; }
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ void CMapUniverse::Draw(const CMapUniverseDrawParms& parms, const zeus::CVector3
|
|||
if (!mwInfo.IsAnythingSet())
|
||||
continue;
|
||||
zeus::CColor surfColor, outlineColor;
|
||||
if (w == parms.GetFocusWorldIndex()) {
|
||||
if (s32(w) == parms.GetFocusWorldIndex()) {
|
||||
surfColor = data.GetSurfaceColorSelected();
|
||||
surfColor.a() *= parms.GetAlpha();
|
||||
outlineColor = data.GetOutlineColorSelected();
|
||||
|
@ -85,7 +85,7 @@ void CMapUniverse::Draw(const CMapUniverseDrawParms& parms, const zeus::CVector3
|
|||
|
||||
int lastWldIdx = -1;
|
||||
int lastHexIdx = -1;
|
||||
int instIdx = 0;
|
||||
size_t instIdx = 0;
|
||||
for (const CMapObjectSortInfo& info : sortInfos) {
|
||||
const CMapWorldData& mwData = x10_worldDatas[info.GetWorldIndex()];
|
||||
zeus::CColor surfColor = info.GetSurfaceColor();
|
||||
|
|
|
@ -244,7 +244,7 @@ void CMapWorld::DrawAreas(const CMapWorld::CMapWorldDrawParms& parms, int selAre
|
|||
const zeus::CColor* outlineColor;
|
||||
const zeus::CColor* surfacePlayerColor;
|
||||
const zeus::CColor* outlinePlayerColor;
|
||||
if (mwInfo.IsAreaVisted(thisArea)) {
|
||||
if (mwInfo.IsAreaVisited(thisArea)) {
|
||||
alphaSurf = parms.GetAlphaSurfaceVisited();
|
||||
alphaOutline = parms.GetAlphaOutlineVisited();
|
||||
surfaceColor = &g_tweakAutoMapper->GetSurfaceVisitedColor();
|
||||
|
|
|
@ -31,7 +31,7 @@ void CMapWorldInfo::PutTo(CBitStreamWriter& writer, const CSaveWorld& savw, CAss
|
|||
|
||||
for (u32 i = 0; i < worldMem.GetAreaCount(); ++i) {
|
||||
if (i < x0_visitedAreasAllocated)
|
||||
writer.WriteEncoded(IsAreaVisted(i), 1);
|
||||
writer.WriteEncoded(IsAreaVisited(i), 1);
|
||||
else
|
||||
writer.WriteEncoded(0, 1);
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ void CMapWorldInfo::SetDoorVisited(TEditorId eid, bool visited) { x28_visitedDoo
|
|||
|
||||
bool CMapWorldInfo::IsDoorVisited(TEditorId eid) const { return x28_visitedDoors.find(eid) != x28_visitedDoors.end(); }
|
||||
|
||||
bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const {
|
||||
if (aid + 1 > x0_visitedAreasAllocated) {
|
||||
bool CMapWorldInfo::IsAreaVisited(TAreaId aid) const {
|
||||
if (u32(aid) + 1 > x0_visitedAreasAllocated) {
|
||||
const_cast<CMapWorldInfo&>(*this).x4_visitedAreas.resize((aid + 32) / 32);
|
||||
const_cast<CMapWorldInfo&>(*this).x0_visitedAreasAllocated = aid + 1;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const {
|
|||
}
|
||||
|
||||
void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) {
|
||||
if (aid + 1 > x0_visitedAreasAllocated) {
|
||||
if (u32(aid) + 1 > x0_visitedAreasAllocated) {
|
||||
x4_visitedAreas.resize((aid + 32) / 32);
|
||||
x0_visitedAreasAllocated = aid + 1;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) {
|
|||
}
|
||||
|
||||
bool CMapWorldInfo::IsMapped(TAreaId aid) const {
|
||||
if (aid + 1 > x14_mappedAreasAllocated) {
|
||||
if (u32(aid) + 1 > x14_mappedAreasAllocated) {
|
||||
const_cast<CMapWorldInfo&>(*this).x18_mappedAreas.resize((aid + 32) / 32);
|
||||
const_cast<CMapWorldInfo&>(*this).x14_mappedAreasAllocated = aid + 1;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ bool CMapWorldInfo::IsMapped(TAreaId aid) const {
|
|||
}
|
||||
|
||||
void CMapWorldInfo::SetIsMapped(TAreaId aid, bool mapped) {
|
||||
if (aid + 1 > x14_mappedAreasAllocated) {
|
||||
if (u32(aid) + 1 > x14_mappedAreasAllocated) {
|
||||
x18_mappedAreas.resize((aid + 32) / 32);
|
||||
x14_mappedAreasAllocated = aid + 1;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void CMapWorldInfo::SetIsMapped(TAreaId aid, bool mapped) {
|
|||
|
||||
bool CMapWorldInfo::IsWorldVisible(TAreaId aid) const { return x38_mapStationUsed || IsMapped(aid); }
|
||||
|
||||
bool CMapWorldInfo::IsAreaVisible(TAreaId aid) const { return IsAreaVisted(aid) || IsMapped(aid); }
|
||||
bool CMapWorldInfo::IsAreaVisible(TAreaId aid) const { return IsAreaVisited(aid) || IsMapped(aid); }
|
||||
|
||||
bool CMapWorldInfo::IsAnythingSet() const {
|
||||
for (u32 i = 0; i < x0_visitedAreasAllocated; ++i)
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
void SetIsMapped(TAreaId, bool);
|
||||
void SetDoorVisited(TEditorId eid, bool val);
|
||||
bool IsDoorVisited(TEditorId eid) const;
|
||||
bool IsAreaVisted(TAreaId) const;
|
||||
bool IsAreaVisited(TAreaId) const;
|
||||
void SetAreaVisited(TAreaId, bool);
|
||||
bool IsWorldVisible(TAreaId) const;
|
||||
bool IsAreaVisible(TAreaId) const;
|
||||
|
|
|
@ -2310,7 +2310,7 @@ void CStateManager::SetCurrentAreaId(TAreaId aid) {
|
|||
|
||||
if (aid == kInvalidAreaId)
|
||||
return;
|
||||
if (x8c0_mapWorldInfo->IsAreaVisted(aid))
|
||||
if (x8c0_mapWorldInfo->IsAreaVisited(aid))
|
||||
return;
|
||||
x8c0_mapWorldInfo->SetAreaVisited(aid, true);
|
||||
x850_world->GetMapWorld()->RecalculateWorldSphere(*x8c0_mapWorldInfo, *x850_world);
|
||||
|
|
Loading…
Reference in New Issue