- all fade screens to support widescreen

This commit is contained in:
Ilya Shurumov 2020-09-03 13:06:23 +06:00
parent 417e0aabda
commit f6cf8fa548
4 changed files with 38 additions and 16 deletions

View File

@ -239,9 +239,16 @@ void DrawInGameCutscene(void)
tile->r0 = 0; tile->r0 = 0;
tile->g0 = 0; tile->g0 = 0;
tile->b0 = 0; tile->b0 = 0;
#ifdef PSX
tile->x0 = 0; tile->x0 = 0;
tile->y0 = 0;
tile->w = 320; tile->w = 320;
#else
tile->x0 = -500;
tile->w = 1200;
#endif
tile->y0 = 0;
tile->h = BlackBorderHeight; tile->h = BlackBorderHeight;
addPrim(current->ot, tile); addPrim(current->ot, tile);
@ -252,8 +259,14 @@ void DrawInGameCutscene(void)
tile->g0 = 0; tile->g0 = 0;
tile->b0 = 0; tile->b0 = 0;
#ifdef PSX
tile->x0 = 0; tile->x0 = 0;
tile->w = 320; tile->w = 320;
#else
tile->x0 = -500;
tile->w = 1200;
#endif
tile->y0 = 256 - BlackBorderHeight; tile->y0 = 256 - BlackBorderHeight;
tile->h = BlackBorderHeight; tile->h = BlackBorderHeight;

View File

@ -189,7 +189,12 @@ void FadeGameScreen(int flag, int speed)
setPolyF4(&poly); setPolyF4(&poly);
setSemiTrans(&poly, 1); setSemiTrans(&poly, 1);
setRGB0(&poly, val, val, val); setRGB0(&poly, val, val, val);
#ifdef PSX
setXYWH(&poly, 0, 0, 320, 256); setXYWH(&poly, 0, 0, 320, 256);
#else
setXYWH(&poly, -500, 0, 1200, 256);
#endif
if (flag == 0) if (flag == 0)
screen_fade_value += speed; screen_fade_value += speed;
@ -588,7 +593,12 @@ void DrawFadePoly(void)
POLY_G4 *fl_g4 = &fade_g4[current->id]; POLY_G4 *fl_g4 = &fade_g4[current->id];
#ifdef PSX
setXYWH(fl_g4, 0, 0, 320, 256); setXYWH(fl_g4, 0, 0, 320, 256);
#else
setXYWH(fl_g4, -500, 1200, 320, 256);
#endif
setRGB0(fl_g4, fadeVal, fadeVal, fadeVal); setRGB0(fl_g4, fadeVal, fadeVal, fadeVal);
setRGB1(fl_g4, fadeVal, fadeVal, fadeVal); setRGB1(fl_g4, fadeVal, fadeVal, fadeVal);

View File

@ -2892,7 +2892,6 @@ int CurrentPlayerView = 0;
// [D] // [D]
void RenderGame2(int view) void RenderGame2(int view)
{ {
DB *pDVar1;
int iVar2; int iVar2;
POLY_F4 *poly; POLY_F4 *poly;
uint uVar3; uint uVar3;
@ -3010,19 +3009,17 @@ void RenderGame2(int view)
poly->r0 = uVar4; poly->r0 = uVar4;
poly->g0 = uVar4; poly->g0 = uVar4;
poly->b0 = uVar4; poly->b0 = uVar4;
pDVar1 = current;
poly->x0 = 0;
poly->y0 = 0;
poly->x1 = 0x140;
poly->y1 = 0;
poly->x2 = 0;
poly->y2 = 0x100;
poly->x3 = 0x140;
poly->y3 = 0x100;
addPrim(pDVar1->ot + 8, poly);
pDVar1->primptr += sizeof(POLY_F4); #ifdef PSX
POLY_FT3* null = (POLY_FT3*)pDVar1->primptr; setXYWH(poly, 0, 0, 320, 256);
#else
setXYWH(poly, -500, 0, 1200, 256);
#endif
addPrim(current->ot + 8, poly);
current->primptr += sizeof(POLY_F4);
POLY_FT3* null = (POLY_FT3*)current->primptr;
setPolyFT3(null); setPolyFT3(null);
null->x0 = -1; null->x0 = -1;
@ -3033,8 +3030,8 @@ void RenderGame2(int view)
null->y2 = -1; null->y2 = -1;
null->tpage = 0x40; null->tpage = 0x40;
addPrim(pDVar1->ot + 8, null); addPrim(current->ot + 8, null);
pDVar1->primptr += sizeof(POLY_FT3); current->primptr += sizeof(POLY_FT3);
} }
notInDreaAndStevesEvilLair = Havana3DOcclusion(DrawMapPSX, (int *)&ObjectDrawnValue); notInDreaAndStevesEvilLair = Havana3DOcclusion(DrawMapPSX, (int *)&ObjectDrawnValue);

View File

@ -1196,9 +1196,11 @@ void PlotSkyPoly(int skytexnum, unsigned char r, unsigned char g, unsigned char
DVECTOR *outpoints = scratchPad_skyVertices; DVECTOR *outpoints = scratchPad_skyVertices;
#endif #endif
#ifdef PSX
if ((outpoints[src->v0].vy > -1 || outpoints[src->v1].vy > -1 || outpoints[src->v2].vy > -1 || outpoints[src->v3].vy > -1) && if ((outpoints[src->v0].vy > -1 || outpoints[src->v1].vy > -1 || outpoints[src->v2].vy > -1 || outpoints[src->v3].vy > -1) &&
(outpoints[src->v0].vx > -1 || outpoints[src->v1].vx > -1 || outpoints[src->v2].vx > -1 || outpoints[src->v3].vx > -1) && (outpoints[src->v0].vx > -1 || outpoints[src->v1].vx > -1 || outpoints[src->v2].vx > -1 || outpoints[src->v3].vx > -1) &&
(outpoints[src->v0].vx < 321 || outpoints[src->v1].vx < 321 || outpoints[src->v2].vx < 321 || outpoints[src->v3].vx < 321)) (outpoints[src->v0].vx < 321 || outpoints[src->v1].vx < 321 || outpoints[src->v2].vx < 321 || outpoints[src->v3].vx < 321))
#endif
{ {
setPolyFT4(poly); setPolyFT4(poly);