# Conflicts: # src/v_video.cpp
This commit is contained in:
commit
a78b713f4b
701 changed files with 75679 additions and 59327 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include "i_video.h"
|
||||
#include "v_video.h"
|
||||
#include "v_text.h"
|
||||
#include "sc_man.h"
|
||||
|
||||
#include "w_wad.h"
|
||||
|
||||
|
|
@ -69,8 +70,8 @@ int active_con_scale();
|
|||
|
||||
FRenderer *Renderer;
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS (DCanvas)
|
||||
IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer)
|
||||
IMPLEMENT_CLASS(DCanvas, true, false)
|
||||
IMPLEMENT_CLASS(DFrameBuffer, true, false)
|
||||
EXTERN_CVAR (Bool, swtruecolor)
|
||||
|
||||
#if defined(_DEBUG) && defined(_M_IX86) && !defined(__MINGW32__)
|
||||
|
|
@ -107,11 +108,11 @@ public:
|
|||
|
||||
float Gamma;
|
||||
};
|
||||
IMPLEMENT_ABSTRACT_CLASS (DDummyFrameBuffer)
|
||||
IMPLEMENT_CLASS(DDummyFrameBuffer, true, false)
|
||||
|
||||
// SimpleCanvas is not really abstract, but this macro does not
|
||||
// try to generate a CreateNew() function.
|
||||
IMPLEMENT_ABSTRACT_CLASS (DSimpleCanvas)
|
||||
IMPLEMENT_CLASS(DSimpleCanvas, true, false)
|
||||
|
||||
class FPaletteTester : public FTexture
|
||||
{
|
||||
|
|
@ -477,7 +478,7 @@ void DCanvas::ReleaseScreenshotBuffer()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int V_GetColorFromString (const DWORD *palette, const char *cstr)
|
||||
int V_GetColorFromString (const DWORD *palette, const char *cstr, FScriptPosition *sc)
|
||||
{
|
||||
int c[3], i, p;
|
||||
char val[3];
|
||||
|
|
@ -496,7 +497,7 @@ int V_GetColorFromString (const DWORD *palette, const char *cstr)
|
|||
{
|
||||
val[0] = cstr[1 + i*2];
|
||||
val[1] = cstr[2 + i*2];
|
||||
c[i] = ParseHex (val);
|
||||
c[i] = ParseHex (val, sc);
|
||||
}
|
||||
}
|
||||
else if (len == 4)
|
||||
|
|
@ -505,7 +506,7 @@ int V_GetColorFromString (const DWORD *palette, const char *cstr)
|
|||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
val[1] = val[0] = cstr[1 + i];
|
||||
c[i] = ParseHex (val);
|
||||
c[i] = ParseHex (val, sc);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -558,7 +559,7 @@ normal:
|
|||
{
|
||||
val[1] = val[0];
|
||||
}
|
||||
c[i] = ParseHex (val);
|
||||
c[i] = ParseHex (val, sc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -578,7 +579,7 @@ normal:
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FString V_GetColorStringByName (const char *name)
|
||||
FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
||||
{
|
||||
FMemLump rgbNames;
|
||||
char *rgbEnd;
|
||||
|
|
@ -592,7 +593,8 @@ FString V_GetColorStringByName (const char *name)
|
|||
rgblump = Wads.CheckNumForName ("X11R6RGB");
|
||||
if (rgblump == -1)
|
||||
{
|
||||
Printf ("X11R6RGB lump not found\n");
|
||||
if (!sc) Printf ("X11R6RGB lump not found\n");
|
||||
else sc->Message(MSG_WARNING, "X11R6RGB lump not found");
|
||||
return FString();
|
||||
}
|
||||
|
||||
|
|
@ -654,7 +656,8 @@ FString V_GetColorStringByName (const char *name)
|
|||
}
|
||||
if (rgb < rgbEnd)
|
||||
{
|
||||
Printf ("X11R6RGB lump is corrupt\n");
|
||||
if (!sc) Printf ("X11R6RGB lump is corrupt\n");
|
||||
else sc->Message(MSG_WARNING, "X11R6RGB lump is corrupt");
|
||||
}
|
||||
return FString();
|
||||
}
|
||||
|
|
@ -667,22 +670,28 @@ FString V_GetColorStringByName (const char *name)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int V_GetColor (const DWORD *palette, const char *str)
|
||||
int V_GetColor (const DWORD *palette, const char *str, FScriptPosition *sc)
|
||||
{
|
||||
FString string = V_GetColorStringByName (str);
|
||||
FString string = V_GetColorStringByName (str, sc);
|
||||
int res;
|
||||
|
||||
if (!string.IsEmpty())
|
||||
{
|
||||
res = V_GetColorFromString (palette, string);
|
||||
res = V_GetColorFromString (palette, string, sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = V_GetColorFromString (palette, str);
|
||||
res = V_GetColorFromString (palette, str, sc);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
int V_GetColor(const DWORD *palette, FScanner &sc)
|
||||
{
|
||||
FScriptPosition scc = sc;
|
||||
return V_GetColor(palette, sc.String, &scc);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// BuildTransTable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue