Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into repeat-monitors

This commit is contained in:
Inuyasha 2016-01-15 02:20:34 -08:00
commit 9ba43e1d01
21 changed files with 120 additions and 62 deletions

View file

@ -103,7 +103,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
include(GitUtilities) include(GitUtilities)
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}") git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}") git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}-<${SRB2_GIT_BRANCH}>") set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
##### PACKAGE CONFIGURATION ##### ##### PACKAGE CONFIGURATION #####

View file

@ -1,10 +1,31 @@
@ECHO OFF @ECHO OFF
set REV=Unknown set BRA=Unknown
set REV=illegal
copy nul: /b +%1\comptime.c tmp.$$$ > nul copy nul: /b +%1\comptime.c tmp.$$$ > nul
move tmp.$$$ %1\comptime.c > nul move tmp.$$$ %1\comptime.c > nul
SET REV=illegal
FOR /F "usebackq" %%s IN (`svnversion %1`) DO @SET REV=%%s if exist .git goto gitrev
if exist .svn goto svnrev
goto filwri
:gitrev
set GIT=%2
if "%GIT%"=="" set GIT=git
FOR /F "usebackq" %%s IN (`%GIT% rev-parse --abbrev-ref HEAD`) DO @SET BRA=%%s
FOR /F "usebackq" %%s IN (`%GIT% rev-parse HEAD`) DO @SET REV=%%s
set REV=%REV:~0,8%
goto filwri
:svnrev
set BRA=Subversion
FOR /F "usebackq" %%s IN (`svnversion .`) DO @SET REV=%%s
set REV=r%REV%
goto filwri
:filwri
ECHO // Do not edit! This file was autogenerated > %1\comptime.h ECHO // Do not edit! This file was autogenerated > %1\comptime.h
ECHO // by the %0 batch file >> %1\comptime.h ECHO // by the %0 batch file >> %1\comptime.h
ECHO // >> %1\comptime.h ECHO // >> %1\comptime.h
ECHO const char* comprevision = "r%REV%"; >> %1\comptime.h ECHO const char* compbranch = "%BRA%"; >> %1\comptime.h
ECHO const char* comprevision = "%REV%"; >> %1\comptime.h

View file

@ -5,13 +5,15 @@ if [ x"$1" != x ]; then
fi fi
versiongit() { versiongit() {
gitversion=`git describe` gitbranch=`git rev-parse --abbrev-ref HEAD`
gitversion=`git rev-parse HEAD`
cat <<EOF > $path/comptime.h cat <<EOF > $path/comptime.h
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with git svn // by the $0 script with git
// //
const char* comprevision = "$gitversion"; const char* compbranch = "$gitbranch";
const char* comprevision = "${gitversion:0:8}";
EOF EOF
exit 0 exit 0
} }
@ -23,6 +25,7 @@ versionsvn() {
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with subversion // by the $0 script with subversion
// //
const char* compbranch = "Subversion";
const char* comprevision = "r$svnrevision"; const char* comprevision = "r$svnrevision";
EOF EOF
exit 0 exit 0
@ -34,6 +37,7 @@ versionfake() {
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with an unknown or nonexist SCM // by the $0 script with an unknown or nonexist SCM
// //
const char* compbranch = "Unknown";
const char* comprevision = "illegal"; const char* comprevision = "illegal";
EOF EOF
} }

View file

@ -9,12 +9,14 @@
#if (defined(CMAKECONFIG)) #if (defined(CMAKECONFIG))
#include "config.h" #include "config.h"
const char *compbranch = SRB2_COMP_BRANCH;
const char *comprevision = SRB2_COMP_REVISION; const char *comprevision = SRB2_COMP_REVISION;
#elif (defined(COMPVERSION)) #elif (defined(COMPVERSION))
#include "comptime.h" #include "comptime.h"
#else #else
const char *compbranch = "Unknown";
const char *comprevision = "illegal"; const char *comprevision = "illegal";
#endif #endif

View file

@ -18,6 +18,7 @@
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" #define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}" #define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}" #define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"

View file

@ -3179,7 +3179,11 @@ static void Command_ListWADS_f(void)
*/ */
static void Command_Version_f(void) static void Command_Version_f(void)
{ {
#ifdef DEVELOP
CONS_Printf("Sonic Robo Blast 2 %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
#else
CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision); CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision);
#endif
} }
#ifdef UPDATE_ALERT #ifdef UPDATE_ALERT

View file

@ -166,7 +166,7 @@ typedef enum
PA_RUN, PA_RUN,
PA_PAIN, PA_PAIN,
PA_ROLL, PA_ROLL,
PA_JUMP, PA_SPRING,
PA_FALL, PA_FALL,
PA_ABILITY, PA_ABILITY,
PA_RIDE PA_RIDE

View file

@ -3762,6 +3762,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAY_DASH", "S_PLAY_DASH",
"S_PLAY_GASP", "S_PLAY_GASP",
"S_PLAY_JUMP", "S_PLAY_JUMP",
"S_PLAY_SPRING",
"S_PLAY_FALL", "S_PLAY_FALL",
"S_PLAY_EDGE", "S_PLAY_EDGE",
"S_PLAY_RIDE", "S_PLAY_RIDE",
@ -3786,6 +3787,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAY_SUPER_SPIN", "S_PLAY_SUPER_SPIN",
"S_PLAY_SUPER_GASP", "S_PLAY_SUPER_GASP",
"S_PLAY_SUPER_JUMP", "S_PLAY_SUPER_JUMP",
"S_PLAY_SUPER_SPRING",
"S_PLAY_SUPER_FALL", "S_PLAY_SUPER_FALL",
"S_PLAY_SUPER_EDGE", "S_PLAY_SUPER_EDGE",
"S_PLAY_SUPER_RIDE", "S_PLAY_SUPER_RIDE",
@ -7690,7 +7692,7 @@ struct {
{"PA_RUN",PA_RUN}, {"PA_RUN",PA_RUN},
{"PA_PAIN",PA_PAIN}, {"PA_PAIN",PA_PAIN},
{"PA_ROLL",PA_ROLL}, {"PA_ROLL",PA_ROLL},
{"PA_JUMP",PA_JUMP}, {"PA_SPRING",PA_SPRING},
{"PA_FALL",PA_FALL}, {"PA_FALL",PA_FALL},
{"PA_ABILITY",PA_ABILITY}, {"PA_ABILITY",PA_ABILITY},
{"PA_RIDE",PA_RIDE}, {"PA_RIDE",PA_RIDE},

View file

@ -142,8 +142,10 @@ extern FILE *logstream;
#ifdef DEVELOP #ifdef DEVELOP
#define VERSION 0 // Game version #define VERSION 0 // Game version
#define SUBVERSION 0 // more precise version number #define SUBVERSION 0 // more precise version number
#define VERSIONSTRING "Trunk" #define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW L"Trunk" #define VERSIONSTRINGW L"Development EXE"
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else #else
#define VERSION 202 // Game version #define VERSION 202 // Game version
#define SUBVERSION 0 // more precise version number #define SUBVERSION 0 // more precise version number
@ -430,7 +432,7 @@ INT32 I_GetKey(void);
#endif #endif
// Compile date and time and revision. // Compile date and time and revision.
extern const char *compdate, *comptime, *comprevision; extern const char *compdate, *comptime, *comprevision, *compbranch;
// Disabled code and code under testing // Disabled code and code under testing
// None of these that are disabled in the normal build are guaranteed to work perfectly // None of these that are disabled in the normal build are guaranteed to work perfectly

View file

@ -1085,7 +1085,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
if (!cv_grmd2.value) if (!cv_grmd2.value)
return; return;
if (!spr->precip) if (spr->precip)
return; return;
// MD2 colormap fix // MD2 colormap fix

View file

@ -69,6 +69,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
"DASH", "DASH",
"GASP", "GASP",
"JUMP", "JUMP",
"SPNG",
"FALL", "FALL",
"EDGE", "EDGE",
"RIDE", "RIDE",
@ -94,6 +95,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
"SSPN", "SSPN",
"SGSP", "SGSP",
"SJMP", "SJMP",
"SSPG",
"SFAL", "SFAL",
"SEDG", "SEDG",
"SRID", "SRID",
@ -135,7 +137,8 @@ state_t states[NUMSTATES] =
{SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN {SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
{SPR_PLAY, SPR2_DASH, 2, {NULL}, 0, 0, S_PLAY_DASH}, // S_PLAY_DASH {SPR_PLAY, SPR2_DASH, 2, {NULL}, 0, 0, S_PLAY_DASH}, // S_PLAY_DASH
{SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP {SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
{SPR_PLAY, SPR2_JUMP, 2, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP {SPR_PLAY, SPR2_JUMP, 1, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
{SPR_PLAY, SPR2_SPNG, 2, {NULL}, 0, 0, S_PLAY_SPRING}, // S_PLAY_SPRING
{SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL {SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
{SPR_PLAY, SPR2_EDGE, 12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE {SPR_PLAY, SPR2_EDGE, 12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
{SPR_PLAY, SPR2_RIDE, 4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE {SPR_PLAY, SPR2_RIDE, 4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
@ -159,7 +162,8 @@ state_t states[NUMSTATES] =
{SPR_PLAY, SPR2_SDRN, 4, {NULL}, 0, 0, S_PLAY_SUPER_DRWN}, // S_PLAY_SUPER_DRWN {SPR_PLAY, SPR2_SDRN, 4, {NULL}, 0, 0, S_PLAY_SUPER_DRWN}, // S_PLAY_SUPER_DRWN
{SPR_PLAY, SPR2_SSPN, 1, {NULL}, 0, 0, S_PLAY_SUPER_SPIN}, // S_PLAY_SUPER_SPIN {SPR_PLAY, SPR2_SSPN, 1, {NULL}, 0, 0, S_PLAY_SUPER_SPIN}, // S_PLAY_SUPER_SPIN
{SPR_PLAY, SPR2_SGSP, 14, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_GASP {SPR_PLAY, SPR2_SGSP, 14, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_GASP
{SPR_PLAY, SPR2_SJMP, 2, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP {SPR_PLAY, SPR2_SJMP, 1, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
{SPR_PLAY, SPR2_SSPG, 2, {NULL}, 0, 0, S_PLAY_SUPER_SPRING}, // S_PLAY_SUPER_SPRING
{SPR_PLAY, SPR2_SFAL, 2, {NULL}, 0, 0, S_PLAY_SUPER_FALL}, // S_PLAY_SUPER_FALL {SPR_PLAY, SPR2_SFAL, 2, {NULL}, 0, 0, S_PLAY_SUPER_FALL}, // S_PLAY_SUPER_FALL
{SPR_PLAY, SPR2_SEDG, 12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE {SPR_PLAY, SPR2_SEDG, 12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
{SPR_PLAY, SPR2_SRID, 4, {NULL}, 0, 0, S_PLAY_SUPER_RIDE}, // S_PLAY_SUPER_RIDE {SPR_PLAY, SPR2_SRID, 4, {NULL}, 0, 0, S_PLAY_SUPER_RIDE}, // S_PLAY_SUPER_RIDE

View file

@ -594,6 +594,7 @@ enum playersprite
SPR2_DASH, SPR2_DASH,
SPR2_GASP, SPR2_GASP,
SPR2_JUMP, SPR2_JUMP,
SPR2_SPNG, // spring
SPR2_FALL, SPR2_FALL,
SPR2_EDGE, SPR2_EDGE,
SPR2_RIDE, SPR2_RIDE,
@ -619,6 +620,7 @@ enum playersprite
SPR2_SSPN, SPR2_SSPN,
SPR2_SGSP, SPR2_SGSP,
SPR2_SJMP, SPR2_SJMP,
SPR2_SSPG,
SPR2_SFAL, SPR2_SFAL,
SPR2_SEDG, SPR2_SEDG,
SPR2_SRID, SPR2_SRID,
@ -655,7 +657,8 @@ typedef enum state
S_PLAY_SPIN, S_PLAY_SPIN,
S_PLAY_DASH, S_PLAY_DASH,
S_PLAY_GASP, S_PLAY_GASP,
S_PLAY_JUMP, S_PLAY_JUMP, // spin jump (todo: make jump separate from spring up for non-spin chars too?)
S_PLAY_SPRING,
S_PLAY_FALL, S_PLAY_FALL,
S_PLAY_EDGE, S_PLAY_EDGE,
S_PLAY_RIDE, S_PLAY_RIDE,
@ -679,7 +682,8 @@ typedef enum state
S_PLAY_SUPER_DRWN, S_PLAY_SUPER_DRWN,
S_PLAY_SUPER_SPIN, S_PLAY_SUPER_SPIN,
S_PLAY_SUPER_GASP, S_PLAY_SUPER_GASP,
S_PLAY_SUPER_JUMP, S_PLAY_SUPER_JUMP, // see note above
S_PLAY_SUPER_SPRING,
S_PLAY_SUPER_FALL, S_PLAY_SUPER_FALL,
S_PLAY_SUPER_EDGE, S_PLAY_SUPER_EDGE,
S_PLAY_SUPER_RIDE, S_PLAY_SUPER_RIDE,

View file

@ -2463,11 +2463,14 @@ void M_Drawer(void)
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, customversionstring); V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, customversionstring);
} }
else else
#if VERSION > 0 || SUBVERSION > 0 {
#ifdef DEVELOP // Development -- show revision / branch info
V_DrawThinString(vid.dupx, vid.height - 17*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch);
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision);
#else // Regular build
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING)); V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING));
#else // Trunk build, show revision info
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s (%s)", VERSIONSTRING, comprevision));
#endif #endif
}
} }
} }

View file

@ -1800,16 +1800,14 @@ UINT8 M_HighestBit(UINT32 num)
const char *GetRevisionString(void) const char *GetRevisionString(void)
{ {
INT32 vinfo; static char rev[9] = {0};
static char rev[8] = {0};
if (rev[0]) if (rev[0])
return rev; return rev;
vinfo = atoi(&comprevision[1]); if (comprevision[0] == 'r')
if (vinfo) strncpy(rev, comprevision, 7);
snprintf(rev, 7, "r%d", vinfo);
else else
strcpy(rev, "rNULL"); snprintf(rev, 7, "r%s", comprevision);
rev[7] = '\0'; rev[7] = '\0';
return rev; return rev;

View file

@ -199,7 +199,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
P_ResetPlayer(object->player); P_ResetPlayer(object->player);
if (P_MobjFlip(object)*vertispeed > 0) if (P_MobjFlip(object)*vertispeed > 0)
P_SetPlayerMobjState(object, S_PLAY_JUMP); P_SetPlayerMobjState(object, S_PLAY_SPRING);
else if (P_MobjFlip(object)*vertispeed < 0) else if (P_MobjFlip(object)*vertispeed < 0)
P_SetPlayerMobjState(object, S_PLAY_FALL); P_SetPlayerMobjState(object, S_PLAY_FALL);
else // horizontal spring else // horizontal spring
@ -213,7 +213,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
if (spring->info->painchance) if (spring->info->painchance)
{ {
object->player->pflags |= PF_JUMPED; object->player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(object, S_PLAY_SPIN); P_SetPlayerMobjState(object, S_PLAY_JUMP);
} }
} }
return true; return true;
@ -1929,7 +1929,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
// Don't 'step up' while springing, // Don't 'step up' while springing,
// Only step up "if needed". // Only step up "if needed".
if (thing->player->panim == PA_JUMP if (thing->player->panim == PA_SPRING
&& P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale)) && P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale))
maxstep = 0; maxstep = 0;
} }

View file

@ -163,7 +163,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
case S_PLAY_GASP: case S_PLAY_GASP:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP); return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP);
case S_PLAY_JUMP: case S_PLAY_JUMP:
if (!(player->charflags & SF_SUPERSPIN))
return true;
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP); return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP);
case S_PLAY_SPRING:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_SPRING);
case S_PLAY_FALL: case S_PLAY_FALL:
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL); return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL);
case S_PLAY_EDGE: case S_PLAY_EDGE:
@ -209,12 +213,14 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
break; break;
case S_PLAY_SPIN: case S_PLAY_SPIN:
case S_PLAY_DASH: case S_PLAY_DASH:
case S_PLAY_JUMP:
case S_PLAY_SUPER_SPIN: case S_PLAY_SUPER_SPIN:
case S_PLAY_SUPER_JUMP:
player->panim = PA_ROLL; player->panim = PA_ROLL;
break; break;
case S_PLAY_JUMP: case S_PLAY_SPRING:
case S_PLAY_SUPER_JUMP: case S_PLAY_SUPER_SPRING:
player->panim = PA_JUMP; player->panim = PA_SPRING;
break; break;
case S_PLAY_FALL: case S_PLAY_FALL:
case S_PLAY_SUPER_FALL: case S_PLAY_SUPER_FALL:
@ -317,9 +323,12 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
spr2 = SPR2_SPIN; spr2 = SPR2_SPIN;
break; break;
case SPR2_GASP: case SPR2_GASP:
spr2 = SPR2_JUMP; spr2 = SPR2_SPNG;
break; break;
case SPR2_JUMP: case SPR2_JUMP:
spr2 = SPR2_SPIN;
break;
case SPR2_SPNG: // spring
spr2 = SPR2_FALL; spr2 = SPR2_FALL;
break; break;
case SPR2_FALL: case SPR2_FALL:
@ -330,7 +339,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
break; break;
case SPR2_FLY: case SPR2_FLY:
spr2 = SPR2_JUMP; spr2 = SPR2_SPNG;
break; break;
case SPR2_TIRE: case SPR2_TIRE:
spr2 = SPR2_FLY; spr2 = SPR2_FLY;
@ -379,6 +388,9 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
case SPR2_SJMP: case SPR2_SJMP:
spr2 = SPR2_JUMP; spr2 = SPR2_JUMP;
break; break;
case SPR2_SSPG:
spr2 = SPR2_SPNG;
break;
case SPR2_SFAL: case SPR2_SFAL:
spr2 = SPR2_FALL; spr2 = SPR2_FALL;
break; break;

View file

@ -1598,7 +1598,7 @@ void P_DoPlayerExit(player_t *player)
{ {
player->climbing = 0; player->climbing = 0;
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
player->powers[pw_underwater] = 0; player->powers[pw_underwater] = 0;
player->powers[pw_spacetime] = 0; player->powers[pw_spacetime] = 0;
@ -2666,21 +2666,21 @@ static void P_DoClimbing(player_t *player)
player->climbing = 0; player->climbing = 0;
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
if (skyclimber) if (skyclimber)
{ {
player->climbing = 0; player->climbing = 0;
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
} }
else else
{ {
player->climbing = 0; player->climbing = 0;
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
if (cmd->sidemove != 0 || cmd->forwardmove != 0) if (cmd->sidemove != 0 || cmd->forwardmove != 0)
@ -2698,7 +2698,7 @@ static void P_DoClimbing(player_t *player)
{ {
player->climbing = 0; player->climbing = 0;
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false); P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale)); P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
} }
@ -2709,7 +2709,7 @@ static void P_DoClimbing(player_t *player)
localangle2 = player->mo->angle; localangle2 = player->mo->angle;
if (player->climbing == 0) if (player->climbing == 0)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
if (player->climbing && P_IsObjectOnGround(player->mo)) if (player->climbing && P_IsObjectOnGround(player->mo))
{ {
@ -3497,8 +3497,9 @@ static void P_DoSuperStuff(player_t *player)
if (player->mo->health > 0) if (player->mo->health > 0)
{ {
if ((player->pflags & PF_JUMPED || player->pflags & PF_SPINNING) if (player->pflags & PF_JUMPED)
&& player->mo->state-states != S_PLAY_DASH) P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
else if (player->pflags & PF_SPINNING && player->mo->state-states != S_PLAY_DASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
else switch (player->mo->state-states) else switch (player->mo->state-states)
{ {
@ -3516,8 +3517,8 @@ static void P_DoSuperStuff(player_t *player)
case S_PLAY_SUPER_PAIN: case S_PLAY_SUPER_PAIN:
P_SetPlayerMobjState(player->mo, S_PLAY_PAIN); P_SetPlayerMobjState(player->mo, S_PLAY_PAIN);
break; break;
case S_PLAY_SUPER_JUMP: case S_PLAY_SUPER_SPRING:
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP); P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
break; break;
case S_PLAY_SUPER_FALL: case S_PLAY_SUPER_FALL:
P_SetPlayerMobjState(player->mo, S_PLAY_FALL); P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
@ -3737,9 +3738,9 @@ void P_DoJump(player_t *player, boolean soundandstate)
S_StartSound(player->mo, sfx_jump); // Play jump sound! S_StartSound(player->mo, sfx_jump); // Play jump sound!
if (!(player->charability2 == CA2_SPINDASH)) if (!(player->charability2 == CA2_SPINDASH))
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP); P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
else else
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
} }
@ -6516,10 +6517,10 @@ static void P_MovePlayer(player_t *player)
} }
// If Springing, but travelling DOWNWARD, change back! // If Springing, but travelling DOWNWARD, change back!
if (player->panim == PA_JUMP && P_MobjFlip(player->mo)*player->mo->momz < 0) if (player->panim == PA_SPRING && P_MobjFlip(player->mo)*player->mo->momz < 0)
P_SetPlayerMobjState(player->mo, S_PLAY_FALL); P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
// If Springing but on the ground, change back! // If Springing but on the ground, change back!
else if (onground && (player->panim == PA_JUMP || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz) else if (onground && (player->panim == PA_SPRING || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
P_SetPlayerMobjState(player->mo, S_PLAY_STND); P_SetPlayerMobjState(player->mo, S_PLAY_STND);
// If you are stopped and are still walking, stand still! // If you are stopped and are still walking, stand still!
@ -6558,7 +6559,7 @@ static void P_MovePlayer(player_t *player)
else else
{ {
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
} }
player->pflags &= ~PF_GLIDING; player->pflags &= ~PF_GLIDING;
@ -6616,7 +6617,7 @@ static void P_MovePlayer(player_t *player)
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]) && player->charability == CA_GLIDEANDCLIMB)) || (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]) && player->charability == CA_GLIDEANDCLIMB))
{ {
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
else else
{ {
@ -6686,7 +6687,7 @@ static void P_MovePlayer(player_t *player)
else else
{ {
player->pflags |= PF_JUMPED; player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
} }
player->powers[pw_tailsfly] = 0; player->powers[pw_tailsfly] = 0;
@ -7266,7 +7267,7 @@ static void P_DoRopeHang(player_t *player)
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED) if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH) && !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
return; return;
} }
@ -7383,7 +7384,7 @@ static void P_DoRopeHang(player_t *player)
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED) if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH) && !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
} }
P_SetTarget(&player->mo->tracer, NULL); P_SetTarget(&player->mo->tracer, NULL);
@ -8699,7 +8700,7 @@ void P_PlayerThink(player_t *player)
P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE); P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE);
} }
else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && player->panim != PA_ROLL && player->charability2 == CA2_SPINDASH) else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && player->panim != PA_ROLL && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
if (player->flashcount) if (player->flashcount)
player->flashcount--; player->flashcount--;
@ -9327,7 +9328,7 @@ void P_PlayerAfterThink(player_t *player)
&& ((!player->powers[pw_super] && player->panim != PA_ROLL) && ((!player->powers[pw_super] && player->panim != PA_ROLL)
|| player->mo->state == &states[player->mo->info->painstate]) || player->mo->state == &states[player->mo->info->painstate])
&& player->charability2 == CA2_SPINDASH) && player->charability2 == CA2_SPINDASH)
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN); P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
if (player->pflags & PF_CARRIED && player->mo->tracer) if (player->pflags & PF_CARRIED && player->mo->tracer)
{ {

View file

@ -2665,9 +2665,6 @@ next_token:
} }
free(buf2); free(buf2);
if (skin != &skins[0])
skin->flags &= ~SF_SUPER;
// Add sprites // Add sprites
{ {
UINT16 z; UINT16 z;

View file

@ -23,7 +23,7 @@
#ifdef CMAKECONFIG #ifdef CMAKECONFIG
#include "config.h" #include "config.h"
#else #else
#include "config.h.in" #include "../config.h.in"
#endif #endif
#ifndef _WIN32_WCE #ifndef _WIN32_WCE

View file

@ -217,10 +217,12 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
} }
} }
#ifdef HWRENDER
if (rendermode == render_opengl) if (rendermode == render_opengl)
{ {
OglSdlSurface(vid.width, vid.height); OglSdlSurface(vid.width, vid.height);
} }
#endif
if (rendermode == render_soft) if (rendermode == render_soft)
{ {
@ -401,9 +403,11 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code)
default: default:
break; break;
} }
#ifdef HWRENDER
DBG_Printf("Unknown incoming scancode: %d, represented %c\n", DBG_Printf("Unknown incoming scancode: %d, represented %c\n",
code, code,
SDL_GetKeyName(SDL_GetKeyFromScancode(code))); SDL_GetKeyName(SDL_GetKeyFromScancode(code)));
#endif
return 0; return 0;
} }

View file

@ -16,8 +16,6 @@
#ifdef HWRENDER #ifdef HWRENDER
#include "hardware/hw_data.h" #include "hardware/hw_data.h"
#else
typedef void GLPatch_t;
#endif #endif
#ifdef __GNUG__ #ifdef __GNUG__