Compare commits

...

3 Commits

15 changed files with 780 additions and 278 deletions

View File

@ -74,6 +74,7 @@
"stop_token": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"variant": "cpp"
"variant": "cpp",
"*.xpm": "cpp"
}
}

View File

@ -1,38 +1,15 @@
#include "Controller.h"
Controller::Controller(Drawer& drawer): drawer(drawer) {};
void Controller::resize(const wxSize& tableSize) {
wxSize& resolution = drawer.resolution;
Dimensions& gridSize = drawer.gridSize;
wxRect& tablePixelRect = drawer.tablePixelRect;
resolution = tableSize;
if (stopwatch >= 0) {
int gridPoint = mmin(resolution.x / (gridSize.x * TILE_WIDTH),
resolution.y / (gridSize.y * TILE_HEIGHT));
if (gridPoint > 2) {
tablePixelRect.SetSize({gridPoint * TILE_WIDTH * gridSize.x, gridPoint * TILE_HEIGHT * gridSize.y});
drawer.tilePixelSize.Set(gridPoint * TILE_WIDTH, gridPoint * TILE_HEIGHT);
}
tablePixelRect.SetPosition({(resolution.x - tablePixelRect.width) / 2,
(resolution.y - tablePixelRect.height) / 2});
}
drawer.setBG(tableSize);
drawer.initScreen(table);
}
Controller::Controller(Drawer& drawer) : drawer(drawer){};
void Controller::loadLayout(const wxString& path) {
layout.openFile(path);
drawer.gridSize = layout.getDimensions();
gridSize = layout.getDimensions();
table = TLVec(drawer.gridSize.z, vector<vector<CardT>>(drawer.gridSize.x, vector<CardT>(drawer.gridSize.y, EMPTY)));
table = TLVec(
gridSize.z,
vector<vector<CardT>>(gridSize.x, vector<CardT>(gridSize.y, EMPTY)));
layout.readLayout(table);
@ -60,8 +37,6 @@ void Controller::fill(bool solveable) {
void Controller::fillSolveableTable() {
time_t start_time = time(NULL);
auto& gridSize = drawer.gridSize;
std::list<ThreePoint> positions;
int overall = gridSize.z * gridSize.x * gridSize.y;
@ -91,10 +66,13 @@ void Controller::fillSolveableTable() {
emplace_rand(id, positions, past_pos, past_ptr);
}
wxLogInfo(wxString::Format("Filling took %i seconds", start_time - time(NULL)));
wxLogInfo(
wxString::Format("Filling took %i seconds", start_time - time(NULL)));
}
int Controller::emplace_rand(int id, std::list<ThreePoint> positions, int past_pos, std::list<ThreePoint>::iterator past_ptr) {
int Controller::emplace_rand(int id, std::list<ThreePoint> positions,
int past_pos,
std::list<ThreePoint>::iterator past_ptr) {
int d = rand() % positions.size() - past_pos;
if (d > 0)
@ -119,9 +97,9 @@ int Controller::emplace_rand(int id, std::list<ThreePoint> positions, int past_p
}
void Controller::free_table() {
for (int z = 0; z < drawer.gridSize.z; z++)
for (int x = 0; x < drawer.gridSize.x; x++)
for (int y = 0; y < drawer.gridSize.y; y++) {
for (int z = 0; z < gridSize.z; z++)
for (int x = 0; x < gridSize.x; x++)
for (int y = 0; y < gridSize.y; y++) {
CardT id = table[z][x][y];
if (id >= 0) {
@ -141,9 +119,9 @@ void Controller::fillRandom() {
auto not_end = remaining;
for (int z = 0; z < drawer.gridSize.z && not_end; z++)
for (int x = 0; x < drawer.gridSize.x && not_end; x++)
for (int y = 0; y < drawer.gridSize.y && not_end; y++)
for (int z = 0; z < gridSize.z && not_end; z++)
for (int x = 0; x < gridSize.x && not_end; x++)
for (int y = 0; y < gridSize.y && not_end; y++)
if (table[z][x][y] == FREE) {
table[z][x][y] = genRandId();
not_end--;
@ -167,7 +145,7 @@ CardT Controller::genRandId() {
/**
* It also changes point to top right coordinate of card
*/
*/
CardT* Controller::getCardByPosition(ThreePoint& point) {
int8_t topIndex = -1;
CardT* res = nullptr;
@ -185,10 +163,10 @@ CardT* Controller::getCardByPosition(ThreePoint& point) {
if (point.x > 0)
for (int z = table.size() - 1; z >= 0; z--)
if (table[z][point.x-1][point.y] >= 0) {
if (table[z][point.x - 1][point.y] >= 0) {
if (z > topIndex) {
topIndex = z;
res = &table[z][point.x-1][point.y];
res = &table[z][point.x - 1][point.y];
realPos.x = point.x - 1;
realPos.y = point.y;
@ -198,10 +176,10 @@ CardT* Controller::getCardByPosition(ThreePoint& point) {
if (point.y > 0)
for (int z = table.size() - 1; z >= 0; z--)
if (table[z][point.x][point.y-1] >= 0) {
if (table[z][point.x][point.y - 1] >= 0) {
if (z > topIndex) {
topIndex = z;
res = &table[z][point.x][point.y-1];
res = &table[z][point.x][point.y - 1];
realPos.x = point.x;
realPos.y = point.y - 1;
@ -211,10 +189,10 @@ CardT* Controller::getCardByPosition(ThreePoint& point) {
if (point.x > 0 && point.y > 0)
for (int z = table.size() - 1; z >= 0; z--)
if (table[z][point.x-1][point.y-1] >= 0) {
if (table[z][point.x - 1][point.y - 1] >= 0) {
if (z > topIndex) {
topIndex = z;
res = &table[z][point.x-1][point.y-1];
res = &table[z][point.x - 1][point.y - 1];
realPos.x = point.x - 1;
realPos.y = point.y - 1;
@ -229,45 +207,50 @@ CardT* Controller::getCardByPosition(ThreePoint& point) {
return res;
}
bool Controller::available(const ThreePoint& point) {
bool Controller::available(const ThreePoint& point) const {
return upFree(point) && sideFree(point);
}
bool Controller::upFree(const ThreePoint& point) {
bool Controller::upFree(const ThreePoint& point) const {
if (point.z == table.size() - 1)
return true;
return !(
(table[point.z + 1][point.x][point.y] >= 0) ||
return !((table[point.z + 1][point.x][point.y] >= 0) ||
(point.x > 0 && table[point.z + 1][point.x - 1][point.y] >= 0) ||
(point.y > 0 && table[point.z + 1][point.x][point.y - 1] >= 0) ||
(point.x > 0 && point.y > 0 && table[point.z + 1][point.x - 1][point.y - 1] >= 0) ||
(point.x < table[point.z].size() - 1 && table[point.z + 1][point.x + 1][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 && table[point.z + 1][point.x][point.y + 1] >= 0) ||
(point.x < table[point.z].size() - 1 && point.y < table[point.z][point.x].size() - 1 && table[point.z + 1][point.x + 1][point.y + 1] >= 0) ||
(point.x > 0 && point.y < table[point.z][point.x].size() - 1 && table[point.z + 1][point.x - 1][point.y + 1] >= 0) ||
(point.x < table[point.z].size() - 1 && point.y > 0 && table[point.z + 1][point.x + 1][point.y - 1] >= 0)
);
(point.x > 0 && point.y > 0 &&
table[point.z + 1][point.x - 1][point.y - 1] >= 0) ||
(point.x < table[point.z].size() - 1 &&
table[point.z + 1][point.x + 1][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 &&
table[point.z + 1][point.x][point.y + 1] >= 0) ||
(point.x < table[point.z].size() - 1 &&
point.y < table[point.z][point.x].size() - 1 &&
table[point.z + 1][point.x + 1][point.y + 1] >= 0) ||
(point.x > 0 && point.y < table[point.z][point.x].size() - 1 &&
table[point.z + 1][point.x - 1][point.y + 1] >= 0) ||
(point.x < table[point.z].size() - 1 && point.y > 0 &&
table[point.z + 1][point.x + 1][point.y - 1] >= 0));
}
bool Controller::sideFree(const ThreePoint& point) {
bool Controller::sideFree(const ThreePoint& point) const {
bool lfree = true;
bool rfree = true;
if (point.x > 1)
lfree = !(
(point.y > 0 && table[point.z][point.x-2][point.y-1] >= 0) ||
(table[point.z][point.x-2][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 && table[point.z][point.x-2][point.y+1] >= 0)
);
lfree =
!((point.y > 0 && table[point.z][point.x - 2][point.y - 1] >= 0) ||
(table[point.z][point.x - 2][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 &&
table[point.z][point.x - 2][point.y + 1] >= 0));
if (point.x < table[point.z].size() - 2)
rfree = !(
(point.y > 0 && table[point.z][point.x+2][point.y-1] >= 0) ||
(table[point.z][point.x+2][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 && table[point.z][point.x+2][point.y+1] >= 0)
);
rfree =
!((point.y > 0 && table[point.z][point.x + 2][point.y - 1] >= 0) ||
(table[point.z][point.x + 2][point.y] >= 0) ||
(point.y < table[point.z][point.x].size() - 1 &&
table[point.z][point.x + 2][point.y + 1] >= 0));
return lfree || rfree;
}
@ -281,8 +264,10 @@ void Controller::handleClick(const wxPoint& point) {
auto card = getCardByPosition(pos);
if (pos.z >= 0 && available(pos)) {
if (selected != nullptr && sameValues(*card, *selected) && selected != card) {
steps.push({CardEntry{drawer.marked, *selected}, CardEntry{pos, *card}});
if (selected != nullptr && sameValues(*card, *selected) &&
selected != card) {
steps.push({CardEntry{drawer.marked, *selected},
CardEntry{pos, *card}});
*selected = MATCHED;
*card = MATCHED;
@ -296,14 +281,13 @@ void Controller::handleClick(const wxPoint& point) {
selected = card;
drawer.marked = pos;
}
drawer.initScreen(table);
}
}
}
bool Controller::sameValues(CardT a, CardT b) {
if (a == b) return true;
bool Controller::sameValues(CardT a, CardT b) const {
if (a == b)
return true;
else if (a >= 38 && b >= 38)
return true;
else if (a >= 34 && a <= 37 && b >= 34 && b <= 37)
@ -323,3 +307,7 @@ void Controller::undo() {
steps.pop();
}
}
bool Controller::gameStarted() const {
return stopwatch > 0;
}

View File

@ -16,8 +16,6 @@ public:
int stopwatch = -1;
void resize(const wxSize& tableSize);
void loadLayout(const wxString& path);
void handleClick(const wxPoint& point);
@ -31,6 +29,11 @@ public:
uint8_t remaining;
void undo();
bool gameStarted() const;
Dimensions gridSize;
private:
Drawer& drawer;
XmlLayout layout;
@ -40,21 +43,22 @@ private:
CardT* selected = nullptr;
void fillSolveableTable();
void fillRandom();
int emplace_rand(int id, std::list<ThreePoint> positions, int past_pos,
std::list<ThreePoint>::iterator past_ptr);
int emplace_rand(int id, std::list<ThreePoint> positions, int past_pos, std::list<ThreePoint>::iterator past_ptr);
void fillRandom();
CardT genRandId();
CardT* getCardByPosition(ThreePoint& point);
bool available(const ThreePoint& point);
bool upFree(const ThreePoint& point);
bool sideFree(const ThreePoint& point);
bool available(const ThreePoint& point) const;
bool upFree(const ThreePoint& point) const;
bool sideFree(const ThreePoint& point) const;
bool sameValues(CardT a, CardT b);
bool sameValues(CardT a, CardT b) const;
std::array<uint8_t, TILE_IMAGES_N>cardsCounter;
std::array<uint8_t, TILE_IMAGES_N> cardsCounter;
std::stack<std::array<CardEntry, 2>> steps;
};

View File

@ -1,66 +1,60 @@
#include "Drawer.h"
static const char* tileImageNames[] = { "Pin1", "Pin2", "Pin3", "Pin4", "Pin5", "Pin6", "Pin7", "Pin8", "Pin9", "Sou1", "Sou2", "Sou3", "Sou4", "Sou5", "Sou6", "Sou7", "Sou8", "Sou9", "Man1", "Man2", "Man3", "Man4", "Man5", "Man6", "Man7", "Man8", "Man9", "Chun", "Haku", "Hatsu", "Nan", "Pei", "Shaa", "Ton", "Flower1", "Flower2", "Flower3", "Flower4", "Season1", "Season2", "Season3", "Season4" };
static const char* tileImageNames[] = {
// clang-format off
"Pin1", "Pin2", "Pin3", "Pin4", "Pin5", "Pin6", "Pin7", "Pin8", "Pin9",
"Sou1", "Sou2", "Sou3", "Sou4", "Sou5", "Sou6", "Sou7", "Sou8", "Sou9",
"Man1", "Man2", "Man3", "Man4", "Man5", "Man6", "Man7", "Man8", "Man9",
"Chun", "Haku", "Hatsu",
"Nan", "Pei", "Shaa", "Ton",
"Flower1", "Flower2", "Flower3", "Flower4",
"Season1", "Season2", "Season3", "Season4"
// clang-format on
};
Drawer::Drawer(): marked{-1, -1, -1} {
static const wxColor lGreen{0x07, 0x55, 0x2b};
static const wxColor dGreen{0x01, 0x2d, 0x16};
Drawer::Drawer() : marked{-1, -1, -1} {
for (int i = 0; i < TILE_IMAGES_N; i++) {
if (!tileImages[i].LoadFile(_("./resources/tiles/") + _(tileImageNames[i]) + _(".png"), wxBITMAP_TYPE_PNG))
wxLogDebug(_("./resources/tiles/") + _(tileImageNames[i]) + _(".png ") + wxString::Format(wxT("%i"), i));
bool succeed = tileImages[i].LoadFile(
_("./resources/tiles/") + _(tileImageNames[i]) + _(".png"),
wxBITMAP_TYPE_PNG);
if (!succeed)
wxLogDebug(_("failed to load tile ./resources/tiles/") +
_(tileImageNames[i]) + _(".png with index") +
wxString::Format("%i", i));
}
}
void Drawer::drawTable(wxDC& dc) {
if (isScreenReady)
dc.DrawBitmap(screenBitmap, 0, 0, false);
dc.DrawBitmap(bgBitmap, 0, 0, false);
if (boardBitmap.IsOk()) {
wxLogDebug("Drawing board");
dc.DrawBitmap(boardBitmap, tablePixelRect.GetPosition(), true);
}
}
wxBitmap copyBitmap(const wxBitmap& old) {
return old.GetSubBitmap(wxRect(0, 0, old.GetWidth(), old.GetHeight()));
}
void Drawer::composeBG() {
bgBitmap = wxBitmap(resolution);
void Drawer::setBG(const wxSize& tableSize) {
bgBitmap = wxBitmap(tableSize);
wxLogDebug(
wxString::Format("Rebuild bg %i %i", resolution.x, resolution.y));
wxMemoryDC dc;
dc.SelectObject(bgBitmap);
dc.GradientFillConcentric(wxRect(wxPoint(0, 0), tableSize), wxColor(7, 85, 45), wxColor(1, 45, 22));
isBgReady = true;
dc.GradientFillConcentric(wxRect(wxPoint(0, 0), resolution), lGreen,
dGreen);
}
wxPoint Drawer::toGrid(const wxPoint& point) {
wxPoint out(-1, -1);
void Drawer::composeBoard(const TLVec& layout, const Dimensions& gridSize) {
boardBitmap = wxBitmap(tablePixelRect.GetSize());
if (point.x >= tablePixelRect.x &&
point.x <= tablePixelRect.x + tablePixelRect.width &&
point.y >= tablePixelRect.y &&
point.y <= tablePixelRect.y + tablePixelRect.height)
{
out.x = (point.x - tablePixelRect.x) / tilePixelSize.x;
out.y = (point.y - tablePixelRect.y) / tilePixelSize.y;
}
return out;
}
wxPoint Drawer::fromGrid(int x, int y) {
return { tablePixelRect.x + x * tilePixelSize.x,
tablePixelRect.y + y * tilePixelSize.y };
}
wxPoint Drawer::fromGrid(const wxPoint& point) {
return fromGrid(point.x, point.y);
}
void Drawer::initScreen(const TLVec& layout) {
if (isBgReady) {
screenBitmap = copyBitmap(bgBitmap);
wxLogDebug(_("Reinit"));
wxLogDebug(_("Rebuild board"));
wxMemoryDC dc;
dc.SelectObject(screenBitmap);
dc.SelectObject(boardBitmap);
for (int z = 0; z < gridSize.z; z++)
for (int x = 0; x < gridSize.x; x++)
@ -70,35 +64,125 @@ void Drawer::initScreen(const TLVec& layout) {
drawTile(dc, c, fromGrid(x, y), z);
}
isScreenReady = true;
}
wxMask* mask = new wxMask(boardBitmap, wxColor(0x00, 0x00, 0x00));
boardBitmap.SetMask(mask);
}
void Drawer::drawTile(wxDC& dc, int8_t index, const wxPoint& position, uint8_t zIndex) {
void Drawer::drawTile(wxDC& dc, int8_t index, const wxPoint& position,
uint8_t zIndex) const {
wxBrush _bgColor = dc.GetBrush();
wxBrush front = wxColor(255, 255, 255);
wxBrush back = wxColor(200, 200, 200);
wxBrush front = wxColor(0xff, 0xff, 0xff);
wxBrush back = wxColor(0xc8, 0xc8, 0xc8);
if (position == fromGrid({marked.x, marked.y}) && marked.z == zIndex) {
front = wxColor(200, 255, 200);
back = wxColor(190, 220, 190);
front = wxColor(0xc8, 0xff, 0xc8);
back = wxColor(0xbe, 0xdc, 0xbe);
}
dc.SetBrush(back);
dc.DrawRoundedRectangle(position.x + (tilePixelSize.GetWidth()/10 + 3) - (tilePixelSize.GetWidth()/10 + 3)*zIndex, position.y + (tilePixelSize.GetHeight()/10 + 3) - (tilePixelSize.GetHeight()/10 + 3)*zIndex, tilePixelSize.GetWidth() * 2, tilePixelSize.GetHeight() * 2, 10);
dc.DrawRoundedRectangle(position.x + (tilePixelSize.GetWidth() / 10 + 3) -
(tilePixelSize.GetWidth() / 10 + 3) * zIndex,
position.y + (tilePixelSize.GetHeight() / 10 + 3) -
(tilePixelSize.GetHeight() / 10 + 3) * zIndex,
tilePixelSize.GetWidth() * 2,
tilePixelSize.GetHeight() * 2, 10);
dc.SetBrush(front);
dc.DrawRoundedRectangle(position.x - (tilePixelSize.GetWidth()/10 + 3)*zIndex, position.y - (tilePixelSize.GetHeight()/10 + 3)*zIndex, tilePixelSize.GetWidth() * 2, tilePixelSize.GetHeight() * 2, 10);
dc.DrawRoundedRectangle(
position.x - (tilePixelSize.GetWidth() / 10 + 3) * zIndex,
position.y - (tilePixelSize.GetHeight() / 10 + 3) * zIndex,
tilePixelSize.GetWidth() * 2, tilePixelSize.GetHeight() * 2, 10);
dc.SetBrush(_bgColor);
if (tileImages[index].IsOk()) {
wxPoint pos;
pos.x = position.x + 10 - (tilePixelSize.GetWidth() / 10 + 3) * zIndex;
pos.y = position.y + 10 - (tilePixelSize.GetHeight() / 10 + 3) * zIndex;
if (tileImages[index].GetWidth() != tilePixelSize.x * 2)
dc.DrawBitmap(tileImages[index].Scale(tilePixelSize.x * 2 - 20, tilePixelSize.y * 2 - 20), {position.x + 10 - (tilePixelSize.GetWidth()/10 + 3)*zIndex, position.y + 10 - (tilePixelSize.GetHeight()/10 + 3)*zIndex});
dc.DrawBitmap(tileImages[index].Scale(tilePixelSize.x * 2 - 20,
tilePixelSize.y * 2 - 20),
pos);
else
dc.DrawBitmap(tileImages[index], {position.x + 10 - (tilePixelSize.GetWidth()/10 + 3)*zIndex, position.y + 10 - (tilePixelSize.GetHeight()/10 + 3)*zIndex});
dc.DrawBitmap(tileImages[index], pos);
}
}
void Drawer::resizeBg(const wxSize& resolution) {
if (this->resolution != resolution) {
this->resolution = resolution;
composeBG();
}
}
/**
* Resizes tile and whole board bitmap size to the resolution, set in this
* instance
*/
bool Drawer::resizeBoard(const TLVec& layout, const Dimensions& gridSize) {
bool res = false;
const int gridPoint = mmin(resolution.x / (gridSize.x * TILE_WIDTH),
resolution.y / (gridSize.y * TILE_HEIGHT));
wxLogDebug(wxString::Format("Resize board: %i", gridPoint));
if (gridPoint >= MIN_GRID_POINT) {
if (gridPoint != prevGridPoint) {
tablePixelRect.SetSize({gridPoint * TILE_WIDTH * gridSize.x,
gridPoint * TILE_HEIGHT * gridSize.y});
tilePixelSize.Set(gridPoint * TILE_WIDTH, gridPoint * TILE_HEIGHT);
}
tablePixelRect.SetPosition(
{(resolution.x - tablePixelRect.width) / 2,
(resolution.y - tablePixelRect.height) / 2});
if (gridPoint != prevGridPoint) {
composeBoard(layout, gridSize);
res = true;
}
prevGridPoint = gridPoint;
}
return res;
}
wxPoint Drawer::toGrid(const wxPoint& point) const {
wxPoint out(-1, -1);
if (point.x >= tablePixelRect.x &&
point.x <= tablePixelRect.x + tablePixelRect.width &&
point.y >= tablePixelRect.y &&
point.y <= tablePixelRect.y + tablePixelRect.height) {
out.x = (point.x - tablePixelRect.x) / tilePixelSize.x;
out.y = (point.y - tablePixelRect.y) / tilePixelSize.y;
}
return out;
}
wxPoint Drawer::fromGrid(int x, int y) const {
return {x * tilePixelSize.x, y * tilePixelSize.y};
}
wxPoint Drawer::fromGrid(const wxPoint& point) const {
return fromGrid(point.x, point.y);
}
wxSize Drawer::composeMinSize(const wxSize& gridSize) {
wxSize ms;
ms.SetWidth(MIN_GRID_POINT * TILE_WIDTH * gridSize.x);
ms.SetHeight(MIN_GRID_POINT * TILE_HEIGHT * gridSize.y);
wxLogDebug(wxString::Format("MinSize %i %i", ms.x, ms.y));
return ms;
}

View File

@ -10,39 +10,44 @@
#define TILE_IMAGES_N 42
#define MIN_GRID_POINT 3
class Drawer {
public:
Drawer();
void drawTable(wxDC& dc);
void composeBG();
void composeBoard(const TLVec& layout, const Dimensions& gridSize);
void resizeBg(const wxSize& tableSize);
bool resizeBoard(const TLVec& layout, const Dimensions& gridSize);
wxPoint toGrid(const wxPoint& point) const;
wxPoint fromGrid(int x, int y) const;
wxPoint fromGrid(const wxPoint& point) const;
wxSize composeMinSize(const wxSize& gridSize);
wxSize tableSize;
wxSize tilePixelSize; // кратно 600x800
wxSize tilePixelSize; // кратно 3x4, по умолчанию 600x800
wxSize resolution;
Dimensions gridSize;
wxRect tablePixelRect;
void setBG(const wxSize& tableSize);
void initScreen(const TLVec& layout);
wxPoint toGrid(const wxPoint& point);
wxPoint fromGrid(int x, int y);
wxPoint fromGrid(const wxPoint& point);
ThreePoint marked;
private:
void drawScreen(wxDC& dc);
void drawTile(wxDC& dc, int8_t index, const wxPoint& position, uint8_t zIndex);
void drawTile(wxDC& dc, int8_t index, const wxPoint& position,
uint8_t zIndex) const;
wxImage tileImages[TILE_IMAGES_N];
wxBitmap bgBitmap;
wxBitmap screenBitmap;
wxBitmap boardBitmap;
bool isBgReady = false;
bool isScreenReady = false;
int prevGridPoint;
};
#endif

View File

@ -4,65 +4,96 @@
#include "utils.h"
GamePanel::GamePanel(wxFrame* parent) : wxPanel(parent), controller(drawer) {
// clang-format off
wxBEGIN_EVENT_TABLE(GamePanel, wxPanel)
EVT_PAINT(GamePanel::OnPaint)
EVT_SIZE(GamePanel::OnResize)
EVT_TIMER(TIMER_ID, GamePanel::OnTimer)
EVT_LEFT_DOWN(GamePanel::OnClick)
wxEND_EVENT_TABLE();
// clang-format on
GamePanel::GamePanel(wxFrame* parent)
: wxPanel(parent), controller(drawer),
sb(((wxFrame*)this->GetParent())->GetStatusBar()), timer(this, TIMER_ID) {
SetBackgroundStyle(wxBG_STYLE_PAINT);
Bind(wxEVT_PAINT, &GamePanel::OnPaint, this);
Bind(wxEVT_SIZE, [this](wxSizeEvent& evt) -> void {
this->controller.resize(evt.GetSize());
});
timer = new wxTimer(this, 1);
Bind(wxEVT_TIMER, &GamePanel::OnTimer, this, timer->GetId());
Bind(wxEVT_LEFT_DOWN, &GamePanel::OnClick, this);
}
void GamePanel::Start(const wxString& path, bool solveable) {
void GamePanel::Start(const wxString& path, bool solveable,
std::function<void(const wxSize& size)> setMinSize) {
wxLogDebug(_("Started game"));
controller.stopwatch = 0;
controller.loadLayout(path);
controller.fill(solveable);
timer->Start(1000, wxTIMER_CONTINUOUS);
setMinSize(drawer.composeMinSize(controller.gridSize));
timer.Start(1000, wxTIMER_CONTINUOUS);
if (sb == nullptr)
sb = ((wxFrame*)this->GetParent())->GetStatusBar();
sb->SetStatusText(LTimeToStr(controller.stopwatch), 0);
sb->SetStatusText(PRemaining(controller.remaining), 1);
drawer.initScreen(controller.getTable());
bool redrawn =
drawer.resizeBoard(controller.getTable(), controller.gridSize);
if (!redrawn)
drawer.composeBoard(controller.getTable(), controller.gridSize);
Refresh();
}
void GamePanel::undo() {
controller.undo();
drawer.composeBoard(controller.getTable(), controller.gridSize);
Refresh();
}
void GamePanel::reshuffle(bool solveable) {
controller.free_table();
controller.fill(solveable);
drawer.composeBoard(controller.getTable(), controller.gridSize);
Refresh();
}
void GamePanel::OnPaint(wxPaintEvent& _) {
wxAutoBufferedPaintDC dc(this);
wxLogDebug(_("OnPaint"));
drawer.drawTable(dc);
}
void GamePanel::OnResize(wxSizeEvent& _) {
const wxSize& resolution = GetClientSize();
wxLogDebug(wxString::Format("OnResize %i %i", resolution.x, resolution.y));
if (isPositive(resolution)) {
drawer.resizeBg(resolution);
if (controller.gameStarted())
drawer.resizeBoard(controller.getTable(), controller.gridSize);
}
Refresh();
}
void GamePanel::OnTimer(wxTimerEvent& _) {
controller.stopwatch += 1;
sb->SetStatusText(LTimeToStr(controller.stopwatch), 0);
}
void GamePanel::OnClick(wxMouseEvent& _) {
if (controller.gameStarted()) {
controller.handleClick(ScreenToClient(wxGetMousePosition()));
sb->SetStatusText(PRemaining(controller.remaining), 1);
Refresh();
}
void GamePanel::undo() {
controller.undo();
drawer.initScreen(controller.getTable());
Refresh();
}
void GamePanel::reshuffle(bool solveable) {
controller.free_table();
controller.fill(solveable);
drawer.initScreen(controller.getTable());
drawer.composeBoard(controller.getTable(), controller.gridSize);
Refresh();
}
}

View File

@ -5,14 +5,15 @@
#include <wx/stopwatch.h>
#include "Drawer.h"
#include "Controller.h"
#include "Drawer.h"
class GamePanel : public wxPanel {
public:
GamePanel(wxFrame* parent);
void Start(const wxString& path, bool solveable);
void Start(const wxString& path, bool solveable,
std::function<void(const wxSize& size)> setMinSize);
void undo();
void reshuffle(bool solveable);
@ -22,11 +23,16 @@ private:
Controller controller;
void OnPaint(wxPaintEvent& _);
void OnResize(wxSizeEvent& _);
void OnTimer(wxTimerEvent& _);
void OnClick(wxMouseEvent& _);
wxDECLARE_EVENT_TABLE();
wxStatusBar* sb = nullptr;
wxTimer* timer = nullptr;
wxTimer timer;
};
#define TIMER_ID 1
#endif

View File

@ -1,42 +1,53 @@
#include "MainFrame.h"
#include "AboutDlg.h"
#include "HelpDlg.h"
#include "RulesDlg.h"
#include "AboutDlg.h"
#include "resources/icon.xpm"
MainFrame::MainFrame()
: wxFrame(nullptr, wxID_ANY, _("Маджонг (пасьянс)"), wxDefaultPosition, wxSize(800, 600)),
dataDirPath(wxStandardPaths::Get().GetUserDataDir())
{
: wxFrame(nullptr, wxID_ANY, _("Маджонг (пасьянс)"), wxDefaultPosition,
wxSize(800, 600)),
dataDirPath(wxStandardPaths::Get().GetUserDataDir()) {
SetIcon(logo_icon);
initMenu();
bindMenu();
Bind(wxEVT_SHOW, [this](wxShowEvent& _) -> void {
if (openLayout())
panel->Start(layoutPath, solveable,
[this](const wxSize& size) -> void {
this->SetMinClientSize(size);
});
});
CreateStatusBar(2);
panel = new GamePanel(this);
panel->SetFocus();
openLayout();
}
void MainFrame::initMenu() {
wxMenu *menuGame = new wxMenu;
wxMenu* menuGame = new wxMenu;
menuGame->Append(IDM_New_Game, _("Начать сначала"));
menuGame->Append(IDM_Open, _("Открыть карту"));
menuGame->AppendCheckItem(IDM_Solveable, _("Генерировать решаемую карту"));
menuGame->Enable(IDM_Solveable, false); // TODO: finish solveable table generation
menuGame->Enable(IDM_Solveable,
false); // TODO: finish solveable table generation
menuGame->AppendSeparator();
menuGame->Append(IDM_Undo, _("Отменить ход"));
menuGame->Append(IDM_Reshuffle, _("Перемешать поле"));
menuGame->AppendSeparator();
menuGame->Append(IDM_Exit, _("Выход"));
wxMenu *menuHelp = new wxMenu;
wxMenu* menuHelp = new wxMenu;
menuHelp->Append(IDM_Help, _("Инструкция"));
menuHelp->Append(IDM_Rules, _("Правила игры"));
menuHelp->Append(IDM_About, _("О программе"));
wxMenuBar *menuBar = new wxMenuBar;
wxMenuBar* menuBar = new wxMenuBar;
menuBar->Append(menuGame, _("Игра"));
menuBar->Append(menuHelp, _("Помощь"));
@ -44,55 +55,77 @@ void MainFrame::initMenu() {
}
void MainFrame::bindMenu() {
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
Close();
}, IDM_Exit);
Bind(
wxEVT_MENU, [this](wxCommandEvent& _) -> void { Close(); }, IDM_Exit);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
openLayout();
}, IDM_Open);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void {
if (openLayout())
panel->Start(layoutPath, solveable,
[this](const wxSize& size) -> void {
this->SetMinClientSize(size);
});
},
IDM_Open);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
(new HelpDlg(this, -1))->Show();
}, IDM_Help);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void { (new HelpDlg(this, -1))->Show(); },
IDM_Help);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
(new AboutDlg(this, -1))->Show();
}, IDM_About);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void { (new AboutDlg(this, -1))->Show(); },
IDM_About);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
(new RulesDlg(this, -1))->Show();
}, IDM_Rules);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void { (new RulesDlg(this, -1))->Show(); },
IDM_Rules);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
if (layoutPath.IsEmpty())
openLayout();
else
panel->Start(layoutPath, solveable);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void {
if (!layoutPath.IsEmpty() || openLayout()) {
panel->Start(layoutPath, solveable,
[this](const wxSize& size) -> void {
this->SetMinClientSize(size);
});
}
},
IDM_New_Game);
Refresh();
}, IDM_New_Game);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& evt) -> void { solveable = evt.IsChecked(); },
IDM_Solveable);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
solveable = _.IsChecked();
}, IDM_Solveable);
Bind(
wxEVT_MENU, [this](wxCommandEvent& _) -> void { panel->undo(); },
IDM_Undo);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
panel->undo();
}, IDM_Undo);
Bind(wxEVT_MENU, [this](wxCommandEvent& _) -> void {
panel->reshuffle(solveable);
}, IDM_Reshuffle);
Bind(
wxEVT_MENU,
[this](wxCommandEvent& _) -> void { panel->reshuffle(solveable); },
IDM_Reshuffle);
}
void MainFrame::openLayout() {
wxFileDialog openFileDlg(this, "Открыть карту", dataDirPath + wxFileName::GetPathSeparator() + _("layouts"), "Turtle.smlf", "Файлы Mahjong карт (*.smlf)|*.smlf", wxFD_OPEN | wxFD_FILE_MUST_EXIST);
/**
* Shows a file opening dialog asking for .smlf file if succed, sets its path to
* layoutPath
* @return true if user have chosen a file, false if cancelled
*/
bool MainFrame::openLayout() {
wxFileDialog openFileDlg(
this, _("Открыть карту"),
dataDirPath + wxFileName::GetPathSeparator() + _("layouts"),
_("Turtle.smlf"), _("Файлы Mahjong карт (*.smlf)|*.smlf"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (openFileDlg.ShowModal() == wxID_CANCEL)
return;
return false;
layoutPath = openFileDlg.GetPath();
panel->Start(layoutPath, solveable);
return true;
}

View File

@ -18,14 +18,14 @@ private:
void initMenu();
void bindMenu();
void openLayout();
GamePanel *panel;
bool openLayout();
const wxString dataDirPath;
wxString layoutPath;
bool solveable = false;
bool solveable = false; // determites wether to generate solveable or completely random map
};
enum

View File

@ -12,7 +12,7 @@ $(BDIR)/%.o: %.cpp
all: $(BDIR) $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(BDIR)/$(PROGRAM) $(OBJECTS) `wx-config --libs`
$(CXX) -o $(BDIR)/$(PROGRAM) $(OBJECTS) `wx-config --libs` -ggdb3
$(BDIR):
mkdir $@

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# wxMahjong
<p align="center">
<img src="./resources/icon.svg" alt="wxMahjong logo" width="150px">
</p>
Mahjong (solitare) game, written with C++ and [wxWidgets](https://www.wxwidgets.org)

61
resources/icon.svg Normal file
View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40"
height="50"
viewBox="0 0 10.583333 13.229167"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="icon.png"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:document-units="px"
showgrid="false"
inkscape:lockguides="false"
units="px"
width="512px"
inkscape:zoom="17.597674"
inkscape:cx="20.087883"
inkscape:cy="19.292323"
inkscape:window-width="2556"
inkscape:window-height="1408"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2791"
transform="translate(-22.755614,-10.782509)">
<path
id="rect848"
style="fill:#c8c8c8;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 25.930622,12.766884 a 1.3229166,1.3229166 0 0 0 -0.188102,0.01344 1.3229166,1.3229166 0 0 0 -0.184485,0.04031 1.3229166,1.3229166 0 0 0 -0.176734,0.06563 1.3229166,1.3229166 0 0 0 -0.165881,0.09043 1.3229166,1.3229166 0 0 0 -0.150895,0.113171 1.3229166,1.3229166 0 0 0 -0.133842,0.133842 1.3229166,1.3229166 0 0 0 -0.113171,0.150895 1.3229166,1.3229166 0 0 0 -0.09043,0.165881 1.3229166,1.3229166 0 0 0 -0.06563,0.176734 1.3229166,1.3229166 0 0 0 -0.04031,0.184485 1.3229166,1.3229166 0 0 0 -0.01344,0.188102 v 7.9375 a 1.3229166,1.3229166 0 0 0 0.04496,0.342615 1.3229166,1.3229166 0 0 0 0.132292,0.318843 1.3229166,1.3229166 0 0 0 0.210323,0.273885 1.3229166,1.3229166 0 0 0 0.273885,0.210323 1.3229166,1.3229166 0 0 0 0.318844,0.132292 1.3229166,1.3229166 0 0 0 0.342614,0.04496 h 5.291667 a 1.3229166,1.3229166 0 0 0 0.121956,-0.0057 1.3229166,1.3229166 0 0 0 0.120923,-0.01705 1.3229166,1.3229166 0 0 0 0.119373,-0.02791 1.3229166,1.3229166 0 0 0 0.115755,-0.03876 1.3229166,1.3229166 0 0 0 0.111621,-0.04909 1.3229166,1.3229166 0 0 0 0.10697,-0.05943 1.3229166,1.3229166 0 0 0 0.100769,-0.06925 1.3229166,1.3229166 0 0 0 0.09405,-0.07803 1.3229166,1.3229166 0 0 0 0.0863,-0.0863 1.3229166,1.3229166 0 0 0 0.07803,-0.09405 1.3229166,1.3229166 0 0 0 0.06925,-0.100769 1.3229166,1.3229166 0 0 0 0.05943,-0.10697 1.3229166,1.3229166 0 0 0 0.04909,-0.111621 1.3229166,1.3229166 0 0 0 0.03876,-0.115755 1.3229166,1.3229166 0 0 0 0.0279,-0.119373 1.3229166,1.3229166 0 0 0 0.01705,-0.120923 1.3229166,1.3229166 0 0 0 0.0057,-0.121956 v -7.937481 a 1.3229166,1.3229166 0 0 0 -0.0057,-0.121956 1.3229166,1.3229166 0 0 0 -0.01705,-0.120923 1.3229166,1.3229166 0 0 0 -0.0279,-0.119373 1.3229166,1.3229166 0 0 0 -0.03876,-0.115755 1.3229166,1.3229166 0 0 0 -0.04909,-0.111621 1.3229166,1.3229166 0 0 0 -0.05943,-0.10697 1.3229166,1.3229166 0 0 0 -0.06925,-0.100769 1.3229166,1.3229166 0 0 0 -0.07803,-0.09405 1.3229166,1.3229166 0 0 0 -0.0863,-0.0863 1.3229166,1.3229166 0 0 0 -0.09405,-0.07803 1.3229166,1.3229166 0 0 0 -0.100769,-0.06925 1.3229166,1.3229166 0 0 0 -0.10697,-0.05943 1.3229166,1.3229166 0 0 0 -0.111621,-0.04909 1.3229166,1.3229166 0 0 0 -0.115756,-0.03876 1.3229166,1.3229166 0 0 0 -0.119372,-0.02791 1.3229166,1.3229166 0 0 0 -0.120923,-0.01705 1.3229166,1.3229166 0 0 0 -0.121957,-0.0057 z" />
<path
id="rect848-9"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 24.872268,11.443966 a 1.3229166,1.3229166 0 0 0 -0.188102,0.01344 1.3229166,1.3229166 0 0 0 -0.184485,0.04031 1.3229166,1.3229166 0 0 0 -0.176734,0.06563 1.3229166,1.3229166 0 0 0 -0.165881,0.09043 1.3229166,1.3229166 0 0 0 -0.150895,0.113172 1.3229166,1.3229166 0 0 0 -0.133842,0.133842 1.3229166,1.3229166 0 0 0 -0.113172,0.150895 1.3229166,1.3229166 0 0 0 -0.09043,0.165881 1.3229166,1.3229166 0 0 0 -0.06563,0.176734 1.3229166,1.3229166 0 0 0 -0.04031,0.184485 1.3229166,1.3229166 0 0 0 -0.01344,0.188102 v 7.937498 a 1.3229166,1.3229166 0 0 0 0.04496,0.342615 1.3229166,1.3229166 0 0 0 0.132292,0.318844 1.3229166,1.3229166 0 0 0 0.210323,0.273885 1.3229166,1.3229166 0 0 0 0.273885,0.210323 1.3229166,1.3229166 0 0 0 0.318844,0.132292 1.3229166,1.3229166 0 0 0 0.342615,0.04496 h 5.291668 a 1.3229166,1.3229166 0 0 0 0.121956,-0.0057 1.3229166,1.3229166 0 0 0 0.120923,-0.01705 1.3229166,1.3229166 0 0 0 0.119373,-0.02791 1.3229166,1.3229166 0 0 0 0.115755,-0.03876 1.3229166,1.3229166 0 0 0 0.111621,-0.04909 1.3229166,1.3229166 0 0 0 0.10697,-0.05943 1.3229166,1.3229166 0 0 0 0.100769,-0.06925 1.3229166,1.3229166 0 0 0 0.09405,-0.07803 1.3229166,1.3229166 0 0 0 0.0863,-0.0863 1.3229166,1.3229166 0 0 0 0.07803,-0.09405 1.3229166,1.3229166 0 0 0 0.06925,-0.10077 1.3229166,1.3229166 0 0 0 0.05943,-0.10697 1.3229166,1.3229166 0 0 0 0.04909,-0.111621 1.3229166,1.3229166 0 0 0 0.03876,-0.115755 1.3229166,1.3229166 0 0 0 0.02791,-0.119372 1.3229166,1.3229166 0 0 0 0.01705,-0.120923 1.3229166,1.3229166 0 0 0 0.0057,-0.121959 V 12.76689 a 1.3229166,1.3229166 0 0 0 -0.0057,-0.121957 1.3229166,1.3229166 0 0 0 -0.01705,-0.120923 1.3229166,1.3229166 0 0 0 -0.02791,-0.119372 1.3229166,1.3229166 0 0 0 -0.03876,-0.115755 1.3229166,1.3229166 0 0 0 -0.04909,-0.111622 1.3229166,1.3229166 0 0 0 -0.05943,-0.10697 1.3229166,1.3229166 0 0 0 -0.06925,-0.100769 1.3229166,1.3229166 0 0 0 -0.07803,-0.09405 1.3229166,1.3229166 0 0 0 -0.0863,-0.0863 1.3229166,1.3229166 0 0 0 -0.09405,-0.07803 1.3229166,1.3229166 0 0 0 -0.100769,-0.06925 1.3229166,1.3229166 0 0 0 -0.10697,-0.05943 1.3229166,1.3229166 0 0 0 -0.111621,-0.04909 1.3229166,1.3229166 0 0 0 -0.115755,-0.03876 1.3229166,1.3229166 0 0 0 -0.119373,-0.0279 1.3229166,1.3229166 0 0 0 -0.120923,-0.01705 1.3229166,1.3229166 0 0 0 -0.121956,-0.0057 z" />
<path
style="fill:#b83b3b;stroke-width:0.0100348"
d="m 27.277561,20.684566 c -0.05675,-0.05675 -0.135428,-0.264743 -0.174709,-0.461853 -0.05103,-0.256085 -0.05335,-0.349483 -0.02766,-1.118877 0.01324,-0.396981 0.02662,-1.96335 0.01731,-2.025243 l -0.0072,-0.04839 -0.127223,0.0062 c -0.381781,0.0187 -0.532588,0.02696 -0.76527,0.04193 -0.141201,0.0091 -0.268467,0.01357 -0.282814,0.01 -0.03611,-0.0091 -0.04089,-0.03385 -0.02144,-0.1113 0.01563,-0.06225 0.01563,-0.07385 -5.9e-5,-0.176056 -0.07331,-0.477465 -0.240133,-0.820141 -0.559738,-1.149731 -0.0583,-0.06012 -0.10585,-0.119002 -0.117487,-0.145504 -0.04239,-0.09649 -0.05541,-0.343351 -0.02197,-0.416979 0.03717,-0.08185 0.0996,-0.09728 0.153612,-0.03795 0.112828,0.123934 0.16226,0.155999 0.277536,0.180034 0.13361,0.02786 0.157623,0.02435 0.573195,-0.08391 0.212486,-0.05535 0.494714,-0.128517 0.627172,-0.162573 0.13246,-0.03406 0.243812,-0.06377 0.247451,-0.06601 0.0036,-0.0022 0.0048,-0.244322 0.0026,-0.537952 -0.0045,-0.599499 -0.0028,-0.585089 -0.07891,-0.688421 -0.04506,-0.06122 -0.121513,-0.119635 -0.169279,-0.129358 -0.06563,-0.01336 -0.107274,-0.09468 -0.107274,-0.209516 0,-0.121151 0.09488,-0.228291 0.381321,-0.430561 0.06898,-0.04872 0.143962,-0.103675 0.166606,-0.122121 0.02265,-0.01845 0.04653,-0.03354 0.05308,-0.03354 0.08139,0 0.579615,0.422537 0.754526,0.639889 0.0735,0.09134 0.08594,0.132001 0.06516,0.213105 -0.03255,0.127027 -0.144077,0.312589 -0.247895,0.412427 -0.100982,0.09711 -0.143052,0.203194 -0.188602,0.475611 -0.03042,0.181892 -0.03638,0.255885 -0.02062,0.255885 0.02121,0 0.763343,-0.190743 1.332894,-0.342579 0.0687,-0.01832 0.123985,-0.02785 0.139287,-0.024 0.0529,0.01328 0.366486,0.343209 0.618226,0.650453 0.126174,0.153985 0.127442,0.178095 0.01048,0.197979 -0.0857,0.01458 -0.167424,0.03949 -0.191883,0.05852 -0.02682,0.02085 -0.470207,0.899772 -0.55278,1.095762 -0.107676,0.255555 -0.163006,0.456198 -0.14795,0.536458 0.0088,0.04667 -0.01583,0.102523 -0.05099,0.115894 -0.01913,0.0072 -0.06751,0.0072 -0.158534,-9.8e-5 -0.213135,-0.01719 -0.585019,-0.03052 -0.85189,-0.03055 l -0.249255,-1.8e-5 0.007,1.156506 c 0.01138,1.875982 0.01138,1.877828 -0.0081,1.964307 -0.01101,0.04853 -0.04877,0.14118 -0.106458,0.260902 -0.04919,0.10211 -0.09733,0.207307 -0.107003,0.233783 -0.01507,0.0413 -0.03783,0.06726 -0.05898,0.06726 -0.0031,0 -0.0146,-0.0089 -0.02549,-0.01981 z m -0.437679,-4.076157 0.249959,-0.01216 -0.0066,-0.391021 c -0.0036,-0.215062 -0.0066,-0.482853 -0.0066,-0.595091 0,-0.154394 -0.003,-0.204068 -0.0123,-0.204068 -0.02871,0 -0.988197,0.25406 -1.00874,0.267102 -0.0343,0.02177 -0.02755,0.05263 0.02818,0.129085 0.109552,0.150264 0.194615,0.329217 0.274368,0.577182 0.06672,0.207433 0.07543,0.229025 0.09442,0.234032 0.03227,0.0086 0.138408,0.0071 0.387343,-0.0051 z m 1.509899,-0.05136 c 0.02832,-0.02321 0.111585,-0.215697 0.252645,-0.584055 0.121604,-0.317531 0.186882,-0.476741 0.303286,-0.73963 0.02527,-0.05705 0.01604,-0.08752 -0.03496,-0.115351 -0.02848,-0.01555 -0.05804,-0.01797 -0.213674,-0.01748 -0.12027,3.85e-4 -0.219187,0.0065 -0.296026,0.01838 -0.144279,0.02228 -0.491766,0.08966 -0.634699,0.123066 l -0.107869,0.02522 v 0.03346 c 0,0.01841 -0.0046,0.134304 -0.01023,0.257556 -0.01074,0.236329 -0.02946,1.003264 -0.02463,1.011821 0.0015,0.0027 0.171259,0.0036 0.377124,0.0021 0.272975,-0.0022 0.378286,-0.0062 0.389029,-0.01506 z"
id="path2196" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

279
resources/icon.xpm Normal file
View File

@ -0,0 +1,279 @@
/* XPM */
static char *logo_icon[] = {
/* columns rows colors chars-per-pixel */
"125 156 117 2 ",
" c None",
". c #000000",
"X c #0B0B0B",
"o c #131313",
"O c #1B1B1B",
"+ c #202020",
"@ c #282828",
"# c #333333",
"$ c #3F3F3F",
"% c #434343",
"& c #4C4C4C",
"* c #525252",
"= c #5D5D5D",
"- c #646464",
"; c #6B6B6B",
": c #747474",
"> c #7D7D7D",
", c #B83B3B",
"< c #BB4343",
"1 c #BE4B4B",
"2 c #C15454",
"3 c #C45C5C",
"4 c #C66262",
"5 c #C86666",
"6 c #CA6D6D",
"7 c #CD7474",
"8 c #CF7979",
"9 c #D07D7D",
"0 c #848484",
"q c #8B8B8B",
"w c #939393",
"e c #9D9D9D",
"r c #A3A3A3",
"t c #ADADAD",
"y c #B3B3B3",
"u c #BBBBBB",
"i c #D28383",
"p c #D58A8A",
"a c #D79191",
"s c #D99595",
"d c #DC9C9C",
"f c #DEA3A3",
"g c #E1ABAB",
"h c #E3B3B3",
"j c #E6BBBB",
"k c #E8BFBF",
"l c #C4C4C4",
"z c #C8C8C8",
"x c #D5D5D5",
"c c #DFDFDF",
"v c #E8C1C1",
"b c #EAC5C5",
"n c #EBC7C7",
"m c #ECC9C9",
"M c #ECCACA",
"N c #ECCBCB",
"B c #EDCECE",
"V c #EDCFCF",
"C c #EECFCF",
"Z c #EED0D0",
"A c #EED1D1",
"S c #EFD3D3",
"D c #F0D5D5",
"F c #F1D7D7",
"G c #F1D8D8",
"H c #F1D9D9",
"J c #F2DADA",
"K c #F2DCDC",
"L c #F3DDDD",
"P c #F3DEDE",
"I c #F3DFDF",
"U c #F4DFDF",
"Y c #E4E4E4",
"T c #E7E7E7",
"R c #E5E5E5",
"E c gray91",
"W c gray92",
"Q c #ECECEC",
"! c gray93",
"~ c #F4E0E0",
"^ c #F4E1E1",
"/ c #F4E2E2",
"( c #F5E3E3",
") c #F6E5E5",
"_ c #F6E6E6",
"` c #F6E7E7",
"' c #F7E9E9",
"] c #F7EAEA",
"[ c #F8EBEB",
"{ c #F8ECEC",
"} c #F8EDED",
"| c #F9EDED",
" . c #F9EEEE",
".. c #F9EFEF",
"X. c gray94",
"o. c #F6F6F6",
"O. c #F1F1F1",
"+. c #F9F0F0",
"@. c #FAF0F0",
"#. c #FAF1F1",
"$. c #FAF2F2",
"%. c #FBF3F3",
"&. c #FBF4F4",
"*. c #FBF5F5",
"=. c #FCF6F6",
"-. c #FCF7F7",
";. c #F9F9F9",
":. c #FCF8F8",
">. c #FDF9F9",
",. c #FDFAFA",
"<. c #FDFDFD",
"1. c #FEFCFC",
"2. c #FEFDFD",
"3. c #FEFEFE",
"4. c #FFFEFE",
"5. c white",
"6. c #FFFFFF",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
" . . . X o @ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @ X . . . . ",
" . . @ 0 l o.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.Y t = X . . ",
" . . $ l 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.! q o . . ",
" . o t 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.W * . . ",
" . @ c 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.w . . ",
" . # ! 5.5.5.5.5.5.5.5.5.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5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.d , , , , , , , , , , , , g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ % z z z z z z ; . . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , , , , , , , , , g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z & . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.D , , , , , , , , , , , , , , , h 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z u O . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , , , , , , , , , , < ^ 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z q . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.g < , , , , , , , , , , , , , , p 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ % z z z z z z z z z @ . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$.6 , , , , , , , , , , , , , d 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z : . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.>.3 , , , , , , , , , , , , U 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z u X . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.j , , , , , , , , , , , 9 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z @ . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.K , , , , , , , , , , < ( 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z * . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.^ , , , , , , , , , , j 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z ; . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.( , , , , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z : . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.[ , , , , , , , , 7 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5..., , , , , , , , Z 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.&., , , , , , , 1 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-., , , , , , , 8 5.5.5.5.5.5.5.5.5.5.5.5.5.5.>.J N 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.>., , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.Z f 6 < , , i 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-., , , , , , , b 5.5.5.5.5.5.5.K h 8 < , , , , , , , 8 >.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-., , , , , , , K 5.5.5.K g 8 1 , , , , , , , , , , , , p 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , , Z h 8 1 , , , , , , , , , , , , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.%., , , , , , , , , , , , , , , , , , , , , , , , , , , , , h 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.U , , , , , , , , , , , , , , , , , , , , , , , , , , , , , < m 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.>.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$.v p 3 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , < J 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.' < 8 -.5.5.5.5.5.5.5.5.5.5.>.b a 4 , , , , , , , , , , , , , , , , , , , , , , , 1 < < , , , , , , , , , , 1 { 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.h , , 6 $.5.5.5.5.5.&.m d 6 , , , , , , , , , , , , , , , , , , , , 2 9 f m ( $.5.5.5.5.f , , , , , , , , , , 7 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.f , , , < i g h p 4 , , , , , , , , , , , , , , , , , , , 1 i g Z &.5.5.5.5.5.5.5.5.5.5.g , , , , , , , , < 7 g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.g , , , , , , , , , , , , , , , , , , , , , , , , , , , , g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.6 , , , , , , , 9 -.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.b , , , , , , , , , , , , , , , , , , , , 2 9 , , , , , , h 5.5.5.5.5.5.5.5.5.5.5.5.5.J , , , , , , , < ' 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$.< , , , , , , , , , , , , , , , < 8 g K 5.5., , , , , , j 5.5.5.5.5.5.5.5.5.5.5.5.5.p , , , , , , , s 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.j , , , , , , , , , , , < 6 f D 5.5.5.5.5.5.< , , , , , v 5.5.5.5.5.5.5.5.5.5.5.5.&.< , , , , , , < $.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.s , , , , , , , < s m :.5.5.5.5.5.5.5.5.5.< , , , , , b 5.5.5.5.5.5.5.5.5.5.5.5.g , , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.8 , , , , , , 2 >.5.5.5.5.5.5.5.5.5.5.5.< , , , , , m 5.5.5.5.5.5.5.5.5.5.5.5.3 , , , , , , 1 -.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.3 , , , , , , d 5.5.5.5.5.5.5.5.5.5.5.< , , , , , Z 5.5.5.5.5.5.5.5.5.5.5.V , , , , , , , g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.[ 1 , , , , , , J 5.5.5.5.5.5.5.5.5.5.1 , , , , , D 5.5.5.5.5.5.5.5.5.5.5.9 , , , , , , 1 -.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.h , , , , , , 7 5.5.5.5.5.5.5.5.5.5.1 , , , , , J 5.5.5.5.5.5.5.5.5.5...< , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5 , , , , , , K 5.5.5.5.5.5.5.5.5.1 , , , , , ~ 5.5.5.5.5.5.5.5.5.5.f , , , , , , 1 &.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.V , , , , , , p 5.5.5.5.5.5.5.5.5.2 , , , , , ( 5.5.5.5.5.5.5.5.5.5.2 , , , , , , d 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O % z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.4 , , , , , < -.5.5.5.5.5.5.5.5.2 , , , , , ' 5.5.5.5.5.5.5.5.5.m , , , , , , < $.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ % z z z z z z z z z z : . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.h , , , , , , j 5.5.5.5.5.5.5.5.2 , , , , , [ 5.5.5.5.5.5.5.5.5.9 , , , , , , s 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z 0 . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , 7 5.5.5.5.5.5.5.5.3 , , , , , $.5.5.5.5.5.5.5.5.( < , , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.6 , , , , , , ..5.5.5.5.5.5.5.3 , , , , , -.5.5.5.5.5.5.5.5.i , , , , , , 7 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.s , , , , , , s D J V m v j g 1 , , , , , 6 6 6 6 7 6 6 4 3 , , , , , , , j 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.k , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , < -.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5..., , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 8 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.< , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , f 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.1 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , g 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.&., , , , , , , , < 1 2 4 6 7 < , , , , < p i p p p p 8 9 7 6 4 3 1 < 1 D 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.k k m V D ( $.>.5.5.5.5.5.5.5 , , , , < 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5 , , , , < 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5 , , , , < 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . r 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.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.< , , , , , $.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z 0 . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5., , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5., , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.>., , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.$., , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.' , , , , , , ..5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.O $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.' , , , , , , [ 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.( , , , , , , [ 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . r 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.( , , , , , , ' 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.+ $ z z z z z z z z z z > . ",
" . e 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5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5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.T + X t z z z z z z z z z z z z z > . ",
" . . 0 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.c @ X w z z z z z z z z z z z z z z > . ",
" . . = ! 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.u o X q z z z z z z z z z z z z z z z > . ",
" . . O t 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.T - . o e z z z z z z z z z z z z z z z z > . ",
" . . @ w T 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.l - X . * u z z z z z z z z z z z z z z z z z > . ",
" . . X @ = 0 w e e e w e e w e e w e e e w e e w e e e e w e w e e w e e e w e e w e e e w e e w e e e e w e w e e w e e e w e e w e e e w e q : & o . . % r z z z z z z z z z z z z z z z z z z z > . ",
" . . X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o % : u z z z z z z z z z z z z z z z z z z z z z : . ",
" . . z u t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t y z z z z z z z z z z z z z z z z z z z z z z z z z z - . ",
" . r z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z % . ",
" . > z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z o . ",
" . # z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z r . ",
" . X u z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z = . ",
" . = z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z u X . ",
" . X y z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z = . ",
" . $ z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z e X . ",
" . . ; z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z y O . ",
" . . > z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z u @ . ",
" . . ; z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z t @ . ",
" . . % u z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z 0 o . ",
" . . X - u z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z e # . . ",
" . . X % 0 t z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z r ; @ . . ",
" . . . . X O @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + o . . . . ",
" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
" ",
" ",
" ",
" ",
" ",
" "
};

View File

@ -1,7 +1,8 @@
#include "utils.h"
wxString LTimeToStr(int time) {
return wxString::Format(_("%d:%02d:%02d"), time / 3600, (time / 60) % 60, time % 60);
return wxString::Format(_("%d:%02d:%02d"), time / 3600, (time / 60) % 60,
time % 60);
}
int upDiv(int a, int b) {
@ -13,5 +14,9 @@ wxString itowxS(int a) {
}
wxString PRemaining(uint8_t remaining) {
return wxString::Format("%i%%", remaining*100 / 144);
return wxString::Format("%i%%", remaining * 100 / 144);
}
bool isPositive(const wxSize& size) {
return size.x > 0 && size.y > 0;
}

16
utils.h
View File

@ -19,15 +19,15 @@ using CardT = int16_t;
class Dimensions : public wxSize {
public:
Dimensions(int _z, int _x, int _y): wxSize(_x, _y), z(_z) {};
Dimensions(): wxSize(), z(0) {};
Dimensions(int _z, int _x, int _y) : wxSize(_x, _y), z(_z){};
Dimensions() : wxSize(), z(0){};
int z;
};
class ThreePoint {
public:
ThreePoint(int _z, int _x, int _y): x(_x), y(_y), z(_z) {};
ThreePoint(): x(0), y(0), z(0) {};
ThreePoint(int _z, int _x, int _y) : x(_x), y(_y), z(_z){};
ThreePoint() : x(0), y(0), z(0){};
int x;
int y;
int z;
@ -41,10 +41,8 @@ public:
using TLVec = vector<vector<vector<CardT>>>;
enum Values {
MATCHED = -3,
EMPTY,
FREE
};
enum Values { MATCHED = -3, EMPTY, FREE };
bool isPositive(const wxSize& size);
#endif