renamed source files back to .c
[cave9.git] / src / display.h
blobf60f675e603f4e154db07b76e5f8c51953d29c40
1 /*
2 This file is part of cave9.
4 cave9 is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 cave9 is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with cave9. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef display_h_included
19 #define display_h_included
21 #include <SDL.h>
22 #include <SDL_ttf.h>
23 #include <SDL_net.h>
24 #include "game.h"
26 #define TEXTURE_FILE "data/cave9.jpg"
27 #define FONT_FILE "data/cave9.ttf"
28 #define SCORE_FILE "data/cave9.hi"
29 #define GLOBAL_SCORE_PORT 31559
30 #define GLOBAL_SCORE_HOST "cave9.9hells.org"
31 #define GLOBAL_SCORE_LEN 16
32 #define GLOBAL_SCORE_WAIT 666
34 typedef struct {
35 SDL_Surface* screen;
36 GLuint texture_id;
37 GLuint hud_id;
38 GLuint msg_id;
39 TTF_Font* font;
40 Vec3 cam, target;
41 GLfloat near_plane, far_plane;
43 GLuint list_start;
44 GLuint wire_list_start;
45 GLuint ship_list;
47 int monoliths;
48 int cockpit;
50 int session_score;
51 int local_score;
52 int global_score;
54 UDPsocket udp_sock;
55 UDPpacket* udp_pkt;
56 } Display;
58 typedef struct {
59 int width;
60 int height;
61 int bpp;
62 int fullscreen;
63 int highres;
64 int antialiasing;
65 int monoliths;
66 int start;
67 int cockpit;
68 } Args;
70 void viewport(Display*, GLsizei w, GLsizei h, GLsizei bpp, bool fullscreen, int aa);
71 void cave_model(Display*, Cave*, int wire);
72 void ship_model(Display*, Ship*);
73 void render_hud(Display*, Ship* player);
74 void display_init(Display*, Args*);
75 void display_start_frame(Display*, Ship* player);
76 void display_end_frame(Display*);
77 void display_minimap(Display*, Cave*, Ship* player);
78 void display_hud(Display*, Ship* player);
79 void display_message(Display*, Cave*, Ship* player, const char* buf);
80 void display_frame(Display*, Cave*, Ship* player);
81 void display_net_update(Display*);
82 void display_net_finish(Display*);
84 #endif
86 // vim600:fdm=syntax:fdn=1: