mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
- backend update from GZDoom.
Fixes: * do not strip 'filter' as a directory prefix. * proper spacing for scaled sheet fonts. * fix of transparent color in BMF fonts. * fix restart button on error pane in Windows. * do not skip over empty 'if's with a condition that would error out.
This commit is contained in:
parent
888f8888bb
commit
8106d788f6
10 changed files with 34 additions and 13 deletions
|
@ -234,6 +234,8 @@ bool FZipFile::Open(bool quiet, LumpFilterInfo* filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
name.ToLower();
|
name.ToLower();
|
||||||
|
if (name.IndexOf("filter/") == 0)
|
||||||
|
continue; // 'filter' is a reserved name of the file system.
|
||||||
if (name.IndexOf("__macosx") == 0)
|
if (name.IndexOf("__macosx") == 0)
|
||||||
continue; // skip Apple garbage. At this stage only the root folder matters.
|
continue; // skip Apple garbage. At this stage only the root folder matters.
|
||||||
if (!foundprefix)
|
if (!foundprefix)
|
||||||
|
|
|
@ -437,7 +437,7 @@ void FFont::ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height
|
||||||
Chars[i].OriginalPic->CopySize(*lump, true);
|
Chars[i].OriginalPic->CopySize(*lump, true);
|
||||||
if (Chars[i].OriginalPic != *lump) TexMan.AddGameTexture(Chars[i].OriginalPic);
|
if (Chars[i].OriginalPic != *lump) TexMan.AddGameTexture(Chars[i].OriginalPic);
|
||||||
}
|
}
|
||||||
Chars[i].XMove = width;
|
Chars[i].XMove = int(width / Scale.X);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (map1252)
|
if (map1252)
|
||||||
|
|
|
@ -407,6 +407,7 @@ void FSingleLumpFont::LoadBMF(int lump, const uint8_t *data)
|
||||||
count = LastChar - FirstChar + 1;
|
count = LastChar - FirstChar + 1;
|
||||||
Chars.Resize(count);
|
Chars.Resize(count);
|
||||||
// BMF palettes are only six bits per component. Fix that.
|
// BMF palettes are only six bits per component. Fix that.
|
||||||
|
Palette[0] = 0;
|
||||||
for (i = 0; i < ActiveColors; ++i)
|
for (i = 0; i < ActiveColors; ++i)
|
||||||
{
|
{
|
||||||
int r = (data[17 + i * 3] << 2) | (data[17 + i * 3] >> 4);
|
int r = (data[17 + i * 3] << 2) | (data[17 + i * 3] >> 4);
|
||||||
|
|
|
@ -131,7 +131,7 @@ static bool ReadSystemVersionFromPlist(NSOperatingSystemVersion& version)
|
||||||
if (const char *patchVersionString = strstr(minorVersionString, "."))
|
if (const char *patchVersionString = strstr(minorVersionString, "."))
|
||||||
{
|
{
|
||||||
patchVersionString++;
|
patchVersionString++;
|
||||||
plistVersion.patchVersion = atoi(minorVersionString);
|
plistVersion.patchVersion = atoi(patchVersionString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ void I_PrintStr(const char *cp)
|
||||||
{ // gray
|
{ // gray
|
||||||
if (v < 0.33) attrib = 0x8;
|
if (v < 0.33) attrib = 0x8;
|
||||||
else if (v < 0.90) attrib = 0x7;
|
else if (v < 0.90) attrib = 0x7;
|
||||||
else attrib = 0x15;
|
else attrib = 0xF;
|
||||||
}
|
}
|
||||||
|
|
||||||
printData.AppendFormat("\033[%um",((attrib & 0x8) ? 90 : 30) + (attrib & 0x7));
|
printData.AppendFormat("\033[%um",((attrib & 0x8) ? 90 : 30) + (attrib & 0x7));
|
||||||
|
|
|
@ -545,6 +545,20 @@ LRESULT CALLBACK LConProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
bool restartrequest;
|
||||||
|
|
||||||
|
void CheckForRestart()
|
||||||
|
{
|
||||||
|
if (restartrequest)
|
||||||
|
{
|
||||||
|
HMODULE hModule = GetModuleHandleW(NULL);
|
||||||
|
WCHAR path[MAX_PATH];
|
||||||
|
GetModuleFileNameW(hModule, path, MAX_PATH);
|
||||||
|
ShellExecuteW(NULL, L"open", path, GetCommandLineW(), NULL, SW_SHOWNORMAL);
|
||||||
|
}
|
||||||
|
restartrequest = false;
|
||||||
|
}
|
||||||
|
|
||||||
INT_PTR CALLBACK ErrorPaneProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
INT_PTR CALLBACK ErrorPaneProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (msg)
|
switch (msg)
|
||||||
|
@ -559,11 +573,7 @@ INT_PTR CALLBACK ErrorPaneProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
{
|
{
|
||||||
if (LOWORD(wParam) == IDC_BUTTON1) // we pressed the restart button, so run GZDoom again
|
if (LOWORD(wParam) == IDC_BUTTON1) // we pressed the restart button, so run GZDoom again
|
||||||
{
|
{
|
||||||
HMODULE hModule = GetModuleHandleW(NULL);
|
restartrequest = true;
|
||||||
WCHAR path[MAX_PATH];
|
|
||||||
GetModuleFileNameW(hModule, path, MAX_PATH);
|
|
||||||
|
|
||||||
ShellExecuteW(NULL, L"open", path, GetCommandLineW(), NULL, SW_SHOWNORMAL);
|
|
||||||
}
|
}
|
||||||
PostQuitMessage (0);
|
PostQuitMessage (0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -969,6 +979,8 @@ int DoMain (HINSTANCE hInstance)
|
||||||
atexit (UnCOM);
|
atexit (UnCOM);
|
||||||
|
|
||||||
int ret = GameMain ();
|
int ret = GameMain ();
|
||||||
|
CheckForRestart();
|
||||||
|
|
||||||
DestroyCustomCursor();
|
DestroyCustomCursor();
|
||||||
if (ret == 1337) // special exit code for 'norun'.
|
if (ret == 1337) // special exit code for 'norun'.
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "hw_dynlightdata.h"
|
#include "hw_dynlightdata.h"
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "shaderuniforms.h"
|
#include "shaderuniforms.h"
|
||||||
|
#include "g_cvars.h"
|
||||||
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -98,7 +99,7 @@ bool IShadowMap::PerformUpdate()
|
||||||
LightsProcessed = 0;
|
LightsProcessed = 0;
|
||||||
LightsShadowmapped = 0;
|
LightsShadowmapped = 0;
|
||||||
|
|
||||||
if (gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && CollectLights != nullptr)
|
if (gl_lights && gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && CollectLights != nullptr)
|
||||||
{
|
{
|
||||||
UpdateCycles.Clock();
|
UpdateCycles.Clock();
|
||||||
UploadAABBTree();
|
UploadAABBTree();
|
||||||
|
|
|
@ -57,6 +57,11 @@ public:
|
||||||
mLights[index + 3] = r;
|
mLights[index + 3] = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Enabled() const
|
||||||
|
{
|
||||||
|
return mAABBTree != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Upload the AABB-tree to the GPU
|
// Upload the AABB-tree to the GPU
|
||||||
void UploadAABBTree();
|
void UploadAABBTree();
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
#include "i_interface.h"
|
#include "i_interface.h"
|
||||||
|
|
||||||
// Set up 3D-specific console variables:
|
// Set up 3D-specific console variables:
|
||||||
CVAR(Int, vr_mode, 0, CVAR_GLOBALCONFIG)
|
CVAR(Int, vr_mode, 0, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
||||||
|
|
||||||
// switch left and right eye views
|
// switch left and right eye views
|
||||||
CVAR(Bool, vr_swap_eyes, false, CVAR_GLOBALCONFIG)
|
CVAR(Bool, vr_swap_eyes, false, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
||||||
|
|
||||||
// intraocular distance in meters
|
// intraocular distance in meters
|
||||||
CVAR(Float, vr_ipd, 0.062f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // METERS
|
CVAR(Float, vr_ipd, 0.062f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // METERS
|
||||||
|
|
|
@ -9823,6 +9823,8 @@ FxExpression *FxIfStatement::Resolve(FCompileContext &ctx)
|
||||||
{
|
{
|
||||||
CHECKRESOLVED();
|
CHECKRESOLVED();
|
||||||
|
|
||||||
|
SAFE_RESOLVE(Condition, ctx);
|
||||||
|
|
||||||
if (WhenTrue == nullptr && WhenFalse == nullptr)
|
if (WhenTrue == nullptr && WhenFalse == nullptr)
|
||||||
{ // We don't do anything either way, so disappear
|
{ // We don't do anything either way, so disappear
|
||||||
delete this;
|
delete this;
|
||||||
|
@ -9830,8 +9832,6 @@ FxExpression *FxIfStatement::Resolve(FCompileContext &ctx)
|
||||||
return new FxNop(ScriptPosition);
|
return new FxNop(ScriptPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAFE_RESOLVE(Condition, ctx);
|
|
||||||
|
|
||||||
if (Condition->ValueType != TypeBool)
|
if (Condition->ValueType != TypeBool)
|
||||||
{
|
{
|
||||||
Condition = new FxBoolCast(Condition, false);
|
Condition = new FxBoolCast(Condition, false);
|
||||||
|
|
Loading…
Reference in a new issue