Fixed image loading

This commit is contained in:
Dmitriy Shishkov 2022-05-12 10:22:56 +03:00
parent 41fa4c3833
commit ee2df44b63
No known key found for this signature in database
GPG Key ID: 26720CB2A9608C97
2 changed files with 2 additions and 6 deletions

@ -2,10 +2,6 @@
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" };
/**
* TODO: fix not loading last two tiles icons
*/
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))

@ -18,7 +18,7 @@ public:
wxSize tableSize;
wxSize tilePixelSize; // 600x800
wxSize tilePixelSize; // кратно 600x800
wxSize resolution;
Dimensions gridSize;
wxRect tablePixelRect;
@ -36,7 +36,7 @@ private:
void drawScreen(wxDC& dc);
void drawTile(wxDC& dc, int8_t index, const wxPoint& position, uint8_t zIndex);
wxImage tileImages[40];
wxImage tileImages[TILE_IMAGES_N];
wxBitmap bgBitmap;
wxBitmap screenBitmap;