git repos / blockattack-game

blame: source/code/editor/EditorInterface.hpp

normal view · raw

89c4a3a6 sago007 2008-08-29 14:32 1
/*
c53e6443 sago007 2012-04-17 11:04 2
===========================================================================
c53e6443 sago007 2012-04-17 11:04 3
blockattack - Block Attack - Rise of the Blocks
c53e6443 sago007 2012-04-17 11:04 4
Copyright (C) 2005-2012 Poul Sander
89c4a3a6 sago007 2008-08-29 14:32 5
c53e6443 sago007 2012-04-17 11:04 6
This program is free software: you can redistribute it and/or modify
c53e6443 sago007 2012-04-17 11:04 7
it under the terms of the GNU General Public License as published by
c53e6443 sago007 2012-04-17 11:04 8
the Free Software Foundation, either version 2 of the License, or
c53e6443 sago007 2012-04-17 11:04 9
(at your option) any later version.
c53e6443 sago007 2012-04-17 11:04 10
c53e6443 sago007 2012-04-17 11:04 11
This program is distributed in the hope that it will be useful,
c53e6443 sago007 2012-04-17 11:04 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
c53e6443 sago007 2012-04-17 11:04 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c53e6443 sago007 2012-04-17 11:04 14
GNU General Public License for more details.
c53e6443 sago007 2012-04-17 11:04 15
c53e6443 sago007 2012-04-17 11:04 16
You should have received a copy of the GNU General Public License
c53e6443 sago007 2012-04-17 11:04 17
along with this program.  If not, see http://www.gnu.org/licenses/
c53e6443 sago007 2012-04-17 11:04 18
c53e6443 sago007 2012-04-17 11:04 19
Source information and contacts persons can be found at
c53e6443 sago007 2012-04-17 11:04 20
http://blockattack.sf.net
c53e6443 sago007 2012-04-17 11:04 21
===========================================================================
89c4a3a6 sago007 2008-08-29 14:32 22
*/
89c4a3a6 sago007 2008-08-29 14:32 23
89c4a3a6 sago007 2008-08-29 14:32 24
#include "BoardHolder.hpp"
89c4a3a6 sago007 2008-08-29 14:32 25
89c4a3a6 sago007 2008-08-29 14:32 26
#ifndef EDITORINTERFACEDEFINED
89c4a3a6 sago007 2008-08-29 14:32 27
#define EDITORINTERFACEDEFINED
89c4a3a6 sago007 2008-08-29 14:32 28
class EditorInterface
89c4a3a6 sago007 2008-08-29 14:32 29
{
c53e6443 sago007 2012-04-17 11:04 30
private:
c53e6443 sago007 2012-04-17 11:04 31
	int colorSelected; //The color the user have selected
c53e6443 sago007 2012-04-17 11:04 32
	int boardActive;   //Number of the active board, -1 if not active
c53e6443 sago007 2012-04-17 11:04 33
	TheBoard tb;       //The active board
c53e6443 sago007 2012-04-17 11:04 34
	BoardHolder bh;    //The Vector that holds the boards
c53e6443 sago007 2012-04-17 11:04 35
	bool saved;        //The current board is saved
c53e6443 sago007 2012-04-17 11:04 36
	bool fileSaved;    //The whole file is saved
c53e6443 sago007 2012-04-17 11:04 37
	string fileName;   //The filename that is open, "" if no filename is given
c53e6443 sago007 2012-04-17 11:04 38
c53e6443 sago007 2012-04-17 11:04 39
public:
c53e6443 sago007 2012-04-17 11:04 40
	EditorInterface();
c53e6443 sago007 2012-04-17 11:04 41
	void getModel(int);
c53e6443 sago007 2012-04-17 11:04 42
	bool exists();
c53e6443 sago007 2012-04-17 11:04 43
	void selectColor(int color);
c53e6443 sago007 2012-04-17 11:04 44
	int getSelectedColor();
c53e6443 sago007 2012-04-17 11:04 45
	void drawOnModel(int x, int y);
c53e6443 sago007 2012-04-17 11:04 46
	void moveLeft();
c53e6443 sago007 2012-04-17 11:04 47
	void moveRight();
c53e6443 sago007 2012-04-17 11:04 48
	void deleteBoard();
c53e6443 sago007 2012-04-17 11:04 49
	void moveBoardBack();
c53e6443 sago007 2012-04-17 11:04 50
	void moveBoardForward();
c53e6443 sago007 2012-04-17 11:04 51
	void saveBoard();
c53e6443 sago007 2012-04-17 11:04 52
	bool saveFile(string);
c53e6443 sago007 2012-04-17 11:04 53
	bool saveFile();
c53e6443 sago007 2012-04-17 11:04 54
	void openFile(string);
c53e6443 sago007 2012-04-17 11:04 55
	void newFile();
c53e6443 sago007 2012-04-17 11:04 56
	int getColor(int x, int y);
c53e6443 sago007 2012-04-17 11:04 57
	int getActiveBoardNr();
c53e6443 sago007 2012-04-17 11:04 58
	int getNumberOfMoves();
c53e6443 sago007 2012-04-17 11:04 59
	bool newBoard();
c53e6443 sago007 2012-04-17 11:04 60
	int getNumberOfBoards();
c53e6443 sago007 2012-04-17 11:04 61
	void setNumberOfMoves(int);
c53e6443 sago007 2012-04-17 11:04 62
	bool isSaved();
c53e6443 sago007 2012-04-17 11:04 63
	bool fileIsSaved();
89c4a3a6 sago007 2008-08-29 14:32 64
};
89c4a3a6 sago007 2008-08-29 14:32 65
#endif
1970-01-01 00:00 66