Some dead engine code removed. Some warnings killed. Better logging added. Fix for
Makefile.am that solves a potential linking problem with ivis_common. Removed checking for binary PIEs, which only existed on PSX. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@240 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
abaa4fa350
commit
4f1ccb7931
|
@ -268,6 +268,7 @@ warzone_libs = ../lib/framework/libframework.a \
|
|||
../lib/script/libscript.a \
|
||||
../lib/ivis_common/libivis_common.a \
|
||||
../lib/$(RENDERER)/lib$(RENDERER).a \
|
||||
../lib/ivis_common/libivis_common.a \
|
||||
../lib/gamelib/libgamelib.a \
|
||||
../lib/sequence/libsequence.a \
|
||||
../lib/widget/libwidget.a
|
||||
|
|
|
@ -889,14 +889,7 @@ void displayCompObj(BASE_OBJECT *psObj,iVector *mountRotation, BOOL bButton)
|
|||
{
|
||||
// FIXME - hideous....!!!!
|
||||
pie_MatScale(75);
|
||||
if(pie_GetRenderEngine()==ENGINE_GLIDE)
|
||||
{
|
||||
pie_Draw3DShape(psShape, 0, psDroid->player-6, brightness, specular, pieFlag | pie_NO_BILINEAR, iPieData);
|
||||
}
|
||||
else
|
||||
{
|
||||
pie_Draw3DShape(psShape, 0, psDroid->player-6, brightness, specular, pieFlag, iPieData);
|
||||
}
|
||||
pie_Draw3DShape(psShape, 0, psDroid->player-6, brightness, specular, pieFlag, iPieData);
|
||||
}
|
||||
}
|
||||
//else if( psDroid->droidType == DROID_CYBORG)
|
||||
|
|
|
@ -457,21 +457,8 @@ UDWORD exceed;
|
|||
{
|
||||
clipDepth = (DISP_HEIGHT - linePitch);
|
||||
}
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if(bInTutorial) pie_SetSwirlyBoxes(TRUE);
|
||||
iV_UniTransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT+drop+1,
|
||||
mainConsole.topX+mainConsole.width,clipDepth, // ho ho
|
||||
// (hack = (mainConsole.topY+(boxDepth*linePitch)+CON_BORDER_HEIGHT+drop)) < DISP_HEIGHT-linePitch ? hack : (DISP_HEIGHT-linePitch),
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE,FILLTRANS);
|
||||
if(bInTutorial) pie_SetSwirlyBoxes(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
iV_TransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT+drop+1,
|
||||
mainConsole.topX+mainConsole.width ,clipDepth);
|
||||
//(hack = (mainConsole.topY+(boxDepth*linePitch)+CON_BORDER_HEIGHT+drop)) < DISP_HEIGHT-linePitch ? hack : (DISP_HEIGHT-linePitch)
|
||||
}
|
||||
iV_TransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT+drop+1,
|
||||
mainConsole.topX+mainConsole.width ,clipDepth);
|
||||
}
|
||||
|
||||
|
||||
|
@ -562,18 +549,8 @@ UDWORD MesY;
|
|||
|
||||
/* How big a box is necessary? */
|
||||
/* GET RID OF THE MAGIC NUMBERS BELOW */
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if(bInTutorial) pie_SetSwirlyBoxes(TRUE);
|
||||
iV_UniTransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT,
|
||||
mainConsole.topX+mainConsole.width,mainConsole.topY+((count)*linePitch)+CON_BORDER_HEIGHT-linePitch,(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE,FILLTRANS);
|
||||
if(bInTutorial) pie_SetSwirlyBoxes(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
iV_TransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT,
|
||||
mainConsole.topX+mainConsole.width ,mainConsole.topY+((count)*linePitch)+CON_BORDER_HEIGHT-linePitch);
|
||||
}
|
||||
iV_TransBoxFill(mainConsole.topX - CON_BORDER_WIDTH,mainConsole.topY-mainConsole.textDepth-CON_BORDER_HEIGHT,
|
||||
mainConsole.topX+mainConsole.width ,mainConsole.topY+((count)*linePitch)+CON_BORDER_HEIGHT-linePitch);
|
||||
}
|
||||
/*
|
||||
if(count)
|
||||
|
|
|
@ -778,58 +778,20 @@ BOOL dataIMDBufferLoad(UBYTE *pBuffer, UDWORD size, void **ppData)
|
|||
|
||||
pBufferPosition=pBuffer;
|
||||
|
||||
BinaryPIE=TRUE;
|
||||
// Check for binary PIE files
|
||||
|
||||
for (Letter=0;Letter<4;Letter++)
|
||||
{
|
||||
if (pBufferPosition[Letter]!=BinaryPieLetters[Letter]) // if any on the letters are incorrect then it can't be a binary pie
|
||||
{
|
||||
BinaryPIE=FALSE;
|
||||
break; // no point in continuing
|
||||
}
|
||||
}
|
||||
|
||||
if (BinaryPIE==FALSE)
|
||||
{
|
||||
psIMD = iV_ProcessIMD(&pBufferPosition,pBuffer+size,(UBYTE *)"", (UBYTE *)"",FALSE);
|
||||
psIMD = iV_ProcessIMD(&pBufferPosition,pBuffer+size,(UBYTE *)"", (UBYTE *)"",FALSE);
|
||||
#ifndef FINALBUILD
|
||||
tpAddPIE(GetLastResourceFilename(),psIMD);
|
||||
#endif
|
||||
if (psIMD == NULL)
|
||||
{
|
||||
|
||||
DBERROR(("IMD load failed - %s", GetLastResourceFilename()));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (psIMD == NULL) {
|
||||
DBERROR(("IMD load failed - %s", GetLastResourceFilename()));
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
psIMD=iV_ProcessBPIE((iIMDShape *)(pBuffer+4),size);
|
||||
#ifndef FINALBUILD
|
||||
tpAddPIE(GetLastResourceFilename(),psIMD);
|
||||
#endif
|
||||
if (psIMD==NULL)
|
||||
{
|
||||
DBERROR(("BinaryPIE load failed - %s",GetLastResourceFilename() ));
|
||||
return(FALSE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
*ppData = psIMD;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Release an imd */
|
||||
/*void dataIMDRelease(void *pData)
|
||||
{
|
||||
|
|
|
@ -372,16 +372,7 @@ UDWORD pixelHeight;
|
|||
}
|
||||
|
||||
/* GET RID OF THE MAGIC NUMBERS BELOW */
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_SetSwirlyBoxes(TRUE);
|
||||
iV_UniTransBoxFill(RET_X+1,474+E_H-pixelHeight,RET_X+1+pixelLength+2,473+E_H,0x000000ff,128);
|
||||
pie_SetSwirlyBoxes(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
iV_TransBoxFill(RET_X+1,474+E_H-pixelHeight,RET_X+1+pixelLength+2,473+E_H);
|
||||
}
|
||||
iV_TransBoxFill(RET_X+1,474+E_H-pixelHeight,RET_X+1+pixelLength+2,473+E_H);
|
||||
|
||||
iV_DrawText(sTextToSend,RET_X+3,469+E_H);
|
||||
}
|
||||
|
@ -563,19 +554,6 @@ BOOL bPlayerHasHQ = FALSE;
|
|||
#endif
|
||||
}
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if(getSelectedGroup()<UBYTE_MAX)
|
||||
{
|
||||
sprintf(buildInfo,"%d", getSelectedGroup());
|
||||
iV_DrawText(buildInfo,mX-17,mY+4);
|
||||
}
|
||||
else if(getSelectedCommander()<UBYTE_MAX)
|
||||
{
|
||||
sprintf(buildInfo,"*%d", getSelectedCommander());
|
||||
iV_DrawText(buildInfo,mX-25,mY+4);
|
||||
}
|
||||
}
|
||||
while(player.r.y>DEG(360))
|
||||
{
|
||||
player.r.y-=DEG(360);
|
||||
|
@ -960,8 +938,7 @@ void drawTiles(iView *camera, iView *player)
|
|||
|
||||
tileScreenInfo[i][j].light.argb = lightDoFogAndIllumination(TileIllum,rx-tileXYZ.x,rz - ((i-terrainMidY)<<TILE_SHIFT),&specular);
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
tileScreenInfo[i][j].specular.argb = specular;
|
||||
}
|
||||
|
||||
|
@ -1726,11 +1703,6 @@ BOOL bEdgeTile;
|
|||
}
|
||||
|
||||
renderFlag = 0;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
offset.x = (tileTexInfo[tileNumber & TILE_NUMMASK].xOffset * 64);
|
||||
offset.y = (tileTexInfo[tileNumber & TILE_NUMMASK].yOffset * 64);
|
||||
}
|
||||
pie_DrawTriangle(p, &texturePage, renderFlag, &offset);
|
||||
|
||||
if(TRI_FLIPPED(psTile))
|
||||
|
@ -3668,32 +3640,17 @@ FRACT mulH;
|
|||
health = PERCENT(psStruct->currentBuildPts ,
|
||||
psStruct->pStructureType->buildPoints);
|
||||
if(health>=100) health = 100; // belt and braces
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
longPowerCol = 0x00ffff00;
|
||||
}
|
||||
else
|
||||
{
|
||||
powerCol = COL_YELLOW;
|
||||
}
|
||||
powerCol = COL_YELLOW;
|
||||
mulH = MAKEFRACT(health)/100;
|
||||
mulH*=MAKEFRACT(width);
|
||||
health = MAKEINT(mulH);
|
||||
// health = (((width*10000)/100)*health)/10000;
|
||||
if(health>width) health = width;
|
||||
health*=2;
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_BoxFill(scrX-scrR-1, scrY-1, scrX+scrR+1, scrY+2, 0x00020202);
|
||||
pie_BoxFill(scrX-scrR-1, scrY, scrX-scrR+health, scrY+1, longPowerCol);
|
||||
}
|
||||
else
|
||||
{
|
||||
// pie_BoxFillIndex(scrX - scrR-1,scrY + scrR+2,scrX + scrR+1,scrY+scrR+6,1);
|
||||
// pie_BoxFillIndex(scrX - scrR,scrY + scrR+3,scrX - scrR+health,scrY+scrR+5,powerCol);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY-1,scrX + scrR+1,scrY+2,1);
|
||||
pie_BoxFillIndex(scrX - scrR,scrY ,scrX - scrR+health,scrY+1,powerCol);
|
||||
}
|
||||
// pie_BoxFillIndex(scrX - scrR-1,scrY + scrR+2,scrX + scrR+1,scrY+scrR+6,1);
|
||||
// pie_BoxFillIndex(scrX - scrR,scrY + scrR+3,scrX - scrR+health,scrY+scrR+5,powerCol);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY-1,scrX + scrR+1,scrY+2,1);
|
||||
pie_BoxFillIndex(scrX - scrR,scrY ,scrX - scrR+health,scrY+1,powerCol);
|
||||
}
|
||||
}
|
||||
//----
|
||||
|
@ -3810,28 +3767,13 @@ FRACT mulH;
|
|||
scrR = width;
|
||||
// health = PERCENT(psStruct->body, psStruct->baseBodyPoints);
|
||||
health = PERCENT(psStruct->currentBuildPts , psStruct->pStructureType->buildPoints);
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
longPowerCol = 0x0000ff00;
|
||||
}
|
||||
else
|
||||
{
|
||||
powerCol = COL_GREEN;
|
||||
}
|
||||
powerCol = COL_GREEN;
|
||||
health = (((width*10000)/100)*health)/10000;
|
||||
health*=2;
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_BoxFill(scrX-scrR-1, scrY-1, scrX+scrR+1, scrY+2, 0x00020202);
|
||||
pie_BoxFill(scrX-scrR-1, scrY, scrX-scrR+health, scrY+1, longPowerCol);
|
||||
}
|
||||
else
|
||||
{
|
||||
// pie_BoxFillIndex(scrX - scrR-1,scrY + scrR+2,scrX + scrR+1,scrY+scrR+6,1);
|
||||
// pie_BoxFillIndex(scrX - scrR,scrY + scrR+3,scrX - scrR+health,scrY+scrR+5,powerCol);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY-1,scrX + scrR+1,scrY+2,1);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY,scrX - scrR+health,scrY+1,powerCol);
|
||||
}
|
||||
// pie_BoxFillIndex(scrX - scrR-1,scrY + scrR+2,scrX + scrR+1,scrY+scrR+6,1);
|
||||
// pie_BoxFillIndex(scrX - scrR,scrY + scrR+3,scrX - scrR+health,scrY+scrR+5,powerCol);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY-1,scrX + scrR+1,scrY+2,1);
|
||||
pie_BoxFillIndex(scrX - scrR-1,scrY,scrX - scrR+health,scrY+1,powerCol);
|
||||
}
|
||||
//----
|
||||
}
|
||||
|
@ -5003,7 +4945,7 @@ SDWORD shift;
|
|||
break;
|
||||
|
||||
default:
|
||||
DBERROR((FALSE,"Weirdy direction for a structure in renderWall"));
|
||||
DBERROR(("Weirdy direction for a structure in renderWall"));
|
||||
break;
|
||||
}
|
||||
/*
|
||||
|
@ -5256,15 +5198,7 @@ SDWORD zone;
|
|||
/* The first triangle */
|
||||
if(TRI_FLIPPED(psTile))
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle((PIEVERTEX*)&tileScreenInfo[i+0][j+0],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+0][j+1],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+0],
|
||||
&texturePage,0,0);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
memcpy(&aVrts[0],&tileScreenInfo[i+0][j+0],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[1],&tileScreenInfo[i+0][j+1],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[2],&tileScreenInfo[i+1][j+0],sizeof(PIEVERTEX));
|
||||
|
@ -5273,15 +5207,7 @@ SDWORD zone;
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle((PIEVERTEX*)&tileScreenInfo[i+0][j+0],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+0][j+1],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+1],
|
||||
&texturePage,0,0);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
memcpy(&aVrts[0],&tileScreenInfo[i+0][j+0],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[1],&tileScreenInfo[i+0][j+1],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[2],&tileScreenInfo[i+1][j+1],sizeof(PIEVERTEX));
|
||||
|
@ -5292,15 +5218,7 @@ SDWORD zone;
|
|||
/* The second triangle */
|
||||
if(TRI_FLIPPED(psTile))
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle((PIEVERTEX*)&tileScreenInfo[i+0][j+1],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+1],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+0],
|
||||
&texturePage,0,0);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
memcpy(&aVrts[0],&tileScreenInfo[i+0][j+1],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[1],&tileScreenInfo[i+1][j+1],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[2],&tileScreenInfo[i+1][j+0],sizeof(PIEVERTEX));
|
||||
|
@ -5309,15 +5227,7 @@ SDWORD zone;
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle((PIEVERTEX*)&tileScreenInfo[i+0][j+0],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+1],
|
||||
(PIEVERTEX*)&tileScreenInfo[i+1][j+0],
|
||||
&texturePage,0,0);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
memcpy(&aVrts[0],&tileScreenInfo[i+0][j+0],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[1],&tileScreenInfo[i+1][j+1],sizeof(PIEVERTEX));
|
||||
memcpy(&aVrts[2],&tileScreenInfo[i+1][j+0],sizeof(PIEVERTEX));
|
||||
|
@ -5441,13 +5351,7 @@ void drawTerrainWEdgeTile(UDWORD i, UDWORD j)
|
|||
aVrts[2].sx = tileScreenInfo[i+1][j+0].wx;
|
||||
aVrts[2].sy = tileScreenInfo[i+1][j+0].wy;
|
||||
aVrts[2].sz = tileScreenInfo[i+1][j+0].wz - WATER_EDGE_ZOFFSET;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle(&aVrts[0],&aVrts[1],&aVrts[2],
|
||||
&texturePage,0,pie_ADDITIVE);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
pie_DrawPoly(3, aVrts, tileTexInfo[tileNumber & TILE_NUMMASK].texPage, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -5465,13 +5369,7 @@ void drawTerrainWEdgeTile(UDWORD i, UDWORD j)
|
|||
aVrts[2].sx = tileScreenInfo[i+1][j+1].wx;
|
||||
aVrts[2].sy = tileScreenInfo[i+1][j+1].wy;
|
||||
aVrts[2].sz = tileScreenInfo[i+1][j+1].wz - WATER_EDGE_ZOFFSET;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle(&aVrts[0],&aVrts[1],&aVrts[2],
|
||||
&texturePage,0,pie_ADDITIVE);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
pie_DrawPoly(3, aVrts, tileTexInfo[tileNumber & TILE_NUMMASK].texPage, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -5491,13 +5389,7 @@ void drawTerrainWEdgeTile(UDWORD i, UDWORD j)
|
|||
aVrts[2].sx = tileScreenInfo[i+1][j+0].wx;
|
||||
aVrts[2].sy = tileScreenInfo[i+1][j+0].wy;
|
||||
aVrts[2].sz = tileScreenInfo[i+1][j+0].wz - WATER_EDGE_ZOFFSET;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle(&aVrts[0],&aVrts[1],&aVrts[2],
|
||||
&texturePage,0,pie_ADDITIVE);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
pie_DrawPoly(3, aVrts, tileTexInfo[tileNumber & TILE_NUMMASK].texPage, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -5515,13 +5407,7 @@ void drawTerrainWEdgeTile(UDWORD i, UDWORD j)
|
|||
aVrts[2].sx = tileScreenInfo[i+1][j+0].wx;
|
||||
aVrts[2].sy = tileScreenInfo[i+1][j+0].wy;
|
||||
aVrts[2].sz = tileScreenInfo[i+1][j+0].wz - WATER_EDGE_ZOFFSET;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_DrawFastTriangle(&aVrts[0],&aVrts[1],&aVrts[2],
|
||||
&texturePage,0,pie_ADDITIVE);
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
pie_DrawPoly(3, aVrts, tileTexInfo[tileNumber & TILE_NUMMASK].texPage, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -6455,45 +6341,15 @@ trans = 0; //Defining the variable trans to eleminate a runtime debug error
|
|||
colour = UBYTE_MAX;
|
||||
colour = lightDoFogAndIllumination(colour,getCentreX() - psDroid->x, getCentreZ() - psDroid->y,&specular);
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
colour &= 0xff;
|
||||
if ( (psDroid->action == DACTION_DEMOLISH) OR
|
||||
(psDroid->action == DACTION_CLEARWRECK) )
|
||||
{
|
||||
if (war_GetFog())
|
||||
{
|
||||
trans = colour >> 24;//alpha
|
||||
trans &= 0xff;
|
||||
trans = UBYTE_MAX - trans;
|
||||
}
|
||||
else
|
||||
{
|
||||
trans = colour & 0xff;
|
||||
}
|
||||
trans >>= 1;//divide by 2
|
||||
if ( (psDroid->action == DACTION_DEMOLISH) OR
|
||||
(psDroid->action == DACTION_CLEARWRECK) )
|
||||
{
|
||||
colour = 0x00ff0000;//red
|
||||
}
|
||||
else
|
||||
{
|
||||
colour = 0x000000ff;//blue
|
||||
}
|
||||
pts[0].light.argb = 0x00000000;
|
||||
pts[1].light.argb = 0x00000000;
|
||||
pts[2].light.argb = 0x00000000;
|
||||
colour <<= 16;//red
|
||||
}
|
||||
else
|
||||
{
|
||||
colour &= 0xff;
|
||||
if ( (psDroid->action == DACTION_DEMOLISH) OR
|
||||
(psDroid->action == DACTION_CLEARWRECK) )
|
||||
{
|
||||
colour <<= 16;//red
|
||||
}
|
||||
pts[0].light.argb = 0xff000000;
|
||||
pts[1].light.argb = 0xff000000;
|
||||
pts[2].light.argb = 0xff000000;
|
||||
}
|
||||
|
||||
pts[0].light.argb = 0xff000000;
|
||||
pts[1].light.argb = 0xff000000;
|
||||
pts[2].light.argb = 0xff000000;
|
||||
|
||||
pts[0].sx = pt1.x;
|
||||
pts[0].sy = pt1.y;
|
||||
|
|
|
@ -3658,12 +3658,6 @@ void intDisplayWidgets(void)
|
|||
}
|
||||
// Download buffer in system memory to the display back buffer.
|
||||
iV_DownloadDisplayBuffer(DisplayBuffer);
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
// On 3fdx, overlay a black transparency to make it darker.
|
||||
iV_UniTransBoxFill( 0,0,DISP_WIDTH,DISP_HEIGHT,
|
||||
(1<<16) | (1<<8) | 1, 64);
|
||||
}
|
||||
|
||||
// DISP_WIDTH, DISP_HEIGHT);
|
||||
/*Add the radar to the design screen - only if player has HQ*/
|
||||
|
|
|
@ -978,7 +978,8 @@ BOOL systemShutdown(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (war_GetPlayAudioCDs()) {
|
||||
if (war_GetPlayAudioCDs()) {
|
||||
debug(LOG_MAIN, "shutting down CD audio");
|
||||
cdAudio_Stop();
|
||||
cdAudio_Close();
|
||||
mixer_Close();
|
||||
|
@ -990,15 +991,10 @@ BOOL systemShutdown(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
debug(LOG_MAIN, "shutting down graphics subsystem");
|
||||
FREE(DisplayBuffer);
|
||||
|
||||
|
||||
iV_ShutDown();
|
||||
|
||||
levShutDown();
|
||||
|
||||
widgShutDown();
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -3841,29 +3841,15 @@ void drawRadarBlips()
|
|||
UWORD imageID;
|
||||
UDWORD VisWidth, VisHeight, delay = 150;
|
||||
PROX_TYPE proxType;
|
||||
BOOL bGlide;
|
||||
|
||||
|
||||
if ( pie_GetRenderEngine() == ENGINE_GLIDE )
|
||||
{
|
||||
bGlide = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
bGlide = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*#ifndef PSX
|
||||
SDWORD radarX,radarY; // for multiplayer blips
|
||||
//FEATURE *psFeature; // ditto. Needed always now!
|
||||
#endif*/
|
||||
|
||||
|
||||
VisWidth = RADWIDTH;
|
||||
VisHeight = RADHEIGHT;
|
||||
|
||||
|
||||
/* Go through all the proximity Displays*/
|
||||
for (psProxDisp = apsProxDisp[selectedPlayer]; psProxDisp != NULL;
|
||||
psProxDisp = psProxDisp->psNext)
|
||||
|
@ -3923,20 +3909,8 @@ void drawRadarBlips()
|
|||
}
|
||||
//draw the 'blip'
|
||||
|
||||
if ( bGlide == TRUE )
|
||||
{
|
||||
pie_SetAdditiveSprites(TRUE);
|
||||
pie_SetAdditiveSpriteLevel(0xc0ffffff);
|
||||
}
|
||||
|
||||
iV_DrawImage(IntImages,imageID, psProxDisp->radarX + RADTLX,
|
||||
psProxDisp->radarY + RADTLY);
|
||||
|
||||
if ( bGlide == TRUE )
|
||||
{
|
||||
pie_SetAdditiveSprites(FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -336,22 +336,10 @@ void RenderWindow(IMAGEFRAME *Frame,UDWORD x,UDWORD y,UDWORD Width,UDWORD Height
|
|||
}
|
||||
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
}
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -370,23 +358,10 @@ void RenderWindow(IMAGEFRAME *Frame,UDWORD x,UDWORD y,UDWORD Width,UDWORD Height
|
|||
Width &= 0xfffc; // Software transboxfill needs to be a multiple of 4 pixels.
|
||||
Masked = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill(x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
} else
|
||||
|
||||
{
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
}
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
} else {
|
||||
iV_BoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
|
@ -401,22 +376,10 @@ void RenderWindow(IMAGEFRAME *Frame,UDWORD x,UDWORD y,UDWORD Width,UDWORD Height
|
|||
Width &= 0xfffc; // Software transboxfill needs to be a multiple of 4 pixels.
|
||||
Masked = TRUE;
|
||||
}
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill( x+Width-INCEND+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
} else
|
||||
|
||||
{
|
||||
iV_TransBoxFill( x+Width-INCEND+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
}
|
||||
iV_TransBoxFill( x+Width-INCEND+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
} else {
|
||||
iV_BoxFill( x+Width-INCEND+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
|
@ -431,22 +394,10 @@ void RenderWindow(IMAGEFRAME *Frame,UDWORD x,UDWORD y,UDWORD Width,UDWORD Height
|
|||
Width &= 0xfffc; // Software transboxfill needs to be a multiple of 4 pixels.
|
||||
Masked = TRUE;
|
||||
}
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Rect->BRYOffset,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
}else
|
||||
|
||||
{
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Rect->BRYOffset);
|
||||
}
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Rect->BRYOffset);
|
||||
} else {
|
||||
iV_BoxFill( x+Rect->TLXOffset,
|
||||
y+Rect->TLYOffset,
|
||||
|
@ -463,24 +414,10 @@ void RenderWindow(IMAGEFRAME *Frame,UDWORD x,UDWORD y,UDWORD Width,UDWORD Height
|
|||
Width &= 0xfffc; // Software transboxfill needs to be a multiple of 4 pixels.
|
||||
Masked = TRUE;
|
||||
}
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill( x+Rect->TLXOffset,
|
||||
y+Height-INCEND+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Height-INCEND+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
}
|
||||
|
||||
iV_TransBoxFill( x+Rect->TLXOffset,
|
||||
y+Height-INCEND+Rect->TLYOffset,
|
||||
x+Width-INCEND+Rect->BRXOffset,
|
||||
y+Height-INCEND+Rect->BRYOffset);
|
||||
} else {
|
||||
iV_BoxFill( x+Rect->TLXOffset,
|
||||
y+Height-INCEND+Rect->TLYOffset,
|
||||
|
|
|
@ -940,16 +940,8 @@ SDWORD fog = 0;
|
|||
brightness = (UBYTE)pie_ByteScale((UBYTE)brightness, (UBYTE)umbra);
|
||||
}
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)//glide
|
||||
{
|
||||
*pSpecular = 0;
|
||||
lighting.byte.a = (UBYTE)fog;
|
||||
lighting.byte.r = brightness;
|
||||
lighting.byte.g = brightness;
|
||||
lighting.byte.b = brightness;
|
||||
}
|
||||
else if ( fog == 0)//(d3d with no fog)
|
||||
{
|
||||
if (fog == 0) {
|
||||
// (d3d with no fog?)
|
||||
*pSpecular = 0;
|
||||
lighting.byte.a = UBYTE_MAX;
|
||||
lighting.byte.r = brightness;
|
||||
|
|
|
@ -733,15 +733,6 @@ GAMECODE gameLoop(void)
|
|||
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
|
||||
pie_SetFogStatus(TRUE);
|
||||
}
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_SetDepthBufferStatus(DEPTH_CMP_ALWAYS_WRT_ON);
|
||||
pie_SetFogStatus(FALSE);
|
||||
pie_DrawMouse(mouseX(),mouseY());
|
||||
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
|
||||
pie_SetFogStatus(TRUE);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
@ -811,7 +802,7 @@ GAMECODE gameLoop(void)
|
|||
{
|
||||
/* Check for toggling display mode */
|
||||
if ((keyDown(KEY_LALT) || keyDown(KEY_RALT)) &&
|
||||
keyPressed(KEY_RETURN) AND pie_GetRenderEngine()!=ENGINE_GLIDE)
|
||||
keyPressed(KEY_RETURN))
|
||||
{
|
||||
screenToggleMode();
|
||||
#ifdef DISP2D
|
||||
|
@ -879,7 +870,7 @@ GAMECODE gameLoop(void)
|
|||
{
|
||||
/* Check for toggling display mode */
|
||||
if ((keyDown(KEY_LALT) || keyDown(KEY_RALT)) &&
|
||||
keyPressed(KEY_RETURN) AND pie_GetRenderEngine()!=ENGINE_GLIDE)
|
||||
keyPressed(KEY_RETURN))
|
||||
{
|
||||
screenToggleMode();
|
||||
#ifdef DISP2D
|
||||
|
@ -903,7 +894,7 @@ GAMECODE gameLoop(void)
|
|||
{
|
||||
/* Check for toggling display mode */
|
||||
if ((keyDown(KEY_LALT) || keyDown(KEY_RALT)) &&
|
||||
keyPressed(KEY_RETURN) AND pie_GetRenderEngine()!=ENGINE_GLIDE)
|
||||
keyPressed(KEY_RETURN))
|
||||
{
|
||||
screenToggleMode();
|
||||
#ifdef DISP2D
|
||||
|
|
|
@ -445,6 +445,7 @@ init://jump here from the end if re_initialising
|
|||
mixer_RestoreIngameVols();
|
||||
break;
|
||||
case FRAME_QUIT:
|
||||
debug(LOG_MAIN, "frame quit");
|
||||
quit = TRUE;
|
||||
Restart = TRUE;
|
||||
break;
|
||||
|
@ -530,7 +531,7 @@ init://jump here from the end if re_initialising
|
|||
loopStatus = gameLoop();
|
||||
switch(loopStatus) {
|
||||
case GAMECODE_QUITGAME:
|
||||
DBPRINTF(("GAMECODE_QUITGAME\n"));
|
||||
debug(LOG_MAIN, "GAMECODE_QUITGAME");
|
||||
gameStatus = GS_TITLE_SCREEN;
|
||||
Restart = TRUE;
|
||||
if(NetPlay.bLobbyLaunched)
|
||||
|
@ -578,7 +579,7 @@ init://jump here from the end if re_initialising
|
|||
break;
|
||||
|
||||
case GS_VIDEO_MODE:
|
||||
DBERROR(("Video_mode no longer valid"));
|
||||
debug(LOG_ERROR, "Video_mode no longer valid");
|
||||
if (loop_GetVideoStatus())
|
||||
{
|
||||
videoLoop();
|
||||
|
@ -615,7 +616,7 @@ init://jump here from the end if re_initialising
|
|||
break;
|
||||
|
||||
default:
|
||||
DBERROR(("Weirdy game status I'm afraid!!"));
|
||||
debug(LOG_ERROR, "Weirdy game status I'm afraid!!");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -652,7 +653,7 @@ init://jump here from the end if re_initialising
|
|||
break;
|
||||
|
||||
case GS_VIDEO_MODE:
|
||||
DBERROR(("Video_mode no longer valid"));
|
||||
debug(LOG_ERROR, "Video_mode no longer valid");
|
||||
if (videoInitialised)
|
||||
{
|
||||
videoInitialised = FALSE;
|
||||
|
@ -660,13 +661,13 @@ init://jump here from the end if re_initialising
|
|||
break;
|
||||
|
||||
default:
|
||||
DBERROR(("Unknown game status on shutdown!"));
|
||||
debug(LOG_ERROR, "Unknown game status on shutdown!");
|
||||
break;
|
||||
}
|
||||
|
||||
} // End of !quit loop.
|
||||
|
||||
DBPRINTF(("Shuting down application\n"));
|
||||
debug(LOG_MAIN, "Shuting down application");
|
||||
|
||||
systemShutdown();
|
||||
|
||||
|
@ -682,7 +683,7 @@ init://jump here from the end if re_initialising
|
|||
|
||||
exit:
|
||||
|
||||
DBPRINTF(("Shutting down after fail\n"));
|
||||
debug(LOG_ERROR, "Shutting down after failure");
|
||||
|
||||
systemShutdown();
|
||||
|
||||
|
|
|
@ -423,14 +423,7 @@ iPoint offset;
|
|||
//if ( TEST_TILE_VISIBLE(selectedPlayer, psTile) OR godMode)
|
||||
/* get the appropriate tile texture */
|
||||
tileNumber = psTile->texture;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_SetTexturePage(tileTexInfo[tileNumber & TILE_NUMMASK].texPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
texturePage.bmp = tilesRAW[tileNumber & TILE_NUMMASK];
|
||||
}
|
||||
texturePage.bmp = tilesRAW[tileNumber & TILE_NUMMASK];
|
||||
|
||||
/* Check for flipped and rotated tiles */
|
||||
tileLayouts(tileNumber & ~TILE_NUMMASK);
|
||||
|
@ -472,11 +465,6 @@ iPoint offset;
|
|||
}
|
||||
|
||||
renderFlag = 0;
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
offset.x = (tileTexInfo[tileNumber & TILE_NUMMASK].xOffset * 64);
|
||||
offset.y = (tileTexInfo[tileNumber & TILE_NUMMASK].yOffset * 64);
|
||||
}
|
||||
pie_DrawTriangle(p, &texturePage, renderFlag, &offset);
|
||||
// Clip the polygon and establish how many sides it has.
|
||||
// This routines also now clips shading and U,V values - Alex.
|
||||
|
|
|
@ -3298,15 +3298,7 @@ void intRemoveTransporterTimer(void)
|
|||
|
||||
void intDisplayMissionBackDrop(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
// need to do some funky rejigging of the buffer to get upto 16bit+alpha
|
||||
// pie_DownLoadBufferToScreen( pMissionBackDrop->bmp,psWidget->x+xOffset,psWidget->y+yOffset,psWidget->width, psWidget->height,1280);
|
||||
}
|
||||
else
|
||||
{
|
||||
// iV_DownloadDisplayBuffer(pMissionBackDrop->bmp);
|
||||
}
|
||||
// iV_DownloadDisplayBuffer(pMissionBackDrop->bmp);
|
||||
scoreDataToScreen();
|
||||
}
|
||||
|
||||
|
@ -3342,23 +3334,10 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
|
|||
|
||||
memset(&sFormInit, 0, sizeof(W_FORMINIT));
|
||||
|
||||
|
||||
|
||||
|
||||
// add some funky beats
|
||||
cdAudio_PlayTrack(2); // 2= frontend music.
|
||||
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
pie_LoadBackDrop(SCREEN_MISSIONEND,TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
pie_LoadBackDrop(SCREEN_MISSIONEND,FALSE);
|
||||
}
|
||||
|
||||
|
||||
pie_LoadBackDrop(SCREEN_MISSIONEND,FALSE);
|
||||
|
||||
sFormInit.formID = 0;
|
||||
sFormInit.id = IDMISSIONRES_BACKFORM;
|
||||
|
|
|
@ -215,20 +215,10 @@ void loadMapPreview(void)
|
|||
coltab[col] = pal_GetNearestColour( col*16,col*16, col*16);
|
||||
}
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if (screenGetBackBufferBitDepth() == 16) {
|
||||
bitDepth = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( screenGetBackBufferBitDepth() == 16 )
|
||||
{
|
||||
bitDepth = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitDepth = 8;
|
||||
}
|
||||
} else {
|
||||
bitDepth = 8;
|
||||
}
|
||||
|
||||
backDropSprite.width = BACKDROP_WIDTH;
|
||||
|
@ -296,7 +286,7 @@ void loadMapPreview(void)
|
|||
|
||||
if (bitDepth != 8)
|
||||
{
|
||||
bufferTo16Bit(tempBmp, backDropBmp,(pie_GetRenderEngine() == ENGINE_GLIDE)); // convert
|
||||
bufferTo16Bit(tempBmp, backDropBmp, FALSE); // convert
|
||||
}
|
||||
|
||||
//screen_SetBackDrop(backDropBmp, BACKDROP_WIDTH, BACKDROP_HEIGHT);
|
||||
|
@ -1752,27 +1742,13 @@ VOID stopJoining(void)
|
|||
selectedPlayer =0;
|
||||
}
|
||||
|
||||
if(ingame.bHostSetup)
|
||||
{
|
||||
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
#ifdef COVERMOUNT
|
||||
pie_LoadBackDrop(SCREEN_COVERMOUNT,TRUE);
|
||||
#else
|
||||
pie_LoadBackDrop(SCREEN_RANDOMBDROP,TRUE);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ingame.bHostSetup) {
|
||||
#ifdef COVERMOUNT
|
||||
pie_LoadBackDrop(SCREEN_COVERMOUNT,FALSE);
|
||||
#else
|
||||
pie_LoadBackDrop(SCREEN_RANDOMBDROP,FALSE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3931,23 +3907,11 @@ void displayMultiBut(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, U
|
|||
}
|
||||
|
||||
|
||||
if(Grey) // disabled, render something over it!
|
||||
{
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{ pie_SetSwirlyBoxes(FALSE);
|
||||
iV_UniTransBoxFill(x,y,x+psWidget->width,y+psWidget->height,(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
pie_SetSwirlyBoxes(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
iV_TransBoxFill(x,y,x+psWidget->width,y+psWidget->height);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!Grey) // add a snap.
|
||||
{
|
||||
if (Grey) {
|
||||
// disabled, render something over it!
|
||||
iV_TransBoxFill(x,y,x+psWidget->width,y+psWidget->height);
|
||||
} else {
|
||||
// add a snap.
|
||||
AddCursorSnap(&InterfaceSnap,
|
||||
(SWORD)(x+(psWidget->width/2)),
|
||||
(SWORD)(y+(psWidget->height/2)),psWidget->formID,psWidget->id,NULL);
|
||||
|
|
|
@ -534,11 +534,19 @@ BOOL multiShutdown(VOID)
|
|||
{
|
||||
FORCE_MEMBER *pF;
|
||||
|
||||
debug(LOG_MAIN, "shutting down audio capture");
|
||||
NETshutdownAudioCapture();
|
||||
NETshutdownAudioPlayback();
|
||||
NETshutdown(); // shut down netplay lib.
|
||||
|
||||
while(Force.pMembers) // clear any force we may have.
|
||||
debug(LOG_MAIN, "shutting down audio playback");
|
||||
NETshutdownAudioPlayback();
|
||||
|
||||
// shut down netplay lib.
|
||||
debug(LOG_MAIN, "shutting down networking");
|
||||
NETshutdown();
|
||||
|
||||
// clear any force we may have.
|
||||
debug(LOG_MAIN, "free game data");
|
||||
while(Force.pMembers)
|
||||
{
|
||||
pF = Force.pMembers;
|
||||
Force.pMembers = pF->psNext;
|
||||
|
|
|
@ -453,19 +453,7 @@ void drawRadar(void)
|
|||
|
||||
pie_DownLoadRadar(radarBuffer,RADAR_3DFX_TPAGEID);
|
||||
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
iV_UniTransBoxFill( RADTLX,RADTLY,
|
||||
RADTLX+RADWIDTH,RADTLY+RADHEIGHT,
|
||||
(FILLRED<<16) | (FILLGREEN<<8) | FILLBLUE, FILLTRANS);
|
||||
}
|
||||
else
|
||||
{
|
||||
iV_TransBoxFill( RADTLX,RADTLY,
|
||||
RADTLX+RADWIDTH,RADTLY+RADHEIGHT);
|
||||
}
|
||||
|
||||
iV_TransBoxFill( RADTLX,RADTLY, RADTLX + RADWIDTH, RADTLY + RADHEIGHT);
|
||||
|
||||
//iV_DrawSemiTransImageDef(&RadarImage,radarBuffer,RadarWidth,RADTLX,RADTLY,192);
|
||||
|
||||
|
@ -569,13 +557,10 @@ static void DrawRadarTiles(UBYTE *screen,UDWORD Modulus,UWORD boxSizeH,UWORD box
|
|||
|
||||
Scr = screen + OffsetX + OffsetY*Modulus;
|
||||
|
||||
|
||||
if(pie_Hardware())//was == ENGINE_GLIDE)
|
||||
{
|
||||
if (pie_Hardware()) {
|
||||
ShadeDiv = 4;
|
||||
}
|
||||
|
||||
|
||||
if(RadarRedraw) {
|
||||
EndY = VisHeight;
|
||||
} else {
|
||||
|
|
|
@ -198,11 +198,6 @@ BOOL seq_RenderVideoToBuffer( iSurface *pSurface, char *sequenceName, int time,
|
|||
videoMode = VIDEO_SOFT_WINDOW;
|
||||
pDDPixelFormat = NULL;
|
||||
}
|
||||
else if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
videoMode = VIDEO_3DFX_WINDOW;
|
||||
pDDPixelFormat = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
videoMode = VIDEO_D3D_WINDOW;
|
||||
|
@ -368,11 +363,6 @@ BOOL seq_SetupVideoBuffers(void)
|
|||
}
|
||||
}
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
p3DFXVideoBuffer = (UWORD*)pVideoBuffer;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -520,54 +510,22 @@ BOOL seq_StartFullScreenVideo(char* videoName, char* audioName)
|
|||
frame = 0;
|
||||
videoFrameTime = GetTickCount();
|
||||
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
// p3DFXVideoBuffer = MALLOC(VIDEO_PLAYBACK_WIDTH * VIDEO_PLAYBACK_HEIGHT * sizeof(UWORD));
|
||||
if (p3DFXVideoBuffer != NULL)
|
||||
{
|
||||
for(i = 0; i < (VIDEO_PLAYBACK_WIDTH * VIDEO_PLAYBACK_HEIGHT); i++)
|
||||
{
|
||||
p3DFXVideoBuffer[i] = 0;
|
||||
}
|
||||
}
|
||||
#ifdef INCLUDE_AUDIO
|
||||
if (!seq_SetSequenceForBuffer(aVideoName, VIDEO_3DFX_FULLSCREEN, audio_GetDirectSoundObj(), videoFrameTime + VIDEO_PLAYBACK_DELAY, NULL, perfMode))
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), audio_GetDirectSoundObj(), videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
#else
|
||||
if (!seq_SetSequenceForBuffer(aVideoName, VIDEO_3DFX_FULLSCREEN, NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, NULL, perfMode))
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
#endif
|
||||
{
|
||||
#ifdef DUMMY_VIDEO
|
||||
if (seq_SetSequenceForBuffer("noVideo.rpl", VIDEO_3DFX_FULLSCREEN, NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, NULL, perfMode))
|
||||
{
|
||||
strcpy(aAudioName,"noVideo.wav");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
seq_StopFullScreenVideo();
|
||||
DBERROR((FALSE,"Failed to initialise Escape video sequence %s",aVideoName));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef INCLUDE_AUDIO
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), audio_GetDirectSoundObj(), videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
#else
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
#endif
|
||||
{
|
||||
#ifdef DUMMY_VIDEO
|
||||
if (seq_SetSequence("noVideo.rpl",screenGetSurface(), NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
{
|
||||
strcpy(aAudioName,"noVideo.wav");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
seq_StopFullScreenVideo();
|
||||
// ASSERT((FALSE,"seq_StartFullScreenVideo: unable to initialise sequence %s",aVideoName));
|
||||
return FALSE;
|
||||
if (seq_SetSequence("noVideo.rpl",screenGetSurface(), NULL, videoFrameTime + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
{
|
||||
strcpy(aAudioName,"noVideo.wav");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
seq_StopFullScreenVideo();
|
||||
// ASSERT((FALSE,"seq_StartFullScreenVideo: unable to initialise sequence %s",aVideoName));
|
||||
return FALSE;
|
||||
}
|
||||
if (perfMode != VIDEO_PERF_SKIP_FRAMES)//JPS fix for video problems with some sound cards 9 may 99
|
||||
{
|
||||
|
@ -664,19 +622,6 @@ BOOL seq_UpdateFullScreenVideo(CLEAR_MODE *pbClear)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if ((realFrame >= aSeqList[currentPlaySeq].aText[i].endFrame + frameSkip) && (realFrame < (aSeqList[currentPlaySeq].aText[i].endFrame + frameSkip + frameSkip)))
|
||||
{
|
||||
if (pbClear != NULL)
|
||||
{
|
||||
if (perfMode != VIDEO_PERF_FULLSCREEN)
|
||||
{
|
||||
*pbClear = CLEAR_BLACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -697,58 +642,6 @@ BOOL seq_UpdateFullScreenVideo(CLEAR_MODE *pbClear)
|
|||
bMoreThanOneSequenceLine = TRUE;
|
||||
}
|
||||
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
{
|
||||
if (bHoldSeqForAudio == FALSE)
|
||||
{
|
||||
//poll the sequence player while timing the video
|
||||
videoTime = GetTickCount();
|
||||
while (videoTime < (videoFrameTime + RPL_FRAME_TIME * frameSkip))
|
||||
{
|
||||
videoTime = GetTickCount();
|
||||
seq_RefreshVideoBuffers();
|
||||
}
|
||||
frameLag = videoTime - videoFrameTime;
|
||||
frameLag /= RPL_FRAME_TIME;// if were running slow frame lag will be greater than 1
|
||||
videoFrameTime += frameLag * RPL_FRAME_TIME;//frame Lag should be 1 (most of the time)
|
||||
//call sequence player to decode a frame
|
||||
lpDDSF = screenGetSurface();
|
||||
frame = seq_RenderOneFrameToBuffer((char*)p3DFXVideoBuffer, frameLag, subMin, subMax);//skip frame if behind
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = seq_RenderOneFrameToBuffer((char*)p3DFXVideoBuffer, 0, 2, 0);//poll the video player
|
||||
}
|
||||
//3dfx blit the buffer to video
|
||||
pie_DownLoadBufferToScreen(p3DFXVideoBuffer,x,y,w,h,sizeof(UWORD)*w);
|
||||
//print any text over the video
|
||||
realFrame = textFrame + 1;
|
||||
for(i=0;i<MAX_TEXT_OVERLAYS;i++)
|
||||
{
|
||||
if (aSeqList[currentPlaySeq].aText[i].pText[0] != 0)
|
||||
{
|
||||
if ((realFrame >= aSeqList[currentPlaySeq].aText[i].startFrame) && (realFrame <= aSeqList[currentPlaySeq].aText[i].endFrame))
|
||||
{
|
||||
if (bMoreThanOneSequenceLine)
|
||||
{
|
||||
aSeqList[currentPlaySeq].aText[i].x = 20 + D_W;
|
||||
}
|
||||
iV_DrawText(&(aSeqList[currentPlaySeq].aText[i].pText[0]),
|
||||
aSeqList[currentPlaySeq].aText[i].x, aSeqList[currentPlaySeq].aText[i].y);
|
||||
}
|
||||
else if (aSeqList[currentPlaySeq].bSeqLoop)//if its a looped video always draw the text
|
||||
{
|
||||
if (bMoreThanOneSequenceLine)
|
||||
{
|
||||
aSeqList[currentPlaySeq].aText[i].x = 20 + D_W;
|
||||
}
|
||||
iV_DrawText(&(aSeqList[currentPlaySeq].aText[i].pText[0]),
|
||||
aSeqList[currentPlaySeq].aText[i].x, aSeqList[currentPlaySeq].aText[i].y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bHoldSeqForAudio == FALSE)
|
||||
{
|
||||
|
@ -834,19 +727,9 @@ BOOL seq_UpdateFullScreenVideo(CLEAR_MODE *pbClear)
|
|||
if (aSeqList[currentPlaySeq].bSeqLoop)
|
||||
{
|
||||
seq_ClearMovie();
|
||||
if(pie_GetRenderEngine() == ENGINE_GLIDE)
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), NULL, GetTickCount() + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
{
|
||||
if (!seq_SetSequenceForBuffer(aVideoName, VIDEO_3DFX_FULLSCREEN, NULL, GetTickCount() + VIDEO_PLAYBACK_DELAY, NULL, perfMode))
|
||||
{
|
||||
bHoldSeqForAudio = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!seq_SetSequence(aVideoName,screenGetSurface(), NULL, GetTickCount() + VIDEO_PLAYBACK_DELAY, pVideoBuffer, perfMode))
|
||||
{
|
||||
bHoldSeqForAudio = TRUE;
|
||||
}
|
||||
bHoldSeqForAudio = TRUE;
|
||||
}
|
||||
frameDuration = seq_GetFrameTimeInClicks();
|
||||
}
|
||||
|
|
|
@ -319,13 +319,11 @@ TITLECODE titleLoop(void)
|
|||
pie_SetFogStatus(FALSE);
|
||||
pie_ScreenFlip(CLEAR_BLACK);//title loop
|
||||
|
||||
//#ifndef PSX
|
||||
if ((keyDown(KEY_LALT) || keyDown(KEY_RALT)) && /* Check for toggling display mode */
|
||||
keyPressed(KEY_RETURN) AND pie_GetRenderEngine()!=ENGINE_GLIDE)
|
||||
{
|
||||
if ((keyDown(KEY_LALT) || keyDown(KEY_RALT))
|
||||
/* Check for toggling display mode */
|
||||
&& keyPressed(KEY_RETURN)) {
|
||||
screenToggleMode();
|
||||
}
|
||||
//#endif
|
||||
SDL_Delay(30); //To fix ALL menus to be less CPU hogging. -Q 5-14-05
|
||||
return RetCode;
|
||||
}
|
||||
|
@ -358,8 +356,7 @@ void loadingScreenCallback(void)
|
|||
lastTick = GetTickCount();
|
||||
pie_GlobalRenderBegin();
|
||||
DrawBegin();
|
||||
if(pie_GetRenderEngine() == ENGINE_OPENGL) //Was ENGINE_D3D -Q
|
||||
{
|
||||
if (pie_GetRenderEngine() == ENGINE_OPENGL) {
|
||||
pie_UniTransBoxFill(1,1,2,2,0x00010101, 32);
|
||||
}
|
||||
/* Draw the black rectangle at the bottom */
|
||||
|
|
Loading…
Reference in New Issue