mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playerthink-hook
This commit is contained in:
commit
5a9b80b5d5
39 changed files with 7504 additions and 6726 deletions
77
extras/conf/Includes/Game_SRB222.cfg
Normal file
77
extras/conf/Includes/Game_SRB222.cfg
Normal file
|
@ -0,0 +1,77 @@
|
|||
// 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
|
||||
{
|
||||
}
|
309
extras/conf/Includes/SRB222_common.cfg
Normal file
309
extras/conf/Includes/SRB222_common.cfg
Normal file
|
@ -0,0 +1,309 @@
|
|||
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");
|
||||
}
|
||||
}
|
2486
extras/conf/Includes/SRB222_linedefs.cfg
Normal file
2486
extras/conf/Includes/SRB222_linedefs.cfg
Normal file
File diff suppressed because it is too large
Load diff
726
extras/conf/Includes/SRB222_misc.cfg
Normal file
726
extras/conf/Includes/SRB222_misc.cfg
Normal file
|
@ -0,0 +1,726 @@
|
|||
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";
|
||||
}
|
||||
}
|
109
extras/conf/Includes/SRB222_sectors.cfg
Normal file
109
extras/conf/Includes/SRB222_sectors.cfg
Normal file
|
@ -0,0 +1,109 @@
|
|||
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";
|
||||
}
|
||||
}
|
3398
extras/conf/Includes/SRB222_things.cfg
Normal file
3398
extras/conf/Includes/SRB222_things.cfg
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
38
extras/conf/SRB2_22Doom.cfg
Normal file
38
extras/conf/SRB2_22Doom.cfg
Normal file
|
@ -0,0 +1,38 @@
|
|||
/************************************************************************\
|
||||
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");
|
||||
}
|
47
extras/conf/SRB2_22UDMF.cfg
Normal file
47
extras/conf/SRB2_22UDMF.cfg
Normal file
|
@ -0,0 +1,47 @@
|
|||
/************************************************************************\
|
||||
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");
|
||||
}
|
|
@ -611,11 +611,7 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
|
|||
|
||||
rsp->health = LONG(players[i].mo->health);
|
||||
rsp->angle = (angle_t)LONG(players[i].mo->angle);
|
||||
#ifdef ROTSPRITE
|
||||
rsp->rollangle = (angle_t)LONG(players[i].mo->rollangle);
|
||||
#else
|
||||
rsp->rollangle = 0;
|
||||
#endif
|
||||
rsp->x = LONG(players[i].mo->x);
|
||||
rsp->y = LONG(players[i].mo->y);
|
||||
rsp->z = LONG(players[i].mo->z);
|
||||
|
@ -766,9 +762,7 @@ static void resynch_read_player(resynch_pak *rsp)
|
|||
//At this point, the player should have a body, whether they were respawned or not.
|
||||
P_UnsetThingPosition(players[i].mo);
|
||||
players[i].mo->angle = (angle_t)LONG(rsp->angle);
|
||||
#ifdef ROTSPRITE
|
||||
players[i].mo->rollangle = (angle_t)LONG(rsp->rollangle);
|
||||
#endif
|
||||
players[i].mo->eflags = (UINT16)SHORT(rsp->eflags);
|
||||
players[i].mo->flags = LONG(rsp->flags);
|
||||
players[i].mo->flags2 = LONG(rsp->flags2);
|
||||
|
|
|
@ -875,14 +875,12 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame)
|
|||
strupr(word);
|
||||
value = atoi(word2); // used for numerical settings
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (fastcmp(word, "XPIVOT"))
|
||||
sprinfo->pivot[frame].x = value;
|
||||
else if (fastcmp(word, "YPIVOT"))
|
||||
sprinfo->pivot[frame].y = value;
|
||||
else if (fastcmp(word, "ROTAXIS"))
|
||||
sprinfo->pivot[frame].rotaxis = value;
|
||||
#endif
|
||||
else
|
||||
{
|
||||
f->curpos = lastline;
|
||||
|
@ -2910,11 +2908,9 @@ static actionpointer_t actionpointers[] =
|
|||
{{A_SpawnObjectRelative}, "A_SPAWNOBJECTRELATIVE"},
|
||||
{{A_ChangeAngleRelative}, "A_CHANGEANGLERELATIVE"},
|
||||
{{A_ChangeAngleAbsolute}, "A_CHANGEANGLEABSOLUTE"},
|
||||
#ifdef ROTSPRITE
|
||||
{{A_RollAngle}, "A_ROLLANGLE"},
|
||||
{{A_ChangeRollAngleRelative},"A_CHANGEROLLANGLERELATIVE"},
|
||||
{{A_ChangeRollAngleAbsolute},"A_CHANGEROLLANGLEABSOLUTE"},
|
||||
#endif
|
||||
{{A_PlaySound}, "A_PLAYSOUND"},
|
||||
{{A_FindTarget}, "A_FINDTARGET"},
|
||||
{{A_FindTracer}, "A_FINDTRACER"},
|
||||
|
@ -9714,12 +9710,10 @@ struct {
|
|||
{"DI_SOUTHEAST",DI_SOUTHEAST},
|
||||
{"NUMDIRS",NUMDIRS},
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
// Sprite rotation axis (rotaxis_t)
|
||||
{"ROTAXIS_X",ROTAXIS_X},
|
||||
{"ROTAXIS_Y",ROTAXIS_Y},
|
||||
{"ROTAXIS_Z",ROTAXIS_Z},
|
||||
#endif
|
||||
|
||||
// Buttons (ticcmd_t)
|
||||
{"BT_WEAPONMASK",BT_WEAPONMASK}, //our first four bits.
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
|
||||
#ifdef LOGMESSAGES
|
||||
extern FILE *logstream;
|
||||
extern char logfilename[1024];
|
||||
extern char logfilename[1024];
|
||||
#endif
|
||||
|
||||
//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
|
||||
|
@ -626,7 +626,7 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
|||
|
||||
/// Sprite rotation
|
||||
#define ROTSPRITE
|
||||
#define ROTANGLES 24 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
||||
#define ROTANGLES 72 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
||||
#define ROTANGDIFF (360 / ROTANGLES)
|
||||
|
||||
/// PNG support
|
||||
|
|
12
src/g_game.c
12
src/g_game.c
|
@ -1159,14 +1159,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
else
|
||||
{
|
||||
if (turnright)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((angleturn[tspeed] * cv_cam_turnmultiplier.value)>>FRACBITS));
|
||||
else if (turnleft)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
|
||||
cmd->angleturn = (INT16)(cmd->angleturn + ((angleturn[tspeed] * cv_cam_turnmultiplier.value)>>FRACBITS));
|
||||
|
||||
if (analogjoystickmove && lookjoystickvector.xaxis != 0)
|
||||
{
|
||||
// JOYAXISRANGE should be 1023 (divide by 1024)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((lookjoystickvector.xaxis * angleturn[1]) >> 10)); // ANALOG!
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((((lookjoystickvector.xaxis * angleturn[1]) >> 10) * cv_cam_turnmultiplier.value)>>FRACBITS)); // ANALOG!
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1504,14 +1504,14 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
else
|
||||
{
|
||||
if (turnright)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (((angleturn[tspeed]<<FRACBITS) * cv_cam2_turnmultiplier.value)>>FRACBITS));
|
||||
else if (turnleft)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
|
||||
cmd->angleturn = (INT16)(cmd->angleturn + (((angleturn[tspeed]<<FRACBITS) * cv_cam2_turnmultiplier.value)>>FRACBITS));
|
||||
|
||||
if (analogjoystickmove && lookjoystickvector.xaxis != 0)
|
||||
{
|
||||
// JOYAXISRANGE should be 1023 (divide by 1024)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((lookjoystickvector.xaxis * angleturn[1]) >> 10)); // ANALOG!
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((((lookjoystickvector.xaxis * angleturn[1]) >> 10) * cv_cam2_turnmultiplier.value)>>FRACBITS)); // ANALOG!
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,13 +115,11 @@ typedef struct
|
|||
FLOAT fovxangle, fovyangle;
|
||||
UINT8 splitscreen;
|
||||
boolean flip; // screenflip
|
||||
#ifdef ROTSPRITE
|
||||
boolean roll;
|
||||
SINT8 rollflip;
|
||||
FLOAT rollangle; // done to not override USE_FTRANSFORM_ANGLEZ
|
||||
UINT8 rotaxis;
|
||||
FLOAT centerx, centery;
|
||||
#endif
|
||||
#ifdef USE_FTRANSFORM_MIRROR
|
||||
boolean mirror; // SRB2Kart: Encore Mode
|
||||
#endif
|
||||
|
|
|
@ -5501,17 +5501,12 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
fixed_t spr_offset, spr_topoffset;
|
||||
#ifdef ROTSPRITE
|
||||
patch_t *rotsprite = NULL;
|
||||
angle_t arollangle;
|
||||
UINT32 rollangle;
|
||||
INT32 rollangle = 0;
|
||||
#endif
|
||||
|
||||
if (!thing)
|
||||
return;
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
arollangle = thing->rollangle;
|
||||
rollangle = AngleFixed(arollangle)>>FRACBITS;
|
||||
#endif
|
||||
this_scale = FIXED_TO_FLOAT(thing->scale);
|
||||
|
||||
// transform the origin point
|
||||
|
@ -5618,11 +5613,11 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
spr_topoffset = spritecachedinfo[lumpoff].topoffset;
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (rollangle > 0)
|
||||
if (thing->rollangle)
|
||||
{
|
||||
rollangle = R_GetRollAngle(thing->rollangle);
|
||||
if (!sprframe->rotsprite.cached[rot])
|
||||
R_CacheRotSprite(thing->sprite, (thing->frame & FF_FRAMEMASK), sprinfo, sprframe, rot, flip);
|
||||
rollangle /= ROTANGDIFF;
|
||||
rotsprite = sprframe->rotsprite.patch[rot][rollangle];
|
||||
if (rotsprite != NULL)
|
||||
{
|
||||
|
|
|
@ -1148,10 +1148,8 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
const UINT8 flip = (UINT8)(!(spr->mobj->eflags & MFE_VERTICALFLIP) != !(spr->mobj->frame & FF_VERTICALFLIP));
|
||||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
#ifdef ROTSPRITE
|
||||
spriteinfo_t *sprinfo;
|
||||
angle_t ang;
|
||||
#endif
|
||||
INT32 mod;
|
||||
float finalscale;
|
||||
|
||||
|
@ -1175,16 +1173,12 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
{
|
||||
md2 = &md2_playermodels[(skin_t*)spr->mobj->skin-skins];
|
||||
md2->skin = (skin_t*)spr->mobj->skin-skins;
|
||||
#ifdef ROTSPRITE
|
||||
sprinfo = &((skin_t *)spr->mobj->skin)->sprinfo[spr->mobj->sprite2];
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
md2 = &md2_models[spr->mobj->sprite];
|
||||
#ifdef ROTSPRITE
|
||||
sprinfo = &spriteinfo[spr->mobj->sprite];
|
||||
#endif
|
||||
}
|
||||
|
||||
if (md2->error)
|
||||
|
@ -1384,9 +1378,8 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
p.angley = FIXED_TO_FLOAT(anglef);
|
||||
}
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
p.rollangle = 0.0f;
|
||||
p.rollflip = 0;
|
||||
p.rollflip = 1;
|
||||
p.rotaxis = 0;
|
||||
if (spr->mobj->rollangle)
|
||||
{
|
||||
|
@ -1409,7 +1402,6 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
|||
else if ((sprframe->rotate & SRF_LEFT) && (ang >= ANGLE_180)) // See from left
|
||||
p.rollflip = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
p.anglex = 0.0f;
|
||||
|
||||
|
|
|
@ -2076,7 +2076,6 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32
|
|||
pglRotatef(pos->angley, 0.0f, -1.0f, 0.0f);
|
||||
pglRotatef(pos->anglex, 1.0f, 0.0f, 0.0f);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (pos->roll)
|
||||
{
|
||||
float roll = (1.0f * pos->rollflip);
|
||||
|
@ -2089,7 +2088,6 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32
|
|||
pglRotatef(pos->rollangle, roll, 0.0f, 0.0f);
|
||||
pglTranslatef(-pos->centerx, -pos->centery, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
pglScalef(scalex, scaley, scalez);
|
||||
|
||||
|
|
|
@ -155,11 +155,9 @@ void A_SpawnObjectAbsolute();
|
|||
void A_SpawnObjectRelative();
|
||||
void A_ChangeAngleRelative();
|
||||
void A_ChangeAngleAbsolute();
|
||||
#ifdef ROTSPRITE
|
||||
void A_RollAngle();
|
||||
void A_ChangeRollAngleRelative();
|
||||
void A_ChangeRollAngleAbsolute();
|
||||
#endif
|
||||
void A_PlaySound();
|
||||
void A_FindTarget();
|
||||
void A_FindTracer();
|
||||
|
|
|
@ -147,10 +147,8 @@ static const struct {
|
|||
{META_MOBJINFO, "mobjinfo_t"},
|
||||
{META_SFXINFO, "sfxinfo_t"},
|
||||
{META_SPRITEINFO, "spriteinfo_t"},
|
||||
#ifdef ROTSPRITE
|
||||
{META_PIVOTLIST, "spriteframepivot_t[]"},
|
||||
{META_FRAMEPIVOT, "spriteframepivot_t"},
|
||||
#endif
|
||||
|
||||
{META_MOBJ, "mobj_t"},
|
||||
{META_MAPTHING, "mapthing_t"},
|
||||
|
|
|
@ -266,7 +266,6 @@ static int lib_getSpriteInfo(lua_State *L)
|
|||
#define FIELDERROR(f, e) luaL_error(L, "bad value for " LUA_QL(f) " in table passed to spriteinfo[] (%s)", e);
|
||||
#define TYPEERROR(f, t1, t2) FIELDERROR(f, va("%s expected, got %s", lua_typename(L, t1), lua_typename(L, t2)))
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
static int PopPivotSubTable(spriteframepivot_t *pivot, lua_State *L, int stk, int idx)
|
||||
{
|
||||
int okcool = 0;
|
||||
|
@ -360,7 +359,6 @@ static int PopPivotTable(spriteinfo_t *info, lua_State *L, int stk)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int lib_setSpriteInfo(lua_State *L)
|
||||
{
|
||||
|
@ -393,14 +391,11 @@ static int lib_setSpriteInfo(lua_State *L)
|
|||
if (lua_isnumber(L, 2))
|
||||
{
|
||||
i = lua_tointeger(L, 2);
|
||||
#ifndef ROTSPRITE
|
||||
i++; // shift index in case of missing rotsprite support
|
||||
#endif
|
||||
}
|
||||
else
|
||||
str = luaL_checkstring(L, 2);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (i == 1 || (str && fastcmp(str, "pivot")))
|
||||
{
|
||||
// pivot[] is a table
|
||||
|
@ -409,7 +404,6 @@ static int lib_setSpriteInfo(lua_State *L)
|
|||
else
|
||||
FIELDERROR("pivot", va("%s expected, got %s", lua_typename(L, LUA_TTABLE), luaL_typename(L, -1)))
|
||||
}
|
||||
#endif
|
||||
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
@ -434,7 +428,6 @@ static int spriteinfo_get(lua_State *L)
|
|||
|
||||
I_Assert(sprinfo != NULL);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
// push spriteframepivot_t userdata
|
||||
if (fastcmp(field, "pivot"))
|
||||
{
|
||||
|
@ -448,7 +441,6 @@ static int spriteinfo_get(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
return luaL_error(L, LUA_QL("spriteinfo_t") " has no field named " LUA_QS, field);
|
||||
|
||||
return 0;
|
||||
|
@ -473,6 +465,7 @@ static int spriteinfo_set(lua_State *L)
|
|||
#ifdef ROTSPRITE
|
||||
if (sprites != NULL)
|
||||
R_FreeSingleRotSprite(&sprites[sprinfo-spriteinfo]);
|
||||
#endif
|
||||
|
||||
if (fastcmp(field, "pivot"))
|
||||
{
|
||||
|
@ -488,7 +481,6 @@ static int spriteinfo_set(lua_State *L)
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
return luaL_error(L, va("Field %s does not exist in spriteinfo_t", field));
|
||||
|
||||
return 0;
|
||||
|
@ -506,7 +498,6 @@ static int spriteinfo_num(lua_State *L)
|
|||
}
|
||||
|
||||
// framepivot_t
|
||||
#ifdef ROTSPRITE
|
||||
static int pivotlist_get(lua_State *L)
|
||||
{
|
||||
void **userdata;
|
||||
|
@ -616,7 +607,6 @@ static int framepivot_num(lua_State *L)
|
|||
lua_pushinteger(L, 2);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////
|
||||
// STATE INFO //
|
||||
|
@ -1538,7 +1528,6 @@ int LUA_InfoLib(lua_State *L)
|
|||
lua_setfield(L, -2, "__len");
|
||||
lua_pop(L, 1);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
luaL_newmetatable(L, META_PIVOTLIST);
|
||||
lua_pushcfunction(L, pivotlist_get);
|
||||
lua_setfield(L, -2, "__index");
|
||||
|
@ -1560,7 +1549,6 @@ int LUA_InfoLib(lua_State *L)
|
|||
lua_pushcfunction(L, framepivot_num);
|
||||
lua_setfield(L, -2, "__len");
|
||||
lua_pop(L, 1);
|
||||
#endif
|
||||
|
||||
lua_newuserdata(L, 0);
|
||||
lua_createtable(L, 0, 2);
|
||||
|
|
|
@ -23,10 +23,8 @@ extern lua_State *gL;
|
|||
#define META_MOBJINFO "MOBJINFO_T*"
|
||||
#define META_SFXINFO "SFXINFO_T*"
|
||||
#define META_SPRITEINFO "SPRITEINFO_T*"
|
||||
#ifdef ROTSPRITE
|
||||
#define META_PIVOTLIST "SPRITEFRAMEPIVOT_T[]"
|
||||
#define META_FRAMEPIVOT "SPRITEFRAMEPIVOT_T*"
|
||||
#endif
|
||||
|
||||
#define META_MOBJ "MOBJ_T*"
|
||||
#define META_MAPTHING "MAPTHING_T*"
|
||||
|
|
|
@ -32,9 +32,7 @@ enum mobj_e {
|
|||
mobj_snext,
|
||||
mobj_sprev,
|
||||
mobj_angle,
|
||||
#ifdef ROTSPRITE
|
||||
mobj_rollangle,
|
||||
#endif
|
||||
mobj_sprite,
|
||||
mobj_frame,
|
||||
mobj_sprite2,
|
||||
|
@ -101,9 +99,7 @@ static const char *const mobj_opt[] = {
|
|||
"snext",
|
||||
"sprev",
|
||||
"angle",
|
||||
#ifdef ROTSPRITE
|
||||
"rollangle",
|
||||
#endif
|
||||
"sprite",
|
||||
"frame",
|
||||
"sprite2",
|
||||
|
@ -205,11 +201,9 @@ static int mobj_get(lua_State *L)
|
|||
case mobj_angle:
|
||||
lua_pushangle(L, mo->angle);
|
||||
break;
|
||||
#ifdef ROTSPRITE
|
||||
case mobj_rollangle:
|
||||
lua_pushangle(L, mo->rollangle);
|
||||
break;
|
||||
#endif
|
||||
case mobj_sprite:
|
||||
lua_pushinteger(L, mo->sprite);
|
||||
break;
|
||||
|
@ -462,11 +456,9 @@ static int mobj_set(lua_State *L)
|
|||
else if (mo->player == &players[secondarydisplayplayer])
|
||||
localangle2 = mo->angle;
|
||||
break;
|
||||
#ifdef ROTSPRITE
|
||||
case mobj_rollangle:
|
||||
mo->rollangle = luaL_checkangle(L, 3);
|
||||
break;
|
||||
#endif
|
||||
case mobj_sprite:
|
||||
mo->sprite = luaL_checkinteger(L, 3);
|
||||
break;
|
||||
|
|
|
@ -1181,7 +1181,8 @@ static menuitem_t OP_CameraOptionsMenu[] =
|
|||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Spacial Speed", &cv_cam_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Turning Speed", &cv_cam_turnmultiplier, 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 100},
|
||||
};
|
||||
|
@ -1195,7 +1196,8 @@ static menuitem_t OP_Camera2OptionsMenu[] =
|
|||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam2_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam2_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam2_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Spacial Speed", &cv_cam2_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Turning Speed", &cv_cam2_turnmultiplier, 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair2, 100},
|
||||
};
|
||||
|
|
89
src/m_misc.c
89
src/m_misc.c
|
@ -2466,3 +2466,92 @@ const char *M_FileError(FILE *fp)
|
|||
else
|
||||
return "end-of-file";
|
||||
}
|
||||
|
||||
/** Return the number of parts of this path.
|
||||
*/
|
||||
int M_PathParts(const char *path)
|
||||
{
|
||||
int n;
|
||||
const char *p;
|
||||
const char *t;
|
||||
for (n = 0, p = path ;; ++n)
|
||||
{
|
||||
t = p;
|
||||
if (( p = strchr(p, PATHSEP[0]) ))
|
||||
p += strspn(p, PATHSEP);
|
||||
else
|
||||
{
|
||||
if (*t)/* there is something after the final delimiter */
|
||||
n++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/** Check whether a path is an absolute path.
|
||||
*/
|
||||
boolean M_IsPathAbsolute(const char *path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ( strncmp(&path[1], ":\\", 2) == 0 );
|
||||
#else
|
||||
return ( path[0] == '/' );
|
||||
#endif
|
||||
}
|
||||
|
||||
/** I_mkdir for each part of the path.
|
||||
*/
|
||||
void M_MkdirEachUntil(const char *cpath, int start, int end, int mode)
|
||||
{
|
||||
char path[MAX_WADPATH];
|
||||
char *p;
|
||||
char *t;
|
||||
|
||||
if (end > 0 && end <= start)
|
||||
return;
|
||||
|
||||
strlcpy(path, cpath, sizeof path);
|
||||
#ifdef _WIN32
|
||||
if (strncmp(&path[1], ":\\", 2) == 0)
|
||||
p = &path[3];
|
||||
else
|
||||
#endif
|
||||
p = path;
|
||||
|
||||
if (end > 0)
|
||||
end -= start;
|
||||
|
||||
for (; start > 0; --start)
|
||||
{
|
||||
p += strspn(p, PATHSEP);
|
||||
if (!( p = strchr(p, PATHSEP[0]) ))
|
||||
return;
|
||||
}
|
||||
p += strspn(p, PATHSEP);
|
||||
for (;;)
|
||||
{
|
||||
if (end > 0 && !--end)
|
||||
break;
|
||||
|
||||
t = p;
|
||||
if (( p = strchr(p, PATHSEP[0]) ))
|
||||
{
|
||||
*p = '\0';
|
||||
I_mkdir(path, mode);
|
||||
*p = PATHSEP[0];
|
||||
p += strspn(p, PATHSEP);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*t)
|
||||
I_mkdir(path, mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void M_MkdirEach(const char *path, int start, int mode)
|
||||
{
|
||||
M_MkdirEachUntil(path, start, -1, mode);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,11 @@ void M_SetupMemcpy(void);
|
|||
|
||||
const char *M_FileError(FILE *handle);
|
||||
|
||||
int M_PathParts (const char *path);
|
||||
boolean M_IsPathAbsolute (const char *path);
|
||||
void M_MkdirEach (const char *path, int start, int mode);
|
||||
void M_MkdirEachUntil (const char *path, int start, int end, int mode);
|
||||
|
||||
// counting bits, for weapon ammo code, usually
|
||||
FUNCMATH UINT8 M_CountBits(UINT32 num, UINT8 size);
|
||||
|
||||
|
|
|
@ -181,11 +181,9 @@ void A_SpawnObjectAbsolute(mobj_t *actor);
|
|||
void A_SpawnObjectRelative(mobj_t *actor);
|
||||
void A_ChangeAngleRelative(mobj_t *actor);
|
||||
void A_ChangeAngleAbsolute(mobj_t *actor);
|
||||
#ifdef ROTSPRITE
|
||||
void A_RollAngle(mobj_t *actor);
|
||||
void A_ChangeRollAngleRelative(mobj_t *actor);
|
||||
void A_ChangeRollAngleAbsolute(mobj_t *actor);
|
||||
#endif // ROTSPRITE
|
||||
void A_PlaySound(mobj_t *actor);
|
||||
void A_FindTarget(mobj_t *actor);
|
||||
void A_FindTracer(mobj_t *actor);
|
||||
|
@ -8627,7 +8625,6 @@ void A_ChangeAngleAbsolute(mobj_t *actor)
|
|||
actor->angle = FixedAngle(P_RandomRange(amin, amax));
|
||||
}
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
// Function: A_RollAngle
|
||||
//
|
||||
// Description: Changes the roll angle.
|
||||
|
@ -8663,16 +8660,10 @@ void A_RollAngle(mobj_t *actor)
|
|||
//
|
||||
void A_ChangeRollAngleRelative(mobj_t *actor)
|
||||
{
|
||||
// Oh god, the old code /sucked/. Changed this and the absolute version to get a random range using amin and amax instead of
|
||||
// getting a random angle from the _entire_ spectrum and then clipping. While we're at it, do the angle conversion to the result
|
||||
// rather than the ranges, so <0 and >360 work as possible values. -Red
|
||||
INT32 locvar1 = var1;
|
||||
INT32 locvar2 = var2;
|
||||
//angle_t angle = (P_RandomByte()+1)<<24;
|
||||
const fixed_t amin = locvar1*FRACUNIT;
|
||||
const fixed_t amax = locvar2*FRACUNIT;
|
||||
//const angle_t amin = FixedAngle(locvar1*FRACUNIT);
|
||||
//const angle_t amax = FixedAngle(locvar2*FRACUNIT);
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_ChangeRollAngleRelative", actor))
|
||||
return;
|
||||
|
@ -8682,11 +8673,6 @@ void A_ChangeRollAngleRelative(mobj_t *actor)
|
|||
if (amin > amax)
|
||||
I_Error("A_ChangeRollAngleRelative: var1 is greater than var2");
|
||||
#endif
|
||||
/*
|
||||
if (angle < amin)
|
||||
angle = amin;
|
||||
if (angle > amax)
|
||||
angle = amax;*/
|
||||
|
||||
actor->rollangle += FixedAngle(P_RandomRange(amin, amax));
|
||||
}
|
||||
|
@ -8702,11 +8688,8 @@ void A_ChangeRollAngleAbsolute(mobj_t *actor)
|
|||
{
|
||||
INT32 locvar1 = var1;
|
||||
INT32 locvar2 = var2;
|
||||
//angle_t angle = (P_RandomByte()+1)<<24;
|
||||
const fixed_t amin = locvar1*FRACUNIT;
|
||||
const fixed_t amax = locvar2*FRACUNIT;
|
||||
//const angle_t amin = FixedAngle(locvar1*FRACUNIT);
|
||||
//const angle_t amax = FixedAngle(locvar2*FRACUNIT);
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_ChangeRollAngleAbsolute", actor))
|
||||
return;
|
||||
|
@ -8716,15 +8699,9 @@ void A_ChangeRollAngleAbsolute(mobj_t *actor)
|
|||
if (amin > amax)
|
||||
I_Error("A_ChangeRollAngleAbsolute: var1 is greater than var2");
|
||||
#endif
|
||||
/*
|
||||
if (angle < amin)
|
||||
angle = amin;
|
||||
if (angle > amax)
|
||||
angle = amax;*/
|
||||
|
||||
actor->rollangle = FixedAngle(P_RandomRange(amin, amax));
|
||||
}
|
||||
#endif // ROTSPRITE
|
||||
|
||||
// Function: A_PlaySound
|
||||
//
|
||||
|
|
|
@ -2962,7 +2962,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
Graue 12-22-2003 */
|
||||
}
|
||||
|
||||
static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
||||
static void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
||||
{
|
||||
player_t *player = target->player;
|
||||
tic_t oldnightstime = player->nightstime;
|
||||
|
@ -3005,9 +3005,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
|||
P_SetPlayerMobjState(target, S_PLAY_NIGHTS_STUN);
|
||||
S_StartSound(target, sfx_nghurt);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
player->mo->rollangle = 0;
|
||||
#endif
|
||||
|
||||
if (oldnightstime > 10*TICRATE
|
||||
&& player->nightstime < 10*TICRATE)
|
||||
|
@ -3028,7 +3026,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
|||
}
|
||||
}
|
||||
|
||||
static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)
|
||||
static boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)
|
||||
{
|
||||
player_t *player = target->player;
|
||||
(void)damage; //unused parm
|
||||
|
@ -3132,7 +3130,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)
|
||||
static boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)
|
||||
{
|
||||
player_t *player = target->player;
|
||||
|
||||
|
|
|
@ -115,10 +115,10 @@ typedef struct camera_s
|
|||
|
||||
extern camera_t camera, camera2;
|
||||
extern consvar_t cv_cam_dist, cv_cam_still, cv_cam_height;
|
||||
extern consvar_t cv_cam_speed, cv_cam_rotate, cv_cam_rotspeed, cv_cam_orbit, cv_cam_adjust;
|
||||
extern consvar_t cv_cam_speed, cv_cam_rotate, cv_cam_rotspeed, cv_cam_turnmultiplier, cv_cam_orbit, cv_cam_adjust;
|
||||
|
||||
extern consvar_t cv_cam2_dist, cv_cam2_still, cv_cam2_height;
|
||||
extern consvar_t cv_cam2_speed, cv_cam2_rotate, cv_cam2_rotspeed, cv_cam2_orbit, cv_cam2_adjust;
|
||||
extern consvar_t cv_cam2_speed, cv_cam2_rotate, cv_cam2_rotspeed, cv_cam2_turnmultiplier, cv_cam2_orbit, cv_cam2_adjust;
|
||||
|
||||
extern fixed_t t_cam_dist, t_cam_height, t_cam_rotate;
|
||||
extern fixed_t t_cam2_dist, t_cam2_height, t_cam2_rotate;
|
||||
|
|
|
@ -9763,15 +9763,11 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
P_DragonbomberThink(mobj);
|
||||
break;
|
||||
case MT_MINUS:
|
||||
#ifdef ROTSPRITE
|
||||
{
|
||||
if (P_IsObjectOnGround(mobj))
|
||||
mobj->rollangle = 0;
|
||||
else
|
||||
mobj->rollangle = R_PointToAngle2(0, 0, mobj->momz, (mobj->scale << 1) - min(abs(mobj->momz), mobj->scale << 1));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
case MT_SPINFIRE:
|
||||
if (mobj->flags & MF_NOGRAVITY)
|
||||
{
|
||||
|
|
|
@ -279,9 +279,7 @@ typedef struct mobj_s
|
|||
|
||||
// More drawing info: to determine current sprite.
|
||||
angle_t angle; // orientation
|
||||
#ifdef ROTSPRITE
|
||||
angle_t rollangle;
|
||||
#endif
|
||||
spritenum_t sprite; // used to find patch_t and flip value
|
||||
UINT32 frame; // frame number, plus bits see p_pspr.h
|
||||
UINT8 sprite2; // player sprites
|
||||
|
@ -402,9 +400,7 @@ typedef struct precipmobj_s
|
|||
|
||||
// More drawing info: to determine current sprite.
|
||||
angle_t angle; // orientation
|
||||
#ifdef ROTSPRITE
|
||||
angle_t rollangle;
|
||||
#endif
|
||||
spritenum_t sprite; // used to find patch_t and flip value
|
||||
UINT32 frame; // frame number, plus bits see p_pspr.h
|
||||
UINT8 sprite2; // player sprites
|
||||
|
|
|
@ -1252,9 +1252,7 @@ typedef enum
|
|||
MD2_SLOPE = 1<<11,
|
||||
#endif
|
||||
MD2_COLORIZED = 1<<12,
|
||||
#ifdef ROTSPRITE
|
||||
MD2_ROLLANGLE = 1<<13,
|
||||
#endif
|
||||
} mobj_diff2_t;
|
||||
|
||||
typedef enum
|
||||
|
@ -1474,10 +1472,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
#endif
|
||||
if (mobj->colorized)
|
||||
diff2 |= MD2_COLORIZED;
|
||||
#ifdef ROTSPRITE
|
||||
if (mobj->rollangle)
|
||||
diff2 |= MD2_ROLLANGLE;
|
||||
#endif
|
||||
if (diff2 != 0)
|
||||
diff |= MD_MORE;
|
||||
|
||||
|
@ -1642,10 +1638,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
#endif
|
||||
if (diff2 & MD2_COLORIZED)
|
||||
WRITEUINT8(save_p, mobj->colorized);
|
||||
#ifdef ROTSPRITE
|
||||
if (diff2 & MD2_ROLLANGLE)
|
||||
WRITEANGLE(save_p, mobj->rollangle);
|
||||
#endif
|
||||
|
||||
WRITEUINT32(save_p, mobj->mobjnum);
|
||||
}
|
||||
|
@ -2722,12 +2716,8 @@ static thinker_t* LoadMobjThinker(actionf_p1 thinker)
|
|||
#endif
|
||||
if (diff2 & MD2_COLORIZED)
|
||||
mobj->colorized = READUINT8(save_p);
|
||||
#ifdef ROTSPRITE
|
||||
if (diff2 & MD2_ROLLANGLE)
|
||||
mobj->rollangle = READANGLE(save_p);
|
||||
else
|
||||
mobj->rollangle = 0;
|
||||
#endif
|
||||
|
||||
if (diff & MD_REDFLAG)
|
||||
{
|
||||
|
|
|
@ -664,6 +664,7 @@ static void P_LoadRawSectors(UINT8 *data)
|
|||
ss->ceilingpic = P_AddLevelFlat(ms->ceilingpic, foundflats);
|
||||
|
||||
ss->lightlevel = SHORT(ms->lightlevel);
|
||||
ss->spawn_lightlevel = ss->lightlevel;
|
||||
ss->special = SHORT(ms->special);
|
||||
ss->tag = SHORT(ms->tag);
|
||||
ss->nexttag = ss->firsttag = -1;
|
||||
|
|
17
src/p_user.c
17
src/p_user.c
|
@ -638,9 +638,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
|||
player->marebonuslap = 0;
|
||||
player->flyangle = 0;
|
||||
player->anotherflyangle = 0;
|
||||
#ifdef ROTSPRITE
|
||||
player->mo->rollangle = 0;
|
||||
#endif
|
||||
|
||||
P_SetTarget(&player->mo->target, NULL);
|
||||
P_SetTarget(&player->axis1, P_SetTarget(&player->axis2, NULL));
|
||||
|
@ -768,9 +766,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
player->secondjump = 0;
|
||||
player->flyangle = 0;
|
||||
player->anotherflyangle = 0;
|
||||
#ifdef ROTSPRITE
|
||||
player->mo->rollangle = 0;
|
||||
#endif
|
||||
|
||||
player->powers[pw_shield] = SH_NONE;
|
||||
player->powers[pw_super] = 0;
|
||||
|
@ -6820,7 +6816,6 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
|||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
}
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (!(player->charflags & SF_NONIGHTSROTATION))
|
||||
{
|
||||
if ((player->mo->state == &states[S_PLAY_NIGHTS_PULL])
|
||||
|
@ -6829,7 +6824,6 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
|||
else
|
||||
player->mo->rollangle = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (G_IsSpecialStage(gamemap))
|
||||
{ // In special stages, share rings. Everyone gives up theirs to the capsule player always, because we can't have any individualism here!
|
||||
|
@ -7092,9 +7086,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
INT32 i;
|
||||
statenum_t flystate;
|
||||
UINT16 visangle;
|
||||
#ifdef ROTSPRITE
|
||||
angle_t rollangle = 0;
|
||||
#endif
|
||||
|
||||
player->pflags &= ~PF_DRILLING;
|
||||
|
||||
|
@ -7279,9 +7271,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
&& player->mo->state <= &states[S_PLAY_NIGHTS_TRANS6])
|
||||
{
|
||||
player->mo->momx = player->mo->momy = player->mo->momz = 0;
|
||||
#ifdef ROTSPRITE
|
||||
player->mo->rollangle = 0;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7607,7 +7597,6 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
flystate += (visangle*2); // S_PLAY_NIGHTS_FLY0-C - the *2 is to skip over drill states
|
||||
#endif
|
||||
}
|
||||
#ifdef ROTSPRITE
|
||||
else
|
||||
{
|
||||
angle_t a = R_PointToAngle(player->mo->x, player->mo->y) - player->mo->angle;
|
||||
|
@ -7625,18 +7614,15 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
|
||||
rollangle = FixedAngle(visangle<<FRACBITS);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (player->mo->state != &states[flystate])
|
||||
P_SetPlayerMobjState(player->mo, flystate);
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (player->charflags & SF_NONIGHTSROTATION)
|
||||
player->mo->rollangle = 0;
|
||||
else
|
||||
player->mo->rollangle = rollangle;
|
||||
#endif
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
|
@ -9585,6 +9571,7 @@ static void CV_CamRotate2_OnChange(void)
|
|||
static CV_PossibleValue_t CV_CamSpeed[] = {{0, "MIN"}, {1*FRACUNIT, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t rotation_cons_t[] = {{1, "MIN"}, {45, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t CV_CamRotate[] = {{-720, "MIN"}, {720, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t multiplier_cons_t[] = {{0, "MIN"}, {3*FRACUNIT, "MAX"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_cam_dist = {"cam_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_height = {"cam_height", "25", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -9592,6 +9579,7 @@ consvar_t cv_cam_still = {"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL,
|
|||
consvar_t cv_cam_speed = {"cam_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotate = {"cam_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotspeed = {"cam_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_turnmultiplier = {"cam_turnmultiplier", "1.0", CV_FLOAT|CV_SAVE, multiplier_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_orbit = {"cam_orbit", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_adjust = {"cam_adjust", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_dist = {"cam2_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -9600,6 +9588,7 @@ consvar_t cv_cam2_still = {"cam2_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL
|
|||
consvar_t cv_cam2_speed = {"cam2_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotate = {"cam2_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotspeed = {"cam2_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_turnmultiplier = {"cam2_turnmultiplier", "1.0", CV_FLOAT|CV_SAVE, multiplier_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_orbit = {"cam2_orbit", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_adjust = {"cam2_adjust", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
|
|
@ -1192,6 +1192,7 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_cam_speed);
|
||||
CV_RegisterVar(&cv_cam_rotate);
|
||||
CV_RegisterVar(&cv_cam_rotspeed);
|
||||
CV_RegisterVar(&cv_cam_turnmultiplier);
|
||||
CV_RegisterVar(&cv_cam_orbit);
|
||||
CV_RegisterVar(&cv_cam_adjust);
|
||||
|
||||
|
@ -1201,6 +1202,7 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_cam2_speed);
|
||||
CV_RegisterVar(&cv_cam2_rotate);
|
||||
CV_RegisterVar(&cv_cam2_rotspeed);
|
||||
CV_RegisterVar(&cv_cam2_turnmultiplier);
|
||||
CV_RegisterVar(&cv_cam2_orbit);
|
||||
CV_RegisterVar(&cv_cam2_adjust);
|
||||
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
#endif
|
||||
|
||||
static unsigned char imgbuf[1<<26];
|
||||
fixed_t cosang2rad[ROTANGLES];
|
||||
fixed_t sinang2rad[ROTANGLES];
|
||||
|
||||
//
|
||||
// R_CheckIfPatch
|
||||
|
@ -789,11 +787,9 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
|
|||
size_t sprinfoTokenLength;
|
||||
char *frameChar = NULL;
|
||||
UINT8 frameFrame = 0xFF;
|
||||
#ifdef ROTSPRITE
|
||||
INT16 frameXPivot = 0;
|
||||
INT16 frameYPivot = 0;
|
||||
rotaxis_t frameRotAxis = 0;
|
||||
#endif
|
||||
|
||||
// Sprite identifier
|
||||
sprinfoToken = M_GetToken(NULL);
|
||||
|
@ -828,7 +824,6 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
|
|||
}
|
||||
while (strcmp(sprinfoToken,"}")!=0)
|
||||
{
|
||||
#ifdef ROTSPRITE
|
||||
if (stricmp(sprinfoToken, "XPIVOT")==0)
|
||||
{
|
||||
Z_Free(sprinfoToken);
|
||||
|
@ -852,7 +847,6 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
|
|||
else if ((stricmp(sprinfoToken, "Z")==0) || (stricmp(sprinfoToken, "ZAXIS")==0) || (stricmp(sprinfoToken, "YAW")==0))
|
||||
frameRotAxis = ROTAXIS_Z;
|
||||
}
|
||||
#endif
|
||||
Z_Free(sprinfoToken);
|
||||
|
||||
sprinfoToken = M_GetToken(NULL);
|
||||
|
@ -866,11 +860,9 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
|
|||
}
|
||||
|
||||
// set fields
|
||||
#ifdef ROTSPRITE
|
||||
info->pivot[frameFrame].x = frameXPivot;
|
||||
info->pivot[frameFrame].y = frameYPivot;
|
||||
info->pivot[frameFrame].rotaxis = frameRotAxis;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1093,16 +1085,60 @@ void R_LoadSpriteInfoLumps(UINT16 wadnum, UINT16 numlumps)
|
|||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
||||
{
|
||||
name = lumpinfo->name;
|
||||
// load SPRTINFO lumps
|
||||
if (!stricmp(name, "SPRTINFO"))
|
||||
// Load SPRTINFO and SPR_ lumps as SpriteInfo
|
||||
if (!memcmp(name, "SPRTINFO", 8) || !memcmp(name, "SPR_", 4))
|
||||
R_ParseSPRTINFOLump(wadnum, i);
|
||||
// load SPR_ lumps (as DEHACKED lump)
|
||||
else if (!memcmp(name, "SPR_", 4))
|
||||
DEH_LoadDehackedLumpPwad(wadnum, i, false);
|
||||
}
|
||||
}
|
||||
|
||||
static UINT16 GetPatchPixel(patch_t *patch, INT32 x, INT32 y, boolean flip)
|
||||
{
|
||||
fixed_t ofs;
|
||||
column_t *column;
|
||||
UINT8 *source;
|
||||
|
||||
if (x >= 0 && x < SHORT(patch->width))
|
||||
{
|
||||
INT32 topdelta, prevdelta = -1;
|
||||
column = (column_t *)((UINT8 *)patch + LONG(patch->columnofs[flip ? (patch->width-1-x) : x]));
|
||||
while (column->topdelta != 0xff)
|
||||
{
|
||||
topdelta = column->topdelta;
|
||||
if (topdelta <= prevdelta)
|
||||
topdelta += prevdelta;
|
||||
prevdelta = topdelta;
|
||||
source = (UINT8 *)(column) + 3;
|
||||
for (ofs = 0; ofs < column->length; ofs++)
|
||||
{
|
||||
if ((topdelta + ofs) == y)
|
||||
return source[ofs];
|
||||
}
|
||||
column = (column_t *)((UINT8 *)column + column->length + 4);
|
||||
}
|
||||
}
|
||||
|
||||
return 0xFF00;
|
||||
}
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
//
|
||||
// R_GetRollAngle
|
||||
//
|
||||
// Angles precalculated in R_InitSprites.
|
||||
//
|
||||
fixed_t rollcosang[ROTANGLES];
|
||||
fixed_t rollsinang[ROTANGLES];
|
||||
INT32 R_GetRollAngle(angle_t rollangle)
|
||||
{
|
||||
INT32 ra = AngleFixed(rollangle)>>FRACBITS;
|
||||
#if (ROTANGDIFF > 1)
|
||||
ra += (ROTANGDIFF/2);
|
||||
#endif
|
||||
ra /= ROTANGDIFF;
|
||||
ra %= ROTANGLES;
|
||||
return ra;
|
||||
}
|
||||
|
||||
//
|
||||
// R_CacheRotSprite
|
||||
//
|
||||
|
@ -1114,8 +1150,8 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
INT32 angle;
|
||||
patch_t *patch;
|
||||
patch_t *newpatch;
|
||||
UINT16 *rawsrc, *rawdst;
|
||||
size_t size, size2;
|
||||
UINT16 *rawdst;
|
||||
size_t size;
|
||||
INT32 bflip = (flip != 0x00);
|
||||
|
||||
#define SPRITE_XCENTER (leftoffset)
|
||||
|
@ -1160,23 +1196,12 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
leftoffset = width - leftoffset;
|
||||
}
|
||||
|
||||
// Draw the sprite to a temporary buffer.
|
||||
size = (width*height);
|
||||
rawsrc = Z_Malloc(size * sizeof(UINT16), PU_STATIC, NULL);
|
||||
|
||||
// can't memset here
|
||||
for (i = 0; i < size; i++)
|
||||
rawsrc[i] = 0xFF00;
|
||||
|
||||
R_PatchToFlat_16bpp(patch, rawsrc, bflip);
|
||||
|
||||
// Don't cache angle = 0
|
||||
for (angle = 1; angle < ROTANGLES; angle++)
|
||||
{
|
||||
INT32 newwidth, newheight;
|
||||
|
||||
ca = cosang2rad[angle];
|
||||
sa = sinang2rad[angle];
|
||||
ca = rollcosang[angle];
|
||||
sa = rollsinang[angle];
|
||||
|
||||
// Find the dimensions of the rotated patch.
|
||||
{
|
||||
|
@ -1237,17 +1262,15 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
#undef BOUNDARYADJUST
|
||||
}
|
||||
|
||||
size2 = (newwidth * newheight);
|
||||
if (!size2)
|
||||
size2 = size;
|
||||
// Draw the rotated sprite to a temporary buffer.
|
||||
size = (newwidth * newheight);
|
||||
if (!size)
|
||||
size = (width * height);
|
||||
|
||||
rawdst = Z_Malloc(size2 * sizeof(UINT16), PU_STATIC, NULL);
|
||||
|
||||
// can't memset here
|
||||
for (i = 0; i < size2; i++)
|
||||
rawdst = Z_Malloc(size * sizeof(UINT16), PU_STATIC, NULL);
|
||||
for (i = 0; i < size; i++)
|
||||
rawdst[i] = 0xFF00;
|
||||
|
||||
// Draw the rotated sprite to a temporary buffer.
|
||||
for (dy = 0; dy < newheight; dy++)
|
||||
{
|
||||
for (dx = 0; dx < newwidth; dx++)
|
||||
|
@ -1259,7 +1282,7 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
sx >>= FRACBITS;
|
||||
sy >>= FRACBITS;
|
||||
if (sx >= 0 && sy >= 0 && sx < width && sy < height)
|
||||
rawdst[(dy*newwidth)+dx] = rawsrc[(sy*width)+sx];
|
||||
rawdst[(dy*newwidth)+dx] = GetPatchPixel(patch, sx, sy, bflip);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1296,7 +1319,6 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
sprframe->rotsprite.cached[rot] = true;
|
||||
|
||||
// free image data
|
||||
Z_Free(rawsrc);
|
||||
Z_Free(patch);
|
||||
}
|
||||
#undef SPRITE_XCENTER
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "doomdef.h"
|
||||
|
||||
// Structs
|
||||
#ifdef ROTSPRITE
|
||||
typedef enum
|
||||
{
|
||||
ROTAXIS_X, // Roll (the default)
|
||||
|
@ -31,13 +30,10 @@ typedef struct
|
|||
INT32 x, y;
|
||||
rotaxis_t rotaxis;
|
||||
} spriteframepivot_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifdef ROTSPRITE
|
||||
spriteframepivot_t pivot[64];
|
||||
#endif
|
||||
boolean available;
|
||||
} spriteinfo_t;
|
||||
|
||||
|
@ -66,11 +62,12 @@ void R_ParseSPRTINFOLump(UINT16 wadNum, UINT16 lumpNum);
|
|||
|
||||
// Sprite rotation
|
||||
#ifdef ROTSPRITE
|
||||
INT32 R_GetRollAngle(angle_t rollangle);
|
||||
void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, spriteframe_t *sprframe, INT32 rot, UINT8 flip);
|
||||
void R_FreeSingleRotSprite(spritedef_t *spritedef);
|
||||
void R_FreeSkinRotSprite(size_t skinnum);
|
||||
extern fixed_t cosang2rad[ROTANGLES];
|
||||
extern fixed_t sinang2rad[ROTANGLES];
|
||||
extern fixed_t rollcosang[ROTANGLES];
|
||||
extern fixed_t rollsinang[ROTANGLES];
|
||||
#endif
|
||||
|
||||
#endif // __R_PATCH__
|
||||
|
|
|
@ -500,7 +500,7 @@ void R_InitSprites(void)
|
|||
{
|
||||
size_t i;
|
||||
#ifdef ROTSPRITE
|
||||
INT32 angle, realangle = 0;
|
||||
INT32 angle;
|
||||
float fa;
|
||||
#endif
|
||||
|
||||
|
@ -508,12 +508,11 @@ void R_InitSprites(void)
|
|||
negonearray[i] = -1;
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
for (angle = 0; angle < ROTANGLES; angle++)
|
||||
for (angle = 1; angle < ROTANGLES; angle++)
|
||||
{
|
||||
fa = ANG2RAD(FixedAngle(realangle<<FRACBITS));
|
||||
cosang2rad[angle] = FLOAT_TO_FIXED(cos(-fa));
|
||||
sinang2rad[angle] = FLOAT_TO_FIXED(sin(-fa));
|
||||
realangle += ROTANGDIFF;
|
||||
fa = ANG2RAD(FixedAngle((ROTANGDIFF * angle)<<FRACBITS));
|
||||
rollcosang[angle] = FLOAT_TO_FIXED(cos(-fa));
|
||||
rollsinang[angle] = FLOAT_TO_FIXED(sin(-fa));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1127,8 +1126,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
fixed_t spr_offset, spr_topoffset;
|
||||
#ifdef ROTSPRITE
|
||||
patch_t *rotsprite = NULL;
|
||||
angle_t arollangle = thing->rollangle;
|
||||
UINT32 rollangle = AngleFixed(arollangle)>>FRACBITS;
|
||||
INT32 rollangle = 0;
|
||||
#endif
|
||||
|
||||
#ifndef PROPERPAPER
|
||||
|
@ -1260,11 +1258,11 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
spr_topoffset = spritecachedinfo[lump].topoffset;
|
||||
|
||||
#ifdef ROTSPRITE
|
||||
if (rollangle > 0)
|
||||
if (thing->rollangle)
|
||||
{
|
||||
rollangle = R_GetRollAngle(thing->rollangle);
|
||||
if (!sprframe->rotsprite.cached[rot])
|
||||
R_CacheRotSprite(thing->sprite, (thing->frame & FF_FRAMEMASK), sprinfo, sprframe, rot, flip);
|
||||
rollangle /= ROTANGDIFF;
|
||||
rotsprite = sprframe->rotsprite.patch[rot][rollangle];
|
||||
if (rotsprite != NULL)
|
||||
{
|
||||
|
@ -2839,7 +2837,7 @@ boolean R_SkinUsable(INT32 playernum, INT32 skinnum)
|
|||
{
|
||||
return ((skinnum == -1) // Simplifies things elsewhere, since there's already plenty of checks for less-than-0...
|
||||
|| (!skins[skinnum].availability)
|
||||
|| ((playernum != -1) ? (players[playernum].availabilities & (1 << skinnum)) : (unlockables[skins[skinnum].availability - 1].unlocked))
|
||||
|| (((netgame || multiplayer) && playernum != -1) ? (players[playernum].availabilities & (1 << skinnum)) : (unlockables[skins[skinnum].availability - 1].unlocked))
|
||||
|| (modeattacking) // If you have someone else's run you might as well take a look
|
||||
|| (Playing() && (R_SkinAvailable(mapheaderinfo[gamemap-1]->forcecharacter) == skinnum)) // Force 1.
|
||||
|| (netgame && (cv_forceskin.value == skinnum)) // Force 2.
|
||||
|
|
|
@ -20,12 +20,17 @@
|
|||
#include "../doomdef.h"
|
||||
#include "../m_argv.h"
|
||||
#include "../d_main.h"
|
||||
#include "../m_misc.h"/* path shit */
|
||||
#include "../i_system.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined (__GNUC__) || defined (__unix__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __unix__
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "time.h" // For log timestamps
|
||||
|
||||
#ifdef HAVE_SDL
|
||||
|
@ -47,7 +52,7 @@ extern int SDL_main(int argc, char *argv[]);
|
|||
|
||||
#ifdef LOGMESSAGES
|
||||
FILE *logstream = NULL;
|
||||
char logfilename[1024];
|
||||
char logfilename[1024];
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN
|
||||
|
@ -133,34 +138,86 @@ int main(int argc, char **argv)
|
|||
{
|
||||
time_t my_time;
|
||||
struct tm * timeinfo;
|
||||
char buf[26];
|
||||
const char *format;
|
||||
const char *reldir;
|
||||
int left;
|
||||
boolean fileabs;
|
||||
#ifdef __unix__
|
||||
const char *link;
|
||||
#endif
|
||||
|
||||
logdir = D_Home();
|
||||
|
||||
my_time = time(NULL);
|
||||
timeinfo = localtime(&my_time);
|
||||
|
||||
strftime(buf, 26, "%Y-%m-%d %H-%M-%S", timeinfo);
|
||||
strcpy(logfilename, va("log-%s.txt", buf));
|
||||
|
||||
#ifdef DEFAULTDIR
|
||||
if (logdir)
|
||||
if (M_CheckParm("-logfile") && M_IsNextParm())
|
||||
{
|
||||
// Create dirs here because D_SRB2Main() is too late.
|
||||
I_mkdir(va("%s%s"DEFAULTDIR, logdir, PATHSEP), 0755);
|
||||
I_mkdir(va("%s%s"DEFAULTDIR"%slogs",logdir, PATHSEP, PATHSEP), 0755);
|
||||
strcpy(logfilename, va("%s%s"DEFAULTDIR"%slogs%s%s",logdir, PATHSEP, PATHSEP, PATHSEP, logfilename));
|
||||
format = M_GetNextParm();
|
||||
fileabs = M_IsPathAbsolute(format);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
I_mkdir("."PATHSEP"logs"PATHSEP, 0755);
|
||||
strcpy(logfilename, va("."PATHSEP"logs"PATHSEP"%s", logfilename));
|
||||
format = "log-%Y-%m-%d_%H-%M-%S.txt";
|
||||
fileabs = false;
|
||||
}
|
||||
|
||||
logstream = fopen(logfilename, "wt");
|
||||
if (fileabs)
|
||||
{
|
||||
strftime(logfilename, sizeof logfilename, format, timeinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (M_CheckParm("-logdir") && M_IsNextParm())
|
||||
reldir = M_GetNextParm();
|
||||
else
|
||||
reldir = "logs";
|
||||
|
||||
if (M_IsPathAbsolute(reldir))
|
||||
{
|
||||
left = snprintf(logfilename, sizeof logfilename,
|
||||
"%s"PATHSEP, reldir);
|
||||
}
|
||||
else
|
||||
#ifdef DEFAULTDIR
|
||||
if (logdir)
|
||||
{
|
||||
left = snprintf(logfilename, sizeof logfilename,
|
||||
"%s"PATHSEP DEFAULTDIR PATHSEP"%s"PATHSEP, logdir, reldir);
|
||||
}
|
||||
else
|
||||
#endif/*DEFAULTDIR*/
|
||||
{
|
||||
left = snprintf(logfilename, sizeof logfilename,
|
||||
"."PATHSEP"%s"PATHSEP, reldir);
|
||||
}
|
||||
#endif/*LOGMESSAGES*/
|
||||
|
||||
strftime(&logfilename[left], sizeof logfilename - left,
|
||||
format, timeinfo);
|
||||
}
|
||||
|
||||
M_MkdirEachUntil(logfilename,
|
||||
M_PathParts(logdir) - 1,
|
||||
M_PathParts(logfilename) - 1, 0755);
|
||||
|
||||
#ifdef __unix__
|
||||
logstream = fopen(logfilename, "w");
|
||||
#ifdef DEFAULTDIR
|
||||
if (logdir)
|
||||
link = va("%s/"DEFAULTDIR"/latest-log.txt", logdir);
|
||||
else
|
||||
#endif/*DEFAULTDIR*/
|
||||
link = "latest-log.txt";
|
||||
unlink(link);
|
||||
if (symlink(logfilename, link) == -1)
|
||||
{
|
||||
I_OutputMsg("Error symlinking latest-log.txt: %s\n", strerror(errno));
|
||||
}
|
||||
#else/*__unix__*/
|
||||
logstream = fopen("latest-log.txt", "wt+");
|
||||
#endif/*__unix__*/
|
||||
}
|
||||
#endif
|
||||
|
||||
//I_OutputMsg("I_StartupSystem() ...\n");
|
||||
I_StartupSystem();
|
||||
|
|
|
@ -2484,6 +2484,48 @@ void I_RemoveExitFunc(void (*func)())
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef __unix__
|
||||
static void Shittycopyerror(const char *name)
|
||||
{
|
||||
I_OutputMsg(
|
||||
"Error copying log file: %s: %s\n",
|
||||
name,
|
||||
strerror(errno)
|
||||
);
|
||||
}
|
||||
|
||||
static void Shittylogcopy(void)
|
||||
{
|
||||
char buf[8192];
|
||||
FILE *fp;
|
||||
size_t r;
|
||||
if (fseek(logstream, 0, SEEK_SET) == -1)
|
||||
{
|
||||
Shittycopyerror("fseek");
|
||||
}
|
||||
else if (( fp = fopen(logfilename, "wt") ))
|
||||
{
|
||||
while (( r = fread(buf, 1, sizeof buf, logstream) ))
|
||||
{
|
||||
if (fwrite(buf, 1, r, fp) < r)
|
||||
{
|
||||
Shittycopyerror("fwrite");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ferror(logstream))
|
||||
{
|
||||
Shittycopyerror("fread");
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
Shittycopyerror(logfilename);
|
||||
}
|
||||
}
|
||||
#endif/*__unix__*/
|
||||
|
||||
//
|
||||
// Closes down everything. This includes restoring the initial
|
||||
// palette and video mode, and removing whatever mouse, keyboard, and
|
||||
|
@ -2506,6 +2548,9 @@ void I_ShutdownSystem(void)
|
|||
if (logstream)
|
||||
{
|
||||
I_OutputMsg("I_ShutdownSystem(): end of logstream.\n");
|
||||
#ifndef __unix__
|
||||
Shittylogcopy();
|
||||
#endif
|
||||
fclose(logstream);
|
||||
logstream = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue