- reworking some lower level texture code.
This commit is contained in:
parent
72835c5462
commit
9099bc8420
21 changed files with 76 additions and 61 deletions
|
|
@ -1630,7 +1630,7 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
|||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(texid);
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
auto tex = TexMan.GameByIndex(texid);
|
||||
FString retval;
|
||||
|
||||
if (tex != nullptr)
|
||||
|
|
@ -1655,12 +1655,12 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
|||
|
||||
static int GetTextureSize(int texid, int* py)
|
||||
{
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
auto tex = TexMan.GameByIndex(texid);
|
||||
int x, y;
|
||||
if (tex != nullptr)
|
||||
{
|
||||
x = tex->GetDisplayWidth();
|
||||
y = tex->GetDisplayHeight();
|
||||
x = int(0.5 + tex->GetDisplayWidth());
|
||||
y = int(0.5 + tex->GetDisplayHeight());
|
||||
}
|
||||
else x = y = -1;
|
||||
if (py) *py = y;
|
||||
|
|
@ -1685,12 +1685,12 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, GetSize, GetTextureSize)
|
|||
//==========================================================================
|
||||
static void GetScaledSize(int texid, DVector2* pvec)
|
||||
{
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
auto tex = TexMan.GameByIndex(texid);
|
||||
double x, y;
|
||||
if (tex != nullptr)
|
||||
{
|
||||
x = tex->GetDisplayWidthDouble();
|
||||
y = tex->GetDisplayHeightDouble();
|
||||
x = tex->GetDisplayWidth();
|
||||
y = tex->GetDisplayHeight();
|
||||
}
|
||||
else x = y = -1;
|
||||
if (pvec)
|
||||
|
|
@ -1716,12 +1716,12 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, GetScaledSize, GetScaledSize)
|
|||
//==========================================================================
|
||||
static void GetScaledOffset(int texid, DVector2* pvec)
|
||||
{
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
auto tex = TexMan.GameByIndex(texid);
|
||||
double x, y;
|
||||
if (tex != nullptr)
|
||||
{
|
||||
x = tex->GetDisplayLeftOffsetDouble();
|
||||
y = tex->GetDisplayTopOffsetDouble();
|
||||
x = tex->GetDisplayLeftOffset();
|
||||
y = tex->GetDisplayTopOffset();
|
||||
}
|
||||
else x = y = -1;
|
||||
if (pvec)
|
||||
|
|
@ -1748,7 +1748,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, GetScaledOffset, GetScaledOffset)
|
|||
|
||||
static int CheckRealHeight(int texid)
|
||||
{
|
||||
auto tex = TexMan.ByIndex(texid);
|
||||
auto tex = TexMan.GameByIndex(texid);
|
||||
if (tex != nullptr) return tex->CheckRealHeight();
|
||||
else return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue