- moved ENDOOM lump name definition into gameinfo.

- moved default item drop style into gameinfo.
- moved default respawn time into gameinfo.
- moved default inventory max amount into gameinfo.
- turned Heretic's blocking of the sector for LS_Plat_RaiseAndStayTx0 into
  a parameter instead of having the game mode decide. 



SVN r1812 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-08 21:01:24 +00:00
parent 173646971d
commit 93166b86b3
16 changed files with 68 additions and 4874 deletions

View file

@ -1,3 +1,11 @@
September 8, 2009 (Changes by Graf Zahl)
- moved ENDOOM lump name definition into gameinfo.
- moved default item drop style into gameinfo.
- moved default respawn time into gameinfo.
- moved default inventory max amount into gameinfo.
- turned Heretic's blocking of the sector for LS_Plat_RaiseAndStayTx0 into
a parameter instead of having the game mode decide.
September 7, 2009
- Applied vertical SBARINFO inventory bar patch.

View file

@ -326,7 +326,7 @@ int G_SkillProperty(ESkillProperty prop)
case SKILLP_Respawn:
if (dmflags & DF_MONSTERS_RESPAWN && AllSkills[gameskill].RespawnCounter==0)
return TICRATE * (gameinfo.gametype != GAME_Strife ? 12 : 16);
return TICRATE * gameinfo.defaultrespawntime;
return AllSkills[gameskill].RespawnCounter;
case SKILLP_RespawnLimit:

View file

@ -276,6 +276,11 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter")
GAMEINFOKEY_COLOR(dimcolor, "dimcolor")
GAMEINFOKEY_FLOAT(dimamount, "dimamount")
GAMEINFOKEY_INT(definventorymaxamount, "definventorymaxamount")
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
GAMEINFOKEY_INT(defaultrespawntime, "defaultrespawntime")
GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle")
GAMEINFOKEY_CSTRING(Endoom, "endoom", 8)
else
{
// ignore unkown keys.

View file

@ -86,6 +86,7 @@ struct gameinfo_t
char SkyFlatName[9];
char ArmorIcon1[9];
char ArmorIcon2[9];
char Endoom[9];
fixed_t Armor2Percent;
FString quitSound;
gameborder_t *border;
@ -99,6 +100,9 @@ struct gameinfo_t
FString intermissionMusic;
DWORD dimcolor;
float dimamount;
int definventorymaxamount;
int defaultrespawntime;
int defaultdropstyle;
const char *GetFinalePage(unsigned int num) const;
};

View file

@ -2558,7 +2558,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int
void P_TossItem (AActor *item)
{
int style = sv_dropstyle;
if (style==0) style= (gameinfo.gametype == GAME_Strife)? 2:1;
if (style==0) style= gameinfo.defaultdropstyle;
if (style==2)
{

View file

@ -698,9 +698,25 @@ FUNC(LS_Plat_UpNearestWaitDownStay)
}
FUNC(LS_Plat_RaiseAndStayTx0)
// Plat_RaiseAndStayTx0 (tag, speed)
// Plat_RaiseAndStayTx0 (tag, speed, lockout)
{
return EV_DoPlat (arg0, ln, DPlat::platRaiseAndStay, 0, SPEED(arg1), 0, 0, 1);
DPlat::EPlatType type;
switch (arg3)
{
case 1:
type = DPlat::platRaiseAndStay;
break;
case 2:
type = DPlat::platRaiseAndStayLockout;
break;
default:
type = gameinfo.gametype == GAME_Heretic? DPlat::platRaiseAndStayLockout : DPlat::platRaiseAndStay;
break;
}
return EV_DoPlat (arg0, ln, type, 0, SPEED(arg1), 0, 0, 1);
}
FUNC(LS_Plat_UpByValueStayTx)

View file

@ -90,9 +90,9 @@ void DPlat::Tick ()
switch (m_Type)
{
case platRaiseAndStay:
if (gameinfo.gametype == GAME_Heretic)
case platRaiseAndStayLockout:
break;
case platRaiseAndStay:
case platDownByValue:
case platDownWaitUpStay:
case platDownWaitUpStayStone:
@ -157,6 +157,7 @@ void DPlat::Tick ()
{
case platUpByValueStay:
case platRaiseAndStay:
case platRaiseAndStayLockout:
Destroy ();
default:
break;
@ -268,6 +269,7 @@ manual_plat:
switch (type)
{
case DPlat::platRaiseAndStay:
case DPlat::platRaiseAndStayLockout:
newheight = sec->FindNextHighestFloor (&spot);
plat->m_High = sec->floorplane.PointToDist (spot, newheight);
plat->m_Low = sec->floorplane.d;

View file

@ -432,6 +432,7 @@ public:
platToggle,
platDownToNearestFloor,
platDownToLowestCeiling,
platRaiseAndStayLockout,
};
void Serialize (FArchive &arc);

File diff suppressed because it is too large Load diff

View file

@ -1258,7 +1258,7 @@ DEFINE_CLASS_PROPERTY(maxamount, I, Inventory)
//==========================================================================
DEFINE_CLASS_PROPERTY(defmaxamount, 0, Inventory)
{
defaults->MaxAmount = gameinfo.gametype == GAME_Heretic ? 16 : 25;
defaults->MaxAmount = gameinfo.definventorymaxamount;
}

View file

@ -1090,10 +1090,12 @@ void ST_Endoom()
{
if (showendoom == 0) exit(0);
int endoom_lump = Wads.CheckNumForName (
gameinfo.gametype & GAME_DoomChex ? "ENDOOM" :
gameinfo.gametype == GAME_Heretic? "ENDTEXT" :
gameinfo.gametype == GAME_Strife? "ENDSTRF" : NULL);
if (gameinfo.Endoom[0] == 0)
{
exit(0);
}
int endoom_lump = Wads.CheckNumForName (gameinfo.Endoom);
BYTE endoom_screen[4000];
BYTE *font;

View file

@ -36,6 +36,10 @@ gameinfo
weaponslot = 7, "LAZDevice"
dimcolor = "ff d7 00"
dimamount = 0.2
definventorymaxamount = 25
defaultrespawntime = 12
defaultdropstyle = 1
endoom = "ENDOOM"
}
skill baby

View file

@ -35,6 +35,10 @@ gameinfo
weaponslot = 7, "BFG9000"
dimcolor = "ff d7 00"
dimamount = 0.2
definventorymaxamount = 25
defaultrespawntime = 12
defaultdropstyle = 1
endoom = "ENDOOM"
}
skill baby

View file

@ -36,6 +36,10 @@ gameinfo
weaponslot = 7, "Mace"
dimcolor = "00 00 ff"
dimamount = 0.2
definventorymaxamount = 16
defaultrespawntime = 12
defaultdropstyle = 1
endoom = "ENDTEXT"
}
skill baby

View file

@ -35,6 +35,9 @@ gameinfo
weaponslot = 4, "FWeapQuietus", "CWeapWraithverge", "MWeapBloodscourge"
dimcolor = "00 00 ff"
dimamount = 0.2
definventorymaxamount = 25
defaultrespawntime = 12
defaultdropstyle = 1
}
skill baby

View file

@ -37,6 +37,10 @@ gameinfo
weaponslot = 8, "Sigil"
dimcolor = "ff d7 00"
dimamount = 0.2
definventorymaxamount = 25
defaultrespawntime = 16
defaultdropstyle = 2
endoom = "ENDSTRF"
}
skill baby