mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-27 03:30:50 +00:00
destroy hw_glide.h because no modern GPU supports such API
This commit is contained in:
parent
9451b10ac5
commit
76967e46bb
26 changed files with 130 additions and 504 deletions
|
@ -412,7 +412,6 @@ if(${SRB2_CONFIG_HWRENDER})
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_drv.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glide.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h
|
||||
|
|
20
src/Makefile
20
src/Makefile
|
@ -732,8 +732,8 @@ ifdef SDL
|
|||
ifdef MINGW
|
||||
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
|
||||
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
||||
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
|
@ -741,8 +741,8 @@ $(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
|
|||
else
|
||||
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
|
||||
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
||||
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
|
@ -895,8 +895,8 @@ ifndef SDL
|
|||
ifndef NOHW
|
||||
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
|
||||
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
||||
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
|
@ -904,8 +904,8 @@ $(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
|
|||
|
||||
$(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
|
||||
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
||||
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
|
@ -913,8 +913,8 @@ $(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \
|
|||
|
||||
$(OBJDIR)/r_minigl.o: hardware/r_minigl/r_minigl.c hardware/r_opengl/r_opengl.h \
|
||||
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
||||
command.h hardware/hw_data.h hardware/hw_glide.h hardware/hw_defs.h \
|
||||
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
|
||||
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
||||
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
||||
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
||||
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
||||
|
|
|
@ -25,10 +25,6 @@
|
|||
#include "../v_video.h"
|
||||
#include "../r_draw.h"
|
||||
|
||||
//Hurdler: 25/04/2000: used for new colormap code in hardware mode
|
||||
//static UINT8 *gr_colormap = NULL; // by default it must be NULL ! (because colormap tables are not initialized)
|
||||
boolean firetranslucent = false;
|
||||
|
||||
// Values set after a call to HWR_ResizeBlock()
|
||||
static INT32 blocksize, blockwidth, blockheight;
|
||||
|
||||
|
@ -133,11 +129,7 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
|
|||
count--;
|
||||
|
||||
texel = source[yfrac>>FRACBITS];
|
||||
|
||||
if (firetranslucent && (transtables[(texel<<8)+0x40000]!=texel))
|
||||
alpha = 0x80;
|
||||
else
|
||||
alpha = 0xff;
|
||||
alpha = 0xff;
|
||||
|
||||
//Hurdler: not perfect, but better than holes
|
||||
if (texel == HWR_PATCHES_CHROMAKEY_COLORINDEX && (mipmap->flags & TF_CHROMAKEYED))
|
||||
|
@ -175,16 +167,16 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
|
|||
}
|
||||
|
||||
|
||||
// resize the patch to be 3dfx compliant
|
||||
// resize the patch
|
||||
// set : blocksize = blockwidth * blockheight (no bpp used)
|
||||
// blockwidth
|
||||
// blockheight
|
||||
//note : 8bit (1 byte per pixel) palettized format
|
||||
static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
|
||||
GrTexInfo *grInfo)
|
||||
GLTexInfo *grInfo)
|
||||
{
|
||||
// Build the full textures from patches.
|
||||
static const GrLOD_t gr_lods[9] =
|
||||
static const GLlod_t gr_lods[9] =
|
||||
{
|
||||
GR_LOD_LOG2_256,
|
||||
GR_LOD_LOG2_128,
|
||||
|
@ -199,7 +191,7 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
|
|||
|
||||
typedef struct
|
||||
{
|
||||
GrAspectRatio_t aspect;
|
||||
GLAspectRatio_t aspect;
|
||||
float max_s;
|
||||
float max_t;
|
||||
} booring_aspect_t;
|
||||
|
@ -220,41 +212,21 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
|
|||
INT32 j,k;
|
||||
INT32 max,min;
|
||||
|
||||
// find a power of 2 width/height
|
||||
if (cv_grrounddown.value)
|
||||
{
|
||||
blockwidth = 256;
|
||||
while (originalwidth < blockwidth)
|
||||
blockwidth >>= 1;
|
||||
if (blockwidth < 1)
|
||||
I_Error("3D GenerateTexture : too small");
|
||||
// size up to nearest power of 2
|
||||
blockwidth = 1;
|
||||
while (blockwidth < originalwidth)
|
||||
blockwidth <<= 1;
|
||||
// scale down the original graphics to fit in 2048
|
||||
if (blockwidth > 2048)
|
||||
blockwidth = 2048;
|
||||
|
||||
blockheight = 256;
|
||||
while (originalheight < blockheight)
|
||||
blockheight >>= 1;
|
||||
if (blockheight < 1)
|
||||
I_Error("3D GenerateTexture : too small");
|
||||
}
|
||||
else
|
||||
{
|
||||
//size up to nearest power of 2
|
||||
blockwidth = 1;
|
||||
while (blockwidth < originalwidth)
|
||||
blockwidth <<= 1;
|
||||
// scale down the original graphics to fit in 256
|
||||
if (blockwidth > 2048)
|
||||
blockwidth = 2048;
|
||||
//I_Error("3D GenerateTexture : too big");
|
||||
|
||||
//size up to nearest power of 2
|
||||
blockheight = 1;
|
||||
while (blockheight < originalheight)
|
||||
blockheight <<= 1;
|
||||
// scale down the original graphics to fit in 256
|
||||
if (blockheight > 2048)
|
||||
blockheight = 2048;
|
||||
//I_Error("3D GenerateTexture : too big");
|
||||
}
|
||||
// size up to nearest power of 2
|
||||
blockheight = 1;
|
||||
while (blockheight < originalheight)
|
||||
blockheight <<= 1;
|
||||
// scale down the original graphics to fit in 2048
|
||||
if (blockheight > 2048)
|
||||
blockheight = 2048;
|
||||
|
||||
// do the boring LOD stuff.. blech!
|
||||
if (blockwidth >= blockheight)
|
||||
|
@ -424,7 +396,7 @@ static void HWR_GenerateTexture(INT32 texnum, GLTexture_t *grtex)
|
|||
}
|
||||
|
||||
// patch may be NULL if grMipmap has been initialised already and makebitmap is false
|
||||
void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap)
|
||||
void HWR_MakePatch (patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap)
|
||||
{
|
||||
INT32 newwidth, newheight;
|
||||
|
||||
|
@ -439,8 +411,8 @@ void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipm
|
|||
grPatch->leftoffset = SHORT(patch->leftoffset);
|
||||
grPatch->topoffset = SHORT(patch->topoffset);
|
||||
|
||||
// find the good 3dfx size (boring spec)
|
||||
HWR_ResizeBlock (SHORT(patch->width), SHORT(patch->height), &grMipmap->grInfo);
|
||||
// resize patch
|
||||
HWR_ResizeBlock(SHORT(patch->width), SHORT(patch->height), &grMipmap->grInfo);
|
||||
grMipmap->width = (UINT16)blockwidth;
|
||||
grMipmap->height = (UINT16)blockheight;
|
||||
|
||||
|
@ -459,23 +431,12 @@ void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipm
|
|||
Z_Free(grMipmap->grInfo.data);
|
||||
grMipmap->grInfo.data = NULL;
|
||||
|
||||
// if rounddown, rounddown patches as well as textures
|
||||
if (cv_grrounddown.value)
|
||||
{
|
||||
newwidth = blockwidth;
|
||||
newheight = blockheight;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no rounddown, do not size up patches, so they don't look 'scaled'
|
||||
newwidth = min(grPatch->width, blockwidth);
|
||||
newheight = min(grPatch->height, blockheight);
|
||||
}
|
||||
newwidth = min(grPatch->width, blockwidth);
|
||||
newheight = min(grPatch->height, blockheight);
|
||||
|
||||
if (makebitmap)
|
||||
{
|
||||
MakeBlock(grMipmap);
|
||||
|
||||
HWR_DrawPatchInCache(grMipmap,
|
||||
newwidth, newheight,
|
||||
blockwidth*format2bpp[grMipmap->grInfo.format],
|
||||
|
@ -489,7 +450,6 @@ void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipm
|
|||
grPatch->max_t = (float)newheight / (float)blockheight;
|
||||
}
|
||||
|
||||
|
||||
// =================================================
|
||||
// CACHING HANDLING
|
||||
// =================================================
|
||||
|
@ -556,7 +516,7 @@ void HWR_PrepLevelCache(size_t pnumtextures)
|
|||
gr_numtextures = pnumtextures;
|
||||
gr_textures = calloc(pnumtextures, sizeof (*gr_textures));
|
||||
if (gr_textures == NULL)
|
||||
I_Error("3D can't alloc gr_textures");
|
||||
I_Error("HWR_PrepLevelCache: can't alloc gr_textures");
|
||||
}
|
||||
|
||||
void HWR_SetPalette(RGBA_t *palette)
|
||||
|
@ -587,7 +547,7 @@ GLTexture_t *HWR_GetTexture(INT32 tex)
|
|||
GLTexture_t *grtex;
|
||||
#ifdef PARANOIA
|
||||
if ((unsigned)tex >= gr_numtextures)
|
||||
I_Error(" HWR_GetTexture: tex >= numtextures\n");
|
||||
I_Error("HWR_GetTexture: tex >= numtextures\n");
|
||||
#endif
|
||||
grtex = &gr_textures[tex];
|
||||
|
||||
|
@ -695,12 +655,12 @@ void HWR_GetPatch(GLPatch_t *gpatch)
|
|||
{
|
||||
// load the software patch, PU_STATIC or the Z_Malloc for hardware patch will
|
||||
// flush the software patch before the conversion! oh yeah I suffered
|
||||
patch_t *ptr = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
HWR_MakePatch(ptr, gpatch, &gpatch->mipmap, true);
|
||||
patch_t *patch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
HWR_MakePatch(patch, gpatch, &gpatch->mipmap, true);
|
||||
|
||||
// this is inefficient.. but the hardware patch in heap is purgeable so it should
|
||||
// not fragment memory, and besides the REAL cache here is the hardware memory
|
||||
Z_Free(ptr);
|
||||
Z_Free(patch);
|
||||
}
|
||||
|
||||
HWD.pfnSetTexture(&gpatch->mipmap);
|
||||
|
@ -760,160 +720,6 @@ void HWR_UnlockCachedPatch(GLPatch_t *gpatch)
|
|||
Z_ChangeTag(gpatch, PU_HWRPATCHINFO_UNLOCKED);
|
||||
}
|
||||
|
||||
static const INT32 picmode2GR[] =
|
||||
{
|
||||
GR_TEXFMT_P_8, // PALETTE
|
||||
0, // INTENSITY (unsupported yet)
|
||||
GR_TEXFMT_ALPHA_INTENSITY_88, // INTENSITY_ALPHA (corona use this)
|
||||
0, // RGB24 (unsupported yet)
|
||||
GR_RGBA, // RGBA32 (opengl only)
|
||||
};
|
||||
|
||||
static void HWR_DrawPicInCache(UINT8 *block, INT32 pblockwidth, INT32 pblockheight,
|
||||
INT32 blockmodulo, pic_t *pic, INT32 bpp)
|
||||
{
|
||||
INT32 i,j;
|
||||
fixed_t posx, posy, stepx, stepy;
|
||||
UINT8 *dest, *src, texel;
|
||||
UINT16 texelu16;
|
||||
INT32 picbpp;
|
||||
RGBA_t col;
|
||||
|
||||
stepy = ((INT32)SHORT(pic->height)<<FRACBITS)/pblockheight;
|
||||
stepx = ((INT32)SHORT(pic->width)<<FRACBITS)/pblockwidth;
|
||||
picbpp = format2bpp[picmode2GR[pic->mode]];
|
||||
posy = 0;
|
||||
for (j = 0; j < pblockheight; j++)
|
||||
{
|
||||
posx = 0;
|
||||
dest = &block[j*blockmodulo];
|
||||
src = &pic->data[(posy>>FRACBITS)*SHORT(pic->width)*picbpp];
|
||||
for (i = 0; i < pblockwidth;i++)
|
||||
{
|
||||
switch (pic->mode)
|
||||
{ // source bpp
|
||||
case PALETTE :
|
||||
texel = src[(posx+FRACUNIT/2)>>FRACBITS];
|
||||
switch (bpp)
|
||||
{ // destination bpp
|
||||
case 1 :
|
||||
*dest++ = texel; break;
|
||||
case 2 :
|
||||
texelu16 = (UINT16)(texel | 0xff00);
|
||||
memcpy(dest, &texelu16, sizeof(UINT16));
|
||||
dest += sizeof(UINT16);
|
||||
break;
|
||||
case 3 :
|
||||
col = V_GetColor(texel);
|
||||
memcpy(dest, &col, sizeof(RGBA_t)-sizeof(UINT8));
|
||||
dest += sizeof(RGBA_t)-sizeof(UINT8);
|
||||
break;
|
||||
case 4 :
|
||||
memcpy(dest, &V_GetColor(texel), sizeof(RGBA_t));
|
||||
dest += sizeof(RGBA_t);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case INTENSITY :
|
||||
*dest++ = src[(posx+FRACUNIT/2)>>FRACBITS];
|
||||
break;
|
||||
case INTENSITY_ALPHA : // assume dest bpp = 2
|
||||
memcpy(dest, src + ((posx+FRACUNIT/2)>>FRACBITS)*sizeof(UINT16), sizeof(UINT16));
|
||||
dest += sizeof(UINT16);
|
||||
break;
|
||||
case RGB24 :
|
||||
break; // not supported yet
|
||||
case RGBA32 : // assume dest bpp = 4
|
||||
dest += sizeof(UINT32);
|
||||
memcpy(dest, src + ((posx+FRACUNIT/2)>>FRACBITS)*sizeof(UINT32), sizeof(UINT32));
|
||||
break;
|
||||
}
|
||||
posx += stepx;
|
||||
}
|
||||
posy += stepy;
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
// HWR_GetPic : Download a Doom pic (raw row encoded with no 'holes')
|
||||
// Returns :
|
||||
// -----------------+
|
||||
GLPatch_t *HWR_GetPic(lumpnum_t lumpnum)
|
||||
{
|
||||
GLPatch_t *grpatch;
|
||||
|
||||
grpatch = HWR_GetCachedGLPatch(lumpnum);
|
||||
|
||||
if (!grpatch->mipmap.downloaded && !grpatch->mipmap.grInfo.data)
|
||||
{
|
||||
pic_t *pic;
|
||||
UINT8 *block;
|
||||
size_t len;
|
||||
INT32 newwidth, newheight;
|
||||
|
||||
pic = W_CacheLumpNum(lumpnum, PU_CACHE);
|
||||
grpatch->width = SHORT(pic->width);
|
||||
grpatch->height = SHORT(pic->height);
|
||||
len = W_LumpLength(lumpnum) - sizeof (pic_t);
|
||||
|
||||
grpatch->leftoffset = 0;
|
||||
grpatch->topoffset = 0;
|
||||
|
||||
// find the good 3dfx size (boring spec)
|
||||
HWR_ResizeBlock (grpatch->width, grpatch->height, &grpatch->mipmap.grInfo);
|
||||
grpatch->mipmap.width = (UINT16)blockwidth;
|
||||
grpatch->mipmap.height = (UINT16)blockheight;
|
||||
|
||||
if (pic->mode == PALETTE)
|
||||
grpatch->mipmap.grInfo.format = textureformat; // can be set by driver
|
||||
else
|
||||
grpatch->mipmap.grInfo.format = picmode2GR[pic->mode];
|
||||
|
||||
Z_Free(grpatch->mipmap.grInfo.data);
|
||||
|
||||
// allocate block
|
||||
block = MakeBlock(&grpatch->mipmap);
|
||||
|
||||
// if rounddown, rounddown patches as well as textures
|
||||
if (cv_grrounddown.value)
|
||||
{
|
||||
newwidth = blockwidth;
|
||||
newheight = blockheight;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no rounddown, do not size up patches, so they don't look 'scaled'
|
||||
newwidth = min(SHORT(pic->width),blockwidth);
|
||||
newheight = min(SHORT(pic->height),blockheight);
|
||||
}
|
||||
|
||||
|
||||
if (grpatch->width == blockwidth &&
|
||||
grpatch->height == blockheight &&
|
||||
format2bpp[grpatch->mipmap.grInfo.format] == format2bpp[picmode2GR[pic->mode]])
|
||||
{
|
||||
// no conversion needed
|
||||
M_Memcpy(grpatch->mipmap.grInfo.data, pic->data,len);
|
||||
}
|
||||
else
|
||||
HWR_DrawPicInCache(block, newwidth, newheight,
|
||||
blockwidth*format2bpp[grpatch->mipmap.grInfo.format],
|
||||
pic,
|
||||
format2bpp[grpatch->mipmap.grInfo.format]);
|
||||
|
||||
Z_Unlock(pic);
|
||||
Z_ChangeTag(block, PU_HWRCACHE_UNLOCKED);
|
||||
|
||||
grpatch->mipmap.flags = 0;
|
||||
grpatch->max_s = (float)newwidth / (float)blockwidth;
|
||||
grpatch->max_t = (float)newheight / (float)blockheight;
|
||||
}
|
||||
HWD.pfnSetTexture(&grpatch->mipmap);
|
||||
//CONS_Debug(DBG_RENDER, "picloaded at %x as texture %d\n",grpatch->mipmap.grInfo.data, grpatch->mipmap.downloaded);
|
||||
|
||||
return grpatch;
|
||||
}
|
||||
|
||||
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wadnum, UINT16 lumpnum)
|
||||
{
|
||||
aatree_t *hwrcache = wadfiles[wadnum]->hwrcache;
|
||||
|
|
|
@ -14,33 +14,69 @@
|
|||
#ifndef _HWR_DATA_
|
||||
#define _HWR_DATA_
|
||||
|
||||
#if defined (_WIN32) && !defined (__CYGWIN__) && !defined (_XBOX)
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "../doomdef.h"
|
||||
//THIS MUST DISAPPEAR!!!
|
||||
#include "hw_glide.h"
|
||||
#include "../screen.h"
|
||||
|
||||
|
||||
// ==========================================================================
|
||||
// TEXTURE INFO
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// hw_glide.h
|
||||
//
|
||||
|
||||
typedef long GLAspectRatio_t;
|
||||
#define GR_ASPECT_LOG2_8x1 3 /* 8W x 1H */
|
||||
#define GR_ASPECT_LOG2_4x1 2 /* 4W x 1H */
|
||||
#define GR_ASPECT_LOG2_2x1 1 /* 2W x 1H */
|
||||
#define GR_ASPECT_LOG2_1x1 0 /* 1W x 1H */
|
||||
#define GR_ASPECT_LOG2_1x2 -1 /* 1W x 2H */
|
||||
#define GR_ASPECT_LOG2_1x4 -2 /* 1W x 4H */
|
||||
#define GR_ASPECT_LOG2_1x8 -3 /* 1W x 8H */
|
||||
|
||||
typedef long GLlod_t;
|
||||
#define GR_LOD_LOG2_256 0x8
|
||||
#define GR_LOD_LOG2_128 0x7
|
||||
#define GR_LOD_LOG2_64 0x6
|
||||
#define GR_LOD_LOG2_32 0x5
|
||||
#define GR_LOD_LOG2_16 0x4
|
||||
#define GR_LOD_LOG2_8 0x3
|
||||
#define GR_LOD_LOG2_4 0x2
|
||||
#define GR_LOD_LOG2_2 0x1
|
||||
#define GR_LOD_LOG2_1 0x0
|
||||
|
||||
typedef long GLTextureFormat_t;
|
||||
#define GR_TEXFMT_ALPHA_8 0x2 /* (0..0xFF) alpha */
|
||||
#define GR_TEXFMT_INTENSITY_8 0x3 /* (0..0xFF) intensity */
|
||||
#define GR_TEXFMT_ALPHA_INTENSITY_44 0x4
|
||||
#define GR_TEXFMT_P_8 0x5 /* 8-bit palette */
|
||||
#define GR_TEXFMT_RGB_565 0xa
|
||||
#define GR_TEXFMT_ARGB_1555 0xb
|
||||
#define GR_TEXFMT_ARGB_4444 0xc
|
||||
#define GR_TEXFMT_ALPHA_INTENSITY_88 0xd
|
||||
#define GR_TEXFMT_AP_88 0xe /* 8-bit alpha 8-bit palette */
|
||||
#define GR_RGBA 0x6 // 32 bit RGBA !
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GLlod_t smallLodLog2;
|
||||
GLlod_t largeLodLog2;
|
||||
GLAspectRatio_t aspectRatioLog2;
|
||||
GLTextureFormat_t format;
|
||||
void *data;
|
||||
} GLTexInfo;
|
||||
|
||||
// grInfo.data holds the address of the graphics data cached in heap memory
|
||||
// NULL if the texture is not in Doom heap cache.
|
||||
struct GLMipmap_s
|
||||
{
|
||||
GrTexInfo grInfo;
|
||||
FxU32 flags;
|
||||
GLTexInfo grInfo;
|
||||
unsigned long flags;
|
||||
UINT16 width, height;
|
||||
UINT32 downloaded; // tex_downloaded
|
||||
|
||||
struct GLMipmap_s *nextmipmap;
|
||||
struct GLMipmap_s *nextcolormap;
|
||||
struct GLMipmap_s *nextmipmap;
|
||||
struct GLMipmap_s *nextcolormap;
|
||||
const UINT8 *colormap;
|
||||
};
|
||||
typedef struct GLMipmap_s GLMipmap_t;
|
||||
|
|
|
@ -454,41 +454,6 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
}
|
||||
|
||||
void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum)
|
||||
{
|
||||
FOutVector v[4];
|
||||
const GLPatch_t *patch;
|
||||
|
||||
// make pic ready in hardware cache
|
||||
patch = HWR_GetPic(lumpnum);
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
|
||||
v[0].x = v[3].x = 2.0f * (float)x/vid.width - 1;
|
||||
v[2].x = v[1].x = 2.0f * (float)(x + patch->width*FIXED_TO_FLOAT(vid.fdupx))/vid.width - 1;
|
||||
v[0].y = v[1].y = 1.0f - 2.0f * (float)y/vid.height;
|
||||
v[2].y = v[3].y = 1.0f - 2.0f * (float)(y + patch->height*FIXED_TO_FLOAT(vid.fdupy))/vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].sow = v[3].sow = 0;
|
||||
v[2].sow = v[1].sow = patch->max_s;
|
||||
v[0].tow = v[1].tow = 0;
|
||||
v[2].tow = v[3].tow = patch->max_t;
|
||||
|
||||
|
||||
//Hurdler: Boris, the same comment as above... but maybe for pics
|
||||
// it not a problem since they don't have any transparent pixel
|
||||
// if I'm right !?
|
||||
// But then, the question is: why not 0 instead of PF_Masked ?
|
||||
// or maybe PF_Environment ??? (like what I said above)
|
||||
// BP: PF_Environment don't change anything ! and 0 is undifined
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, PF_Translucent | PF_NoDepthTest);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// V_VIDEO.C STUFF
|
||||
// ==========================================================================
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief Declaration needed by Glide renderer
|
||||
/// !!! To be replaced by our own def in the future !!!
|
||||
|
||||
#ifndef _GLIDE_H_
|
||||
#define _GLIDE_H_
|
||||
|
||||
#ifndef __GLIDE_H__
|
||||
|
||||
typedef unsigned long FxU32;
|
||||
typedef long FxI32;
|
||||
|
||||
typedef FxI32 GrAspectRatio_t;
|
||||
#define GR_ASPECT_LOG2_8x1 3 /* 8W x 1H */
|
||||
#define GR_ASPECT_LOG2_4x1 2 /* 4W x 1H */
|
||||
#define GR_ASPECT_LOG2_2x1 1 /* 2W x 1H */
|
||||
#define GR_ASPECT_LOG2_1x1 0 /* 1W x 1H */
|
||||
#define GR_ASPECT_LOG2_1x2 -1 /* 1W x 2H */
|
||||
#define GR_ASPECT_LOG2_1x4 -2 /* 1W x 4H */
|
||||
#define GR_ASPECT_LOG2_1x8 -3 /* 1W x 8H */
|
||||
|
||||
typedef FxI32 GrLOD_t;
|
||||
#define GR_LOD_LOG2_256 0x8
|
||||
#define GR_LOD_LOG2_128 0x7
|
||||
#define GR_LOD_LOG2_64 0x6
|
||||
#define GR_LOD_LOG2_32 0x5
|
||||
#define GR_LOD_LOG2_16 0x4
|
||||
#define GR_LOD_LOG2_8 0x3
|
||||
#define GR_LOD_LOG2_4 0x2
|
||||
#define GR_LOD_LOG2_2 0x1
|
||||
#define GR_LOD_LOG2_1 0x0
|
||||
|
||||
typedef FxI32 GrTextureFormat_t;
|
||||
#define GR_TEXFMT_ALPHA_8 0x2 /* (0..0xFF) alpha */
|
||||
#define GR_TEXFMT_INTENSITY_8 0x3 /* (0..0xFF) intensity */
|
||||
#define GR_TEXFMT_ALPHA_INTENSITY_44 0x4
|
||||
#define GR_TEXFMT_P_8 0x5 /* 8-bit palette */
|
||||
#define GR_TEXFMT_RGB_565 0xa
|
||||
#define GR_TEXFMT_ARGB_1555 0xb
|
||||
#define GR_TEXFMT_ARGB_4444 0xc
|
||||
#define GR_TEXFMT_ALPHA_INTENSITY_88 0xd
|
||||
#define GR_TEXFMT_AP_88 0xe /* 8-bit alpha 8-bit palette */
|
||||
#define GR_RGBA 0x6 // 32 bit RGBA !
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GrLOD_t smallLodLog2;
|
||||
GrLOD_t largeLodLog2;
|
||||
GrAspectRatio_t aspectRatioLog2;
|
||||
GrTextureFormat_t format;
|
||||
void *data;
|
||||
} GrTexInfo;
|
||||
|
||||
#endif // __GLIDE_H__ (defined in <glide.h>)
|
||||
|
||||
#endif // _GLIDE_H_
|
|
@ -92,14 +92,14 @@ void HWR_GetFlat(lumpnum_t flatlumpnum);
|
|||
GLTexture_t *HWR_GetTexture(INT32 tex);
|
||||
void HWR_GetPatch(GLPatch_t *gpatch);
|
||||
void HWR_GetMappedPatch(GLPatch_t *gpatch, const UINT8 *colormap);
|
||||
void HWR_MakePatch(patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
|
||||
void HWR_UnlockCachedPatch(GLPatch_t *gpatch);
|
||||
GLPatch_t *HWR_GetPic(lumpnum_t lumpnum);
|
||||
void HWR_SetPalette(RGBA_t *palette);
|
||||
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wad, UINT16 lump);
|
||||
GLPatch_t *HWR_GetCachedGLPatch(lumpnum_t lumpnum);
|
||||
void HWR_GetFadeMask(lumpnum_t fademasklumpnum);
|
||||
|
||||
// jimita
|
||||
// hardware driver
|
||||
extern INT32 gl_leveltime;
|
||||
|
||||
// --------
|
||||
|
@ -109,6 +109,5 @@ extern consvar_t cv_grrounddown; // on/off
|
|||
|
||||
extern INT32 patchformat;
|
||||
extern INT32 textureformat;
|
||||
extern boolean firetranslucent;
|
||||
|
||||
#endif //_HW_GLOB_
|
||||
|
|
|
@ -46,12 +46,10 @@ void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
|||
void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, const UINT8 *colormap);
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option, fixed_t scale, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
|
||||
void HWR_CreatePlanePolygons(INT32 bspnum);
|
||||
void HWR_PrepLevelCache(size_t pnumtextures);
|
||||
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color);
|
||||
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32 options); // Lat: separate flags from color since color needs to be an uint to work right.
|
||||
void HWR_DrawPic(INT32 x,INT32 y,lumpnum_t lumpnum);
|
||||
|
||||
void HWR_AddCommands(void);
|
||||
void HWR_CorrectSWTricks(void);
|
||||
|
|
|
@ -141,7 +141,7 @@ static void PNG_warn(png_structp PNG, png_const_charp pngtext)
|
|||
CONS_Debug(DBG_RENDER, "libpng warning at %p: %s", PNG, pngtext);
|
||||
}
|
||||
|
||||
static GrTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_t *grpatch)
|
||||
static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_t *grpatch)
|
||||
{
|
||||
png_structp png_ptr;
|
||||
png_infop png_info_ptr;
|
||||
|
@ -271,7 +271,7 @@ typedef struct
|
|||
UINT8 filler[54];
|
||||
} PcxHeader;
|
||||
|
||||
static GrTextureFormat_t PCX_Load(const char *filename, int *w, int *h,
|
||||
static GLTextureFormat_t PCX_Load(const char *filename, int *w, int *h,
|
||||
GLPatch_t *grpatch)
|
||||
{
|
||||
PcxHeader header;
|
||||
|
|
15
src/m_menu.c
15
src/m_menu.c
|
@ -3861,18 +3861,11 @@ static void M_StopMessage(INT32 choice)
|
|||
// You can even put multiple images in one menu!
|
||||
static void M_DrawImageDef(void)
|
||||
{
|
||||
// Grr. Need to autodetect for pic_ts.
|
||||
pic_t *pictest = (pic_t *)W_CachePatchName(currentMenu->menuitems[itemOn].text,PU_CACHE);
|
||||
if (!pictest->zero)
|
||||
V_DrawScaledPic(0,0,0,W_GetNumForName(currentMenu->menuitems[itemOn].text));
|
||||
patch_t *patch = W_CachePatchName(currentMenu->menuitems[itemOn].text,PU_CACHE);
|
||||
if (patch->width <= BASEVIDWIDTH)
|
||||
V_DrawScaledPatch(0,0,0,patch);
|
||||
else
|
||||
{
|
||||
patch_t *patch = W_CachePatchName(currentMenu->menuitems[itemOn].text,PU_CACHE);
|
||||
if (patch->width <= BASEVIDWIDTH)
|
||||
V_DrawScaledPatch(0,0,0,patch);
|
||||
else
|
||||
V_DrawSmallScaledPatch(0,0,0,patch);
|
||||
}
|
||||
V_DrawSmallScaledPatch(0,0,0,patch);
|
||||
|
||||
if (currentMenu->numitems > 1)
|
||||
V_DrawString(0,192,V_TRANSLUCENT, va("PAGE %d of %hd", itemOn+1, currentMenu->numitems));
|
||||
|
|
|
@ -222,7 +222,6 @@
|
|||
<ClInclude Include="..\hardware\hw_defs.h" />
|
||||
<ClInclude Include="..\hardware\hw_dll.h" />
|
||||
<ClInclude Include="..\hardware\hw_drv.h" />
|
||||
<ClInclude Include="..\hardware\hw_glide.h" />
|
||||
<ClInclude Include="..\hardware\hw_glob.h" />
|
||||
<ClInclude Include="..\hardware\hw_light.h" />
|
||||
<ClInclude Include="..\hardware\hw_main.h" />
|
||||
|
|
|
@ -231,9 +231,6 @@
|
|||
<ClInclude Include="..\hardware\hw_drv.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_glide.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_glob.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -2410,10 +2410,6 @@
|
|||
RelativePath="..\hardware\hw_drv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glide.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glob.h"
|
||||
>
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=Srb2SDL - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2SDL.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2SDL.mak" CFG="Srb2SDL - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "Srb2SDL - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Srb2SDL - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -85,7 +85,7 @@ LINK32=link.exe
|
|||
# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /pdb:"C:\srb2demo2\srb2sdldebug.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdldebug.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
@ -213,7 +213,7 @@ SOURCE=.\SDL_main\SDL_win32_main.c
|
|||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -274,7 +274,7 @@ InputName=tmap
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -308,7 +308,7 @@ InputName=tmap_mmx
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -339,7 +339,7 @@ InputName=tmap_vc
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -576,10 +576,6 @@ SOURCE=..\hardware\hw_drv.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glide.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glob.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
|
@ -1064,13 +1064,6 @@
|
|||
path = ../../hardware/hw_drv.h;
|
||||
refType = 2;
|
||||
};
|
||||
8417773B085A106C000C01D8 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
name = hw_glide.h;
|
||||
path = ../../hardware/hw_glide.h;
|
||||
refType = 2;
|
||||
};
|
||||
8417773C085A106C000C01D8 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
|
|
|
@ -181,7 +181,6 @@
|
|||
1E44AE640B67CC2B00BAD059 /* hw_cache.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_cache.c; path = ../../hardware/hw_cache.c; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE650B67CC2B00BAD059 /* hw_dll.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_dll.h; path = ../../hardware/hw_dll.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE660B67CC2B00BAD059 /* hw_drv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_drv.h; path = ../../hardware/hw_drv.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE670B67CC2B00BAD059 /* hw_glide.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_glide.h; path = ../../hardware/hw_glide.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE680B67CC2B00BAD059 /* hw_light.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_light.c; path = ../../hardware/hw_light.c; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE690B67CC2B00BAD059 /* hw_light.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_light.h; path = ../../hardware/hw_light.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw3sound.h; path = ../../hardware/hw3sound.h; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -535,7 +534,6 @@
|
|||
1E44AE640B67CC2B00BAD059 /* hw_cache.c */,
|
||||
1E44AE650B67CC2B00BAD059 /* hw_dll.h */,
|
||||
1E44AE660B67CC2B00BAD059 /* hw_drv.h */,
|
||||
1E44AE670B67CC2B00BAD059 /* hw_glide.h */,
|
||||
1E44AE680B67CC2B00BAD059 /* hw_light.c */,
|
||||
1E44AE690B67CC2B00BAD059 /* hw_light.h */,
|
||||
1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */,
|
||||
|
|
|
@ -1335,7 +1335,6 @@
|
|||
<ClInclude Include="..\hardware\hw_defs.h" />
|
||||
<ClInclude Include="..\hardware\hw_dll.h" />
|
||||
<ClInclude Include="..\hardware\hw_drv.h" />
|
||||
<ClInclude Include="..\hardware\hw_glide.h" />
|
||||
<ClInclude Include="..\hardware\hw_glob.h" />
|
||||
<ClInclude Include="..\hardware\hw_light.h" />
|
||||
<ClInclude Include="..\hardware\hw_main.h" />
|
||||
|
|
|
@ -2410,10 +2410,6 @@
|
|||
RelativePath="..\hardware\hw_drv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glide.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glob.h"
|
||||
>
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=Srb2SDL - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2SDL.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2SDL.mak" CFG="Srb2SDL - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "Srb2SDL - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Srb2SDL - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -85,7 +85,7 @@ LINK32=link.exe
|
|||
# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /pdb:"C:\srb2demo2\srb2sdldebug.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdldebug.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
@ -213,7 +213,7 @@ SOURCE=.\SDL_main\SDL_win32_main.c
|
|||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -274,7 +274,7 @@ InputName=tmap
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -308,7 +308,7 @@ InputName=tmap_mmx
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -339,7 +339,7 @@ InputName=tmap_vc
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -576,10 +576,6 @@ SOURCE=..\hardware\hw_drv.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glide.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glob.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
|
@ -1064,13 +1064,6 @@
|
|||
path = ../../hardware/hw_drv.h;
|
||||
refType = 2;
|
||||
};
|
||||
8417773B085A106C000C01D8 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
name = hw_glide.h;
|
||||
path = ../../hardware/hw_glide.h;
|
||||
refType = 2;
|
||||
};
|
||||
8417773C085A106C000C01D8 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
|
|
|
@ -181,7 +181,6 @@
|
|||
1E44AE640B67CC2B00BAD059 /* hw_cache.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_cache.c; path = ../../hardware/hw_cache.c; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE650B67CC2B00BAD059 /* hw_dll.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_dll.h; path = ../../hardware/hw_dll.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE660B67CC2B00BAD059 /* hw_drv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_drv.h; path = ../../hardware/hw_drv.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE670B67CC2B00BAD059 /* hw_glide.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_glide.h; path = ../../hardware/hw_glide.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE680B67CC2B00BAD059 /* hw_light.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_light.c; path = ../../hardware/hw_light.c; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE690B67CC2B00BAD059 /* hw_light.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_light.h; path = ../../hardware/hw_light.h; sourceTree = SOURCE_ROOT; };
|
||||
1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw3sound.h; path = ../../hardware/hw3sound.h; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -535,7 +534,6 @@
|
|||
1E44AE640B67CC2B00BAD059 /* hw_cache.c */,
|
||||
1E44AE650B67CC2B00BAD059 /* hw_dll.h */,
|
||||
1E44AE660B67CC2B00BAD059 /* hw_drv.h */,
|
||||
1E44AE670B67CC2B00BAD059 /* hw_glide.h */,
|
||||
1E44AE680B67CC2B00BAD059 /* hw_light.c */,
|
||||
1E44AE690B67CC2B00BAD059 /* hw_light.h */,
|
||||
1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */,
|
||||
|
|
|
@ -696,61 +696,6 @@ void V_DrawBlock(INT32 x, INT32 y, INT32 scrn, INT32 width, INT32 height, const
|
|||
}
|
||||
}
|
||||
|
||||
static void V_BlitScaledPic(INT32 px1, INT32 py1, INT32 scrn, pic_t *pic);
|
||||
// Draw a linear pic, scaled, TOTALLY CRAP CODE!!! OPTIMISE AND ASM!!
|
||||
//
|
||||
void V_DrawScaledPic(INT32 rx1, INT32 ry1, INT32 scrn, INT32 lumpnum)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
HWR_DrawPic(rx1, ry1, lumpnum);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
V_BlitScaledPic(rx1, ry1, scrn, W_CacheLumpNum(lumpnum, PU_CACHE));
|
||||
}
|
||||
|
||||
static void V_BlitScaledPic(INT32 rx1, INT32 ry1, INT32 scrn, pic_t * pic)
|
||||
{
|
||||
INT32 dupx, dupy;
|
||||
INT32 x, y;
|
||||
UINT8 *src, *dest;
|
||||
INT32 width, height;
|
||||
|
||||
width = SHORT(pic->width);
|
||||
height = SHORT(pic->height);
|
||||
scrn &= V_PARAMMASK;
|
||||
|
||||
if (pic->mode != 0)
|
||||
{
|
||||
CONS_Debug(DBG_RENDER, "pic mode %d not supported in Software\n", pic->mode);
|
||||
return;
|
||||
}
|
||||
|
||||
dest = screens[scrn] + max(0, ry1 * vid.width) + max(0, rx1);
|
||||
// y cliping to the screen
|
||||
if (ry1 + height * vid.dupy >= vid.width)
|
||||
height = (vid.width - ry1) / vid.dupy - 1;
|
||||
// WARNING no x clipping (not needed for the moment)
|
||||
|
||||
for (y = max(0, -ry1 / vid.dupy); y < height; y++)
|
||||
{
|
||||
for (dupy = vid.dupy; dupy; dupy--)
|
||||
{
|
||||
src = pic->data + y * width;
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
for (dupx = vid.dupx; dupx; dupx--)
|
||||
*dest++ = *src;
|
||||
src++;
|
||||
}
|
||||
dest += vid.width - vid.dupx * width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Fills a box of pixels with a single color, NOTE: scaled to screen size
|
||||
//
|
||||
|
|
|
@ -134,9 +134,6 @@ void V_DrawContinueIcon(INT32 x, INT32 y, INT32 flags, INT32 skinnum, UINT8 skin
|
|||
// Draw a linear block of pixels into the view buffer.
|
||||
void V_DrawBlock(INT32 x, INT32 y, INT32 scrn, INT32 width, INT32 height, const UINT8 *src);
|
||||
|
||||
// draw a pic_t, SCALED
|
||||
void V_DrawScaledPic (INT32 px1, INT32 py1, INT32 scrn, INT32 lumpnum);
|
||||
|
||||
// fill a box with a single color
|
||||
void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
||||
void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
||||
|
|
|
@ -1518,6 +1518,7 @@ void *W_CachePatchName(const char *name, INT32 tag)
|
|||
return W_CachePatchNum(W_GetNumForName("MISSING"), tag);
|
||||
return W_CachePatchNum(num, tag);
|
||||
}
|
||||
|
||||
#ifndef NOMD5
|
||||
#define MD5_LEN 16
|
||||
|
||||
|
|
|
@ -2151,10 +2151,6 @@
|
|||
RelativePath="..\hardware\hw_drv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glide.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hardware\hw_glob.h"
|
||||
>
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
CFG=Srb2win - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2win.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Srb2win.mak" CFG="Srb2win - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "Srb2win - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "Srb2win - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
|
@ -84,7 +84,7 @@ LINK32=link.exe
|
|||
# ADD LINK32 dxguid.lib user32.lib gdi32.lib winmm.lib advapi32.lib ws2_32.lib dinput.lib /nologo /subsystem:windows /profile /debug /machine:I386 /out:"C:\srb2demo2\srb2debug.exe"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
@ -148,7 +148,7 @@ SOURCE=.\Srb2win.rc
|
|||
|
||||
!ELSEIF "$(CFG)" == "Srb2win - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -233,7 +233,7 @@ InputName=tmap
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -266,7 +266,7 @@ InputName=tmap_mmx
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -298,7 +298,7 @@ InputName=tmap_vc
|
|||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -535,10 +535,6 @@ SOURCE=..\hardware\hw_drv.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glide.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hardware\hw_glob.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Reference in a new issue