Add command line option "-rotatesprite-no-widescreen".

This global option will set bit 1024 and clear bits 256 and 512 for all
rotatesprite calls, fixing complex HUD drawing code relying on precise
alignment of individual elements (widescreen rotatesprite is entirely
unsuitable for this purpose).

git-svn-id: https://svn.eduke32.com/eduke32@3284 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-12-14 19:27:55 +00:00
parent 21aa93c168
commit 65e5ebcdbc
3 changed files with 17 additions and 1 deletions

View file

@ -441,6 +441,7 @@ EXTERN char *palookup[MAXPALOOKUPS];
EXTERN char parallaxtype, showinvisibility; EXTERN char parallaxtype, showinvisibility;
EXTERN int32_t parallaxyoffs, parallaxyscale; EXTERN int32_t parallaxyoffs, parallaxyscale;
EXTERN int32_t visibility, parallaxvisibility; EXTERN int32_t visibility, parallaxvisibility;
EXTERN int32_t g_rotatespriteNoWidescreen;
EXTERN int32_t windowx1, windowy1, windowx2, windowy2; EXTERN int32_t windowx1, windowy1, windowx2, windowy2;
EXTERN int16_t startumost[MAXXDIM], startdmost[MAXXDIM]; EXTERN int16_t startumost[MAXXDIM], startdmost[MAXXDIM];

View file

@ -7011,6 +7011,13 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
int32_t ouryxaspect, ourxyaspect; int32_t ouryxaspect, ourxyaspect;
UNREFERENCED_PARAMETER(uniqid); UNREFERENCED_PARAMETER(uniqid);
if (g_rotatespriteNoWidescreen)
{
dastat |= 1024;
dastat &= ~(512+256);
}
//============================================================================= //POLYMOST BEGINS //============================================================================= //POLYMOST BEGINS
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (rendmode >= 3 && qsetmode == 200) if (rendmode >= 3 && qsetmode == 200)

View file

@ -3388,7 +3388,8 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, i
if (g_mirrorCount==0) if (g_mirrorCount==0)
{ {
// XXX: can we have g_mirrorCount==0 but gotpic'd MIRROR? // NOTE: We can have g_mirrorCount==0 but gotpic'd MIRROR,
// for example in LNGA2.
gotpic[MIRROR>>3] &= ~(1<<(MIRROR&7)); gotpic[MIRROR>>3] &= ~(1<<(MIRROR&7));
#ifdef DEBUGGINGAIDS #ifdef DEBUGGINGAIDS
initprintf("Called G_HandleMirror() with g_mirrorCount==0!\n"); initprintf("Called G_HandleMirror() with g_mirrorCount==0!\n");
@ -8154,6 +8155,7 @@ static void G_ShowDebugHelp(void)
#endif #endif
"-nologo\t\tSkip the logo anim\n" "-nologo\t\tSkip the logo anim\n"
"-ns/-nm\t\tDisable sound or music\n" "-ns/-nm\t\tDisable sound or music\n"
"-rotatesprite-no-widescreen\tpass bit 1024 to all CON rotatesprite calls\n"
"-q#\t\tFake multiplayer with # (2-8) players\n" "-q#\t\tFake multiplayer with # (2-8) players\n"
"-z#/-condebug\tEnable line-by-line CON compile debugging at level #\n" "-z#/-condebug\tEnable line-by-line CON compile debugging at level #\n"
"-conversion YYYYMMDD\tSelects CON script version for compatibility with older mods\n" "-conversion YYYYMMDD\tSelects CON script version for compatibility with older mods\n"
@ -8907,6 +8909,12 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
i++; i++;
continue; continue;
} }
if (!Bstrcasecmp(c+1,"rotatesprite-no-widescreen"))
{
g_rotatespriteNoWidescreen = 1;
i++;
continue;
}
#if !defined(_WIN32) #if !defined(_WIN32)
if (!Bstrcasecmp(c+1,"usecwd")) if (!Bstrcasecmp(c+1,"usecwd"))
{ {