initial port for Cevo game in C++ (libs)
This commit is contained in:
commit
8436242032
375 files changed
+46282
No files matched your search
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Dpi/DpiGraphics.h"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
namespace Cevo {
|
||||
|
||||
// TTexture equivalent: a tiled background bitmap plus the UI palette colors
|
||||
// associated with a given "age" (the game's tech-era visual theme), looked
|
||||
// up from the Colors palette bitmap.
|
||||
class Texture {
|
||||
public:
|
||||
Texture();
|
||||
|
||||
int age() const { return m_age; }
|
||||
// Updates the palette colors from Cevo::Colors; does not (re)load the
|
||||
// per-age background image, that stays an application-level concern
|
||||
// (Directories::getGraphicsDir() + image()->loadFromFile() is not
|
||||
// ported here). Call image().loadFromFile() explicitly afterwards.
|
||||
void setAge(int value);
|
||||
|
||||
int width() const { return m_image.width(); }
|
||||
int height() const { return m_image.height(); }
|
||||
Dpi::Bitmap &image() { return m_image; }
|
||||
Dpi::Canvas &canvas() { return m_image.canvas(); }
|
||||
|
||||
void assign(const Texture &source);
|
||||
|
||||
QColor colorBevelLight = Qt::black;
|
||||
QColor colorBevelShade = Qt::black;
|
||||
QColor colorTextLight = Qt::black;
|
||||
QColor colorTextShade = Qt::black;
|
||||
QColor colorLitText = Qt::black;
|
||||
QColor colorMark = Qt::black;
|
||||
QColor colorPage = Qt::black;
|
||||
QColor colorCover = Qt::black;
|
||||
|
||||
private:
|
||||
int m_age = -2;
|
||||
Dpi::Bitmap m_image;
|
||||
};
|
||||
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user