Changed, Directory/PK3/PK7: on second thought, we don't need to load textures/flats from all possible locations (does anyone really needs to see sprites and graphics in the texture browser?), so this logic now only works when looking for patches.

Game Configurations: added "Custom Ambient Sound (no gravity)":14067, added a couple of missing parameters to other sound-related things.
This commit is contained in:
MaxED 2014-10-13 09:32:55 +00:00
parent 0cfb0207fb
commit 7a9e01c098
6 changed files with 88 additions and 75 deletions

View file

@ -712,6 +712,16 @@ enums
315 = "315: 9 Seconds"; 315 = "315: 9 Seconds";
350 = "350: 10 Seconds"; 350 = "350: 10 Seconds";
} }
sound_volume
{
0 = "Default";
10 = "10%";
25 = "25%";
50 = "50%";
75 = "75%";
100 = "100%";
}
} }
enums_doom enums_doom

View file

@ -75,10 +75,15 @@ zdoom
1409 = "Sound Sequence 9"; 1409 = "Sound Sequence 9";
1411 1411
{ {
title = "Sound Sequence args[0]"; title = "Sector Sound Sequence Override";
arg0 arg0
{ {
title = "Sound sequence index"; title = "Sound sequence index";
type = 11;
enum
{
255 = "Default";
}
} }
} }
14001 = "Ambient Sound 01"; 14001 = "Ambient Sound 01";
@ -147,19 +152,67 @@ zdoom
14064 = "Ambient Sound 64"; 14064 = "Ambient Sound 64";
14065 14065
{ {
title = "Ambient Sound args[0]"; title = "Custom Ambient Sound";
arg0 arg0
{ {
title = "Ambient sound index"; title = "Ambient sound index";
} }
arg1
{
title = "Volume";
type = 11;
enum = "sound_volume";
}
arg2
{
title = "Min. fading distance";
}
arg3
{
title = "Max. heard distance";
}
arg4
{
title = "Scale multiplier";
}
} }
14066 14066
{ {
title = "Ambient Sound Sequence args[0]"; title = "Sound Sequence";
arg0 arg0
{ {
title = "Sound sequence index"; title = "Sound sequence index";
} }
arg1
{
title = "Choice";
}
}
14067
{
title = "Custom Ambient Sound (no gravity)";
arg0
{
title = "Ambient sound index";
}
arg1
{
title = "Volume";
type = 11;
enum = "sound_volume";
}
arg2
{
title = "Min. fading distance";
}
arg3
{
title = "Max. heard distance";
}
arg4
{
title = "Scale multiplier";
}
} }
14101 = "Music Changer 01"; 14101 = "Music Changer 01";
14102 = "Music Changer 02"; 14102 = "Music Changer 02";
@ -227,7 +280,7 @@ zdoom
14164 = "Music Changer 64"; 14164 = "Music Changer 64";
14165 14165
{ {
title = "Music Changer args[0]"; title = "Custom Music Changer";
arg0 arg0
{ {
title = "MUSINFO track index"; title = "MUSINFO track index";
@ -404,6 +457,11 @@ zdoom
} }
} }
} }
9083
{
title = "Eternity Skybox Viewpoint";
sprite = "internal:SkyboxViewpoint";
}
9074 9074
{ {
title = "Actor Mover"; title = "Actor Mover";
@ -411,6 +469,7 @@ zdoom
arg0 arg0
{ {
title = "Interp. Point Tag"; title = "Interp. Point Tag";
type = 14;
} }
arg1 arg1
{ {
@ -454,6 +513,7 @@ zdoom
arg3 arg3
{ {
title = "Next Point Tag"; title = "Next Point Tag";
type = 14;
} }
arg4 arg4
{ {
@ -471,6 +531,7 @@ zdoom
arg0 arg0
{ {
title = "Interp. Point Tag"; title = "Interp. Point Tag";
type = 14;
} }
arg1 arg1
{ {
@ -502,6 +563,7 @@ zdoom
arg0 arg0
{ {
title = "Interp. Point Tag"; title = "Interp. Point Tag";
type = 14;
} }
arg1 arg1
{ {

View file

@ -127,27 +127,11 @@ namespace CodeImp.DoomBuilder.Data
try try
{ {
if (General.Map.Config.MixTexturesFlats) // Find in textures directory
{ string path = Path.Combine(TEXTURES_DIR, Path.GetDirectoryName(pname));
//mxd. Find in directories ZDoom expects them to be string filename = FindFirstFile(path, Path.GetFileName(pname), true);
string dir = Path.GetDirectoryName(pname); if(!string.IsNullOrEmpty(filename) && FileExists(filename))
string name = Path.GetFileName(pname); return LoadFile(filename);
foreach (string loc in TextureLocations)
{
string path = Path.Combine(loc, dir);
string filename = FindFirstFile(path, name, true);
if(!string.IsNullOrEmpty(filename) && FileExists(filename))
return LoadFile(filename);
}
}
else
{
// Find in textures directory
string path = Path.Combine(TEXTURES_DIR, Path.GetDirectoryName(pname));
string filename = FindFirstFile(path, Path.GetFileName(pname), true);
if(!string.IsNullOrEmpty(filename) && FileExists(filename))
return LoadFile(filename);
}
} }
catch(Exception e) catch(Exception e)
{ {

View file

@ -88,14 +88,6 @@ namespace CodeImp.DoomBuilder.Data
data.Seek(0, SeekOrigin.Begin); data.Seek(0, SeekOrigin.Begin);
DoomPictureReader picreader = new DoomPictureReader(palette); DoomPictureReader picreader = new DoomPictureReader(palette);
if(picreader.Validate(data)) return picreader; if(picreader.Validate(data)) return picreader;
// Also check if data is valid for a doom flat... (mxd)
if (General.Map.Config.MixTexturesFlats)
{
data.Seek(0, SeekOrigin.Begin);
DoomFlatReader flatpicreader = new DoomFlatReader(palette);
if(flatpicreader.Validate(data)) return flatpicreader;
}
break; break;
case DOOMFLAT: case DOOMFLAT:
@ -103,14 +95,6 @@ namespace CodeImp.DoomBuilder.Data
data.Seek(0, SeekOrigin.Begin); data.Seek(0, SeekOrigin.Begin);
DoomFlatReader flatreader = new DoomFlatReader(palette); DoomFlatReader flatreader = new DoomFlatReader(palette);
if(flatreader.Validate(data)) return flatreader; if(flatreader.Validate(data)) return flatreader;
// Also check if data is valid for a doom picture... (mxd)
if (General.Map.Config.MixTexturesFlats)
{
data.Seek(0, SeekOrigin.Begin);
DoomPictureReader picflatreader = new DoomPictureReader(palette);
if(picflatreader.Validate(data)) return picflatreader;
}
break; break;
case DOOMCOLORMAP: case DOOMCOLORMAP:

View file

@ -158,23 +158,10 @@ namespace CodeImp.DoomBuilder.Data
if(data != null) return data; if(data != null) return data;
} }
if(General.Map.Config.MixTexturesFlats) // Find in textures directory
{ string filename = FindFirstFile(TEXTURES_DIR, pname, true);
//mxd. Find in directories ZDoom expects them to be if(!string.IsNullOrEmpty(filename) && FileExists(filename))
foreach(string loc in TextureLocations) return LoadFile(filename);
{
string filename = FindFirstFile(loc, pname, true);
if(!string.IsNullOrEmpty(filename) && FileExists(filename))
return LoadFile(filename);
}
}
else
{
// Find in textures directory
string filename = FindFirstFile(TEXTURES_DIR, pname, true);
if(!string.IsNullOrEmpty(filename) && FileExists(filename))
return LoadFile(filename);
}
// Nothing found // Nothing found
return null; return null;

View file

@ -55,8 +55,6 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Properties #region ================== Properties
protected readonly string[] PatchLocations = { PATCHES_DIR, TEXTURES_DIR, FLATS_DIR, SPRITES_DIR, GRAPHICS_DIR }; //mxd. Because ZDoom looks for patches and sprites in this order protected readonly string[] PatchLocations = { PATCHES_DIR, TEXTURES_DIR, FLATS_DIR, SPRITES_DIR, GRAPHICS_DIR }; //mxd. Because ZDoom looks for patches and sprites in this order
protected readonly string[] TextureLocations = { TEXTURES_DIR, FLATS_DIR, SPRITES_DIR, PATCHES_DIR, GRAPHICS_DIR }; //mxd. Because ZDoom looks for textures in this order
protected readonly int[] TextureFormats = { ImageDataFormat.DOOMPICTURE, ImageDataFormat.DOOMFLAT, ImageDataFormat.DOOMPICTURE, ImageDataFormat.DOOMPICTURE, ImageDataFormat.DOOMPICTURE }; //mxd
#endregion #endregion
@ -321,21 +319,9 @@ namespace CodeImp.DoomBuilder.Data
AddImagesToList(images, collection); AddImagesToList(images, collection);
} }
if (General.Map.Config.MixTexturesFlats) // Add images from flats directory
{ collection = LoadDirectoryImages(FLATS_DIR, ImageDataFormat.DOOMFLAT, true);
//mxd. Load from directories ZDoom expects them to be AddImagesToList(images, collection);
for(int i = 0; i < TextureLocations.Length; i++)
{
collection = LoadDirectoryImages(TextureLocations[i], TextureFormats[i], true);
AddImagesToList(images, collection);
}
}
else
{
// Add images from flats directory
collection = LoadDirectoryImages(FLATS_DIR, ImageDataFormat.DOOMFLAT, true);
AddImagesToList(images, collection);
}
// Load TEXTURES lump file // Load TEXTURES lump file
string[] alltexturefiles = GetAllFilesWhichTitleStartsWith("", "TEXTURES"); //mxd string[] alltexturefiles = GetAllFilesWhichTitleStartsWith("", "TEXTURES"); //mxd