mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'master' into respawn-updates
This commit is contained in:
commit
2a37bca626
15 changed files with 348 additions and 104 deletions
102
.travis.yml
102
.travis.yml
|
|
@ -439,6 +439,30 @@ matrix:
|
|||
# List Ubuntu LTS, newest to oldest
|
||||
# Then list non-LTS, newest to oldest
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=focal
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=focal
|
||||
- PACKAGE_SUBVERSION=~20.04focal
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
|
|
@ -463,6 +487,30 @@ matrix:
|
|||
- PACKAGE_DISTRO=bionic
|
||||
- PACKAGE_SUBVERSION=~18.04bionic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=xenial
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=xenial
|
||||
- PACKAGE_SUBVERSION=~16.04xenial
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
|
|
@ -505,59 +553,11 @@ matrix:
|
|||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=disco
|
||||
- _DPL_JOB_NAME=eoan
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=disco
|
||||
- PACKAGE_SUBVERSION=~19.04disco
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=cosmic
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=cosmic
|
||||
- PACKAGE_SUBVERSION=~18.10cosmic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=xenial
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=xenial
|
||||
- PACKAGE_SUBVERSION=~16.04xenial
|
||||
- PACKAGE_DISTRO=eoan
|
||||
- PACKAGE_SUBVERSION=~19.10eoan
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
allow_failures:
|
||||
- compiler: clang-3.5
|
||||
|
|
|
|||
33
src/d_main.c
33
src/d_main.c
|
|
@ -143,6 +143,8 @@ boolean advancedemo;
|
|||
INT32 debugload = 0;
|
||||
#endif
|
||||
|
||||
char savegamename[256];
|
||||
|
||||
#ifdef _arch_dreamcast
|
||||
char srb2home[256] = "/cd";
|
||||
char srb2path[256] = "/cd";
|
||||
|
|
@ -186,35 +188,6 @@ UINT8 shiftdown = 0; // 0x1 left, 0x2 right
|
|||
UINT8 ctrldown = 0; // 0x1 left, 0x2 right
|
||||
UINT8 altdown = 0; // 0x1 left, 0x2 right
|
||||
boolean capslock = 0; // gee i wonder what this does.
|
||||
//
|
||||
// D_ModifierKeyResponder
|
||||
// Sets global shift/ctrl/alt variables, never actually eats events
|
||||
//
|
||||
static inline void D_ModifierKeyResponder(event_t *ev)
|
||||
{
|
||||
if (ev->type == ev_keydown || ev->type == ev_console) switch (ev->data1)
|
||||
{
|
||||
case KEY_LSHIFT: shiftdown |= 0x1; return;
|
||||
case KEY_RSHIFT: shiftdown |= 0x2; return;
|
||||
case KEY_LCTRL: ctrldown |= 0x1; return;
|
||||
case KEY_RCTRL: ctrldown |= 0x2; return;
|
||||
case KEY_LALT: altdown |= 0x1; return;
|
||||
case KEY_RALT: altdown |= 0x2; return;
|
||||
case KEY_CAPSLOCK: capslock = !capslock; return;
|
||||
|
||||
default: return;
|
||||
}
|
||||
else if (ev->type == ev_keyup) switch (ev->data1)
|
||||
{
|
||||
case KEY_LSHIFT: shiftdown &= ~0x1; return;
|
||||
case KEY_RSHIFT: shiftdown &= ~0x2; return;
|
||||
case KEY_LCTRL: ctrldown &= ~0x1; return;
|
||||
case KEY_RCTRL: ctrldown &= ~0x2; return;
|
||||
case KEY_LALT: altdown &= ~0x1; return;
|
||||
case KEY_RALT: altdown &= ~0x2; return;
|
||||
default: return;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// D_ProcessEvents
|
||||
|
|
@ -281,7 +254,7 @@ static void D_Display(void)
|
|||
{
|
||||
if (nodrawers)
|
||||
return; // for comparative timing/profiling
|
||||
|
||||
|
||||
// check for change of screen size (video mode)
|
||||
if (setmodeneeded && !wipe)
|
||||
SCR_SetMode(); // change video mode
|
||||
|
|
|
|||
|
|
@ -7100,6 +7100,25 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_BATTLECAPSULE_SUPPORT",
|
||||
"S_BATTLECAPSULE_SUPPORTFLY",
|
||||
|
||||
"S_EGOORB",
|
||||
|
||||
"S_WATERTRAIL1",
|
||||
"S_WATERTRAIL2",
|
||||
"S_WATERTRAIL3",
|
||||
"S_WATERTRAIL4",
|
||||
"S_WATERTRAIL5",
|
||||
"S_WATERTRAIL6",
|
||||
"S_WATERTRAIL7",
|
||||
"S_WATERTRAIL8",
|
||||
"S_WATERTRAILUNDERLAY1",
|
||||
"S_WATERTRAILUNDERLAY2",
|
||||
"S_WATERTRAILUNDERLAY3",
|
||||
"S_WATERTRAILUNDERLAY4",
|
||||
"S_WATERTRAILUNDERLAY5",
|
||||
"S_WATERTRAILUNDERLAY6",
|
||||
"S_WATERTRAILUNDERLAY7",
|
||||
"S_WATERTRAILUNDERLAY8",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"S_NAMECHECK",
|
||||
#endif
|
||||
|
|
@ -7912,6 +7931,9 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_BATTLECAPSULE",
|
||||
"MT_BATTLECAPSULE_PIECE",
|
||||
|
||||
"MT_WATERTRAIL",
|
||||
"MT_WATERTRAILUNDERLAY",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"MT_NAMECHECK",
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) FUNCDEBUG;
|
|||
|
||||
// Things that used to be in dstrings.h
|
||||
#define SAVEGAMENAME "srb2sav"
|
||||
char savegamename[256];
|
||||
extern char savegamename[256];
|
||||
|
||||
// m_misc.h
|
||||
#ifdef GETTEXT
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ void HWR_RenderPlane(extrasubsector_t *xsub, boolean isceiling, fixed_t fixedhei
|
|||
if (angle) // Only needs to be done if there's an altered angle
|
||||
{
|
||||
|
||||
angle = (InvAngle(angle)+ANGLE_180)>>ANGLETOFINESHIFT;
|
||||
angle = InvAngle(angle)>>ANGLETOFINESHIFT;
|
||||
|
||||
// This needs to be done so that it scrolls in a different direction after rotation like software
|
||||
/*tempxsow = FLOAT_TO_FIXED(scrollx);
|
||||
|
|
@ -433,7 +433,7 @@ void HWR_RenderPlane(extrasubsector_t *xsub, boolean isceiling, fixed_t fixedhei
|
|||
tempxsow = FLOAT_TO_FIXED(v3d->s);
|
||||
tempytow = FLOAT_TO_FIXED(v3d->t);
|
||||
v3d->s = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINECOSINE(angle)) - FixedMul(tempytow, FINESINE(angle))));
|
||||
v3d->t = (FIXED_TO_FLOAT(-FixedMul(tempxsow, FINESINE(angle)) - FixedMul(tempytow, FINECOSINE(angle))));
|
||||
v3d->t = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle))));
|
||||
}
|
||||
|
||||
//v3d->s = (float)(v3d->s - flatxref + scrollx);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static const GLfloat byte2float[256] = {
|
|||
// -----------------+
|
||||
|
||||
#ifdef DEBUG_TO_FILE
|
||||
FILE *gllogstream;
|
||||
FILE *gllogstream = NULL;
|
||||
#endif
|
||||
|
||||
FUNCPRINTF void GL_DBG_Printf(const char *format, ...)
|
||||
|
|
@ -152,14 +152,14 @@ FUNCPRINTF void GL_DBG_Printf(const char *format, ...)
|
|||
char str[4096] = "";
|
||||
va_list arglist;
|
||||
|
||||
if (!gllogstream)
|
||||
gllogstream = fopen("ogllog.txt", "w");
|
||||
if (gllogstream)
|
||||
{
|
||||
va_start(arglist, format);
|
||||
vsnprintf(str, 4096, format, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
va_start(arglist, format);
|
||||
vsnprintf(str, 4096, format, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
fwrite(str, strlen(str), 1, gllogstream);
|
||||
fwrite(str, strlen(str), 1, gllogstream);
|
||||
}
|
||||
#else
|
||||
(void)format;
|
||||
#endif
|
||||
|
|
@ -823,7 +823,7 @@ EXPORT boolean HWRAPI(LoadShaders) (void)
|
|||
#ifdef GL_SHADERS
|
||||
GLuint gl_vertShader, gl_fragShader;
|
||||
GLint i, result;
|
||||
|
||||
|
||||
if (!pglUseProgram) return false;
|
||||
|
||||
gl_customvertexshaders[0] = NULL;
|
||||
|
|
@ -2002,11 +2002,11 @@ EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCall
|
|||
boolean stopFlag = false;
|
||||
boolean changeState = false;
|
||||
boolean changeShader = false;
|
||||
GLuint nextShader;
|
||||
GLuint nextShader = 0U;
|
||||
boolean changeTexture = false;
|
||||
GLuint nextTexture;
|
||||
GLuint nextTexture = 0U;
|
||||
boolean changePolyFlags = false;
|
||||
FBITFIELD nextPolyFlags;
|
||||
FBITFIELD nextPolyFlags = 0U;
|
||||
boolean changeSurfaceInfo = false;
|
||||
FSurfaceInfo nextSurfaceInfo;
|
||||
|
||||
|
|
@ -2307,7 +2307,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUI
|
|||
|
||||
pglColor4ubv((GLubyte*)&pSurf->PolyColor.s);
|
||||
}
|
||||
|
||||
|
||||
// Tint color
|
||||
tint.red = byte2float[pSurf->TintColor.s.red];
|
||||
tint.green = byte2float[pSurf->TintColor.s.green];
|
||||
|
|
|
|||
77
src/info.c
77
src/info.c
|
|
@ -69,7 +69,8 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"ICEB","CNDL","DOCH","DUCK","GTRE","CHES","CHIM","DRGN","LZMN","PGSS",
|
||||
"ZTCH","MKMA","MKMP","RTCH","BOWL","BOWH","BRRL","BRRR","HRSE","TOAH",
|
||||
"BFRT","OFRT","RFRT","PFRT","ASPK","HBST","HBSO","HBSF","WBLZ","WBLN",
|
||||
"FWRK","MXCL","RGSP","DRAF","GRES","OTFG","DBOS","XMS4","XMS5","VIEW"
|
||||
"FWRK","MXCL","RGSP","DRAF","GRES","OTFG","DBOS","EGOO","WTRL","XMS4",
|
||||
"XMS5","VIEW"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
|
@ -3497,6 +3498,26 @@ state_t states[NUMSTATES] =
|
|||
{SPR_CAPS, 4, -1, {NULL}, 0, 0, S_NULL}, // S_BATTLECAPSULE_SUPPORT
|
||||
{SPR_CAPS, FF_ANIMATE|5, -1, {NULL}, 3, 1, S_NULL}, // S_BATTLECAPSULE_SUPPORTFLY
|
||||
|
||||
{SPR_EGOO, 0, 1, {NULL}, 0, 0, S_NULL}, // S_EGOORB
|
||||
|
||||
// Water Trail
|
||||
{SPR_WTRL, FF_PAPERSPRITE , 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL1
|
||||
{SPR_WTRL, FF_PAPERSPRITE|1, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL2
|
||||
{SPR_WTRL, FF_PAPERSPRITE|2, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL3
|
||||
{SPR_WTRL, FF_PAPERSPRITE|3, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL4
|
||||
{SPR_WTRL, FF_PAPERSPRITE|4, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL5
|
||||
{SPR_WTRL, FF_PAPERSPRITE|5, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL6
|
||||
{SPR_WTRL, FF_PAPERSPRITE|6, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL7
|
||||
{SPR_WTRL, FF_PAPERSPRITE|7, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAIL8
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|8, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY1
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|9, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY2
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|10, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY3
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|11, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY4
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|12, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY5
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|13, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY6
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|14, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY7
|
||||
{SPR_WTRL, FF_TRANS50|FF_PAPERSPRITE|15, 2, {NULL}, 0, 0, S_NULL}, // S_WATERTRAILUNDERLAY8
|
||||
|
||||
#ifdef SEENAMES
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||
#endif
|
||||
|
|
@ -20775,6 +20796,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_WATERTRAIL
|
||||
-1, // doomednum
|
||||
S_WATERTRAIL1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
48*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
1, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_WATERTRAILUNDERLAY
|
||||
-1, // doomednum
|
||||
S_WATERTRAILUNDERLAY1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
48*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
// ============================================================================================================================//
|
||||
|
||||
#ifdef SEENAMES
|
||||
|
|
|
|||
26
src/info.h
26
src/info.h
|
|
@ -796,6 +796,10 @@ typedef enum sprite
|
|||
|
||||
SPR_DBOS, // Drift boost flame
|
||||
|
||||
SPR_EGOO,
|
||||
|
||||
SPR_WTRL, // Water Trail
|
||||
|
||||
// Xmas-specific sprites that don't fit aboxe
|
||||
SPR_XMS4,
|
||||
SPR_XMS5,
|
||||
|
|
@ -4184,6 +4188,25 @@ typedef enum state
|
|||
S_BATTLECAPSULE_SUPPORT,
|
||||
S_BATTLECAPSULE_SUPPORTFLY,
|
||||
|
||||
S_EGOORB,
|
||||
|
||||
S_WATERTRAIL1,
|
||||
S_WATERTRAIL2,
|
||||
S_WATERTRAIL3,
|
||||
S_WATERTRAIL4,
|
||||
S_WATERTRAIL5,
|
||||
S_WATERTRAIL6,
|
||||
S_WATERTRAIL7,
|
||||
S_WATERTRAIL8,
|
||||
S_WATERTRAILUNDERLAY1,
|
||||
S_WATERTRAILUNDERLAY2,
|
||||
S_WATERTRAILUNDERLAY3,
|
||||
S_WATERTRAILUNDERLAY4,
|
||||
S_WATERTRAILUNDERLAY5,
|
||||
S_WATERTRAILUNDERLAY6,
|
||||
S_WATERTRAILUNDERLAY7,
|
||||
S_WATERTRAILUNDERLAY8,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
#endif
|
||||
|
|
@ -5013,6 +5036,9 @@ typedef enum mobj_type
|
|||
MT_BATTLECAPSULE,
|
||||
MT_BATTLECAPSULE_PIECE,
|
||||
|
||||
MT_WATERTRAIL,
|
||||
MT_WATERTRAILUNDERLAY,
|
||||
|
||||
#ifdef SEENAMES
|
||||
MT_NAMECHECK,
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ static void K_DebugWaypointsSpawnLine(waypoint_t *const waypoint1, waypoint_t *c
|
|||
spawnedmobj->state->tics = 1;
|
||||
spawnedmobj->frame = spawnedmobj->frame & ~FF_TRANSMASK;
|
||||
spawnedmobj->color = linkcolours[linkcolour];
|
||||
spawnedmobj->scale = FixedMul(FRACUNIT/4, FixedDiv((15 - ((leveltime + n) % 16))*FRACUNIT, 15*FRACUNIT));
|
||||
spawnedmobj->scale = FixedMul(spawnedmobj->scale, FixedMul(FRACUNIT/4, FixedDiv((15 - ((leveltime + n) % 16))*FRACUNIT, 15*FRACUNIT)));
|
||||
}
|
||||
|
||||
x += stepx;
|
||||
|
|
@ -483,6 +483,48 @@ static void K_DebugWaypointsSpawnLine(waypoint_t *const waypoint1, waypoint_t *c
|
|||
} while (n--);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
||||
|
||||
Draw a debugging circle to represent a waypoint's radius
|
||||
|
||||
Input Arguments:-
|
||||
waypoint - A waypoint to draw the radius of
|
||||
--------------------------------------------------*/
|
||||
static void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
||||
{
|
||||
mobj_t *radiusOrb;
|
||||
mobj_t *waypointmobj;
|
||||
const INT32 numRadiusMobjs = 64;
|
||||
INT32 i = 0;
|
||||
angle_t spawnAngle = 0U;
|
||||
fixed_t spawnX= 0;
|
||||
fixed_t spawnY= 0;
|
||||
fixed_t spawnZ= 0;
|
||||
|
||||
I_Assert(waypoint != NULL);
|
||||
I_Assert(waypoint->mobj != NULL);
|
||||
|
||||
waypointmobj = waypoint->mobj;
|
||||
|
||||
for (i = 0; i < numRadiusMobjs; i++)
|
||||
{
|
||||
spawnAngle = (ANGLE_MAX / numRadiusMobjs) * i;
|
||||
|
||||
spawnZ = waypointmobj->z;
|
||||
spawnX = waypointmobj->x + P_ReturnThrustX(waypointmobj, spawnAngle, waypointmobj->radius);
|
||||
spawnY = waypointmobj->y + P_ReturnThrustY(waypointmobj, spawnAngle, waypointmobj->radius);
|
||||
|
||||
radiusOrb = P_SpawnMobj(spawnX, spawnY, spawnZ, MT_SPARK);
|
||||
P_SetMobjState(radiusOrb, S_THOK);
|
||||
radiusOrb->state->nextstate = S_NULL;
|
||||
radiusOrb->state->tics = 1;
|
||||
radiusOrb->frame = radiusOrb->frame & ~FF_TRANSMASK;
|
||||
radiusOrb->color = SKINCOLOR_PURPLE;
|
||||
radiusOrb->scale = radiusOrb->scale / 4;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_DebugWaypointsVisualise(void)
|
||||
|
||||
|
|
@ -523,15 +565,20 @@ void K_DebugWaypointsVisualise(void)
|
|||
{
|
||||
if (waypoint->numnextwaypoints == 0 && waypoint->numprevwaypoints == 0)
|
||||
{
|
||||
P_SetMobjState(debugmobj, S_EGOORB);
|
||||
debugmobj->color = SKINCOLOR_RED;
|
||||
debugmobj->colorized = true;
|
||||
}
|
||||
else if (waypoint->numnextwaypoints == 0 || waypoint->numprevwaypoints == 0)
|
||||
{
|
||||
P_SetMobjState(debugmobj, S_EGOORB);
|
||||
debugmobj->color = SKINCOLOR_YELLOW;
|
||||
debugmobj->colorized = true;
|
||||
}
|
||||
else if (waypoint == players[displayplayers[0]].nextwaypoint)
|
||||
{
|
||||
debugmobj->color = SKINCOLOR_GREEN;
|
||||
K_DebugWaypointDrawRadius(waypoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ extern consvar_t cv_masterserver, cv_servername;
|
|||
// < 0 to not connect (usually -1) (offline mode)
|
||||
// == 0 to show all rooms, not a valid hosting room
|
||||
// anything else is whatever room the MS assigns to that number (online mode)
|
||||
INT16 ms_RoomId;
|
||||
extern INT16 ms_RoomId;
|
||||
|
||||
const char *GetMasterServerPort(void);
|
||||
const char *GetMasterServerIP(void);
|
||||
|
|
|
|||
|
|
@ -969,10 +969,11 @@ typedef enum
|
|||
MD2_COLORIZED = 1<<9,
|
||||
MD2_WAYPOINTCAP = 1<<10,
|
||||
MD2_KITEMCAP = 1<<11,
|
||||
MD2_ITNEXT = 1<<12
|
||||
MD2_ITNEXT = 1<<12,
|
||||
#ifdef ESLOPE
|
||||
, MD2_SLOPE = 1<<13
|
||||
MD2_SLOPE = 1<<13,
|
||||
#endif
|
||||
MD2_SHADOWSCALE = 1<<14,
|
||||
} mobj_diff2_t;
|
||||
|
||||
typedef enum
|
||||
|
|
@ -1169,6 +1170,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
if (mobj->standingslope)
|
||||
diff2 |= MD2_SLOPE;
|
||||
#endif
|
||||
if (mobj->shadowscale)
|
||||
diff2 |= MD2_SHADOWSCALE;
|
||||
if (mobj->colorized)
|
||||
diff2 |= MD2_COLORIZED;
|
||||
if (mobj == waypointcap)
|
||||
|
|
@ -1298,6 +1301,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
#endif
|
||||
if (diff2 & MD2_COLORIZED)
|
||||
WRITEUINT8(save_p, mobj->colorized);
|
||||
if (diff2 & MD2_SHADOWSCALE)
|
||||
WRITEFIXED(save_p, mobj->shadowscale);
|
||||
|
||||
WRITEUINT32(save_p, mobj->mobjnum);
|
||||
}
|
||||
|
|
@ -2225,6 +2230,8 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
|||
#endif
|
||||
if (diff2 & MD2_COLORIZED)
|
||||
mobj->colorized = READUINT8(save_p);
|
||||
if (diff2 & MD2_SHADOWSCALE)
|
||||
mobj->shadowscale = READFIXED(save_p);
|
||||
|
||||
if (diff & MD_REDFLAG)
|
||||
{
|
||||
|
|
|
|||
78
src/p_user.c
78
src/p_user.c
|
|
@ -6046,6 +6046,7 @@ static void P_MovePlayer(player_t *player)
|
|||
*/
|
||||
|
||||
// If you're running fast enough, you can create splashes as you run in shallow water.
|
||||
#if 0
|
||||
if (!player->climbing
|
||||
&& ((!(player->mo->eflags & MFE_VERTICALFLIP) && player->mo->z + player->mo->height >= player->mo->watertop && player->mo->z <= player->mo->watertop)
|
||||
|| (player->mo->eflags & MFE_VERTICALFLIP && player->mo->z + player->mo->height >= player->mo->waterbottom && player->mo->z <= player->mo->waterbottom))
|
||||
|
|
@ -6066,6 +6067,83 @@ static void P_MovePlayer(player_t *player)
|
|||
water->destscale = player->mo->scale;
|
||||
P_SetScale(water, player->mo->scale);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!player->climbing
|
||||
&& ((!(player->mo->eflags & MFE_VERTICALFLIP) && player->mo->z + player->mo->height >= player->mo->watertop && player->mo->z <= player->mo->watertop)
|
||||
|| (player->mo->eflags & MFE_VERTICALFLIP && player->mo->z + player->mo->height >= player->mo->waterbottom && player->mo->z <= player->mo->waterbottom))
|
||||
&& (player->speed > runspd || (player->pflags & PF_STARTDASH))
|
||||
&& player->mo->momz == 0 && !(player->pflags & PF_SLIDING) && !player->spectator)
|
||||
{
|
||||
fixed_t trailScale = FixedMul(FixedDiv(player->speed - runspd, K_GetKartSpeed(player, false) - runspd), mapobjectscale);
|
||||
fixed_t playerTopSpeed = K_GetKartSpeed(player, false);
|
||||
|
||||
if (playerTopSpeed > runspd)
|
||||
trailScale = FixedMul(FixedDiv(player->speed - runspd, playerTopSpeed - runspd), mapobjectscale);
|
||||
else
|
||||
trailScale = mapobjectscale; // Scaling is based off difference between runspeed and top speed
|
||||
|
||||
if (trailScale > 0)
|
||||
{
|
||||
const angle_t forwardangle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
|
||||
const fixed_t playerVisualRadius = player->mo->radius + 8*FRACUNIT;
|
||||
const size_t numFrames = S_WATERTRAIL8 - S_WATERTRAIL1;
|
||||
const statenum_t curOverlayFrame = S_WATERTRAIL1 + (leveltime % numFrames);
|
||||
const statenum_t curUnderlayFrame = S_WATERTRAILUNDERLAY1 + (leveltime % numFrames);
|
||||
fixed_t x1, x2, y1, y2;
|
||||
mobj_t *water;
|
||||
|
||||
x1 = player->mo->x + player->mo->momx + P_ReturnThrustX(player->mo, forwardangle + ANGLE_90, playerVisualRadius);
|
||||
y1 = player->mo->y + player->mo->momy + P_ReturnThrustY(player->mo, forwardangle + ANGLE_90, playerVisualRadius);
|
||||
x1 = x1 + P_ReturnThrustX(player->mo, forwardangle, playerVisualRadius);
|
||||
y1 = y1 + P_ReturnThrustY(player->mo, forwardangle, playerVisualRadius);
|
||||
|
||||
x2 = player->mo->x + player->mo->momx + P_ReturnThrustX(player->mo, forwardangle - ANGLE_90, playerVisualRadius);
|
||||
y2 = player->mo->y + player->mo->momy + P_ReturnThrustY(player->mo, forwardangle - ANGLE_90, playerVisualRadius);
|
||||
x2 = x2 + P_ReturnThrustX(player->mo, forwardangle, playerVisualRadius);
|
||||
y2 = y2 + P_ReturnThrustY(player->mo, forwardangle, playerVisualRadius);
|
||||
|
||||
// Left
|
||||
// underlay
|
||||
water = P_SpawnMobj(x1, y1,
|
||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_WATERTRAILUNDERLAY].height, player->mo->scale) : player->mo->watertop), MT_WATERTRAILUNDERLAY);
|
||||
water->angle = forwardangle - ANGLE_180 - ANGLE_22h;
|
||||
water->destscale = trailScale;
|
||||
P_SetScale(water, trailScale);
|
||||
P_SetMobjState(water, curUnderlayFrame);
|
||||
|
||||
// overlay
|
||||
water = P_SpawnMobj(x1, y1,
|
||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_WATERTRAIL].height, player->mo->scale) : player->mo->watertop), MT_WATERTRAIL);
|
||||
water->angle = forwardangle - ANGLE_180 - ANGLE_22h;
|
||||
water->destscale = trailScale;
|
||||
P_SetScale(water, trailScale);
|
||||
P_SetMobjState(water, curOverlayFrame);
|
||||
|
||||
// Right
|
||||
// Underlay
|
||||
water = P_SpawnMobj(x2, y2,
|
||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_WATERTRAILUNDERLAY].height, player->mo->scale) : player->mo->watertop), MT_WATERTRAILUNDERLAY);
|
||||
water->angle = forwardangle - ANGLE_180 + ANGLE_22h;
|
||||
water->destscale = trailScale;
|
||||
P_SetScale(water, trailScale);
|
||||
P_SetMobjState(water, curUnderlayFrame);
|
||||
|
||||
// Overlay
|
||||
water = P_SpawnMobj(x2, y2,
|
||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_WATERTRAIL].height, player->mo->scale) : player->mo->watertop), MT_WATERTRAIL);
|
||||
water->angle = forwardangle - ANGLE_180 + ANGLE_22h;
|
||||
water->destscale = trailScale;
|
||||
P_SetScale(water, trailScale);
|
||||
P_SetMobjState(water, curOverlayFrame);
|
||||
|
||||
if (!S_SoundPlaying(player->mo, sfx_s3kdbs))
|
||||
{
|
||||
const INT32 volume = (min(trailScale, FRACUNIT) * 255) / FRACUNIT;
|
||||
S_StartSoundAtVolume(player->mo, sfx_s3kdbs, volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Little water sound while touching water - just a nicety.
|
||||
if ((player->mo->eflags & MFE_TOUCHWATER) && !(player->mo->eflags & MFE_UNDERWATER) && !player->spectator)
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ static visplane_t *new_visplane(unsigned hash)
|
|||
visplane_t *check = freetail;
|
||||
if (!check)
|
||||
{
|
||||
check = calloc(2, sizeof (*check));
|
||||
check = calloc(1, sizeof (*check));
|
||||
if (check == NULL) I_Error("%s: Out of memory", "new_visplane"); // FIXME: ugly
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ void S_StopSoundByNum(sfxenum_t sfxnum);
|
|||
#ifdef MUSICSLOT_COMPATIBILITY
|
||||
// For compatibility with code/scripts relying on older versions
|
||||
// This is a list of all the "special" slot names and their associated numbers
|
||||
const char *compat_special_music_slots[16];
|
||||
extern const char *compat_special_music_slots[16];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#endif
|
||||
|
||||
#include "../doomdef.h"
|
||||
#include "../d_main.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "../hardware/r_opengl/r_opengl.h"
|
||||
|
|
@ -154,11 +155,26 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
|||
{
|
||||
INT32 cbpp = cv_scr_depth.value < 16 ? 16 : cv_scr_depth.value;
|
||||
static boolean first_init = false;
|
||||
const char *gllogdir = NULL;
|
||||
|
||||
oglflags = 0;
|
||||
|
||||
if (!first_init)
|
||||
{
|
||||
if (!gllogstream)
|
||||
{
|
||||
gllogdir = D_Home();
|
||||
|
||||
#ifdef DEBUG_TO_FILE
|
||||
#ifdef DEFAULTDIR
|
||||
if (gllogdir)
|
||||
gllogstream = fopen(va("%s/"DEFAULTDIR"/ogllog.txt",gllogdir), "wt");
|
||||
else
|
||||
#endif
|
||||
gllogstream = fopen("./ogllog.txt", "wt");
|
||||
#endif
|
||||
}
|
||||
|
||||
gl_version = pglGetString(GL_VERSION);
|
||||
gl_renderer = pglGetString(GL_RENDERER);
|
||||
gl_extensions = pglGetString(GL_EXTENSIONS);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue