1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-14 00:54:05 +02:00

fix title background aspect ratio for PSX versions; add title screen loading for TR3 PSX version; fix aspect ration for TR2 & TR3 FMVs

This commit is contained in:
XProger
2018-07-07 01:31:08 +03:00
parent a9ba4a9bda
commit 73607410ca
3 changed files with 22 additions and 7 deletions

View File

@@ -822,21 +822,25 @@ namespace TR {
// TR3
case LVL_TR3_TITLE :
CHECK_FILE("pix/TITLEUK.BMP"); // PC (TODO: add other languages)
CHECK_FILE("PIXUS/TITLEUS.RAW"); // PSX (TODO: add other languages)
return "level/3/TITLEUK.PNG"; // WEB
case LVL_TR3_HOUSE :
CHECK_FILE("pix/HOUSE.BMP");
CHECK_FILE("PIX/HOUSE.RAW");
return "level/3/HOUSE.PNG";
case LVL_TR3_JUNGLE :
case LVL_TR3_TEMPLE :
case LVL_TR3_QUADCHAS :
case LVL_TR3_TONYBOSS :
CHECK_FILE("pix/INDIA.BMP");
CHECK_FILE("PIX/INDIA.RAW");
return "level/3/INDIA.PNG";
case LVL_TR3_SHORE :
case LVL_TR3_CRASH :
case LVL_TR3_RAPIDS :
case LVL_TR3_TRIBOSS :
CHECK_FILE("pix/SOUTHPAC.BMP");
CHECK_FILE("PIX/SOUTHPAC.RAW");
return "level/3/SOUTHPAC.PNG";
case LVL_TR3_ROOFS :
case LVL_TR3_SEWER :
@@ -844,17 +848,20 @@ namespace TR {
case LVL_TR3_OFFICE :
case LVL_TR3_STPAUL :
CHECK_FILE("pix/LONDON.BMP");
CHECK_FILE("PIX/LONDON.RAW");
return "level/3/LONDON.PNG";
case LVL_TR3_NEVADA :
case LVL_TR3_COMPOUND :
case LVL_TR3_AREA51 :
CHECK_FILE("pix/NEVADA.BMP");
CHECK_FILE("PIX/NEVADA.RAW");
return "level/3/NEVADA.PNG";
case LVL_TR3_ANTARC :
case LVL_TR3_MINES :
case LVL_TR3_CITY :
case LVL_TR3_CHAMBER :
CHECK_FILE("pix/ANTARC.BMP");
CHECK_FILE("PIX/ANTARC.RAW");
return "level/3/ANTARC.PNG";
default : return NULL;

View File

@@ -1490,16 +1490,20 @@ struct Inventory {
else
alpha = 255;
float sy = 1.0f;
if (background[0])
sy = (480.0f / 640.0f) * ((float)background[0]->width / (float)background[0]->height);
if (Core::settings.detail.stereo == Core::Settings::STEREO_VR) {
if (game->getLevel()->isTitle())
renderTitleBG(1.0f, 1.0f, alpha);
renderTitleBG(1.0f, sy, alpha);
else
renderGameBG();
} else {
if (background[1])
renderGameBG();
else
renderTitleBG(1.0f, 1.0f, alpha);
renderTitleBG(1.0f, sy, alpha);
}
Core::setBlendMode(bmAlpha);
@@ -1548,11 +1552,15 @@ struct Inventory {
Texture *tmp = background[0];
float sy = 1.0f;
if (game->getLevel()->version & TR::VER_TR1)
sy = 1.2f;
background[0] = video->frameTex[0];
renderTitleBG(1.0f, 1.2f, 255);
renderTitleBG(1.0f, sy, 255);
background[0] = video->frameTex[1];
renderTitleBG(1.0f, 1.2f, clamp(int((video->time / video->step) * 255), 0, 255));
renderTitleBG(1.0f, sy, clamp(int((video->time / video->step) * 255), 0, 255));
background[0] = tmp;

View File

@@ -498,7 +498,7 @@ struct Texture : GAPI::Texture {
stream.seek(6);
} else {
stream.seek(-4);
size = 384 * 256 * 2;
size = 512 * 256 * 2;
csize = stream.size;
}
@@ -562,8 +562,8 @@ struct Texture : GAPI::Texture {
}
delete[] cdata;
width = 384;
height = size / width / 2;
height = 256;
width = (dst - data) / height / 2;
uint32 *data32 = new uint32[width * height];
{