1 /* BurrTools 2 * 3 * BurrTools is the legal property of its developers, whose 4 * names are listed in the COPYRIGHT file, which is included 5 * within the source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 */ 21 #ifndef __GRID_EDITOR_0_H__ 22 #define __GRID_EDITOR_0_H__ 23 24 #include "grideditor.h" 25 26 class puzzle_c; 27 28 /** 29 * implements grid editor functions to edit the cube grid 30 */ 31 class gridEditor_0_c : public gridEditor_c { 32 33 private: 34 35 // calculate the size of the grid cells and the 36 // top right corner position 37 void calcParameters(int *sx, int *sy, int *tx, int *ty); 38 39 bool calcGridPosition(int x, int y, int z, int *gx, int *gy); 40 41 void drawNormalTile(int x, int y, int z, int tx, int ty, int sx, int sy); 42 void drawVariableTile(int x, int y, int z, int tx, int ty, int sx, int sy); 43 void drawTileFrame(int x, int y, int z, int tx, int ty, int sx, int sy); 44 void drawTileColor(int x, int y, int z, int tx, int ty, int sx, int sy); 45 void drawTileCursor(int x, int y, int z, int tx, int ty, int sx, int sy); 46 47 public: 48 gridEditor_0_c(int x,int y,int w,int h,puzzle_c * p)49 gridEditor_0_c(int x, int y, int w, int h, puzzle_c * p) : gridEditor_c(x, y, w, h, p) {} 50 }; 51 52 #endif 53