1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-12 04:14:05 +00:00

Pack LocalMapBase members

This commit is contained in:
Evil Eye 2024-11-17 13:47:55 +01:00
parent 79dbbceb10
commit 326544ade5
2 changed files with 12 additions and 24 deletions

View File

@ -177,18 +177,8 @@ namespace MWGui
LocalMapBase::LocalMapBase(
CustomMarkerCollection& markers, MWRender::LocalMap* localMapRender, bool fogOfWarEnabled)
: mLocalMapRender(localMapRender)
, mActiveCell(nullptr)
, mLocalMap(nullptr)
, mCompass(nullptr)
, mFogOfWarToggled(true)
, mFogOfWarEnabled(fogOfWarEnabled)
, mNumCells(1)
, mCellDistance(0)
, mCustomMarkers(markers)
, mMarkerUpdateTimer(0.0f)
, mLastDirectionX(0.0f)
, mLastDirectionY(0.0f)
, mNeedDoorMarkersUpdate(false)
{
mCustomMarkers.eventMarkersChanged += MyGUI::newDelegate(this, &LocalMapBase::updateCustomMarkers);
}

View File

@ -112,20 +112,20 @@ namespace MWGui
protected:
void updateLocalMap();
float mLocalMapZoom = 1.f;
MWRender::LocalMap* mLocalMapRender;
const MWWorld::Cell* mActiveCell;
bool mHasALastActiveCell = false;
const MWWorld::Cell* mActiveCell = nullptr;
osg::Vec2f mCurPos; // the position of the player in the world (in cell coords)
MyGUI::ScrollView* mLocalMap;
MyGUI::ImageBox* mCompass;
bool mFogOfWarToggled;
MyGUI::ScrollView* mLocalMap = nullptr;
MyGUI::ImageBox* mCompass = nullptr;
float mLocalMapZoom = 1.f;
bool mHasALastActiveCell = false;
bool mFogOfWarToggled = true;
bool mFogOfWarEnabled;
bool mNeedDoorMarkersUpdate = false;
int mNumCells; // for convenience, mCellDistance * 2 + 1
int mCellDistance;
int mNumCells = 1; // for convenience, mCellDistance * 2 + 1
int mCellDistance = 0;
// Stores markers that were placed by a player. May be shared between multiple map views.
CustomMarkerCollection& mCustomMarkers;
@ -185,12 +185,10 @@ namespace MWGui
void redraw();
float getWidgetSize() const;
float mMarkerUpdateTimer;
float mMarkerUpdateTimer = 0.f;
float mLastDirectionX;
float mLastDirectionY;
bool mNeedDoorMarkersUpdate;
float mLastDirectionX = 0.f;
float mLastDirectionY = 0.f;
private:
void updateDoorMarkers();