Add an easy way to get list of object definitions
This commit is contained in:
@@ -74,6 +74,10 @@ void X26TripletList::updateInternalData()
|
|||||||
ActivePosition activePosition;
|
ActivePosition activePosition;
|
||||||
X26Triplet *triplet;
|
X26Triplet *triplet;
|
||||||
|
|
||||||
|
m_objects[0].clear();
|
||||||
|
m_objects[1].clear();
|
||||||
|
m_objects[2].clear();
|
||||||
|
|
||||||
// Check for errors, and fill in where the Active Position goes for Level 2.5 and above
|
// Check for errors, and fill in where the Active Position goes for Level 2.5 and above
|
||||||
for (int i=0; i < m_list.size(); i++) {
|
for (int i=0; i < m_list.size(); i++) {
|
||||||
triplet = &m_list[i];
|
triplet = &m_list[i];
|
||||||
@@ -140,6 +144,7 @@ void X26TripletList::updateInternalData()
|
|||||||
case 0x15: // Define Active Object
|
case 0x15: // Define Active Object
|
||||||
case 0x16: // Define Adaptive Object
|
case 0x16: // Define Adaptive Object
|
||||||
case 0x17: // Define Passive Object
|
case 0x17: // Define Passive Object
|
||||||
|
m_objects[triplet->modeExt() - 0x15].append(i);
|
||||||
activePosition.reset();
|
activePosition.reset();
|
||||||
// Make sure data field holds correct place of triplet
|
// Make sure data field holds correct place of triplet
|
||||||
// otherwise the object won't appear
|
// otherwise the object won't appear
|
||||||
|
|||||||
@@ -96,11 +96,13 @@ public:
|
|||||||
bool isEmpty() const { return m_list.isEmpty(); }
|
bool isEmpty() const { return m_list.isEmpty(); }
|
||||||
void reserve(int alloc) { m_list.reserve(alloc); }
|
void reserve(int alloc) { m_list.reserve(alloc); }
|
||||||
int size() const { return m_list.size(); }
|
int size() const { return m_list.size(); }
|
||||||
|
const QList<int> &objects(int t) const { return m_objects[t]; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateInternalData();
|
void updateInternalData();
|
||||||
|
|
||||||
QList<X26Triplet> m_list;
|
QList<X26Triplet> m_list;
|
||||||
|
QList<int> m_objects[3];
|
||||||
|
|
||||||
class ActivePosition
|
class ActivePosition
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user