Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • STJr/SRB2
  • Sryder/SRB2
  • wolfy852/SRB2
  • Alpha2244/SRB2
  • Inuyasha/SRB2
  • yoshibot/SRB2
  • TehRealSalt/SRB2
  • PrisimaTF/SRB2
  • Hatninja/SRB2
  • SteelT/SRB2
  • james/SRB2
  • ShaderWraith/SRB2
  • SinnamonLat/SRB2
  • mazmazz_/SRB2
  • filpAM/SRB2
  • chaoloveicemdboy/SRB2
  • Whooa21/SRB2
  • Machturne/SRB2
  • Golden/SRB2
  • Tatsuru/SRB2
  • Snu/SRB2
  • Zwip-Zwap_Zapony/SRB2
  • fickleheart/SRB2
  • alphaRexJames/SRB2
  • JJK/SRB2
  • diskpoppy/SRB2
  • Hannu_Hanhi/SRB2
  • ZipperQR/SRB2
  • kays/SRB2
  • spherallic/SRB2
  • Zippy_Zolton/SRB2
  • namiishere/SRB2
  • Ors/SRB2
  • SMS_Alfredo/SRB2
  • sonic_edge/SRB2
  • lavla/SRB2
  • ashi/SRB2
  • X.organic/SRB2
  • Fafabis/SRB2
  • Meziu/SRB2
  • v-rob/SRB2
  • tertu/SRB2
  • bitten2up/SRB2
  • flarn2006/SRB2
  • Krabs/SRB2
  • clairebun/SRB2
  • Lactozilla/SRB2
  • thehackstack/SRB2
  • Spice/SRB2
  • win8linux/SRB2
  • JohnFrostFox/SRB2
  • talktoneon726/SRB2
  • Wane/SRB2
  • Lamibe/SRB2
  • spectrumuk2/srb-2
  • nerdyminer18/srb-2
  • 256nil/SRB2
  • ARJr/SRB2
  • Alam/SRB2
  • Zenya/srb-2-marathon-demos
  • Acelite/srb-2-archivedmodifications
  • MIDIMan/SRB2
  • Lach/SRB2
  • Frostiikin/bounce-tweaks
  • Hanicef/SRB2Classic
  • Jaden/SRB2
  • Tyron/SRB2
  • Astronight/SRB2
  • Mari0shi06/SRB2
  • aiire/SRB2
  • Galactice/SRB2
  • srb2-ports/srb2-dreamcast
  • sdasdas/SRB2
  • chreas/srb-2-vr
  • StarManiaKG/the-story-of-sinically-rocketing-and-botching-the-2nd
  • LoganAir/SRB2
  • NepDisk/srb-2
  • alufolie91/SRB2
  • Felicia.iso/SRB2
  • twi/SRB2
  • BarrelsOFun/SRB2
  • Speed2411/SRB2
  • Leather_Realms/SRB2
  • Ayemar/SRB2
  • Acelite/SRB2
  • VladDoc/SRB2
  • kaldrum/model-features
  • strawberryfox417/SRB2
  • Lugent/SRB2
  • Jisk/SRB2
  • Rem/SRB2
  • Refrag/SRB2
  • Henry_3230/srb-3230
  • TehPuertoRicanSpartan2/tprs-srb2
  • Leminn/srb-2-marathon-stuff
  • chromaticpipe2/SRB2
  • MiguelGustavo15/SRB2
  • Maru/srb-2-tests
  • SilicDev/SRB2
  • UnmatchedBracket/SRB2
  • HybridDog/SRB2
  • xordspar0/SRB2
  • jsjhbewfhh/SRB2
  • Fancy2209/SRB2
  • Lorsoen/SRB2
  • shindoukin/SRB2
  • GamerOfDays/SRB2
  • Craftyawesome/SRB2
  • tenshi-tensai-tennoji/SRB2
  • Scarfdudebalder/SRB2
  • luigi-budd/srb-2-fix-interplag-lockon
  • mskluesner/SRB2
  • johnpetersa19/SRB2
  • Pheazant/SRB2
  • chromaticpipe2/srb2classic
  • romoney5/SRB2
  • PAS/SRB2Classic
  • BlueStaggo/SRB2
118 results
Show changes
Commits on Source (13)
......@@ -202,7 +202,7 @@ static void CONS_Bind_f(void)
}
key = G_KeyStringtoNum(COM_Argv(1));
if (!key)
if (key <= 0 || key >= NUMINPUTS)
{
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
return;
......
......@@ -844,6 +844,10 @@ static void IdentifyVersion(void)
// Add our crappy patches to fix our bugs
// D_AddFile(va(pandf,srb2waddir,"patch.dta"));
// Add the thokker WAD
if (M_CheckParm("-nothokker") == 0)
D_AddFile(va(pandf,srb2waddir,"thokker.thk"));
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
{
#if defined (DC) && 0
......
......@@ -44,6 +44,7 @@
#include "lua_hook.h"
#include "m_cond.h"
#include "m_anigif.h"
#include "m_argv.h"
#ifdef NETGAME_DEVMODE
#define CV_RESTRICT CV_NETVAR
......@@ -1618,7 +1619,10 @@ static void Command_Map_f(void)
// new gametype value
// use current one by default
i = COM_CheckParm("-gametype");
if (i)
if (M_CheckParm("-nothokker") == 0)
newgametype = GT_TEAMMATCH;
else if (i)
{
if (!multiplayer)
{
......@@ -3375,8 +3379,13 @@ void D_GameTypeChanged(INT32 lastgametype)
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
{
// default settings for match: timelimit 10 mins, no pointlimit
CV_SetValue(&cv_pointlimit, 0);
CV_SetValue(&cv_timelimit, 10);
if (M_CheckParm("-nothokker") != 0) {
CV_SetValue(&cv_pointlimit, 0);
CV_SetValue(&cv_timelimit, 10);
} else {
CV_SetValue(&cv_pointlimit, 3);
CV_SetValue(&cv_timelimit, 0);
}
}
if (!cv_itemrespawntime.changed)
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
......
......@@ -998,7 +998,7 @@ static const struct {
static void readlevelheader(MYFILE *f, INT32 num)
{
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
char *word;
char *word = s;
char *word2;
//char *word3; // Non-uppercase version of word2
char *tmp;
......@@ -1028,7 +1028,7 @@ static void readlevelheader(MYFILE *f, INT32 num)
continue; // Skip comment lines, but don't break.
// Set / reset word, because some things (Lua.) move it
word = s;
//word = s;
// Get the part before the " = "
tmp = strchr(s, '=');
......@@ -7761,36 +7761,36 @@ struct {
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
// Angles
{"ANG1",ANG1>>16},
{"ANG2",ANG2>>16},
{"ANG10",ANG10>>16},
{"ANG15",ANG15>>16},
{"ANG20",ANG20>>16},
{"ANG30",ANG30>>16},
{"ANG60",ANG60>>16},
{"ANG64h",ANG64h>>16},
{"ANG105",ANG105>>16},
{"ANG210",ANG210>>16},
{"ANG255",ANG255>>16},
{"ANG340",ANG340>>16},
{"ANG350",ANG350>>16},
{"ANGLE_11hh",ANGLE_11hh>>16},
{"ANGLE_22h",ANGLE_22h>>16},
{"ANGLE_45",ANGLE_45>>16},
{"ANGLE_67h",ANGLE_67h>>16},
{"ANGLE_90",ANGLE_90>>16},
{"ANGLE_112h",ANGLE_112h>>16},
{"ANGLE_135",ANGLE_135>>16},
{"ANGLE_157h",ANGLE_157h>>16},
{"ANGLE_180",ANGLE_180>>16},
{"ANGLE_202h",ANGLE_202h>>16},
{"ANGLE_225",ANGLE_225>>16},
{"ANGLE_247h",ANGLE_247h>>16},
{"ANGLE_270",ANGLE_270>>16},
{"ANGLE_292h",ANGLE_292h>>16},
{"ANGLE_315",ANGLE_315>>16},
{"ANGLE_337h",ANGLE_337h>>16},
{"ANGLE_MAX",ANGLE_MAX>>16},
{"ANG1",ANG1>>0},
{"ANG2",ANG2>>0},
{"ANG10",ANG10>>0},
{"ANG15",ANG15>>0},
{"ANG20",ANG20>>0},
{"ANG30",ANG30>>0},
{"ANG60",ANG60>>0},
{"ANG64h",ANG64h>>0},
{"ANG105",ANG105>>0},
{"ANG210",ANG210>>0},
{"ANG255",ANG255>>0},
{"ANG340",ANG340>>0},
{"ANG350",ANG350>>0},
{"ANGLE_11hh",ANGLE_11hh>>0},
{"ANGLE_22h",ANGLE_22h>>0},
{"ANGLE_45",ANGLE_45>>0},
{"ANGLE_67h",ANGLE_67h>>0},
{"ANGLE_90",ANGLE_90>>0},
{"ANGLE_112h",ANGLE_112h>>0},
{"ANGLE_135",ANGLE_135>>0},
{"ANGLE_157h",ANGLE_157h>>0},
{"ANGLE_180",ANGLE_180>>0},
{"ANGLE_202h",ANGLE_202h>>0},
{"ANGLE_225",ANGLE_225>>0},
{"ANGLE_247h",ANGLE_247h>>0},
{"ANGLE_270",ANGLE_270>>0},
{"ANGLE_292h",ANGLE_292h>>0},
{"ANGLE_315",ANGLE_315>>0},
{"ANGLE_337h",ANGLE_337h>>0},
{"ANGLE_MAX",ANGLE_MAX>>0},
// P_Chase directions (dirtype_t)
{"DI_NODIR",DI_NODIR},
......
......@@ -147,10 +147,10 @@ extern FILE *logstream;
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else
#define VERSION 201 // Game version
#define SUBVERSION 14 // more precise version number
#define VERSIONSTRING "v2.1.14"
#define VERSIONSTRINGW L"v2.1.14"
#define VERSION 165 // Game version
#define SUBVERSION 1
#define VERSIONSTRING "v2.1.14 (Thokker 1.0.1)"
#define VERSIONSTRINGW L"v2.1.14 (Thokker 1.0.1)"
// Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates!
#endif
......@@ -166,8 +166,8 @@ extern FILE *logstream;
// The string used in the alert that pops up in the event of an update being available.
// Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!).
#define UPDATE_ALERT_STRING \
"A new update is available for SRB2.\n"\
"Please visit SRB2.org to download it.\n"\
"A new update is available for SRB2 Thokker.\n"\
"Please visit the SRB2MB to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
......@@ -183,8 +183,8 @@ extern FILE *logstream;
// The string used in the I_Error alert upon trying to host through command line parameters.
// Generally less filled with newlines, since Windows gives you lots more room to work with.
#define UPDATE_ALERT_STRING_CONSOLE \
"A new update is available for SRB2.\n"\
"Please visit SRB2.org to download it.\n"\
"A new update is available for SRB2 Thokker.\n"\
"Please visit the SRB2MB to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
......@@ -201,14 +201,14 @@ extern FILE *logstream;
// The Modification ID; must be obtained from Inuyasha ( http://mb.srb2.org/private.php?do=newpm&u=2604 ).
// DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server.
// "12" is the default mod ID for version 2.1
#define MODID 12
// "13" is the default mod ID for Thokker
#define MODID 13
// The Modification Version, starting from 1. Do not follow your version string for this,
// it's only for detection of the version the player is using so the MS can alert them of an update.
// Only set it higher, not lower, obviously.
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
#define MODVERSION 19
#define MODVERSION 2
......
......@@ -1041,13 +1041,13 @@ INT32 G_KeyStringtoNum(const char *keystr)
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
return keystr[0];
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
return atoi(&keystr[3]);
for (j = 0; j < NUMKEYNAMES; j++)
if (!stricmp(keynames[j].name, keystr))
return keynames[j].keynum;
if (strlen(keystr) > 3)
return atoi(&keystr[3]);
return 0;
}
......
......@@ -4499,6 +4499,7 @@ static void HWR_SortVisSprites(void)
for (i = 0; i < gr_visspritecount; i++)
{
best = NULL;
bestdispoffset = INT32_MAX;
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
{
if (!best || ds->tz > bestdist)
......
......@@ -26,7 +26,7 @@
#pragma warning(disable : 4214 4244)
#endif
#include "SDL_opengl.h" //Alam_GBC: Simple, yes?
#include <SDL2/SDL_opengl.h> //Alam_GBC: Simple, yes?
#ifdef _MSC_VER
#pragma warning(default : 4214 4244)
......
......@@ -14,6 +14,7 @@
#include "r_defs.h"
#include "d_player.h"
#include "blua/lua.h"
enum hook {
hook_NetVars=0,
......@@ -47,6 +48,7 @@ enum hook {
};
extern const char *const hookNames[];
void LUAh_NetArchiveHook(lua_CFunction archFunc);
void LUAh_MapChange(void); // Hook for map change (before load)
void LUAh_MapLoad(void); // Hook for map load
void LUAh_PlayerJoin(int playernum); // Hook for Got_AddPlayer
......
......@@ -173,6 +173,34 @@ int LUA_HookLib(lua_State *L)
return 0;
}
void LUAh_NetArchiveHook(lua_CFunction archFunc)
{
int TABLESINDEX;
hook_p hookp;
if (!gL)
return;
TABLESINDEX = lua_gettop(gL);
lua_settop(gL, 0);
lua_pushvalue(gL, TABLESINDEX);
lua_pushcclosure(gL, archFunc, 1);
lua_pushnil(gL);
for (hookp = roothook; hookp; hookp = hookp->next)
if (hookp->type == hook_NetVars)
{
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
lua_gettable(gL, LUA_REGISTRYINDEX);
lua_pushvalue(gL, -2);
LUA_Call(gL, 1);
}
lua_pop(gL, 2);
}
boolean LUAh_MobjHook(mobj_t *mo, enum hook which)
{
hook_p hookp;
......
......@@ -915,30 +915,6 @@ static void UnArchiveTables(void)
}
}
static void NetArchiveHook(lua_CFunction archFunc)
{
int TABLESINDEX;
if (!gL)
return;
TABLESINDEX = lua_gettop(gL);
lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
I_Assert(lua_istable(gL, -1));
lua_rawgeti(gL, -1, hook_NetVars);
lua_remove(gL, -2);
I_Assert(lua_istable(gL, -1));
lua_pushvalue(gL, TABLESINDEX);
lua_pushcclosure(gL, archFunc, 1);
lua_pushnil(gL);
while (lua_next(gL, -3) != 0) {
lua_pushvalue(gL, -3); // function
LUA_Call(gL, 1);
}
lua_pop(gL, 2);
}
void LUA_Step(void)
{
if (!gL)
......@@ -972,7 +948,7 @@ void LUA_Archive(void)
}
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
ArchiveTables();
if (gL)
......@@ -1003,7 +979,7 @@ void LUA_UnArchive(void)
UnArchiveExtVars(th); // apply variables
} while(mobjnum != UINT32_MAX); // repeat until end of mobjs marker.
NetArchiveHook(NetUnArchive); // call the NetArchive hook in unarchive mode
LUAh_NetArchiveHook(NetUnArchive); // call the NetArchive hook in unarchive mode
UnArchiveTables();
if (gL)
......
......@@ -31,8 +31,8 @@
// angle_t casting
// we reduce the angle to a fixed point between 0.0 and 1.0
#define luaL_checkangle(L, i) (((angle_t)(luaL_checkfixed(L, i)&0xFFFF))<<16)
#define lua_pushangle(L, a) lua_pushfixed(L, a>>16)
#define luaL_checkangle(L, i) (((angle_t)(luaL_checkfixed(L, i)&0xFFFFFFFF))<<0)
#define lua_pushangle(L, a) lua_pushfixed(L, a>>0)
#ifdef _DEBUG
void LUA_ClearExtVars(void);
......
......@@ -389,6 +389,7 @@ CV_PossibleValue_t gametype_cons_t[] =
{GT_CTF, "CTF"},
{0, NULL}
};
CV_PossibleValue_t gametype_cons_t_thokker[] = {{GT_TEAMMATCH, "Thokker"}};
consvar_t cv_newgametype = {"newgametype", "Co-op", CV_HIDEN|CV_CALL, gametype_cons_t, Newgametype_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t serversort_cons_t[] = {
......@@ -2676,6 +2677,11 @@ void M_Ticker(void)
//
void M_Init(void)
{
if (M_CheckParm("-nothokker") == 0) {
cv_newgametype.PossibleValue = gametype_cons_t_thokker;
cv_newgametype.defaultvalue = "Thokker";
}
CV_RegisterVar(&cv_nextmap);
CV_RegisterVar(&cv_newgametype);
CV_RegisterVar(&cv_chooseskin);
......
......@@ -9696,7 +9696,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
// Diagonal rings (handles both types)
else if (mthing->type == 602 || mthing->type == 603) // Diagonal rings (5)
{
angle_t angle = ANGLE_45 * (mthing->angle/45);
angle_t angle = FixedAngle(mthing->angle*FRACUNIT);
mobjtype_t ringthing = MT_RING;
INT32 iterations = 5;
if (mthing->type == 603)
......
......@@ -427,6 +427,8 @@ newseg:
// seg's ending vertex.
for (i = 0; i < numsegs; ++i)
{
if (segs[i].side != 0) // needs to be frontfacing
continue;
if (segs[i].v1->x == seg->v2->x && segs[i].v1->y == seg->v2->y)
{
// Make sure you didn't already add this seg...
......@@ -593,6 +595,9 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
seg_t *seg = &segs[i];
INT32 polyID, parentID;
if (seg->side != 0) // needs to be frontfacing
continue;
if (seg->linedef->special != POLYOBJ_START_LINE)
continue;
......
......@@ -46,14 +46,14 @@ static pslope_t *slopelist = NULL;
static UINT16 slopecount = 0;
// Calculate line normal
static void P_CalculateSlopeNormal(pslope_t *slope) {
void P_CalculateSlopeNormal(pslope_t *slope) {
slope->normal.z = FINECOSINE(slope->zangle>>ANGLETOFINESHIFT);
slope->normal.x = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.x);
slope->normal.y = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.y);
}
// With a vertex slope that has its vertices set, configure relevant slope info
static void P_ReconfigureVertexSlope(pslope_t *slope)
void P_ReconfigureVertexSlope(pslope_t *slope)
{
vector3_t vec1, vec2;
......@@ -543,7 +543,7 @@ void P_SpawnSlope_Line(int linenum)
//
// Creates a new slope from three vertices with the specified IDs
//
static pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags)
pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags)
{
size_t i;
mapthing_t *mt = mapthings;
......
......@@ -29,6 +29,9 @@
#define P_SLOPES_H__
#ifdef ESLOPE
void P_CalculateSlopeNormal(pslope_t *slope);
void P_ReconfigureVertexSlope(pslope_t *slope);
void P_ResetDynamicSlopes(void);
void P_RunDynamicSlopes(void);
// P_SpawnSlope_Line
......@@ -36,6 +39,8 @@ void P_RunDynamicSlopes(void);
// sectors.
void P_SpawnSlope_Line(int linenum);
pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags);
#ifdef SPRINGCLEAN
// Loads just map objects that make slopes,
// terrain affecting objects have to be spawned first
......
......@@ -50,7 +50,7 @@
#include <string.h>
#include <ctype.h>
//#include "SDL_image.h"
#include <SDL2/SDL_image.h>
#ifdef LOAD_XPM
......@@ -499,7 +499,7 @@ SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src)
}
#endif
static inline SDL_Surface *IMG_ReadXPMFromArray(const char **xpm)
extern DECLSPEC SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
{
return NULL;
}
......
......@@ -31,7 +31,7 @@
#ifdef HAVE_SDL
#include "SDL.h"
#include <SDL2/SDL.h>
#ifdef _MSC_VER
#pragma warning(default : 4214 4244)
......@@ -42,7 +42,7 @@
#endif
#if SDL_VERSION_ATLEAST(1,2,6) && !defined (NOLOADSO)
#include "SDL_loadso.h" // 1.2.6+
#include <SDL2/SDL_loadso.h> // 1.2.6+
#elif !defined (NOLOADSO)
#define NOLOADSO
#endif
......
......@@ -81,7 +81,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
#ifdef HAVE_SDL
#include "SDL.h"
#include <SDL2/SDL.h>
#ifdef HAVE_TTF
#include "i_ttf.h"
......@@ -92,7 +92,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
#endif
#if SDL_VERSION_ATLEAST(1,2,7) && !defined (DC)
#include "SDL_cpuinfo.h" // 1.2.7 or greater
#include <SDL2/SDL_cpuinfo.h> // 1.2.7 or greater
#define HAVE_SDLCPUINFO
#endif
......