BitSet<NumBits>& set(std::size_t pos, bool val = true) { validatePos(pos); if (val) { data_[getByteNum(pos)] = char(data_[getByteNum(pos)] | (1 << getBitNum(pos))); } else { data_[getByteNum(pos)] = char(data_[getByteNum(pos)] & ~(1 << getBitNum(pos))); } return *this; }
void MiniMap::validatePlayerPos(int currentLevel, long blockPlayerControls, ARX_INTERFACE_BOOK_MODE bookMode) { m_currentLevel = currentLevel; if(!blockPlayerControls) { float req; if((m_player->Interface & INTER_MAP) && (!(m_player->Interface & INTER_COMBATMODE)) && (bookMode == BOOKMODE_MINIMAP)) { req = 20.f; } else { req = 80.f; } if(fartherThan(Vec2f(m_playerLastPosX, m_playerLastPosZ), Vec2f(m_player->pos.x, m_player->pos.z), req)) { m_playerLastPosX = m_player->pos.x; m_playerLastPosZ = m_player->pos.z; validatePos(); } } }
Reference operator[](std::size_t pos) { validatePos(pos); return Reference(this, pos); }