- Added actor replacement for DECORATE. This works at a higher level than
using duplicate DoomEdNums and will affect all attempts to spawn the
replaced actor. However, because this happens for all spawns and not just
at map load, the replacing actor must be compatible with the replaced
actor, which means that an actor can only serve as a replacement for one
of its baseclasses. For example, if you want to use a modified imp, you can
use this DECORATE:
actor MyImp : DoomImp replaces DoompImp
{
// Put changed properties here
}
- New: The IWAD dialog now remembers the last IWAD you picked and
automatically highlights it the next time you run the game. This also
applies if you check "Don't ask me this again": The IWAD selected will be
the one that gets automatically loaded, not the one located first. (Using
the -iwad parameter will not change the default IWAD.) In addition, you
can now bring the dialog up even if you disable it by holding down SHIFT
during startup.
- Changed ExtractFilePath() and ExtractFileBase() to return FStrings instead
of writing to a provided output buffer. ExtractFileBase() can also
optionally keep the file's extension in the result.
- Removed the -heapsize parameter entirely. The informational message should
no longer be needed.
- Removed -maxdemo parameter. There's no point to having it around since
the demo buffer grows automatically.
SVN r238 (trunk)
This commit is contained in:
parent
43c1ec4a74
commit
6695e255ce
20 changed files with 449 additions and 307 deletions
|
|
@ -166,7 +166,7 @@ Extract file parts
|
|||
*/
|
||||
// FIXME: should include the slash, otherwise
|
||||
// backing to an empty path will be wrong when appending a slash
|
||||
void ExtractFilePath (const char *path, char *dest)
|
||||
FString ExtractFilePath (const char *path)
|
||||
{
|
||||
const char *src;
|
||||
|
||||
|
|
@ -178,13 +178,12 @@ void ExtractFilePath (const char *path, char *dest)
|
|||
while (src != path && !IsSeperator(*(src-1)))
|
||||
src--;
|
||||
|
||||
memcpy (dest, path, src-path);
|
||||
dest[src-path] = 0;
|
||||
return FString(path, src - path);
|
||||
}
|
||||
|
||||
void ExtractFileBase (const char *path, char *dest)
|
||||
FString ExtractFileBase (const char *path, bool include_extension)
|
||||
{
|
||||
const char *src;
|
||||
const char *src, *dot;
|
||||
|
||||
src = path + strlen(path) - 1;
|
||||
|
||||
|
|
@ -203,12 +202,21 @@ void ExtractFileBase (const char *path, char *dest)
|
|||
}
|
||||
#endif
|
||||
|
||||
while (*src && *src != '.')
|
||||
if (!include_extension)
|
||||
{
|
||||
*dest++ = *src++;
|
||||
dot = src;
|
||||
while (*dot && *dot != '.')
|
||||
{
|
||||
dot++;
|
||||
}
|
||||
return FString(src, dot - src);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FString(src);
|
||||
}
|
||||
}
|
||||
*dest = 0;
|
||||
return FString();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue