mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +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
9915d443dc
17 changed files with 19 additions and 647 deletions
|
|
@ -1,13 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
|
@ -422,140 +416,6 @@ static void HWR_DrawTexturePatchInCache(GLMipmap_t *mipmap,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
// 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,
|
|
||||||
GLTexInfo *grInfo)
|
|
||||||
{
|
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
|
||||||
// Build the full textures from patches.
|
|
||||||
static const GLlod_t gr_lods[9] =
|
|
||||||
{
|
|
||||||
GR_LOD_LOG2_256,
|
|
||||||
GR_LOD_LOG2_128,
|
|
||||||
GR_LOD_LOG2_64,
|
|
||||||
GR_LOD_LOG2_32,
|
|
||||||
GR_LOD_LOG2_16,
|
|
||||||
GR_LOD_LOG2_8,
|
|
||||||
GR_LOD_LOG2_4,
|
|
||||||
GR_LOD_LOG2_2,
|
|
||||||
GR_LOD_LOG2_1
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
GLAspectRatio_t aspect;
|
|
||||||
float max_s;
|
|
||||||
float max_t;
|
|
||||||
} booring_aspect_t;
|
|
||||||
|
|
||||||
static const booring_aspect_t gr_aspects[8] =
|
|
||||||
{
|
|
||||||
{GR_ASPECT_LOG2_1x1, 255, 255},
|
|
||||||
{GR_ASPECT_LOG2_2x1, 255, 127},
|
|
||||||
{GR_ASPECT_LOG2_4x1, 255, 63},
|
|
||||||
{GR_ASPECT_LOG2_8x1, 255, 31},
|
|
||||||
|
|
||||||
{GR_ASPECT_LOG2_1x1, 255, 255},
|
|
||||||
{GR_ASPECT_LOG2_1x2, 127, 255},
|
|
||||||
{GR_ASPECT_LOG2_1x4, 63, 255},
|
|
||||||
{GR_ASPECT_LOG2_1x8, 31, 255}
|
|
||||||
};
|
|
||||||
|
|
||||||
INT32 j,k;
|
|
||||||
INT32 max,min;
|
|
||||||
#else
|
|
||||||
(void)grInfo;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 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");
|
|
||||||
|
|
||||||
blockheight = 256;
|
|
||||||
while (originalheight < blockheight)
|
|
||||||
blockheight >>= 1;
|
|
||||||
if (blockheight < 1)
|
|
||||||
I_Error("3D GenerateTexture : too small");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
|
||||||
//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");
|
|
||||||
#else
|
|
||||||
blockwidth = originalwidth;
|
|
||||||
blockheight = originalheight;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// do the boring LOD stuff.. blech!
|
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
|
||||||
if (blockwidth >= blockheight)
|
|
||||||
{
|
|
||||||
max = blockwidth;
|
|
||||||
min = blockheight;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
max = blockheight;
|
|
||||||
min = blockwidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (k = 2048, j = 0; k > max; j++)
|
|
||||||
k>>=1;
|
|
||||||
grInfo->smallLodLog2 = gr_lods[j];
|
|
||||||
grInfo->largeLodLog2 = gr_lods[j];
|
|
||||||
|
|
||||||
for (k = max, j = 0; k > min && j < 4; j++)
|
|
||||||
k>>=1;
|
|
||||||
// aspect ratio too small for 3Dfx (eg: 8x128 is 1x16 : use 1x8)
|
|
||||||
if (j == 4)
|
|
||||||
{
|
|
||||||
j = 3;
|
|
||||||
//CONS_Debug(DBG_RENDER, "HWR_ResizeBlock : bad aspect ratio %dx%d\n", blockwidth,blockheight);
|
|
||||||
if (blockwidth < blockheight)
|
|
||||||
blockwidth = max>>3;
|
|
||||||
else
|
|
||||||
blockheight = max>>3;
|
|
||||||
}
|
|
||||||
if (blockwidth < blockheight)
|
|
||||||
j += 4;
|
|
||||||
grInfo->aspectRatioLog2 = gr_aspects[j].aspect;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
blocksize = blockwidth * blockheight;
|
|
||||||
|
|
||||||
//CONS_Debug(DBG_RENDER, "Width is %d, Height is %d\n", blockwidth, blockheight);
|
|
||||||
}
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
static UINT8 *MakeBlock(GLMipmap_t *grMipmap)
|
static UINT8 *MakeBlock(GLMipmap_t *grMipmap)
|
||||||
{
|
{
|
||||||
UINT8 *block;
|
UINT8 *block;
|
||||||
|
|
@ -617,7 +477,6 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
|
||||||
grtex->mipmap.height = (UINT16)texture->height;
|
grtex->mipmap.height = (UINT16)texture->height;
|
||||||
grtex->mipmap.format = textureformat;
|
grtex->mipmap.format = textureformat;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
grtex->mipmap.colormap = colormaps;
|
grtex->mipmap.colormap = colormaps;
|
||||||
|
|
||||||
#ifdef GLENCORE
|
#ifdef GLENCORE
|
||||||
|
|
@ -625,11 +484,9 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
|
||||||
grtex->mipmap.colormap += (256*32);
|
grtex->mipmap.colormap += (256*32);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
=======
|
|
||||||
blockwidth = texture->width;
|
blockwidth = texture->width;
|
||||||
blockheight = texture->height;
|
blockheight = texture->height;
|
||||||
blocksize = (blockwidth * blockheight);
|
blocksize = (blockwidth * blockheight);
|
||||||
>>>>>>> srb2/next
|
|
||||||
block = MakeBlock(&grtex->mipmap);
|
block = MakeBlock(&grtex->mipmap);
|
||||||
|
|
||||||
if (skyspecial) //Hurdler: not efficient, but better than holes in the sky (and it's done only at level loading)
|
if (skyspecial) //Hurdler: not efficient, but better than holes in the sky (and it's done only at level loading)
|
||||||
|
|
@ -716,16 +573,9 @@ void HWR_MakePatch (patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, bo
|
||||||
grPatch->leftoffset = SHORT(patch->leftoffset);
|
grPatch->leftoffset = SHORT(patch->leftoffset);
|
||||||
grPatch->topoffset = SHORT(patch->topoffset);
|
grPatch->topoffset = SHORT(patch->topoffset);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// resize patch
|
|
||||||
HWR_ResizeBlock(SHORT(patch->width), SHORT(patch->height), &grMipmap->grInfo);
|
|
||||||
grMipmap->width = (UINT16)blockwidth;
|
|
||||||
grMipmap->height = (UINT16)blockheight;
|
|
||||||
=======
|
|
||||||
grMipmap->width = grMipmap->height = 1;
|
grMipmap->width = grMipmap->height = 1;
|
||||||
while (grMipmap->width < grPatch->width) grMipmap->width <<= 1;
|
while (grMipmap->width < grPatch->width) grMipmap->width <<= 1;
|
||||||
while (grMipmap->height < grPatch->height) grMipmap->height <<= 1;
|
while (grMipmap->height < grPatch->height) grMipmap->height <<= 1;
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// no wrap around, no chroma key
|
// no wrap around, no chroma key
|
||||||
grMipmap->flags = 0;
|
grMipmap->flags = 0;
|
||||||
|
|
@ -943,18 +793,7 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
|
||||||
|
|
||||||
// the flat raw data needn't be converted with palettized textures
|
// the flat raw data needn't be converted with palettized textures
|
||||||
W_ReadLump(flatlumpnum, Z_Malloc(W_LumpLength(flatlumpnum),
|
W_ReadLump(flatlumpnum, Z_Malloc(W_LumpLength(flatlumpnum),
|
||||||
<<<<<<< HEAD
|
|
||||||
PU_HWRCACHE, &grMipmap->grInfo.data));
|
|
||||||
|
|
||||||
#ifdef GLENCORE
|
|
||||||
flat = grMipmap->grInfo.data;
|
|
||||||
for (steppy = 0; steppy < size; steppy++)
|
|
||||||
if (flat[steppy] != HWR_PATCHES_CHROMAKEY_COLORINDEX)
|
|
||||||
flat[steppy] = grMipmap->colormap[flat[steppy]];
|
|
||||||
#endif
|
|
||||||
=======
|
|
||||||
PU_HWRCACHE, &grMipmap->data));
|
PU_HWRCACHE, &grMipmap->data));
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HWR_CacheTextureAsFlat(GLMipmap_t *grMipmap, INT32 texturenum)
|
static void HWR_CacheTextureAsFlat(GLMipmap_t *grMipmap, INT32 texturenum)
|
||||||
|
|
@ -982,7 +821,6 @@ void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
grmip->colormap = colormaps;
|
grmip->colormap = colormaps;
|
||||||
|
|
||||||
|
|
@ -999,10 +837,7 @@ void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
grmip = HWR_GetCachedGLPatch(flatlumpnum)->mipmap;
|
||||||
if (!grmip->downloaded && !grmip->grInfo.data)
|
|
||||||
=======
|
|
||||||
if (!grmip->downloaded && !grmip->data)
|
if (!grmip->downloaded && !grmip->data)
|
||||||
>>>>>>> srb2/next
|
|
||||||
HWR_CacheFlat(grmip, flatlumpnum);
|
HWR_CacheFlat(grmip, flatlumpnum);
|
||||||
|
|
||||||
// If hardware does not have the texture, then call pfnSetTexture to upload it
|
// If hardware does not have the texture, then call pfnSetTexture to upload it
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,14 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
// See the 'LICENSE' file for more details.
|
// See the 'LICENSE' file for more details.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
/// \file
|
|
||||||
/// \brief defines structures and exports for the standard GPU driver
|
|
||||||
=======
|
|
||||||
/// \file hw_data.h
|
/// \file hw_data.h
|
||||||
/// \brief defines structures and exports for the hardware interface used by Sonic Robo Blast 2
|
/// \brief defines structures and exports for the hardware interface used by Sonic Robo Blast 2
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
#ifndef _HWR_DATA_
|
#ifndef _HWR_DATA_
|
||||||
#define _HWR_DATA_
|
#define _HWR_DATA_
|
||||||
|
|
@ -37,61 +26,6 @@
|
||||||
// TEXTURE INFO
|
// TEXTURE INFO
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
//
|
|
||||||
// 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
|
|
||||||
{
|
|
||||||
GLTexInfo grInfo;
|
|
||||||
unsigned long flags;
|
|
||||||
UINT16 width, height;
|
|
||||||
UINT32 downloaded; // tex_downloaded
|
|
||||||
=======
|
|
||||||
typedef enum GLTextureFormat_e
|
typedef enum GLTextureFormat_e
|
||||||
{
|
{
|
||||||
GL_TEXFMT_P_8 = 0x01, /* 8-bit palette */
|
GL_TEXFMT_P_8 = 0x01, /* 8-bit palette */
|
||||||
|
|
@ -116,7 +50,6 @@ struct GLMipmap_s
|
||||||
UINT16 height;
|
UINT16 height;
|
||||||
UINT16 width;
|
UINT16 width;
|
||||||
UINT32 downloaded; // the dll driver have it in there cache ?
|
UINT32 downloaded; // the dll driver have it in there cache ?
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
struct GLMipmap_s *nextmipmap;
|
struct GLMipmap_s *nextmipmap;
|
||||||
struct GLMipmap_s *nextcolormap;
|
struct GLMipmap_s *nextcolormap;
|
||||||
|
|
|
||||||
|
|
@ -85,61 +85,6 @@ typedef struct
|
||||||
// a vertex of a Doom 'plane' polygon
|
// a vertex of a Doom 'plane' polygon
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
float z;
|
|
||||||
} polyvertex_t;
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable : 4200)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// a convex 'plane' polygon, clockwise order
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
INT32 numpts;
|
|
||||||
polyvertex_t pts[0];
|
|
||||||
} poly_t;
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(default : 4200)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// holds extra info for 3D render, for each subsector in subsectors[]
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
poly_t *planepoly; // the generated convex polygon
|
|
||||||
} extrasubsector_t;
|
|
||||||
|
|
||||||
// needed for sprite rendering
|
|
||||||
// equivalent of the software renderer's vissprites
|
|
||||||
typedef struct gr_vissprite_s
|
|
||||||
{
|
|
||||||
// Doubly linked list
|
|
||||||
struct gr_vissprite_s *prev;
|
|
||||||
struct gr_vissprite_s *next;
|
|
||||||
float x1, x2;
|
|
||||||
float z1, z2;
|
|
||||||
float tz, ty;
|
|
||||||
lumpnum_t patchlumpnum;
|
|
||||||
boolean flip;
|
|
||||||
UINT8 translucency; //alpha level 0-255
|
|
||||||
mobj_t *mobj;
|
|
||||||
boolean precip; // Tails 08-25-2002
|
|
||||||
boolean vflip;
|
|
||||||
//Hurdler: 25/04/2000: now support colormap in hardware mode
|
|
||||||
UINT8 *colormap;
|
|
||||||
INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing
|
|
||||||
} gr_vissprite_t;
|
|
||||||
|
|
||||||
// Kart features
|
|
||||||
#define USE_FTRANSFORM_ANGLEZ
|
|
||||||
#define USE_FTRANSFORM_MIRROR
|
|
||||||
|
|
||||||
// Vanilla features
|
|
||||||
//#define USE_MODEL_NEXTFRAME
|
|
||||||
=======
|
|
||||||
FLOAT x,y,z;
|
FLOAT x,y,z;
|
||||||
} FVector;
|
} FVector;
|
||||||
|
|
||||||
|
|
@ -152,7 +97,6 @@ typedef struct gr_vissprite_s
|
||||||
// -----------
|
// -----------
|
||||||
// structures
|
// structures
|
||||||
// -----------
|
// -----------
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
//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))))
|
||||||
|
|
@ -194,11 +138,6 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
FLOAT x,y,z;
|
FLOAT x,y,z;
|
||||||
<<<<<<< HEAD
|
|
||||||
FLOAT s,t;
|
|
||||||
} FOutVector;
|
|
||||||
|
|
||||||
=======
|
|
||||||
FLOAT s; // s texture ordinate (s over w)
|
FLOAT s; // s texture ordinate (s over w)
|
||||||
FLOAT t; // t texture ordinate (t over w)
|
FLOAT t; // t texture ordinate (t over w)
|
||||||
} FOutVector;
|
} FOutVector;
|
||||||
|
|
@ -238,7 +177,6 @@ typedef struct
|
||||||
gl_skyvertex_t *data;
|
gl_skyvertex_t *data;
|
||||||
} gl_sky_t;
|
} gl_sky_t;
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// RENDER MODES
|
// RENDER MODES
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
@ -273,12 +211,6 @@ enum EPolyFlags
|
||||||
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
|
||||||
<<<<<<< HEAD
|
|
||||||
// 0x20000000
|
|
||||||
// 0x40000000
|
|
||||||
// 0x80000000
|
|
||||||
|
|
||||||
=======
|
|
||||||
PF_Clip = 0x40000000, // clip to frustum and nearz plane (glide only, automatic in opengl)
|
PF_Clip = 0x40000000, // clip to frustum and nearz plane (glide only, automatic in opengl)
|
||||||
PF_NoZClip = 0x20000000, // in conjonction with PF_Clip
|
PF_NoZClip = 0x20000000, // in conjonction with PF_Clip
|
||||||
PF_Debug = 0x80000000 // print debug message in driver :)
|
PF_Debug = 0x80000000 // print debug message in driver :)
|
||||||
|
|
@ -288,7 +220,6 @@ enum EPolyFlags
|
||||||
enum ESurfFlags
|
enum ESurfFlags
|
||||||
{
|
{
|
||||||
SF_DYNLIGHT = 0x00000001,
|
SF_DYNLIGHT = 0x00000001,
|
||||||
>>>>>>> srb2/next
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ETextureFlags
|
enum ETextureFlags
|
||||||
|
|
@ -322,15 +253,6 @@ struct FSurfaceInfo
|
||||||
};
|
};
|
||||||
typedef struct FSurfaceInfo FSurfaceInfo;
|
typedef struct FSurfaceInfo FSurfaceInfo;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
enum hwdsetspecialstate
|
|
||||||
{
|
|
||||||
HWD_SET_SHADERS = 1,
|
|
||||||
HWD_SET_MODEL_LIGHTING,
|
|
||||||
HWD_SET_FOG_MODE,
|
|
||||||
HWD_SET_FOG_COLOR,
|
|
||||||
HWD_SET_FOG_DENSITY,
|
|
||||||
=======
|
|
||||||
#define GL_DEFAULTMIX 0x00000000
|
#define GL_DEFAULTMIX 0x00000000
|
||||||
#define GL_DEFAULTFOG 0xFF000000
|
#define GL_DEFAULTFOG 0xFF000000
|
||||||
|
|
||||||
|
|
@ -339,7 +261,6 @@ enum hwdsetspecialstate
|
||||||
{
|
{
|
||||||
HWD_SET_MODEL_LIGHTING = 1,
|
HWD_SET_MODEL_LIGHTING = 1,
|
||||||
HWD_SET_SHADERS,
|
HWD_SET_SHADERS,
|
||||||
>>>>>>> srb2/next
|
|
||||||
HWD_SET_TEXTUREFILTERMODE,
|
HWD_SET_TEXTUREFILTERMODE,
|
||||||
HWD_SET_TEXTUREANISOTROPICMODE,
|
HWD_SET_TEXTUREANISOTROPICMODE,
|
||||||
|
|
||||||
|
|
@ -347,10 +268,6 @@ enum hwdsetspecialstate
|
||||||
};
|
};
|
||||||
typedef enum hwdsetspecialstate hwdspecialstate_t;
|
typedef enum hwdsetspecialstate hwdspecialstate_t;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#define GL_DEFAULTMIX 0x00000000
|
|
||||||
#define GL_DEFAULTFOG 0xFF000000
|
|
||||||
=======
|
|
||||||
// Lactozilla: Shader info
|
// Lactozilla: Shader info
|
||||||
// Generally set at the start of the frame.
|
// Generally set at the start of the frame.
|
||||||
enum hwdshaderinfo
|
enum hwdshaderinfo
|
||||||
|
|
@ -359,7 +276,6 @@ enum hwdshaderinfo
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum hwdshaderinfo hwdshaderinfo_t;
|
typedef enum hwdshaderinfo hwdshaderinfo_t;
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
enum hwdfiltermode
|
enum hwdfiltermode
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,6 @@
|
||||||
#define DEGREE (0.017453292519943295769236907684883l) // 2*PI/360
|
#define DEGREE (0.017453292519943295769236907684883l) // 2*PI/360
|
||||||
|
|
||||||
void GL_DBG_Printf(const char *format, ...) /*FUNCPRINTF*/;
|
void GL_DBG_Printf(const char *format, ...) /*FUNCPRINTF*/;
|
||||||
<<<<<<< HEAD
|
|
||||||
#define DBG_Printf GL_DBG_Printf
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
|
@ -550,8 +544,6 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum)
|
void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum)
|
||||||
{
|
{
|
||||||
FOutVector v[4];
|
FOutVector v[4];
|
||||||
|
|
@ -587,7 +579,6 @@ void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum)
|
||||||
HWD.pfnDrawPolygon(NULL, v, 4, PF_Translucent | PF_NoDepthTest | PF_Clip | PF_NoZClip);
|
HWD.pfnDrawPolygon(NULL, v, 4, PF_Translucent | PF_NoDepthTest | PF_Clip | PF_NoZClip);
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// V_VIDEO.C STUFF
|
// V_VIDEO.C STUFF
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
@ -958,17 +949,10 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
||||||
clearlines = BASEVIDHEIGHT; // refresh all
|
clearlines = BASEVIDHEIGHT; // refresh all
|
||||||
|
|
||||||
// calc view size based on original game resolution
|
// calc view size based on original game resolution
|
||||||
<<<<<<< HEAD
|
|
||||||
baseviewwidth = FixedInt(FixedDiv(FLOAT_TO_FIXED(gr_viewwidth), vid.fdupx)); //(cv_viewsize.value * BASEVIDWIDTH/10)&~7;
|
|
||||||
baseviewheight = FixedInt(FixedDiv(FLOAT_TO_FIXED(gr_viewheight), vid.fdupy));
|
|
||||||
top = FixedInt(FixedDiv(FLOAT_TO_FIXED(gr_baseviewwindowy), vid.fdupy));
|
|
||||||
side = FixedInt(FixedDiv(FLOAT_TO_FIXED(gr_baseviewwindowx), vid.fdupx));
|
|
||||||
=======
|
|
||||||
baseviewwidth = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwidth), vid.fdupx)); //(cv_viewsize.value * BASEVIDWIDTH/10)&~7;
|
baseviewwidth = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwidth), vid.fdupx)); //(cv_viewsize.value * BASEVIDWIDTH/10)&~7;
|
||||||
baseviewheight = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewheight), vid.fdupy));
|
baseviewheight = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewheight), vid.fdupy));
|
||||||
top = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_baseviewwindowy), vid.fdupy));
|
top = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_baseviewwindowy), vid.fdupy));
|
||||||
side = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwindowx), vid.fdupx));
|
side = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwindowx), vid.fdupx));
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// top
|
// top
|
||||||
HWR_DrawFlatFill(0, 0,
|
HWR_DrawFlatFill(0, 0,
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,14 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
// See the 'LICENSE' file for more details.
|
// See the 'LICENSE' file for more details.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
/// \file
|
|
||||||
/// \brief imports/exports for the GPU hardware low-level interface API
|
|
||||||
=======
|
|
||||||
/// \file hw_drv.h
|
/// \file hw_drv.h
|
||||||
/// \brief imports/exports for the 3D hardware low-level interface API
|
/// \brief imports/exports for the 3D hardware low-level interface API
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
#ifndef __HWR_DRV_H__
|
#ifndef __HWR_DRV_H__
|
||||||
#define __HWR_DRV_H__
|
#define __HWR_DRV_H__
|
||||||
|
|
@ -61,19 +50,10 @@ 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, UINT8 hflipped, FSurfaceInfo *Surface);
|
EXPORT void HWRAPI(DrawModel) (model_t *model, INT32 frameIndex, INT32 duration, INT32 tics, INT32 nextFrameIndex, FTransform *pos, float scale, UINT8 flipped, UINT8 hflipped, FSurfaceInfo *Surface);
|
||||||
>>>>>>> srb2/next
|
|
||||||
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 INT32 HWRAPI(GetTextureUsed) (void);
|
EXPORT INT32 HWRAPI(GetTextureUsed) (void);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
EXPORT void HWRAPI(RenderSkyDome) (INT32 tex, INT32 texture_width, INT32 texture_height, FTransform transform);
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
EXPORT void HWRAPI(FlushScreenTextures) (void);
|
EXPORT void HWRAPI(FlushScreenTextures) (void);
|
||||||
EXPORT void HWRAPI(StartScreenWipe) (void);
|
EXPORT void HWRAPI(StartScreenWipe) (void);
|
||||||
|
|
@ -93,17 +73,9 @@ EXPORT void HWRAPI(KillShaders) (void);
|
||||||
EXPORT void HWRAPI(SetShader) (int shader);
|
EXPORT void HWRAPI(SetShader) (int shader);
|
||||||
EXPORT void HWRAPI(UnSetShader) (void);
|
EXPORT void HWRAPI(UnSetShader) (void);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
EXPORT void HWRAPI(LoadCustomShader) (int number, char *shader, size_t size, boolean fragment);
|
|
||||||
EXPORT void HWRAPI(InitCustomShaders) (void);
|
|
||||||
|
|
||||||
EXPORT void HWRAPI(StartBatching) (void);
|
|
||||||
EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCalls, int *sNumShaders, int *sNumTextures, int *sNumPolyFlags, int *sNumColors);
|
|
||||||
=======
|
|
||||||
EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value);
|
EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value);
|
||||||
EXPORT void HWRAPI(LoadCustomShader) (int number, char *shader, size_t size, boolean fragment);
|
EXPORT void HWRAPI(LoadCustomShader) (int number, char *shader, size_t size, boolean fragment);
|
||||||
EXPORT boolean HWRAPI(InitCustomShaders) (void);
|
EXPORT boolean HWRAPI(InitCustomShaders) (void);
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// HWR DRIVER OBJECT, FOR CLIENT PROGRAM
|
// HWR DRIVER OBJECT, FOR CLIENT PROGRAM
|
||||||
|
|
@ -148,20 +120,6 @@ struct hwdriver_s
|
||||||
MakeScreenFinalTexture pfnMakeScreenFinalTexture;
|
MakeScreenFinalTexture pfnMakeScreenFinalTexture;
|
||||||
DrawScreenFinalTexture pfnDrawScreenFinalTexture;
|
DrawScreenFinalTexture pfnDrawScreenFinalTexture;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
RenderSkyDome pfnRenderSkyDome;
|
|
||||||
|
|
||||||
LoadShaders pfnLoadShaders;
|
|
||||||
KillShaders pfnKillShaders;
|
|
||||||
SetShader pfnSetShader;
|
|
||||||
UnSetShader pfnUnSetShader;
|
|
||||||
|
|
||||||
LoadCustomShader pfnLoadCustomShader;
|
|
||||||
InitCustomShaders pfnInitCustomShaders;
|
|
||||||
|
|
||||||
StartBatching pfnStartBatching;
|
|
||||||
RenderBatches pfnRenderBatches;
|
|
||||||
=======
|
|
||||||
LoadShaders pfnLoadShaders;
|
LoadShaders pfnLoadShaders;
|
||||||
KillShaders pfnKillShaders;
|
KillShaders pfnKillShaders;
|
||||||
SetShader pfnSetShader;
|
SetShader pfnSetShader;
|
||||||
|
|
@ -170,7 +128,6 @@ struct hwdriver_s
|
||||||
SetShaderInfo pfnSetShaderInfo;
|
SetShaderInfo pfnSetShaderInfo;
|
||||||
LoadCustomShader pfnLoadCustomShader;
|
LoadCustomShader pfnLoadCustomShader;
|
||||||
InitCustomShaders pfnInitCustomShaders;
|
InitCustomShaders pfnInitCustomShaders;
|
||||||
>>>>>>> srb2/next
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct hwdriver_s hwdriver;
|
extern struct hwdriver_s hwdriver;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
|
@ -98,13 +92,8 @@ void HWR_FreeMipmapCache(void);
|
||||||
void HWR_FreeExtraSubsectors(void);
|
void HWR_FreeExtraSubsectors(void);
|
||||||
|
|
||||||
void HWR_GetLevelFlat(levelflat_t *levelflat);
|
void HWR_GetLevelFlat(levelflat_t *levelflat);
|
||||||
<<<<<<< HEAD
|
|
||||||
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap);
|
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap);
|
||||||
GLTexture_t *HWR_GetTexture(INT32 tex);
|
|
||||||
=======
|
|
||||||
void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum);
|
|
||||||
GLMapTexture_t *HWR_GetTexture(INT32 tex);
|
GLMapTexture_t *HWR_GetTexture(INT32 tex);
|
||||||
>>>>>>> srb2/next
|
|
||||||
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);
|
||||||
void HWR_MakePatch(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);
|
||||||
|
|
@ -117,11 +106,6 @@ void HWR_GetFadeMask(lumpnum_t fademasklumpnum);
|
||||||
// --------
|
// --------
|
||||||
// hw_draw.c
|
// hw_draw.c
|
||||||
// --------
|
// --------
|
||||||
<<<<<<< HEAD
|
|
||||||
extern consvar_t cv_grrounddown; // on/off
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
extern INT32 patchformat;
|
extern INT32 patchformat;
|
||||||
extern INT32 textureformat;
|
extern INT32 textureformat;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
|
@ -420,15 +414,6 @@ static void md2_loadTexture(md2_t *model)
|
||||||
V_CubeApply(&image->s.red, &image->s.green, &image->s.blue);
|
V_CubeApply(&image->s.red, &image->s.green, &image->s.blue);
|
||||||
image++;
|
image++;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
|
||||||
// not correct!
|
|
||||||
grpatch->mipmap->grInfo.smallLodLog2 = GR_LOD_LOG2_256;
|
|
||||||
grpatch->mipmap->grInfo.largeLodLog2 = GR_LOD_LOG2_256;
|
|
||||||
grpatch->mipmap->grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HWD.pfnSetTexture(grpatch->mipmap);
|
HWD.pfnSetTexture(grpatch->mipmap);
|
||||||
|
|
@ -468,11 +453,7 @@ static void md2_loadBlendTexture(md2_t *model)
|
||||||
grpatch->mipmap->format = PCX_Load(filename, &w, &h, grpatch);
|
grpatch->mipmap->format = PCX_Load(filename, &w, &h, grpatch);
|
||||||
if (grpatch->mipmap->format == 0)
|
if (grpatch->mipmap->format == 0)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
grpatch->notfound = true;// mark it so its not searched for again repeatedly
|
|
||||||
=======
|
|
||||||
model->noblendfile = true; // mark it so its not searched for again repeatedly
|
model->noblendfile = true; // mark it so its not searched for again repeatedly
|
||||||
>>>>>>> srb2/next
|
|
||||||
Z_Free(filename);
|
Z_Free(filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -484,15 +465,6 @@ static void md2_loadBlendTexture(md2_t *model)
|
||||||
grpatch->height = (INT16)h;
|
grpatch->height = (INT16)h;
|
||||||
grpatch->mipmap->width = (UINT16)w;
|
grpatch->mipmap->width = (UINT16)w;
|
||||||
grpatch->mipmap->height = (UINT16)h;
|
grpatch->mipmap->height = (UINT16)h;
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
#ifdef GLIDE_API_COMPATIBILITY
|
|
||||||
// not correct!
|
|
||||||
grpatch->mipmap->grInfo.smallLodLog2 = GR_LOD_LOG2_256;
|
|
||||||
grpatch->mipmap->grInfo.largeLodLog2 = GR_LOD_LOG2_256;
|
|
||||||
grpatch->mipmap->grInfo.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HWD.pfnSetTexture(grpatch->mipmap); // We do need to do this so that it can be cleared and knows to recreate it when necessary
|
HWD.pfnSetTexture(grpatch->mipmap); // We do need to do this so that it can be cleared and knows to recreate it when necessary
|
||||||
|
|
@ -1313,13 +1285,6 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
||||||
}
|
}
|
||||||
|
|
||||||
HWR_Lighting(&Surf, lightlevel, colormap);
|
HWR_Lighting(&Surf, lightlevel, colormap);
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Surf.PolyColor.rgba = 0xFFFFFFFF;
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Surf.PolyColor.rgba = 0xFFFFFFFF;
|
Surf.PolyColor.rgba = 0xFFFFFFFF;
|
||||||
|
|
@ -1616,11 +1581,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HWD.pfnSetShader(4); // model shader
|
HWD.pfnSetShader(4); // model shader
|
||||||
<<<<<<< HEAD
|
|
||||||
HWD.pfnDrawModel(md2->model, frame, durs, tics, nextFrame, &p, finalscale, flip, color);
|
|
||||||
=======
|
|
||||||
HWD.pfnDrawModel(md2->model, frame, durs, tics, nextFrame, &p, finalscale, flip, hflip, &Surf);
|
HWD.pfnDrawModel(md2->model, frame, durs, tics, nextFrame, &p, finalscale, flip, hflip, &Surf);
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
// SONIC ROBO BLAST 2
|
// SONIC ROBO BLAST 2
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
<<<<<<< HEAD
|
|
||||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
||||||
// Copyright (C) 1999-2019 by Sonic Team Junior.
|
|
||||||
=======
|
|
||||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||||
>>>>>>> srb2/next
|
|
||||||
//
|
//
|
||||||
// This program is free software distributed under the
|
// This program is free software distributed under the
|
||||||
// terms of the GNU General Public License, version 2.
|
// terms of the GNU General Public License, version 2.
|
||||||
|
|
|
||||||
|
|
@ -94,11 +94,8 @@ static GLuint finalScreenTexture = 0;
|
||||||
// Lactozilla: Set shader programs and uniforms
|
// Lactozilla: Set shader programs and uniforms
|
||||||
static void *Shader_Load(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
|
static void *Shader_Load(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
|
||||||
static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
|
static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
static GLRGBAFloat shader_defaultcolor = {1.0f, 1.0f, 1.0f, 1.0f};
|
static GLRGBAFloat shader_defaultcolor = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// shortcut for ((float)1/i)
|
// shortcut for ((float)1/i)
|
||||||
static const GLfloat byte2float[256] = {
|
static const GLfloat byte2float[256] = {
|
||||||
|
|
@ -154,19 +151,11 @@ FUNCPRINTF void GL_DBG_Printf(const char *format, ...)
|
||||||
|
|
||||||
if (!gllogstream)
|
if (!gllogstream)
|
||||||
gllogstream = fopen("ogllog.txt", "w");
|
gllogstream = fopen("ogllog.txt", "w");
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
va_start(arglist, format);
|
va_start(arglist, format);
|
||||||
vsnprintf(str, 4096, format, arglist);
|
vsnprintf(str, 4096, format, arglist);
|
||||||
va_end(arglist);
|
va_end(arglist);
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
va_start(arglist, format);
|
|
||||||
vsnprintf(str, 4096, format, arglist);
|
|
||||||
va_end(arglist);
|
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
fwrite(str, strlen(str), 1, gllogstream);
|
fwrite(str, strlen(str), 1, gllogstream);
|
||||||
#else
|
#else
|
||||||
(void)format;
|
(void)format;
|
||||||
|
|
@ -521,7 +510,6 @@ boolean SetupGLfunc(void)
|
||||||
GETOPENGLFUNC(pglLightModelfv, glLightModelfv)
|
GETOPENGLFUNC(pglLightModelfv, glLightModelfv)
|
||||||
GETOPENGLFUNC(pglMaterialfv, glMaterialfv)
|
GETOPENGLFUNC(pglMaterialfv, glMaterialfv)
|
||||||
GETOPENGLFUNC(pglMateriali, glMateriali)
|
GETOPENGLFUNC(pglMateriali, glMateriali)
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
GETOPENGLFUNC(pglPixelStorei, glPixelStorei)
|
GETOPENGLFUNC(pglPixelStorei, glPixelStorei)
|
||||||
GETOPENGLFUNC(pglReadPixels, glReadPixels)
|
GETOPENGLFUNC(pglReadPixels, glReadPixels)
|
||||||
|
|
@ -535,21 +523,6 @@ boolean SetupGLfunc(void)
|
||||||
GETOPENGLFUNC(pglDeleteTextures, glDeleteTextures)
|
GETOPENGLFUNC(pglDeleteTextures, glDeleteTextures)
|
||||||
GETOPENGLFUNC(pglBindTexture, glBindTexture)
|
GETOPENGLFUNC(pglBindTexture, glBindTexture)
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
GETOPENGLFUNC(pglPixelStorei, glPixelStorei)
|
|
||||||
GETOPENGLFUNC(pglReadPixels, glReadPixels)
|
|
||||||
|
|
||||||
GETOPENGLFUNC(pglTexEnvi, glTexEnvi)
|
|
||||||
GETOPENGLFUNC(pglTexParameteri, glTexParameteri)
|
|
||||||
GETOPENGLFUNC(pglTexImage2D, glTexImage2D)
|
|
||||||
GETOPENGLFUNC(pglTexSubImage2D, glTexSubImage2D)
|
|
||||||
|
|
||||||
GETOPENGLFUNC(pglGenTextures, glGenTextures)
|
|
||||||
GETOPENGLFUNC(pglDeleteTextures, glDeleteTextures)
|
|
||||||
GETOPENGLFUNC(pglBindTexture, glBindTexture)
|
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
GETOPENGLFUNC(pglCopyTexImage2D, glCopyTexImage2D)
|
GETOPENGLFUNC(pglCopyTexImage2D, glCopyTexImage2D)
|
||||||
GETOPENGLFUNC(pglCopyTexSubImage2D, glCopyTexSubImage2D)
|
GETOPENGLFUNC(pglCopyTexSubImage2D, glCopyTexSubImage2D)
|
||||||
|
|
||||||
|
|
@ -799,8 +772,6 @@ static INT32 shader_leveltime = 0;
|
||||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * poly_color;\n" \
|
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * poly_color;\n" \
|
||||||
"}\0"
|
"}\0"
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
//
|
//
|
||||||
// Sky fragment shader
|
// Sky fragment shader
|
||||||
// Modulates poly_color with gl_Color
|
// Modulates poly_color with gl_Color
|
||||||
|
|
@ -813,7 +784,6 @@ static INT32 shader_leveltime = 0;
|
||||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * gl_Color * poly_color;\n" \
|
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * gl_Color * poly_color;\n" \
|
||||||
"}\0"
|
"}\0"
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
static const char *fragment_shaders[] = {
|
static const char *fragment_shaders[] = {
|
||||||
// Default fragment shader
|
// Default fragment shader
|
||||||
GLSL_DEFAULT_FRAGMENT_SHADER,
|
GLSL_DEFAULT_FRAGMENT_SHADER,
|
||||||
|
|
@ -837,14 +807,7 @@ static const char *fragment_shaders[] = {
|
||||||
GLSL_FOG_FRAGMENT_SHADER,
|
GLSL_FOG_FRAGMENT_SHADER,
|
||||||
|
|
||||||
// Sky fragment shader
|
// Sky fragment shader
|
||||||
<<<<<<< HEAD
|
|
||||||
"uniform sampler2D tex;\n"
|
|
||||||
"void main(void) {\n"
|
|
||||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st);\n"
|
|
||||||
"}\0",
|
|
||||||
=======
|
|
||||||
GLSL_SKY_FRAGMENT_SHADER,
|
GLSL_SKY_FRAGMENT_SHADER,
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// Model fragment shader + diffuse lighting from above
|
// Model fragment shader + diffuse lighting from above
|
||||||
GLSL_SOFTWARE_MODEL_LIGHTING_FRAGMENT_SHADER,
|
GLSL_SOFTWARE_MODEL_LIGHTING_FRAGMENT_SHADER,
|
||||||
|
|
@ -1963,51 +1926,9 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
||||||
}
|
}
|
||||||
else // initialization of the linked list
|
else // initialization of the linked list
|
||||||
gl_cachetail = gl_cachehead = pTexInfo;
|
gl_cachetail = gl_cachehead = pTexInfo;
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *Shader_Load(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade)
|
|
||||||
{
|
|
||||||
#ifdef GL_SHADERS
|
|
||||||
if (gl_shadersenabled && pglUseProgram)
|
|
||||||
{
|
|
||||||
gl_shaderprogram_t *shader = &gl_shaderprograms[gl_currentshaderprogram];
|
|
||||||
if (shader->program)
|
|
||||||
{
|
|
||||||
if (gl_shaderprogramchanged)
|
|
||||||
{
|
|
||||||
pglUseProgram(gl_shaderprograms[gl_currentshaderprogram].program);
|
|
||||||
gl_shaderprogramchanged = false;
|
|
||||||
}
|
|
||||||
Shader_SetUniforms(Surface, poly, tint, fade);
|
|
||||||
return shader;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pglUseProgram(0);
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
(void)Surface;
|
|
||||||
(void)poly;
|
|
||||||
(void)tint;
|
|
||||||
(void)fade;
|
|
||||||
#endif
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade)
|
|
||||||
{
|
|
||||||
#ifdef GL_SHADERS
|
|
||||||
if (gl_shadersenabled)
|
|
||||||
{
|
|
||||||
gl_shaderprogram_t *shader = &gl_shaderprograms[gl_currentshaderprogram];
|
|
||||||
if (!shader->program)
|
|
||||||
return;
|
|
||||||
|
|
||||||
=======
|
|
||||||
static void *Shader_Load(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade)
|
static void *Shader_Load(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade)
|
||||||
{
|
{
|
||||||
#ifdef GL_SHADERS
|
#ifdef GL_SHADERS
|
||||||
|
|
@ -2053,7 +1974,6 @@ static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAF
|
||||||
if (fade == NULL)
|
if (fade == NULL)
|
||||||
fade = &shader_defaultcolor;
|
fade = &shader_defaultcolor;
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
#define UNIFORM_1(uniform, a, function) \
|
#define UNIFORM_1(uniform, a, function) \
|
||||||
if (uniform != -1) \
|
if (uniform != -1) \
|
||||||
function (uniform, a);
|
function (uniform, a);
|
||||||
|
|
@ -2074,20 +1994,12 @@ static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAF
|
||||||
UNIFORM_4(shader->uniforms[gluniform_poly_color], poly->red, poly->green, poly->blue, poly->alpha, pglUniform4f);
|
UNIFORM_4(shader->uniforms[gluniform_poly_color], poly->red, poly->green, poly->blue, poly->alpha, pglUniform4f);
|
||||||
UNIFORM_4(shader->uniforms[gluniform_tint_color], tint->red, tint->green, tint->blue, tint->alpha, pglUniform4f);
|
UNIFORM_4(shader->uniforms[gluniform_tint_color], tint->red, tint->green, tint->blue, tint->alpha, pglUniform4f);
|
||||||
UNIFORM_4(shader->uniforms[gluniform_fade_color], fade->red, fade->green, fade->blue, fade->alpha, pglUniform4f);
|
UNIFORM_4(shader->uniforms[gluniform_fade_color], fade->red, fade->green, fade->blue, fade->alpha, pglUniform4f);
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
if (Surface != NULL)
|
if (Surface != NULL)
|
||||||
{
|
{
|
||||||
UNIFORM_1(shader->uniforms[gluniform_lighting], Surface->LightInfo.light_level, pglUniform1f);
|
UNIFORM_1(shader->uniforms[gluniform_lighting], Surface->LightInfo.light_level, pglUniform1f);
|
||||||
UNIFORM_1(shader->uniforms[gluniform_fade_start], Surface->LightInfo.fade_start, pglUniform1f);
|
UNIFORM_1(shader->uniforms[gluniform_fade_start], Surface->LightInfo.fade_start, pglUniform1f);
|
||||||
UNIFORM_1(shader->uniforms[gluniform_fade_end], Surface->LightInfo.fade_end, pglUniform1f);
|
UNIFORM_1(shader->uniforms[gluniform_fade_end], Surface->LightInfo.fade_end, pglUniform1f);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
UNIFORM_1(shader->uniforms[gluniform_leveltime], ((float)shader_leveltime) / TICRATE, pglUniform1f);
|
UNIFORM_1(shader->uniforms[gluniform_leveltime], ((float)shader_leveltime) / TICRATE, pglUniform1f);
|
||||||
|
|
||||||
#undef UNIFORM_1
|
#undef UNIFORM_1
|
||||||
|
|
@ -2232,35 +2144,6 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUI
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, UINT32 *IndexArray)
|
EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, UINT32 *IndexArray)
|
||||||
<<<<<<< HEAD
|
|
||||||
{
|
|
||||||
PreparePolygon(pSurf, pOutVerts, PolyFlags);
|
|
||||||
|
|
||||||
pglVertexPointer(3, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].x);
|
|
||||||
pglTexCoordPointer(2, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].s);
|
|
||||||
pglDrawElements(GL_TRIANGLES, iNumPts, GL_UNSIGNED_INT, IndexArray);
|
|
||||||
|
|
||||||
// the DrawPolygon variant of this has some code about polyflags and wrapping here but havent noticed any problems from omitting it?
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct vbo_vertex_s
|
|
||||||
{
|
|
||||||
float x, y, z;
|
|
||||||
float u, v;
|
|
||||||
unsigned char r, g, b, a;
|
|
||||||
} vbo_vertex_t;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int mode;
|
|
||||||
int vertexcount;
|
|
||||||
int vertexindex;
|
|
||||||
int use_texture;
|
|
||||||
} GLSkyLoopDef;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
=======
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
{
|
{
|
||||||
PreparePolygon(pSurf, pOutVerts, PolyFlags);
|
PreparePolygon(pSurf, pOutVerts, PolyFlags);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3482,19 +3482,7 @@ static int lib_gBattleGametype(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
static int lib_gRaceGametype(lua_State *L)
|
static int lib_gRaceGametype(lua_State *L)
|
||||||
=======
|
|
||||||
static int lib_gCoopGametype(lua_State *L)
|
|
||||||
{
|
|
||||||
//HUDSAFE
|
|
||||||
INLEVEL
|
|
||||||
lua_pushboolean(L, G_CoopGametype());
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int lib_gTagGametype(lua_State *L)
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
{
|
{
|
||||||
//HUDSAFE
|
//HUDSAFE
|
||||||
INLEVEL
|
INLEVEL
|
||||||
|
|
@ -3502,6 +3490,14 @@ static int lib_gTagGametype(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_gTagGametype(lua_State *L)
|
||||||
|
{
|
||||||
|
//HUDSAFE
|
||||||
|
INLEVEL
|
||||||
|
lua_pushboolean(L, G_TagGametype());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_gTicsToHours(lua_State *L)
|
static int lib_gTicsToHours(lua_State *L)
|
||||||
{
|
{
|
||||||
tic_t rtic = luaL_checkinteger(L, 1);
|
tic_t rtic = luaL_checkinteger(L, 1);
|
||||||
|
|
@ -4278,16 +4274,9 @@ static luaL_Reg lib[] = {
|
||||||
{"G_GametypeUsesCoopStarposts",lib_gGametypeUsesCoopStarposts},
|
{"G_GametypeUsesCoopStarposts",lib_gGametypeUsesCoopStarposts},
|
||||||
{"G_GametypeHasTeams",lib_gGametypeHasTeams},
|
{"G_GametypeHasTeams",lib_gGametypeHasTeams},
|
||||||
{"G_GametypeHasSpectators",lib_gGametypeHasSpectators},
|
{"G_GametypeHasSpectators",lib_gGametypeHasSpectators},
|
||||||
<<<<<<< HEAD
|
|
||||||
{"G_BattleGametype",lib_gBattleGametype},
|
{"G_BattleGametype",lib_gBattleGametype},
|
||||||
{"G_RaceGametype",lib_gRaceGametype},
|
{"G_RaceGametype",lib_gRaceGametype},
|
||||||
=======
|
|
||||||
{"G_RingSlingerGametype",lib_gRingSlingerGametype},
|
|
||||||
{"G_PlatformGametype",lib_gPlatformGametype},
|
|
||||||
{"G_CoopGametype",lib_gCoopGametype},
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
{"G_TagGametype",lib_gTagGametype},
|
{"G_TagGametype",lib_gTagGametype},
|
||||||
{"G_CompetitionGametype",lib_gCompetitionGametype},
|
|
||||||
{"G_TicsToHours",lib_gTicsToHours},
|
{"G_TicsToHours",lib_gTicsToHours},
|
||||||
{"G_TicsToMinutes",lib_gTicsToMinutes},
|
{"G_TicsToMinutes",lib_gTicsToMinutes},
|
||||||
{"G_TicsToSeconds",lib_gTicsToSeconds},
|
{"G_TicsToSeconds",lib_gTicsToSeconds},
|
||||||
|
|
|
||||||
|
|
@ -1364,15 +1364,13 @@ boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg, int mute)
|
||||||
else
|
else
|
||||||
lua_pushboolean(gL, false);
|
lua_pushboolean(gL, false);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
PushHook(gL, hookp);
|
||||||
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
|
|
||||||
lua_gettable(gL, LUA_REGISTRYINDEX);
|
|
||||||
lua_pushvalue(gL, -6);
|
lua_pushvalue(gL, -6);
|
||||||
lua_pushvalue(gL, -6);
|
lua_pushvalue(gL, -6);
|
||||||
lua_pushvalue(gL, -6);
|
lua_pushvalue(gL, -6);
|
||||||
lua_pushvalue(gL, -6);
|
lua_pushvalue(gL, -6);
|
||||||
lua_pushvalue(gL, -6);
|
lua_pushvalue(gL, -6);
|
||||||
if (lua_pcall(gL, 5, 1, 0)) {
|
if (lua_pcall(gL, 4, 1, 1)) {
|
||||||
if (!hookp->error || cv_debug & DBG_LUA)
|
if (!hookp->error || cv_debug & DBG_LUA)
|
||||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||||
lua_pop(gL, 1);
|
lua_pop(gL, 1);
|
||||||
|
|
@ -1381,29 +1379,12 @@ boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg, int mute)
|
||||||
}
|
}
|
||||||
if (lua_toboolean(gL, -1))
|
if (lua_toboolean(gL, -1))
|
||||||
hooked = true;
|
hooked = true;
|
||||||
=======
|
|
||||||
lua_pushstring(gL, msg); // msg
|
|
||||||
}
|
|
||||||
PushHook(gL, hookp);
|
|
||||||
lua_pushvalue(gL, -5);
|
|
||||||
lua_pushvalue(gL, -5);
|
|
||||||
lua_pushvalue(gL, -5);
|
|
||||||
lua_pushvalue(gL, -5);
|
|
||||||
if (lua_pcall(gL, 4, 1, 1)) {
|
|
||||||
if (!hookp->error || cv_debug & DBG_LUA)
|
|
||||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
lua_pop(gL, 1);
|
lua_pop(gL, 1);
|
||||||
hookp->error = true;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (lua_toboolean(gL, -1))
|
|
||||||
hooked = true;
|
|
||||||
lua_pop(gL, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_settop(gL, 0);
|
lua_settop(gL, 0);
|
||||||
return hooked;
|
return hooked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hook for hurt messages
|
// Hook for hurt messages
|
||||||
|
|
@ -1911,7 +1892,6 @@ boolean LUAh_ShouldJingleContinue(player_t *player, const char *musname)
|
||||||
return keepplaying;
|
return keepplaying;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// Hook for music changes
|
// Hook for music changes
|
||||||
boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boolean *looping,
|
boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boolean *looping,
|
||||||
UINT32 *position, UINT32 *prefadems, UINT32 *fadeinms)
|
UINT32 *position, UINT32 *prefadems, UINT32 *fadeinms)
|
||||||
|
|
@ -1923,12 +1903,12 @@ boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boo
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
lua_settop(gL, 0);
|
lua_settop(gL, 0);
|
||||||
|
lua_pushcfunction(gL, LUA_GetErrorMessage);
|
||||||
|
|
||||||
for (hookp = roothook; hookp; hookp = hookp->next)
|
for (hookp = roothook; hookp; hookp = hookp->next)
|
||||||
if (hookp->type == hook_MusicChange)
|
if (hookp->type == hook_MusicChange)
|
||||||
{
|
{
|
||||||
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
|
PushHook(gL, hookp);
|
||||||
lua_gettable(gL, LUA_REGISTRYINDEX);
|
|
||||||
lua_pushstring(gL, oldname);
|
lua_pushstring(gL, oldname);
|
||||||
lua_pushstring(gL, newname);
|
lua_pushstring(gL, newname);
|
||||||
lua_pushinteger(gL, *mflags);
|
lua_pushinteger(gL, *mflags);
|
||||||
|
|
@ -1936,7 +1916,7 @@ boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boo
|
||||||
lua_pushinteger(gL, *position);
|
lua_pushinteger(gL, *position);
|
||||||
lua_pushinteger(gL, *prefadems);
|
lua_pushinteger(gL, *prefadems);
|
||||||
lua_pushinteger(gL, *fadeinms);
|
lua_pushinteger(gL, *fadeinms);
|
||||||
if (lua_pcall(gL, 7, 6, 0)) {
|
if (lua_pcall(gL, 7, 6, 1)) {
|
||||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
|
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
|
||||||
lua_pop(gL, 1);
|
lua_pop(gL, 1);
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1963,7 +1943,7 @@ boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boo
|
||||||
if (lua_isboolean(gL, -1))
|
if (lua_isboolean(gL, -1))
|
||||||
*fadeinms = lua_tonumber(gL, -1);
|
*fadeinms = lua_tonumber(gL, -1);
|
||||||
|
|
||||||
lua_pop(gL, 6);
|
lua_pop(gL, 7); // Pop returned values and error handler
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_settop(gL, 0);
|
lua_settop(gL, 0);
|
||||||
|
|
|
||||||
|
|
@ -89,16 +89,12 @@ enum mobj_e {
|
||||||
mobj_cvmem,
|
mobj_cvmem,
|
||||||
mobj_standingslope,
|
mobj_standingslope,
|
||||||
mobj_colorized,
|
mobj_colorized,
|
||||||
<<<<<<< HEAD
|
mobj_mirrored,
|
||||||
mobj_shadowscale,
|
mobj_shadowscale,
|
||||||
mobj_whiteshadow,
|
mobj_whiteshadow,
|
||||||
mobj_sprxoff,
|
mobj_sprxoff,
|
||||||
mobj_spryoff,
|
mobj_spryoff,
|
||||||
mobj_sprzoff
|
mobj_sprzoff
|
||||||
=======
|
|
||||||
mobj_mirrored,
|
|
||||||
mobj_shadowscale
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const mobj_opt[] = {
|
static const char *const mobj_opt[] = {
|
||||||
|
|
@ -493,16 +489,6 @@ static int mobj_set(lua_State *L)
|
||||||
return UNIMPLEMENTED;
|
return UNIMPLEMENTED;
|
||||||
case mobj_angle:
|
case mobj_angle:
|
||||||
mo->angle = luaL_checkangle(L, 3);
|
mo->angle = luaL_checkangle(L, 3);
|
||||||
<<<<<<< HEAD
|
|
||||||
if (mo->player == &players[consoleplayer])
|
|
||||||
localangle[0] = mo->angle;
|
|
||||||
else if (mo->player == &players[displayplayers[1]])
|
|
||||||
localangle[1] = mo->angle;
|
|
||||||
else if (mo->player == &players[displayplayers[2]])
|
|
||||||
localangle[2] = mo->angle;
|
|
||||||
else if (mo->player == &players[displayplayers[3]])
|
|
||||||
localangle[3] = mo->angle;
|
|
||||||
=======
|
|
||||||
if (mo->player)
|
if (mo->player)
|
||||||
P_SetPlayerAngle(mo->player, mo->angle);
|
P_SetPlayerAngle(mo->player, mo->angle);
|
||||||
break;
|
break;
|
||||||
|
|
@ -511,7 +497,6 @@ static int mobj_set(lua_State *L)
|
||||||
break;
|
break;
|
||||||
case mobj_roll:
|
case mobj_roll:
|
||||||
mo->roll = luaL_checkangle(L, 3);
|
mo->roll = luaL_checkangle(L, 3);
|
||||||
>>>>>>> srb2/next
|
|
||||||
break;
|
break;
|
||||||
case mobj_rollangle:
|
case mobj_rollangle:
|
||||||
mo->rollangle = luaL_checkangle(L, 3);
|
mo->rollangle = luaL_checkangle(L, 3);
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,9 @@
|
||||||
void LUA_ClearExtVars(void);
|
void LUA_ClearExtVars(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
void LUA_ClearState(void);
|
void LUA_ClearState(void);
|
||||||
|
|
||||||
extern boolean lua_lumploading; // is LUA_LoadLump being called?
|
|
||||||
=======
|
|
||||||
extern INT32 lua_lumploading; // is LUA_LoadLump being called?
|
extern INT32 lua_lumploading; // is LUA_LoadLump being called?
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
int LUA_GetErrorMessage(lua_State *L);
|
int LUA_GetErrorMessage(lua_State *L);
|
||||||
void LUA_LoadLump(UINT16 wad, UINT16 lump, boolean noresults);
|
void LUA_LoadLump(UINT16 wad, UINT16 lump, boolean noresults);
|
||||||
|
|
|
||||||
|
|
@ -360,10 +360,6 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code)
|
||||||
case SDL_SCANCODE_RGUI: return KEY_RIGHTWIN;
|
case SDL_SCANCODE_RGUI: return KEY_RIGHTWIN;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> srb2/next
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1422,7 +1418,6 @@ void I_FinishUpdate(void)
|
||||||
if (I_SkipFrame())
|
if (I_SkipFrame())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if (st_overlay)
|
if (st_overlay)
|
||||||
{
|
{
|
||||||
if (cv_ticrate.value)
|
if (cv_ticrate.value)
|
||||||
|
|
@ -1434,10 +1429,9 @@ void I_FinishUpdate(void)
|
||||||
SCR_DisplayLocalPing();
|
SCR_DisplayLocalPing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
if (marathonmode)
|
if (marathonmode)
|
||||||
SCR_DisplayMarathonInfo();
|
SCR_DisplayMarathonInfo();
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// draw captions if enabled
|
// draw captions if enabled
|
||||||
if (cv_closedcaptioning.value)
|
if (cv_closedcaptioning.value)
|
||||||
|
|
|
||||||
|
|
@ -827,11 +827,6 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
|
||||||
numwadfiles++; // must come BEFORE W_LoadDehackedLumps, so any addfile called by COM_BufInsertText called by Lua doesn't overwrite what we just loaded
|
numwadfiles++; // must come BEFORE W_LoadDehackedLumps, so any addfile called by COM_BufInsertText called by Lua doesn't overwrite what we just loaded
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
<<<<<<< HEAD
|
|
||||||
if (rendermode == render_opengl)
|
|
||||||
HWR_LoadShaders(numwadfiles - 1, (wadfile->type == RET_PK3));
|
|
||||||
#endif
|
|
||||||
=======
|
|
||||||
// Read shaders from file
|
// Read shaders from file
|
||||||
if (rendermode == render_opengl && (vid_opengl_state == 1))
|
if (rendermode == render_opengl && (vid_opengl_state == 1))
|
||||||
{
|
{
|
||||||
|
|
@ -839,7 +834,6 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
|
||||||
HWR_LoadShaders();
|
HWR_LoadShaders();
|
||||||
}
|
}
|
||||||
#endif // HWRENDER
|
#endif // HWRENDER
|
||||||
>>>>>>> srb2/next
|
|
||||||
|
|
||||||
// TODO: HACK ALERT - Load Lua & SOC stuff right here. I feel like this should be out of this place, but... Let's stick with this for now.
|
// TODO: HACK ALERT - Load Lua & SOC stuff right here. I feel like this should be out of this place, but... Let's stick with this for now.
|
||||||
switch (wadfile->type)
|
switch (wadfile->type)
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,6 @@
|
||||||
<ClCompile Include="win_vid.c">
|
<ClCompile Include="win_vid.c">
|
||||||
<Filter>Win32app</Filter>
|
<Filter>Win32app</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
<ClCompile Include="..\hardware\hw_bsp.c">
|
<ClCompile Include="..\hardware\hw_bsp.c">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
@ -110,7 +108,6 @@
|
||||||
<ClCompile Include="..\hardware\hw_md2.c">
|
<ClCompile Include="..\hardware\hw_md2.c">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
>>>>>>> srb2/next
|
|
||||||
<ClCompile Include="..\hardware\hw3sound.c">
|
<ClCompile Include="..\hardware\hw3sound.c">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
@ -456,12 +453,10 @@
|
||||||
<ClCompile Include="..\string.c">
|
<ClCompile Include="..\string.c">
|
||||||
<Filter>M_Misc</Filter>
|
<Filter>M_Misc</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<<<<<<< HEAD
|
|
||||||
<ClCompile Include="..\hardware\hw_md2load.c" />
|
<ClCompile Include="..\hardware\hw_md2load.c" />
|
||||||
<ClCompile Include="..\hardware\hw_md3load.c" />
|
<ClCompile Include="..\hardware\hw_md3load.c" />
|
||||||
<ClCompile Include="..\hardware\hw_model.c" />
|
<ClCompile Include="..\hardware\hw_model.c" />
|
||||||
<ClCompile Include="..\hardware\u_list.c" />
|
<ClCompile Include="..\hardware\u_list.c" />
|
||||||
=======
|
|
||||||
<ClCompile Include="..\hardware\hw_md2load.c">
|
<ClCompile Include="..\hardware\hw_md2load.c">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
@ -484,7 +479,6 @@
|
||||||
<ClCompile Include="..\r_portal.c">
|
<ClCompile Include="..\r_portal.c">
|
||||||
<Filter>R_Rend</Filter>
|
<Filter>R_Rend</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
>>>>>>> srb2/next
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="afxres.h">
|
<ClInclude Include="afxres.h">
|
||||||
|
|
@ -508,8 +502,6 @@
|
||||||
<ClInclude Include="win_main.h">
|
<ClInclude Include="win_main.h">
|
||||||
<Filter>Win32app</Filter>
|
<Filter>Win32app</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
<ClInclude Include="..\hardware\hw_clip.h">
|
<ClInclude Include="..\hardware\hw_clip.h">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
@ -546,7 +538,6 @@
|
||||||
<ClInclude Include="..\hardware\hw_model.h">
|
<ClInclude Include="..\hardware\hw_model.h">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
>>>>>>> srb2/next
|
|
||||||
<ClInclude Include="..\hardware\hw3dsdrv.h">
|
<ClInclude Include="..\hardware\hw3dsdrv.h">
|
||||||
<Filter>Hw_Hardware</Filter>
|
<Filter>Hw_Hardware</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue