Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2Internal.git

This commit is contained in:
Monster Iestyn 2016-03-09 13:21:49 +00:00
commit 6a4bbfb25d
13 changed files with 16 additions and 96 deletions

View file

@ -23,7 +23,7 @@ addons:
- p7zip-full
before_script:
- mkdir $HOME/srb2_cache
- mkdir -p $HOME/srb2_cache
- wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2114-assets.7z -O $HOME/srb2_cache/SRB2-v2114-assets.7z
- 7z x $HOME/srb2_cache/SRB2-v2114-assets.7z -oassets
- mkdir build

View file

@ -6227,9 +6227,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
// Collectible Items
"MT_RING",
"MT_FLINGRING", // Lost ring
#ifdef BLUE_SPHERES
"MT_BLUEBALL", // Blue sphere replacement for special stages
#endif
"MT_REDTEAMRING", //Rings collectable by red team.
"MT_BLUETEAMRING", //Rings collectable by blue team.
"MT_EMMY", // emerald token for special stage

View file

@ -431,9 +431,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// \note obsoleted by cv_maxportals
//#define PORTAL_LIMIT 8
/// Fun experimental slope stuff!
//#define SLOPENESS
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
#define ESLOPE
@ -453,10 +450,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// Polyobject fake flat code
#define POLYOBJECTS_PLANES
/// Blue spheres for future use.
/// \todo Remove this define.
#define BLUE_SPHERES // Blue spheres for future use.
/// Improved way of dealing with ping values and a ping limit.
#define NEWPING

View file

@ -36,9 +36,7 @@ typedef struct
{
float x;
float y;
//#ifdef SLOPENESS
float z;
//#endif
} polyvertex_t;
#ifdef _MSC_VER

View file

@ -539,6 +539,8 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
static FOutVector *planeVerts = NULL;
static UINT16 numAllocedPlaneVerts = 0;
(void)sector;
// no convex poly were generated for this subsector
if (!xsub->planepoly)
return;
@ -678,25 +680,6 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
v3d->x = pv->x;
v3d->y = height;
v3d->z = pv->y;
#ifdef SLOPENESS
if (sector && sector->special == 65535)
{
size_t q;
for (q = 0; q < sector->linecount; q++)
{
if (v3d->x == sector->lines[q]->v1->x>>FRACBITS)
{
if (v3d->z == sector->lines[q]->v1->y>>FRACBITS)
{
v3d->y += sector->lines[q]->v1->z>>FRACBITS;
break;
}
}
}
}
#else
(void)sector;
#endif
}
// only useful for flat coloured triangles

View file

@ -4612,7 +4612,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
#ifdef BLUE_SPHERES
{ // MT_BLUEBALL
-1, // doomednum
S_BLUEBALL, // spawnstate
@ -4639,7 +4638,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
S_NULL // raisestate
},
#endif
{ // MT_REDTEAMRING
308, // doomednum

View file

@ -3096,9 +3096,7 @@ typedef enum mobj_type
// Collectible Items
MT_RING,
MT_FLINGRING, // Lost ring
#ifdef BLUE_SPHERES
MT_BLUEBALL, // Blue sphere replacement for special stages
#endif
MT_REDTEAMRING, //Rings collectable by red team.
MT_BLUETEAMRING, //Rings collectable by blue team.
MT_EMMY, // emerald token for special stage

View file

@ -70,4 +70,15 @@ void COM_Lua_f(void);
#define LUA_ErrInvalid(L, type) luaL_error(L, "accessed " type " doesn't exist anymore, please check 'valid' before using " type ".");
// Deprecation warnings
// Shows once upon use. Then doesn't show again.
#define LUA_Deprecated(L,this_func,use_instead)\
{\
static UINT8 seen = 0;\
if (!seen) {\
seen = 1;\
CONS_Alert(CONS_WARNING,"\"%s\" is deprecated and will be removed.\nUse \"%s\" instead.\n", this_func, use_instead);\
}\
}
#endif

View file

@ -405,7 +405,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if ((maptol & TOL_NIGHTS) && special->type != MT_FLINGCOIN)
P_DoNightsScore(player);
break;
#ifdef BLUE_SPHERES
case MT_BLUEBALL:
if (!(P_CanPickupItem(player, false)))
return;
@ -422,7 +421,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (maptol & TOL_NIGHTS)
P_DoNightsScore(player);
break;
#endif
case MT_AUTOPICKUP:
case MT_BOUNCEPICKUP:
case MT_SCATTERPICKUP:
@ -766,10 +764,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
#ifdef BLUE_SPHERES
|| mo2->type == MT_BLUEBALL
#endif
))
|| mo2->type == MT_BLUEBALL))
continue;
// Yay! The thing's in reach! Pull it in!

View file

@ -2363,9 +2363,7 @@ static boolean P_ZMovement(mobj_t *mo)
case MT_RING: // Ignore still rings
case MT_COIN:
#ifdef BLUE_SPHERES
case MT_BLUEBALL:
#endif
case MT_REDTEAMRING:
case MT_BLUETEAMRING:
case MT_FLINGRING:
@ -6653,14 +6651,12 @@ void P_MobjThinker(mobj_t *mobj)
else if (mobj->health <= 0) // Dead things think differently than the living.
switch (mobj->type)
{
#ifdef BLUE_SPHERES
case MT_BLUEBALL:
if ((mobj->tics>>2)+1 > 0 && (mobj->tics>>2)+1 <= tr_trans60) // tr_trans50 through tr_trans90, shifting once every second frame
mobj->frame = (NUMTRANSMAPS-((mobj->tics>>2)+1))<<FF_TRANSSHIFT;
else // tr_trans60 otherwise
mobj->frame = tr_trans60<<FF_TRANSSHIFT;
break;
#endif
case MT_EGGCAPSULE:
if (mobj->z <= mobj->floorz)
{
@ -7118,9 +7114,7 @@ void P_MobjThinker(mobj_t *mobj)
break;
case MT_RING:
case MT_COIN:
#ifdef BLUE_SPHERES
case MT_BLUEBALL:
#endif
case MT_REDTEAMRING:
case MT_BLUETEAMRING:
// No need to check water. Who cares?
@ -7886,9 +7880,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
break;
case MT_RING:
case MT_COIN:
#ifdef BLUE_SPHERES
case MT_BLUEBALL:
#endif
nummaprings++;
default:
break;
@ -8014,9 +8006,7 @@ void P_RemoveMobj(mobj_t *mobj)
if (mobj->spawnpoint &&
(mobj->type == MT_RING
|| mobj->type == MT_COIN
#ifdef BLUE_SPHERES
|| mobj->type == MT_BLUEBALL
#endif
|| mobj->type == MT_REDTEAMRING
|| mobj->type == MT_BLUETEAMRING
|| P_WeaponOrPanel(mobj->type))
@ -9802,11 +9792,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING;
break;
default:
#ifdef BLUE_SPHERES
// Spawn rings as blue spheres in special stages, ala S3+K.
if (G_IsSpecialStage(gamemap) && useNightsSS)
ringthing = MT_BLUEBALL;
#endif
break;
}
@ -9871,11 +9859,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
return;
#ifdef BLUE_SPHERES
// Spawn rings as blue spheres in special stages, ala S3+K.
if (G_IsSpecialStage(gamemap) && useNightsSS)
ringthing = MT_BLUEBALL;
#endif
for (r = 1; r <= 5; r++)
{
@ -9926,11 +9912,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
return;
#ifdef BLUE_SPHERES
// Spawn rings as blue spheres in special stages, ala S3+K.
if (G_IsSpecialStage(gamemap) && useNightsSS)
ringthing = MT_BLUEBALL;
#endif
angle >>= ANGLETOFINESHIFT;
@ -10023,11 +10007,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
if (ultimatemode && !(G_IsSpecialStage(gamemap) || (maptol & TOL_NIGHTS)))
continue;
#ifdef BLUE_SPHERES
// Spawn rings as blue spheres in special stages, ala S3+K.
if (G_IsSpecialStage(gamemap) && useNightsSS)
itemToSpawn = MT_BLUEBALL;
#endif
}
fa = i*FINEANGLES/numitems;

View file

@ -6029,31 +6029,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
P_AddRaiseThinker(lines[i].frontsector, &lines[i]);
break;
#ifdef SLOPENESS
case 999:
sec = sides[*lines[i].sidenum].sector-sectors;
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
{
size_t counting;
sectors[s].floorangle = ANGLE_45;
for (counting = 0; counting < sectors[s].linecount/2; counting++)
{
sectors[s].lines[counting]->v1->z = sectors[sec].floorheight;
CONS_Debug(DBG_GAMELOGIC, "Set it to %d\n", sectors[s].lines[counting]->v1->z>>FRACBITS);
}
for (counting = sectors[s].linecount/2; counting < sectors[s].linecount; counting++)
{
sectors[s].lines[counting]->v1->z = sectors[sec].ceilingheight;
CONS_Debug(DBG_GAMELOGIC, "Set it to %d\n", sectors[s].lines[counting]->v1->z>>FRACBITS);
}
sectors[s].special = 65535;
CONS_Debug(DBG_GAMELOGIC, "Found & Set slope!\n");
}
break;
#endif
case 200: // Double light effect
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_CUTSPRITES|FF_DOUBLESHADOW, secthinkers);
break;

View file

@ -8884,10 +8884,7 @@ void P_PlayerThink(player_t *player)
mo2 = (mobj_t *)th;
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
#ifdef BLUE_SPHERES
|| mo2->type == MT_BLUEBALL
#endif
))
|| mo2->type == MT_BLUEBALL))
continue;
if (P_AproxDistance(P_AproxDistance(mo2->x - x, mo2->y - y), mo2->z - z) > FixedMul(128*FRACUNIT, player->mo->scale))

View file

@ -369,14 +369,6 @@ typedef struct sector_s
double lineoutLength;
#endif // ----- end special tricks -----
// ZDoom C++ to Legacy C conversion (for slopes)
// store floor and ceiling planes instead of heights
//secplane_t floorplane, ceilingplane;
#ifdef SLOPENESS
//fixed_t floortexz, ceilingtexz; // [RH] used for wall texture mapping
angle_t floorangle;
#endif
// This points to the master's floorheight, so it can be changed in realtime!
fixed_t *gravity; // per-sector gravity
boolean verticalflip; // If gravity < 0, then allow flipped physics