- 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 September 7, 2009
- Applied vertical SBARINFO inventory bar patch. - Applied vertical SBARINFO inventory bar patch.

View File

@ -326,7 +326,7 @@ int G_SkillProperty(ESkillProperty prop)
case SKILLP_Respawn: case SKILLP_Respawn:
if (dmflags & DF_MONSTERS_RESPAWN && AllSkills[gameskill].RespawnCounter==0) 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; return AllSkills[gameskill].RespawnCounter;
case SKILLP_RespawnLimit: case SKILLP_RespawnLimit:

View File

@ -276,6 +276,11 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter") GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter")
GAMEINFOKEY_COLOR(dimcolor, "dimcolor") GAMEINFOKEY_COLOR(dimcolor, "dimcolor")
GAMEINFOKEY_FLOAT(dimamount, "dimamount") 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 else
{ {
// ignore unkown keys. // ignore unkown keys.

View File

@ -86,6 +86,7 @@ struct gameinfo_t
char SkyFlatName[9]; char SkyFlatName[9];
char ArmorIcon1[9]; char ArmorIcon1[9];
char ArmorIcon2[9]; char ArmorIcon2[9];
char Endoom[9];
fixed_t Armor2Percent; fixed_t Armor2Percent;
FString quitSound; FString quitSound;
gameborder_t *border; gameborder_t *border;
@ -99,6 +100,9 @@ struct gameinfo_t
FString intermissionMusic; FString intermissionMusic;
DWORD dimcolor; DWORD dimcolor;
float dimamount; float dimamount;
int definventorymaxamount;
int defaultrespawntime;
int defaultdropstyle;
const char *GetFinalePage(unsigned int num) const; 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) void P_TossItem (AActor *item)
{ {
int style = sv_dropstyle; int style = sv_dropstyle;
if (style==0) style= (gameinfo.gametype == GAME_Strife)? 2:1; if (style==0) style= gameinfo.defaultdropstyle;
if (style==2) if (style==2)
{ {

View File

@ -698,9 +698,25 @@ FUNC(LS_Plat_UpNearestWaitDownStay)
} }
FUNC(LS_Plat_RaiseAndStayTx0) 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) FUNC(LS_Plat_UpByValueStayTx)

View File

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

View File

@ -432,6 +432,7 @@ public:
platToggle, platToggle,
platDownToNearestFloor, platDownToNearestFloor,
platDownToLowestCeiling, platDownToLowestCeiling,
platRaiseAndStayLockout,
}; };
void Serialize (FArchive &arc); 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) 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); if (showendoom == 0) exit(0);
int endoom_lump = Wads.CheckNumForName ( if (gameinfo.Endoom[0] == 0)
gameinfo.gametype & GAME_DoomChex ? "ENDOOM" : {
gameinfo.gametype == GAME_Heretic? "ENDTEXT" : exit(0);
gameinfo.gametype == GAME_Strife? "ENDSTRF" : NULL); }
int endoom_lump = Wads.CheckNumForName (gameinfo.Endoom);
BYTE endoom_screen[4000]; BYTE endoom_screen[4000];
BYTE *font; BYTE *font;

View File

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

View File

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

View File

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

View File

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

View File

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