mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
dead code
This commit is contained in:
parent
201d4add62
commit
41a04aedd2
1
lib/3d.h
1
lib/3d.h
@ -430,7 +430,6 @@ void g3_DrawSpecialLine(g3Point *p0, g3Point *p1);
|
||||
// Draws a bitmap on a specific plane. Also does rotation. Angle of rotation is passed as 'rot_angle'
|
||||
void g3_DrawPlanarRotatedBitmap(vector *pos, vector *norm, angle rot_angle, float width, float height, int bm);
|
||||
|
||||
void g3_TransformVert(float res[4], float pt[4], float a[4][4]);
|
||||
void g3_TransformMult(float res[4][4], float a[4][4], float b[4][4]);
|
||||
void g3_TransformTrans(float res[4][4], float t[4][4]);
|
||||
void g3_GetModelViewMatrix(const vector *viewPos, const matrix *viewMatrix, float *mvMat);
|
||||
|
@ -307,13 +307,6 @@ class oeApplication;
|
||||
|
||||
#define TEXTURE_WIDTH 128
|
||||
#define TEXTURE_HEIGHT 128
|
||||
#define TEXTURE_BPP 2
|
||||
|
||||
#define FLAT_SHADE_COLOR 0x7C01
|
||||
// If an incoming texture has the above color in it, change that color to this color
|
||||
#define REPLACEMENT_COLOR 0x07C0
|
||||
|
||||
extern int Triangles_drawn;
|
||||
|
||||
// Is this hardware or software rendered?
|
||||
enum renderer_type {
|
||||
@ -327,29 +320,16 @@ extern renderer_type Renderer_type;
|
||||
|
||||
// renderer clear flags
|
||||
#define RF_CLEAR_ZBUFFER 1
|
||||
#define RF_CLEAR_COLOR 2
|
||||
|
||||
// Overlay texture settings
|
||||
#define OT_NONE 0 // No overlay
|
||||
#define OT_BLEND 1 // Draw a lightmap texture afterwards
|
||||
#define OT_REPLACE 2 // Draw a tmap2 style texture afterwards
|
||||
#define OT_FLAT_BLEND 3 // Draw a gouraud shaded polygon afterwards
|
||||
#define OT_BLEND_VERTEX 4 // Like OT_BLEND, but take constant alpha into account
|
||||
#define OT_BUMPMAP 5 // Draw a saturated bumpmap afterwards
|
||||
#define OT_BLEND_SATURATE 6 // Add a lightmap in
|
||||
|
||||
extern uint8_t Overlay_type;
|
||||
extern int Overlay_map;
|
||||
extern int Bumpmap_ready, Bump_map;
|
||||
extern float Z_bias;
|
||||
extern bool UseHardware;
|
||||
extern bool StateLimited;
|
||||
extern bool NoLightmaps;
|
||||
extern bool UseMultitexture;
|
||||
extern bool UseWBuffer;
|
||||
extern bool UseMipmap; // DAJ
|
||||
extern bool ATIRagePro; // DAJ
|
||||
extern bool Formac; // DAJ
|
||||
|
||||
class NewBitmap;
|
||||
|
||||
@ -361,8 +341,6 @@ void rend_SetRendererType(renderer_type state);
|
||||
|
||||
#define MAP_TYPE_BITMAP 0
|
||||
#define MAP_TYPE_LIGHTMAP 1
|
||||
#define MAP_TYPE_BUMPMAP 2
|
||||
#define MAP_TYPE_UNKNOWN 3
|
||||
|
||||
// lighting state
|
||||
enum light_state {
|
||||
@ -406,19 +384,12 @@ enum texture_type {
|
||||
#define AT_CONSTANT_TEXTURE_VERTEX 7 // Use all three (texture constant vertex)
|
||||
#define AT_LIGHTMAP_BLEND 8 // dest*src colors
|
||||
#define AT_SATURATE_TEXTURE 9 // Saturate up to white when blending
|
||||
#define AT_FLAT_BLEND 10 // Like lightmap blend, but uses gouraud shaded flat polygon
|
||||
#define AT_ANTIALIAS 11 // Draws an antialiased polygon
|
||||
#define AT_SATURATE_VERTEX 12 // Saturation with vertices
|
||||
#define AT_SATURATE_CONSTANT_VERTEX 13 // Constant*vertex saturation
|
||||
#define AT_SATURATE_TEXTURE_VERTEX 14 // Texture * vertex saturation
|
||||
#define AT_LIGHTMAP_BLEND_VERTEX 15 // Like AT_LIGHTMAP_BLEND, but take vertex alpha into account
|
||||
#define AT_LIGHTMAP_BLEND_CONSTANT 16 // Like AT_LIGHTMAP_BLEND, but take constant alpha into account
|
||||
#define AT_SPECULAR 32
|
||||
#define AT_LIGHTMAP_BLEND_SATURATE 33 // Light lightmap blend, but add instead of multiply
|
||||
|
||||
#define LFB_LOCK_READ 0
|
||||
#define LFB_LOCK_WRITE 1
|
||||
|
||||
enum wrap_type {
|
||||
WT_WRAP, // Texture repeats
|
||||
WT_CLAMP, // Texture clamps
|
||||
@ -431,7 +402,6 @@ struct rendering_state {
|
||||
int8_t cur_bilinear_state;
|
||||
int8_t cur_zbuffer_state;
|
||||
int8_t cur_fog_state;
|
||||
int8_t cur_mip_state;
|
||||
|
||||
texture_type cur_texture_type;
|
||||
color_model cur_color_model;
|
||||
@ -442,7 +412,6 @@ struct rendering_state {
|
||||
|
||||
float cur_fog_start, cur_fog_end;
|
||||
float cur_near_z, cur_far_z;
|
||||
float gamma_value;
|
||||
|
||||
int cur_alpha;
|
||||
ddgr_color cur_color;
|
||||
@ -467,7 +436,6 @@ struct renderer_preferred_state {
|
||||
struct renderer_lfb {
|
||||
int type;
|
||||
uint16_t *data;
|
||||
int bytes_per_row;
|
||||
};
|
||||
|
||||
struct tRendererStats {
|
||||
@ -641,9 +609,6 @@ int rend_InitOpenGLWindow(oeApplication *app, renderer_preferred_state *pref_sta
|
||||
// Shuts down OpenGL in a window
|
||||
void rend_CloseOpenGLWindow();
|
||||
|
||||
// Sets the state of the OpenGLWindow to on or off
|
||||
void rend_SetOpenGLWindowState(int state, oeApplication *app, renderer_preferred_state *pref_state);
|
||||
|
||||
// Sets the hardware bias level for coplanar polygons
|
||||
// This helps reduce z buffer artifaces
|
||||
void rend_SetCoplanarPolygonOffset(float factor);
|
||||
|
@ -574,39 +574,6 @@ void rend_DrawPolygon3D(int handle, g3Point **p, int nv, int map_type) {
|
||||
// all points should be original
|
||||
ASSERT(pnt->p3_flags & PF_ORIGPOINT);
|
||||
|
||||
////////////////////////////////////////////
|
||||
if (pnt->p3_flags & PF_ORIGPOINT) {
|
||||
if (!(pnt->p3_flags & PF_PROJECTED)) {
|
||||
g3_ProjectPoint(pnt);
|
||||
}
|
||||
|
||||
// get the original point
|
||||
float origPoint[4];
|
||||
origPoint[0] = pnt->p3_vecPreRot.x;
|
||||
origPoint[1] = pnt->p3_vecPreRot.y;
|
||||
origPoint[2] = pnt->p3_vecPreRot.z;
|
||||
origPoint[3] = 1.0f;
|
||||
|
||||
// transform by the full transform
|
||||
float view[4];
|
||||
g3_TransformVert(view, origPoint, gTransformFull);
|
||||
|
||||
vector tempv = pnt->p3_vecPreRot - View_position;
|
||||
vector testPt = tempv * Unscaled_matrix;
|
||||
|
||||
float screenX = pnt->p3_sx + gpu_state.clip_x1;
|
||||
float screenY = pnt->p3_sy + gpu_state.clip_y1;
|
||||
|
||||
// normalize
|
||||
float oOW = 1.0f / view[3];
|
||||
view[0] *= oOW;
|
||||
view[1] *= oOW;
|
||||
view[2] *= oOW;
|
||||
|
||||
oOW *= 1.0f;
|
||||
}
|
||||
////////////////////////////////////////////
|
||||
|
||||
if (gpu_state.cur_alpha_type & ATF_VERTEX) {
|
||||
alpha = pnt->p3_a * gpu_Alpha_multiplier * gpu_Alpha_factor;
|
||||
}
|
||||
|
@ -47,13 +47,6 @@ void g3_GetModelViewMatrix(const vector *viewPos, const matrix *viewMatrix, floa
|
||||
mvMat[15] = 1.0f;
|
||||
}
|
||||
|
||||
void g3_TransformVert(float res[4], float pt[4], float a[4][4]) {
|
||||
int y;
|
||||
for (y = 0; y < 4; ++y) {
|
||||
res[y] = (pt[0] * a[0][y]) + (pt[1] * a[1][y]) + (pt[2] * a[2][y]) + (pt[3] * a[3][y]);
|
||||
}
|
||||
}
|
||||
|
||||
void g3_TransformMult(float res[4][4], float a[4][4], float b[4][4]) {
|
||||
float temp[4][4];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user