mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2Internal.git
This commit is contained in:
commit
d6c0854c8a
8 changed files with 41 additions and 7 deletions
|
@ -597,7 +597,9 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_gif_optimize);
|
CV_RegisterVar(&cv_gif_optimize);
|
||||||
CV_RegisterVar(&cv_gif_downscale);
|
CV_RegisterVar(&cv_gif_downscale);
|
||||||
|
|
||||||
|
#ifdef WALLSPLATS
|
||||||
CV_RegisterVar(&cv_splats);
|
CV_RegisterVar(&cv_splats);
|
||||||
|
#endif
|
||||||
|
|
||||||
// register these so it is saved to config
|
// register these so it is saved to config
|
||||||
if ((username = I_GetUserName()))
|
if ((username = I_GetUserName()))
|
||||||
|
|
|
@ -81,7 +81,9 @@ extern consvar_t cv_useranalog, cv_useranalog2;
|
||||||
extern consvar_t cv_analog, cv_analog2;
|
extern consvar_t cv_analog, cv_analog2;
|
||||||
|
|
||||||
extern consvar_t cv_netstat;
|
extern consvar_t cv_netstat;
|
||||||
|
#ifdef WALLSPLATS
|
||||||
extern consvar_t cv_splats;
|
extern consvar_t cv_splats;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern consvar_t cv_countdowntime;
|
extern consvar_t cv_countdowntime;
|
||||||
extern consvar_t cv_runscripts;
|
extern consvar_t cv_runscripts;
|
||||||
|
|
|
@ -1470,6 +1470,26 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
||||||
else
|
else
|
||||||
pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
}
|
}
|
||||||
|
else if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_8)
|
||||||
|
{
|
||||||
|
//pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
if (MipMap)
|
||||||
|
{
|
||||||
|
pgluBuild2DMipmaps(GL_TEXTURE_2D, GL_ALPHA, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
#ifdef GL_TEXTURE_MIN_LOD
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0);
|
||||||
|
#endif
|
||||||
|
#ifdef GL_TEXTURE_MAX_LOD
|
||||||
|
if (pTexInfo->flags & TF_TRANSPARENT)
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff
|
||||||
|
else
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
|
||||||
|
#endif
|
||||||
|
//pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_LINEAR_MIPMAP_LINEAR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MipMap)
|
if (MipMap)
|
||||||
|
@ -2150,7 +2170,7 @@ EXPORT void HWRAPI(StartScreenWipe) (void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
@ -2179,7 +2199,7 @@ EXPORT void HWRAPI(EndScreenWipe)(void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
@ -2294,22 +2314,22 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha)
|
||||||
|
|
||||||
// Bottom left
|
// Bottom left
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f);
|
||||||
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
||||||
|
|
||||||
// Top left
|
// Top left
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, yfix);
|
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, yfix);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f);
|
||||||
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
// Top right
|
// Top right
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, xfix, yfix);
|
pglMultiTexCoord2f(GL_TEXTURE0, xfix, yfix);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f);
|
||||||
pglVertex3f(1.0f, 1.0f, 1.0f);
|
pglVertex3f(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
// Bottom right
|
// Bottom right
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, xfix, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE0, xfix, 0.0f);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f);
|
||||||
pglVertex3f(1.0f, -1.0f, 1.0f);
|
pglVertex3f(1.0f, -1.0f, 1.0f);
|
||||||
pglEnd();
|
pglEnd();
|
||||||
|
|
||||||
|
|
|
@ -298,6 +298,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->lastlinehit);
|
lua_pushinteger(L, plr->lastlinehit);
|
||||||
else if (fastcmp(field,"losstime"))
|
else if (fastcmp(field,"losstime"))
|
||||||
lua_pushinteger(L, plr->losstime);
|
lua_pushinteger(L, plr->losstime);
|
||||||
|
else if (fastcmp(field,"timeshit"))
|
||||||
|
lua_pushinteger(L, plr->timeshit);
|
||||||
else if (fastcmp(field,"onconveyor"))
|
else if (fastcmp(field,"onconveyor"))
|
||||||
lua_pushinteger(L, plr->onconveyor);
|
lua_pushinteger(L, plr->onconveyor);
|
||||||
else if (fastcmp(field,"awayviewmobj"))
|
else if (fastcmp(field,"awayviewmobj"))
|
||||||
|
@ -553,6 +555,8 @@ static int player_set(lua_State *L)
|
||||||
plr->lastlinehit = (INT16)luaL_checkinteger(L, 3);
|
plr->lastlinehit = (INT16)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"losstime"))
|
else if (fastcmp(field,"losstime"))
|
||||||
plr->losstime = (tic_t)luaL_checkinteger(L, 3);
|
plr->losstime = (tic_t)luaL_checkinteger(L, 3);
|
||||||
|
else if (fastcmp(field,"timeshit"))
|
||||||
|
plr->timeshit = (UINT8)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"onconveyor"))
|
else if (fastcmp(field,"onconveyor"))
|
||||||
plr->onconveyor = (INT32)luaL_checkinteger(L, 3);
|
plr->onconveyor = (INT32)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"awayviewmobj"))
|
else if (fastcmp(field,"awayviewmobj"))
|
||||||
|
|
|
@ -110,7 +110,7 @@ ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
|
||||||
fixed_t P_RandomFixed(void)
|
fixed_t P_RandomFixed(void)
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
UINT8 P_RandomFixedD(const char *rfile, INT32 rline)
|
fixed_t P_RandomFixedD(const char *rfile, INT32 rline)
|
||||||
{
|
{
|
||||||
CONS_Printf("P_RandomFixed() at: %sp %d\n", rfile, rline);
|
CONS_Printf("P_RandomFixed() at: %sp %d\n", rfile, rline);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
// protos.
|
// protos.
|
||||||
static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
#ifdef WALLSPLATS
|
||||||
consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
#endif
|
||||||
|
|
||||||
actioncache_t actioncachehead;
|
actioncache_t actioncachehead;
|
||||||
|
|
||||||
|
|
|
@ -956,4 +956,6 @@ void R_DrawViewBorder(void)
|
||||||
// INCLUDE 16bpp DRAWING CODE HERE
|
// INCLUDE 16bpp DRAWING CODE HERE
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
|
#ifdef HIGHCOLOR
|
||||||
#include "r_draw16.c"
|
#include "r_draw16.c"
|
||||||
|
#endif
|
||||||
|
|
|
@ -169,11 +169,13 @@ void R_DrawColumnShadowed_8(void);
|
||||||
// 16bpp DRAWING CODE
|
// 16bpp DRAWING CODE
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
|
#ifdef HIGHCOLOR
|
||||||
void R_DrawColumn_16(void);
|
void R_DrawColumn_16(void);
|
||||||
void R_DrawWallColumn_16(void);
|
void R_DrawWallColumn_16(void);
|
||||||
void R_DrawTranslucentColumn_16(void);
|
void R_DrawTranslucentColumn_16(void);
|
||||||
void R_DrawTranslatedColumn_16(void);
|
void R_DrawTranslatedColumn_16(void);
|
||||||
void R_DrawSpan_16(void);
|
void R_DrawSpan_16(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
#endif // __R_DRAW__
|
#endif // __R_DRAW__
|
||||||
|
|
Loading…
Reference in a new issue