File: window.h

package info (click to toggle)
bloboats 1.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,868 kB
  • ctags: 1,099
  • sloc: cpp: 8,820; makefile: 117
file content (65 lines) | stat: -rw-r--r-- 1,419 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
    Bloboats - a boat racing game by Blobtrox
    Copyright (C) 2006  Markus "MakeGho" Kettunen

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef _WINDOW_H_
#define _WINDOW_H_

#include "SDL.h"
#include "SDL_opengl.h"

#include <math.h>

class window
{
	public:
		window();
		~window();

		SDL_Surface * OpenWindow(int width, int height, int bpp, Uint32 flags);
		void SetTitle(char *text, char *icon);
		bool Iconify();

		void ToggleFullscreen();

		void Center(double cx, double cy);
		void Viewarea(double x, double y);

		int width;
		int height;
		int bpp;

		double centerx, centery;
		double showx, showy;

		double r2;
		float r;

		int xlast, ylast;

		Uint32 oldflags;

	private:
		SDL_Surface *screen;



};

#endif