git repos / blockattack-game

blame: source/code/MenuSystem.cpp

normal view · raw

f3ef3495 sago007 2008-11-13 20:00 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
c53e6443 sago007 2012-04-17 11:04 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
===========================================================================
f3ef3495 sago007 2008-11-13 20:00 22
*/
f3ef3495 sago007 2008-11-13 20:00 23
b7590374 sago007 2011-05-19 16:15 24
#include <SDL/SDL_events.h>
b7590374 sago007 2011-05-19 16:15 25
f3ef3495 sago007 2008-11-13 20:00 26
#include "MenuSystem.h"
f3ef3495 sago007 2008-11-13 20:00 27
#include "common.h"
605138b3 sago007 2012-04-14 15:12 28
#include "CppSdlImageHolder.hpp"
7d604e02 sago007 2015-11-29 18:39 29
#include "global.hpp"
f3ef3495 sago007 2008-11-13 20:00 30
f3ef3495 sago007 2008-11-13 20:00 31
int mousex;
f3ef3495 sago007 2008-11-13 20:00 32
int mousey;
f3ef3495 sago007 2008-11-13 20:00 33
33f4e975 sago007 2015-11-14 21:49 34
using namespace std;
33f4e975 sago007 2015-11-14 21:49 35
f3ef3495 sago007 2008-11-13 20:00 36
/*Draws a image from on a given Surface. Takes source image, destination surface and coordinates*/
ecef5838 sago007 2015-11-24 20:01 37
inline void DrawIMG(SDL_Surface* img, SDL_Surface* target, int x, int y) {
c53e6443 sago007 2012-04-17 11:04 38
	SDL_Rect dest;
c53e6443 sago007 2012-04-17 11:04 39
	dest.x = x;
c53e6443 sago007 2012-04-17 11:04 40
	dest.y = y;
acd79baf sago007 2015-11-22 19:37 41
	SDL_BlitSurface(img, nullptr, target, &dest);
f3ef3495 sago007 2008-11-13 20:00 42
}
f3ef3495 sago007 2008-11-13 20:00 43
b283e0f7 sago007 2012-07-29 14:01 44
ButtonGfx standardButton;
f3ef3495 sago007 2008-11-13 20:00 45
ecef5838 sago007 2015-11-24 20:01 46
void ButtonGfx::setSurfaces(shared_ptr<CppSdl::CppSdlImageHolder> marked, shared_ptr<CppSdl::CppSdlImageHolder> unmarked) {
78ab168e sago007 2015-11-14 22:02 47
	this->marked = marked;
78ab168e sago007 2015-11-14 22:02 48
	this->unmarked = unmarked;
f3a1637d sago007 2015-11-14 21:32 49
	xsize=(marked)->GetWidth();
f3a1637d sago007 2015-11-14 21:32 50
	ysize=(marked)->GetHeight();
ecef5838 sago007 2015-11-24 20:01 51
	if (verboseLevel) {
56241205 sago007 2012-08-05 11:15 52
		cout << "Surfaces set, size: " <<xsize << " , " << ysize << endl;
acd79baf sago007 2015-11-22 19:37 53
	}
f3ef3495 sago007 2008-11-13 20:00 54
}
f3ef3495 sago007 2008-11-13 20:00 55
ecef5838 sago007 2015-11-24 20:01 56
Button::Button() {
b283e0f7 sago007 2012-07-29 14:01 57
	gfx = &standardButton;
c53e6443 sago007 2012-04-17 11:04 58
	label = "";
c53e6443 sago007 2012-04-17 11:04 59
	marked = false;
acd79baf sago007 2015-11-22 19:37 60
	action = nullptr;
67a32395 sago007 2012-04-19 18:40 61
	popOnRun = false;
f3ef3495 sago007 2008-11-13 20:00 62
}
f3ef3495 sago007 2008-11-13 20:00 63
ecef5838 sago007 2015-11-24 20:01 64
Button::~Button() {
f3ef3495 sago007 2008-11-13 20:00 65
}
f3ef3495 sago007 2008-11-13 20:00 66
ecef5838 sago007 2015-11-24 20:01 67
Button::Button(const Button& b) {
b283e0f7 sago007 2012-07-29 14:01 68
	gfx = b.gfx;
c53e6443 sago007 2012-04-17 11:04 69
	label = b.label;
c53e6443 sago007 2012-04-17 11:04 70
	marked = b.marked;
c53e6443 sago007 2012-04-17 11:04 71
	action = b.action;
67a32395 sago007 2012-04-19 18:40 72
	popOnRun = false;
f3ef3495 sago007 2008-11-13 20:00 73
}
f3ef3495 sago007 2008-11-13 20:00 74
ecef5838 sago007 2015-11-24 20:01 75
void Button::setLabel(const string& text) {
c53e6443 sago007 2012-04-17 11:04 76
	label = text;
f3ef3495 sago007 2008-11-13 20:00 77
}
f3ef3495 sago007 2008-11-13 20:00 78
ecef5838 sago007 2015-11-24 20:01 79
void Button::setAction(void (*action2run)(Button*)) {
c53e6443 sago007 2012-04-17 11:04 80
	action = action2run;
f3ef3495 sago007 2008-11-13 20:00 81
}
f3ef3495 sago007 2008-11-13 20:00 82
ecef5838 sago007 2015-11-24 20:01 83
bool Button::isClicked(int x,int y) {
6258a442 sago007 2015-11-14 22:11 84
	if ( x >= this->x && y >= this->y && x<= this->x+gfx->xsize && y <= this->y + gfx->ysize) {
c53e6443 sago007 2012-04-17 11:04 85
		return true;
6258a442 sago007 2015-11-14 22:11 86
	}
6258a442 sago007 2015-11-14 22:11 87
	return false;
f3ef3495 sago007 2008-11-13 20:00 88
}
f3ef3495 sago007 2008-11-13 20:00 89
ecef5838 sago007 2015-11-24 20:01 90
void Button::doAction() {
6258a442 sago007 2015-11-14 22:11 91
	if (action) {
c53e6443 sago007 2012-04-17 11:04 92
		action(this);
6258a442 sago007 2015-11-14 22:11 93
		return;
6258a442 sago007 2015-11-14 22:11 94
	}
6258a442 sago007 2015-11-14 22:11 95
	cerr << "Warning: button \"" << label << "\" has no action assigned!";
f3ef3495 sago007 2008-11-13 20:00 96
}
f3ef3495 sago007 2008-11-13 20:00 97
0c1de203 sago007 2015-12-05 22:15 98
void Button::drawToScreen() {
c53e6443 sago007 2012-04-17 11:04 99
#if DEBUG
c53e6443 sago007 2012-04-17 11:04 100
	//cout << "Painting button: " << label << " at: " << x << "," << y << endl;
c53e6443 sago007 2012-04-17 11:04 101
#endif
6258a442 sago007 2015-11-14 22:11 102
	if (marked) {
0c1de203 sago007 2015-12-05 22:15 103
		gfx->marked->PaintTo(screen, x, y);
6258a442 sago007 2015-11-14 22:11 104
	}
6258a442 sago007 2015-11-14 22:11 105
	else {
0c1de203 sago007 2015-12-05 22:15 106
		gfx->unmarked->PaintTo(screen,x,y);
6258a442 sago007 2015-11-14 22:11 107
	}
0c1de203 sago007 2015-12-05 22:15 108
	gfx->thefont.setDest(screen);
e55d039f sago007 2015-12-04 22:22 109
	gfx->thefont.drawCenter(x+gfx->xsize/2,y+gfx->ysize/2-gfx->thefont.getHeight("%s", label.c_str())/2, "%s", label.c_str());
f3ef3495 sago007 2008-11-13 20:00 110
}
f3ef3495 sago007 2008-11-13 20:00 111
ecef5838 sago007 2015-11-24 20:01 112
void Button::setPopOnRun(bool popOnRun) {
67a32395 sago007 2012-04-19 18:40 113
	this->popOnRun = popOnRun;
67a32395 sago007 2012-04-19 18:40 114
}
67a32395 sago007 2012-04-19 18:40 115
ecef5838 sago007 2015-11-24 20:01 116
bool Button::isPopOnRun() const {
67a32395 sago007 2012-04-19 18:40 117
	return popOnRun;
67a32395 sago007 2012-04-19 18:40 118
}
67a32395 sago007 2012-04-19 18:40 119
ecef5838 sago007 2015-11-24 20:01 120
void Button::setGfx(ButtonGfx* gfx) {
b283e0f7 sago007 2012-07-29 14:01 121
	this->gfx = gfx;
b283e0f7 sago007 2012-07-29 14:01 122
}
b283e0f7 sago007 2012-07-29 14:01 123
ecef5838 sago007 2015-11-24 20:01 124
int Button::getHeight() {
b283e0f7 sago007 2012-07-29 14:01 125
	return this->gfx->ysize;
b283e0f7 sago007 2012-07-29 14:01 126
}
b283e0f7 sago007 2012-07-29 14:01 127
ecef5838 sago007 2015-11-24 20:01 128
void Menu::drawSelf() {
c53e6443 sago007 2012-04-17 11:04 129
	DrawIMG(backgroundImage,screen,0,0);
c53e6443 sago007 2012-04-17 11:04 130
	vector<Button*>::iterator it;
6258a442 sago007 2015-11-14 22:11 131
	for (it = buttons.begin(); it < buttons.end(); it++) {
0c1de203 sago007 2015-12-05 22:15 132
		(*it)->drawToScreen();
6258a442 sago007 2015-11-14 22:11 133
	}
0c1de203 sago007 2015-12-05 22:15 134
	exit.drawToScreen();
e55d039f sago007 2015-12-04 22:22 135
	standardButton.thefont.draw(50, 50, "%s", title.c_str());
f3a1637d sago007 2015-11-14 21:32 136
	mouse->PaintTo(screen,mousex,mousey);
f3ef3495 sago007 2008-11-13 20:00 137
}
f3ef3495 sago007 2008-11-13 20:00 138
ecef5838 sago007 2015-11-24 20:01 139
void Menu::performClick(int x,int y) {
c53e6443 sago007 2012-04-17 11:04 140
	vector<Button*>::iterator it;
ecef5838 sago007 2015-11-24 20:01 141
	for (it = buttons.begin(); it < buttons.end(); it++) {
ecef5838 sago007 2015-11-24 20:01 142
		Button* b = (*it);
6258a442 sago007 2015-11-14 22:11 143
		if (b->isClicked(x,y)) {
c53e6443 sago007 2012-04-17 11:04 144
			b->doAction();
6258a442 sago007 2015-11-14 22:11 145
		}
6258a442 sago007 2015-11-14 22:11 146
		if (b->isPopOnRun()) {
67a32395 sago007 2012-04-19 18:40 147
			running = false;
6258a442 sago007 2015-11-14 22:11 148
		}
c53e6443 sago007 2012-04-17 11:04 149
	}
6258a442 sago007 2015-11-14 22:11 150
	if (exit.isClicked(x,y)) {
c53e6443 sago007 2012-04-17 11:04 151
		running = false;
6258a442 sago007 2015-11-14 22:11 152
	}
f3ef3495 sago007 2008-11-13 20:00 153
}
f3ef3495 sago007 2008-11-13 20:00 154
ecef5838 sago007 2015-11-24 20:01 155
void Menu::placeButtons() {
c53e6443 sago007 2012-04-17 11:04 156
	int nextY = 100;
c53e6443 sago007 2012-04-17 11:04 157
	const int X = 50;
c53e6443 sago007 2012-04-17 11:04 158
	vector<Button*>::iterator it;
ecef5838 sago007 2015-11-24 20:01 159
	for (it = buttons.begin(); it < buttons.end(); it++) {
c53e6443 sago007 2012-04-17 11:04 160
		(*it)->x = X;
c53e6443 sago007 2012-04-17 11:04 161
		(*it)->y = nextY;
b283e0f7 sago007 2012-07-29 14:01 162
		nextY += (*it)->getHeight()+10;
c53e6443 sago007 2012-04-17 11:04 163
	}
c53e6443 sago007 2012-04-17 11:04 164
	exit.x = X;
c53e6443 sago007 2012-04-17 11:04 165
	exit.y = nextY;
f3ef3495 sago007 2008-11-13 20:00 166
}
f3ef3495 sago007 2008-11-13 20:00 167
ecef5838 sago007 2015-11-24 20:01 168
void Menu::addButton(Button* b) {
c53e6443 sago007 2012-04-17 11:04 169
	buttons.push_back(b);
c53e6443 sago007 2012-04-17 11:04 170
	b->marked = false;
c53e6443 sago007 2012-04-17 11:04 171
	placeButtons();
f3ef3495 sago007 2008-11-13 20:00 172
}
f3ef3495 sago007 2008-11-13 20:00 173
0c1de203 sago007 2015-12-05 22:15 174
Menu::Menu(SDL_Surface* screen) {
0c1de203 sago007 2015-12-05 22:15 175
	this->screen = screen;
c53e6443 sago007 2012-04-17 11:04 176
	buttons = vector<Button*>(10);
c53e6443 sago007 2012-04-17 11:04 177
	isSubmenu = true;
c53e6443 sago007 2012-04-17 11:04 178
	exit.setLabel( _("Back") );
f3ef3495 sago007 2008-11-13 20:00 179
}
f3ef3495 sago007 2008-11-13 20:00 180
0c1de203 sago007 2015-12-05 22:15 181
Menu::Menu(SDL_Surface* screen,bool submenu) {
0c1de203 sago007 2015-12-05 22:15 182
	this->screen = screen;
c53e6443 sago007 2012-04-17 11:04 183
	buttons = vector<Button*>(0);
c53e6443 sago007 2012-04-17 11:04 184
	isSubmenu = submenu;
ecef5838 sago007 2015-11-24 20:01 185
	if (isSubmenu) {
c53e6443 sago007 2012-04-17 11:04 186
		exit.setLabel( _("Back") );
acd79baf sago007 2015-11-22 19:37 187
	}
acd79baf sago007 2015-11-22 19:37 188
	else {
c53e6443 sago007 2012-04-17 11:04 189
		exit.setLabel( _("Exit") );
acd79baf sago007 2015-11-22 19:37 190
	}
f3ef3495 sago007 2008-11-13 20:00 191
}
f3ef3495 sago007 2008-11-13 20:00 192
0c1de203 sago007 2015-12-05 22:15 193
Menu::Menu(SDL_Surface* screen, const string& title, bool submenu) {
0c1de203 sago007 2015-12-05 22:15 194
	this->screen = screen;
c53e6443 sago007 2012-04-17 11:04 195
	buttons = vector<Button*>(0);
c53e6443 sago007 2012-04-17 11:04 196
	isSubmenu = submenu;
c53e6443 sago007 2012-04-17 11:04 197
	this->title = title;
ecef5838 sago007 2015-11-24 20:01 198
	if (isSubmenu) {
c53e6443 sago007 2012-04-17 11:04 199
		exit.setLabel(_("Back") );
acd79baf sago007 2015-11-22 19:37 200
	}
acd79baf sago007 2015-11-22 19:37 201
	else {
c53e6443 sago007 2012-04-17 11:04 202
		exit.setLabel(_("Exit") );
acd79baf sago007 2015-11-22 19:37 203
	}
cc3ef158 sago007 2011-07-03 16:13 204
}
cc3ef158 sago007 2011-07-03 16:13 205
ecef5838 sago007 2015-11-24 20:01 206
void Menu::run() {
c53e6443 sago007 2012-04-17 11:04 207
	running = true;
c53e6443 sago007 2012-04-17 11:04 208
	bool bMouseUp = false;
c53e6443 sago007 2012-04-17 11:04 209
	long oldmousex = mousex;
c53e6443 sago007 2012-04-17 11:04 210
	long oldmousey = mousey;
ecef5838 sago007 2015-11-24 20:01 211
	while (running && !Config::getInstance()->isShuttingDown()) {
acd79baf sago007 2015-11-22 19:37 212
		if (!(highPriority)) {
acd79baf sago007 2015-11-22 19:37 213
			SDL_Delay(10);
acd79baf sago007 2015-11-22 19:37 214
		}
c53e6443 sago007 2012-04-17 11:04 215
c53e6443 sago007 2012-04-17 11:04 216
c53e6443 sago007 2012-04-17 11:04 217
		SDL_Event event;
c53e6443 sago007 2012-04-17 11:04 218
ecef5838 sago007 2015-11-24 20:01 219
		while ( SDL_PollEvent(&event) ) {
ecef5838 sago007 2015-11-24 20:01 220
			if ( event.type == SDL_QUIT ) {
c53e6443 sago007 2012-04-17 11:04 221
				Config::getInstance()->setShuttingDown(5);
c53e6443 sago007 2012-04-17 11:04 222
				running = false;
c53e6443 sago007 2012-04-17 11:04 223
			}
c53e6443 sago007 2012-04-17 11:04 224
ecef5838 sago007 2015-11-24 20:01 225
			if ( event.type == SDL_KEYDOWN ) {
ecef5838 sago007 2015-11-24 20:01 226
				if ( event.key.keysym.sym == SDLK_ESCAPE ) {
c53e6443 sago007 2012-04-17 11:04 227
					running = false;
c53e6443 sago007 2012-04-17 11:04 228
				}
c53e6443 sago007 2012-04-17 11:04 229
ecef5838 sago007 2015-11-24 20:01 230
				if (event.key.keysym.sym == SDLK_UP) {
c53e6443 sago007 2012-04-17 11:04 231
					marked--;
ecef5838 sago007 2015-11-24 20:01 232
					if (marked<0) {
acd79baf sago007 2015-11-22 19:37 233
						marked = buttons.size();    //not -1, since exit is after the last element in the list
acd79baf sago007 2015-11-22 19:37 234
					}
c53e6443 sago007 2012-04-17 11:04 235
				}
c53e6443 sago007 2012-04-17 11:04 236
ecef5838 sago007 2015-11-24 20:01 237
				if (event.key.keysym.sym == SDLK_DOWN) {
c53e6443 sago007 2012-04-17 11:04 238
					marked++;
ecef5838 sago007 2015-11-24 20:01 239
					if (marked>buttons.size()) {
c53e6443 sago007 2012-04-17 11:04 240
						marked = 0;
acd79baf sago007 2015-11-22 19:37 241
					}
c53e6443 sago007 2012-04-17 11:04 242
				}
c53e6443 sago007 2012-04-17 11:04 243
ecef5838 sago007 2015-11-24 20:01 244
				if (event.key.keysym.sym == SDLK_RETURN || event.key.keysym.sym == SDLK_KP_ENTER ) {
ecef5838 sago007 2015-11-24 20:01 245
					if (marked < buttons.size()) {
c53e6443 sago007 2012-04-17 11:04 246
						buttons.at(marked)->doAction();
ecef5838 sago007 2015-11-24 20:01 247
						if (buttons.at(marked)->isPopOnRun()) {
67a32395 sago007 2012-04-19 18:40 248
							running = false;
acd79baf sago007 2015-11-22 19:37 249
						}
67a32395 sago007 2012-04-19 18:40 250
					}
ecef5838 sago007 2015-11-24 20:01 251
					if (marked == buttons.size()) {
c53e6443 sago007 2012-04-17 11:04 252
						running = false;
acd79baf sago007 2015-11-22 19:37 253
					}
c53e6443 sago007 2012-04-17 11:04 254
				}
c53e6443 sago007 2012-04-17 11:04 255
			}
c53e6443 sago007 2012-04-17 11:04 256
c53e6443 sago007 2012-04-17 11:04 257
c53e6443 sago007 2012-04-17 11:04 258
		}
c53e6443 sago007 2012-04-17 11:04 259
ecef5838 sago007 2015-11-24 20:01 260
		for (int i=0; i<buttons.size(); i++) {
c53e6443 sago007 2012-04-17 11:04 261
			buttons.at(i)->marked = (i == marked);
c53e6443 sago007 2012-04-17 11:04 262
		}
c53e6443 sago007 2012-04-17 11:04 263
		exit.marked = (marked == buttons.size());
c53e6443 sago007 2012-04-17 11:04 264
		Uint8 buttonState = SDL_GetMouseState(&mousex,&mousey);
c53e6443 sago007 2012-04-17 11:04 265
		// If the mouse button is released, make bMouseUp equal true
ecef5838 sago007 2015-11-24 20:01 266
		if ( (buttonState&SDL_BUTTON(1))==0) {
c53e6443 sago007 2012-04-17 11:04 267
			bMouseUp=true;
c53e6443 sago007 2012-04-17 11:04 268
		}
c53e6443 sago007 2012-04-17 11:04 269
ecef5838 sago007 2015-11-24 20:01 270
		if (abs(mousex-oldmousex)>5 || abs(mousey-oldmousey)>5) {
ecef5838 sago007 2015-11-24 20:01 271
			for (int i=0; i< buttons.size(); ++i) {
ecef5838 sago007 2015-11-24 20:01 272
				if (buttons.at(i)->isClicked(mousex,mousey)) {
c53e6443 sago007 2012-04-17 11:04 273
					marked = i;
c53e6443 sago007 2012-04-17 11:04 274
				}
c53e6443 sago007 2012-04-17 11:04 275
			}
ecef5838 sago007 2015-11-24 20:01 276
			if (exit.isClicked(mousex,mousey)) {
c53e6443 sago007 2012-04-17 11:04 277
				marked = buttons.size();
c53e6443 sago007 2012-04-17 11:04 278
			}
c53e6443 sago007 2012-04-17 11:04 279
			oldmousex = mousex;
c53e6443 sago007 2012-04-17 11:04 280
			oldmousey = mousey;
c53e6443 sago007 2012-04-17 11:04 281
		}
c53e6443 sago007 2012-04-17 11:04 282
c53e6443 sago007 2012-04-17 11:04 283
		//mouse clicked
ecef5838 sago007 2015-11-24 20:01 284
		if ( (buttonState&SDL_BUTTON(1) )==SDL_BUTTON(1) && bMouseUp) {
c53e6443 sago007 2012-04-17 11:04 285
			bMouseUp = false;
ecef5838 sago007 2015-11-24 20:01 286
			for (int i=0; i< buttons.size(); ++i) {
ecef5838 sago007 2015-11-24 20:01 287
				if (buttons.at(i)->isClicked(mousex,mousey)) {
c53e6443 sago007 2012-04-17 11:04 288
					buttons.at(i)->doAction();
ecef5838 sago007 2015-11-24 20:01 289
					if (buttons.at(i)->isPopOnRun()) {
67a32395 sago007 2012-04-19 18:40 290
						running = false;
acd79baf sago007 2015-11-22 19:37 291
					}
67a32395 sago007 2012-04-19 18:40 292
					mousex = 0;
c53e6443 sago007 2012-04-17 11:04 293
				}
c53e6443 sago007 2012-04-17 11:04 294
			}
ecef5838 sago007 2015-11-24 20:01 295
			if (exit.isClicked(mousex,mousey)) {
c53e6443 sago007 2012-04-17 11:04 296
				running = false;
c53e6443 sago007 2012-04-17 11:04 297
			}
c53e6443 sago007 2012-04-17 11:04 298
		}
c53e6443 sago007 2012-04-17 11:04 299
c53e6443 sago007 2012-04-17 11:04 300
		drawSelf();
c53e6443 sago007 2012-04-17 11:04 301
		SDL_Flip(screen);
c53e6443 sago007 2012-04-17 11:04 302
	}
f3ef3495 sago007 2008-11-13 20:00 303
}
1970-01-01 00:00 304