FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "bmpman/bmpman.h"
#include "cmdline/cmdline.h"
#include "globalincs/alphacolors.h"
#include "graphics/grbatch.h"
#include "graphics/tmapper.h"
#include "io/key.h"
#include "physics/physics.h"
#include "render/3dinternal.h"
#include "graphics/2d.h"
Go to the source code of this file.
Classes | |
struct | horz_pt |
Macros | |
#define | TRIANGLE_AREA(_p, _q, _r) |
#define | MAX_ROD_VECS 100 |
#define | MAX_PERSPECTIVE_DIVISIONS 5 |
#define | uw(p) (*((uint *) (p))) |
#define | w(p) (*((int *) (p))) |
#define | wp(p) ((int *) (p)) |
#define | vp(p) ((vec3d *) (p)) |
#define | fl(p) (*((float *) (p))) |
#define | OP_EOF 0 |
#define | OP_DEFPOINTS 1 |
#define | OP_FLATPOLY 2 |
#define | OP_TMAPPOLY 3 |
#define | OP_SORTNORM 4 |
#define | OP_BOUNDBOX 5 |
Typedefs | |
typedef struct horz_pt | horz_pt |
Variables | |
vec3d | g3_square [4] |
float | p_phi = 10.0f |
float | p_theta = 10.0f |
vertex * | bitmap_2d_poly_list =NULL |
vertex ** | bitmap_2d_poly_vertlist =NULL |
int | bitmap_2d_poly_list_size =0 |
Definition at line 2063 of file 3ddraw.cpp.
#define MAX_PERSPECTIVE_DIVISIONS 5 |
Definition at line 1417 of file 3ddraw.cpp.
#define MAX_ROD_VECS 100 |
Definition at line 1334 of file 3ddraw.cpp.
#define OP_BOUNDBOX 5 |
Definition at line 2100 of file 3ddraw.cpp.
#define OP_DEFPOINTS 1 |
Definition at line 2096 of file 3ddraw.cpp.
#define OP_EOF 0 |
Definition at line 2095 of file 3ddraw.cpp.
#define OP_FLATPOLY 2 |
Definition at line 2097 of file 3ddraw.cpp.
#define OP_SORTNORM 4 |
Definition at line 2099 of file 3ddraw.cpp.
#define OP_TMAPPOLY 3 |
Definition at line 2098 of file 3ddraw.cpp.
#define TRIANGLE_AREA | ( | _p, | |
_q, | |||
_r | |||
) |
As a define only for readability.
Definition at line 938 of file 3ddraw.cpp.
Definition at line 2059 of file 3ddraw.cpp.
Definition at line 2062 of file 3ddraw.cpp.
Definition at line 2061 of file 3ddraw.cpp.
void bm_list_shutdown | ( | ) |
Definition at line 1789 of file 3ddraw.cpp.
Definition at line 166 of file 3ddraw.cpp.
Returns true if a plane is facing the viewer.
Takes the unrotated surface normal of the plane, and a point on it. The normal need not be normalized
Definition at line 155 of file 3ddraw.cpp.
Draw a 2d bitmap on a poly
Definition at line 1728 of file 3ddraw.cpp.
int g3_draw_2d_poly_bitmap_list | ( | bitmap_2d_list * | b_list, |
int | n_bm, | ||
uint | additional_tmap_flags | ||
) |
Definition at line 1794 of file 3ddraw.cpp.
int g3_draw_2d_poly_bitmap_rect_list | ( | bitmap_rect_list * | b_list, |
int | n_bm, | ||
uint | additional_tmap_flags | ||
) |
Definition at line 1885 of file 3ddraw.cpp.
Draw a 2D rectangle
Definition at line 1651 of file 3ddraw.cpp.
void g3_draw_2d_shield_icon | ( | const coord2d | coords[6], |
const int | r, | ||
const int | g, | ||
const int | b, | ||
const int | a | ||
) |
Draw a 2D shield icon w/ 6 points
Definition at line 1551 of file 3ddraw.cpp.
Draws a bitmap with the specified 3d width & height
Set TMAP_FLAG_TEXTURED in the tmap_flags to texture map it with current texture.
If bitmap is not square, rad will be the 3d size of the smallest dimension. orient flips the bitmap in some way. Pass 0 for normal or else pass a random nuber between 0 and 7, inclusive.
Definition at line 649 of file 3ddraw.cpp.
Definition at line 521 of file 3ddraw.cpp.
int g3_draw_bitmap_3d_v | ( | vertex * | pnt, |
int | orient, | ||
float | rad, | ||
uint | tmap_flags, | ||
float | depth, | ||
float | c | ||
) |
Definition at line 587 of file 3ddraw.cpp.
int g3_draw_bitmap_3d_volume | ( | vertex * | pnt, |
int | orient, | ||
float | rad, | ||
uint | tmap_flags, | ||
float | depth, | ||
int | resolution | ||
) |
Definition at line 633 of file 3ddraw.cpp.
void g3_draw_horizon_line | ( | ) |
Draws a line representing the horizon
Definition at line 1168 of file 3ddraw.cpp.
Draw a line in HTL mode without having to go through the rotate/project stuff
Definition at line 1975 of file 3ddraw.cpp.
Draw a sphere mode without having to go through the rotate/project stuff
Definition at line 1984 of file 3ddraw.cpp.
Draws a line. takes two points. returns true if drew
Definition at line 112 of file 3ddraw.cpp.
int g3_draw_perspective_bitmap | ( | const angles * | a, |
float | scale_x, | ||
float | scale_y, | ||
int | div_x, | ||
int | div_y, | ||
uint | tmap_flags | ||
) |
Draw a perspective bitmap based on angles and radius
Definition at line 1434 of file 3ddraw.cpp.
Draw a polygon.
Set TMAP_FLAG_TEXTURED in the tmap_flags to texture map it with current texture.
Definition at line 207 of file 3ddraw.cpp.
Draw a polygon.
Same as g3_draw_poly, but it bashes sw to a constant value for all vertexes. Needs to be done after clipping to get them all.
Set TMAP_FLAG_TEXTURED in the tmap_flags to texture map it with current texture.
Definition at line 381 of file 3ddraw.cpp.
float g3_draw_poly_constant_sw_area | ( | int | nv, |
vertex ** | pointlist, | ||
uint | tmap_flags, | ||
float | constant_sw, | ||
float | area | ||
) |
Definition at line 971 of file 3ddraw.cpp.
int g3_draw_poly_if_facing | ( | int | nv, |
vertex ** | pointlist, | ||
uint | tmap_flags, | ||
const vec3d * | norm, | ||
const vec3d * | pnt | ||
) |
Like g3_draw_poly(), but checks to see if facing.
If surface normal is NULL, this routine must compute it, which will be slow. It is better to pre-compute the normal, and pass it to this function. When the normal is passed, this function works like g3_check_normal_facing() plus g3_draw_poly().
Set TMAP_FLAG_TEXTURED in the tmap_flags to texture map it with current texture.
Definition at line 194 of file 3ddraw.cpp.
int g3_draw_polygon | ( | const vec3d * | pos, |
const matrix * | ori, | ||
float | width, | ||
float | height, | ||
int | tmap_flags | ||
) |
Definition at line 310 of file 3ddraw.cpp.
int g3_draw_polygon | ( | const vec3d * | pos, |
const vec3d * | norm, | ||
float | width, | ||
float | height, | ||
int | tmap_flags | ||
) |
Definition at line 369 of file 3ddraw.cpp.
int g3_draw_rod | ( | const vec3d * | p0, |
float | width1, | ||
const vec3d * | p1, | ||
float | width2, | ||
vertex * | verts, | ||
uint | tmap_flags | ||
) |
Draws a polygon always facing the viewer. Compute the corners of a rod. fills in vertbuf. Verts has any needs uv's or l's or can be NULL if none needed.
Definition at line 1262 of file 3ddraw.cpp.
Definition at line 1335 of file 3ddraw.cpp.
int g3_draw_rotated_bitmap | ( | vertex * | pnt, |
float | angle, | ||
float | radius, | ||
uint | tmap_flags, | ||
float | depth = 0.0f |
||
) |
Draw a bitmap that is always facing, but rotates.
If bitmap is not square, rad will be the 3d size of the smallest dimension.
Definition at line 844 of file 3ddraw.cpp.
int g3_draw_rotated_bitmap_3d | ( | vertex * | pnt, |
float | angle, | ||
float | rad, | ||
uint | tmap_flags, | ||
float | depth | ||
) |
Definition at line 788 of file 3ddraw.cpp.
float g3_draw_rotated_bitmap_area | ( | vertex * | pnt, |
float | angle, | ||
float | rad, | ||
uint | tmap_flags, | ||
float | area | ||
) |
Definition at line 1069 of file 3ddraw.cpp.
Draw a sortof sphere - i.e., the 2d radius is proportional to the 3d radius, but not to the distance from the eye. Uses the current 2d color.
Definition at line 475 of file 3ddraw.cpp.
Same as g3_draw_sphere, but you pass a vector and this rotates and projects it and then call g3_draw_sphere.
Definition at line 498 of file 3ddraw.cpp.
int g3_get_bitmap_dims | ( | int | bitmap, |
vertex * | pos, | ||
float | radius, | ||
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h, | ||
int * | size | ||
) |
Get bitmap dims onscreen as if g3_draw_bitmap() had been called
Definition at line 740 of file 3ddraw.cpp.
Definition at line 953 of file 3ddraw.cpp.
Deal with a clipped line
Definition at line 71 of file 3ddraw.cpp.
Definition at line 1419 of file 3ddraw.cpp.
vertex* bitmap_2d_poly_list =NULL |
Definition at line 1785 of file 3ddraw.cpp.
int bitmap_2d_poly_list_size =0 |
Definition at line 1787 of file 3ddraw.cpp.
vertex** bitmap_2d_poly_vertlist =NULL |
Definition at line 1786 of file 3ddraw.cpp.
vec3d g3_square[4] |
Definition at line 1410 of file 3ddraw.cpp.
float p_phi = 10.0f |
Definition at line 1432 of file 3ddraw.cpp.
float p_theta = 10.0f |
Definition at line 1433 of file 3ddraw.cpp.