stuff
This commit is contained in:
1 parent
2ee68da944
commit
402cd310d9
11 files changed
+40
-49
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ EOF
|
||||
|
||||
versiongit() {
|
||||
gitbranch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
gitversion="$(git rev-parse HEAD | cut -c -8)"
|
||||
gitversion="$(git show --pretty=format:'%h %s' -s HEAD)"
|
||||
version "$gitbranch" "$gitversion";
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
||||
MINGW=1
|
||||
SDL=1
|
||||
WINDOWSHELL=1
|
||||
HAVE_DISCORDRPC=1
|
||||
NOUPX=1
|
||||
|
||||
else # if you on the *nix
|
||||
@@ -140,7 +139,6 @@ endif
|
||||
ifdef LINUX64
|
||||
LINUX=1
|
||||
NONX86=1
|
||||
HAVE_DISCORDRPC=1
|
||||
# LINUX64 does not imply X86_64=1; could mean ARM64 or Itanium
|
||||
endif
|
||||
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
/// \file discord.h
|
||||
/// \brief Discord Rich Presence handling
|
||||
|
||||
//#ifdef HAVE_DISCORDRPC
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
|
||||
#include <time.h>
|
||||
|
||||
@@ -735,4 +735,4 @@ void DRPC_UpdatePresence(void)
|
||||
Discord_UpdatePresence(&discordPresence);
|
||||
}
|
||||
|
||||
//#endif // HAVE_DISCORDRPC
|
||||
#endif // HAVE_DISCORDRPC
|
||||
@@ -277,15 +277,15 @@
|
||||
#define GLSL_WATER_TEXEL \
|
||||
"float water_z = (gl_FragCoord.z / gl_FragCoord.w) / 2.0;\n" \
|
||||
"float a = -pi * (water_z * freq) + (leveltime * speed);\n" \
|
||||
"float sdistort = sin(a) * amp * 1.5;\n" \
|
||||
"float cdistort = cos(a) * amp * 2.2;\n" \
|
||||
"float sdistort = sin(a) * amp;\n" \
|
||||
"float cdistort = cos(a) * amp;\n" \
|
||||
"vec4 texel = texture2D(tex, vec2(gl_TexCoord[0].s - sdistort, gl_TexCoord[0].t - cdistort));\n"
|
||||
|
||||
#define GLSL_WATER_FRAGMENT_SHADER \
|
||||
GLSL_FLOOR_FUDGES \
|
||||
"const float freq = 0.03;\n" \
|
||||
"const float amp = 0.025;\n" \
|
||||
"const float speed = 1.6;\n" \
|
||||
"const float speed = 2.0;\n" \
|
||||
"const float pi = 3.14159;\n" \
|
||||
"#ifdef SRB2_PALETTE_RENDERING\n" \
|
||||
"uniform sampler2D tex;\n" \
|
||||
|
||||
+2
-4
@@ -55,20 +55,18 @@ void I_UpdateTime(fixed_t timescale)
|
||||
{
|
||||
double ticratescaled;
|
||||
double elapsedseconds;
|
||||
double inverse_ticratescaled;
|
||||
tic_t realtics;
|
||||
|
||||
// get real tics
|
||||
ticratescaled = (double)TICRATE * FIXED_TO_FLOAT(timescale);
|
||||
inverse_ticratescaled = 1.0 / ticratescaled;
|
||||
|
||||
enterprecise = I_GetPreciseTime();
|
||||
elapsedseconds = (double)(enterprecise - oldenterprecise) / I_GetPrecisePrecision();
|
||||
tictimer += elapsedseconds;
|
||||
while (tictimer > inverse_ticratescaled)
|
||||
while (tictimer > 1.0/ticratescaled)
|
||||
{
|
||||
entertic += 1;
|
||||
tictimer -= inverse_ticratescaled;
|
||||
tictimer -= 1.0/ticratescaled;
|
||||
}
|
||||
realtics = entertic - oldentertics;
|
||||
oldentertics = entertic;
|
||||
|
||||
+6
-5
@@ -4345,12 +4345,13 @@ void M_Drawer(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
//#ifdef DEVELOP // Development -- show revision / branch info
|
||||
//V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch);
|
||||
#ifdef DEVELOP // Development -- show revision / branch info
|
||||
V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch);
|
||||
V_DrawThinString(vid.dupx, vid.height - 10*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision);
|
||||
//#else // Regular build
|
||||
V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING));
|
||||
//#endif
|
||||
#else // Regular build
|
||||
V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision); // Removeur this for release! im just lazy to make a new flag or smth
|
||||
V_DrawThinString(vid.dupx, vid.height - 10*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING));
|
||||
#endif
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
|
||||
+5
-1
@@ -47,8 +47,12 @@ boolean g_walloffscreen;
|
||||
boolean R_NoEncore(sector_t *sector, boolean ceiling)
|
||||
{
|
||||
boolean invertencore = (GETSECSPECIAL(sector->special, 2) == 15);
|
||||
|
||||
#if 0 // perfect implementation
|
||||
INT32 val = GETSECSPECIAL(sector->special, 3);
|
||||
if (val != 1 && val != 3 // spring panel
|
||||
#else // optimised, see #define GETSECSPECIAL(i,j) ((i >> ((j-1)*4))&15)
|
||||
if ((!(sector->special & (1<<8)) || (sector->special & ((4|8)<<8))) // spring panel
|
||||
#endif
|
||||
&& GETSECSPECIAL(sector->special, 4) != 6) // sneaker panel
|
||||
return invertencore;
|
||||
|
||||
|
||||
+6
-10
@@ -48,6 +48,12 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||
#undef SystemFunction036
|
||||
#endif
|
||||
|
||||
// A little more than the minimum sleep duration on Windows.
|
||||
// May be incorrect for other platforms, but we don't currently have a way to
|
||||
// query the scheduler granularity. SDL will do what's needed to make this as
|
||||
// low as possible though.
|
||||
#define MIN_SLEEP_DURATION_MS 2.1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
@@ -198,16 +204,6 @@ static char returnWadPath[256];
|
||||
#include "../byteptr.h"
|
||||
#endif
|
||||
|
||||
// A little more than the minimum sleep duration on Windows.
|
||||
// May be incorrect for other platforms, but we don't currently have a way to
|
||||
// query the scheduler granularity. SDL will do what's needed to make this as
|
||||
// low as possible though.
|
||||
#if defined(_WIN32)
|
||||
#define MIN_SLEEP_DURATION_MS 1.6
|
||||
#else
|
||||
#define MIN_SLEEP_DURATION_MS 2.1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
#include <backtrace.h>
|
||||
// TODO - move this to some header file instead
|
||||
|
||||
+14
-14
@@ -938,24 +938,24 @@ boolean I_SetSongPosition(UINT32 position)
|
||||
if (gme)
|
||||
{
|
||||
// this is unstable, so fail silently
|
||||
//return true;
|
||||
return true;
|
||||
// this isn't required technically, but GME thread-locks for a second
|
||||
// if you seek too high from the counter
|
||||
length = I_GetSongLength();
|
||||
if (length)
|
||||
position = get_adjusted_position(position);
|
||||
// length = I_GetSongLength();
|
||||
// if (length)
|
||||
// position = get_adjusted_position(position);
|
||||
|
||||
SDL_LockAudio();
|
||||
gme_err_t gme_e = gme_seek(gme, position);
|
||||
SDL_UnlockAudio();
|
||||
// SDL_LockAudio();
|
||||
// gme_err_t gme_e = gme_seek(gme, position);
|
||||
// SDL_UnlockAudio();
|
||||
|
||||
if (gme_e != NULL)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
// if (gme_e != NULL)
|
||||
// {
|
||||
// CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// return true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -274,7 +274,7 @@ void OglSdlFinishUpdate(boolean waitvbl)
|
||||
|
||||
oldwaitvbl = waitvbl;
|
||||
|
||||
SDL_GL_GetDrawableSize(window, &sdlw, &sdlh);
|
||||
SDL_GetWindowSize(window, &sdlw, &sdlh);
|
||||
HWR_MakeScreenFinalTexture();
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
|
||||
@@ -20,12 +20,6 @@
|
||||
|
||||
boolean OglSdlSurface(INT32 w, INT32 h);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
#if defined (__unix__)
|
||||
extern boolean isnvidiagpu;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void OglSdlFinishUpdate(boolean vidwait);
|
||||
boolean VID_LoadOGLAPI(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user