- Updated UDMF spec to 1.1.

- Added -noautoload option.
- Added default Raven automap colors set. Needs to be tested because I can't
  compare against the DOS version myself.
- Extened A_PlaySound and A_StopSound to be able to set all parameters of the
  internal sound code.



SVN r1544 (trunk)
This commit is contained in:
Christoph Oelckers 2009-04-14 09:06:03 +00:00
parent 81c4773b46
commit 9040710e62
9 changed files with 547 additions and 421 deletions

View file

@ -1,4 +1,11 @@
April 13, 2009 April 13, 2009 (Changes by Graf Zahl)
- Added -noautoload option.
- Added default Raven automap colors set. Needs to be tested because I can't
compare against the DOS version myself.
- Extened A_PlaySound and A_StopSound to be able to set all parameters of the
internal sound code.
April 13, 2009
- Changed gravity doubling so that it only happens when you run off a ledge. - Changed gravity doubling so that it only happens when you run off a ledge.
April 10, 2009 April 10, 2009

View file

@ -1,403 +1,442 @@
=============================================================================== ===============================================================================
Universal Doom Map Format Specification v1.0 - 05/28/08 Universal Doom Map Format Specification v1.1 - 03/29/09
Written by James "Quasar" Haley - haleyjd@hotmail.com Written by James "Quasar" Haley - haleyjd@hotmail.com
Defined with input from: Defined with input from:
CodeImp CodeImp
esselfortium esselfortium
Graf Zahl Graf Zahl
Kaiser Kaiser
SlayeR SlayeR
SoM SoM
et al. et al.
Copyright (c) 2008 James Haley. Copyright (c) 2009 James Haley.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation; or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
=============================================================================== ===============================================================================
=======================================
I. Grammar / Syntax =======================================
======================================= Preface
=======================================
translation_unit := global_expr_list
global_expr_list := global_expr global_expr_list The Universal Doom Map Format specification is a collaborative effort to
global_expr := block | assignment_expr create and maintain a cross-port standardized textual representation for Doom
block := identifier '{' expr_list '}' engine maps.
expr_list := assignment_expr expr_list
assignment_expr := identifier '=' value ';' | nil The basic UDMF standard contains a superset of the features of all commercial
identifier := [A-Za-z0-9_]+ Doom engine games, and provides facilities for seamless extension in source
value := integer | float | quoted_string | keyword ports, allowing in-editor access to custom map data which would otherwise be
integer := [+-]?[1-9]+[0-9]* | 0[0-9]+ | 0x[0-9A-Fa-f]+ squirreled away in external lumps.
float := [+-]?[0-9]+'.'[0-9]*([eE][+-]?[0-9]+)?
quoted_string := "([^"\\]*(\\.[^"\\]*)*)"
keyword := [^{}();"'\n\t ]+ =======================================
Changes in v1.1
=======================================
Global assignments and named/indexed global blocks are the only top-level
entities supported. Whitespace is strictly ignored. This is version 1.1 of the UDMF specification, superceding the previous version
1.0 with the following adjustments:
Comments are supported as C-style single and multi-line comments:
* Added Preface.
// single line comment * Grammar for identifiers altered to forbid initial numerals.
* Made use of true/false keywords for boolean-type fields more explicit.
/* * Rule added for user-defined fields.
multi
line
comment =======================================
*/ I. Grammar / Syntax
=======================================
Multi-line comments may not be nested.
translation_unit := global_expr_list
Implementing editors are not required (but are allowed) to maintain syntactic global_expr_list := global_expr global_expr_list
comments when rewriting UDMF map lumps. These comments are provided chiefly for global_expr := block | assignment_expr
hand-writing and debugging purposes. block := identifier '{' expr_list '}'
expr_list := assignment_expr expr_list
Blocks begin with a keyword identifier. An example of a minimally-defined assignment_expr := identifier '=' value ';' | nil
entity follows: identifier := [A-Za-z_]+[A-Za-z0-9_]*
value := integer | float | quoted_string | keyword
linedef { id = 1; } integer := [+-]?[1-9]+[0-9]* | 0[0-9]+ | 0x[0-9A-Fa-f]+
float := [+-]?[0-9]+'.'[0-9]*([eE][+-]?[0-9]+)?
Compliant parsers will ignore all unknown keywords in global assignments, quoted_string := "([^"\\]*(\\.[^"\\]*)*)"
block-level assignments, and block headers. Compliant parsers should attempt keyword := [^{}();"'\n\t ]+
to preserve as much of such information as is possible by using a flexible
mapping such as hashing.
Global assignments and named/indexed global blocks are the only top-level
Identifiers and keywords are to be treated as case insensitive. entities supported. Whitespace is strictly ignored.
A field which specifies "boolean" semantics shall accept keyword value Keywords are currently restricted to the values true and false, which are
"true" to mean that the field is asserted, and keyword value "false" to used as the values of all boolean fields.
mean that the field is unasserted. Keyword values can only be defined in
this specification, and not by implementing ports. Use quoted strings Comments are supported as C-style single and multi-line comments:
instead.
// single line comment
Fields which do not appear in a block take on their default value. This
allows minimal specification. Note that the default values specified by /*
UDMF are not necessarily the default values which editors may wish to multi
apply to those fields during the creation of new entities during editing. line
Such editing defaults are not part of this specification. comment
*/
======================================= Multi-line comments may not be nested.
II. Implementation Semantics
======================================= Implementing editors are not required (but are allowed) to maintain syntactic
comments when rewriting UDMF map lumps. These comments are provided chiefly for
------------------------------------ hand-writing and debugging purposes.
II.A : Storage and Retrieval of Data
------------------------------------ Blocks begin with a keyword identifier. An example of a minimally-defined
entity follows:
Block-defined entities are written and read in top-to-bottom order. For
example, the following linedefs can be assigned in order to a contiguous linedef { id = 1; }
block of memory serving as the implementing port's lines array:
Compliant parsers will ignore all unknown keywords in global assignments,
linedef { id = 1; } block-level assignments, and block headers. Compliant parsers should attempt
linedef { id = 2; } to preserve as much of such information as is possible by using a flexible
linedef { id = 3; } mapping such as hashing.
linedef { id = 4; }
For purposes of forward compatibility, user-defined fields are restricted to
Data types: beginning with the string "user_", but are otherwise normal identifiers.
Implementing editors should not restrict the entry of custom field names to
For purposes of internal storage: those beginning with "user_", however, in order to avoid problems with
--------------------------------- out-of-date configurations.
Integers should be considered signed with a range of at least 32 bits.
Floating-point numbers should be considered double precision. Identifiers and keywords are to be treated as case-insensitive.
Strings have no reasonable length limitations.
A field which specifies "boolean" semantics shall accept keyword value
Hard Data Type Limits true to mean that the field is asserted, and keyword value false to
--------------------- mean that the field is unasserted. Keyword values can only be defined in
No limits on number of definitions are defined as part of this specification, this specification, and not by implementing ports. Use quoted strings
but implementors may face the need to impose such limitations due to instead.
restrictions on the amount of memory available, or the amount that can be
allocated through a single pointer on the host machine or in a private heap Fields which do not appear in a block take on their default value. This
implementation. allows minimal specification. Note that the default values specified by
UDMF are not necessarily the default values which editors may wish to
In the event that a map exceeds such an internal engine limitation, an apply to those fields during the creation of new entities during editing.
implementing port or editor should not continue to attempt loading the map, as Such editing defaults are not part of this specification.
doing so could destabilize the program.
----------------------------------- =======================================
II.B : Storage Within Archive Files II. Implementation Semantics
----------------------------------- =======================================
UDMF maps shall be layed out within the archive directory as follows: ------------------------------------
II.A : Storage and Retrieval of Data
(HEADER) ------------------------------------
TEXTMAP
... Block-defined entities are written and read in top-to-bottom order. For
ENDMAP example, the following linedefs can be assigned in order to a contiguous
block of memory serving as the implementing port's lines array:
(HEADER) = Any lump name from 1 to 8 characters. Serves as the name of the map.
TEXTMAP = Single UDMF lump containing all data for the map. linedef { id = 1; }
... = Blockmap, reject, BSP tree, and port-specific lumps, if any. The linedef { id = 2; }
format and presence of these resources are not defined by UDMF. linedef { id = 3; }
ENDMAP = Required closing lump. linedef { id = 4; }
Implementing editors and source ports may distinguish a UDMF map from a Data types:
traditional binary map by testing the name of the first directory entry
following the map header. Implementing resource editors will be capable of For purposes of internal storage:
keeping all lumps for the map, even non-standard ones, together by properly ---------------------------------
scanning for the ENDMAP entry. Non-implementing resource editors will not Integers should be considered signed with a range of at least 32 bits.
recognize the sequence of lumps as a map, and may thus be less likely to Floating-point numbers should be considered double precision.
interfere with the order or presence of the lumps. Strings have no reasonable length limitations.
Use of non-implementing resource editors to manipulate UDMF-map-containing WAD Hard Data Type Limits
files is not recommended, however. ---------------------
No limits on number of definitions are defined as part of this specification,
but implementors may face the need to impose such limitations due to
-------------------------------- restrictions on the amount of memory available, or the amount that can be
II.C : Implementation Dependence allocated through a single pointer on the host machine or in a private heap
-------------------------------- implementation.
A port's list of supported non-standard fields must be provided to implementing In the event that a map exceeds such an internal engine limitation, an
editors, where they can be provided to the end user as controls, as options implementing port or editor should not continue to attempt loading the map, as
in a dropbox, or through the ability to input any arbitrary doing so could destabilize the program.
"identifier = value;" pair in a text box.
-----------------------------------
Every UDMF map should contain as the first statement in the file the "namespace" II.B : Storage Within Archive Files
identifier statement, which declares the source port implementation relative to -----------------------------------
which this map is to be interpreted.
UDMF maps shall be layed out within the archive directory as follows:
Example:
(HEADER)
namespace = "ZDoom"; TEXTMAP
...
Implementing source ports may ignore this information, or they may use it to ENDMAP
perform automatic runtime translation of maps they would otherwise be unable to
support. (HEADER) = Any lump name from 1 to 8 characters. Serves as the name of the map.
TEXTMAP = Single UDMF lump containing all data for the map.
Implementing source ports should publicly document the value of the "namespace" ... = Blockmap, reject, BSP tree, and port-specific lumps, if any. The
variable they intend to identify with when establishing support for UDMF, and format and presence of these resources are not defined by UDMF.
avoid conflicts with existing implementations at all costs. ENDMAP = Required closing lump.
The following namespaces are considered reserved for compatibility purposes: Implementing editors and source ports may distinguish a UDMF map from a
traditional binary map by testing the name of the first directory entry
Doom following the map header. Implementing resource editors will be capable of
Heretic keeping all lumps for the map, even non-standard ones, together by properly
Hexen scanning for the ENDMAP entry. Non-implementing resource editors will not
Strife recognize the sequence of lumps as a map, and may thus be less likely to
interfere with the order or presence of the lumps.
The use of one of these namespaces indicates that all line specials, sector
specials, thing types, and if applicable, thing specials contained in the UDMF Use of non-implementing resource editors to manipulate UDMF-map-containing WAD
map conform to the "vanilla" types for the respective gamemode (with an files is not recommended, however.
exception for Doom) and are therefore 100% compatible with all UDMF
implementors which support the specified gamemode.
--------------------------------
An exception is made for the "Doom" translation type. It is considered to II.C : Implementation Dependence
represent the final fork of the v1.9 Doom engine, and therefore it includes --------------------------------
all line types added in DOOM II. It is also additionally considered to
include all specials defined in the BOOM and MBF source ports. Implementors A port's list of supported non-standard fields must be provided to implementing
who support BOOM linedef types can handle these in the normal manner; ports editors, where they can be provided to the end user as controls, as options
which do not support them should zero or otherwise ignore the offending in a dropbox, or through the ability to input any arbitrary
specials. "identifier = value;" pair in a text box.
Documentation of the precise meanings of these standardized namespaces will Every UDMF map should contain as the first statement in the file the "namespace"
be provided in separate documents. identifier statement, which declares the source port implementation relative to
which this map is to be interpreted.
This feature is provided in order to facilitate a universal and lossless
conversion of all existing Doom-engine-game maps to and from UDMF format, Example:
independent of any implementing ports' specific namespaces.
namespace = "ZDoom";
======================================= Implementing source ports may ignore this information, or they may use it to
III. Standardized Fields perform automatic runtime translation of maps they would otherwise be unable to
======================================= support.
The UDMF v1.0 specification considers the following fields standard. They must Implementing source ports should publicly document the value of the "namespace"
be recognized by all implementing ports and editors (support for the features variable they intend to identify with when establishing support for UDMF, and
they signify is not necessarily required, such as for ports which do not avoid conflicts with existing implementations at all costs.
implement Hexen support - all fields unknown to a given port should be
ignored and not treated as an error). The following namespaces are considered reserved for compatibility purposes:
linedef Doom
{ Heretic
id = <integer>; // ID of line. Interpreted as tag or scripting id. Hexen
// Default = -1. *** see below. Strife
v1 = <integer>; // Index of first vertex. No valid default. The use of one of these namespaces indicates that all line specials, sector
v2 = <integer>; // Index of second vertex. No valid default. specials, thing types, and if applicable, thing specials contained in the UDMF
map conform to the "vanilla" types for the respective gamemode (with an
// All flags default to false. exception for Doom) and are therefore 100% compatible with all UDMF
implementors which support the specified gamemode.
blocking = <bool>; // true = line blocks things.
blockmonsters = <bool>; // true = line blocks monsters. An exception is made for the "Doom" translation type. It is considered to
twosided = <bool>; // true = line is 2S. represent the final fork of the v1.9 Doom engine, and therefore it includes
dontpegtop = <bool>; // true = upper texture unpegged. all line types added in DOOM II. It is also additionally considered to
dontpegbottom = <bool>; // true = lower texture unpegged. include all specials defined in the BOOM and MBF source ports. Implementors
secret = <bool>; // true = drawn as 1S on map. who support BOOM linedef types can handle these in the normal manner; ports
blocksound = <bool>; // true = blocks sound. which do not support them should zero or otherwise ignore the offending
dontdraw = <bool>; // true = line never drawn on map. specials.
mapped = <bool>; // true = always appears on map.
Documentation of the precise meanings of these standardized namespaces will
// BOOM passuse flag not supported in Strife/Heretic/Hexen namespaces. be provided in separate documents.
passuse = <bool>; // true = passes use action. This feature is provided in order to facilitate a universal and lossless
conversion of all existing Doom-engine-game maps to and from UDMF format,
// Strife specific flags. Support for other games is not defined by independent of any implementing ports' specific namespaces.
// default and these flags should be ignored when reading maps not for
// the Strife namespace or maps for a port which supports these flags.
=======================================
translucent = <bool>; // true = line is a Strife translucent line. III. Standardized Fields
jumpover = <bool>; // true = line is a Strife railing. =======================================
blockfloaters = <bool>; // true = line is a Strife float-blocker.
The UDMF v1.0 specification considers the following fields standard. They must
// Note: SPAC flags should be set false in Doom/Heretic/Strife be recognized by all implementing ports and editors (support for the features
// namespace maps. Specials in those games do not support this they signify is not necessarily required, such as for ports which do not
// mechanism and instead imply activation parameters through the implement Hexen support - all fields unknown to a given port should be
// special number. All flags default to false. ignored and not treated as an error).
playercross = <bool>; // true = player can cross. All boolean fields take the keyword values true and false.
playeruse = <bool>; // true = player can use.
monstercross = <bool>; // true = monster can cross. linedef
monsteruse = <bool>; // true = monster can use. {
impact = <bool>; // true = projectile can activate. id = <integer>; // ID of line. Interpreted as tag or scripting id.
playerpush = <bool>; // true = player can push. // Default = -1. *** see below.
monsterpush = <bool>; // true = monster can push.
missilecross = <bool>; // true = projectile can cross. v1 = <integer>; // Index of first vertex. No valid default.
repeatspecial = <bool>; // true = repeatable special. v2 = <integer>; // Index of second vertex. No valid default.
special = <integer>; // Special. Default = 0. // All flags default to false.
arg0 = <integer>; // Argument 0. Default = 0.
arg1 = <integer>; // Argument 1. Default = 0. blocking = <bool>; // true = line blocks things.
arg2 = <integer>; // Argument 2. Default = 0. blockmonsters = <bool>; // true = line blocks monsters.
arg3 = <integer>; // Argument 3. Default = 0. twosided = <bool>; // true = line is 2S.
arg4 = <integer>; // Argument 4. Default = 0. dontpegtop = <bool>; // true = upper texture unpegged.
dontpegbottom = <bool>; // true = lower texture unpegged.
sidefront = <integer>; // Sidedef 1 index. No valid default. secret = <bool>; // true = drawn as 1S on map.
sideback = <integer>; // Sidedef 2 index. Default = -1. blocksound = <bool>; // true = blocks sound.
dontdraw = <bool>; // true = line never drawn on map.
comment = <string>; // A comment. Implementors should attach no special mapped = <bool>; // true = always appears on map.
// semantic meaning to this field.
} // BOOM passuse flag not supported in Strife/Heretic/Hexen namespaces.
sidedef passuse = <bool>; // true = passes use action.
{
offsetx = <integer>; // X Offset. Default = 0. // Strife specific flags. Support for other games is not defined by
offsety = <integer>; // Y Offset. Default = 0. // default and these flags should be ignored when reading maps not for
// the Strife namespace or maps for a port which supports these flags.
texturetop = <string>; // Upper texture. Default = "-".
texturebottom = <string>; // Lower texture. Default = "-". translucent = <bool>; // true = line is a Strife translucent line.
texturemiddle = <string>; // Middle texture. Default = "-". jumpover = <bool>; // true = line is a Strife railing.
blockfloaters = <bool>; // true = line is a Strife float-blocker.
sector = <integer>; // Sector index. No valid default.
// Note: SPAC flags should be set false in Doom/Heretic/Strife
comment = <string>; // A comment. Implementors should attach no special // namespace maps. Specials in those games do not support this
// semantic meaning to this field. // mechanism and instead imply activation parameters through the
} // special number. All flags default to false.
vertex playercross = <bool>; // true = player can cross.
{ playeruse = <bool>; // true = player can use.
x = <float>; // X coordinate. No valid default. monstercross = <bool>; // true = monster can cross.
y = <float>; // Y coordinate. No valid default. monsteruse = <bool>; // true = monster can use.
} impact = <bool>; // true = projectile can activate.
playerpush = <bool>; // true = player can push.
sector monsterpush = <bool>; // true = monster can push.
{ missilecross = <bool>; // true = projectile can cross.
heightfloor = <integer>; // Floor height. Default = 0. repeatspecial = <bool>; // true = repeatable special.
heightceiling = <integer>; // Ceiling height. Default = 0.
special = <integer>; // Special. Default = 0.
texturefloor = <string>; // Floor flat. No valid default. arg0 = <integer>; // Argument 0. Default = 0.
textureceiling = <string>; // Ceiling flat. No valid default. arg1 = <integer>; // Argument 1. Default = 0.
arg2 = <integer>; // Argument 2. Default = 0.
lightlevel = <integer>; // Light level. Default = 160. arg3 = <integer>; // Argument 3. Default = 0.
arg4 = <integer>; // Argument 4. Default = 0.
special = <integer>; // Sector special. Default = 0.
id = <integer>; // Sector tag/id. Default = 0. sidefront = <integer>; // Sidedef 1 index. No valid default.
sideback = <integer>; // Sidedef 2 index. Default = -1.
comment = <string>; // A comment. Implementors should attach no special
// semantic meaning to this field. comment = <string>; // A comment. Implementors should attach no special
} // semantic meaning to this field.
}
thing
{ sidedef
id = <integer>; // Thing ID. Default = 0. {
offsetx = <integer>; // X Offset. Default = 0.
x = <float>; // X coordinate. No valid default. offsety = <integer>; // Y Offset. Default = 0.
y = <float>; // Y coordinate. No valid default.
texturetop = <string>; // Upper texture. Default = "-".
height = <float>; // Z height relative to floor. Default = 0. texturebottom = <string>; // Lower texture. Default = "-".
// (Relative to ceiling for SPAWNCEILING items). texturemiddle = <string>; // Middle texture. Default = "-".
angle = <integer>; // Map angle of thing in degrees. Default = 0 (East). sector = <integer>; // Sector index. No valid default.
type = <integer>; // DoomedNum. No valid default. comment = <string>; // A comment. Implementors should attach no special
// semantic meaning to this field.
// All flags default to false. }
skill1 = <bool>; // true = in skill 1. vertex
skill2 = <bool>; // true = in skill 2. {
skill3 = <bool>; // true = in skill 3. x = <float>; // X coordinate. No valid default.
skill4 = <bool>; // true = in skill 4. y = <float>; // Y coordinate. No valid default.
skill5 = <bool>; // true = in skill 5. }
ambush = <bool>; // true = thing is deaf.
single = <bool>; // true = in SP mode. sector
dm = <bool>; // true = in DM mode. {
coop = <bool>; // true = in Coop. heightfloor = <integer>; // Floor height. Default = 0.
heightceiling = <integer>; // Ceiling height. Default = 0.
// MBF friend flag not supported in Strife/Heretic/Hexen namespaces.
texturefloor = <string>; // Floor flat. No valid default.
friend = <bool>; // true = MBF friend. textureceiling = <string>; // Ceiling flat. No valid default.
// Hexen flags; not supported in Doom/Strife/Heretic namespaces. lightlevel = <integer>; // Light level. Default = 160.
dormant = <bool>; // true = dormant thing. special = <integer>; // Sector special. Default = 0.
class1 = <bool>; // true = Present for pclass 1. id = <integer>; // Sector tag/id. Default = 0.
class2 = <bool>; // true = Present for pclass 2.
class3 = <bool>; // true = Present for pclass 3. comment = <string>; // A comment. Implementors should attach no special
// semantic meaning to this field.
}
// Strife specific flags. Support for other games is not defined by
// default and these flags should be ignored when reading maps not for thing
// the Strife namespace or maps for a port which supports these flags. {
standing = <bool>; // true = Strife NPC flag. id = <integer>; // Thing ID. Default = 0.
strifeally = <bool>; // true = Strife ally flag.
translucent = <bool>; // true = Strife translucency flag. x = <float>; // X coordinate. No valid default.
invisible = <bool>; // true = Strife invisibility flag. y = <float>; // Y coordinate. No valid default.
// Note: suggested editor defaults for all skill, gamemode, and player height = <float>; // Z height relative to floor. Default = 0.
// class flags is true rather than the UDMF default of false. // (Relative to ceiling for SPAWNCEILING items).
// Thing special semantics are only defined for the Hexen namespace or angle = <integer>; // Map angle of thing in degrees. Default = 0 (East).
// ports which implement this feature in their own namespace.
type = <integer>; // DoomedNum. No valid default.
special = <integer>; // Scripting special. Default = 0;
arg0 = <integer>; // Argument 0. Default = 0. // All flags default to false.
arg1 = <integer>; // Argument 1. Default = 0.
arg2 = <integer>; // Argument 2. Default = 0. skill1 = <bool>; // true = in skill 1.
arg3 = <integer>; // Argument 3. Default = 0. skill2 = <bool>; // true = in skill 2.
arg4 = <integer>; // Argument 4. Default = 0. skill3 = <bool>; // true = in skill 3.
skill4 = <bool>; // true = in skill 4.
comment = <string>; // A comment. Implementors should attach no special skill5 = <bool>; // true = in skill 5.
// semantic meaning to this field. ambush = <bool>; // true = thing is deaf.
} single = <bool>; // true = in SP mode.
dm = <bool>; // true = in DM mode.
coop = <bool>; // true = in Coop.
*** Tag / ID Behavior for Map Conversion:
// MBF friend flag not supported in Strife/Heretic/Hexen namespaces.
Unlike traditional Doom maps UDMF makes a clear distinction between a line's
ID and the parameter which identifies the object the line's special is friend = <bool>; // true = MBF friend.
supposed to affect.
// Hexen flags; not supported in Doom/Strife/Heretic namespaces.
The id will be used to identify this line, and arg0 will be used to identify
the line or sector that this line is to affect or otherwise reference, i.e. dormant = <bool>; // true = dormant thing.
it is effectively a parameter to the line's special. class1 = <bool>; // true = Present for pclass 1.
class2 = <bool>; // true = Present for pclass 2.
Boom used the linedef's tag for both due to lack of other options so in class3 = <bool>; // true = Present for pclass 3.
order to ensure compatibility any map converter converting maps for the
Doom/Heretic/Strife namespaces must store the linedef's tag field as both
the id and as arg0 in each line. The default value of the id field under // Strife specific flags. Support for other games is not defined by
these namespaces is defined as 0 rather than -1. // default and these flags should be ignored when reading maps not for
// the Strife namespace or maps for a port which supports these flags.
Since UDMF provides a line id field, the Hexen line special #121 standing = <bool>; // true = Strife NPC flag.
(Line_SetIdentification) is obsolete. When converting maps to UDMF under strifeally = <bool>; // true = Strife ally flag.
Hexen namespace, special 121 should be written as zero, and the arg0 of translucent = <bool>; // true = Strife translucency flag.
the binary linedef should be written as the id field of the UDMF line. invisible = <bool>; // true = Strife invisibility flag.
The arg0 value of the UDMF line should also then be set to zero.
// Note: suggested editor defaults for all skill, gamemode, and player
=============================================================================== // class flags is true rather than the UDMF default of false.
EOF
=============================================================================== // Thing special semantics are only defined for the Hexen namespace or
// ports which implement this feature in their own namespace.
special = <integer>; // Scripting special. Default = 0;
arg0 = <integer>; // Argument 0. Default = 0.
arg1 = <integer>; // Argument 1. Default = 0.
arg2 = <integer>; // Argument 2. Default = 0.
arg3 = <integer>; // Argument 3. Default = 0.
arg4 = <integer>; // Argument 4. Default = 0.
comment = <string>; // A comment. Implementors should attach no special
// semantic meaning to this field.
}
*** Tag / ID Behavior for Map Conversion:
Unlike traditional Doom maps UDMF makes a clear distinction between a line's
ID and the parameter which identifies the object the line's special is
supposed to affect.
The id will be used to identify this line, and arg0 will be used to identify
the line or sector that this line is to affect or otherwise reference, i.e.
it is effectively a parameter to the line's special.
Boom used the linedef's tag for both due to lack of other options so in
order to ensure compatibility any map converter converting maps for the
Doom/Heretic/Strife namespaces must store the linedef's tag field as both
the id and as arg0 in each line. The default value of the id field under
these namespaces is defined as 0 rather than -1.
Since UDMF provides a line id field, the Hexen line special #121
(Line_SetIdentification) is obsolete. When converting maps to UDMF under
Hexen namespace, special 121 should be written as zero, and the arg0 of
the binary linedef should be written as the id field of the UDMF line.
The arg0 value of the UDMF line should also then be set to zero.
===============================================================================
EOF
===============================================================================

View file

@ -104,6 +104,15 @@ static BYTE StrifePaletteVals[11*3] =
187, 59, 0, 219, 171, 0 187, 59, 0, 219, 171, 0
}; };
static AMColor RavenColors[11];
static BYTE RavenPaletteVals[11*3] =
{
0x6c,0x54,0x40, 255, 255, 255, 0x74,0x5c,0x48,
75, 50, 16, 88, 93, 86, 208, 176, 133,
103, 59, 31, 236, 236, 236, 0, 0, 0,
0, 0, 0, 0, 0, 0,
};
#define MAPBITS 12 #define MAPBITS 12
#define MapDiv SafeDivScale12 #define MapDiv SafeDivScale12
#define MapMul MulScale12 #define MapMul MulScale12
@ -683,6 +692,7 @@ static void AM_initColors (bool overlayed)
{ {
DoomColors[i].FromRGB(DoomPaletteVals[j], DoomPaletteVals[j+1], DoomPaletteVals[j+2]); DoomColors[i].FromRGB(DoomPaletteVals[j], DoomPaletteVals[j+1], DoomPaletteVals[j+2]);
StrifeColors[i].FromRGB(StrifePaletteVals[j], StrifePaletteVals[j+1], StrifePaletteVals[j+2]); StrifeColors[i].FromRGB(StrifePaletteVals[j], StrifePaletteVals[j+1], StrifePaletteVals[j+2]);
RavenColors[i].FromRGB(RavenPaletteVals[j], RavenPaletteVals[j+1], RavenPaletteVals[j+2]);
} }
} }
@ -784,6 +794,28 @@ static void AM_initColors (bool overlayed)
XHairColor = DoomColors[9]; XHairColor = DoomColors[9];
NotSeenColor = DoomColors[10]; NotSeenColor = DoomColors[10];
break; break;
case 3: // Raven
// Use colors corresponding to the original Raven's
Background = RavenColors[0];
YourColor = RavenColors[1];
AlmostBackground = DoomColors[2];
SecretSectorColor =
SecretWallColor =
WallColor = RavenColors[3];
TSWallColor = RavenColors[4];
FDWallColor = RavenColors[5];
LockedColor =
CDWallColor = RavenColors[6];
ThingColor =
ThingColor_Item =
ThingColor_Friend =
ThingColor_Monster = RavenColors[7];
GridColor = RavenColors[4];
XHairColor = RavenColors[9];
NotSeenColor = RavenColors[10];
break;
} }
lastpal = palette; lastpal = palette;
@ -1433,7 +1465,7 @@ void AM_drawWalls (bool allmap)
lines[i].special == ACS_LockedExecuteDoor || lines[i].special == ACS_LockedExecuteDoor ||
(lines[i].special == Generic_Door && lines[i].args[4] !=0 )) (lines[i].special == Generic_Door && lines[i].args[4] !=0 ))
{ {
if (am_colorset == 0) if (am_colorset == 0 || am_colorset == 3) // Raven games show door colors
{ {
int P_GetMapColorForLock(int lock); int P_GetMapColorForLock(int lock);
int lock; int lock;

View file

@ -1605,7 +1605,7 @@ void D_DoomMain (void)
GameConfig->DoGameSetup (GameNames[gameinfo.gametype]); GameConfig->DoGameSetup (GameNames[gameinfo.gametype]);
if (!(gameinfo.flags & GI_SHAREWARE)) if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload"))
{ {
FString file; FString file;

View file

@ -569,7 +569,8 @@ EXTERN_CVAR (Bool, am_drawmapback)
static value_t MapColorTypes[] = { static value_t MapColorTypes[] = {
{ 0, "Custom" }, { 0, "Custom" },
{ 1, "Traditional Doom" }, { 1, "Traditional Doom" },
{ 2, "Traditional Strife" } { 2, "Traditional Strife" },
{ 3, "Traditional Raven" }
}; };
static value_t SecretTypes[] = { static value_t SecretTypes[] = {
@ -591,7 +592,7 @@ static value_t OverlayTypes[] = {
}; };
static menuitem_t AutomapItems[] = { static menuitem_t AutomapItems[] = {
{ discrete, "Map color set", {&am_colorset}, {3.0}, {0.0}, {0.0}, {MapColorTypes} }, { discrete, "Map color set", {&am_colorset}, {4.0}, {0.0}, {0.0}, {MapColorTypes} },
{ more, "Set custom colors", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t*)StartMapColorsMenu} }, { more, "Set custom colors", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t*)StartMapColorsMenu} },
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} }, { redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
{ discrete, "Rotate automap", {&am_rotate}, {3.0}, {0.0}, {0.0}, {RotateTypes} }, { discrete, "Rotate automap", {&am_rotate}, {3.0}, {0.0}, {0.0}, {RotateTypes} },

View file

@ -238,20 +238,49 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BasicAttack)
//========================================================================== //==========================================================================
// //
// Custom sound functions. These use misc1 and misc2 in the state structure // Custom sound functions.
// This has been changed to use the parameter array instead of using the
// misc field directly so they can be used in weapon states
// //
//========================================================================== //==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySound) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySound)
{ {
ACTION_PARAM_START(1); ACTION_PARAM_START(5);
ACTION_PARAM_SOUND(soundid, 0); ACTION_PARAM_SOUND(soundid, 0);
ACTION_PARAM_INT(channel, 1);
ACTION_PARAM_FLOAT(volume, 2);
ACTION_PARAM_BOOL(looping, 3);
ACTION_PARAM_FLOAT(attenuation, 4);
S_Sound (self, CHAN_BODY, soundid, 1, ATTN_NORM); if (!looping)
{
S_Sound (self, channel, soundid, volume, attenuation);
}
else
{
if (!S_IsActorPlayingSomething (self, channel&7, soundid))
{
S_Sound (self, channel | CHAN_LOOP, soundid, volume, attenuation);
}
}
} }
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_StopSound)
{
ACTION_PARAM_START(1);
ACTION_PARAM_INT(slot, 0);
S_StopSound(self, slot);
}
//==========================================================================
//
// These come from a time when DECORATE constants did not exist yet and
// the sound interface was less flexible. As a result the parameters are
// not optimal and these functions have been deprecated in favor of extending
// A_PlaySound and A_StopSound.
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlayWeaponSound) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlayWeaponSound)
{ {
ACTION_PARAM_START(1); ACTION_PARAM_START(1);
@ -260,11 +289,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlayWeaponSound)
S_Sound (self, CHAN_WEAPON, soundid, 1, ATTN_NORM); S_Sound (self, CHAN_WEAPON, soundid, 1, ATTN_NORM);
} }
DEFINE_ACTION_FUNCTION(AActor, A_StopSound)
{
S_StopSound(self, CHAN_VOICE);
}
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySoundEx) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySoundEx)
{ {
ACTION_PARAM_START(4); ACTION_PARAM_START(4);

View file

@ -160,11 +160,11 @@ ACTOR Actor native //: Thinker
action native A_MeleeAttack(); action native A_MeleeAttack();
action native A_ComboAttack(); action native A_ComboAttack();
action native A_BulletAttack(); action native A_BulletAttack();
action native A_PlaySound(sound whattoplay); action native A_PlaySound(sound whattoplay, int slot = CHAN_BODY, float volume = 1.0, bool looping = false, float attenuation = ATTN_NORM);
action native A_PlayWeaponSound(sound whattoplay); action native A_PlayWeaponSound(sound whattoplay);
action native A_FLoopActiveSound(); action native A_FLoopActiveSound();
action native A_LoopActiveSound(); action native A_LoopActiveSound();
action native A_StopSound(); action native A_StopSound(int slot = CHAN_VOICE); // Bad default but that's what is originally was...
action native A_PlaySoundEx(sound whattoplay, coerce name slot, bool looping = false, int attenuation = 0); action native A_PlaySoundEx(sound whattoplay, coerce name slot, bool looping = false, int attenuation = 0);
action native A_StopSoundEx(coerce name slot); action native A_StopSoundEx(coerce name slot);
action native A_SeekerMissile(int threshold, int turnmax); action native A_SeekerMissile(int threshold, int turnmax);

View file

@ -44,5 +44,28 @@ const int MRF_UNDOBYDEATH = 512;
const int MRF_UNDOBYDEATHFORCED = 1024; const int MRF_UNDOBYDEATHFORCED = 1024;
const int MRF_UNDOBYDEATHSAVES = 2048; const int MRF_UNDOBYDEATHSAVES = 2048;
// constants for A_PlaySound
enum
{
CHAN_AUTO = 0,
CHAN_WEAPON = 1,
CHAN_VOICE = 2,
CHAN_ITEM = 3,
CHAN_BODY = 4,
// modifier flags
CHAN_LISTENERZ = 8,
CHAN_MAYBE_LOCAL = 16,
CHAN_UI = 32,
CHAN_NOPAUSE = 64
};
// sound attenuation values
const float ATTN_NONE = 0;
const float ATTN_NORM = 1;
const float ATTN_IDLE = 1.001;
const float ATTN_STATIC = 3;
// This is only here to provide one global variable for testing. // This is only here to provide one global variable for testing.
native int testglobalvar; native int testglobalvar;

View file

@ -1,5 +1,5 @@
#include "actors/actor.txt"
#include "actors/constants.txt" #include "actors/constants.txt"
#include "actors/actor.txt"
#include "actors/shared/inventory.txt" #include "actors/shared/inventory.txt"
#include "actors/shared/player.txt" #include "actors/shared/player.txt"