Open source remastering of the Freespace 2 engine
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
12 #include "globalincs/pstypes.h"
13 #include "object/object.h"
14 #include "io/key.h"
15 #include "ship/ship.h"
16 #include "graphics/2d.h"
17 #include "mission/missionparse.h"
18 #include "network/psnet2.h"
19 #include "stats/scoring.h"
20 #include "cfile/cfile.h"
23 int game_zbuffer = 1;
24 int Current_mission = 0xdeadbeef;
28 struct beam_info;
29 bool Env_cubemap_drawn = false;
31 int Sun_drew = 0;
34 void init_ets(class object*){}
38 char * Game_CDROM_dir = NULL;
40 void game_flash(float r, float g, float b )
41 {
42 }
45 {
46  gr_reset_clip();
47  gr_clear();
48 }
53 {
54 }
56 void os_close()
57 {
58 }
61 {
62  return 0;
63 }
66 {
67  return key_inkey();
68 }
70 int game_poll()
71 {
72  return key_inkey();
73 }
75 void multi_delete_ship(object *obj)
76 {
77 }
80 {
81 }
83 void game_flush()
84 {
85 }
87 typedef struct config_struct
88 {
89  int boob;
94 typedef struct netgame_info
95 {
96  int bubba;
97 } netgame_info;
100 {
101 }
104 {
105 }
108 {
109 }
113 void state_set_mem(unsigned char *c, int i) {}
114 int state_check_mem(unsigned char *c, int i) { return 0; }
116 void demo_do_flag_dead(int i) {}
121 {
122 }
127 void store_p_object( p_object *pbojp, CFILE *fp ) {}
128 void restore_p_object( p_object *pobjp, CFILE *dp) {}
132 void send_support_warpin_packet(int,int,int){}
133 void send_support_warpin_packet( int net_sig, int how ) {}
135 int demo_query_debug(int id) { return 0; };
138 void game_whack_apply(float x, float y) {}
141 void save_restore_matrix(matrix *mat, CFILE *fp, int version, matrix *deflt) {}
142 void save_restore_float(float *fl, CFILE *fp, int version, float deflt) {}
143 void save_restore_angles(angles *ang, CFILE *fp, int version, angles *deflt) {}
144 void save_restore_int(int *n, CFILE *fp, int version, int deflt) {}
145 void save_restore_uint(uint *n, CFILE *fp, int version, uint deflt) {}
146 void save_restore_short(short *n, CFILE *fp, int version, short deflt) {}
148 void save_restore_ubyte(ubyte *n, CFILE *fp, int version, ubyte deflt) {}
149 void save_restore_fix(fix *n, CFILE *fp, int version, fix deflt) {}
150 void save_restore_string(char *str, CFILE *fp, int len, int version, char *deflt) {}
151 char *restore_string_alloc(CFILE *fp, int version, char *deflt) { return NULL; }
155 void demo_write_char(char x) {}
156 char demo_read_char() { return 0; }
158 int red_alert_default_status() {return 0;}
160 void send_ship_kill_packet(class object *,class object *,float,unsigned char) {}
161 void send_debris_create_packet( object *objp, ushort net_sig, int model_num, vec3d pos) {}
164 void big_explosion_flash(float x) {}
166 int game_do_cd_check(char *) {return 0;}
171 int game_cd_changed(void) {return 0;}
179 int game_start_mission(){return 0;}
183 void game_enter_state(int, int){}
184 void game_leave_state(int, int){}
192 int set_cdrom_path(int){return 0;}
193 int find_freespace_cd(char*){return 0;}
195 void game_do_state_common(int, int){}
198 void get_version_string(char*, int){}
203 struct fs_builtin_mission *game_find_builtin_mission(char*){return NULL;}
204 void game_format_time(long, char*){}
205 void game_do_state(int){}
206 void game_process_event(int, int){}
207 void game_shudder_apply(int, float){}
208 int game_hacked_data(){return 0;}
212 void game_tst_mark(class object *, class ship *){}
213 int tst;
214 //int Player_multi_died_check;
221 void game_pause() {}
222 void game_unpause() {}
224 //Time stuff
227 void lock_time_compression(bool is_locked){}
228 void change_time_compression(float multiplier){}
229 void set_time_compression(float multiplier, float change_time){}
232 //WMC
void game_flush()
Definition: fredstubs.cpp:83
Definition: pstypes.h:324
void game_flash(float r, float g, float b)
Definition: fredstubs.cpp:40
int i
Definition: multi_pxo.cpp:466
int game_single_step
Definition: fredstubs.cpp:209
void save_restore_ubyte(ubyte *n, CFILE *fp, int version, ubyte deflt)
Definition: fredstubs.cpp:148
#define gr_clear
Definition: 2d.h:749
int Current_mission
Definition: fredstubs.cpp:24
void state_set_mem(unsigned char *c, int i)
Definition: fredstubs.cpp:113
void lock_time_compression(bool is_locked)
Definition: fredstubs.cpp:227
int key_inkey()
Definition: key.cpp:424
void std_update_goals()
Definition: fredstubs.cpp:52
void game_do_state_common(int, int)
Definition: fredstubs.cpp:195
void game_set_frametime(int)
Definition: fredstubs.cpp:196
int find_freespace_cd(char *)
Definition: fredstubs.cpp:193
void store_p_object(p_object *pbojp, CFILE *fp)
Definition: fredstubs.cpp:127
void send_netgame_state_packet()
Definition: fredstubs.cpp:99
char Game_current_mission_filename[MAX_FILENAME_LEN]
Definition: fredstubs.cpp:26
int Warpout_forced
Definition: fredstubs.cpp:176
int Interface_framerate
Definition: fredstubs.cpp:173
bool Env_cubemap_drawn
Definition: fredstubs.cpp:29
void save_restore_vector(vec3d *vec, CFILE *fp, int version, vec3d *deflt)
Definition: fredstubs.cpp:140
int gameseq_get_state(void)
Definition: fredstubs.cpp:60
int Multi_squad_msg_local
Definition: fredstubs.cpp:131
void multi_delete_ship(object *obj)
Definition: fredstubs.cpp:75
Definition: pstypes.h:88
int Test_begin
Definition: fredstubs.cpp:185
int My_observer_num
Definition: fredstubs.cpp:50
void game_start_time()
Definition: fredstubs.cpp:188
void freespace_menu_background()
Definition: fredstubs.cpp:44
char demo_read_char()
Definition: fredstubs.cpp:156
void save_restore_float(float *fl, CFILE *fp, int version, float deflt)
Definition: fredstubs.cpp:142
Definition: cfile.h:28
void send_debris_create_packet(object *objp, ushort net_sig, int model_num, vec3d pos)
Definition: fredstubs.cpp:161
int Framerate_delay
Definition: fredstubs.cpp:187
void get_version_string_short(char *)
Definition: fredstubs.cpp:211
control_info PlayerControls
Definition: fredstubs.cpp:36
int Show_framerate
Definition: fredstubs.cpp:215
object * objp
Definition: lua.cpp:3105
void multi_server_respawn()
Definition: fredstubs.cpp:123
void send_update_state_packet()
Definition: fredstubs.cpp:103
camid game_render_frame_setup()
Definition: fredstubs.cpp:235
void alt_tab_pause()
Definition: fredstubs.cpp:217
float FreeSpace_gamma
Definition: fredstubs.cpp:191
void game_increase_skill_level()
Definition: fredstubs.cpp:197
void os_close()
Definition: fredstubs.cpp:56
#define gr_reset_clip
Definition: 2d.h:745
bool Time_compression_locked
Definition: fredstubs.cpp:225
void game_format_time(long, char *)
Definition: fredstubs.cpp:204
int game_hacked_data()
Definition: fredstubs.cpp:208
int Game_subspace_effect
Definition: fredstubs.cpp:163
void game_do_state(int)
Definition: fredstubs.cpp:205
GLdouble GLdouble GLdouble r
Definition: Glext.h:5337
int Debug_octant
Definition: fredstubs.cpp:186
unsigned int uint
Definition: pstypes.h:64
void game_enter_state(int, int)
Definition: fredstubs.cpp:183
GLboolean GLboolean g
Definition: Glext.h:5781
int Game_do_state_should_skip
Definition: fredstubs.cpp:201
void save_restore_short(short *n, CFILE *fp, int version, short deflt)
Definition: fredstubs.cpp:146
char ** Builtin_mission_names
Definition: fredstubs.cpp:25
float flFrametime
Definition: fredstubs.cpp:22
void demo_write_char(char x)
Definition: fredstubs.cpp:155
struct netgame_info netgame_info
config_struct default_config
Definition: fredstubs.cpp:92
void save_restore_int(int *n, CFILE *fp, int version, int deflt)
Definition: fredstubs.cpp:144
Definition: beam.h:43
void game_shudder_apply(int, float)
Definition: fredstubs.cpp:207
void set_time_compression(float multiplier, float change_time)
Definition: fredstubs.cpp:229
void get_version_string()
Definition: fredstubs.cpp:194
void game_process_event(int, int)
Definition: fredstubs.cpp:206
int Multi_ping_timestamp
Definition: fredstubs.cpp:30
void restore_p_object(p_object *pobjp, CFILE *dp)
Definition: fredstubs.cpp:128
fix game_get_overall_frametime()
Definition: fredstubs.cpp:230
void game_stop_looped_sounds()
Definition: fredstubs.cpp:168
int last_single_step
Definition: fredstubs.cpp:210
CFILE * Working_demo
Definition: fredstubs.cpp:27
Definition: ship.h:534
void multi_build_respawn_points()
Definition: fredstubs.cpp:125
int game_cd_changed(void)
Definition: fredstubs.cpp:171
int Game_ships_tbl_valid
Definition: fredstubs.cpp:181
int red_alert_default_status()
Definition: fredstubs.cpp:158
int Sun_drew
Definition: fredstubs.cpp:31
cfbp fp
Definition: cfile.cpp:1065
int Networking_disabled
Definition: fredstubs.cpp:32
void game_post_level_init()
Definition: fredstubs.cpp:234
void game_render_frame(camid cid)
Definition: fredstubs.cpp:236
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
long fix
Definition: pstypes.h:54
GLclampd n
Definition: Glext.h:7286
char * restore_string_alloc(CFILE *fp, int version, char *deflt)
Definition: fredstubs.cpp:151
unsigned char ubyte
Definition: pstypes.h:62
float Warpout_time
Definition: fredstubs.cpp:177
void game_simulation_frame()
Definition: fredstubs.cpp:237
void demo_set_playback_filter()
Definition: fredstubs.cpp:118
vec3d Dead_player_last_vel
Definition: fredstubs.cpp:178
struct config_struct config_struct
void save_restore_p_object(p_object *pobj, CFILE *fp)
Definition: fredstubs.cpp:153
void save_restore_ushort(ushort *n, CFILE *fp, int version, ushort deflt)
Definition: fredstubs.cpp:147
vec3d vec
Definition: lua.cpp:2173
void game_level_init()
Definition: fredstubs.cpp:233
char * Game_CDROM_dir
Definition: fredstubs.cpp:38
void game_leave_state(int, int)
Definition: fredstubs.cpp:184
void game_whack_apply(float x, float y)
Definition: fredstubs.cpp:138
void save_restore_uint(uint *n, CFILE *fp, int version, uint deflt)
Definition: fredstubs.cpp:145
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
void send_goal_status_packet()
Definition: fredstubs.cpp:107
void save_restore_fix(fix *n, CFILE *fp, int version, fix deflt)
Definition: fredstubs.cpp:149
int game_start_mission()
Definition: fredstubs.cpp:179
Definition: pstypes.h:606
void game_level_close()
Definition: fredstubs.cpp:182
int game_poll()
Definition: fredstubs.cpp:70
void save_restore_angles(angles *ang, CFILE *fp, int version, angles *deflt)
Definition: fredstubs.cpp:143
int state_check_mem(unsigned char *c, int i)
Definition: fredstubs.cpp:114
void multi_end_sequence()
Definition: fredstubs.cpp:120
int Multi_squad_msg_targ
Definition: fredstubs.cpp:130
int game_check_key()
Definition: fredstubs.cpp:65
void game_render_post_frame()
Definition: fredstubs.cpp:239
void game_set_view_clip()
Definition: fredstubs.cpp:174
void send_ship_kill_packet(class object *, class object *, float, unsigned char)
Definition: fredstubs.cpp:160
unsigned short ushort
Definition: pstypes.h:63
long Game_time_compression
Definition: fredstubs.cpp:202
void init_ets(class object *)
Definition: fredstubs.cpp:34
void game_unpause()
Definition: fredstubs.cpp:222
void save_restore_matrix(matrix *mat, CFILE *fp, int version, matrix *deflt)
Definition: fredstubs.cpp:141
int Show_target_weapons
Definition: fredstubs.cpp:199
void game_tst_mark(class object *, class ship *)
Definition: fredstubs.cpp:212
void game_feature_disabled_popup()
Definition: fredstubs.cpp:219
hull_check pos
Definition: lua.cpp:5050
int Game_skill_level
Definition: fredstubs.cpp:170
GLsizei GLsizei GLuint * obj
Definition: Glext.h:5619
int tst
Definition: fredstubs.cpp:213
int Show_area_effect
Definition: fredstubs.cpp:111
int Show_target_debug_info
Definition: fredstubs.cpp:200
void send_support_warpin_packet(int, int, int)
Definition: fredstubs.cpp:132
int game_get_default_skill_level()
Definition: fredstubs.cpp:190
GLenum GLsizei len
Definition: Glext.h:6283
float flRealframetime
Definition: fredstubs.cpp:226
int game_do_cd_check(char *)
Definition: fredstubs.cpp:166
void game_update_missiontime()
Definition: fredstubs.cpp:238
void demo_do_flag_dead(int i)
Definition: fredstubs.cpp:116
int game_zbuffer
Definition: fredstubs.cpp:23
void send_homing_fired_packet()
Definition: fredstubs.cpp:79
int model_num
Definition: lua.cpp:4996
void game_stop_time()
Definition: fredstubs.cpp:189
void big_explosion_flash(float x)
Definition: fredstubs.cpp:164
void demo_checkpoint()
Definition: fredstubs.cpp:117
void game_pause()
Definition: fredstubs.cpp:221
int set_cdrom_path(int)
Definition: fredstubs.cpp:192
void change_time_compression(float multiplier)
Definition: fredstubs.cpp:228
#define fl(p)
Definition: modelsinc.h:71
const GLubyte * c
Definition: Glext.h:8376
void save_restore_string(char *str, CFILE *fp, int len, int version, char *deflt)
Definition: fredstubs.cpp:150
GLint y
Definition: Gl.h:1505
struct fs_builtin_mission * game_find_builtin_mission(char *)
Definition: fredstubs.cpp:203
int Game_weapons_tbl_valid
Definition: fredstubs.cpp:180
int demo_query_debug(int id)
Definition: fredstubs.cpp:135