mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- Added support for using named scripts with UDMF maps. On lines with ACS specials
(i.e. ACS_Execute, etc.), set the arg0str property to the name of the script to execute. The standard numeric arg0 property will be ignored in this case. SVN r3372 (trunk)
This commit is contained in:
parent
cbf7162e16
commit
d9b8b344ff
5 changed files with 76 additions and 52 deletions
|
@ -39,7 +39,7 @@ between the TEXTMAP and ENDMAP lumps:
|
||||||
BEHAVIOR = contains compiled ACS code
|
BEHAVIOR = contains compiled ACS code
|
||||||
DIALOGUE = contains compiled Strife conversation scripts.
|
DIALOGUE = contains compiled Strife conversation scripts.
|
||||||
ZNODES = Nodes (must be stored as extended GL nodes. Compression is allowed
|
ZNODES = Nodes (must be stored as extended GL nodes. Compression is allowed
|
||||||
but deprecated for portability reasons.)
|
but deprecated for portability reasons.)
|
||||||
BLOCKMAP = blockmap. It is recommended not to include this lump in UDMF maps.
|
BLOCKMAP = blockmap. It is recommended not to include this lump in UDMF maps.
|
||||||
REJECT = reject table. Recommended use is for special effects only.
|
REJECT = reject table. Recommended use is for special effects only.
|
||||||
|
|
||||||
|
@ -111,9 +111,14 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
midtex3d = <bool>; // Actors can walk on mid texture.
|
midtex3d = <bool>; // Actors can walk on mid texture.
|
||||||
checkswitchrange = <bool>;// Switches can only be activated when vertically reachable.
|
checkswitchrange = <bool>;// Switches can only be activated when vertically reachable.
|
||||||
blockprojectiles = <bool>;// Line blocks all projectiles
|
blockprojectiles = <bool>;// Line blocks all projectiles
|
||||||
blockuse = <bool>; // Line blocks all use actions
|
blockuse = <bool>; // Line blocks all use actions
|
||||||
blocksight = <bool>; // Line blocks monster line of sight
|
blocksight = <bool>; // Line blocks monster line of sight
|
||||||
|
arg0str = <string>; // Alternate string-based version of arg0
|
||||||
|
|
||||||
|
* Note about arg0str
|
||||||
|
|
||||||
|
For lines with ACS specials (80-86 and 226), if arg0str is present and non-null, it
|
||||||
|
will be used as the name of the script to execute, and arg0 will be ignored.
|
||||||
}
|
}
|
||||||
|
|
||||||
sidedef
|
sidedef
|
||||||
|
@ -135,16 +140,16 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
light = <integer>; // This side's light level. Default is 0.
|
light = <integer>; // This side's light level. Default is 0.
|
||||||
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
|
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
|
||||||
// relative to the owning sector's light level.
|
// relative to the owning sector's light level.
|
||||||
nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef.
|
nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef.
|
||||||
smoothlighting = <bool>; // Use smooth fake contrast.
|
smoothlighting = <bool>; // Use smooth fake contrast.
|
||||||
clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling.
|
clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling.
|
||||||
wrapmidtex = <bool>; // Side's mid textures are wrapped.
|
wrapmidtex = <bool>; // Side's mid textures are wrapped.
|
||||||
nodecals = <bool>; // Disables decals on the sidedef.
|
nodecals = <bool>; // Disables decals on the sidedef.
|
||||||
}
|
}
|
||||||
|
|
||||||
sector
|
sector
|
||||||
{
|
{
|
||||||
xpanningfloor = <float>; // X texture offset of floor texture, Default = 0.0.
|
xpanningfloor = <float>; // X texture offset of floor texture, Default = 0.0.
|
||||||
ypanningfloor = <float>; // Y texture offset of floor texture, Default = 0.0.
|
ypanningfloor = <float>; // Y texture offset of floor texture, Default = 0.0.
|
||||||
xpanningceiling = <float>; // X texture offset of ceiling texture, Default = 0.0.
|
xpanningceiling = <float>; // X texture offset of ceiling texture, Default = 0.0.
|
||||||
ypanningceiling = <float>; // Y texture offset of ceiling texture, Default = 0.0.
|
ypanningceiling = <float>; // Y texture offset of ceiling texture, Default = 0.0.
|
||||||
|
@ -163,9 +168,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
alphafloor = <float>; // translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
alphafloor = <float>; // translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
||||||
alphaceiling = <float>; // translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
alphaceiling = <float>; // translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0.
|
||||||
renderstylefloor = <string>; // floor plane renderstyle (only has meaning with Sector_SetPortal); not implemented yet in software renderer
|
renderstylefloor = <string>; // floor plane renderstyle (only has meaning with Sector_SetPortal); not implemented yet in software renderer
|
||||||
// can be "translucent" or "add", default is "translucent".
|
// can be "translucent" or "add", default is "translucent".
|
||||||
renderstyleceiling = <string>; // ceiling plane renderstyle (only has meaning with Sector_SetPortal); not implemented yet in software renderer
|
renderstyleceiling = <string>; // ceiling plane renderstyle (only has meaning with Sector_SetPortal); not implemented yet in software renderer
|
||||||
// can be "translucent" or "add", default is "translucent".
|
// can be "translucent" or "add", default is "translucent".
|
||||||
gravity = <float>; // Sector's gravity. Default is 1.0.
|
gravity = <float>; // Sector's gravity. Default is 1.0.
|
||||||
lightcolor = <integer>; // Sector's light color as RRGGBB value, default = 0xffffff.
|
lightcolor = <integer>; // Sector's light color as RRGGBB value, default = 0xffffff.
|
||||||
fadecolor = <integer>; // Sector's fog color as RRGGBB value, default = 0x000000.
|
fadecolor = <integer>; // Sector's fog color as RRGGBB value, default = 0x000000.
|
||||||
|
@ -173,10 +178,10 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
silent = <bool>; // Actors in this sector make no sound,
|
silent = <bool>; // Actors in this sector make no sound,
|
||||||
nofallingdamage = <bool>; // Falling damage is disabled in this sector
|
nofallingdamage = <bool>; // Falling damage is disabled in this sector
|
||||||
dropactors = <bool>; // Actors drop with instantly moving floors (*)
|
dropactors = <bool>; // Actors drop with instantly moving floors (*)
|
||||||
norespawn = <bool>; // Players can not respawn in this sector
|
norespawn = <bool>; // Players can not respawn in this sector
|
||||||
soundsequence = <string>; // The sound sequence to play when this sector moves. Placing a
|
soundsequence = <string>; // The sound sequence to play when this sector moves. Placing a
|
||||||
// sound sequence thing in the sector will override this property.
|
// sound sequence thing in the sector will override this property.
|
||||||
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
|
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
|
||||||
|
|
||||||
* Note about dropactors
|
* Note about dropactors
|
||||||
|
|
||||||
|
@ -190,9 +195,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
{
|
{
|
||||||
skill# = <bool> // Unlike the base spec, # can range from 1-16.
|
skill# = <bool> // Unlike the base spec, # can range from 1-16.
|
||||||
class# = <bool> // Unlike the base spec, # can range from 1-16.
|
class# = <bool> // Unlike the base spec, # can range from 1-16.
|
||||||
conversation = <int> // Assigns a conversation dialogue to this thing.
|
conversation = <int> // Assigns a conversation dialogue to this thing.
|
||||||
// Parameter is the conversation ID, 0 meaning none.
|
// Parameter is the conversation ID, 0 meaning none.
|
||||||
countsecret = <bool>; // Picking up this actor counts as a secret.
|
countsecret = <bool>; // Picking up this actor counts as a secret.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -303,6 +308,10 @@ Removed remarks of 8 being the maximum number of player classes/skill levels the
|
||||||
Added renderstyleceiling and renderstylefloor sector properties
|
Added renderstyleceiling and renderstylefloor sector properties
|
||||||
Added Sector_Set3DFloor to list of specials that need to be handled for line ID remapping
|
Added Sector_Set3DFloor to list of specials that need to be handled for line ID remapping
|
||||||
|
|
||||||
|
1.18 17.02.2012
|
||||||
|
Added arg0str linedef property.
|
||||||
|
Standardized whitespace.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
EOF
|
EOF
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
|
@ -292,6 +292,7 @@ xx(Arg1)
|
||||||
xx(Arg2)
|
xx(Arg2)
|
||||||
xx(Arg3)
|
xx(Arg3)
|
||||||
xx(Arg4)
|
xx(Arg4)
|
||||||
|
xx(Arg0Str)
|
||||||
xx(Id)
|
xx(Id)
|
||||||
xx(V1)
|
xx(V1)
|
||||||
xx(V2)
|
xx(V2)
|
||||||
|
|
|
@ -198,6 +198,11 @@ typedef int (*lnSpecFunc)(struct line_t *line,
|
||||||
extern lnSpecFunc LineSpecials[256];
|
extern lnSpecFunc LineSpecials[256];
|
||||||
|
|
||||||
extern BYTE NamedACSToNormalACS[7];
|
extern BYTE NamedACSToNormalACS[7];
|
||||||
|
static inline bool P_IsACSSpecial(int specnum)
|
||||||
|
{
|
||||||
|
return (specnum >= ACS_Execute && specnum <= ACS_LockedExecuteDoor) ||
|
||||||
|
specnum == ACS_ExecuteAlways;
|
||||||
|
}
|
||||||
|
|
||||||
int P_FindLineSpecial (const char *string, int *min_args=NULL, int *max_args=NULL);
|
int P_FindLineSpecial (const char *string, int *min_args=NULL, int *max_args=NULL);
|
||||||
bool P_ActivateThingSpecial(AActor * thing, AActor * trigger, bool death=false);
|
bool P_ActivateThingSpecial(AActor * thing, AActor * trigger, bool death=false);
|
||||||
|
|
|
@ -396,8 +396,7 @@ void P_SerializeWorld (FArchive &arc)
|
||||||
<< li->special
|
<< li->special
|
||||||
<< li->Alpha
|
<< li->Alpha
|
||||||
<< li->id;
|
<< li->id;
|
||||||
if ((li->special >= ACS_Execute && li->special <= ACS_LockedExecuteDoor) ||
|
if (P_IsACSSpecial(li->special))
|
||||||
li->special == ACS_ExecuteAlways)
|
|
||||||
{
|
{
|
||||||
P_SerializeACSScriptNumber(arc, li->args[0], false);
|
P_SerializeACSScriptNumber(arc, li->args[0], false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,6 +651,7 @@ public:
|
||||||
{
|
{
|
||||||
bool passuse = false;
|
bool passuse = false;
|
||||||
bool strifetrans = false;
|
bool strifetrans = false;
|
||||||
|
FString arg0str;
|
||||||
|
|
||||||
memset(ld, 0, sizeof(*ld));
|
memset(ld, 0, sizeof(*ld));
|
||||||
ld->Alpha = FRACUNIT;
|
ld->Alpha = FRACUNIT;
|
||||||
|
@ -706,6 +707,11 @@ public:
|
||||||
ld->args[int(key)-int(NAME_Arg0)] = CheckInt(key);
|
ld->args[int(key)-int(NAME_Arg0)] = CheckInt(key);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case NAME_Arg0Str:
|
||||||
|
CHECK_N(Zd);
|
||||||
|
arg0str = CheckString(key);
|
||||||
|
continue;
|
||||||
|
|
||||||
case NAME_Blocking:
|
case NAME_Blocking:
|
||||||
Flag(ld->flags, ML_BLOCKING, key);
|
Flag(ld->flags, ML_BLOCKING, key);
|
||||||
continue;
|
continue;
|
||||||
|
@ -920,6 +926,10 @@ public:
|
||||||
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
||||||
Printf("Line %d has no first side.\n", index);
|
Printf("Line %d has no first side.\n", index);
|
||||||
}
|
}
|
||||||
|
if (arg0str.IsNotEmpty() && P_IsACSSpecial(ld->special))
|
||||||
|
{
|
||||||
|
ld->args[0] = -FName(arg0str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue