mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Remove unused texture.h
This commit is contained in:
parent
220108f650
commit
fc209ddba4
@ -93,7 +93,6 @@
|
||||
#include "lib2d.h"
|
||||
#include "pserror.h"
|
||||
#include "renderer.h"
|
||||
#include "texture.h"
|
||||
|
||||
static inline unsigned XLAT_RGB_TO_16(ddgr_color c) {
|
||||
uint8_t r, g, b;
|
||||
|
@ -272,7 +272,6 @@
|
||||
#include "bitmap.h"
|
||||
#include "pserror.h"
|
||||
#include "vclip.h"
|
||||
#include "texture.h"
|
||||
#include "game.h"
|
||||
#include "bumpmap.h"
|
||||
#include <stdlib.h>
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
|
||||
#include "3d.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "lighting.h"
|
||||
#include "lightmap.h"
|
||||
|
@ -37,15 +37,9 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "pstypes.h"
|
||||
#include "pserror.h"
|
||||
#include "terrain.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "megacell.h"
|
||||
#include "bitmap.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -47,9 +47,7 @@
|
||||
#include "bitmap.h"
|
||||
#include "gr.h"
|
||||
#include "gametexture.h"
|
||||
#include "vclip.h"
|
||||
#include "game.h"
|
||||
#include "texture.h"
|
||||
#include "mem.h"
|
||||
#include "ddio.h"
|
||||
#include "config.h"
|
||||
|
@ -31,13 +31,9 @@
|
||||
#include "render.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "descent.h"
|
||||
#include "3d.h"
|
||||
#include "mono.h"
|
||||
#include "gametexture.h"
|
||||
#include "texture.h"
|
||||
#include "vclip.h"
|
||||
#include "program.h"
|
||||
#include "game.h"
|
||||
#include "renderobject.h"
|
||||
#include "door.h"
|
||||
@ -54,14 +50,12 @@
|
||||
#include "scorch.h"
|
||||
#include "findintersection.h"
|
||||
#include "special_face.h"
|
||||
#include "BOA.h"
|
||||
#include "config.h"
|
||||
#include "gameloop.h"
|
||||
#include "doorway.h"
|
||||
#include "TelComAutoMap.h"
|
||||
#include "postrender.h"
|
||||
#include "mem.h"
|
||||
#include "Macros.h"
|
||||
#include "psrand.h"
|
||||
#include "player.h"
|
||||
#include "args.h"
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "mono.h"
|
||||
#include "terrain.h"
|
||||
#include "pserror.h"
|
||||
#include "texture.h"
|
||||
#include "bitmap.h"
|
||||
#include "gametexture.h"
|
||||
#include "lighting.h"
|
||||
@ -34,7 +33,6 @@
|
||||
#include "weather.h"
|
||||
#include <string.h>
|
||||
#include "mem.h"
|
||||
#include "Macros.h"
|
||||
#include "dedicated_server.h"
|
||||
#include "psrand.h"
|
||||
#ifdef EDITOR
|
||||
|
@ -801,7 +801,6 @@ void RenderMine(int viewer_roomnum, int flag_automap, int called_from_terrain, b
|
||||
#include "descent.h"
|
||||
#include "render.h"
|
||||
#include "game.h"
|
||||
#include "texture.h"
|
||||
#include "ddio.h"
|
||||
#include "polymodel.h"
|
||||
#include "lighting.h"
|
||||
@ -815,12 +814,10 @@ void RenderMine(int viewer_roomnum, int flag_automap, int called_from_terrain, b
|
||||
#include "editor\d3edit.h"
|
||||
#endif
|
||||
#include "fireball.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "config.h"
|
||||
#include "gameloop.h"
|
||||
#include "postrender.h"
|
||||
#include "Macros.h"
|
||||
#include "psrand.h"
|
||||
#include "player.h"
|
||||
|
||||
|
@ -305,9 +305,7 @@
|
||||
#include <filesystem>
|
||||
|
||||
#include "cfile.h"
|
||||
#include "texture.h"
|
||||
#include "bitmap.h"
|
||||
#include "pstypes.h"
|
||||
#include "pserror.h"
|
||||
#include "mono.h"
|
||||
#include "iff.h"
|
||||
@ -316,6 +314,7 @@
|
||||
#include "bumpmap.h"
|
||||
#include "mem.h"
|
||||
#include "psrand.h"
|
||||
#include "grdefs.h"
|
||||
|
||||
#define BM_FILETYPE_TGA 1
|
||||
#define BM_FILETYPE_PCX 2
|
||||
|
@ -138,7 +138,6 @@
|
||||
#include "bitmap.h"
|
||||
#include "mono.h"
|
||||
#include "grdefs.h"
|
||||
#include "texture.h"
|
||||
#include "byteswap.h"
|
||||
#include <string.h>
|
||||
#include "mem.h"
|
||||
|
@ -807,7 +807,7 @@
|
||||
|
||||
// D3 EDITOR HEADERS
|
||||
#include "pserror.h"
|
||||
#include "Application.h"
|
||||
#include "application.h"
|
||||
#include "AppDatabase.h"
|
||||
#include "program.h"
|
||||
#include "gr.h"
|
||||
@ -831,7 +831,6 @@
|
||||
#include "objinfo.h"
|
||||
#include "HFile.h"
|
||||
#include "hroom.h"
|
||||
#include "texture.h"
|
||||
#include "read3ds.h"
|
||||
#include "terrain.h"
|
||||
#include "HObject.h"
|
||||
@ -843,6 +842,7 @@
|
||||
#include "ViewerPropDlg.h"
|
||||
#include "mem.h"
|
||||
#include "findintersection.h"
|
||||
#include "renderer.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
|
@ -29,8 +29,7 @@
|
||||
#include "pserror.h"
|
||||
#include "mono.h"
|
||||
#include "vclip.h"
|
||||
#include "macros.h"
|
||||
#include "texture.h"
|
||||
#include "Macros.h"
|
||||
#include "EditLineDialog.h"
|
||||
#include "ddio.h"
|
||||
#include "game.h"
|
||||
|
@ -219,7 +219,6 @@
|
||||
#include "terrain.h"
|
||||
#include "gametexture.h"
|
||||
#include "bitmap.h"
|
||||
#include "texture.h"
|
||||
#include "group.h"
|
||||
#include "editor/d3edit.h"
|
||||
#include "room.h"
|
||||
|
@ -155,7 +155,6 @@
|
||||
#include "TextureDialog.h"
|
||||
|
||||
#include "HTexture.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "gr.h"
|
||||
#include "descent.h"
|
||||
|
@ -190,14 +190,11 @@
|
||||
#include "moveworld.h"
|
||||
#include "selectedroom.h"
|
||||
#include "terrain.h"
|
||||
#include "texture.h"
|
||||
#include "bitmap.h"
|
||||
#include "erooms.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include "gr.h"
|
||||
#include "mono.h"
|
||||
#include "macros.h"
|
||||
#include "ddio.h"
|
||||
#include "SelManager.h"
|
||||
#include "room.h"
|
||||
@ -623,7 +620,6 @@ void CWireframeGrWnd::SetMagCoords(int x1, int y1, int x2, int y2) {
|
||||
void CWireframeGrWnd::DrawTerrainCell(int seg) {
|
||||
grSurface *cur_surf;
|
||||
uint16_t *destptr;
|
||||
int lightval;
|
||||
int i, t, x, y;
|
||||
int segx = seg % TERRAIN_WIDTH;
|
||||
int segz = seg / TERRAIN_WIDTH;
|
||||
@ -652,12 +648,8 @@ void CWireframeGrWnd::DrawTerrainCell(int seg) {
|
||||
uint16_t fadepixel = 0;
|
||||
|
||||
int bm_handle = GameTextures[Terrain_tex_seg[Terrain_seg[(y * TERRAIN_WIDTH + x)].texseg_index].tex_index].bm_handle;
|
||||
lightval = Ubyte_to_float[Terrain_seg[y * TERRAIN_WIDTH + x].l] * (MAX_TEXTURE_SHADES - 1);
|
||||
|
||||
uint16_t pix;
|
||||
|
||||
pix = *bm_data(bm_handle, 0);
|
||||
// fadepixel=(TexShadeTable16[lightval][pix>>8])+TexShadeTable8[lightval][pix & 0xFF];
|
||||
uint16_t pix = *bm_data(bm_handle, 0);
|
||||
|
||||
if (TerrainSelected[y * TERRAIN_WIDTH + x]) {
|
||||
int red = ((fadepixel >> 10) & 0x1f) << 3;
|
||||
|
@ -249,8 +249,7 @@
|
||||
#include "pserror.h"
|
||||
#include "mono.h"
|
||||
#include "vclip.h"
|
||||
#include "macros.h"
|
||||
#include "texture.h"
|
||||
#include "Macros.h"
|
||||
#include "EditLineDialog.h"
|
||||
#include "ddio.h"
|
||||
#include "polymodel.h"
|
||||
|
@ -211,14 +211,12 @@
|
||||
|
||||
#include "descent.h"
|
||||
#include "d3edit.h"
|
||||
#include "render.h"
|
||||
#include "selectedroom.h"
|
||||
#include "terrain.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "object.h"
|
||||
#include "erooms.h"
|
||||
#include "group.h"
|
||||
#include "renderer.h"
|
||||
|
||||
int Draw_all_rooms = 1;
|
||||
|
||||
|
@ -343,7 +343,6 @@
|
||||
#include "args.h"
|
||||
|
||||
#include "terrain.h"
|
||||
#include "texture.h"
|
||||
|
||||
#include "mem.h"
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <algorithm>
|
||||
#include <windows.h>
|
||||
#include "3d.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "erooms.h"
|
||||
#include "editor_lighting.h"
|
||||
|
@ -19,21 +19,14 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "3d.h"
|
||||
#include "texture.h"
|
||||
#include "gametexture.h"
|
||||
#include "erooms.h"
|
||||
#include "editor_lighting.h"
|
||||
#include "descent.h"
|
||||
#include "room.h"
|
||||
#include "lightmap.h"
|
||||
#include "polymodel.h"
|
||||
#include "objinfo.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "terrain.h"
|
||||
#include "radiosity.h"
|
||||
#include "lighting.h"
|
||||
#include "findintersection.h"
|
||||
#include "lightmap_info.h"
|
||||
#include "object_lighting.h"
|
||||
#include "mem.h"
|
||||
|
233
lib/texture.h
233
lib/texture.h
@ -1,233 +0,0 @@
|
||||
/*
|
||||
* Descent 3
|
||||
* Copyright (C) 2024 Parallax Software
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
--- HISTORICAL COMMENTS FOLLOW ---
|
||||
|
||||
* $Logfile: /DescentIII/Main/lib/texture.h $
|
||||
* $Revision: 9 $
|
||||
* $Date: 5/05/98 3:02p $
|
||||
* $Author: Jason $
|
||||
*
|
||||
* Header for texture mapper library
|
||||
*
|
||||
* $Log: /DescentIII/Main/lib/texture.h $
|
||||
*
|
||||
* 9 5/05/98 3:02p Jason
|
||||
* attempting to add different screen resolutions
|
||||
*
|
||||
* 8 1/14/98 5:49p Jeff
|
||||
* tex_LFBLock stuff added (samir.)
|
||||
*
|
||||
* 7 12/22/97 7:32p Samir
|
||||
* Took out include to gr.h
|
||||
*
|
||||
* 6 12/19/97 5:22p Samir
|
||||
* Added more drawing primatives for software.
|
||||
*
|
||||
* 5 12/19/97 12:20p Jason
|
||||
* changes for better 2d/3d system integration
|
||||
*
|
||||
* 4 10/15/97 5:20p Jason
|
||||
* did a HUGE overhaul of the bitmap system
|
||||
*
|
||||
* 3 9/16/97 4:09p Jason
|
||||
* implemented software zbuffer
|
||||
*
|
||||
* 2 9/09/97 12:34p Jason
|
||||
* made software transparency work correctly with new alpha type
|
||||
*
|
||||
* 2 6/24/97 7:45p Matt
|
||||
* Removed include of manage.h
|
||||
*
|
||||
* 1 6/23/97 9:25p Samir
|
||||
* added because source safe sucks
|
||||
*
|
||||
* 40 5/22/97 11:59a Jason
|
||||
* add a ScaleBitmap function to the abstracted render library
|
||||
*
|
||||
* 39 5/19/97 5:10p Jason
|
||||
* changes for our new abstracted renderer code
|
||||
*
|
||||
* 38 5/12/97 11:41a Jason
|
||||
* made game work (default) to 16bit no mip maps mode
|
||||
* Saves us alot of memory
|
||||
*
|
||||
* 37 5/01/97 4:37p Jason
|
||||
* added alpha blending (slow)
|
||||
*
|
||||
* 36 4/30/97 3:15p Jason
|
||||
* changes to support both 8bit and 16bit rendering in software
|
||||
*
|
||||
* 35 4/11/97 4:20p Jason
|
||||
* implemented a general fog system
|
||||
*
|
||||
* 34 3/25/97 2:33p Jason
|
||||
* added Software_renderer byte
|
||||
*
|
||||
* 33 3/20/97 11:54a Jason
|
||||
* changes to support special triangle drawer
|
||||
*
|
||||
* 32 3/14/97 4:33p Jason
|
||||
* added tex_SetMipState function
|
||||
*
|
||||
* 31 3/13/97 6:19p Jason
|
||||
* implemented tex_GetRenderType function
|
||||
*
|
||||
* 30 2/26/97 6:00p Matt
|
||||
* Renamed 3d lib structs for D3 naming convention
|
||||
*
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#ifndef TEXTURE_H
|
||||
#define TEXTURE_H
|
||||
|
||||
#include "3d.h"
|
||||
#include "pstypes.h"
|
||||
#include "renderer.h"
|
||||
|
||||
#define MAX_TEXTURE_SHADES 32
|
||||
|
||||
struct texs_texpoint {
|
||||
int screenx, screeny;
|
||||
float flscreenx, flscreeny;
|
||||
|
||||
fix ucoord, vcoord;
|
||||
float flucoord, flvcoord, flzcoord;
|
||||
|
||||
fix monolight;
|
||||
fix redlight, greenlight, bluelight;
|
||||
};
|
||||
|
||||
// For the following enum table: LIN=Linear, PER=Perspective, NON=No Transparency, LIT = Shaded,
|
||||
// COLORED=Colored lighting, TRANS=Transparency
|
||||
// ALPHA=Alpha renderer
|
||||
|
||||
#define MAX_RENDER_TYPES 15
|
||||
|
||||
extern void (*Texture_functions[])(g3Point *, int);
|
||||
|
||||
// Our shade tables
|
||||
extern uint8_t TexShadeTable8[MAX_TEXTURE_SHADES][256];
|
||||
extern uint32_t TexShadeTable16[MAX_TEXTURE_SHADES][256];
|
||||
extern uint8_t TexRevShadeTable8[MAX_TEXTURE_SHADES][256];
|
||||
extern uint32_t TexRevShadeTable16[MAX_TEXTURE_SHADES][256];
|
||||
|
||||
int tex_Init();
|
||||
|
||||
// These are the different routines for drawing the various types of effects on a texture
|
||||
void tex_PerUnlitTexturedQuad(g3Point *, int);
|
||||
void tex_PerLitTexturedQuad(g3Point *, int);
|
||||
void tex_UnlitTexturedQuad(g3Point *, int);
|
||||
void tex_LitTexturedQuad(g3Point *, int);
|
||||
void tex_ColoredTexturedQuad(g3Point *, int);
|
||||
void tex_PerColoredTexturedQuad(g3Point *, int);
|
||||
void tex_UnlitTransQuad(g3Point *, int);
|
||||
void tex_LitTransQuad(g3Point *, int);
|
||||
void tex_PerUnlitTransQuad(g3Point *, int);
|
||||
void tex_PerLitTransQuad(g3Point *, int);
|
||||
void tex_LinFlatShade(g3Point *, int);
|
||||
void tex_PerFlatShade(g3Point *, int);
|
||||
void tex_LitTexturedTriangle(g3Point *, int);
|
||||
void tex_FlatPolyTriangle(g3Point *, int);
|
||||
void tex_SetFlatColor(ddgr_color color);
|
||||
void tex_UnlitTexturedQuad16(g3Point *p, int nv);
|
||||
void tex_LitTexturedQuad16(g3Point *p, int nv);
|
||||
void tex_PerUnlitTexturedQuad16(g3Point *p, int nv);
|
||||
void tex_PerLitTexturedQuad16(g3Point *p, int nv);
|
||||
void tex_LitTexturedTriangle16(g3Point *p, int nv);
|
||||
void tex_LinFlatShade16(g3Point *p, int nv);
|
||||
void tex_PerFlatShade16(g3Point *p, int nv);
|
||||
void tex_AlphaTexturedQuad(g3Point *p, int nv);
|
||||
|
||||
// These functions get the extremes of a polygon
|
||||
void tex_GetVertexOrdering(texs_texpoint *t, int nv, int *vlt, int *vlb, int *vrt, int *vrb, int *bottom_y_ind);
|
||||
int tex_PrevIndex(int val, int modulus);
|
||||
int tex_NextIndex(int val, int modulus);
|
||||
|
||||
// Builds the 1/n table
|
||||
void tex_BuildRecipTable();
|
||||
|
||||
// Draws a solid color polygon. "color" is a color in 5-6-5 format.
|
||||
void tex_DrawFlatPolygon(g3Point **pv, int nv);
|
||||
|
||||
// Given a handle to a texture and nv point vertices, does a fan algorithm to draw them all
|
||||
// Uses the function set by tex_SetRenderType
|
||||
void tex_DrawPointList(int handle, g3Point **p, int nv);
|
||||
|
||||
// Tells the software renderer whether or not to use mipping
|
||||
void tex_SetMipState(int);
|
||||
|
||||
// Sets the fog state to TRUE or FALSE
|
||||
void tex_SetFogState(int on);
|
||||
|
||||
// Sets the a lighting state for the software renderer
|
||||
void tex_SetLighting(light_state);
|
||||
|
||||
// Sets a color model (see renderer.h for valid models)
|
||||
void tex_SetColorModel(color_model);
|
||||
|
||||
// Sets a texturing type (see renderer.h)
|
||||
void tex_SetTextureType(texture_type);
|
||||
|
||||
// Sets the near and far plane of fog
|
||||
void tex_SetFogBorders(float fog_near, float fog_far);
|
||||
|
||||
// Sets the alpha type
|
||||
void tex_SetAlphaType(int8_t);
|
||||
|
||||
// ZBuffer variables
|
||||
void tex_SetZBufferState(int state);
|
||||
void tex_ClearZBuffer();
|
||||
void tex_StartFrame(int x1, int y1, int x2, int y2);
|
||||
void tex_EndFrame();
|
||||
|
||||
// Sets the software renderer to render to a particular place
|
||||
void tex_SetSoftwareParameters(float, int, int, int, uint8_t *);
|
||||
|
||||
// Fills in projection variables
|
||||
void tex_GetProjectionParameters(int *width, int *height);
|
||||
|
||||
// Returns the aspect ratio of the physical screen
|
||||
float tex_GetAspectRatio();
|
||||
|
||||
// software line renderer.
|
||||
void tex_DrawLine(int x1, int y1, int x2, int y2);
|
||||
|
||||
// fill rect supported.
|
||||
void tex_FillRect(ddgr_color color, int x1, int y1, int x2, int y2);
|
||||
|
||||
// set pixel
|
||||
void tex_SetPixel(ddgr_color color, int x, int y);
|
||||
|
||||
// get pixel
|
||||
ddgr_color tex_GetPixel(int x, int y);
|
||||
|
||||
// fillcircle
|
||||
void tex_FillCircle(ddgr_color col, int x, int y, int r);
|
||||
|
||||
// draw circle
|
||||
void tex_DrawCircle(int x, int y, int r);
|
||||
|
||||
// lfb stuff
|
||||
void tex_GetLFBLock(renderer_lfb *lfb);
|
||||
|
||||
void tex_ReleaseLFBLock(renderer_lfb *lfb);
|
||||
|
||||
void tex_GetRenderState(rendering_state *rs);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user