Detail map scaling.

git-svn-id: https://svn.eduke32.com/eduke32@512 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
Plagman 2007-03-01 18:19:11 +00:00
parent 8e86c02364
commit 19719cf7fb
5 changed files with 30 additions and 13 deletions

View file

@ -24,8 +24,10 @@ MSSDKROOT="C:\Program Files\Microsoft Visual Studio 8\VC
PLATFORMSDK="C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
# /D these to enable certain features of the port's compile process
# NOASM When defined, uses C instead of assembly code
TARGETOPTS=#/DNOASM
# NOASM When defined, uses C instead of assembly code
!ifdef NOASM
TARGETOPTS=/DNOASM
!endif
!ifdef DEBUG
# debugging options
@ -46,7 +48,12 @@ CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(DXROOT)\i
ASFLAGS=/nologo /coff
EXESUFFIX=.exe
ENGINEOBJS=$(OBJ)\a.$o \
ENGINEOBJS= \
!ifdef NOASM
$(OBJ)\a-c.$o \
!else
$(OBJ)\a.$o \
!endif
$(OBJ)\baselayer.$o \
$(OBJ)\cache1d.$o \
$(OBJ)\compat.$o \

View file

@ -1159,7 +1159,7 @@ static int defsparser(scriptfile *script)
char *detailtokptr = script->ltextptr, *detailend;
int pal = 0, i;
char *fn = NULL;
double param = 1.0;
double xscale = 1.0, yscale = 1.0;
char flags = 0;
if (scriptfile_getbraces(script,&detailend)) break;
@ -1168,7 +1168,9 @@ static int defsparser(scriptfile *script)
case T_FILE:
scriptfile_getstring(script,&fn); break;
case T_XSCALE:
scriptfile_getdouble(script,&param); break;
scriptfile_getdouble(script,&xscale); break;
case T_YSCALE:
scriptfile_getdouble(script,&yscale); break;
case T_NOCOMPRESS:
flags |= 1; break;
default:
@ -1190,12 +1192,12 @@ static int defsparser(scriptfile *script)
if (token == T_DETAIL)
{
pal = DETAILPAL;
param = 1.0f / param;
xscale = 1.0f / xscale;
}
else if (token == T_GLOW)
pal = GLOWPAL;
hicsetsubsttex(tile,pal,fn,-1.0,param,1.0,flags);
hicsetsubsttex(tile,pal,fn,-1.0,xscale,yscale,flags);
} break;
default:
break;

View file

@ -28,6 +28,8 @@ credits.
-Ken S.
**************************************************************************************************/
#include "compat.h"
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>

View file

@ -1694,7 +1694,13 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
bglMatrixMode(GL_TEXTURE);
bglLoadIdentity();
bglScalef(f, f, 1.0f);
if (pth && pth->hicr && ((pth->hicr->xscale != 1.0f) || (pth->hicr->yscale != 1.0f)))
bglScalef(pth->hicr->xscale, pth->hicr->yscale, 1.0f);
if (detailpth && detailpth->hicr && ((detailpth->hicr->xscale != 1.0f) || (detailpth->hicr->yscale != 1.0f)))
bglScalef(detailpth->hicr->xscale, detailpth->hicr->yscale, 1.0f);
bglMatrixMode(GL_MODELVIEW);
}
else

View file

@ -44,11 +44,11 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="nmake /f Makefile.msvc DEBUG=1"
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1"
BuildCommandLine="nmake /f Makefile.msvc DEBUG=1 NOASM=1"
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1 NOASM=1"
CleanCommandLine="nmake /f Makefile.msvc veryclean"
Output="eduke32.exe"
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN;NOASM;ENGINE_USING_A_C"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
@ -694,11 +694,11 @@
>
</File>
<File
RelativePath=".\source\jmact\develop.h"
RelativePath=".\source\develop.h"
>
</File>
<File
RelativePath=".\source\develop.h"
RelativePath=".\source\jmact\develop.h"
>
</File>
<File