mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- backend update from GZDoom.
The main bulk of this is the new start screen code. To make this work in Raze some more work on the startup procedure is needed. What this does provide is support for the DOS end-of-game text screens in Duke and SW on non-Windows systems.
This commit is contained in:
parent
47aa110441
commit
84173ee09b
95 changed files with 4001 additions and 3209 deletions
|
@ -11158,7 +11158,7 @@ ExpEmit FxLocalArrayDeclaration::Emit(VMFunctionBuilder *build)
|
|||
|
||||
auto zero = build->GetConstantInt(0);
|
||||
auto elementSizeConst = build->GetConstantInt(static_cast<PArray *>(ValueType)->ElementSize);
|
||||
int arrOffsetReg;
|
||||
int arrOffsetReg = 0;
|
||||
if (!isDynamicArray)
|
||||
{
|
||||
arrOffsetReg = build->Registers[REGT_POINTER].Get(1);
|
||||
|
|
|
@ -421,6 +421,45 @@ PNamespace *ParseOneScript(const int baselump, ZCCParseState &state)
|
|||
for (unsigned i = 0; i < Includes.Size(); i++)
|
||||
{
|
||||
lumpnum = fileSystem.CheckNumForFullName(Includes[i], true);
|
||||
if (lumpnum == -1 && ( Includes[i].IndexOf("./") == 0 || Includes[i].IndexOf("../") == 0 ) ) // relative path resolving
|
||||
{
|
||||
FString fullPath = IncludeLocs[i].FileName.GetChars(); // get full path, format 'wad:filepath/filename'
|
||||
|
||||
long start = fullPath.IndexOf(":"); // find first ':'
|
||||
|
||||
long end = fullPath.LastIndexOf("/"); // find last '/'
|
||||
|
||||
if (start!=-1&&end!=-1)
|
||||
{
|
||||
FString resolvedPath = fullPath.Mid(start + 1, end - start - 1); // extract filepath from string
|
||||
FString relativePath = Includes[i];
|
||||
if ( relativePath.IndexOf("./") == 0 ) // strip initial marker
|
||||
{
|
||||
relativePath = relativePath.Mid(2);
|
||||
}
|
||||
|
||||
bool pathOk = true;
|
||||
|
||||
while (relativePath.IndexOf("../") == 0) // go back one folder for each '..'
|
||||
{
|
||||
relativePath = relativePath.Mid(3);
|
||||
long slash_index = resolvedPath.LastIndexOf("/");
|
||||
if (slash_index != -1) {
|
||||
resolvedPath = resolvedPath.Mid(0,slash_index);
|
||||
} else {
|
||||
pathOk = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( pathOk ) // if '..' parsing was successful
|
||||
{
|
||||
resolvedPath += "/" + relativePath; // add relative path
|
||||
|
||||
lumpnum = fileSystem.CheckNumForFullName(resolvedPath, true); // check for relative include
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (lumpnum == -1)
|
||||
{
|
||||
IncludeLocs[i].Message(MSG_ERROR, "Include script lump %s not found", Includes[i].GetChars());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue