Last change
on this file since 3306 was
3020,
checked in by simon, 20 years ago
|
/branches/sound/sound, branches/sound/hud: Made a few changes like a version which no longer compiles… Ah life is so hard on me. If it would compile, you would need to make a folder Data in hud and add a tga file named Font.tga with the letters in it.
|
File size:
991 bytes
|
Line | |
---|
1 | #ifndef HUD_H |
---|
2 | #define HUD_H |
---|
3 | |
---|
4 | #include <stdlib.h> |
---|
5 | #include <stdio.h> |
---|
6 | #include <stdarg.h> |
---|
7 | #include <string.h> |
---|
8 | #include <GL/gl.h> |
---|
9 | #include <GL/glu.h> |
---|
10 | #include "SDL.h" |
---|
11 | |
---|
12 | #define SCREEN_WIDTH 640 |
---|
13 | #define SCREEN_HEIGHT 480 |
---|
14 | #define SCREEN_BPP 16 |
---|
15 | |
---|
16 | class Hud { |
---|
17 | public: |
---|
18 | typedef struct { |
---|
19 | GLubyte *imageData; // Image Data |
---|
20 | GLuint bpp; // Image bits per pixel. |
---|
21 | GLuint width; // Image width |
---|
22 | GLuint height; // Image height |
---|
23 | GLuint texID; // Texture ID |
---|
24 | } TextureImage; |
---|
25 | Hud (); |
---|
26 | ~Hud (); |
---|
27 | bool LoadTGA(TextureImage *texture, char *filename); |
---|
28 | GLvoid BuildFont(GLvoid); |
---|
29 | GLvoid KillFont(GLvoid); |
---|
30 | GLvoid glPrint(GLint x, GLint y, int set, const char *fmt, ...); |
---|
31 | void Resize(int width, int height); |
---|
32 | int InitGL(); |
---|
33 | void handleKeyPress(SDL_keysym *keysym); |
---|
34 | void DrawGLScene(); |
---|
35 | int main( int argc, char **argv ); |
---|
36 | SDL_Surface* surface; |
---|
37 | int scroll; |
---|
38 | int maxtokens; |
---|
39 | int swidth; |
---|
40 | int sheight; |
---|
41 | int scroller; |
---|
42 | GLuint base; |
---|
43 | TextureImage textures[1]; |
---|
44 | }; |
---|
45 | |
---|
46 | |
---|
47 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.