1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add widescreen background for school win screen

This commit is contained in:
Mathieu Schroeter 2018-07-23 23:34:06 +02:00
parent 76783ebfa6
commit 8d67df23b1
4 changed files with 31 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -901,6 +901,13 @@ DoInit (int argc, char * argv[], bool & exit)
if (!g_pPixmap->Cache (CHBACKWIN, "image/back-win.png", totalDim, iconDim))
return EXIT_FAILURE;
totalDim.x = LXLOGIC ();
totalDim.y = LYLOGIC ();
iconDim.x = 0;
iconDim.y = 0;
if (!g_pPixmap->Cache (CHBACKWIN0, "image/back-disco.png", totalDim, iconDim))
return EXIT_FAILURE;
totalDim.x = LXLOGIC ();
totalDim.y = LYLOGIC ();
iconDim.x = 0;

View File

@ -93,6 +93,7 @@
#define CHBACKWIN 22
#define CHBACKLOST 23
#define CHBACKTITLE 24
#define CHBACKWIN0 25
#define MAX_PRIVATE_MISSIONS 20

View File

@ -3312,16 +3312,36 @@ CEvent::ChangePhase (Uint32 phase)
m_phase = phase; // change phase
m_index = index;
auto backWide = table[m_index].chBackWide;
filename = table[m_index].backName;
if (filename.find ("%.3d") != std::string::npos)
filename = string_format (table[m_index].backName, GetImageWorld ());
{
auto id = GetImageWorld ();
filename = string_format (table[m_index].backName, id);
if (table[m_index].phase == EV_PHASE_LASTWIN)
{
switch (id)
{
case 0:
backWide = CHBACKWIN0;
break;
case 1:
// backWide = CHBACKWIN1;
break;
case 2:
backWide = CHBACKWIN;
break;
}
}
}
totalDim.x = LXLOGIC ();
totalDim.y = LYLOGIC ();
iconDim.x = 0;
iconDim.y = 0;
if (!m_pPixmap->Cache (
CHBACK, filename, totalDim, iconDim, table[m_index].mode,
table[m_index].chBackWide))
CHBACK, filename, totalDim, iconDim, table[m_index].mode, backWide))
{
WaitMouse (false);
m_tryInsertCount = 40;