added missing properties
This commit is contained in:
1 parent
63ff80cac9
commit
ef2e1b4680
4 files changed
+189
-1
No files matched your search
@@ -34,6 +34,10 @@
|
||||
#include <QRect>
|
||||
#include <QString>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace Cevo {
|
||||
|
||||
class GraphicSet;
|
||||
@@ -67,6 +71,10 @@ public:
|
||||
QString name;
|
||||
Dpi::Bitmap data;
|
||||
Dpi::Bitmap mask;
|
||||
// Usage count per picture slot (10-column grid, 49px-tall rows) - used
|
||||
// by Tribes.pas's least-used-picture-first selection heuristic.
|
||||
std::vector<std::uint8_t> pixUsed;
|
||||
void resetPixUsed();
|
||||
|
||||
// Looks up by index first, falling back to name; nullptr (with a
|
||||
// warning) if neither resolves to an item.
|
||||
@@ -85,4 +93,18 @@ private:
|
||||
constexpr const char *GraphicSetFileRootNode = "GraphicSet";
|
||||
constexpr const char *GraphicSetFileExt = ".grs";
|
||||
|
||||
// TGraphicSets equivalent: an owning registry of loaded GraphicSets, keyed
|
||||
// by name (ScreenTools.pas's global `GrExt`). Composition over
|
||||
// std::vector<std::unique_ptr<GraphicSet>>, same pattern as Brains.
|
||||
class GraphicSets {
|
||||
public:
|
||||
GraphicSet *searchByName(const QString &name) const;
|
||||
GraphicSet &addNew(const QString &name);
|
||||
void resetPixUsed();
|
||||
void clear() { m_items.clear(); }
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<GraphicSet>> m_items;
|
||||
};
|
||||
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user