38 #if defined(SCP_UNIX) && !defined(__APPLE__) 
   39 #if ( SDL_VERSION_ATLEAST(1, 2, 7) ) 
   40 #include "SDL_cpuinfo.h" 
   42 #endif // SCP_UNIX && !__APPLE__ 
   87 static int GL_cursor_nframes = 0;
 
   90 static float Gr_full_resize_X = 1.0f, Gr_full_resize_Y = 1.0f;
 
   91 static float Gr_full_center_resize_X = 1.0f, Gr_full_center_resize_Y = 1.0f;
 
   92 static float Gr_resize_X = 1.0f, Gr_resize_Y = 1.0f;
 
   93 static float Gr_menu_offset_X = 0.0f, Gr_menu_offset_Y = 0.0f;
 
   94 static float Gr_menu_zoomed_offset_X = 0.0f, Gr_menu_zoomed_offset_Y = 0.0f;
 
  104 void gr_set_screen_scale(
int w, 
int h, 
int zoom_w, 
int zoom_h, 
int max_w, 
int max_h, 
int center_w, 
int center_h, 
bool force_stretch)
 
  106         bool do_zoom = zoom_w > 0 && zoom_h > 0 && (zoom_w != w || zoom_h != 
h);
 
  108         Gr_full_resize_X = (
float)max_w / (
float)
w;
 
  109         Gr_full_resize_Y = (
float)max_h / (
float)
h;
 
  111         Gr_full_center_resize_X = (
float)center_w / (
float)
w;
 
  112         Gr_full_center_resize_Y = (
float)center_h / (
float)
h;
 
  115                 float aspect_quotient = ((
float)center_w / (
float)center_h) / ((
float)zoom_w / (
float)zoom_h);
 
  117                 Gr_resize_X = (
float)center_w / (
float)zoom_w / ((aspect_quotient > 1.0f) ? aspect_quotient : 1.0
f);
 
  118                 Gr_resize_Y = (
float)center_h / (
float)zoom_h * ((aspect_quotient < 1.0f) ? aspect_quotient : 1.0f);
 
  120                 Gr_menu_offset_X = ((center_w - w * Gr_resize_X) / 2.0f) + gr_screen.
center_offset_x;
 
  121                 Gr_menu_offset_Y = ((center_h - h * Gr_resize_Y) / 2.0f) + gr_screen.
center_offset_y;
 
  123                 Gr_menu_zoomed_offset_X = (Gr_menu_offset_X >= 0.0f) ? Gr_menu_offset_X : gr_screen.
center_offset_x;
 
  124                 Gr_menu_zoomed_offset_Y = (Gr_menu_offset_Y >= 0.0f) ? Gr_menu_offset_Y : gr_screen.
center_offset_y;
 
  128                                 Gr_resize_X = Gr_full_center_resize_X;
 
  132                                 Gr_resize_Y = Gr_full_center_resize_Y;
 
  138                         Gr_resize_X = Gr_full_center_resize_X;
 
  139                         Gr_resize_Y = Gr_full_center_resize_Y;
 
  142                         Gr_menu_offset_Y = Gr_menu_zoomed_offset_Y = (
float)gr_screen.
center_offset_y;
 
  144                         float aspect_quotient = ((
float)center_w / (
float)center_h) / ((
float)w / (
float)h);
 
  146                         Gr_resize_X = Gr_full_center_resize_X / ((aspect_quotient > 1.0f) ? aspect_quotient : 1.0
f);
 
  147                         Gr_resize_Y = Gr_full_center_resize_Y * ((aspect_quotient < 1.0f) ? aspect_quotient : 1.0f);
 
  149                         Gr_menu_offset_X = Gr_menu_zoomed_offset_X = ((aspect_quotient > 1.0f) ? ((center_w - w * Gr_resize_X) / 2.0f) : 0.0f) + gr_screen.
center_offset_x;
 
  150                         Gr_menu_offset_Y = Gr_menu_zoomed_offset_Y = ((aspect_quotient < 1.0f) ? ((center_h - h * Gr_resize_Y) / 2.0f) : 0.0f) + gr_screen.
center_offset_y;
 
  154         gr_screen.
custom_size = (w != max_w || w != center_w || h != max_h || h != center_h);
 
  221                 switch (resize_mode) {
 
  223                         xy_tmp = (*x) * Gr_full_resize_X;
 
  231                         xy_tmp = (*x) * Gr_resize_X + Gr_menu_offset_X;
 
  235                         xy_tmp = (*x) * Gr_resize_X + Gr_menu_zoomed_offset_X;
 
  239                         xy_tmp = (*x) * Gr_resize_X;
 
  242                 (*x) = 
fl2ir(xy_tmp);
 
  246                 switch (resize_mode) {
 
  248                         xy_tmp = (*y) * Gr_full_resize_Y;
 
  256                         xy_tmp = (*y) * Gr_resize_Y + Gr_menu_offset_Y;
 
  260                         xy_tmp = (*y) * Gr_resize_Y + Gr_menu_zoomed_offset_Y;
 
  264                         xy_tmp = (*y) * Gr_resize_Y;
 
  267                 (*y) = 
fl2ir(xy_tmp);
 
  271                 switch (resize_mode) {
 
  273                         xy_tmp = (*w) * Gr_full_resize_X;
 
  277                         xy_tmp = (*w) * Gr_full_center_resize_X;
 
  283                         xy_tmp = (*w) * Gr_resize_X;
 
  286                 (*w) = 
fl2ir(xy_tmp);
 
  290                 switch (resize_mode) {
 
  292                         xy_tmp = (*h) * Gr_full_resize_Y;
 
  296                         xy_tmp = (*h) * Gr_full_center_resize_Y;
 
  302                         xy_tmp = (*h) * Gr_resize_Y;
 
  305                 (*h) = 
fl2ir(xy_tmp);
 
  329                 switch (resize_mode) {
 
  331                         xy_tmp = (*x) / Gr_full_resize_X;
 
  339                         xy_tmp = ((*x) - Gr_menu_offset_X) / Gr_resize_X;
 
  343                         xy_tmp = ((*x) - Gr_menu_zoomed_offset_X) / Gr_resize_X;
 
  347                         xy_tmp = (*x) / Gr_resize_X;
 
  350                 (*x) = 
fl2ir(xy_tmp);
 
  354                 switch (resize_mode) {
 
  356                         xy_tmp = (*y) / Gr_full_resize_Y;
 
  364                         xy_tmp = ((*y) - Gr_menu_offset_Y) / Gr_resize_Y;
 
  368                         xy_tmp = ((*y) - Gr_menu_zoomed_offset_Y) / Gr_resize_Y;
 
  372                         xy_tmp = (*y) / Gr_resize_Y;
 
  375                 (*y) = 
fl2ir(xy_tmp);
 
  379                 switch (resize_mode) {
 
  381                         xy_tmp = (*w) / Gr_full_resize_X;
 
  385                         xy_tmp = (*w) / Gr_full_center_resize_X;
 
  391                         xy_tmp = (*w) / Gr_resize_X;
 
  394                 (*w) = 
fl2ir(xy_tmp);
 
  398                 switch (resize_mode) {
 
  400                         xy_tmp = (*h) / Gr_full_resize_Y;
 
  404                         xy_tmp = (*h) / Gr_full_center_resize_Y;
 
  410                         xy_tmp = (*h) / Gr_resize_Y;
 
  413                 (*h) = 
fl2ir(xy_tmp);
 
  439                 switch (resize_mode) {
 
  441                         xy_tmp = (*x) * Gr_full_resize_X;
 
  449                         xy_tmp = (*x) * Gr_resize_X + Gr_menu_offset_X;
 
  453                         xy_tmp = (*x) * Gr_resize_X + Gr_menu_zoomed_offset_X;
 
  457                         xy_tmp = (*x) * Gr_resize_X;
 
  464                 switch (resize_mode) {
 
  466                         xy_tmp = (*y) * Gr_full_resize_Y;
 
  474                         xy_tmp = (*y) * Gr_resize_Y + Gr_menu_offset_Y;
 
  478                         xy_tmp = (*y) * Gr_resize_Y + Gr_menu_zoomed_offset_Y;
 
  482                         xy_tmp = (*y) * Gr_resize_Y;
 
  489                 switch (resize_mode) {
 
  491                         xy_tmp = (*w) * Gr_full_resize_X;
 
  495                         xy_tmp = (*w) * Gr_full_center_resize_X;
 
  501                         xy_tmp = (*w) * Gr_resize_X;
 
  508                 switch (resize_mode) {
 
  510                         xy_tmp = (*h) * Gr_full_resize_Y;
 
  514                         xy_tmp = (*h) * Gr_full_center_resize_Y;
 
  520                         xy_tmp = (*h) * Gr_resize_Y;
 
  547                 switch (resize_mode) {
 
  549                         xy_tmp = (*x) / Gr_full_resize_X;
 
  557                         xy_tmp = ((*x) - Gr_menu_offset_X) / Gr_resize_X;
 
  561                         xy_tmp = ((*x) - Gr_menu_zoomed_offset_X) / Gr_resize_X;
 
  565                         xy_tmp = (*x) / Gr_resize_X;
 
  572                 switch (resize_mode) {
 
  574                         xy_tmp = (*y) / Gr_full_resize_Y;
 
  582                         xy_tmp = ((*y) - Gr_menu_offset_Y) / Gr_resize_Y;
 
  586                         xy_tmp = ((*y) - Gr_menu_zoomed_offset_Y) / Gr_resize_Y;
 
  590                         xy_tmp = (*y) / Gr_resize_Y;
 
  597                 switch (resize_mode) {
 
  599                         xy_tmp = (*w) / Gr_full_resize_X;
 
  603                         xy_tmp = (*w) / Gr_full_center_resize_X;
 
  609                         xy_tmp = (*w) / Gr_resize_X;
 
  616                 switch (resize_mode) {
 
  618                         xy_tmp = (*h) / Gr_full_resize_Y;
 
  622                         xy_tmp = (*h) / Gr_full_center_resize_Y;
 
  628                         xy_tmp = (*h) / Gr_resize_Y;
 
  645         switch (gr_screen.
mode) {
 
  666 DCF(clear_color, 
"set clear color r, g, b")
 
  680         if ( palette == NULL ) {
 
  687                                 for (b=0; b<6; b++ ) {
 
  693                 for ( i=216;i<256; i++ ) {
 
  787         memset( &gr_screen, 0, 
sizeof(
screen) );
 
  791         if ( (((width == 640) && (height == 480)) || ((width == 1024) && (height == 768))) && (aspect_ratio == center_aspect_ratio) ) {
 
  799         if (aspect_ratio > center_aspect_ratio) {
 
  802         } 
else if (aspect_ratio < center_aspect_ratio) {
 
  829                 float aspect_quotient = center_aspect_ratio / (4.0f / 3.0f);
 
  831                 Gr_save_resize_X = Gr_resize_X = Gr_full_center_resize_X / ((aspect_quotient > 1.0f) ? aspect_quotient : 1.0
f);
 
  832                 Gr_save_resize_Y = Gr_resize_Y = Gr_full_center_resize_Y * ((aspect_quotient < 1.0f) ? aspect_quotient : 1.0f);
 
  909 bool gr_init(
int d_mode, 
int d_width, 
int d_height, 
int d_depth)
 
  911         int width = 1024, height = 768, depth = 32, mode = 
GR_OPENGL;
 
  912         float center_aspect_ratio = -1.0f;
 
  913         const char *ptr = NULL;
 
  914         const char *Default_video_settings = 
"OGL -(1024x768)x32 bit";
 
  922                 switch (gr_screen.
mode) {
 
  940                 ptr = Default_video_settings;
 
  947         if ( sscanf(ptr+5, 
"(%dx%d)x%d ", &width, &height, &depth) != 3 ) {
 
  948                 Error(
LOCATION, 
"Can't understand 'VideocardFs2open' config entry!");
 
  955                 if ( sscanf(
Cmdline_res, 
"%dx%d", &tmp_width, &tmp_height) == 2 ) {
 
  961                 int tmp_center_width = 0;
 
  962                 int tmp_center_height = 0;
 
  964                 if ( (sscanf(
Cmdline_center_res, 
"%dx%d", &tmp_center_width, &tmp_center_height) == 2) && (tmp_center_width > 0) && (tmp_center_height > 0) ) {
 
  965                         center_aspect_ratio = (
float)tmp_center_width / (
float)tmp_center_height;
 
  991                 if ( !has_sparky_hi ) {
 
  992                         if ( (width == 1024) && (height == 768) ) {
 
  995                                 center_aspect_ratio = -1.0f;
 
  999                                 center_aspect_ratio = -1.0f;
 
 1010                 center_aspect_ratio = -1.0f;
 
 1018 #ifdef _FORCE_DEBUG_WIDESCREEN 
 1022         center_aspect_ratio = -1.0f;
 
 1024 #elif defined(_FORCE_DEBUG_1024) 
 1028         center_aspect_ratio = -1.0f;
 
 1030 #elif defined(_FORCE_DEBUG_640) 
 1034         center_aspect_ratio = -1.0f;
 
 1039         if (center_aspect_ratio <= 0.0f) {
 
 1040                 float aspect_ratio = (
float)width / (
float)
height;
 
 1041                 if (aspect_ratio > 3.5f) {
 
 1042                         center_aspect_ratio = aspect_ratio * 0.3f;
 
 1044                         center_aspect_ratio = aspect_ratio;
 
 1049         if ( gr_init_sub(mode, width, height, depth, center_aspect_ratio) == 
false ) {
 
 1079                         Error(
LOCATION, 
"\nWeb cursor bitmap not found.  This is most likely due to one of three reasons:\n" 
 1080                                 "\t1) You're running FreeSpace Open from somewhere other than your FreeSpace 2 folder;\n" 
 1081                                 "\t2) You've somehow corrupted your FreeSpace 2 installation, e.g. by modifying or removing the retail VP files;\n" 
 1082                                 "\t3) You haven't installed FreeSpace 2 at all.  (Note that installing FreeSpace Open does NOT remove the need for a FreeSpace 2 installation.)\n" 
 1083                                 "Number 1 can be fixed by simply moving the FreeSpace Open executable file to the FreeSpace 2 folder.  Numbers 2 and 3 can be fixed by installing or reinstalling FreeSpace 2.\n");
 
 1087         mprintf((
"GRAPHICS: Initializing default colors...\n"));
 
 1107         switch( gr_screen.
mode ) {
 
 1125         if (gr_activated == active) {
 
 1128         gr_activated = active;
 
 1134         switch( gr_screen.
mode ) {
 
 1190         Assert((r >= 0) && (r < 256));
 
 1191         Assert((g >= 0) && (g < 256));
 
 1192         Assert((b >= 0) && (b < 256));
 
 1245         static int locked = 0;
 
 1252                         if ( (GL_cursor_nframes < 2) || ((n - 
Gr_cursor) >= GL_cursor_nframes) ) {
 
 1261                         Assert( GL_cursor_nframes > 0 );
 
 1325         memset(verts, 0, 
sizeof(verts));
 
 1356 void gr_bitmap_uv(
int _x, 
int _y, 
int _w, 
int _h, 
float _u0, 
float _v0, 
float _u1, 
float _v1, 
int resize_mode)
 
 1375         memset(verts, 0, 
sizeof(verts));
 
 1409         for (
int i = 0; 
i < n_bm; 
i++) {
 
 1426         for(
int i = 0; 
i < n_bm; 
i++) {
 
 1430                 if ( (l->
w <= 0) || (l->
h <= 0) ) {
 
 1456                 slope.
xyz.x = slope.
xyz.y;
 
 1473         vec3d s1, s2, e1, e2, dir;
 
 1474         vec3d last_e1, last_e2;
 
 1476         vertex *verts[4] = {&v[0], &v[1], &v[2], &v[3]};
 
 1477         int saved_zbuffer_mode, 
idx;
 
 1478         int started_frame = 0;
 
 1480         int num_pts = pts->size();
 
 1504         for(idx=0; idx<num_pts-1; idx++) {
 
 1507                 e1 = pts->at(idx+1);                                                                                            
 
 1630 int poly_list::find_first_vertex(
int idx)
 
 1638         for (
int i = 0; 
i < 
idx; 
i++) {
 
 1639                 if ( (*p_norm == *o_norm)
 
 1653 int poly_list::find_first_vertex_fast(
int idx)
 
 1659                 mprintf((
"Sorted index list missing index %d!", idx));
 
 1678                 if ( (*p_norm == *o_norm)
 
 1706         if (_verts <= currently_allocated)
 
 1750         currently_allocated = _verts;
 
 1787         float deltaU0, deltaV0, deltaU1, deltaV1;
 
 1788         vec3d tangent, binormal, cross;
 
 1815                 float n = (deltaU0 * deltaV1) - (deltaU1 * deltaV0);
 
 1822                         float blah = 1.0f / 
n;
 
 1856                 tsb[
i].
scaler = (scale < 0.0f) ? -1.0f : 1.0f;
 
 1860                 tsb[i+1].
scaler = (scale < 0.0f) ? -1.0f : 1.0f;
 
 1864                 tsb[i+2].
scaler = (scale < 0.0f) ? -1.0f : 1.0f;
 
 1874         ubyte *nverts_good = NULL;
 
 1882     Assert( nverts_good != NULL );
 
 1883         if ( nverts_good == NULL )
 
 1886         memset( nverts_good, 0, 
n_verts );
 
 1890         generate_sorted_index_list();
 
 1892         for (j = 0; j < 
n_verts; j++) {
 
 1893                 if (find_first_vertex_fast(j) == j) {
 
 1896                         vertex_list.push_back(j);
 
 1901         if (n_verts == nverts) {
 
 1902                 if (nverts_good != NULL) {
 
 1909         buffer_list_internal.
n_verts = 0;
 
 1910         buffer_list_internal.
allocate(nverts);
 
 1912         for (j = 0; j < 
n_verts; j++) {
 
 1913                 if ( !nverts_good[j] ) {
 
 1921                         buffer_list_internal.
tsb[
z] = 
tsb[j];
 
 1928                 buffer_list_internal.
n_verts++;
 
 1934         if (nverts_good != NULL) {
 
 1938         buffer_list_internal.generate_sorted_index_list();
 
 1940         (*this) = buffer_list_internal;
 
 1965 void poly_list::generate_sorted_index_list()
 
 1967         for ( 
int j = 0; j < 
n_verts; ++j) {
 
 1974 bool poly_list::finder::operator()(
const uint a, 
const uint b)
 
 1981         Assert(search_list != NULL);
 
 1983         if ( a == (
uint)search_list->n_verts ) {
 
 1984                 Assert(vert_to_find != NULL);
 
 1985                 Assert(norm_to_find != NULL);
 
 1988                 vert_a = vert_to_find;
 
 1989                 norm_a = norm_to_find;
 
 1991                 vert_a = &search_list->vert[
a];
 
 1992                 norm_a = &search_list->norm[
a];
 
 1995         if ( b == (
uint)search_list->n_verts ) {
 
 1996                 Assert(vert_to_find != NULL);
 
 1997                 Assert(norm_to_find != NULL);
 
 2000                 vert_b = vert_to_find;
 
 2001                 norm_b = norm_to_find;
 
 2003                 vert_b = &search_list->vert[
b];
 
 2004                 norm_b = &search_list->norm[
b];
 
 2007         if (norm_a->
xyz.x != norm_b->
xyz.x) {
 
 2008                 return norm_a->
xyz.x < norm_b->
xyz.x;
 
 2011         if (norm_a->
xyz.y != norm_b->
xyz.y) {
 
 2012                 return norm_a->
xyz.y < norm_b->
xyz.y;
 
 2015         if (norm_a->
xyz.z != norm_b->
xyz.z) {
 
 2016                 return norm_a->
xyz.z < norm_b->
xyz.z;
 
 2039         if ( !compare_indices ) {
 
 2136         bool thruster_scale, 
 
 2138         bool team_color_set,
 
 2147         uint shader_flags = 0;
 
 2157         if ( in_shadow_map ) {
 
 2161                 return shader_flags;
 
 2182                 if ( glow_map > 0 ) {
 
 2208                 if ( misc_map > 0 ) {
 
 2212                 if ( team_color_set ) {
 
 2221         if ( thruster_scale ) {
 
 2225         return shader_flags;
 
bool Save_custom_screen_size
 
void gr_rect(int x, int y, int w, int h, int resize_mode)
 
float Gr_save_full_resize_X
 
bool gr_resize_screen_posf(float *x, float *y, float *w, float *h, int resize_mode)
 
struct screen3d::@234::@236 xyw
 
bool gr_init(int d_mode, int d_width, int d_height, int d_depth)
 
#define GR_RESIZE_MENU_NO_OFFSET
 
float Gr_save_full_center_resize_X
 
GLfloat GLfloat GLfloat GLfloat h
 
void vm_vec_scale_add(vec3d *dest, const vec3d *src1, const vec3d *src2, float k)
 
void(* gf_set_palette)(const ubyte *new_pal, int restrict_alphacolor)
 
#define SDR_FLAG_MODEL_CLIP
 
float Gr_save_menu_offset_Y
 
void gr_unset_cursor_bitmap(int n)
 
int gr_get_resolution_class(int width, int height)
 
bitmap_2d_list screen_rect
 
#define gr_set_clear_color
 
#define GR_NUM_RESOLUTIONS
 
#define SDR_FLAG_MODEL_DIFFUSE_MAP
 
void gr_init_alphacolor(color *clr, int r, int g, int b, int alpha, int type)
 
GLint GLint GLsizei GLsizei GLsizei depth
 
int g3_draw_2d_poly_bitmap_rect_list(bitmap_rect_list *b_list, int n_bm, uint additional_tmap_flags)
 
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle. 
 
struct vec3d::@225::@227 xyz
 
DCF(clear_color,"set clear color r, g, b")
 
void gr_set_palette_internal(const char *name, ubyte *palette, int restrict_font_to_128)
 
void gr_pline_special(SCP_vector< vec3d > *pts, int thickness, int resize_mode)
 
void gr_pline_helper(vec3d *out, vec3d *in1, vec3d *in2, int thickness)
 
void gr_set_screen_scale(int w, int h, int zoom_w, int zoom_h, int max_w, int max_h, int center_w, int center_h, bool force_stretch)
 
#define SDR_FLAG_MODEL_DEFERRED
 
const char * os_config_read_string(const char *section, const char *name, const char *default_value)
 
void gr_set_color_fast(color *dst)
 
void gr_opengl_activate(int active)
 
void profile_begin(const char *name)
 
GLenum GLenum GLenum GLenum GLenum scale
 
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
 
GLfloat GLfloat GLfloat v2
 
#define GR_RESIZE_FULL_CENTER
 
poly_list & operator=(poly_list &)
 
#define SDR_FLAG_MODEL_LIGHT
 
color_gun * Gr_current_green
 
void g3_draw_2d_rect(int x, int y, int w, int h, int r, int g, int b, int a)
 
void bm_init()
Initilizes the bitmap manager. 
 
#define SDR_FLAG_MODEL_FOG
 
script_state Script_system("FS2_Open Scripting")
 
#define TMAP_ANIMATED_SHADER
 
void os_set_title(const char *title)
 
int bm_load_animation(const char *real_filename, int *nframes, int *fps, int *keyframe, int can_drop_frames, int dir_type)
Loads a bitmap sequance so we can draw with it. 
 
#define SDR_FLAG_MODEL_MISC_MAP
 
void gr_set_color(int r, int g, int b)
 
void opengl_setup_viewport()
 
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
 
const float Default_min_draw_distance
 
#define SDR_FLAG_MODEL_SPEC_MAP
 
GLdouble GLdouble GLdouble r
 
void vm_vec_scale(vec3d *dest, float s)
 
#define TMAP_FLAG_GOURAUD
 
void gr_get_color(int *r, int *g, int *b)
 
GLboolean GLboolean GLboolean GLboolean a
 
#define SDR_FLAG_MODEL_SHADOW_MAP
 
float Gr_save_menu_zoomed_offset_X
 
int cf_exists_full(const char *filename, int dir_type)
 
void gr_shade(int x, int y, int w, int h, int resize_mode)
 
color_gun * Gr_current_red
 
void gr_shield_icon(coord2d coords[6], int resize_mode)
 
void gr_opengl_cleanup(int minimize)
 
void win32_create_window(int width, int height)
 
#define SDR_FLAG_MODEL_NORMAL_MAP
 
int find_index(poly_list *plist, int idx)
 
#define GR_1024_THRESHOLD_WIDTH
 
color_gun * Gr_current_blue
 
void make_index_buffer(SCP_vector< int > &vertex_list)
 
int find_index_fast(poly_list *plist, int idx)
 
float vm_vec_normalize_safe(vec3d *v)
 
#define TMAP_FLAG_INTERFACE
 
void vm_vec_scale_sub(vec3d *dest, const vec3d *src1, const vec3d *src2, float k)
 
char * Cmdline_center_res
 
void gr_set_palette(const char *name, ubyte *palette, int restrict_font_to_128)
 
int save_max_w_unscaled_zoomed
 
void dc_stuff_ubyte(ubyte *i)
Stuffs an unsigned byte to the given variable. Supports binary (0b), hexadecimal (0x), and octal (0o) formats. 
 
int Cmdline_shadow_quality
 
GLint GLint GLint GLint GLint x
 
void palette_update(const char *name_with_extension, int restrict_font_to_128)
 
void vm_vec_copy_scale(vec3d *dest, const vec3d *src, float s)
 
int gr_get_cursor_bitmap()
 
void _cdecl void void _cdecl Error(const char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
 
#define SDR_FLAG_MODEL_TEAMCOLOR
 
float Gr_save_full_center_resize_Y
 
float Gr_save_menu_offset_X
 
GLuint const GLchar * name
 
#define SDR_FLAG_MODEL_GLOW_MAP
 
int RunCondition(int condition, char format='\0', void *data=NULL, class object *objp=NULL, int more_data=0)
 
int max_w_unscaled_zoomed
 
int RunBytecode(script_hook &hd, char format='\0', void *data=NULL)
 
void vm_vec_sub(vec3d *dest, const vec3d *src0, const vec3d *src1)
 
void gr_activate(int active)
 
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later. 
 
GLboolean GLboolean GLboolean b
 
#define SDR_FLAG_MODEL_ENV_MAP
 
bool gr_resize_screen_pos(int *x, int *y, int *w, int *h, int resize_mode)
 
void profile_end(const char *name)
 
void gr_set_cursor_bitmap(int n, int lock)
 
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
 
char Gr_current_palette_name[128]
 
int vm_vec_same(const vec3d *v1, const vec3d *v2)
 
void CAP(T &v, T mn, T mx)
 
#define GR_1024_THRESHOLD_HEIGHT
 
GLint GLsizei GLsizei height
 
GLubyte GLubyte GLubyte GLubyte w
 
#define SDR_FLAG_MODEL_HEIGHT_MAP
 
const char * Resolution_prefixes[GR_NUM_RESOLUTIONS]
 
void gr_bitmap_list(bitmap_2d_list *list, int n_bm, int resize_mode)
 
bool quit_mission_popup_shown
 
ubyte Gr_original_palette[768]
 
color_gun * Gr_current_alpha
 
#define SDR_FLAG_MODEL_SHADOWS
 
An overhauled/updated debug console to allow monitoring, testing, and general debugging of new featur...
 
void gr_reset_screen_scale()
 
#define TMAP_FLAG_TEXTURED
 
float Gr_save_full_resize_Y
 
uint gr_determine_model_shader_flags(bool lighting, bool fog, bool textured, bool in_shadow_map, bool thruster_scale, bool transform, bool team_color_set, int tmap_flags, int spec_map, int glow_map, int normal_map, int height_map, int env_map, int misc_map)
 
void g3_draw_2d_shield_icon(const coord2d coords[6], const int r, const int g, const int b, const int a)
 
script_hook Script_globalhook
 
bool gr_unsize_screen_pos(int *x, int *y, int *w, int *h, int resize_mode)
 
const float Default_max_draw_distance
 
void gr_bitmap_uv(int _x, int _y, int _w, int _h, float _u0, float _v0, float _u1, float _v1, int resize_mode)
 
int current_alphablend_mode
 
float vm_vec_dot(const vec3d *v0, const vec3d *v1)
 
void gr_screen_resize(int width, int height)
 
void gr_bitmap(int _x, int _y, int resize_mode)
 
#define SDR_FLAG_MODEL_ANIMATED
 
void gr_create_shader(shader *shade, ubyte r, ubyte g, ubyte b, ubyte c)
 
bool gr_unsize_screen_posf(float *x, float *y, float *w, float *h, int resize_mode)
 
int bm_unload(int handle, int clear_render_targets, bool nodebug)
Unloads a bitmap's data, but not the bitmap info. 
 
int g3_draw_2d_poly_bitmap_list(bitmap_2d_list *b_list, int n_bm, uint additional_tmap_flags)
 
vec3d * vm_vec_cross(vec3d *dest, const vec3d *src0, const vec3d *src1)
 
int save_max_h_unscaled_zoomed
 
#define SDR_FLAG_MODEL_TRANSFORM
 
GLclampf GLclampf GLclampf alpha
 
void gr_set_shader(shader *shade)
 
#define SDR_FLAG_MODEL_THRUSTER
 
void vm_vec_add(vec3d *dest, const vec3d *src0, const vec3d *src1)
 
void gr_init_color(color *c, int r, int g, int b)
 
ubyte Gr_current_palette[768]
 
int max_h_unscaled_zoomed
 
int g3_draw_poly_constant_sw(int nv, vertex **pointlist, uint tmap_flags, float constant_sw)
 
#define g3_start_frame(zbuffer_flag)
 
float vm_vec_normalize(vec3d *v)
 
float Gr_save_menu_zoomed_offset_Y
 
#define GR_RESIZE_MENU_ZOOMED