mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-02 14:12:47 +00:00
Merge branch 'the-scary-22-merge' of https://git.magicalgirl.moe/KartKrew/Kart into the-scary-22-merge
This commit is contained in:
commit
417859020d
13 changed files with 9 additions and 1744 deletions
|
|
@ -754,13 +754,10 @@ static INT32 SolveTProblem(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
CONS_Debug(DBG_RENDER, "Solving T-joins. This may take a while. Please wait...\n");
|
CONS_Debug(DBG_RENDER, "Solving T-joins. This may take a while. Please wait...\n");
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#ifdef HWR_LOADING_SCREEN
|
#ifdef HWR_LOADING_SCREEN
|
||||||
CON_Drawer(); //let the user know what we are doing
|
CON_Drawer(); //let the user know what we are doing
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
#endif
|
#endif
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
numsplitpoly = 0;
|
numsplitpoly = 0;
|
||||||
|
|
||||||
|
|
@ -888,11 +885,8 @@ void HWR_CreatePlanePolygons(INT32 bspnum)
|
||||||
CON_Drawer(); //let the user know what we are doing
|
CON_Drawer(); //let the user know what we are doing
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
#endif
|
#endif
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
HWR_ClearPolys();
|
HWR_ClearPolys();
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// find min/max boundaries of map
|
// find min/max boundaries of map
|
||||||
//CONS_Debug(DBG_RENDER, "Looking for boundaries of map...\n");
|
//CONS_Debug(DBG_RENDER, "Looking for boundaries of map...\n");
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,8 @@
|
||||||
#include "../z_zone.h"
|
#include "../z_zone.h"
|
||||||
#include "../v_video.h"
|
#include "../v_video.h"
|
||||||
#include "../r_draw.h"
|
#include "../r_draw.h"
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#include "../r_patch.h"
|
#include "../r_patch.h"
|
||||||
#include "../p_setup.h"
|
#include "../p_setup.h"
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// Values set after a call to HWR_ResizeBlock()
|
// Values set after a call to HWR_ResizeBlock()
|
||||||
static INT32 blocksize, blockwidth, blockheight;
|
static INT32 blocksize, blockwidth, blockheight;
|
||||||
|
|
@ -423,55 +420,11 @@ static void HWR_DrawTexturePatchInCache(GLMipmap_t *mipmap,
|
||||||
else
|
else
|
||||||
patchcol = (const column_t *)((const UINT8 *)realpatch + LONG(realpatch->columnofs[xfrac>>FRACBITS]));
|
patchcol = (const column_t *)((const UINT8 *)realpatch + LONG(realpatch->columnofs[xfrac>>FRACBITS]));
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
dest = block + (position*blockmodulo);
|
|
||||||
while (count > 0)
|
|
||||||
{
|
|
||||||
count--;
|
|
||||||
|
|
||||||
texel = source[yfrac>>FRACBITS];
|
|
||||||
alpha = 0xff;
|
|
||||||
|
|
||||||
//Hurdler: not perfect, but better than holes
|
|
||||||
if (texel == HWR_PATCHES_CHROMAKEY_COLORINDEX && (mipmap->flags & TF_CHROMAKEYED))
|
|
||||||
alpha = 0x00;
|
|
||||||
|
|
||||||
//Hurdler: 25/04/2000: now support colormap in hardware mode
|
|
||||||
if (mipmap->colormap)
|
|
||||||
texel = mipmap->colormap[texel];
|
|
||||||
|
|
||||||
// hope compiler will get this switch out of the loops (dreams...)
|
|
||||||
// gcc do it ! but vcc not ! (why don't use cygwin gcc for win32 ?)
|
|
||||||
// Alam: SRB2 uses Mingw, HUGS
|
|
||||||
switch (bpp)
|
|
||||||
{
|
|
||||||
case 2 : texelu16 = (UINT16)((alpha<<8) | texel);
|
|
||||||
memcpy(dest, &texelu16, sizeof(UINT16));
|
|
||||||
break;
|
|
||||||
case 3 : colortemp = V_GetColor(texel);
|
|
||||||
memcpy(dest, &colortemp, sizeof(RGBA_t)-sizeof(UINT8));
|
|
||||||
break;
|
|
||||||
case 4 : colortemp = V_GetColor(texel);
|
|
||||||
colortemp.s.alpha = alpha;
|
|
||||||
memcpy(dest, &colortemp, sizeof(RGBA_t));
|
|
||||||
break;
|
|
||||||
// default is 1
|
|
||||||
default: *dest = texel;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
dest += blockmodulo;
|
|
||||||
yfrac += yfracstep;
|
|
||||||
}
|
|
||||||
patchcol = (const column_t *)((const UINT8 *)patchcol + patchcol->length + 4);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
ColumnDrawerPointer(patchcol, block, mipmap,
|
ColumnDrawerPointer(patchcol, block, mipmap,
|
||||||
pblockheight, blockmodulo,
|
pblockheight, blockmodulo,
|
||||||
yfracstep, scale_y,
|
yfracstep, scale_y,
|
||||||
patch, height,
|
patch, height,
|
||||||
bpp);
|
bpp);
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -525,23 +478,6 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
|
||||||
(void)grInfo;
|
(void)grInfo;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// 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;
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
=======
|
|
||||||
// find a power of 2 width/height
|
// find a power of 2 width/height
|
||||||
if (cv_grrounddown.value)
|
if (cv_grrounddown.value)
|
||||||
{
|
{
|
||||||
|
|
@ -582,7 +518,6 @@ static void HWR_ResizeBlock(INT32 originalwidth, INT32 originalheight,
|
||||||
blockheight = originalheight;
|
blockheight = originalheight;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// do the boring LOD stuff.. blech!
|
// do the boring LOD stuff.. blech!
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
#ifdef GLIDE_API_COMPATIBILITY
|
||||||
|
|
@ -799,10 +734,6 @@ void HWR_MakePatch (patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, bo
|
||||||
Z_Free(grMipmap->grInfo.data);
|
Z_Free(grMipmap->grInfo.data);
|
||||||
grMipmap->grInfo.data = NULL;
|
grMipmap->grInfo.data = NULL;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
newwidth = min(grPatch->width, blockwidth);
|
|
||||||
newheight = min(grPatch->height, blockheight);
|
|
||||||
=======
|
|
||||||
// if rounddown, rounddown patches as well as textures
|
// if rounddown, rounddown patches as well as textures
|
||||||
if (cv_grrounddown.value)
|
if (cv_grrounddown.value)
|
||||||
{
|
{
|
||||||
|
|
@ -815,7 +746,6 @@ void HWR_MakePatch (patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, bo
|
||||||
newwidth = min(grPatch->width, blockwidth);
|
newwidth = min(grPatch->width, blockwidth);
|
||||||
newheight = min(grPatch->height, blockheight);
|
newheight = min(grPatch->height, blockheight);
|
||||||
}
|
}
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
if (makebitmap)
|
if (makebitmap)
|
||||||
{
|
{
|
||||||
|
|
@ -849,14 +779,6 @@ static void FreeMipmapColormap(INT32 patchnum, void *patch)
|
||||||
{
|
{
|
||||||
GLPatch_t* const pat = patch;
|
GLPatch_t* const pat = patch;
|
||||||
(void)patchnum; //unused
|
(void)patchnum; //unused
|
||||||
<<<<<<< HEAD
|
|
||||||
while (grpatch->mipmap->nextcolormap)
|
|
||||||
{
|
|
||||||
GLMipmap_t *grmip = grpatch->mipmap->nextcolormap;
|
|
||||||
grpatch->mipmap->nextcolormap = grmip->nextcolormap;
|
|
||||||
if (grmip->grInfo.data) Z_Free(grmip->grInfo.data);
|
|
||||||
free(grmip);
|
|
||||||
=======
|
|
||||||
|
|
||||||
// The patch must be valid, obviously
|
// The patch must be valid, obviously
|
||||||
if (!pat)
|
if (!pat)
|
||||||
|
|
@ -889,7 +811,6 @@ static void FreeMipmapColormap(INT32 patchnum, void *patch)
|
||||||
|
|
||||||
// Free the old colormap mipmap from memory.
|
// Free the old colormap mipmap from memory.
|
||||||
free(next);
|
free(next);
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -934,11 +855,6 @@ void HWR_LoadTextures(size_t pnumtextures)
|
||||||
|
|
||||||
// Why not Z_Malloc?
|
// Why not Z_Malloc?
|
||||||
gr_numtextures = pnumtextures;
|
gr_numtextures = pnumtextures;
|
||||||
<<<<<<< HEAD
|
|
||||||
gr_textures = calloc(pnumtextures, sizeof (*gr_textures));
|
|
||||||
if (gr_textures == NULL)
|
|
||||||
I_Error("HWR_PrepLevelCache: can't alloc gr_textures");
|
|
||||||
=======
|
|
||||||
gr_textures = calloc(gr_numtextures, sizeof(*gr_textures));
|
gr_textures = calloc(gr_numtextures, sizeof(*gr_textures));
|
||||||
gr_flats = calloc(gr_numtextures, sizeof(*gr_flats));
|
gr_flats = calloc(gr_numtextures, sizeof(*gr_flats));
|
||||||
|
|
||||||
|
|
@ -946,7 +862,6 @@ void HWR_LoadTextures(size_t pnumtextures)
|
||||||
// should never ever happen (right?!)
|
// should never ever happen (right?!)
|
||||||
if ((gr_textures == NULL) || (gr_flats == NULL))
|
if ((gr_textures == NULL) || (gr_flats == NULL))
|
||||||
I_Error("HWR_LoadTextures: ran out of memory for OpenGL textures. Sad!");
|
I_Error("HWR_LoadTextures: ran out of memory for OpenGL textures. Sad!");
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWR_SetPalette(RGBA_t *palette)
|
void HWR_SetPalette(RGBA_t *palette)
|
||||||
|
|
@ -1076,17 +991,15 @@ static void HWR_CacheTextureAsFlat(GLMipmap_t *grMipmap, INT32 texturenum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Download a Doom 'flat' to the hardware cache and make it ready for use
|
// Download a Doom 'flat' to the hardware cache and make it ready for use
|
||||||
<<<<<<< HEAD
|
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
||||||
void HWR_GetFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|
||||||
=======
|
|
||||||
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum)
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
{
|
{
|
||||||
GLMipmap_t *grmip;
|
GLMipmap_t *grmip;
|
||||||
if (flatlumpnum == LUMPERROR)
|
if (flatlumpnum == LUMPERROR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
if (needpatchflush)
|
||||||
|
W_FlushCachedPatches();
|
||||||
|
|
||||||
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
||||||
|
|
||||||
grmip->colormap = colormaps;
|
grmip->colormap = colormaps;
|
||||||
|
|
@ -1103,11 +1016,6 @@ void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum)
|
||||||
grmip->colormap += (256*32);
|
grmip->colormap += (256*32);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
=======
|
|
||||||
if (needpatchflush)
|
|
||||||
W_FlushCachedPatches();
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
||||||
if (!grmip->downloaded && !grmip->grInfo.data)
|
if (!grmip->downloaded && !grmip->grInfo.data)
|
||||||
HWR_CacheFlat(grmip, flatlumpnum);
|
HWR_CacheFlat(grmip, flatlumpnum);
|
||||||
|
|
@ -1194,14 +1102,6 @@ void HWR_GetPatch(GLPatch_t *gpatch)
|
||||||
{
|
{
|
||||||
// load the software patch, PU_STATIC or the Z_Malloc for hardware patch will
|
// 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
|
// flush the software patch before the conversion! oh yeah I suffered
|
||||||
<<<<<<< HEAD
|
|
||||||
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(patch);
|
|
||||||
=======
|
|
||||||
patch_t *ptr = gpatch->rawpatch;
|
patch_t *ptr = gpatch->rawpatch;
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
ptr = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
ptr = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||||
|
|
@ -1211,7 +1111,6 @@ void HWR_GetPatch(GLPatch_t *gpatch)
|
||||||
// not fragment memory, and besides the REAL cache here is the hardware memory
|
// not fragment memory, and besides the REAL cache here is the hardware memory
|
||||||
if (!gpatch->rawpatch)
|
if (!gpatch->rawpatch)
|
||||||
Z_Free(ptr);
|
Z_Free(ptr);
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HWD.pfnSetTexture(gpatch->mipmap);
|
HWD.pfnSetTexture(gpatch->mipmap);
|
||||||
|
|
@ -1274,8 +1173,6 @@ void HWR_UnlockCachedPatch(GLPatch_t *gpatch)
|
||||||
Z_ChangeTag(gpatch, PU_HWRPATCHINFO_UNLOCKED);
|
Z_ChangeTag(gpatch, PU_HWRPATCHINFO_UNLOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
static const INT32 picmode2GR[] =
|
static const INT32 picmode2GR[] =
|
||||||
{
|
{
|
||||||
GR_TEXFMT_P_8, // PALETTE
|
GR_TEXFMT_P_8, // PALETTE
|
||||||
|
|
@ -1433,7 +1330,6 @@ GLPatch_t *HWR_GetPic(lumpnum_t lumpnum)
|
||||||
return grpatch;
|
return grpatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wadnum, UINT16 lumpnum)
|
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wadnum, UINT16 lumpnum)
|
||||||
{
|
{
|
||||||
aatree_t *hwrcache = wadfiles[wadnum]->hwrcache;
|
aatree_t *hwrcache = wadfiles[wadnum]->hwrcache;
|
||||||
|
|
@ -1548,12 +1444,9 @@ void HWR_GetFadeMask(lumpnum_t fademasklumpnum)
|
||||||
{
|
{
|
||||||
GLMipmap_t *grmip;
|
GLMipmap_t *grmip;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
if (needpatchflush)
|
if (needpatchflush)
|
||||||
W_FlushCachedPatches();
|
W_FlushCachedPatches();
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
grmip = HWR_GetCachedGLPatch(fademasklumpnum)->mipmap;
|
grmip = HWR_GetCachedGLPatch(fademasklumpnum)->mipmap;
|
||||||
|
|
||||||
if (!grmip->downloaded && !grmip->grInfo.data)
|
if (!grmip->downloaded && !grmip->grInfo.data)
|
||||||
|
|
|
||||||
|
|
@ -381,11 +381,7 @@ void gld_FrustrumSetup(void)
|
||||||
float t;
|
float t;
|
||||||
float clip[16];
|
float clip[16];
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
pglGetFloatv(GL_PROJECTION_MATRIX, projMatrix);
|
pglGetFloatv(GL_PROJECTION_MATRIX, projMatrix);
|
||||||
=======
|
|
||||||
pglGeFloatv(GL_PROJECTION_MATRIX, projMatrix);
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
pglGetFloatv(GL_MODELVIEW_MATRIX, viewMatrix);
|
pglGetFloatv(GL_MODELVIEW_MATRIX, viewMatrix);
|
||||||
|
|
||||||
clip[0] = CALCMATRIX(0, 0, 1, 4, 2, 8, 3, 12);
|
clip[0] = CALCMATRIX(0, 0, 1, 4, 2, 8, 3, 12);
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,12 @@
|
||||||
#ifndef _HWR_DATA_
|
#ifndef _HWR_DATA_
|
||||||
#define _HWR_DATA_
|
#define _HWR_DATA_
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#if defined (_WIN32) && !defined (__CYGWIN__)
|
#if defined (_WIN32) && !defined (__CYGWIN__)
|
||||||
//#define WIN32_LEAN_AND_MEAN
|
//#define WIN32_LEAN_AND_MEAN
|
||||||
#define RPC_NO_WINDOWS_H
|
#define RPC_NO_WINDOWS_H
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
#include "../doomdef.h"
|
#include "../doomdef.h"
|
||||||
#include "../screen.h"
|
#include "../screen.h"
|
||||||
|
|
||||||
|
|
@ -116,14 +113,9 @@ struct GLPatch_s
|
||||||
float max_s,max_t;
|
float max_s,max_t;
|
||||||
UINT16 wadnum; // the software patch lump num for when the hardware patch
|
UINT16 wadnum; // the software patch lump num for when the hardware patch
|
||||||
UINT16 lumpnum; // was flushed, and we need to re-create it
|
UINT16 lumpnum; // was flushed, and we need to re-create it
|
||||||
<<<<<<< HEAD
|
|
||||||
GLMipmap_t *mipmap;
|
|
||||||
|
|
||||||
boolean notfound; // if the texture file was not found, mark it here (used in model texture loading)
|
boolean notfound; // if the texture file was not found, mark it here (used in model texture loading)
|
||||||
=======
|
|
||||||
void *rawpatch; // :^)
|
void *rawpatch; // :^)
|
||||||
GLMipmap_t *mipmap;
|
GLMipmap_t *mipmap;
|
||||||
>>>>>>> srb2/next
|
|
||||||
} ATTRPACK;
|
} ATTRPACK;
|
||||||
typedef struct GLPatch_s GLPatch_t;
|
typedef struct GLPatch_s GLPatch_t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,10 @@ typedef unsigned char FBOOLEAN;
|
||||||
|
|
||||||
// byte value for paletted graphics, which represent the transparent color
|
// byte value for paletted graphics, which represent the transparent color
|
||||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255
|
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
//#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130
|
//#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130
|
||||||
|
|
||||||
// the chroma key color shows on border sprites, set it to black
|
// the chroma key color shows on border sprites, set it to black
|
||||||
#define HWR_PATCHES_CHROMAKEY_COLORVALUE (0x00000000) //RGBA format as in grSstWinOpen()
|
#define HWR_PATCHES_CHROMAKEY_COLORVALUE (0x00000000) //RGBA format as in grSstWinOpen()
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// RGBA Color components with float type ranging [ 0 ... 1 ]
|
// RGBA Color components with float type ranging [ 0 ... 1 ]
|
||||||
struct FRGBAFloat
|
struct FRGBAFloat
|
||||||
|
|
@ -148,8 +145,6 @@ typedef struct gr_vissprite_s
|
||||||
// Vanilla features
|
// Vanilla features
|
||||||
//#define USE_MODEL_NEXTFRAME
|
//#define USE_MODEL_NEXTFRAME
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
//Hurdler: Transform (coords + angles)
|
//Hurdler: Transform (coords + angles)
|
||||||
//BP: transform order : scale(rotation_x(rotation_y(translation(v))))
|
//BP: transform order : scale(rotation_x(rotation_y(translation(v))))
|
||||||
|
|
||||||
|
|
@ -160,7 +155,6 @@ typedef struct gr_vissprite_s
|
||||||
// Vanilla features
|
// Vanilla features
|
||||||
#define USE_MODEL_NEXTFRAME
|
#define USE_MODEL_NEXTFRAME
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
FLOAT x,y,z; // position
|
FLOAT x,y,z; // position
|
||||||
|
|
@ -173,13 +167,8 @@ typedef struct
|
||||||
FLOAT fovxangle, fovyangle;
|
FLOAT fovxangle, fovyangle;
|
||||||
UINT8 splitscreen;
|
UINT8 splitscreen;
|
||||||
boolean flip; // screenflip
|
boolean flip; // screenflip
|
||||||
<<<<<<< HEAD
|
|
||||||
#ifdef USE_FTRANSFORM_MIRROR
|
|
||||||
boolean mirror; // SRB2Kart: Encore Mode
|
|
||||||
#endif
|
|
||||||
boolean shearing; // 14042019
|
boolean shearing; // 14042019
|
||||||
angle_t viewaiming; // 17052019
|
angle_t viewaiming; // 17052019
|
||||||
=======
|
|
||||||
boolean roll;
|
boolean roll;
|
||||||
SINT8 rollflip;
|
SINT8 rollflip;
|
||||||
FLOAT rollangle; // done to not override USE_FTRANSFORM_ANGLEZ
|
FLOAT rollangle; // done to not override USE_FTRANSFORM_ANGLEZ
|
||||||
|
|
@ -188,7 +177,6 @@ typedef struct
|
||||||
#ifdef USE_FTRANSFORM_MIRROR
|
#ifdef USE_FTRANSFORM_MIRROR
|
||||||
boolean mirror; // SRB2Kart: Encore Mode
|
boolean mirror; // SRB2Kart: Encore Mode
|
||||||
#endif
|
#endif
|
||||||
>>>>>>> srb2/next
|
|
||||||
} FTransform;
|
} FTransform;
|
||||||
|
|
||||||
// Transformed vector, as passed to HWR API
|
// Transformed vector, as passed to HWR API
|
||||||
|
|
@ -226,15 +214,9 @@ enum EPolyFlags
|
||||||
PF_Decal = 0x00000800, // Enable polygon offset
|
PF_Decal = 0x00000800, // Enable polygon offset
|
||||||
PF_Modulated = 0x00001000, // Modulation (multiply output with constant ARGB)
|
PF_Modulated = 0x00001000, // Modulation (multiply output with constant ARGB)
|
||||||
// When set, pass the color constant into the FSurfaceInfo -> FlatColor
|
// When set, pass the color constant into the FSurfaceInfo -> FlatColor
|
||||||
<<<<<<< HEAD
|
|
||||||
PF_NoTexture = 0x00002000, // Disable texture
|
|
||||||
PF_Ripple = 0x00004000, // Water shader effect
|
|
||||||
// 0x00008000
|
|
||||||
=======
|
|
||||||
PF_NoTexture = 0x00002000, // Use the small white texture
|
PF_NoTexture = 0x00002000, // Use the small white texture
|
||||||
PF_Corona = 0x00004000, // Tell the rendrer we are drawing a corona
|
PF_Corona = 0x00004000, // Tell the rendrer we are drawing a corona
|
||||||
PF_Unused = 0x00008000, // Unused
|
PF_Unused = 0x00008000, // Unused
|
||||||
>>>>>>> srb2/next
|
|
||||||
PF_RemoveYWrap = 0x00010000, // Force clamp texture on Y
|
PF_RemoveYWrap = 0x00010000, // Force clamp texture on Y
|
||||||
PF_ForceWrapX = 0x00020000, // Force repeat texture on X
|
PF_ForceWrapX = 0x00020000, // Force repeat texture on X
|
||||||
PF_ForceWrapY = 0x00040000, // Force repeat texture on Y
|
PF_ForceWrapY = 0x00040000, // Force repeat texture on Y
|
||||||
|
|
@ -277,15 +259,11 @@ typedef struct FSurfaceInfo FSurfaceInfo;
|
||||||
|
|
||||||
enum hwdsetspecialstate
|
enum hwdsetspecialstate
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
HWD_SET_SHADERS = 1,
|
||||||
HWD_SET_SHADERS,
|
HWD_SET_MODEL_LIGHTING,
|
||||||
|
|
||||||
=======
|
|
||||||
HWD_SET_MODEL_LIGHTING = 1,
|
|
||||||
HWD_SET_FOG_MODE,
|
HWD_SET_FOG_MODE,
|
||||||
HWD_SET_FOG_COLOR,
|
HWD_SET_FOG_COLOR,
|
||||||
HWD_SET_FOG_DENSITY,
|
HWD_SET_FOG_DENSITY,
|
||||||
>>>>>>> srb2/next
|
|
||||||
HWD_SET_TEXTUREFILTERMODE,
|
HWD_SET_TEXTUREFILTERMODE,
|
||||||
HWD_SET_TEXTUREANISOTROPICMODE,
|
HWD_SET_TEXTUREANISOTROPICMODE,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -200,13 +200,12 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
||||||
cy -= offsety;
|
cy -= offsety;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if (option & V_SPLITSCREEN)
|
if (option & V_SPLITSCREEN)
|
||||||
cy += FIXED_TO_FLOAT((BASEVIDHEIGHT/2)<<FRACBITS);
|
cy += FIXED_TO_FLOAT((BASEVIDHEIGHT/2)<<FRACBITS);
|
||||||
|
|
||||||
if (option & V_HORZSCREEN)
|
if (option & V_HORZSCREEN)
|
||||||
cx += FIXED_TO_FLOAT((BASEVIDWIDTH/2)<<FRACBITS);
|
cx += FIXED_TO_FLOAT((BASEVIDWIDTH/2)<<FRACBITS);
|
||||||
=======
|
|
||||||
if (splitscreen && (option & V_PERPLAYER))
|
if (splitscreen && (option & V_PERPLAYER))
|
||||||
{
|
{
|
||||||
float adjusty = ((option & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
|
float adjusty = ((option & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
|
||||||
|
|
@ -274,7 +273,6 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
if (!(option & V_NOSCALESTART))
|
if (!(option & V_NOSCALESTART))
|
||||||
{
|
{
|
||||||
|
|
@ -377,19 +375,11 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
||||||
if (alphalevel)
|
if (alphalevel)
|
||||||
{
|
{
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
<<<<<<< HEAD
|
|
||||||
Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff;
|
|
||||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[hudtrans];
|
|
||||||
else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[hudtrans];
|
|
||||||
else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[hudtrans];
|
|
||||||
else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
|
|
||||||
=======
|
|
||||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[st_translucency];
|
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[st_translucency];
|
||||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||||
>>>>>>> srb2/next
|
|
||||||
flags |= PF_Modulated;
|
flags |= PF_Modulated;
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||||
}
|
}
|
||||||
|
|
@ -520,12 +510,6 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
|
|
||||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
v[0].s = v[3].s = ((sx)/(float)SHORT(gpatch->width) )*gpatch->max_s;
|
|
||||||
v[2].s = v[1].s = ((w )/(float)SHORT(gpatch->width) )*gpatch->max_s;
|
|
||||||
v[0].t = v[1].t = ((sy)/(float)SHORT(gpatch->height))*gpatch->max_t;
|
|
||||||
v[2].t = v[3].t = ((h )/(float)SHORT(gpatch->height))*gpatch->max_t;
|
|
||||||
=======
|
|
||||||
v[0].sow = v[3].sow = ((sx )/(float)SHORT(gpatch->width) )*gpatch->max_s;
|
v[0].sow = v[3].sow = ((sx )/(float)SHORT(gpatch->width) )*gpatch->max_s;
|
||||||
if (sx + w > SHORT(gpatch->width))
|
if (sx + w > SHORT(gpatch->width))
|
||||||
v[2].sow = v[1].sow = gpatch->max_s;
|
v[2].sow = v[1].sow = gpatch->max_s;
|
||||||
|
|
@ -537,7 +521,6 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
v[2].tow = v[3].tow = gpatch->max_t;
|
v[2].tow = v[3].tow = gpatch->max_t;
|
||||||
else
|
else
|
||||||
v[2].tow = v[3].tow = ((sy+h)/(float)SHORT(gpatch->height))*gpatch->max_t;
|
v[2].tow = v[3].tow = ((sy+h)/(float)SHORT(gpatch->height))*gpatch->max_t;
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
flags = PF_Translucent|PF_NoDepthTest;
|
flags = PF_Translucent|PF_NoDepthTest;
|
||||||
|
|
||||||
|
|
@ -550,19 +533,11 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
if (alphalevel)
|
if (alphalevel)
|
||||||
{
|
{
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
<<<<<<< HEAD
|
|
||||||
Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff;
|
|
||||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[cv_translucenthud.value];
|
|
||||||
else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
|
||||||
else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
|
||||||
else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
|
|
||||||
=======
|
|
||||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[st_translucency];
|
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[st_translucency];
|
||||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||||
>>>>>>> srb2/next
|
|
||||||
flags |= PF_Modulated;
|
flags |= PF_Modulated;
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||||
}
|
}
|
||||||
|
|
@ -635,11 +610,7 @@ void HWR_DrawFlatFill (INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum
|
||||||
v[0].t = v[1].t = (float)((y & flatflag)/dflatsize);
|
v[0].t = v[1].t = (float)((y & flatflag)/dflatsize);
|
||||||
v[2].t = v[3].t = (float)(v[0].t + h/dflatsize);
|
v[2].t = v[3].t = (float)(v[0].t + h/dflatsize);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
HWR_LiterallyGetFlat(flatlumpnum, false);
|
||||||
HWR_GetFlat(flatlumpnum, false); // Never Encore map drawflatfill, duh.
|
|
||||||
=======
|
|
||||||
HWR_LiterallyGetFlat(flatlumpnum);
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
//Hurdler: Boris, the same comment as above... but maybe for pics
|
//Hurdler: Boris, the same comment as above... but maybe for pics
|
||||||
// it not a problem since they don't have any transparent pixel
|
// it not a problem since they don't have any transparent pixel
|
||||||
|
|
@ -660,33 +631,6 @@ void HWR_DrawFlatFill (INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum
|
||||||
// 0--1
|
// 0--1
|
||||||
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength)
|
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
FOutVector v[4];
|
|
||||||
FSurfaceInfo Surf;
|
|
||||||
|
|
||||||
v[0].x = v[3].x = -1.0f;
|
|
||||||
v[2].x = v[1].x = 1.0f;
|
|
||||||
v[0].y = v[1].y = -1.0f;
|
|
||||||
v[2].y = v[3].y = 1.0f;
|
|
||||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
|
||||||
|
|
||||||
v[0].s = v[3].s = 0.0f;
|
|
||||||
v[2].s = v[1].s = 1.0f;
|
|
||||||
v[0].t = v[1].t = 1.0f;
|
|
||||||
v[2].t = v[3].t = 0.0f;
|
|
||||||
|
|
||||||
if (color & 0xFF00) // Do COLORMAP fade.
|
|
||||||
{
|
|
||||||
Surf.PolyColor.rgba = UINT2RGBA(0x01010160);
|
|
||||||
Surf.PolyColor.s.alpha = (strength*8);
|
|
||||||
}
|
|
||||||
else // Do TRANSMAP** fade.
|
|
||||||
{
|
|
||||||
Surf.PolyColor.rgba = pLocalPalette[color].rgba;
|
|
||||||
Surf.PolyColor.s.alpha = (UINT8)(strength*25.5f);
|
|
||||||
}
|
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
|
||||||
=======
|
|
||||||
FOutVector v[4];
|
FOutVector v[4];
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
|
|
||||||
|
|
@ -887,7 +831,6 @@ void HWR_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT16 ac
|
||||||
Surf.FlatColor.s.alpha = softwaretranstogl[strength];
|
Surf.FlatColor.s.alpha = softwaretranstogl[strength];
|
||||||
}
|
}
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the console background with translucency support
|
// Draw the console background with translucency support
|
||||||
|
|
@ -1357,13 +1300,8 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32
|
||||||
v[0].t = v[1].t = 0.0f;
|
v[0].t = v[1].t = 0.0f;
|
||||||
v[2].t = v[3].t = 1.0f;
|
v[2].t = v[3].t = 1.0f;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
Surf.PolyColor.rgba = UINT2RGBA(color);
|
|
||||||
Surf.PolyColor.s.alpha = 0x80;
|
|
||||||
=======
|
|
||||||
Surf.FlatColor.rgba = UINT2RGBA(actualcolor);
|
Surf.FlatColor.rgba = UINT2RGBA(actualcolor);
|
||||||
Surf.FlatColor.s.alpha = 0x80;
|
Surf.FlatColor.s.alpha = 0x80;
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,6 @@
|
||||||
// STANDARD DLL EXPORTS
|
// STANDARD DLL EXPORTS
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
EXPORT boolean HWRAPI(Init) (void);
|
|
||||||
#if defined (PURESDL) || defined (macintosh)
|
|
||||||
EXPORT void HWRAPI(SetPalette) (INT32 *, RGBA_t *gamma);
|
|
||||||
#else
|
|
||||||
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal, RGBA_t *pgamma);
|
|
||||||
#endif
|
|
||||||
=======
|
|
||||||
EXPORT boolean HWRAPI(Init) (I_Error_t ErrorFunction);
|
EXPORT boolean HWRAPI(Init) (I_Error_t ErrorFunction);
|
||||||
#ifndef HAVE_SDL
|
#ifndef HAVE_SDL
|
||||||
EXPORT void HWRAPI(Shutdown) (void);
|
EXPORT void HWRAPI(Shutdown) (void);
|
||||||
|
|
@ -42,7 +34,6 @@ EXPORT void HWRAPI(Shutdown) (void);
|
||||||
EXPORT void HWRAPI(GetModeList) (vmode_t **pvidmodes, INT32 *numvidmodes);
|
EXPORT void HWRAPI(GetModeList) (vmode_t **pvidmodes, INT32 *numvidmodes);
|
||||||
#endif
|
#endif
|
||||||
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal);
|
EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal);
|
||||||
>>>>>>> srb2/next
|
|
||||||
EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl);
|
EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl);
|
||||||
EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
|
EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
|
||||||
EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags);
|
EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags);
|
||||||
|
|
@ -58,24 +49,15 @@ EXPORT void HWRAPI(ClearMipMapCache) (void);
|
||||||
EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value);
|
EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value);
|
||||||
|
|
||||||
//Hurdler: added for new development
|
//Hurdler: added for new development
|
||||||
<<<<<<< HEAD
|
|
||||||
EXPORT void HWRAPI(DrawModel) (model_t *model, INT32 frameIndex, INT32 duration, INT32 tics, INT32 nextFrameIndex, FTransform *pos, float scale, UINT8 flipped, FSurfaceInfo *Surface);
|
EXPORT void HWRAPI(DrawModel) (model_t *model, INT32 frameIndex, INT32 duration, INT32 tics, INT32 nextFrameIndex, FTransform *pos, float scale, UINT8 flipped, FSurfaceInfo *Surface);
|
||||||
EXPORT void HWRAPI(CreateModelVBOs) (model_t *model);
|
EXPORT void HWRAPI(CreateModelVBOs) (model_t *model);
|
||||||
EXPORT void HWRAPI(SetTransform) (FTransform *stransform);
|
EXPORT void HWRAPI(SetTransform) (FTransform *stransform);
|
||||||
=======
|
|
||||||
EXPORT void HWRAPI(DrawModel) (model_t *model, INT32 frameIndex, INT32 duration, INT32 tics, INT32 nextFrameIndex, FTransform *pos, float scale, UINT8 flipped, UINT8 *color);
|
|
||||||
EXPORT void HWRAPI(CreateModelVBOs) (model_t *model);
|
|
||||||
EXPORT void HWRAPI(SetTransform) (FTransform *ptransform);
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
EXPORT INT32 HWRAPI(GetTextureUsed) (void);
|
EXPORT INT32 HWRAPI(GetTextureUsed) (void);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
EXPORT void HWRAPI(RenderSkyDome) (INT32 tex, INT32 texture_width, INT32 texture_height, FTransform transform);
|
EXPORT void HWRAPI(RenderSkyDome) (INT32 tex, INT32 texture_width, INT32 texture_height, FTransform transform);
|
||||||
|
|
||||||
=======
|
|
||||||
#define SCREENVERTS 10
|
#define SCREENVERTS 10
|
||||||
EXPORT void HWRAPI(PostImgRedraw) (float points[SCREENVERTS][SCREENVERTS][2]);
|
EXPORT void HWRAPI(PostImgRedraw) (float points[SCREENVERTS][SCREENVERTS][2]);
|
||||||
>>>>>>> srb2/next
|
|
||||||
EXPORT void HWRAPI(FlushScreenTextures) (void);
|
EXPORT void HWRAPI(FlushScreenTextures) (void);
|
||||||
EXPORT void HWRAPI(StartScreenWipe) (void);
|
EXPORT void HWRAPI(StartScreenWipe) (void);
|
||||||
EXPORT void HWRAPI(EndScreenWipe) (void);
|
EXPORT void HWRAPI(EndScreenWipe) (void);
|
||||||
|
|
@ -120,17 +102,11 @@ struct hwdriver_s
|
||||||
ReadRect pfnReadRect;
|
ReadRect pfnReadRect;
|
||||||
GClipRect pfnGClipRect;
|
GClipRect pfnGClipRect;
|
||||||
ClearMipMapCache pfnClearMipMapCache;
|
ClearMipMapCache pfnClearMipMapCache;
|
||||||
<<<<<<< HEAD
|
|
||||||
SetSpecialState pfnSetSpecialState;
|
|
||||||
=======
|
|
||||||
SetSpecialState pfnSetSpecialState;//Hurdler: added for backward compatibility
|
SetSpecialState pfnSetSpecialState;//Hurdler: added for backward compatibility
|
||||||
>>>>>>> srb2/next
|
|
||||||
DrawModel pfnDrawModel;
|
DrawModel pfnDrawModel;
|
||||||
CreateModelVBOs pfnCreateModelVBOs;
|
CreateModelVBOs pfnCreateModelVBOs;
|
||||||
SetTransform pfnSetTransform;
|
SetTransform pfnSetTransform;
|
||||||
GetTextureUsed pfnGetTextureUsed;
|
GetTextureUsed pfnGetTextureUsed;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
GetRenderVersion pfnGetRenderVersion;
|
GetRenderVersion pfnGetRenderVersion;
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
GetModeList pfnGetModeList;
|
GetModeList pfnGetModeList;
|
||||||
|
|
@ -138,7 +114,6 @@ struct hwdriver_s
|
||||||
#ifndef HAVE_SDL
|
#ifndef HAVE_SDL
|
||||||
Shutdown pfnShutdown;
|
Shutdown pfnShutdown;
|
||||||
#endif
|
#endif
|
||||||
>>>>>>> srb2/next
|
|
||||||
PostImgRedraw pfnPostImgRedraw;
|
PostImgRedraw pfnPostImgRedraw;
|
||||||
FlushScreenTextures pfnFlushScreenTextures;
|
FlushScreenTextures pfnFlushScreenTextures;
|
||||||
StartScreenWipe pfnStartScreenWipe;
|
StartScreenWipe pfnStartScreenWipe;
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,15 @@
|
||||||
|
|
||||||
#include "hw_defs.h"
|
#include "hw_defs.h"
|
||||||
#include "../m_misc.h"
|
#include "../m_misc.h"
|
||||||
<<<<<<< HEAD
|
|
||||||
#include "../r_defs.h"
|
#include "../r_defs.h"
|
||||||
=======
|
|
||||||
#include "../p_setup.h"
|
#include "../p_setup.h"
|
||||||
|
|
||||||
// the original aspect ratio of Doom graphics isn't square
|
// the original aspect ratio of Doom graphics isn't square
|
||||||
#define ORIGINAL_ASPECT (320.0f/200.0f)
|
#define ORIGINAL_ASPECT (320.0f/200.0f)
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// Uncomment this to enable the OpenGL loading screen
|
// Uncomment this to enable the OpenGL loading screen
|
||||||
//#define HWR_LOADING_SCREEN
|
//#define HWR_LOADING_SCREEN
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
// -----------
|
// -----------
|
||||||
// structures
|
// structures
|
||||||
// -----------
|
// -----------
|
||||||
|
|
@ -85,7 +80,6 @@ typedef struct gr_vissprite_s
|
||||||
float z1, z2;
|
float z1, z2;
|
||||||
} gr_vissprite_t;
|
} gr_vissprite_t;
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
// --------
|
// --------
|
||||||
// hw_bsp.c
|
// hw_bsp.c
|
||||||
// --------
|
// --------
|
||||||
|
|
@ -100,14 +94,8 @@ void HWR_FreeTextureCache(void);
|
||||||
void HWR_FreeMipmapCache(void);
|
void HWR_FreeMipmapCache(void);
|
||||||
void HWR_FreeExtraSubsectors(void);
|
void HWR_FreeExtraSubsectors(void);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
void HWR_GetFlat(lumpnum_t flatlumpnum, boolean noencoremap);
|
|
||||||
// ^ some flats must NOT be remapped to encore, since we remap them as we cache them for ease, adding a toggle here seems wise.
|
|
||||||
|
|
||||||
=======
|
|
||||||
void HWR_GetLevelFlat(levelflat_t *levelflat);
|
void HWR_GetLevelFlat(levelflat_t *levelflat);
|
||||||
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum);
|
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap);
|
||||||
>>>>>>> srb2/next
|
|
||||||
GLTexture_t *HWR_GetTexture(INT32 tex);
|
GLTexture_t *HWR_GetTexture(INT32 tex);
|
||||||
void HWR_GetPatch(GLPatch_t *gpatch);
|
void HWR_GetPatch(GLPatch_t *gpatch);
|
||||||
void HWR_GetMappedPatch(GLPatch_t *gpatch, const UINT8 *colormap);
|
void HWR_GetMappedPatch(GLPatch_t *gpatch, const UINT8 *colormap);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -252,11 +252,8 @@ model_t *MD2_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
md2triangle_t *tris;
|
md2triangle_t *tris;
|
||||||
md2texcoord_t *texcoords;
|
md2texcoord_t *texcoords;
|
||||||
md2frame_t *frames;
|
md2frame_t *frames;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
int foffset = 0;
|
int foffset = 0;
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
|
|
@ -331,8 +328,6 @@ model_t *MD2_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
texcoords = (md2texcoord_t*)&buffer[header->offsetST];
|
texcoords = (md2texcoord_t*)&buffer[header->offsetST];
|
||||||
frames = (md2frame_t*)&buffer[header->offsetFrames];
|
frames = (md2frame_t*)&buffer[header->offsetFrames];
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
retModel->framenames = (char*)Z_Calloc(header->numFrames*16, ztag, 0);
|
retModel->framenames = (char*)Z_Calloc(header->numFrames*16, ztag, 0);
|
||||||
fname = retModel->framenames;
|
fname = retModel->framenames;
|
||||||
for (i = 0; i < header->numFrames; i++)
|
for (i = 0; i < header->numFrames; i++)
|
||||||
|
|
@ -343,7 +338,6 @@ model_t *MD2_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
fname += 16;
|
fname += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
// Read in textures
|
// Read in textures
|
||||||
retModel->numMaterials = header->numSkins;
|
retModel->numMaterials = header->numSkins;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,11 +148,8 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
{
|
{
|
||||||
const float WUNITS = 1.0f;
|
const float WUNITS = 1.0f;
|
||||||
model_t *retModel = NULL;
|
model_t *retModel = NULL;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
md3Frame *frames = NULL;
|
md3Frame *frames = NULL;
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
>>>>>>> srb2/next
|
|
||||||
md3modelHeader *mdh;
|
md3modelHeader *mdh;
|
||||||
long fileLen;
|
long fileLen;
|
||||||
long fileReadLen;
|
long fileReadLen;
|
||||||
|
|
@ -232,8 +229,6 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
|
|
||||||
retModel->meshes = (mesh_t*)Z_Calloc(sizeof(mesh_t)*retModel->numMeshes, ztag, 0);
|
retModel->meshes = (mesh_t*)Z_Calloc(sizeof(mesh_t)*retModel->numMeshes, ztag, 0);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
frames = (md3Frame*)&buffer[mdh->offsetFrames];
|
frames = (md3Frame*)&buffer[mdh->offsetFrames];
|
||||||
retModel->framenames = (char*)Z_Calloc(mdh->numFrames*16, ztag, 0);
|
retModel->framenames = (char*)Z_Calloc(mdh->numFrames*16, ztag, 0);
|
||||||
fname = retModel->framenames;
|
fname = retModel->framenames;
|
||||||
|
|
@ -244,7 +239,6 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
||||||
frames++;
|
frames++;
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
matCount = 0;
|
matCount = 0;
|
||||||
for (i = 0, surfEnd = 0; i < mdh->numSurfaces; i++)
|
for (i = 0, surfEnd = 0; i < mdh->numSurfaces; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,6 @@
|
||||||
the licensing is for Sonic Robo Blast 2.
|
the licensing is for Sonic Robo Blast 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#include "../z_zone.h"
|
|
||||||
#include "../doomdef.h"
|
|
||||||
#include "hw_model.h"
|
|
||||||
#include "hw_md2load.h"
|
|
||||||
#include "hw_md3load.h"
|
|
||||||
=======
|
|
||||||
#include "../doomdef.h"
|
#include "../doomdef.h"
|
||||||
#include "../doomtype.h"
|
#include "../doomtype.h"
|
||||||
#include "../info.h"
|
#include "../info.h"
|
||||||
|
|
@ -22,7 +15,6 @@
|
||||||
#include "hw_md2load.h"
|
#include "hw_md2load.h"
|
||||||
#include "hw_md3load.h"
|
#include "hw_md3load.h"
|
||||||
#include "hw_md2.h"
|
#include "hw_md2.h"
|
||||||
>>>>>>> srb2/next
|
|
||||||
#include "u_list.h"
|
#include "u_list.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
@ -206,12 +198,9 @@ model_t *LoadModel(const char *filename, int ztag)
|
||||||
|
|
||||||
Optimize(model);
|
Optimize(model);
|
||||||
GeneratePolygonNormals(model, ztag);
|
GeneratePolygonNormals(model, ztag);
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
LoadModelSprite2(model);
|
LoadModelSprite2(model);
|
||||||
if (!model->spr2frames)
|
if (!model->spr2frames)
|
||||||
LoadModelInterpolationSettings(model);
|
LoadModelInterpolationSettings(model);
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// Default material properties
|
// Default material properties
|
||||||
for (i = 0 ; i < model->numMaterials; i++)
|
for (i = 0 ; i < model->numMaterials; i++)
|
||||||
|
|
@ -235,8 +224,6 @@ model_t *LoadModel(const char *filename, int ztag)
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
void HWR_ReloadModels(void)
|
void HWR_ReloadModels(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
@ -375,7 +362,6 @@ void LoadModelSprite2(model_t *model)
|
||||||
model->spr2frames = spr2frames;
|
model->spr2frames = spr2frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// GenerateVertexNormals
|
// GenerateVertexNormals
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,6 @@ typedef struct tag_s
|
||||||
// matrix_t transform;
|
// matrix_t transform;
|
||||||
} tag_t;
|
} tag_t;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#define MODEL_INTERPOLATION_FLAG "+i"
|
#define MODEL_INTERPOLATION_FLAG "+i"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
@ -84,7 +82,6 @@ typedef struct
|
||||||
boolean interpolate;
|
boolean interpolate;
|
||||||
} modelspr2frames_t;
|
} modelspr2frames_t;
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
typedef struct model_s
|
typedef struct model_s
|
||||||
{
|
{
|
||||||
int maxNumFrames;
|
int maxNumFrames;
|
||||||
|
|
@ -98,32 +95,23 @@ typedef struct model_s
|
||||||
|
|
||||||
char *mdlFilename;
|
char *mdlFilename;
|
||||||
boolean unloaded;
|
boolean unloaded;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
char *framenames;
|
char *framenames;
|
||||||
boolean interpolate[256];
|
boolean interpolate[256];
|
||||||
modelspr2frames_t *spr2frames;
|
modelspr2frames_t *spr2frames;
|
||||||
>>>>>>> srb2/next
|
|
||||||
} model_t;
|
} model_t;
|
||||||
|
|
||||||
extern int numModels;
|
extern int numModels;
|
||||||
extern model_t *modelHead;
|
extern model_t *modelHead;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
void HWR_ReloadModels(void);
|
void HWR_ReloadModels(void);
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
tag_t *GetTagByName(model_t *model, char *name, int frame);
|
tag_t *GetTagByName(model_t *model, char *name, int frame);
|
||||||
model_t *LoadModel(const char *filename, int ztag);
|
model_t *LoadModel(const char *filename, int ztag);
|
||||||
void UnloadModel(model_t *model);
|
void UnloadModel(model_t *model);
|
||||||
void Optimize(model_t *model);
|
void Optimize(model_t *model);
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
void LoadModelInterpolationSettings(model_t *model);
|
void LoadModelInterpolationSettings(model_t *model);
|
||||||
void LoadModelSprite2(model_t *model);
|
void LoadModelSprite2(model_t *model);
|
||||||
>>>>>>> srb2/next
|
|
||||||
void GenerateVertexNormals(model_t *model);
|
void GenerateVertexNormals(model_t *model);
|
||||||
void GeneratePolygonNormals(model_t *model, int ztag);
|
void GeneratePolygonNormals(model_t *model, int ztag);
|
||||||
void CreateVBOTiny(mesh_t *mesh, tinyframe_t *frame);
|
void CreateVBOTiny(mesh_t *mesh, tinyframe_t *frame);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue