mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
Merge remote-tracking branch 'upstream/master' into netgame-urls
This commit is contained in:
commit
614449298e
29 changed files with 506 additions and 7465 deletions
|
@ -1,77 +0,0 @@
|
|||
// Default lump name for new map
|
||||
defaultlumpname = "MAP01";
|
||||
//GZDB specific. Don't try to load lumps that don't exist.
|
||||
basegame = 0;
|
||||
|
||||
//Sky textures for vanilla maps
|
||||
defaultskytextures
|
||||
{
|
||||
SKY1 = "MAP01,MAP02,MAP03,MAP33,MAP50,MAP60,MAPF0,MAPM0";
|
||||
SKY2 = "MAPM7,MAPMB";
|
||||
SKY4 = "MAP04,MAP06,MAP61,MAPF6,MAPM1";
|
||||
SKY6 = "MAP05,MAP51,MAPMA";
|
||||
SKY7 = "MAPM2,MAPM5";
|
||||
SKY8 = "MAP07,MAP08,MAP09,MAP52,MAP62,MAPF1";
|
||||
SKY10 = "MAP10,MAP12,MAP53,MAP63,MAPM3";
|
||||
SKY11 = "MAP11,MAPF7";
|
||||
SKY13 = "MAP13,MAP64";
|
||||
SKY14 = "MAP14";
|
||||
SKY15 = "MAP15,MAP54";
|
||||
SKY17 = "MAP70";
|
||||
SKY20 = "MAP32,MAP55,MAP65,MAPF2,MAPF5";
|
||||
SKY21 = "MAPM4";
|
||||
SKY22 = "MAP22,MAP23,MAP25,MAP26,MAP27,MAP56,MAP66,MAPF4,MAPM6";
|
||||
SKY30 = "MAP30";
|
||||
SKY31 = "MAP31";
|
||||
SKY35 = "MAP42";
|
||||
SKY40 = "MAP41,MAP71,MAPM9";
|
||||
SKY55 = "MAPF3,MAPM8";
|
||||
SKY68 = "MAPF8";
|
||||
SKY99 = "MAP57,MAPZ0";
|
||||
SKY159 = "MAP16";
|
||||
SKY172 = "MAP40";
|
||||
SKY300 = "MAP72";
|
||||
SKY301 = "MAP73";
|
||||
}
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
{
|
||||
1 = "Normal";
|
||||
}
|
||||
|
||||
// Skins
|
||||
skins
|
||||
{
|
||||
Sonic;
|
||||
Tails;
|
||||
Knuckles;
|
||||
Amy;
|
||||
Fang;
|
||||
Metalsonic;
|
||||
}
|
||||
|
||||
// Gametypes
|
||||
gametypes
|
||||
{
|
||||
-1 = "Single Player";
|
||||
0 = "Co-op";
|
||||
1 = "Competition";
|
||||
2 = "Race";
|
||||
3 = "Match";
|
||||
4 = "Team Match";
|
||||
5 = "Tag";
|
||||
6 = "Hide and Seek";
|
||||
7 = "CTF";
|
||||
}
|
||||
|
||||
// Texture loading options
|
||||
defaultwalltexture = "GFZROCK";
|
||||
defaultfloortexture = "GFZFLR01";
|
||||
defaultceilingtexture = "F_SKY1";
|
||||
|
||||
// Default texture sets
|
||||
// (these are not required, but useful for new users)
|
||||
texturesets
|
||||
{
|
||||
}
|
|
@ -1,309 +0,0 @@
|
|||
common
|
||||
{
|
||||
// Some common settings
|
||||
|
||||
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-file \"%AP\" \"%F\" -warp %L";
|
||||
testshortpaths = true;
|
||||
|
||||
// Action special help (mxd)
|
||||
actionspecialhelp = "https://wiki.srb2.org/wiki/Linedef_type_%K";
|
||||
|
||||
// Default nodebuilder configurations
|
||||
defaultsavecompiler = "zennode_normal";
|
||||
defaulttestcompiler = "zennode_fast";
|
||||
|
||||
// Generalized actions
|
||||
generalizedlinedefs = false;
|
||||
generalizedsectors = true;
|
||||
|
||||
mixtexturesflats = true;
|
||||
defaulttexturescale = 1.0f;
|
||||
defaultflatscale = 1.0f;
|
||||
scaledtextureoffsets = true;
|
||||
|
||||
// Thing number for start position in 3D Mode
|
||||
start3dmode = 3328;
|
||||
|
||||
// Texture sources
|
||||
textures
|
||||
{
|
||||
include("SRB222_misc.cfg", "textures");
|
||||
}
|
||||
|
||||
// Patch sources
|
||||
patches
|
||||
{
|
||||
include("SRB222_misc.cfg", "patches");
|
||||
}
|
||||
|
||||
// Sprite sources
|
||||
sprites
|
||||
{
|
||||
include("SRB222_misc.cfg", "sprites");
|
||||
}
|
||||
|
||||
// Flat sources
|
||||
flats
|
||||
{
|
||||
include("SRB222_misc.cfg", "flats");
|
||||
}
|
||||
}
|
||||
|
||||
mapformat_doom
|
||||
{
|
||||
// The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder
|
||||
formatinterface = "SRB2MapSetIO";
|
||||
|
||||
/*
|
||||
GAME DETECT PATTERN
|
||||
Used to guess the game for which a WAD file is made.
|
||||
|
||||
1 = One of these lumps must exist
|
||||
2 = None of these lumps must exist
|
||||
3 = All of these lumps must exist
|
||||
*/
|
||||
|
||||
gamedetect
|
||||
{
|
||||
EXTENDED = 2;
|
||||
|
||||
|
||||
BEHAVIOR = 2;
|
||||
|
||||
E#M# = 2;
|
||||
|
||||
MAP?? = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
MAP LUMP NAMES
|
||||
Map lumps are loaded with the map as long as they are right after each other. When the editor
|
||||
meets a lump which is not defined in this list it will ignore the map if not satisfied.
|
||||
The order of items defines the order in which lumps will be written to WAD file on save.
|
||||
To indicate the map header lump, use ~MAP
|
||||
|
||||
Legenda:
|
||||
required = Lump is required to exist.
|
||||
blindcopy = Lump will be copied along with the map blindly. (usefull for lumps Doom Builder doesn't use)
|
||||
nodebuild = The nodebuilder generates this lump.
|
||||
allowempty = The nodebuilder is allowed to leave this lump empty.
|
||||
script = This lump is a text-based script. Specify the filename of the script configuration to use.
|
||||
*/
|
||||
|
||||
maplumpnames
|
||||
{
|
||||
include("SRB222_misc.cfg", "doommaplumpnames");
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
include("SRB222_misc.cfg", "speciallinedefs");
|
||||
|
||||
// Default flags for first new thing (As far as 2.2 goes, they're empty just like in 2.1)
|
||||
defaultthingflags
|
||||
{
|
||||
}
|
||||
|
||||
// DEFAULT SECTOR BRIGHTNESS LEVELS
|
||||
sectorbrightness
|
||||
{
|
||||
include("SRB222_misc.cfg", "sectorbrightness");
|
||||
}
|
||||
|
||||
// SECTOR TYPES-----------------------------------------------------------------
|
||||
sectortypes
|
||||
{
|
||||
include("SRB222_sectors.cfg", "sectortypes");
|
||||
}
|
||||
|
||||
// GENERALISED SECTOR TYPES-----------------------------------------------------------------
|
||||
gen_sectortypes
|
||||
{
|
||||
include("SRB222_sectors.cfg", "gen_sectortypes");
|
||||
}
|
||||
|
||||
// LINEDEF FLAGS
|
||||
linedefflags
|
||||
{
|
||||
include("SRB222_misc.cfg", "linedefflags");
|
||||
}
|
||||
|
||||
// Linedef flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
linedefflagstranslation
|
||||
{
|
||||
include("SRB222_misc.cfg", "linedefflagstranslation");
|
||||
}
|
||||
|
||||
// LINEDEF ACTIVATIONS
|
||||
linedefactivations
|
||||
{
|
||||
}
|
||||
|
||||
// LINEDEF TYPES
|
||||
linedeftypes
|
||||
{
|
||||
include("SRB222_linedefs.cfg", "doom");
|
||||
}
|
||||
|
||||
// THING FLAGS
|
||||
thingflags
|
||||
{
|
||||
include("SRB222_misc.cfg", "thingflags");
|
||||
}
|
||||
|
||||
// Thing flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
thingflagstranslation
|
||||
{
|
||||
include("SRB222_misc.cfg", "thingflagstranslation");
|
||||
}
|
||||
|
||||
// THING FLAGS ERROR MASK
|
||||
// Mask for the thing flags which indicates the options
|
||||
// that make the same thing appear in the same modes
|
||||
thingflagsmask1 = 7; // 1 + 2 + 4
|
||||
thingflagsmask2 = 0;
|
||||
}
|
||||
|
||||
mapformat_udmf
|
||||
{
|
||||
// The format interface handles the map data format
|
||||
formatinterface = "UniversalMapSetIO";
|
||||
|
||||
// Enables support for long (> 8 chars) texture names
|
||||
// WARNING: this should only be enabled for UDMF game configurations!
|
||||
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
|
||||
longtexturenames = false;
|
||||
|
||||
// Default nodebuilder configurations
|
||||
defaultsavecompiler = "zdbsp_udmf_normal";
|
||||
defaulttestcompiler = "zdbsp_udmf_fast";
|
||||
|
||||
engine = "srb2"; // override that so that DB2 uses the correct namespace
|
||||
|
||||
maplumpnames
|
||||
{
|
||||
include("UDMF_misc.cfg", "udmfmaplumpnames_begin");
|
||||
include("SRB222_misc.cfg", "udmfmaplumpnames");
|
||||
include("UDMF_misc.cfg", "udmfmaplumpnames_end");
|
||||
}
|
||||
|
||||
universalfields
|
||||
{
|
||||
// include("SRB222_misc.cfg", "universalfields");
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
include("SRB222_misc.cfg", "speciallinedefs_udmf");
|
||||
|
||||
// Default flags for first new thing (As far as 2.2 goes, they're empty just like in 2.1)
|
||||
defaultthingflags
|
||||
{
|
||||
}
|
||||
|
||||
// Generalized actions
|
||||
generalizedlinedefs = false;
|
||||
|
||||
// SECTOR FLAGS
|
||||
sectorflags
|
||||
{
|
||||
// include("SRB222_misc.cfg", "sectorflags");
|
||||
}
|
||||
|
||||
// DEFAULT SECTOR BRIGHTNESS LEVELS
|
||||
sectorbrightness
|
||||
{
|
||||
include("SRB222_misc.cfg", "sectorbrightness");
|
||||
}
|
||||
|
||||
// SECTOR TYPES
|
||||
sectortypes
|
||||
{
|
||||
include("SRB222_sectors.cfg", "sectortypes");
|
||||
}
|
||||
|
||||
// SECTOR RENSERSTYLES
|
||||
/* sectorrenderstyles
|
||||
{
|
||||
include("SRB222_misc.cfg", "sectorrenderstyles");
|
||||
}*/
|
||||
|
||||
// LINEDEF FLAGS
|
||||
linedefflags
|
||||
{
|
||||
include("SRB222_misc.cfg", "linedefflags_udmf");
|
||||
}
|
||||
|
||||
// LINEDEF ACTIVATIONS
|
||||
linedefactivations
|
||||
{
|
||||
include("SRB222_misc.cfg", "linedefactivations_udmf");
|
||||
}
|
||||
|
||||
linedefflagstranslation
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// LINEDEF RENSERSTYLES
|
||||
linedefrenderstyles
|
||||
{
|
||||
include("SRB222_misc.cfg", "linedefrenderstyles");
|
||||
}
|
||||
|
||||
//SIDEDEF FLAGS
|
||||
/* sidedefflags
|
||||
{
|
||||
include("UDMF_misc.cfg", "sidedefflags");
|
||||
}*/
|
||||
|
||||
// THING FLAGS
|
||||
thingflags
|
||||
{
|
||||
include("SRB222_misc.cfg", "thingflags_udmf");
|
||||
}
|
||||
|
||||
// Thing flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
thingflagstranslation
|
||||
{
|
||||
include("SRB222_misc.cfg", "thingflagstranslation");
|
||||
}
|
||||
|
||||
// THING RENSERSTYLES
|
||||
/* thingrenderstyles
|
||||
{
|
||||
include("SRB222_misc.cfg", "thingrenderstyles");
|
||||
}*/
|
||||
|
||||
// How to compare thing flags (for the stuck things error checker)
|
||||
/* thingflagscompare
|
||||
{
|
||||
include("UDMF_misc.cfg", "thingflagscompare");
|
||||
}*/
|
||||
|
||||
//mxd. Thing flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
thingflagstranslation
|
||||
{
|
||||
}
|
||||
|
||||
// LINEDEF TYPES
|
||||
linedeftypes
|
||||
{
|
||||
include("SRB222_linedefs.cfg", "udmf");
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,726 +0,0 @@
|
|||
linedefflags
|
||||
{
|
||||
1 = "[0] Impassable";
|
||||
2 = "[1] Block Enemies";
|
||||
4 = "[2] Double-Sided";
|
||||
8 = "[3] Upper Unpegged";
|
||||
16 = "[4] Lower Unpegged";
|
||||
32 = "[5] Slope Skew (E1)";
|
||||
64 = "[6] Not Climbable";
|
||||
128 = "[7] No Midtexture Skew (E2)";
|
||||
256 = "[8] Peg Midtexture (E3)";
|
||||
512 = "[9] Solid Midtexture (E4)";
|
||||
1024 = "[10] Repeat Midtexture (E5)";
|
||||
2048 = "[11] Netgame Only";
|
||||
4096 = "[12] No Netgame";
|
||||
8192 = "[13] Effect 6";
|
||||
16384 = "[14] Bouncy Wall";
|
||||
32768 = "[15] Transfer Line";
|
||||
}
|
||||
|
||||
|
||||
// LINEDEF ACTIVATIONS
|
||||
// Make sure these are in order from lowest value to highest value
|
||||
linedefactivations
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Linedef flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
linedefflagstranslation
|
||||
{
|
||||
1 = "blocking";
|
||||
2 = "blockmonsters";
|
||||
4 = "twosided";
|
||||
8 = "dontpegtop";
|
||||
16 = "dontpegbottom";
|
||||
32 = "skewtd";
|
||||
64 = "noclimb";
|
||||
128 = "noskew";
|
||||
256 = "midpeg";
|
||||
512 = "midsolid";
|
||||
1024 = "wrapmidtex";
|
||||
2048 = "netonly";
|
||||
4096 = "nonet";
|
||||
8192 = "effect6";
|
||||
16384 = "bouncy";
|
||||
32768 = "transfer";
|
||||
}
|
||||
|
||||
|
||||
linedefflags_udmf
|
||||
{
|
||||
blocking = "Impassable";
|
||||
blockmonsters = "Block Enemies";
|
||||
twosided = "Double-Sided";
|
||||
dontpegtop = "Upper Unpegged";
|
||||
dontpegbottom = "Lower Unpegged";
|
||||
skewtd = "Slope Skew";
|
||||
noclimb = "Not Climbable";
|
||||
noskew = "No Midtexture Skew";
|
||||
midpeg = "Peg Midtexture";
|
||||
midsolid = "Solid Midtexture";
|
||||
wrapmidtex = "Repeat Midtexture";
|
||||
// netonly = "Netgame-Only special";
|
||||
// nonet = "No netgame special";
|
||||
// effect6 = "Effect 6";
|
||||
bouncy = "Bouncy Wall";
|
||||
// transfer = "Transfer Line";
|
||||
}
|
||||
|
||||
|
||||
linedefactivations_udmf
|
||||
{
|
||||
notriggerorder = "Out of Order";
|
||||
netonly = "Netgame-Only";
|
||||
nonet = "No netgame";
|
||||
}
|
||||
|
||||
sidedefflags
|
||||
{
|
||||
clipmidtex = "Clip middle texture";
|
||||
wrapmidtex = "Wrap middle texture";
|
||||
smoothlighting = "Smooth lighting";
|
||||
nofakecontrast = "Even lighting";
|
||||
nodecals = "No decals";
|
||||
lightfog = "Use sidedef brightness on fogged walls";
|
||||
}
|
||||
|
||||
//RENDER STYLES
|
||||
thingrenderstyles
|
||||
{
|
||||
}
|
||||
|
||||
linedefrenderstyles
|
||||
{
|
||||
translucent = "Translucent";
|
||||
fog = "Fog";
|
||||
}
|
||||
|
||||
sectorrenderstyles
|
||||
{
|
||||
}
|
||||
|
||||
thingflags
|
||||
{
|
||||
1 = "[1] Extra";
|
||||
2 = "[2] Flip";
|
||||
4 = "[4] Special";
|
||||
8 = "[8] Ambush";
|
||||
}
|
||||
|
||||
// THING FLAGS
|
||||
thingflags_udmf
|
||||
{
|
||||
extra = "Extra";
|
||||
flip = "Flip";
|
||||
special = "Special";
|
||||
ambush = "Ambush";
|
||||
}
|
||||
|
||||
|
||||
// Thing flags UDMF translation table
|
||||
// This is needed for copy/paste and prefabs to work properly
|
||||
// When the UDMF field name is prefixed with ! it is inverted
|
||||
thingflagstranslation
|
||||
{
|
||||
1 = "extra";
|
||||
2 = "flip";
|
||||
4 = "special";
|
||||
8 = "ambush";
|
||||
}
|
||||
|
||||
|
||||
// DEFAULT SECTOR BRIGHTNESS LEVELS
|
||||
sectorbrightness
|
||||
{
|
||||
255;
|
||||
248;
|
||||
240;
|
||||
232;
|
||||
224;
|
||||
216;
|
||||
208;
|
||||
200;
|
||||
192;
|
||||
184;
|
||||
176;
|
||||
168;
|
||||
160;
|
||||
152;
|
||||
144;
|
||||
136;
|
||||
128;
|
||||
120;
|
||||
112;
|
||||
104;
|
||||
96;
|
||||
88;
|
||||
80;
|
||||
72;
|
||||
64;
|
||||
56;
|
||||
48;
|
||||
40;
|
||||
32;
|
||||
24;
|
||||
16;
|
||||
8;
|
||||
0;
|
||||
}
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
and flats in the IWAD file, Addition WAD file and Map WAD file.
|
||||
|
||||
Start and end lumps must be given in a structure (of which the
|
||||
key name doesnt matter) and any textures or flats in between them
|
||||
are loaded in either the textures category or flats category.
|
||||
|
||||
For textures: PNAMES, TEXTURE1 and TEXTURE2 are loaded by default.
|
||||
*/
|
||||
textures
|
||||
{
|
||||
zdoom1
|
||||
{
|
||||
start = "TX_START";
|
||||
end = "TX_END";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
ADDITIONAL UNIVERSAL DOOM MAP FORMAT FIELD DEFINITIONS
|
||||
Only add fields here that Doom Builder does not edit with its own user-interface!
|
||||
The "default" field must match the UDMF specifications!
|
||||
|
||||
Field data types:
|
||||
0 = integer *
|
||||
1 = float
|
||||
2 = string
|
||||
3 = bool
|
||||
4 = linedef action (integer) *
|
||||
5 = sector effect (integer) *
|
||||
6 = texture (string)
|
||||
7 = flat (string)
|
||||
8 = angle in degrees (integer)
|
||||
9 = angle in radians (float)
|
||||
10 = XXRRGGBB color (integer)
|
||||
11 = enum option (integer) *
|
||||
12 = enum bits (integer) *
|
||||
13 = sector tag (integer) *
|
||||
14 = thing tag (integer) *
|
||||
15 = linedef tag (integer) *
|
||||
16 = enum option (string)
|
||||
17 = angle in degrees (float)
|
||||
22 = byte angle (integer)
|
||||
*/
|
||||
universalfields
|
||||
{
|
||||
sector
|
||||
{
|
||||
friction
|
||||
{
|
||||
name = "Friction";
|
||||
type = 1;
|
||||
default = 1;
|
||||
}
|
||||
|
||||
specialeffectplanes
|
||||
{
|
||||
type = 11;
|
||||
enum = "floorceiling";
|
||||
default = 0;
|
||||
}
|
||||
|
||||
colormapbegin
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
colormapend
|
||||
{
|
||||
type = 0;
|
||||
default = 33;
|
||||
}
|
||||
|
||||
foglighting
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
|
||||
teambase
|
||||
{
|
||||
type = 11;
|
||||
enum = "ctfteam";
|
||||
default = 0;
|
||||
}
|
||||
|
||||
triggersector
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
|
||||
triggerobject
|
||||
{
|
||||
type = 11;
|
||||
enum = "triggerobjects";
|
||||
default = 0;
|
||||
}
|
||||
|
||||
triggersurface
|
||||
{
|
||||
type = 11;
|
||||
enum = "triggersurfaces";
|
||||
default = 0;
|
||||
}
|
||||
|
||||
ringdrain
|
||||
{
|
||||
type = 1;
|
||||
default = 0;
|
||||
}
|
||||
}
|
||||
|
||||
linedef
|
||||
{
|
||||
executordelay
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
midtexrepetitions
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
arg5
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
arg1str
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
}
|
||||
|
||||
thing
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
MAP LUMP NAMES
|
||||
Map lumps are loaded with the map as long as they are right after each other. When the editor
|
||||
meets a lump which is not defined in this list it will ignore the map if not satisfied.
|
||||
The order of items defines the order in which lumps will be written to WAD file on save.
|
||||
To indicate the map header lump, use ~MAP
|
||||
|
||||
Legenda:
|
||||
required = Lump is required to exist.
|
||||
blindcopy = Lump will be copied along with the map blindly. (useful for lumps Doom Builder doesn't use)
|
||||
nodebuild = The nodebuilder generates this lump.
|
||||
allowempty = The nodebuilder is allowed to leave this lump empty.
|
||||
scriptbuild = This lump is a text-based script, which should be compiled using current script compiler;
|
||||
script = This lump is a text-based script. Specify the filename of the script configuration to use.
|
||||
*/
|
||||
|
||||
doommaplumpnames
|
||||
{
|
||||
~MAP
|
||||
{
|
||||
required = true;
|
||||
blindcopy = true;
|
||||
nodebuild = false;
|
||||
}
|
||||
|
||||
THINGS
|
||||
{
|
||||
required = true;
|
||||
nodebuild = true;
|
||||
allowempty = true;
|
||||
}
|
||||
|
||||
LINEDEFS
|
||||
{
|
||||
required = true;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
SIDEDEFS
|
||||
{
|
||||
required = true;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
VERTEXES
|
||||
{
|
||||
required = true;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
SEGS
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
SSECTORS
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
NODES
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
SECTORS
|
||||
{
|
||||
required = true;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
REJECT
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
BLOCKMAP
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = true;
|
||||
}
|
||||
}
|
||||
|
||||
udmfmaplumpnames
|
||||
{
|
||||
ZNODES
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
REJECT
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = false;
|
||||
}
|
||||
|
||||
BLOCKMAP
|
||||
{
|
||||
required = false;
|
||||
nodebuild = true;
|
||||
allowempty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ENUMERATIONS
|
||||
// These are enumerated lists for linedef types and UDMF fields.
|
||||
// Reserved names are: angledeg, anglerad, color, texture, flat
|
||||
enums
|
||||
{
|
||||
falsetrue
|
||||
{
|
||||
0 = "False";
|
||||
1 = "True";
|
||||
}
|
||||
|
||||
yesno
|
||||
{
|
||||
0 = "Yes";
|
||||
1 = "No";
|
||||
}
|
||||
|
||||
noyes
|
||||
{
|
||||
0 = "No";
|
||||
1 = "Yes";
|
||||
}
|
||||
|
||||
onoff
|
||||
{
|
||||
0 = "On";
|
||||
1 = "Off";
|
||||
}
|
||||
|
||||
offon
|
||||
{
|
||||
0 = "Off";
|
||||
1 = "On";
|
||||
}
|
||||
|
||||
updown
|
||||
{
|
||||
0 = "Up";
|
||||
1 = "Down";
|
||||
}
|
||||
|
||||
downup
|
||||
{
|
||||
0 = "Down";
|
||||
1 = "Up";
|
||||
}
|
||||
|
||||
addset
|
||||
{
|
||||
0 = "Add";
|
||||
1 = "Set";
|
||||
}
|
||||
|
||||
floorceiling
|
||||
{
|
||||
0 = "Floor";
|
||||
1 = "Ceiling";
|
||||
2 = "Floor and ceiling";
|
||||
}
|
||||
|
||||
triggertype
|
||||
{
|
||||
0 = "Continuous";
|
||||
1 = "Each Time (Enter)";
|
||||
2 = "Each Time (Enter and leave)";
|
||||
3 = "Once";
|
||||
}
|
||||
|
||||
frontback
|
||||
{
|
||||
0 = "None";
|
||||
1 = "Front";
|
||||
2 = "Back";
|
||||
}
|
||||
|
||||
ctfteam
|
||||
{
|
||||
0 = "None";
|
||||
1 = "Red";
|
||||
2 = "Blue";
|
||||
}
|
||||
|
||||
triggerobjects
|
||||
{
|
||||
0 = "Any player";
|
||||
1 = "All players";
|
||||
2 = "Pushable object";
|
||||
3 = "Any object with thinker";
|
||||
}
|
||||
|
||||
triggersurfaces
|
||||
{
|
||||
0 = "Floor touch";
|
||||
1 = "Ceiling touch";
|
||||
2 = "Floor or ceiling touch";
|
||||
3 = "Anywhere in sector";
|
||||
}
|
||||
|
||||
tangibility
|
||||
{
|
||||
1 = "Intangible from top";
|
||||
2 = "Intangible from bottom";
|
||||
4 = "Don't block players";
|
||||
8 = "Don't block non-players";
|
||||
}
|
||||
}
|
||||
|
||||
//Default things filters
|
||||
thingsfilters
|
||||
{
|
||||
|
||||
filter0
|
||||
{
|
||||
name = "Player starts";
|
||||
category = "starts";
|
||||
type = -1;
|
||||
}
|
||||
|
||||
|
||||
filter1
|
||||
{
|
||||
name = "Enemies";
|
||||
category = "enemies";
|
||||
type = -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
filter2
|
||||
{
|
||||
name = "NiGHTS Track";
|
||||
category = "nightstrk";
|
||||
type = -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
filter3
|
||||
{
|
||||
name = "Normal Gravity";
|
||||
category = "";
|
||||
type = -1;
|
||||
|
||||
fields
|
||||
{
|
||||
2 = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
filter4
|
||||
{
|
||||
name = "Reverse Gravity";
|
||||
category = "";
|
||||
type = -1;
|
||||
|
||||
fields
|
||||
{
|
||||
2 = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
thingsfilters_udmf
|
||||
{
|
||||
}
|
||||
|
||||
// Special linedefs
|
||||
speciallinedefs
|
||||
{
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
doublesidedflag = 4; // See linedefflags
|
||||
impassableflag = 1;
|
||||
upperunpeggedflag = 8;
|
||||
lowerunpeggedflag = 16;
|
||||
repeatmidtextureflag = 1024;
|
||||
pegmidtextureflag = 256;
|
||||
}
|
||||
|
||||
speciallinedefs_udmf
|
||||
{
|
||||
soundlinedefflag = "noclimb";
|
||||
singlesidedflag = "blocking";
|
||||
doublesidedflag = "twosided";
|
||||
impassableflag = "blocking";
|
||||
upperunpeggedflag = "dontpegtop";
|
||||
lowerunpeggedflag = "dontpegbottom";
|
||||
repeatmidtextureflag = "wrapmidtex";
|
||||
pegmidtextureflag = "midpeg";
|
||||
}
|
||||
|
||||
scriptlumpnames
|
||||
{
|
||||
MAINCFG
|
||||
{
|
||||
script = "SOC.cfg";
|
||||
}
|
||||
|
||||
OBJCTCFG
|
||||
{
|
||||
script = "SOC.cfg";
|
||||
}
|
||||
|
||||
SOC_
|
||||
{
|
||||
script = "SOC.cfg";
|
||||
isprefix = true;
|
||||
}
|
||||
|
||||
LUA_
|
||||
{
|
||||
script = "Lua.cfg";
|
||||
isprefix = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Texture sources
|
||||
textures
|
||||
{
|
||||
zdoom1
|
||||
{
|
||||
start = "TX_START";
|
||||
end = "TX_END";
|
||||
}
|
||||
}
|
||||
|
||||
// Patch sources
|
||||
patches
|
||||
{
|
||||
standard1
|
||||
{
|
||||
start = "P_START";
|
||||
end = "P_END";
|
||||
}
|
||||
|
||||
standard2
|
||||
{
|
||||
start = "PP_START";
|
||||
end = "PP_END";
|
||||
}
|
||||
}
|
||||
|
||||
// Sprite sources
|
||||
sprites
|
||||
{
|
||||
standard1
|
||||
{
|
||||
start = "S_START";
|
||||
end = "S_END";
|
||||
}
|
||||
|
||||
standard2
|
||||
{
|
||||
start = "SS_START";
|
||||
end = "SS_END";
|
||||
}
|
||||
}
|
||||
|
||||
// Flat sources
|
||||
flats
|
||||
{
|
||||
standard1
|
||||
{
|
||||
start = "F_START";
|
||||
end = "F_END";
|
||||
}
|
||||
|
||||
standard2
|
||||
{
|
||||
start = "FF_START";
|
||||
end = "FF_END";
|
||||
}
|
||||
|
||||
standard3
|
||||
{
|
||||
start = "FF_START";
|
||||
end = "F_END";
|
||||
}
|
||||
|
||||
standard4
|
||||
{
|
||||
start = "F_START";
|
||||
end = "FF_END";
|
||||
}
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
sectortypes
|
||||
{
|
||||
0 = "Normal";
|
||||
1 = "Damage";
|
||||
2 = "Damage (Water)";
|
||||
3 = "Damage (Fire)";
|
||||
4 = "Damage (Electrical)";
|
||||
5 = "Spikes";
|
||||
6 = "Death Pit (Camera Tilt)";
|
||||
7 = "Death Pit (No Camera Tilt)";
|
||||
8 = "Instant Kill";
|
||||
9 = "Ring Drainer (Floor Touch)";
|
||||
10 = "Ring Drainer (Anywhere in Sector)";
|
||||
11 = "Special Stage Damage";
|
||||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF";
|
||||
16 = "Trigger Line Ex. (Pushable Objects)";
|
||||
32 = "Trigger Line Ex. (Anywhere, All Players)";
|
||||
48 = "Trigger Line Ex. (Floor Touch, All Players)";
|
||||
64 = "Trigger Line Ex. (Anywhere in Sector)";
|
||||
80 = "Trigger Line Ex. (Floor Touch)";
|
||||
96 = "Trigger Line Ex. (Emerald Check)";
|
||||
112 = "Trigger Line Ex. (NiGHTS Mare)";
|
||||
128 = "Check for Linedef Executor on FOFs";
|
||||
144 = "Egg Capsule";
|
||||
160 = "Special Stage Time/Rings Parameters";
|
||||
176 = "Custom Global Gravity";
|
||||
512 = "Wind/Current";
|
||||
1024 = "Conveyor Belt";
|
||||
1280 = "Speed Pad";
|
||||
4096 = "Star Post Activator";
|
||||
8192 = "Exit/Special Stage Pit/Return Flag";
|
||||
12288 = "CTF Red Team Base";
|
||||
16384 = "CTF Blue Team Base";
|
||||
20480 = "Fan Sector";
|
||||
24576 = "Super Sonic Transform";
|
||||
28672 = "Force Spin";
|
||||
32768 = "Zoom Tube Start";
|
||||
36864 = "Zoom Tube End";
|
||||
40960 = "Circuit Finish Line";
|
||||
45056 = "Rope Hang";
|
||||
49152 = "Intangible to the Camera";
|
||||
}
|
||||
|
||||
gen_sectortypes
|
||||
{
|
||||
first
|
||||
{
|
||||
0 = "Normal";
|
||||
1 = "Damage";
|
||||
2 = "Damage (Water)";
|
||||
3 = "Damage (Fire)";
|
||||
4 = "Damage (Electrical)";
|
||||
5 = "Spikes";
|
||||
6 = "Death Pit (Camera Tilt)";
|
||||
7 = "Death Pit (No Camera Tilt)";
|
||||
8 = "Instant Kill";
|
||||
9 = "Ring Drainer (Floor Touch)";
|
||||
10 = "Ring Drainer (Anywhere in Sector)";
|
||||
11 = "Special Stage Damage";
|
||||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF";
|
||||
}
|
||||
|
||||
second
|
||||
{
|
||||
0 = "Normal";
|
||||
16 = "Trigger Line Ex. (Pushable Objects)";
|
||||
32 = "Trigger Line Ex. (Anywhere, All Players)";
|
||||
48 = "Trigger Line Ex. (Floor Touch, All Players)";
|
||||
64 = "Trigger Line Ex. (Anywhere in Sector)";
|
||||
80 = "Trigger Line Ex. (Floor Touch)";
|
||||
96 = "Trigger Line Ex. (Emerald Check)";
|
||||
112 = "Trigger Line Ex. (NiGHTS Mare)";
|
||||
128 = "Check for Linedef Executor on FOFs";
|
||||
144 = "Egg Capsule";
|
||||
160 = "Special Stage Time/Rings Parameters";
|
||||
176 = "Custom Global Gravity";
|
||||
}
|
||||
|
||||
third
|
||||
{
|
||||
0 = "Normal";
|
||||
512 = "Wind/Current";
|
||||
1024 = "Conveyor Belt";
|
||||
1280 = "Speed Pad";
|
||||
}
|
||||
|
||||
fourth
|
||||
{
|
||||
0 = "Normal";
|
||||
4096 = "Star Post Activator";
|
||||
8192 = "Exit/Special Stage Pit/Return Flag";
|
||||
12288 = "CTF Red Team Base";
|
||||
16384 = "CTF Blue Team Base";
|
||||
20480 = "Fan Sector";
|
||||
24576 = "Super Sonic Transform";
|
||||
28672 = "Force Spin";
|
||||
32768 = "Zoom Tube Start";
|
||||
36864 = "Zoom Tube End";
|
||||
40960 = "Circuit Finish Line";
|
||||
45056 = "Rope Hang";
|
||||
49152 = "Intangible to the Camera";
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -435,7 +435,7 @@ sectortypes
|
|||
112 = "Trigger Line Ex. (NiGHTS Mare)";
|
||||
128 = "Check for Linedef Executor on FOFs";
|
||||
144 = "Egg Capsule";
|
||||
160 = "Special Stage Time/Rings Parameters";
|
||||
160 = "Special Stage Time/Spheres Parameters";
|
||||
176 = "Custom Global Gravity";
|
||||
512 = "Wind/Current";
|
||||
1024 = "Conveyor Belt";
|
||||
|
@ -490,7 +490,7 @@ gen_sectortypes
|
|||
112 = "Trigger Line Ex. (NiGHTS Mare)";
|
||||
128 = "Check for Linedef Executor on FOFs";
|
||||
144 = "Egg Capsule";
|
||||
160 = "Special Stage Time/Rings Parameters";
|
||||
160 = "Special Stage Time/Spheres Parameters";
|
||||
176 = "Custom Global Gravity";
|
||||
}
|
||||
|
||||
|
@ -766,6 +766,7 @@ linedeftypes
|
|||
{
|
||||
title = "Parameters";
|
||||
prefix = "(22)";
|
||||
flags32text = "[5] Render outer sides only";
|
||||
flags64text = "[6] Trigger linedef executor";
|
||||
flags128text = "[7] Intangible";
|
||||
flags256text = "[8] Stopped by pushables";
|
||||
|
@ -788,7 +789,6 @@ linedeftypes
|
|||
{
|
||||
title = "Angular Displacement by Front Sector";
|
||||
prefix = "(32)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags64text = "[6] Don't turn players";
|
||||
flags512text = "[9] Turn all objects";
|
||||
}
|
||||
|
@ -1136,7 +1136,6 @@ linedeftypes
|
|||
{
|
||||
title = "Goo Water, Translucent, No Sides";
|
||||
prefix = "(125)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags64text = "[6] Use two light levels";
|
||||
flags512text = "[9] Use target light level";
|
||||
flags1024text = "[10] Ripple effect";
|
||||
|
@ -1227,6 +1226,18 @@ linedeftypes
|
|||
3dfloorflags = "19F";
|
||||
}
|
||||
|
||||
153
|
||||
{
|
||||
title = "Dynamically Sinking Platform";
|
||||
prefix = "(153)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
flags64text = "[6] Spindash to move";
|
||||
flags128text = "[7] Only block non-players";
|
||||
3dfloor = true;
|
||||
3dfloorflags = "19F";
|
||||
}
|
||||
|
||||
160
|
||||
{
|
||||
title = "Floating, Bobbing";
|
||||
|
@ -1282,7 +1293,6 @@ linedeftypes
|
|||
title = "Rising Platform, Solid, Invisible";
|
||||
prefix = "(193)";
|
||||
flags2text = "[1] Sink when stepped on";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
flags64text = "[6] Spindash to move";
|
||||
flags128text = "[7] Only block non-players";
|
||||
|
@ -1488,16 +1498,22 @@ linedeftypes
|
|||
{
|
||||
title = "Mario Block";
|
||||
prefix = "(250)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Invisible block";
|
||||
flags64text = "[6] Brick block";
|
||||
3dfloor = true;
|
||||
3dfloorflags = "40019F";
|
||||
flags323dfloorflagsremove = "19E";
|
||||
flags643dfloorflagsadd = "200000";
|
||||
}
|
||||
|
||||
251
|
||||
{
|
||||
title = "Thwomp Block";
|
||||
prefix = "(251)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
flags128text = "[7] Only block non-players";
|
||||
flags512text = "[9] Custom crushing sound";
|
||||
flags1024text = "[10] Custom speed";
|
||||
3dfloor = true;
|
||||
|
@ -1513,8 +1529,8 @@ linedeftypes
|
|||
flags512text = "[9] Shattered by pushables";
|
||||
flags1024text = "[10] Trigger linedef executor";
|
||||
3dfloor = true;
|
||||
3dfloorflags = "8800019";
|
||||
flags643dfloorflagsadd = "200006";
|
||||
3dfloorflags = "880001D";
|
||||
flags643dfloorflagsadd = "200002";
|
||||
}
|
||||
|
||||
253
|
||||
|
@ -1525,7 +1541,7 @@ linedeftypes
|
|||
flags512text = "[9] Shattered by pushables";
|
||||
flags1024text = "[10] Trigger linedef executor";
|
||||
3dfloor = true;
|
||||
3dfloorflags = "8801019";
|
||||
3dfloorflags = "880101D";
|
||||
}
|
||||
|
||||
254
|
||||
|
@ -1533,6 +1549,7 @@ linedeftypes
|
|||
title = "Bustable Block";
|
||||
prefix = "(254)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
flags64text = "[6] Strong characters only";
|
||||
flags128text = "[7] Only block non-players";
|
||||
flags512text = "[9] Shattered by pushables";
|
||||
|
@ -1593,6 +1610,7 @@ linedeftypes
|
|||
{
|
||||
title = "Custom FOF";
|
||||
prefix = "(259)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
flags128text = "[7] Only block non-players";
|
||||
flags512text = "[9] Shattered by pushables";
|
||||
|
@ -2161,6 +2179,14 @@ linedeftypes
|
|||
flags8text = "[3] Set delay by backside sector";
|
||||
}
|
||||
|
||||
449
|
||||
{
|
||||
title = "Enable Bosses with Parameter";
|
||||
prefix = "(449)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags64text = "[6] Disable bosses";
|
||||
}
|
||||
|
||||
457
|
||||
{
|
||||
title = "Track Object's Angle";
|
||||
|
@ -2180,12 +2206,14 @@ linedeftypes
|
|||
{
|
||||
title = "Award Rings";
|
||||
prefix = "(460)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
}
|
||||
|
||||
461
|
||||
{
|
||||
title = "Spawn Object";
|
||||
prefix = "(461)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags64text = "[6] Spawn inside a range";
|
||||
}
|
||||
|
||||
|
@ -2193,6 +2221,7 @@ linedeftypes
|
|||
{
|
||||
title = "Stop Timer/Exit Stage in Record Attack";
|
||||
prefix = "(462)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2206,7 +2235,7 @@ linedeftypes
|
|||
prefix = "(413)";
|
||||
flags2text = "[1] Keep after death";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags32text = "[5] Seek to current song position";
|
||||
flags32text = "[5] Seek from current position";
|
||||
flags64text = "[6] For everyone";
|
||||
flags128text = "[7] Fade to custom volume";
|
||||
flags512text = "[9] Don't loop";
|
||||
|
@ -2220,7 +2249,7 @@ linedeftypes
|
|||
flags2text = "[1] From calling sector";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags64text = "[6] From nowhere for triggerer";
|
||||
flags512text = "[9] For everyone";
|
||||
flags512text = "[9] From nowhere for everyone";
|
||||
flags1024text = "[10] From tagged sectors";
|
||||
}
|
||||
|
||||
|
@ -2298,7 +2327,6 @@ linedeftypes
|
|||
flags8text = "[3] Set delay by backside sector";
|
||||
}
|
||||
|
||||
|
||||
445
|
||||
{
|
||||
title = "Make FOF Disappear/Reappear";
|
||||
|
@ -2325,8 +2353,8 @@ linedeftypes
|
|||
flags32text = "[5] Subtract Red value";
|
||||
flags64text = "[6] Subtract Green value";
|
||||
flags128text = "[7] Subtract Blue value";
|
||||
flags256text = "[8] Calc relative values";
|
||||
flags32768text = "[15] Use back side colormap";
|
||||
flags256text = "[8] Set relative to current";
|
||||
flags32768text = "[15] Use backside colormap";
|
||||
}
|
||||
|
||||
448
|
||||
|
@ -2359,7 +2387,7 @@ linedeftypes
|
|||
prefix = "(452)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags64text = "[6] Do not handle FF_TRANS";
|
||||
flags256text = "[8] Set relative to current val";
|
||||
flags256text = "[8] Set relative to current";
|
||||
}
|
||||
|
||||
453
|
||||
|
@ -2371,7 +2399,7 @@ linedeftypes
|
|||
flags32text = "[5] No collision during fade";
|
||||
flags64text = "[6] Do not handle FF_TRANS";
|
||||
flags128text = "[7] Do not handle lighting";
|
||||
flags256text = "[8] Set relative to current val";
|
||||
flags256text = "[8] Set relative to current";
|
||||
flags512text = "[9] Speed = Tic Duration";
|
||||
flags1024text = "[10] Override existing fade";
|
||||
flags16384text = "[14] Do not handle collision";
|
||||
|
@ -2395,11 +2423,11 @@ linedeftypes
|
|||
flags32text = "[5] Subtract Red value";
|
||||
flags64text = "[6] Subtract Green value";
|
||||
flags128text = "[7] Subtract Blue value";
|
||||
flags256text = "[8] Calc relative values";
|
||||
flags256text = "[8] Set relative to current";
|
||||
flags512text = "[9] Speed = Tic Duration";
|
||||
flags1024text = "[10] Override existing fade";
|
||||
flags16384text = "[14] Fade from invisible black";
|
||||
flags32768text = "[15] Use back side colormap";
|
||||
flags32768text = "[15] Use backside colormap";
|
||||
}
|
||||
|
||||
456
|
||||
|
@ -2416,9 +2444,7 @@ linedeftypes
|
|||
flags2text = "[1] Close text prompt";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags32text = "[5] Run executor tag on close";
|
||||
flags64text = "[6] For everyone";
|
||||
flags128text = "[7] Do not block controls";
|
||||
flags256text = "[8] Do not freeze time";
|
||||
flags128text = "[7] Don't disable controls";
|
||||
flags32768text = "[15] Find prompt by name";
|
||||
}
|
||||
}
|
||||
|
@ -2524,7 +2550,7 @@ linedeftypes
|
|||
prefix = "(491)";
|
||||
flags8text = "[3] Set delay by backside sector";
|
||||
flags16text = "[4] Set raw alpha by Front X";
|
||||
flags256text = "[8] Calc relative values";
|
||||
flags256text = "[8] Set relative to current";
|
||||
}
|
||||
|
||||
492
|
||||
|
@ -2534,7 +2560,7 @@ linedeftypes
|
|||
flags8text = "[3] Set delay by backside sector";
|
||||
flags16text = "[4] Set raw alpha by Front X";
|
||||
flags32text = "[5] No collision during fade";
|
||||
flags256text = "[8] Calc relative values";
|
||||
flags256text = "[8] Set relative to current";
|
||||
flags512text = "[9] Speed = Tic Duration";
|
||||
flags1024text = "[10] Override existing fade";
|
||||
flags16384text = "[14] Do not handle collision";
|
||||
|
@ -2632,76 +2658,84 @@ linedeftypes
|
|||
{
|
||||
title = "Carry Objects on Floor";
|
||||
prefix = "(520)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
521
|
||||
{
|
||||
title = "Carry Objects on Floor (Accelerative)";
|
||||
prefix = "(521)";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
522
|
||||
{
|
||||
title = "Carry Objects on Floor (Displacement)";
|
||||
prefix = "(522)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
523
|
||||
{
|
||||
title = "Carry Objects on Ceiling";
|
||||
prefix = "(523)";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
524
|
||||
{
|
||||
title = "Carry Objects on Ceiling (Accelerative)";
|
||||
prefix = "(524)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
525
|
||||
{
|
||||
title = "Carry Objects on Ceiling (Displacement)";
|
||||
prefix = "(525)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
530
|
||||
{
|
||||
title = "Scroll Floor Texture and Carry Objects";
|
||||
prefix = "(530)";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
531
|
||||
{
|
||||
title = "Scroll Floor Texture and Carry Objects (Accelerative)";
|
||||
prefix = "(531)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
532
|
||||
{
|
||||
title = "Scroll Floor Texture and Carry Objects (Displacement)";
|
||||
prefix = "(532)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
533
|
||||
{
|
||||
title = "Scroll Ceiling Texture and Carry Objects";
|
||||
prefix = "(533)";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
534
|
||||
{
|
||||
title = "Scroll Ceiling Texture and Carry Objects (Accelerative)";
|
||||
prefix = "(534)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
535
|
||||
{
|
||||
title = "Scroll Ceiling Texture and Carry Objects (Displacement)";
|
||||
prefix = "(535)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2714,7 +2748,7 @@ linedeftypes
|
|||
title = "Wind";
|
||||
prefix = "(541)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
542
|
||||
|
@ -2722,7 +2756,7 @@ linedeftypes
|
|||
title = "Upwards Wind";
|
||||
prefix = "(542)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
543
|
||||
|
@ -2730,7 +2764,7 @@ linedeftypes
|
|||
title = "Downwards Wind";
|
||||
prefix = "(543)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
544
|
||||
|
@ -2738,7 +2772,7 @@ linedeftypes
|
|||
title = "Current";
|
||||
prefix = "(544)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
545
|
||||
|
@ -2746,7 +2780,7 @@ linedeftypes
|
|||
title = "Upwards Current";
|
||||
prefix = "(545)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
546
|
||||
|
@ -2754,13 +2788,14 @@ linedeftypes
|
|||
title = "Downwards Current";
|
||||
prefix = "(546)";
|
||||
flags512text = "[9] Player slides";
|
||||
flags64text = "[6] Even across edges";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
|
||||
547
|
||||
{
|
||||
title = "Push/Pull";
|
||||
prefix = "(547)";
|
||||
flags64text = "[6] Exclusive";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3407,8 +3442,8 @@ thingtypes
|
|||
sprite = "ESHIA1";
|
||||
width = 16;
|
||||
height = 48;
|
||||
flags1text = "[1] 90 degrees counter-clockwise";
|
||||
flags4text = "[4] 90 degrees clockwise";
|
||||
flags1text = "[1] 90 degrees clockwise";
|
||||
flags4text = "[4] 90 degrees counter-clockwise";
|
||||
flags8text = "[8] Double speed";
|
||||
}
|
||||
115
|
||||
|
@ -3897,9 +3932,10 @@ thingtypes
|
|||
title = "Monitors";
|
||||
width = 18;
|
||||
height = 40;
|
||||
flags1text = "[1] Run Linedef Executor on pop";
|
||||
flags1text = "[1] Run linedef executor on pop";
|
||||
flags4text = "[4] Random (Strong)";
|
||||
flags8text = "[8] Random (Weak)";
|
||||
angletext = "Tag";
|
||||
|
||||
400
|
||||
{
|
||||
|
@ -4029,7 +4065,8 @@ thingtypes
|
|||
title = "Monitors (Respawning)";
|
||||
width = 20;
|
||||
height = 44;
|
||||
flags1text = "[1] Run Linedef Executor on pop";
|
||||
flags1text = "[1] Run linedef executor on pop";
|
||||
angletext = "Tag";
|
||||
|
||||
431
|
||||
{
|
||||
|
@ -4125,7 +4162,9 @@ thingtypes
|
|||
sprite = "STPTA0M0";
|
||||
width = 64;
|
||||
height = 128;
|
||||
flags4text = "[4] Respawn at center";
|
||||
angletext = "Angle/Order";
|
||||
parametertext = "Order";
|
||||
}
|
||||
520
|
||||
{
|
||||
|
@ -4152,6 +4191,7 @@ thingtypes
|
|||
sprite = "WSPKALAR";
|
||||
width = 16;
|
||||
height = 14;
|
||||
arrow = 1;
|
||||
flags1text = "[1] Start retracted";
|
||||
flags4text = "[4] Retractable";
|
||||
flags8text = "[8] Intangible";
|
||||
|
@ -4558,6 +4598,7 @@ thingtypes
|
|||
sprite = "TOADA0";
|
||||
width = 32;
|
||||
height = 16;
|
||||
angletext = "Tag";
|
||||
}
|
||||
757
|
||||
{
|
||||
|
@ -5832,7 +5873,7 @@ thingtypes
|
|||
sprite = "CAPSA0";
|
||||
width = 72;
|
||||
height = 144;
|
||||
angletext = "Rings";
|
||||
angletext = "Spheres";
|
||||
parametertext = "Mare";
|
||||
}
|
||||
}
|
||||
|
@ -6273,7 +6314,7 @@ thingtypes
|
|||
sprite = "PUMKA0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
flags1text = "Don't flicker";
|
||||
flags1text = "[1] Don't flicker";
|
||||
}
|
||||
2007
|
||||
{
|
||||
|
@ -6281,7 +6322,7 @@ thingtypes
|
|||
sprite = "PUMKB0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
flags1text = "Don't flicker";
|
||||
flags1text = "[1] Don't flicker";
|
||||
}
|
||||
2008
|
||||
{
|
||||
|
@ -6289,7 +6330,7 @@ thingtypes
|
|||
sprite = "PUMKC0";
|
||||
width = 16;
|
||||
height = 40;
|
||||
flags1text = "Don't flicker";
|
||||
flags1text = "[1] Don't flicker";
|
||||
}
|
||||
2009
|
||||
{
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/************************************************************************\
|
||||
Zone Builder Game Configuration for Sonic Robo Blast 2 Version 2.2
|
||||
\************************************************************************/
|
||||
|
||||
// This is required to prevent accidental use of a different configuration
|
||||
type = "Doom Builder 2 Game Configuration";
|
||||
|
||||
// This is the title to show for this game
|
||||
game = "Sonic Robo Blast 2 - 2.2 (Doom format)";
|
||||
|
||||
// This is the simplified game engine/sourceport name
|
||||
engine = "zdoom";
|
||||
|
||||
// Settings common to all games and all map formats
|
||||
include("Includes\\SRB222_common.cfg", "common");
|
||||
|
||||
// Settings common to Doom map format
|
||||
include("Includes\\SRB222_common.cfg", "mapformat_doom");
|
||||
|
||||
include("Includes\\Game_SRB222.cfg");
|
||||
|
||||
// Script lumps detection
|
||||
scriptlumpnames
|
||||
{
|
||||
include("Includes\\SRB222_misc.cfg", "scriptlumpnames");
|
||||
}
|
||||
|
||||
// THING TYPES
|
||||
thingtypes
|
||||
{
|
||||
include("Includes\\SRB222_things.cfg");
|
||||
}
|
||||
|
||||
//Default things filters
|
||||
thingsfilters
|
||||
{
|
||||
include("Includes\\SRB222_misc.cfg", "thingsfilters");
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/************************************************************************\
|
||||
Zone Builder Game Configuration for Sonic Robo Blast 2 Version 2.2
|
||||
\************************************************************************/
|
||||
|
||||
// This is required to prevent accidental use of a different configuration
|
||||
type = "Doom Builder 2 Game Configuration";
|
||||
|
||||
// This is the title to show for this game
|
||||
game = "Sonic Robo Blast 2 - 2.2 (UDMF)";
|
||||
|
||||
// This is the simplified game engine/sourceport name
|
||||
engine = "zdoom";
|
||||
|
||||
// Settings common to all games and all map formats
|
||||
include("Includes\\SRB222_common.cfg", "common");
|
||||
|
||||
// Settings common to Doom map format
|
||||
include("Includes\\SRB222_common.cfg", "mapformat_udmf");
|
||||
|
||||
include("Includes\\Game_SRB222.cfg");
|
||||
|
||||
// Script lumps detection
|
||||
scriptlumpnames
|
||||
{
|
||||
include("Includes\\SRB222_misc.cfg", "scriptlumpnames");
|
||||
}
|
||||
|
||||
// THING TYPES
|
||||
thingtypes
|
||||
{
|
||||
include("Includes\\SRB222_things.cfg");
|
||||
}
|
||||
|
||||
//Default things filters
|
||||
thingsfilters
|
||||
{
|
||||
include("Includes\\SRB222_misc.cfg", "thingsfilters");
|
||||
}
|
||||
|
||||
// ENUMERATIONS
|
||||
// Each engine has its own additional thing types
|
||||
// These are enumerated lists for linedef types and UDMF fields.
|
||||
enums
|
||||
{
|
||||
// Basic game enums
|
||||
include("Includes\\SRB222_misc.cfg", "enums");
|
||||
}
|
|
@ -19,10 +19,10 @@ boolean allow_fullscreen = false;
|
|||
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
void I_StartupGraphics(void){}
|
||||
void I_StartupHardwareGraphics(void){}
|
||||
|
||||
void I_ShutdownGraphics(void){}
|
||||
|
||||
void VID_StartupOpenGL(void){}
|
||||
|
||||
void I_SetPalette(RGBA_t *palette)
|
||||
{
|
||||
(void)palette;
|
||||
|
@ -52,10 +52,8 @@ INT32 VID_SetMode(INT32 modenum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void VID_CheckRenderer(void)
|
||||
{
|
||||
// ..............
|
||||
}
|
||||
void VID_CheckRenderer(void) {}
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||
|
||||
const char *VID_GetModeName(INT32 modenum)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ static boolean joyaxis2_default = false;
|
|||
static INT32 joyaxis_count = 0;
|
||||
static INT32 joyaxis2_count = 0;
|
||||
|
||||
#define COM_BUF_SIZE 8192 // command buffer size
|
||||
#define COM_BUF_SIZE (32<<10) // command buffer size
|
||||
#define MAX_ALIAS_RECURSION 100 // max recursion allowed for aliases
|
||||
|
||||
static INT32 com_wait; // one command per frame (for cmd sequences)
|
||||
|
|
|
@ -97,6 +97,7 @@ static void CON_InputInit(void);
|
|||
static void CON_RecalcSize(void);
|
||||
static void CON_ChangeHeight(void);
|
||||
|
||||
static void CON_DrawBackpic(void);
|
||||
static void CONS_hudlines_Change(void);
|
||||
static void CONS_backcolor_Change(void);
|
||||
|
||||
|
@ -1530,6 +1531,51 @@ static void CON_DrawHudlines(void)
|
|||
con_clearlines = y; // this is handled by HU_Erase();
|
||||
}
|
||||
|
||||
// Lactozilla: Draws the console's background picture.
|
||||
static void CON_DrawBackpic(void)
|
||||
{
|
||||
patch_t *con_backpic;
|
||||
lumpnum_t piclump;
|
||||
int x, w, h;
|
||||
|
||||
// Get the lumpnum for CONSBACK, or fallback into MISSING.
|
||||
piclump = W_CheckNumForName("CONSBACK");
|
||||
if (piclump == LUMPERROR)
|
||||
piclump = W_GetNumForName("MISSING");
|
||||
|
||||
// Cache the Software patch.
|
||||
con_backpic = W_CacheSoftwarePatchNum(piclump, PU_PATCH);
|
||||
|
||||
// Center the backpic, and draw a vertically cropped patch.
|
||||
w = (con_backpic->width * vid.dupx);
|
||||
x = (vid.width / 2) - (w / 2);
|
||||
h = con_curlines/vid.dupy;
|
||||
|
||||
// If the patch doesn't fill the entire screen,
|
||||
// then fill the sides with a solid color.
|
||||
if (x > 0)
|
||||
{
|
||||
column_t *column = (column_t *)((UINT8 *)(con_backpic) + LONG(con_backpic->columnofs[0]));
|
||||
if (!column->topdelta)
|
||||
{
|
||||
UINT8 *source = (UINT8 *)(column) + 3;
|
||||
INT32 color = (source[0] | V_NOSCALESTART);
|
||||
// left side
|
||||
V_DrawFill(0, 0, x, con_curlines, color);
|
||||
// right side
|
||||
V_DrawFill((x + w), 0, (vid.width - w), con_curlines, color);
|
||||
}
|
||||
}
|
||||
|
||||
// Cache the patch normally.
|
||||
con_backpic = W_CachePatchNum(piclump, PU_PATCH);
|
||||
V_DrawCroppedPatch(x << FRACBITS, 0, FRACUNIT, V_NOSCALESTART, con_backpic,
|
||||
0, ( BASEVIDHEIGHT - h ), BASEVIDWIDTH, h);
|
||||
|
||||
// Unlock the cached patch.
|
||||
W_UnlockCachedPatch(con_backpic);
|
||||
}
|
||||
|
||||
// draw the console background, text, and prompt if enough place
|
||||
//
|
||||
static void CON_DrawConsole(void)
|
||||
|
@ -1551,19 +1597,7 @@ static void CON_DrawConsole(void)
|
|||
|
||||
// draw console background
|
||||
if (cons_backpic.value || con_forcepic)
|
||||
{
|
||||
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_PATCH);
|
||||
int h;
|
||||
|
||||
h = con_curlines/vid.dupy;
|
||||
|
||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
||||
//V_DrawScaledPatch(0, 0, 0, con_backpic);
|
||||
V_DrawCroppedPatch(0, 0, FRACUNIT, 0, con_backpic,
|
||||
0, ( BASEVIDHEIGHT - h ), BASEVIDWIDTH, h);
|
||||
|
||||
W_UnlockCachedPatch(con_backpic);
|
||||
}
|
||||
CON_DrawBackpic();
|
||||
else
|
||||
{
|
||||
// inu: no more width (was always 0 and vid.width)
|
||||
|
|
|
@ -4855,7 +4855,8 @@ static inline void PingUpdate(void)
|
|||
{
|
||||
for (i = 1; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && (realpingtable[i] / pingmeasurecount > (unsigned)cv_maxping.value))
|
||||
if (playeringame[i] && !players[i].quittime
|
||||
&& (realpingtable[i] / pingmeasurecount > (unsigned)cv_maxping.value))
|
||||
{
|
||||
if (players[i].jointime > 30 * TICRATE)
|
||||
laggers[i] = true;
|
||||
|
@ -4874,8 +4875,8 @@ static inline void PingUpdate(void)
|
|||
if (playeringame[i] && laggers[i])
|
||||
{
|
||||
pingtimeout[i]++;
|
||||
// ok your net has been bad for too long, you deserve to die.
|
||||
if (pingtimeout[i] > cv_pingtimeout.value)
|
||||
// ok your net has been bad for too long, you deserve to die.
|
||||
{
|
||||
pingtimeout[i] = 0;
|
||||
SendKick(i, KICK_MSG_PING_HIGH | KICK_MSG_KEEP_BODY);
|
||||
|
|
15
src/d_main.c
15
src/d_main.c
|
@ -1173,6 +1173,12 @@ void D_SRB2Main(void)
|
|||
if (M_CheckParm("-password") && M_IsNextParm())
|
||||
D_SetPassword(M_GetNextParm());
|
||||
|
||||
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n");
|
||||
Z_Init();
|
||||
|
||||
// Do this up here so that WADs loaded through the command line can use ExecCfg
|
||||
COM_Init();
|
||||
|
||||
// add any files specified on the command line with -file wadfile
|
||||
// to the wad list
|
||||
if (!((M_GetUrlProtocolArg() || M_CheckParm("-connect")) && !M_CheckParm("-server")))
|
||||
|
@ -1200,9 +1206,6 @@ void D_SRB2Main(void)
|
|||
if (M_CheckParm("-server") || dedicated)
|
||||
netgame = server = true;
|
||||
|
||||
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n");
|
||||
Z_Init();
|
||||
|
||||
// adapt tables to SRB2's needs, including extra slots for dehacked file support
|
||||
P_PatchInfoTables();
|
||||
|
||||
|
@ -1274,7 +1277,6 @@ void D_SRB2Main(void)
|
|||
CONS_Printf("HU_Init(): Setting up heads up display.\n");
|
||||
HU_Init();
|
||||
|
||||
COM_Init();
|
||||
CON_Init();
|
||||
|
||||
D_RegisterServerCommands();
|
||||
|
@ -1308,11 +1310,10 @@ void D_SRB2Main(void)
|
|||
|
||||
// Set cv_renderer to the new render mode
|
||||
VID_CheckRenderer();
|
||||
SCR_ChangeRendererCVars(setrenderneeded);
|
||||
SCR_ChangeRendererCVars(rendermode);
|
||||
|
||||
// check the renderer's state, and then clear setrenderneeded
|
||||
// check the renderer's state
|
||||
D_CheckRendererState();
|
||||
setrenderneeded = 0;
|
||||
}
|
||||
|
||||
wipegamestate = gamestate;
|
||||
|
|
|
@ -3890,7 +3890,26 @@ static void readmaincfg(MYFILE *f)
|
|||
value = atoi(word2); // used for numerical settings
|
||||
|
||||
if (fastcmp(word, "EXECCFG"))
|
||||
COM_BufAddText(va("exec %s\n", word2));
|
||||
{
|
||||
if (strchr(word2, '.'))
|
||||
COM_BufAddText(va("exec %s\n", word2));
|
||||
else
|
||||
{
|
||||
lumpnum_t lumpnum;
|
||||
char newname[9];
|
||||
|
||||
strncpy(newname, word2, 8);
|
||||
|
||||
newname[8] = '\0';
|
||||
|
||||
lumpnum = W_CheckNumForName(newname);
|
||||
|
||||
if (lumpnum == LUMPERROR || W_LumpLength(lumpnum) == 0)
|
||||
CONS_Debug(DBG_SETUP, "SOC Error: script lump %s not found/not valid.\n", newname);
|
||||
else
|
||||
COM_BufInsertText(W_CacheLumpNum(lumpnum, PU_CACHE));
|
||||
}
|
||||
}
|
||||
|
||||
else if (fastcmp(word, "SPSTAGE_START"))
|
||||
{
|
||||
|
@ -7478,7 +7497,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
|
||||
// Got Flag Sign
|
||||
"S_GOTFLAG",
|
||||
|
||||
|
||||
// Finish flag
|
||||
"S_FINISHFLAG",
|
||||
|
||||
|
|
|
@ -339,7 +339,4 @@ void I_StartupGraphics(void)
|
|||
|
||||
}
|
||||
|
||||
void I_StartupHardwareGraphics(void)
|
||||
{
|
||||
// oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo y
|
||||
}
|
||||
void VID_StartupOpenGL(void) {}
|
||||
|
|
|
@ -378,10 +378,8 @@ INT32 VID_SetMode (INT32 modenum) //, UINT8 *palette)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void VID_CheckRenderer(void)
|
||||
{
|
||||
// ..............
|
||||
}
|
||||
void VID_CheckRenderer(void) {}
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ boolean allow_fullscreen = false;
|
|||
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
void I_StartupGraphics(void){}
|
||||
void I_StartupHardwareGraphics(void){}
|
||||
|
||||
void I_ShutdownGraphics(void){}
|
||||
|
||||
void VID_StartupOpenGL(void){}
|
||||
|
||||
void I_SetPalette(RGBA_t *palette)
|
||||
{
|
||||
(void)palette;
|
||||
|
@ -40,10 +40,8 @@ INT32 VID_SetMode(INT32 modenum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void VID_CheckRenderer(void)
|
||||
{
|
||||
// ..............
|
||||
}
|
||||
void VID_CheckRenderer(void) {}
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||
|
||||
const char *VID_GetModeName(INT32 modenum)
|
||||
{
|
||||
|
|
|
@ -291,7 +291,7 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
|||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||
{
|
||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
patch_t *realpatch = W_CacheSoftwarePatchNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
||||
if (!column->topdelta)
|
||||
{
|
||||
|
@ -450,7 +450,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||
{
|
||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
patch_t *realpatch = W_CacheSoftwarePatchNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
||||
if (!column->topdelta)
|
||||
{
|
||||
|
|
|
@ -469,7 +469,7 @@ static UINT8 HWR_FogBlockAlpha(INT32 light, UINT32 color) // Let's see if this c
|
|||
// -----------------+
|
||||
// HWR_RenderPlane : Render a floor or ceiling convex polygon
|
||||
// -----------------+
|
||||
static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight,
|
||||
static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight,
|
||||
FBITFIELD PolyFlags, INT32 lightlevel, levelflat_t *levelflat, sector_t *FOFsector, UINT8 alpha, boolean fogplane, extracolormap_t *planecolormap)
|
||||
{
|
||||
polyvertex_t * pv;
|
||||
|
@ -493,8 +493,6 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
|||
static FOutVector *planeVerts = NULL;
|
||||
static UINT16 numAllocedPlaneVerts = 0;
|
||||
|
||||
(void)sector; ///@TODO remove shitty unused variable
|
||||
|
||||
// no convex poly were generated for this subsector
|
||||
if (!xsub->planepoly)
|
||||
return;
|
||||
|
@ -593,8 +591,6 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
|||
flatyref = (float)(((fixed_t)pv->y & (~flatflag)) / fflatheight);
|
||||
|
||||
// transform
|
||||
v3d = planeVerts;
|
||||
|
||||
if (FOFsector != NULL)
|
||||
{
|
||||
if (!isceiling) // it's a floor
|
||||
|
@ -637,46 +633,43 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
|||
flatyref = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle))));
|
||||
}
|
||||
|
||||
for (i = 0; i < nrPlaneVerts; i++,v3d++,pv++)
|
||||
{
|
||||
// Hurdler: add scrolling texture on floor/ceiling
|
||||
if (texflat)
|
||||
{
|
||||
v3d->sow = (float)(pv->x / fflatwidth) + scrollx;
|
||||
v3d->tow = -(float)(pv->y / fflatheight) + scrolly;
|
||||
}
|
||||
else
|
||||
{
|
||||
v3d->sow = (float)((pv->x / fflatwidth) - flatxref + scrollx);
|
||||
v3d->tow = (float)(flatyref - (pv->y / fflatheight) + scrolly);
|
||||
}
|
||||
#define SETUP3DVERT(vert, vx, vy) {\
|
||||
/* Hurdler: add scrolling texture on floor/ceiling */\
|
||||
if (texflat)\
|
||||
{\
|
||||
vert->sow = (float)((vx) / fflatwidth) + scrollx;\
|
||||
vert->tow = -(float)((vy) / fflatheight) + scrolly;\
|
||||
}\
|
||||
else\
|
||||
{\
|
||||
vert->sow = (float)(((vx) / fflatwidth) - flatxref + scrollx);\
|
||||
vert->tow = (float)(flatyref - ((vy) / fflatheight) + scrolly);\
|
||||
}\
|
||||
\
|
||||
/* Need to rotate before translate */\
|
||||
if (angle) /* Only needs to be done if there's an altered angle */\
|
||||
{\
|
||||
tempxsow = FLOAT_TO_FIXED(vert->sow);\
|
||||
tempytow = FLOAT_TO_FIXED(vert->tow);\
|
||||
if (texflat)\
|
||||
tempytow = -tempytow;\
|
||||
vert->sow = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINECOSINE(angle)) - FixedMul(tempytow, FINESINE(angle))));\
|
||||
vert->tow = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle))));\
|
||||
}\
|
||||
\
|
||||
vert->x = (vx);\
|
||||
vert->y = height;\
|
||||
vert->z = (vy);\
|
||||
\
|
||||
if (slope)\
|
||||
{\
|
||||
fixedheight = P_GetZAt(slope, FLOAT_TO_FIXED((vx)), FLOAT_TO_FIXED((vy)));\
|
||||
vert->y = FIXED_TO_FLOAT(fixedheight);\
|
||||
}\
|
||||
}
|
||||
|
||||
// Need to rotate before translate
|
||||
if (angle) // Only needs to be done if there's an altered angle
|
||||
{
|
||||
tempxsow = FLOAT_TO_FIXED(v3d->sow);
|
||||
tempytow = FLOAT_TO_FIXED(v3d->tow);
|
||||
if (texflat)
|
||||
tempytow = -tempytow;
|
||||
v3d->sow = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINECOSINE(angle)) - FixedMul(tempytow, FINESINE(angle))));
|
||||
v3d->tow = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle))));
|
||||
}
|
||||
|
||||
//v3d->sow = (float)(v3d->sow - flatxref + scrollx);
|
||||
//v3d->tow = (float)(flatyref - v3d->tow + scrolly);
|
||||
|
||||
v3d->x = pv->x;
|
||||
v3d->y = height;
|
||||
v3d->z = pv->y;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (slope)
|
||||
{
|
||||
fixedheight = P_GetZAt(slope, FLOAT_TO_FIXED(pv->x), FLOAT_TO_FIXED(pv->y));
|
||||
v3d->y = FIXED_TO_FLOAT(fixedheight);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
for (i = 0, v3d = planeVerts; i < nrPlaneVerts; i++,v3d++,pv++)
|
||||
SETUP3DVERT(v3d, pv->x, pv->y);
|
||||
|
||||
// only useful for flat coloured triangles
|
||||
//Surf.FlatColor = 0xff804020;
|
||||
|
@ -687,38 +680,6 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
|||
Surf.FlatColor.s.red = Surf.FlatColor.s.green =
|
||||
Surf.FlatColor.s.blue = LightLevelToLum(lightlevel); // Don't take from the frontsector, or the game will crash
|
||||
|
||||
#if 0 // no colormap test
|
||||
// colormap test
|
||||
if (gr_frontsector)
|
||||
{
|
||||
sector_t *psector = gr_frontsector;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (slope)
|
||||
fixedheight = P_GetZAt(slope, psector->soundorg.x, psector->soundorg.y);
|
||||
#endif
|
||||
|
||||
if (psector->ffloors)
|
||||
{
|
||||
ffloor_t *caster = psector->lightlist[R_GetPlaneLight(psector, fixedheight, false)].caster;
|
||||
psector = caster ? §ors[caster->secnum] : psector;
|
||||
|
||||
if (caster)
|
||||
{
|
||||
lightlevel = psector->lightlevel;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = LightLevelToLum(lightlevel);
|
||||
}
|
||||
}
|
||||
if (psector->extra_colormap)
|
||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel,psector->extra_colormap->rgba,psector->extra_colormap->fadergba, false, true);
|
||||
else
|
||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel,NORMALFOG,FADEFOG, false, true);
|
||||
}
|
||||
else
|
||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel,NORMALFOG,FADEFOG, false, true);
|
||||
|
||||
#endif // NOPE
|
||||
|
||||
if (planecolormap)
|
||||
{
|
||||
if (fogplane)
|
||||
|
@ -744,6 +705,79 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
|||
|
||||
HWD.pfnDrawPolygon(&Surf, planeVerts, nrPlaneVerts, PolyFlags);
|
||||
|
||||
if (subsector)
|
||||
{
|
||||
// Horizon lines
|
||||
FOutVector horizonpts[6];
|
||||
float dist, vx, vy;
|
||||
float x1, y1, xd, yd;
|
||||
UINT8 numplanes, j;
|
||||
vertex_t v; // For determining the closest distance from the line to the camera, to split render planes for minimum distortion;
|
||||
|
||||
const float renderdist = 27000.0f; // How far out to properly render the plane
|
||||
const float farrenderdist = 32768.0f; // From here, raise plane to horizon level to fill in the line with some texture distortion
|
||||
|
||||
seg_t *line = &segs[subsector->firstline];
|
||||
|
||||
for (i = 0; i < subsector->numlines; i++, line++)
|
||||
{
|
||||
if (!line->glseg && line->linedef->special == HORIZONSPECIAL && R_PointOnSegSide(dup_viewx, dup_viewy, line) == 0)
|
||||
{
|
||||
P_ClosestPointOnLine(viewx, viewy, line->linedef, &v);
|
||||
dist = FIXED_TO_FLOAT(R_PointToDist(v.x, v.y));
|
||||
|
||||
x1 = ((polyvertex_t *)line->pv1)->x;
|
||||
y1 = ((polyvertex_t *)line->pv1)->y;
|
||||
xd = ((polyvertex_t *)line->pv2)->x - x1;
|
||||
yd = ((polyvertex_t *)line->pv2)->y - y1;
|
||||
|
||||
// Based on the seg length and the distance from the line, split horizon into multiple poly sets to reduce distortion
|
||||
dist = sqrtf((xd*xd) + (yd*yd)) / dist / 16.0f;
|
||||
if (dist > 100.0f)
|
||||
numplanes = 100;
|
||||
else
|
||||
numplanes = (UINT8)dist + 1;
|
||||
|
||||
for (j = 0; j < numplanes; j++)
|
||||
{
|
||||
// Left side
|
||||
vx = x1 + xd * j / numplanes;
|
||||
vy = y1 + yd * j / numplanes;
|
||||
SETUP3DVERT((&horizonpts[1]), vx, vy);
|
||||
|
||||
dist = sqrtf(powf(vx - gr_viewx, 2) + powf(vy - gr_viewy, 2));
|
||||
vx = (vx - gr_viewx) * renderdist / dist + gr_viewx;
|
||||
vy = (vy - gr_viewy) * renderdist / dist + gr_viewy;
|
||||
SETUP3DVERT((&horizonpts[0]), vx, vy);
|
||||
|
||||
// Right side
|
||||
vx = x1 + xd * (j+1) / numplanes;
|
||||
vy = y1 + yd * (j+1) / numplanes;
|
||||
SETUP3DVERT((&horizonpts[2]), vx, vy);
|
||||
|
||||
dist = sqrtf(powf(vx - gr_viewx, 2) + powf(vy - gr_viewy, 2));
|
||||
vx = (vx - gr_viewx) * renderdist / dist + gr_viewx;
|
||||
vy = (vy - gr_viewy) * renderdist / dist + gr_viewy;
|
||||
SETUP3DVERT((&horizonpts[3]), vx, vy);
|
||||
|
||||
// Horizon fills
|
||||
vx = (horizonpts[0].x - gr_viewx) * farrenderdist / renderdist + gr_viewx;
|
||||
vy = (horizonpts[0].z - gr_viewy) * farrenderdist / renderdist + gr_viewy;
|
||||
SETUP3DVERT((&horizonpts[5]), vx, vy);
|
||||
horizonpts[5].y = gr_viewz;
|
||||
|
||||
vx = (horizonpts[3].x - gr_viewx) * farrenderdist / renderdist + gr_viewx;
|
||||
vy = (horizonpts[3].z - gr_viewy) * farrenderdist / renderdist + gr_viewy;
|
||||
SETUP3DVERT((&horizonpts[4]), vx, vy);
|
||||
horizonpts[4].y = gr_viewz;
|
||||
|
||||
// Draw
|
||||
HWD.pfnDrawPolygon(&Surf, horizonpts, 6, PolyFlags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
// add here code for dynamic lighting on planes
|
||||
HWR_PlaneLighting(planeVerts, nrPlaneVerts);
|
||||
|
@ -3561,7 +3595,7 @@ static void HWR_Subsector(size_t num)
|
|||
if (sub->validcount != validcount)
|
||||
{
|
||||
HWR_GetLevelFlat(&levelflats[gr_frontsector->floorpic]);
|
||||
HWR_RenderPlane(gr_frontsector, &extrasubsectors[num], false,
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], false,
|
||||
// Hack to make things continue to work around slopes.
|
||||
locFloorHeight == cullFloorHeight ? locFloorHeight : gr_frontsector->floorheight,
|
||||
// We now return you to your regularly scheduled rendering.
|
||||
|
@ -3583,7 +3617,7 @@ static void HWR_Subsector(size_t num)
|
|||
if (sub->validcount != validcount)
|
||||
{
|
||||
HWR_GetLevelFlat(&levelflats[gr_frontsector->ceilingpic]);
|
||||
HWR_RenderPlane(NULL, &extrasubsectors[num], true,
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], true,
|
||||
// Hack to make things continue to work around slopes.
|
||||
locCeilingHeight == cullCeilingHeight ? locCeilingHeight : gr_frontsector->ceilingheight,
|
||||
// We now return you to your regularly scheduled rendering.
|
||||
|
@ -3677,7 +3711,7 @@ static void HWR_Subsector(size_t num)
|
|||
{
|
||||
HWR_GetLevelFlat(&levelflats[*rover->bottompic]);
|
||||
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
HWR_RenderPlane(NULL, &extrasubsectors[num], false, *rover->bottomheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, &levelflats[*rover->bottompic],
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], false, *rover->bottomheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, &levelflats[*rover->bottompic],
|
||||
rover->master->frontsector, 255, false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
}
|
||||
|
@ -3741,7 +3775,7 @@ static void HWR_Subsector(size_t num)
|
|||
{
|
||||
HWR_GetLevelFlat(&levelflats[*rover->toppic]);
|
||||
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
HWR_RenderPlane(NULL, &extrasubsectors[num], true, *rover->topheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, &levelflats[*rover->toppic],
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], true, *rover->topheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, &levelflats[*rover->toppic],
|
||||
rover->master->frontsector, 255, false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
}
|
||||
|
@ -4186,7 +4220,10 @@ static void HWR_DrawDropShadow(mobj_t *thing, gr_vissprite_t *spr, fixed_t scale
|
|||
{
|
||||
light = R_GetPlaneLight(thing->subsector->sector, floorz, false); // Always use the light at the top instead of whatever I was doing before
|
||||
|
||||
lightlevel = *thing->subsector->sector->lightlist[light].lightlevel;
|
||||
if (*thing->subsector->sector->lightlist[light].lightlevel > 255)
|
||||
lightlevel = 255;
|
||||
else
|
||||
lightlevel = *thing->subsector->sector->lightlist[light].lightlevel;
|
||||
|
||||
if (*thing->subsector->sector->lightlist[light].extra_colormap)
|
||||
colormap = *thing->subsector->sector->lightlist[light].extra_colormap;
|
||||
|
@ -4392,7 +4429,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
if (h <= temp)
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i-1].lightlevel;
|
||||
lightlevel = *list[i-1].lightlevel > 255 ? 255 : *list[i-1].lightlevel;
|
||||
colormap = *list[i-1].extra_colormap;
|
||||
break;
|
||||
}
|
||||
|
@ -4400,7 +4437,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
#else
|
||||
i = R_GetPlaneLight(sector, temp, false);
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
lightlevel = *list[i].lightlevel > 255 ? 255 : *list[i].lightlevel;
|
||||
colormap = *list[i].extra_colormap;
|
||||
#endif
|
||||
|
||||
|
@ -4416,7 +4453,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
lightlevel = *list[i].lightlevel > 255 ? 255 : *list[i].lightlevel;
|
||||
colormap = *list[i].extra_colormap;
|
||||
}
|
||||
|
||||
|
@ -4693,7 +4730,7 @@ static void HWR_DrawSprite(gr_vissprite_t *spr)
|
|||
extracolormap_t *colormap = sector->extra_colormap;
|
||||
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = sector->lightlevel;
|
||||
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||
|
||||
if (colormap)
|
||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false);
|
||||
|
@ -4790,7 +4827,7 @@ static inline void HWR_DrawPrecipitationSprite(gr_vissprite_t *spr)
|
|||
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
||||
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *sector->lightlist[light].lightlevel;
|
||||
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
colormap = *sector->lightlist[light].extra_colormap;
|
||||
|
@ -4798,7 +4835,7 @@ static inline void HWR_DrawPrecipitationSprite(gr_vissprite_t *spr)
|
|||
else
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = sector->lightlevel;
|
||||
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||
|
||||
if (sector->extra_colormap)
|
||||
colormap = sector->extra_colormap;
|
||||
|
@ -6619,7 +6656,6 @@ void HWR_Shutdown(void)
|
|||
CONS_Printf("HWR_Shutdown()\n");
|
||||
HWR_FreeExtraSubsectors();
|
||||
HWR_FreePolyPool();
|
||||
HWR_FreeMipmapCache();
|
||||
HWR_FreeTextureCache();
|
||||
HWD.pfnFlushScreenTextures();
|
||||
}
|
||||
|
|
|
@ -1221,7 +1221,7 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
||||
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *sector->lightlist[light].lightlevel;
|
||||
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
colormap = *sector->lightlist[light].extra_colormap;
|
||||
|
@ -1229,7 +1229,7 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
else
|
||||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = sector->lightlevel;
|
||||
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||
|
||||
if (sector->extra_colormap)
|
||||
colormap = sector->extra_colormap;
|
||||
|
@ -1478,7 +1478,7 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
|
||||
// rotation pivot
|
||||
p.centerx = FIXED_TO_FLOAT(spr->mobj->radius/2);
|
||||
p.centery = FIXED_TO_FLOAT(spr->mobj->height/2);
|
||||
p.centery = FIXED_TO_FLOAT(spr->mobj->height/(flip ? -2 : 2));
|
||||
|
||||
// rotation axis
|
||||
if (sprinfo->available)
|
||||
|
@ -1490,6 +1490,9 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
p.rollflip = 1;
|
||||
else if ((sprframe->rotate & SRF_LEFT) && (ang >= ANGLE_180)) // See from left
|
||||
p.rollflip = -1;
|
||||
|
||||
if (flip)
|
||||
p.rollflip *= -1;
|
||||
}
|
||||
|
||||
p.anglex = 0.0f;
|
||||
|
|
|
@ -36,10 +36,10 @@ typedef enum
|
|||
*/
|
||||
extern rendermode_t rendermode;
|
||||
|
||||
/** \brief hardware renderer loaded
|
||||
/** \brief OpenGL state
|
||||
0 = never loaded, 1 = loaded successfully, -1 = failed loading
|
||||
*/
|
||||
extern INT32 hwrenderloaded;
|
||||
extern INT32 vid_opengl_state;
|
||||
|
||||
/** \brief use highcolor modes if true
|
||||
*/
|
||||
|
@ -49,11 +49,7 @@ extern boolean highcolor;
|
|||
*/
|
||||
void I_StartupGraphics(void);
|
||||
|
||||
/** \brief setup hardware mode
|
||||
*/
|
||||
void I_StartupHardwareGraphics(void);
|
||||
|
||||
/** \brief restore old video mode
|
||||
/** \brief shutdown video mode
|
||||
*/
|
||||
void I_ShutdownGraphics(void);
|
||||
|
||||
|
@ -97,6 +93,14 @@ INT32 VID_SetMode(INT32 modenum);
|
|||
*/
|
||||
void VID_CheckRenderer(void);
|
||||
|
||||
/** \brief Load OpenGL mode
|
||||
*/
|
||||
void VID_StartupOpenGL(void);
|
||||
|
||||
/** \brief Checks if OpenGL loaded
|
||||
*/
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender);
|
||||
|
||||
/** \brief The VID_GetModeName function
|
||||
|
||||
\param modenum video mode number
|
||||
|
|
|
@ -38,8 +38,20 @@ typedef INT32 fixed_t;
|
|||
/*!
|
||||
\brief convert fixed_t into floating number
|
||||
*/
|
||||
#define FIXED_TO_FLOAT(x) (((float)(x)) / ((float)FRACUNIT))
|
||||
#define FLOAT_TO_FIXED(f) (fixed_t)((f) * ((float)FRACUNIT))
|
||||
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE float FixedToFloat(fixed_t x)
|
||||
{
|
||||
return x / (float)FRACUNIT;
|
||||
}
|
||||
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f)
|
||||
{
|
||||
return (fixed_t)(f * FRACUNIT);
|
||||
}
|
||||
|
||||
// for backwards compat
|
||||
#define FIXED_TO_FLOAT(x) FixedToFloat(x) // (((float)(x)) / ((float)FRACUNIT))
|
||||
#define FLOAT_TO_FIXED(f) FloatToFixed(f) // (fixed_t)((f) * ((float)FRACUNIT))
|
||||
|
||||
|
||||
#if defined (__WATCOMC__) && FRACBITS == 16
|
||||
|
|
54
src/m_menu.c
54
src/m_menu.c
|
@ -522,6 +522,8 @@ static menuitem_t MISC_AddonsMenu[] =
|
|||
// ---------------------------------
|
||||
static menuitem_t MAPauseMenu[] =
|
||||
{
|
||||
{IT_CALL | IT_STRING, NULL, "Emblem Hints...", M_EmblemHints, 32},
|
||||
|
||||
{IT_CALL | IT_STRING, NULL, "Continue", M_SelectableClearMenus,48},
|
||||
{IT_CALL | IT_STRING, NULL, "Retry", M_ModeAttackRetry, 56},
|
||||
{IT_CALL | IT_STRING, NULL, "Abort", M_ModeAttackEndGame, 64},
|
||||
|
@ -529,6 +531,7 @@ static menuitem_t MAPauseMenu[] =
|
|||
|
||||
typedef enum
|
||||
{
|
||||
mapause_hints,
|
||||
mapause_continue,
|
||||
mapause_retry,
|
||||
mapause_abort
|
||||
|
@ -730,9 +733,9 @@ static menuitem_t SR_SoundTestMenu[] =
|
|||
|
||||
static menuitem_t SR_EmblemHintMenu[] =
|
||||
{
|
||||
{IT_STRING | IT_ARROWS, NULL, "Page", M_HandleEmblemHints, 10},
|
||||
{IT_STRING|IT_CVAR, NULL, "Emblem Radar", &cv_itemfinder, 20},
|
||||
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SPauseDef, 30}
|
||||
{IT_STRING | IT_ARROWS, NULL, "Page", M_HandleEmblemHints, 10},
|
||||
{IT_STRING|IT_CVAR, NULL, "Emblem Radar", &cv_itemfinder, 20},
|
||||
{IT_WHITESTRING|IT_CALL, NULL, "Back", M_GoBack, 30}
|
||||
};
|
||||
|
||||
// --------------------------------
|
||||
|
@ -2098,7 +2101,7 @@ static void M_VideoOptions(INT32 choice)
|
|||
{
|
||||
(void)choice;
|
||||
#ifdef HWRENDER
|
||||
if (hwrenderloaded == -1)
|
||||
if (vid_opengl_state == -1)
|
||||
{
|
||||
OP_VideoOptionsMenu[op_video_renderer].status = (IT_TRANSTEXT | IT_PAIR);
|
||||
OP_VideoOptionsMenu[op_video_renderer].patch = "Renderer";
|
||||
|
@ -3634,6 +3637,7 @@ void M_StartControlPanel(void)
|
|||
else if (modeattacking)
|
||||
{
|
||||
currentMenu = &MAPauseDef;
|
||||
MAPauseMenu[mapause_hints].status = (M_SecretUnlocked(SECRET_EMBLEMHINTS)) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
|
||||
itemOn = mapause_continue;
|
||||
}
|
||||
else if (!(netgame || multiplayer)) // Single Player
|
||||
|
@ -5074,6 +5078,17 @@ static boolean M_SetNextMapOnPlatter(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static boolean M_GametypeHasLevels(INT32 gt)
|
||||
{
|
||||
INT32 mapnum;
|
||||
|
||||
for (mapnum = 0; mapnum < NUMMAPS; mapnum++)
|
||||
if (M_CanShowLevelOnPlatter(mapnum, gt))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static INT32 M_CountRowsToShowOnPlatter(INT32 gt)
|
||||
{
|
||||
INT32 mapnum = 0, prevmapnum = 0, col = 0, rows = 0;
|
||||
|
@ -5391,7 +5406,10 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
case KEY_RIGHTARROW:
|
||||
if (levellistmode == LLM_CREATESERVER && !lsrow)
|
||||
{
|
||||
CV_AddValue(&cv_newgametype, 1);
|
||||
INT32 startinggametype = cv_newgametype.value;
|
||||
do
|
||||
CV_AddValue(&cv_newgametype, 1);
|
||||
while (cv_newgametype.value != startinggametype && !M_GametypeHasLevels(cv_newgametype.value));
|
||||
S_StartSound(NULL,sfx_menu1);
|
||||
lscol = 0;
|
||||
|
||||
|
@ -5420,7 +5438,10 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
case KEY_LEFTARROW:
|
||||
if (levellistmode == LLM_CREATESERVER && !lsrow)
|
||||
{
|
||||
CV_AddValue(&cv_newgametype, -1);
|
||||
INT32 startinggametype = cv_newgametype.value;
|
||||
do
|
||||
CV_AddValue(&cv_newgametype, -1);
|
||||
while (cv_newgametype.value != startinggametype && !M_GametypeHasLevels(cv_newgametype.value));
|
||||
S_StartSound(NULL,sfx_menu1);
|
||||
lscol = 0;
|
||||
|
||||
|
@ -7293,6 +7314,7 @@ static void M_EmblemHints(INT32 choice)
|
|||
SR_EmblemHintMenu[0].status = (local > NUMHINTS*2) ? (IT_STRING | IT_ARROWS) : (IT_DISABLED);
|
||||
SR_EmblemHintMenu[1].status = (M_SecretUnlocked(SECRET_ITEMFINDER)) ? (IT_CVAR|IT_STRING) : (IT_SECRET);
|
||||
hintpage = 1;
|
||||
SR_EmblemHintDef.prevMenu = currentMenu;
|
||||
M_SetupNextMenu(&SR_EmblemHintDef);
|
||||
itemOn = 2; // always start on back.
|
||||
}
|
||||
|
@ -7973,12 +7995,20 @@ static void M_CustomLevelSelect(INT32 choice)
|
|||
static void M_SinglePlayerMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
SP_MainMenu[sptutorial].status =
|
||||
tutorialmap ? IT_CALL|IT_STRING : IT_NOTHING|IT_DISABLED;
|
||||
SP_MainMenu[sprecordattack].status =
|
||||
(M_SecretUnlocked(SECRET_RECORDATTACK)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||
SP_MainMenu[spnightsmode].status =
|
||||
(M_SecretUnlocked(SECRET_NIGHTSMODE)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||
|
||||
levellistmode = LLM_RECORDATTACK;
|
||||
if (M_GametypeHasLevels(-1))
|
||||
SP_MainMenu[sprecordattack].status = (M_SecretUnlocked(SECRET_RECORDATTACK)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||
else
|
||||
SP_MainMenu[sprecordattack].status = IT_NOTHING|IT_DISABLED;
|
||||
|
||||
levellistmode = LLM_NIGHTSATTACK;
|
||||
if (M_GametypeHasLevels(-1))
|
||||
SP_MainMenu[spnightsmode].status = (M_SecretUnlocked(SECRET_NIGHTSMODE)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||
else
|
||||
SP_MainMenu[spnightsmode].status = IT_NOTHING|IT_DISABLED;
|
||||
|
||||
SP_MainMenu[sptutorial].status = tutorialmap ? IT_CALL|IT_STRING : IT_NOTHING|IT_DISABLED;
|
||||
|
||||
M_SetupNextMenu(&SP_MainDef);
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ void SCR_ActuallyChangeRenderer(void)
|
|||
|
||||
#ifdef HWRENDER
|
||||
// Well, it didn't even load anyway.
|
||||
if ((hwrenderloaded == -1) && (setrenderneeded == render_opengl))
|
||||
if ((vid_opengl_state == -1) && (setrenderneeded == render_opengl))
|
||||
{
|
||||
if (M_CheckParm("-nogl"))
|
||||
CONS_Alert(CONS_ERROR, "OpenGL rendering was disabled!\n");
|
||||
|
@ -478,7 +478,7 @@ void SCR_ChangeRenderer(void)
|
|||
{
|
||||
target_renderer = cv_renderer.value;
|
||||
#ifdef HWRENDER
|
||||
if (M_CheckParm("-opengl") && (hwrenderloaded == 1))
|
||||
if (M_CheckParm("-opengl") && (vid_opengl_state == 1))
|
||||
target_renderer = rendermode = render_opengl;
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,7 @@ static consvar_t cv_stretch = {"stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff
|
|||
static consvar_t cv_alwaysgrabmouse = {"alwaysgrabmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
||||
INT32 hwrenderloaded = 0;
|
||||
INT32 vid_opengl_state = 0;
|
||||
|
||||
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
||||
boolean allow_fullscreen = false;
|
||||
|
@ -1440,7 +1440,7 @@ static SDL_bool Impl_CreateContext(void)
|
|||
{
|
||||
// Renderer-specific stuff
|
||||
#ifdef HWRENDER
|
||||
if ((rendermode == render_opengl) && (hwrenderloaded != -1))
|
||||
if ((rendermode == render_opengl) && (vid_opengl_state != -1))
|
||||
{
|
||||
if (!sdlglcontext)
|
||||
sdlglcontext = SDL_GL_CreateContext(window);
|
||||
|
@ -1473,10 +1473,10 @@ static SDL_bool Impl_CreateContext(void)
|
|||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
static void VID_CheckGLLoaded(rendermode_t oldrender)
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender)
|
||||
{
|
||||
if (hwrenderloaded == -1) // Well, it didn't work the first time anyway.
|
||||
#ifdef HWRENDER
|
||||
if (vid_opengl_state == -1) // Well, it didn't work the first time anyway.
|
||||
{
|
||||
rendermode = oldrender;
|
||||
if (chosenrendermode == render_opengl) // fallback to software
|
||||
|
@ -1488,40 +1488,66 @@ static void VID_CheckGLLoaded(rendermode_t oldrender)
|
|||
setrenderneeded = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void VID_CheckRenderer(void)
|
||||
{
|
||||
SDL_bool rendererchanged = SDL_FALSE;
|
||||
boolean rendererchanged = false;
|
||||
boolean contextcreated = false;
|
||||
rendermode_t oldrenderer = rendermode;
|
||||
|
||||
if (dedicated)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (!graphics_started)
|
||||
VID_CheckGLLoaded(oldrenderer);
|
||||
#endif
|
||||
|
||||
if (setrenderneeded)
|
||||
{
|
||||
rendermode = setrenderneeded;
|
||||
rendererchanged = SDL_TRUE;
|
||||
rendererchanged = true;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
VID_CheckGLLoaded(oldrenderer);
|
||||
|
||||
// Initialise OpenGL before calling SDLSetMode!!!
|
||||
if (hwrenderloaded != 1)
|
||||
I_StartupHardwareGraphics();
|
||||
else if (hwrenderloaded == -1)
|
||||
rendererchanged = SDL_FALSE;
|
||||
// This is because SDLSetMode calls OglSdlSurface.
|
||||
if (vid_opengl_state == 0)
|
||||
{
|
||||
VID_StartupOpenGL();
|
||||
// Loaded successfully!
|
||||
if (vid_opengl_state == 1)
|
||||
{
|
||||
// Destroy the current window, if it exists.
|
||||
if (window)
|
||||
{
|
||||
SDL_DestroyWindow(window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
// Destroy the current window rendering context, if that also exists.
|
||||
if (renderer)
|
||||
{
|
||||
SDL_DestroyRenderer(renderer);
|
||||
renderer = NULL;
|
||||
}
|
||||
|
||||
// Create a new window.
|
||||
Impl_CreateWindow(USE_FULLSCREEN);
|
||||
|
||||
// From there, the OpenGL context was already created.
|
||||
contextcreated = true;
|
||||
}
|
||||
}
|
||||
else if (vid_opengl_state == -1)
|
||||
rendererchanged = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
Impl_CreateContext();
|
||||
if (!contextcreated)
|
||||
Impl_CreateContext();
|
||||
|
||||
setrenderneeded = 0;
|
||||
}
|
||||
|
||||
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (rendererchanged ? SDL_FALSE : SDL_TRUE));
|
||||
|
@ -1534,15 +1560,25 @@ void VID_CheckRenderer(void)
|
|||
SDL_FreeSurface(bufSurface);
|
||||
bufSurface = NULL;
|
||||
}
|
||||
|
||||
if (rendererchanged)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (hwrenderloaded == 1) // Only if OpenGL ever loaded!
|
||||
HWR_FreeTextureCache();
|
||||
if (vid_opengl_state == 1) // Only if OpenGL ever loaded!
|
||||
HWR_FreeTextureCache();
|
||||
#endif
|
||||
SCR_SetDrawFuncs();
|
||||
SCR_SetDrawFuncs();
|
||||
}
|
||||
}
|
||||
#ifdef HWRENDER
|
||||
else if (rendermode == render_opengl)
|
||||
R_InitHardwareMode();
|
||||
{
|
||||
if (rendererchanged)
|
||||
{
|
||||
R_InitHardwareMode();
|
||||
V_SetPalette(0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)oldrenderer;
|
||||
#endif
|
||||
|
@ -1586,7 +1622,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
|||
flags |= SDL_WINDOW_BORDERLESS;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (hwrenderloaded != -1)
|
||||
if (vid_opengl_state == 1)
|
||||
flags |= SDL_WINDOW_OPENGL;
|
||||
#endif
|
||||
|
||||
|
@ -1720,11 +1756,12 @@ void I_StartupGraphics(void)
|
|||
|
||||
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
|
||||
VID_Command_ModeList_f();
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (M_CheckParm("-nogl"))
|
||||
hwrenderloaded = -1; // Don't call SDL_GL_LoadLibrary
|
||||
else
|
||||
I_StartupHardwareGraphics();
|
||||
vid_opengl_state = -1; // Don't startup OpenGL
|
||||
else if (chosenrendermode == render_opengl)
|
||||
VID_StartupOpenGL();
|
||||
#endif
|
||||
|
||||
// Fury: we do window initialization after GL setup to allow
|
||||
|
@ -1779,12 +1816,13 @@ void I_StartupGraphics(void)
|
|||
graphics_started = true;
|
||||
}
|
||||
|
||||
void I_StartupHardwareGraphics(void)
|
||||
void VID_StartupOpenGL(void)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
static boolean glstartup = false;
|
||||
if (!glstartup)
|
||||
{
|
||||
CONS_Printf("VID_StartupOpenGL()...\n");
|
||||
HWD.pfnInit = hwSym("Init",NULL);
|
||||
HWD.pfnFinishUpdate = NULL;
|
||||
HWD.pfnDraw2DLine = hwSym("Draw2DLine",NULL);
|
||||
|
@ -1816,13 +1854,13 @@ void I_StartupHardwareGraphics(void)
|
|||
// check gl renderer lib
|
||||
if (HWD.pfnGetRenderVersion() != VERSION)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("The version of the renderer doesn't match the version of the executable\nBe sure you have installed SRB2 properly.\n"));
|
||||
hwrenderloaded = -1;
|
||||
CONS_Alert(CONS_ERROR, M_GetText("The version of the renderer doesn't match the version of the executable!\nBe sure you have installed SRB2 properly.\n"));
|
||||
vid_opengl_state = -1;
|
||||
}
|
||||
else
|
||||
hwrenderloaded = HWD.pfnInit(I_Error) ? 1 : -1; // let load the OpenGL library
|
||||
vid_opengl_state = HWD.pfnInit(I_Error) ? 1 : -1; // let load the OpenGL library
|
||||
|
||||
if (hwrenderloaded == -1)
|
||||
if (vid_opengl_state == -1)
|
||||
{
|
||||
rendermode = render_soft;
|
||||
setrenderneeded = 0;
|
||||
|
|
85
src/w_wad.c
85
src/w_wad.c
|
@ -1511,6 +1511,57 @@ void *W_CacheLumpName(const char *name, INT32 tag)
|
|||
// Cache a patch into heap memory, convert the patch format as necessary
|
||||
//
|
||||
|
||||
void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||
{
|
||||
lumpcache_t *lumpcache = NULL;
|
||||
|
||||
if (needpatchflush)
|
||||
W_FlushCachedPatches();
|
||||
|
||||
if (!TestValidLump(wad, lump))
|
||||
return NULL;
|
||||
|
||||
lumpcache = wadfiles[wad]->patchcache;
|
||||
|
||||
if (!lumpcache[lump])
|
||||
{
|
||||
size_t len = W_LumpLengthPwad(wad, lump);
|
||||
void *ptr, *lumpdata;
|
||||
#ifndef NO_PNG_LUMPS
|
||||
void *srcdata = NULL;
|
||||
#endif
|
||||
|
||||
ptr = Z_Malloc(len, tag, &lumpcache[lump]);
|
||||
lumpdata = Z_Malloc(len, tag, NULL);
|
||||
|
||||
// read the lump in full
|
||||
W_ReadLumpHeaderPwad(wad, lump, lumpdata, 0, 0);
|
||||
|
||||
#ifndef NO_PNG_LUMPS
|
||||
// lump is a png so convert it
|
||||
if (R_IsLumpPNG((UINT8 *)lumpdata, len))
|
||||
{
|
||||
size_t newlen;
|
||||
srcdata = R_PNGToPatch((UINT8 *)lumpdata, len, &newlen);
|
||||
ptr = Z_Realloc(ptr, newlen, tag, &lumpcache[lump]);
|
||||
M_Memcpy(ptr, srcdata, newlen);
|
||||
Z_Free(srcdata);
|
||||
}
|
||||
else // just copy it into the patch cache
|
||||
#endif
|
||||
M_Memcpy(ptr, lumpdata, len);
|
||||
}
|
||||
else
|
||||
Z_ChangeTag(lumpcache[lump], tag);
|
||||
|
||||
return lumpcache[lump];
|
||||
}
|
||||
|
||||
void *W_CacheSoftwarePatchNum(lumpnum_t lumpnum, INT32 tag)
|
||||
{
|
||||
return W_CacheSoftwarePatchNumPwad(WADFILENUM(lumpnum),LUMPNUM(lumpnum),tag);
|
||||
}
|
||||
|
||||
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
|
@ -1528,39 +1579,7 @@ void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
|||
if (rendermode == render_soft || rendermode == render_none)
|
||||
#endif
|
||||
{
|
||||
lumpcache_t *lumpcache = wadfiles[wad]->patchcache;
|
||||
if (!lumpcache[lump])
|
||||
{
|
||||
size_t len = W_LumpLengthPwad(wad, lump);
|
||||
void *ptr, *lumpdata;
|
||||
#ifndef NO_PNG_LUMPS
|
||||
void *srcdata = NULL;
|
||||
#endif
|
||||
|
||||
ptr = Z_Malloc(len, tag, &lumpcache[lump]);
|
||||
lumpdata = Z_Malloc(len, tag, NULL);
|
||||
|
||||
// read the lump in full
|
||||
W_ReadLumpHeaderPwad(wad, lump, lumpdata, 0, 0);
|
||||
|
||||
#ifndef NO_PNG_LUMPS
|
||||
// lump is a png so convert it
|
||||
if (R_IsLumpPNG((UINT8 *)lumpdata, len))
|
||||
{
|
||||
size_t newlen;
|
||||
srcdata = R_PNGToPatch((UINT8 *)lumpdata, len, &newlen);
|
||||
ptr = Z_Realloc(ptr, newlen, tag, &lumpcache[lump]);
|
||||
M_Memcpy(ptr, srcdata, newlen);
|
||||
Z_Free(srcdata);
|
||||
}
|
||||
else // just copy it into the patch cache
|
||||
#endif
|
||||
M_Memcpy(ptr, lumpdata, len);
|
||||
}
|
||||
else
|
||||
Z_ChangeTag(lumpcache[lump], tag);
|
||||
|
||||
return lumpcache[lump];
|
||||
return W_CacheSoftwarePatchNumPwad(wad, lump, tag);
|
||||
}
|
||||
#ifdef HWRENDER
|
||||
|
||||
|
|
11
src/w_wad.h
11
src/w_wad.h
|
@ -191,8 +191,15 @@ boolean W_IsPatchCached(lumpnum_t lump, void *ptr);
|
|||
void *W_CacheLumpName(const char *name, INT32 tag);
|
||||
void *W_CachePatchName(const char *name, INT32 tag);
|
||||
|
||||
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag); // return a patch_t
|
||||
void *W_CachePatchNum(lumpnum_t lumpnum, INT32 tag); // return a patch_t
|
||||
// Returns either a Software patch, or an OpenGL patch.
|
||||
// Performs any necessary conversions from PNG images.
|
||||
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag);
|
||||
void *W_CachePatchNum(lumpnum_t lumpnum, INT32 tag);
|
||||
|
||||
// Returns a Software patch.
|
||||
// Performs any necessary conversions from PNG images.
|
||||
void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag);
|
||||
void *W_CacheSoftwarePatchNum(lumpnum_t lumpnum, INT32 tag);
|
||||
|
||||
void W_UnlockCachedPatch(void *patch);
|
||||
void W_FlushCachedPatches(void);
|
||||
|
|
|
@ -239,10 +239,7 @@ void I_StartupGraphics(void)
|
|||
if (!dedicated) graphics_started = true;
|
||||
}
|
||||
|
||||
void I_StartupHardwareGraphics(void)
|
||||
{
|
||||
// oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo y
|
||||
}
|
||||
void VID_StartupOpenGL(void){}
|
||||
|
||||
// ------------------
|
||||
// I_ShutdownGraphics
|
||||
|
@ -951,10 +948,8 @@ INT32 VID_SetMode(INT32 modenum)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void VID_CheckRenderer(void)
|
||||
{
|
||||
// ..............
|
||||
}
|
||||
void VID_CheckRenderer(void) {}
|
||||
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||
|
||||
// ========================================================================
|
||||
// Free the video buffer of the last video mode,
|
||||
|
|
Loading…
Reference in a new issue