Compare commits
2 Commits
c17321fe52
...
ee2df44b63
Author | SHA1 | Date | |
---|---|---|---|
ee2df44b63 | |||
41fa4c3833 |
24
.github/workflows/linux-ci.yml
vendored
Normal file
24
.github/workflows/linux-ci.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install GCC11, pCap, wxWidgets
|
||||
run: sudo apt update && sudo apt install -y gcc-11 g++-11 libwxgtk3.0-gtk3-dev && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11
|
||||
- name: Display versions of tools and libraries
|
||||
continue-on-error: true
|
||||
run: uname -a; wx-config --list; wx-config --cxxflags; wx-config --libs; g++ --version | grep g++
|
||||
- name: make
|
||||
run: make
|
||||
- name: Check binary file
|
||||
run: ls -alh build/wxMahjong; file build/wxMahjong
|
@ -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))
|
||||
|
4
Drawer.h
4
Drawer.h
@ -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;
|
||||
|
5
Makefile
5
Makefile
@ -9,10 +9,13 @@ OBJECTS := $(addprefix $(BDIR)/,$(patsubst %.cpp,%.o,$(wildcard *.cpp)))
|
||||
$(BDIR)/%.o: %.cpp
|
||||
$(CXX) -c `wx-config --cxxflags` -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
all: $(BDIR) $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJECTS)
|
||||
$(CXX) -o $(BDIR)/$(PROGRAM) $(OBJECTS) `wx-config --libs`
|
||||
|
||||
$(BDIR):
|
||||
mkdir $@
|
||||
|
||||
clean:
|
||||
rm -f $(BDIR)/*.o $(PROGRAM)
|
||||
|
Loading…
x
Reference in New Issue
Block a user