Files
Client/Engine/Zalla3D Scene Class/RBitSet.h
LGram16 e067522598 Initial commit: ROW Client source code
Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:24:34 +09:00

59 lines
1.1 KiB
C++

// BitSet.h: interface for the CBitSet class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __RBITSET_H__
#define __RBITSET_H__
#include <windows.h>
class RBitset {
protected:
unsigned int *m_pBits; // Bit Set ptr
int m_iBitSize; // Bit Set Size
public:
RBitset() {
m_pBits = NULL;
m_iBitSize = 0;
}
~RBitset() {
if(m_pBits)
{
delete[] m_pBits;
m_pBits = NULL;
}
}
void ResizeBits(int iNewCount) {
m_iBitSize = iNewCount / 32 + 1; // Get Inteager Size
if(m_pBits) {
delete[] m_pBits;
m_pBits = NULL;
}
m_pBits = new unsigned int[m_iBitSize]; // Allocate Bits
ClearBits();
}
void ClearBits() { // Clear All Bits
memset(m_pBits,0,sizeof(unsigned int) * m_iBitSize);
}
void ClearOneBit(int index) {
m_pBits[ index >> 5 ] &= ~( 1 << ( index & 31 ) );
}
void SetBit(int index) { // Set Bit
m_pBits[ index >> 5 ] |= ( 1 << ( index & 31 ) );
}
bool GetBit(int index) { // Return Bit's Setting : return true or false
return (m_pBits[ index >> 5 ] & ( 1 << (index & 31 ) )) ? true : false;
}
};
#endif