Optimize drawing by using GL lists. Added a blinking minimap bug.
[cave9.git] / src / display.h
blob8928c2e901e2954e3b7169ec0f6e8d286e61d1dd
1 #ifndef display_h_included
2 #define display_h_included
4 #include <SDL.h>
5 #include <SDL_ttf.h>
6 #include "game.h"
8 typedef struct {
9 SDL_Surface *screen;
10 SDL_Surface *minimap;
11 TTF_Font *font;
12 SDL_Rect rect[16];
13 int rect_n;
14 Vec3 cam, target;
15 GLfloat near_plane, far_plane;
16 GLuint list_start;
17 } Display;
19 void viewport(Display *display, GLsizei w, GLsizei h, GLsizei bpp);
20 void cave_model(Display *display, Cave *cave);
21 void ship_model(Ship *ship);
22 void render_hud(Display*, Ship *player);
23 void display_init(Display* display);
24 void display_start_frame(Display *display, Ship *player);
25 void display_end_frame(Display *display);
26 void display_minimap(Display *display, Cave *cave, Ship *player);
27 void display_hud(Display *display, Ship *player);
28 void display_message(Display *display, Cave *cave, Ship *player, const char *buf);
29 void display_frame(Display *display, Cave *cave, Ship *player);
31 #endif