Macro for handling ud.bgstretch. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4982 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-02-11 05:21:46 +00:00
parent 88e0bfd7d3
commit 5595d41ccd
4 changed files with 30 additions and 28 deletions

View File

@ -2870,7 +2870,7 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
setpalettefade(r,g,b,end); // have to set to end fade value if we break!
return;
}
rotatesprite_fs(160<<16,100<<16,65536L,0,tile,0,0,2+8+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,tile,0,0,2+8+BGSTRETCH);
G_FadePalette(r,g,b,start);
start += step;
@ -2897,14 +2897,14 @@ static void G_DisplayExtraScreens(void)
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
fadepal(0,0,0, 0,63,7);
I_ClearAllInput();
rotatesprite_fs(160<<16,100<<16,65536L,0,3291,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,3291,0,0,2+8+64+BGSTRETCH);
fadepaltile(0,0,0, 63,0,-7, 3291);
while (!I_CheckAllInput())
G_HandleAsync();
fadepaltile(0,0,0, 0,63,7, 3291);
I_ClearAllInput();
rotatesprite_fs(160<<16,100<<16,65536L,0,3290,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,3290,0,0,2+8+64+BGSTRETCH);
fadepaltile(0,0,0, 63,0,-7,3290);
while (!I_CheckAllInput())
G_HandleAsync();
@ -2919,7 +2919,7 @@ static void G_DisplayExtraScreens(void)
fadepal(0,0,0, 0,63,7);
I_ClearAllInput();
totalclock = 0;
rotatesprite_fs(160<<16,100<<16,65536L,0,TENSCREEN,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,TENSCREEN,0,0,2+8+64+BGSTRETCH);
fadepaltile(0,0,0, 63,0,-7,TENSCREEN);
while (!I_CheckAllInput() && totalclock < 2400)
G_HandleAsync();
@ -4041,7 +4041,7 @@ void G_DrawBackground(void)
for (x=0; x<xdim; x+=tilesiz[bgtile].x)
rotatesprite_fs(x<<16,y<<16,65536L,0,bgtile,16,0,8+16+64);
}
else rotatesprite_fs(160<<16,100<<16,65536L,0,bgtile,16,0,2+8+64+(ud.bgstretch?1024:0));
else rotatesprite_fs(160<<16,100<<16,65536L,0,bgtile,16,0,2+8+64+BGSTRETCH);
return;
}
@ -10496,7 +10496,7 @@ static void G_DisplayLogo(void)
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8 + 2 + 1); // JBF 20040308
fadepal(0, 0, 0, 0, 63, 7);
flushperms();
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + (ud.bgstretch ? 1024 : 0));
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + BGSTRETCH);
nextpage();
fadepaltile(0, 0, 0, 63, 0, -7, DREALMS);
totalclock = 0;
@ -10504,7 +10504,7 @@ static void G_DisplayLogo(void)
{
clearallviews(0);
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + (ud.bgstretch ? 1024 : 0));
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH);
G_HandleAsync();
@ -10536,7 +10536,7 @@ static void G_DisplayLogo(void)
//g_player[myconnectindex].ps->palette = titlepal;
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2+1); // JBF 20040308
flushperms();
rotatesprite_fs(160<<16,100<<16,65536L,0,BETASCREEN,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,BETASCREEN,0,0,2+8+64+BGSTRETCH);
KB_FlushKeyboardQueue();
fadepaltile(0,0,0, 63,0,-7,BETASCREEN);
totalclock = 0;
@ -10549,7 +10549,7 @@ static void G_DisplayLogo(void)
{
clearallviews(0);
rotatesprite_fs(160<<16,100<<16,65536L,0,BETASCREEN,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,BETASCREEN,0,0,2+8+64+BGSTRETCH);
if (logoflags & LOGO_DUKENUKEM)
{
if (totalclock > 120 && totalclock < (120+60))
@ -11646,7 +11646,7 @@ int32_t app_main(int32_t argc, const char **argv)
//g_player[myconnectindex].ps->palette = palette;
//G_FadePalette(0,0,0,0);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308
rotatesprite_fs(160<<16,100<<16,65536L,0,LOADSCREEN,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,LOADSCREEN,0,0,2+8+64+BGSTRETCH);
menutext(160,105,0,0,"LOADING SAVED GAME...");
nextpage();
@ -12075,7 +12075,7 @@ static void G_DoOrderScreen(void)
{
fadepal(0,0,0, 0,63,7);
I_ClearAllInput();
rotatesprite_fs(160<<16,100<<16,65536L,0,ORDERING+i,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,ORDERING+i,0,0,2+8+64+BGSTRETCH);
fadepal(0,0,0, 63,0,-7);
while (!I_CheckAllInput())
G_HandleAsync();
@ -12122,7 +12122,7 @@ static void G_BonusCutscenes(void)
{
P_SetGamePalette(g_player[myconnectindex].ps, ENDINGPAL, 8+2+1); // JBF 20040308
clearallviews(0L);
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+BGSTRETCH);
nextpage();
fadepal(0,0,0, 63,0,-1);
@ -12132,7 +12132,7 @@ static void G_BonusCutscenes(void)
while (1)
{
clearallviews(0L);
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+BGSTRETCH);
// boss
if (totalclock > 390 && totalclock < 780)
@ -12144,7 +12144,7 @@ static void G_BonusCutscenes(void)
S_PlaySound(SQUISHED);
bonuscnt++;
}
rotatesprite_fs(bossmove[t+3]<<16,bossmove[t+4]<<16,65536L,0,bossmove[t+2],0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(bossmove[t+3]<<16,bossmove[t+4]<<16,65536L,0,bossmove[t+2],0,0,2+8+16+64+128+BGSTRETCH);
}
// Breathe
@ -12152,7 +12152,7 @@ static void G_BonusCutscenes(void)
{
if (totalclock >= 750)
{
rotatesprite_fs(86<<16,59<<16,65536L,0,VICTORY1+8,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(86<<16,59<<16,65536L,0,VICTORY1+8,0,0,2+8+16+64+128+BGSTRETCH);
if (totalclock >= 750 && bonuscnt == 2)
{
S_PlaySound(DUKETALKTOBOSS);
@ -12168,7 +12168,7 @@ static void G_BonusCutscenes(void)
S_PlaySound(BOSSTALKTODUKE);
bonuscnt++;
}
rotatesprite_fs(breathe[t+3]<<16,breathe[t+4]<<16,65536L,0,breathe[t+2],0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(breathe[t+3]<<16,breathe[t+4]<<16,65536L,0,breathe[t+2],0,0,2+8+16+64+128+BGSTRETCH);
}
}
@ -12187,7 +12187,7 @@ static void G_BonusCutscenes(void)
I_ClearAllInput();
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
rotatesprite_fs(160<<16,100<<16,65536L,0,3292,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,3292,0,0,2+8+64+BGSTRETCH);
fadepal(0,0,0, 63,0,-1);
G_HandleEventsWhileNoInput();
fadepal(0,0,0, 0,63,1);
@ -12225,7 +12225,7 @@ VOL1_END:
I_ClearAllInput();
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
rotatesprite_fs(160<<16,100<<16,65536L,0,3293,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,3293,0,0,2+8+64+BGSTRETCH);
fadepal(0,0,0, 63,0,-1);
G_HandleEventsWhileNoInput();
fadepal(0,0,0, 0,63,1);
@ -12401,7 +12401,7 @@ static void G_DisplayMPResultsScreen(void)
{
int32_t i, y, t = 0;
rotatesprite_fs(160<<16,100<<16,65536L,0,MENUSCREEN,16,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,MENUSCREEN,16,0,2+8+64+BGSTRETCH);
rotatesprite_fs(160<<16,34<<16,65536L,0,INGAMEDUKETHREEDEE,0,0,10);
if (PLUTOPAK) // JBF 20030804
rotatesprite_fs((260)<<16,36<<16,65536L,0,PLUTOPAKSPRITE+2,0,0,2+8);
@ -12604,7 +12604,7 @@ void G_BonusScreen(int32_t bonusonly)
if (bonusonly || (g_netServer || ud.multimode > 1)) return;
gfx_offset = (ud.volume_number==1) ? 5 : 0;
rotatesprite_fs(160<<16,100<<16,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+64+128+BGSTRETCH);
if (lastmapname)
menutext(160,20-6,0,0,lastmapname);
@ -12636,7 +12636,7 @@ void G_BonusScreen(int32_t bonusonly)
{
clearallviews(0);
rotatesprite_fs(160<<16,100<<16,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+64+128+BGSTRETCH);
if (totalclock >= 1000000000 && totalclock < 1000000320)
{
@ -12666,11 +12666,11 @@ void G_BonusScreen(int32_t bonusonly)
case 1:
case 4:
case 5:
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+3+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+3+gfx_offset,0,0,2+8+16+64+128+BGSTRETCH);
break;
case 2:
case 3:
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+4+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+4+gfx_offset,0,0,2+8+16+64+128+BGSTRETCH);
break;
}
}
@ -12681,10 +12681,10 @@ void G_BonusScreen(int32_t bonusonly)
{
case 1:
case 3:
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+1+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+1+gfx_offset,0,0,2+8+16+64+128+BGSTRETCH);
break;
case 2:
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+2+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
rotatesprite_fs(199<<16,31<<16,65536L,0,BONUSSCREEN+2+gfx_offset,0,0,2+8+16+64+128+BGSTRETCH);
break;
}
}

View File

@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Macros, some from SW source
#define BGSTRETCH (ud.bgstretch ? 1024 : 0)
#define WIN_IS_PRESSED ( KB_KeyPressed( sc_RightWin ) || KB_KeyPressed( sc_LeftWin ) )
#define ALT_IS_PRESSED ( KB_KeyPressed( sc_RightAlt ) || KB_KeyPressed( sc_LeftAlt ) )
#define SHIFTS_IS_PRESSED ( KB_KeyPressed( sc_RightShift ) || KB_KeyPressed( sc_LeftShift ) )

View File

@ -189,7 +189,7 @@ void Net_SpawnPlayer(int32_t player)
static void display_betascreen(void)
{
rotatesprite_fs(160<<16,100<<16,65536,0,BETASCREEN,0,0,2+8+64+(ud.bgstretch?1024:0));
rotatesprite_fs(160<<16,100<<16,65536,0,BETASCREEN,0,0,2+8+64+BGSTRETCH);
rotatesprite_fs(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8);
rotatesprite_fs(160<<16,(129)<<16,30<<11,0,THREEDEE,0,0,2+8);

View File

@ -356,7 +356,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
clearallviews(0);
rotatesprite_fs(320<<15,200<<15,65536L,0, j > MAXTILES-1?j-MAXTILES:j,0,0,
2+8+64+(ud.bgstretch?1024:0));
2+8+64+BGSTRETCH);
}
else
{
@ -412,7 +412,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
if ((uint32_t)j < 2*MAXTILES)
{
rotatesprite_fs(320<<15,200<<15,65536L, 0,j > MAXTILES-1?j-MAXTILES:j,0,0,
2+8+64+(ud.bgstretch?1024:0));
2+8+64+BGSTRETCH);
}
else
{