Debian Codegraph @

src/canvas.h

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 // Copyright 2007 by Robert Schuster <[email protected]>
2
3 // Basic drawing and converting operations for Qonk
4
5 // If not explicitly told otherwise coordinate values are
6 // in game units.
7
8 #ifndef CANVAS_H
9 #define CANVAS_H
10
11 #include <SDL/SDL.h>
12
•13 #include "guichan/sdl.hpp"
14
15 class Coordinate;
16 class Font;
17
18 class Canvas
19 {
20 public:
21 static void alphaBlend( SDL_Surface* surface, Uint8 alpha );
22
23 static void drawSelector( Coordinate&, Sint16 offset,
24 Sint16 width, Sint16 height,
25 Uint8 R, Uint8 G, Uint8 B );
26
27 static void drawNearestPlanetSelector(Coordinate&, int);
28
29 static void drawPlanet(Coordinate&, int size, Uint32 color);
30
31 static void drawPlanetMapped(int x, int y, int size, Uint32 color);
32
33 static void drawResidentShip(Coordinate& shipLocation, Coordinate& planetLocation,
34 int color);
35
36 static void drawFlyingShip(Coordinate&, double direction, int color);
37
38 static void drawSelection(Coordinate&);
39
40 static void drawOrbit(Coordinate&, double rotationDistance, int color);
41
42 static void drawBuildProgress(Coordinate&, int, double);
43
44 static void drawText(int, int, const char *, int, int, int, int a=255);
45
46 static int getFontHeight();
47
48 static void drawBox(int x, int y, int w, int h, int r, int g, int b);
49
50 static void drawRadar();
51
52 static void drawSun();
53
54 static void drawStar(int x, int y, int brightness);
55
56 static void drawSonar(Coordinate coord, int size, double percentage, int r, int g, int b, bool circle);
57
58 static void drawPlayerStat(int size, int index, int previousValue, int currentValue, int r, int g, int b);
59
60 static void drawMouseSelection(Coordinate &c1, Coordinate &c2);
61
62 static void drawCursor(int, int);
63
64 static void updateScreen();
65
66 static void initScreen();
67
68 static void shutdown();
69
70 static gcn::SDLGraphics *getSDLGraphics();
71
72 private:
73
74 static gcn::SDLGraphics *sdlGraphics;
75
76 static SDL_Surface* main;
77
78 static Font *font;
79
80 };
81
82 #endif /* CANVAS_H */