Skip to content

Commit

Permalink
SRB2 2.1.12 release
Browse files Browse the repository at this point in the history
  • Loading branch information
alama committed Nov 12, 2014
1 parent 3fe4921 commit 404b5f6
Show file tree
Hide file tree
Showing 139 changed files with 2,516 additions and 1,471 deletions.
Binary file removed doc/manual/1up.png
Binary file not shown.
Binary file removed doc/manual/RNGA0000.png
Binary file not shown.
Binary file removed doc/manual/RNGB0000.png
Binary file not shown.
Binary file removed doc/manual/RNGE0000.png
Binary file not shown.
Binary file removed doc/manual/RNGG0000.png
Binary file not shown.
Binary file removed doc/manual/RNGR0000.png
Binary file not shown.
Binary file removed doc/manual/RNGS0000.png
Binary file not shown.
Binary file removed doc/manual/Ring0000.png
Binary file not shown.
Binary file removed doc/manual/acz.png
Binary file not shown.
Binary file removed doc/manual/airspin.png
Binary file not shown.
Binary file removed doc/manual/attack.png
Binary file not shown.
Binary file removed doc/manual/blue_monitor.png
Binary file not shown.
Binary file removed doc/manual/blue_ring.png
Binary file not shown.
Binary file removed doc/manual/bshield.png
Binary file not shown.
Binary file removed doc/manual/cez.png
Binary file not shown.
Binary file removed doc/manual/controls.png
Binary file not shown.
Binary file removed doc/manual/conveyor.png
Binary file not shown.
Binary file removed doc/manual/coop.png
Binary file not shown.
Binary file removed doc/manual/crusher.png
Binary file not shown.
Binary file removed doc/manual/ctf.png
Binary file not shown.
Binary file removed doc/manual/dsz.png
Binary file not shown.
Binary file removed doc/manual/eggbox.png
Binary file not shown.
Binary file removed doc/manual/eggman.png
Binary file not shown.
Binary file removed doc/manual/emblem.png
Binary file not shown.
Binary file removed doc/manual/fan.png
Binary file not shown.
Binary file removed doc/manual/gfz.png
Diff not rendered.
Binary file removed doc/manual/gshield.png
Diff not rendered.
Binary file removed doc/manual/invc.png
Diff not rendered.
Binary file removed doc/manual/knuckles.png
Diff not rendered.
Binary file removed doc/manual/koneup.png
Diff not rendered.
4 changes: 2 additions & 2 deletions doc/manual/manual.htm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
doc = doc || document;
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
Expand Down Expand Up @@ -65,4 +65,4 @@
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
</p>
</body>
</html>
</html>
Binary file removed doc/manual/match.png
Diff not rendered.
Binary file removed doc/manual/metal.png
Diff not rendered.
Binary file removed doc/manual/mixup.png
Diff not rendered.
Binary file removed doc/manual/pit.png
Diff not rendered.
Binary file removed doc/manual/platform.png
Diff not rendered.
Binary file removed doc/manual/race.png
Diff not rendered.
Binary file removed doc/manual/random.png
Diff not rendered.
Binary file removed doc/manual/recycler.png
Diff not rendered.
Binary file removed doc/manual/red_monitor.png
Diff not rendered.
Binary file removed doc/manual/red_ring.png
Diff not rendered.
Binary file removed doc/manual/ring.png
Diff not rendered.
Binary file removed doc/manual/rshield.png
Diff not rendered.
Binary file removed doc/manual/rvz.png
Diff not rendered.
Binary file removed doc/manual/shoes.png
Diff not rendered.
Binary file removed doc/manual/slime.png
Diff not rendered.
Binary file removed doc/manual/soneup.png
Diff not rendered.
Binary file removed doc/manual/spring1.png
Diff not rendered.
Binary file removed doc/manual/spring2.png
Diff not rendered.
Binary file removed doc/manual/spring3.png
Diff not rendered.
Binary file removed doc/manual/spring4.png
Diff not rendered.
Binary file removed doc/manual/spring5.png
Diff not rendered.
Binary file removed doc/manual/spring6.png
Diff not rendered.
Binary file removed doc/manual/spring7.png
Diff not rendered.
Binary file removed doc/manual/spring8.png
Diff not rendered.
Binary file removed doc/manual/stats_lives.png
Diff not rendered.
Binary file removed doc/manual/stats_rings.png
Diff not rendered.
Binary file removed doc/manual/tag.png
Diff not rendered.
Binary file removed doc/manual/tailsfly.png
Diff not rendered.
Binary file removed doc/manual/thanks.png
Diff not rendered.
Binary file removed doc/manual/thz.png
Diff not rendered.
Binary file removed doc/manual/title.png
Diff not rendered.
Binary file removed doc/manual/token.png
Diff not rendered.
Binary file removed doc/manual/toneup.png
Diff not rendered.
Binary file removed doc/manual/unknown.png
Diff not rendered.
Binary file removed doc/manual/water.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_auto.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_bounce.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_explosion.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_grenade.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_rail.png
Diff not rendered.
Binary file removed doc/manual/wpnpanel_scatter.png
Diff not rendered.
Binary file removed doc/manual/wshield.png
Diff not rendered.
Binary file removed doc/manual/yshield.png
Diff not rendered.
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Here it is! SRB2 v2.1.11 source code!
Here it is! SRB2 v2.1.12 source code!
(why do we keep the version number up to date
when everything else in this file is hilariously old?
- Inuyasha)
Expand Down
23 changes: 0 additions & 23 deletions src/blua/lapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,21 +319,6 @@ LUA_API lua_Number lua_tonumber (lua_State *L, int idx) {
return 0;
}


LUA_API lua_Integer lua_tointeger (lua_State *L, int idx) {
TValue n;
const TValue *o = index2adr(L, idx);
if (tonumber(o, &n)) {
lua_Integer res;
lua_Number num = nvalue(o);
lua_number2integer(res, num);
return res;
}
else
return 0;
}


LUA_API int lua_toboolean (lua_State *L, int idx) {
const TValue *o = index2adr(L, idx);
return !l_isfalse(o);
Expand Down Expand Up @@ -446,14 +431,6 @@ LUA_API void lua_pushnumber (lua_State *L, lua_Number n) {
}


LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) {
lua_lock(L);
setnvalue(L->top, cast_num(n));
api_incr_top(L);
lua_unlock(L);
}


LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) {
lua_lock(L);
luaC_checkGC(L);
Expand Down
14 changes: 0 additions & 14 deletions src/blua/lauxlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,6 @@ LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {
}


LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) {
lua_Integer d = lua_tointeger(L, narg);
if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */
tag_error(L, narg, LUA_TNUMBER);
return d;
}


LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg,
lua_Integer def) {
return luaL_opt(L, luaL_checkinteger, narg, def);
}


LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) {
if (!lua_getmetatable(L, obj)) /* no metatable? */
return 0;
Expand Down
5 changes: 2 additions & 3 deletions src/blua/lauxlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg,
LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg);
LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def);

LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg);
LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg,
lua_Integer def);
#define luaL_checkinteger luaL_checknumber
#define luaL_optinteger luaL_optnumber

LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg);
LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t);
Expand Down
6 changes: 3 additions & 3 deletions src/blua/lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ typedef LUA_NUMBER lua_Number;


/* type for integer functions */
typedef LUA_INTEGER lua_Integer;
#define lua_Integer lua_Number



Expand Down Expand Up @@ -144,7 +144,7 @@ LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2);
LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2);

LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx);
LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx);
#define lua_tointeger lua_tonumber
LUA_API int (lua_toboolean) (lua_State *L, int idx);
LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
LUA_API size_t (lua_objlen) (lua_State *L, int idx);
Expand All @@ -159,7 +159,7 @@ LUA_API const void *(lua_topointer) (lua_State *L, int idx);
*/
LUA_API void (lua_pushnil) (lua_State *L);
LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
#define lua_pushinteger lua_pushnumber
LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l);
LUA_API void (lua_pushstring) (lua_State *L, const char *s);
LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
Expand Down
18 changes: 15 additions & 3 deletions src/blua/lvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static void Arith (lua_State *L, StkId ra, TValue *rb,
case TM_SUB: setnvalue(ra, luai_numsub(nb, nc)); break;
case TM_MUL: setnvalue(ra, luai_nummul(nb, nc)); break;
case TM_DIV: if (nc == 0) { lua_pushliteral(L, "divide by zero error"); lua_error(L); } else setnvalue(ra, luai_numdiv(nb, nc)); break;
case TM_MOD: setnvalue(ra, luai_nummod(nb, nc)); break;
case TM_MOD: if (nc == 0) { lua_pushliteral(L, "modulo by zero error"); lua_error(L); } else setnvalue(ra, luai_nummod(nb, nc)); break;
case TM_POW: setnvalue(ra, luai_numpow(nb, nc)); break;
case TM_UNM: setnvalue(ra, luai_numunm(nb)); break;
case TM_AND: setnvalue(ra, luai_numand(nb, nc)); break;
Expand Down Expand Up @@ -494,7 +494,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
if (nc == 0) {
lua_pushliteral(L, "divide by zero error");
lua_error(L);
}
}
else
setnvalue(ra, luai_numdiv(nb, nc));
}
Expand All @@ -503,7 +503,19 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_MOD: {
arith_op(luai_nummod, TM_MOD);
TValue *rb = RKB(i);
TValue *rc = RKC(i);
if (ttisnumber(rb) && ttisnumber(rc)) {
lua_Number nb = nvalue(rb), nc = nvalue(rc);
if (nc == 0) {
lua_pushliteral(L, "modulo by zero error");
lua_error(L);
}
else
setnvalue(ra, luai_nummod(nb, nc));
}
else
Protect(Arith(L, ra, rb, rc, TM_MOD));
continue;
}
case OP_POW: {
Expand Down
25 changes: 19 additions & 6 deletions src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,22 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)

if (var->PossibleValue)
{
INT32 v = atoi(valstr);
if (!v && valstr[0] != '0')
v = INT32_MIN; // Invalid integer trigger
INT32 v;

if (var->flags & CV_FLOAT)
{
double d = atof(valstr);
if (!d && valstr[0] != '0')
v = INT32_MIN;
else
v = (INT32)(d * FRACUNIT);
}
else
{
v = atoi(valstr);
if (!v && valstr[0] != '0')
v = INT32_MIN; // Invalid integer trigger
}

if (var->PossibleValue[0].strvalue && !stricmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
{
Expand Down Expand Up @@ -1134,13 +1147,13 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)

var->string = var->zstring = Z_StrDup(valstr);

if (var->flags & CV_FLOAT)
if (override)
var->value = overrideval;
else if (var->flags & CV_FLOAT)
{
double d = atof(var->string);
var->value = (INT32)(d * FRACUNIT);
}
else if (override)
var->value = overrideval;
else
var->value = atoi(var->string);

Expand Down
12 changes: 12 additions & 0 deletions src/d_clisrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,13 +2921,25 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
displayplayer = newplayernum;
secondarydisplayplayer = newplayernum;
DEBFILE("spawning me\n");
// Apply player flags as soon as possible!
players[newplayernum].pflags &= ~(PF_FLIPCAM|PF_ANALOGMODE);
if (cv_flipcam.value)
players[newplayernum].pflags |= PF_FLIPCAM;
if (cv_analog.value)
players[newplayernum].pflags |= PF_ANALOGMODE;
}
else
{
secondarydisplayplayer = newplayernum;
DEBFILE("spawning my brother\n");
if (botingame)
players[newplayernum].bot = 1;
// Same goes for player 2 when relevant
players[newplayernum].pflags &= ~(/*PF_FLIPCAM|*/PF_ANALOGMODE);
//if (cv_flipcam2.value)
//players[newplayernum].pflags |= PF_FLIPCAM;
if (cv_analog2.value)
players[newplayernum].pflags |= PF_ANALOGMODE;
}
D_SendPlayerConfig();
addedtogame = true;
Expand Down
4 changes: 2 additions & 2 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,14 +1087,14 @@ void D_SRB2Main(void)
#endif
D_CleanFile();

#if 1 // md5s last updated 8/05/14
#if 1 // md5s last updated 11/10/14

// Check MD5s of autoloaded files
W_VerifyFileMD5(0, "ac309fb3c7d4b5b685e2cd26beccf0e8"); // srb2.srb/srb2.wad
W_VerifyFileMD5(1, "f39b6c849295e3c81875726e8cc0e2c7"); // zones.dta
W_VerifyFileMD5(2, "cfca0f1c73023cbbd8f844f45480f799"); // player.dta
W_VerifyFileMD5(3, "85901ad4bf94637e5753d2ac2c03ea26"); // rings.dta
W_VerifyFileMD5(4, "3d6cfc185fd7c195eb934ce593b0248f"); // patch.dta
W_VerifyFileMD5(4, "a45cc59d13dce924f2112b3e4201d0ae"); // patch.dta
// don't check music.dta because people like to modify it, and it doesn't matter if they do
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
#endif
Expand Down
32 changes: 21 additions & 11 deletions src/d_netcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static void Command_Archivetest_f(void);
// =========================================================================

void SendWeaponPref(void);
void SendWeaponPref2(void);

static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}};
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
Expand Down Expand Up @@ -1345,26 +1346,34 @@ void SendWeaponPref(void)
XBOXSTATIC UINT8 buf[1];

buf[0] = 0;
if (cv_flipcam.value)
if (players[consoleplayer].pflags & PF_FLIPCAM)
buf[0] |= 1;
if (players[consoleplayer].pflags & PF_ANALOGMODE)
buf[0] |= 2;
SendNetXCmd(XD_WEAPONPREF, buf, 1);
}

if (splitscreen)
{
buf[0] = 0;
if (cv_flipcam2.value)
buf[0] |= 1;
SendNetXCmd2(XD_WEAPONPREF, buf, 1);
}
void SendWeaponPref2(void)
{
XBOXSTATIC UINT8 buf[1];

buf[0] = 0;
if (players[secondarydisplayplayer].pflags & PF_FLIPCAM)
buf[0] |= 1;
if (players[secondarydisplayplayer].pflags & PF_ANALOGMODE)
buf[0] |= 2;
SendNetXCmd2(XD_WEAPONPREF, buf, 1);
}

static void Got_WeaponPref(UINT8 **cp,INT32 playernum)
{
UINT8 prefs = READUINT8(*cp);

players[playernum].pflags &= ~(PF_FLIPCAM|PF_ANALOGMODE);
if (prefs & 1)
players[playernum].pflags |= PF_FLIPCAM;
else
players[playernum].pflags &= ~PF_FLIPCAM;
if (prefs & 2)
players[playernum].pflags |= PF_ANALOGMODE;
}

void D_SendPlayerConfig(void)
Expand All @@ -1373,6 +1382,8 @@ void D_SendPlayerConfig(void)
if (splitscreen || botingame)
SendNameAndColor2();
SendWeaponPref();
if (splitscreen)
SendWeaponPref2();
}

// Only works for displayplayer, sorry!
Expand Down Expand Up @@ -1798,7 +1809,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
if (demorecording) // Okay, level loaded, character spawned and skinned,
G_BeginRecording(); // I AM NOW READY TO RECORD.
demo_start = true;
metal_start = true;
}

static void Command_Pause(void)
Expand Down
1 change: 1 addition & 0 deletions src/d_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ typedef enum

/*** misc ***/
PF_FORCESTRAFE = 1<<29, // Turning inputs are translated into strafing inputs
PF_ANALOGMODE = 1<<30, // Analog mode?

// free: 1<<30 and 1<<31
} pflags_t;
Expand Down
1 change: 1 addition & 0 deletions src/dehacked.c
Original file line number Diff line number Diff line change
Expand Up @@ -7273,6 +7273,7 @@ static const char *const PLAYERFLAG_LIST[] = {

/*** misc ***/
"FORCESTRAFE", // Translate turn inputs into strafe inputs
"ANALOGMODE", // Analog mode?

NULL // stop loop here.
};
Expand Down
14 changes: 8 additions & 6 deletions src/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ extern FILE *logstream;
#define VERSIONSTRING "Trunk"
#else
#define VERSION 201 // Game version
#define SUBVERSION 11 // more precise version number
#define VERSIONSTRING "v2.1.11"
#define SUBVERSION 12 // more precise version number
#define VERSIONSTRING "v2.1.12"
#endif

// Modification options
Expand Down Expand Up @@ -428,9 +428,8 @@ extern const char *compdate, *comptime, *comprevision;
// Compile them at your own risk!

/// Max recursive portal renders
/// \note sadly some additional work will need to be done
/// before anything > 1 will function correctly
#define PORTAL_LIMIT 1
/// \note obsoleted by cv_maxportals
//#define PORTAL_LIMIT 8

/// Fun experimental slope stuff!
//#define SLOPENESS
Expand All @@ -453,7 +452,7 @@ extern const char *compdate, *comptime, *comprevision;
//#define CHAOSISNOTDEADYET

/// Polyobject fake flat code
//#define POLYOBJECTS_PLANES
#define POLYOBJECTS_PLANES

/// Blue spheres for future use.
/// \todo Remove this define.
Expand Down Expand Up @@ -493,4 +492,7 @@ extern const char *compdate, *comptime, *comprevision;
#define CLIENT_LOADINGSCREEN
#endif

/// Experimental tweaks to analog mode. (Needs a lot of work before it's ready for primetime.)
//#define REDSANALOG

#endif // __DOOMDEF__
1 change: 0 additions & 1 deletion src/doomstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ extern cutscene_t *cutscenes[128];

// For the Custom Exit linedef.
extern INT16 nextmapoverride;
extern INT32 nextmapgametype;
extern boolean skipstats;

extern UINT32 totalrings; // Total # of rings in a level
Expand Down
Loading

0 comments on commit 404b5f6

Please sign in to comment.