mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Backend update from GZDoom.
Mainly fixing CVar setup.
This commit is contained in:
parent
427e41d388
commit
861423248f
3 changed files with 26 additions and 13 deletions
|
@ -102,16 +102,6 @@ void C_InitCVars(int which)
|
|||
newcvar = new FStringCVar(cvInfo->name, cvInfo->defaultval.String, cvInfo->flags, reinterpret_cast<callbacktype>(cvInfo->callbackp), cvInfo->description);
|
||||
break;
|
||||
}
|
||||
case CVAR_Flag:
|
||||
{
|
||||
newcvar = new FFlagCVar(cvInfo->name, *cvInfo->defaultval.Pointer->get(), cvInfo->flags, cvInfo->description);
|
||||
break;
|
||||
}
|
||||
case CVAR_Mask:
|
||||
{
|
||||
newcvar = new FMaskCVar(cvInfo->name, *cvInfo->defaultval.Pointer->get(), cvInfo->flags, cvInfo->description);
|
||||
break;
|
||||
}
|
||||
case CVAR_Color:
|
||||
{
|
||||
using callbacktype = void (*)(FColorCVar &);
|
||||
|
@ -122,6 +112,28 @@ void C_InitCVars(int which)
|
|||
}
|
||||
*(void**)cvInfo->refAddr = newcvar;
|
||||
});
|
||||
AutoSegs::CVarDecl.ForEach([](FCVarDecl* cvInfo)
|
||||
{
|
||||
FBaseCVar* newcvar;
|
||||
switch (cvInfo->type)
|
||||
{
|
||||
default:
|
||||
return;
|
||||
|
||||
case CVAR_Flag:
|
||||
{
|
||||
newcvar = new FFlagCVar(cvInfo->name, *cvInfo->defaultval.Pointer->get(), cvInfo->flags, cvInfo->description);
|
||||
break;
|
||||
}
|
||||
case CVAR_Mask:
|
||||
{
|
||||
newcvar = new FMaskCVar(cvInfo->name, *cvInfo->defaultval.Pointer->get(), cvInfo->flags, cvInfo->description);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
*(void**)cvInfo->refAddr = newcvar;
|
||||
});
|
||||
}
|
||||
|
||||
void C_UninitCVars()
|
||||
|
|
|
@ -84,8 +84,8 @@ VkImageTransition& VkImageTransition::AddImage(VkTextureImage *image, VkImageLay
|
|||
dstStageMask |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
break;
|
||||
case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
|
||||
srcAccess = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
|
||||
srcStageMask |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
|
||||
dstAccess = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
|
||||
dstStageMask |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
|
||||
break;
|
||||
default:
|
||||
I_FatalError("Unimplemented dst image layout transition\n");
|
||||
|
|
|
@ -66,7 +66,8 @@ FImageSource *AnmImage_TryCreate(FileReader & file, int lumpnum)
|
|||
{
|
||||
file.Seek(0, FileReader::SeekSet);
|
||||
char check[4];
|
||||
file.Read(check, 4);
|
||||
auto num = file.Read(check, 4);
|
||||
if (num < 4) return nullptr;
|
||||
if (memcmp(check, "LPF ", 4)) return nullptr;
|
||||
file.Seek(0, FileReader::SeekSet);
|
||||
auto buffer = file.ReadPadded(1);
|
||||
|
|
Loading…
Reference in a new issue