diff --git a/resources/image/back-disco.png b/resources/image/back-disco.png new file mode 100644 index 0000000..bccfdf4 Binary files /dev/null and b/resources/image/back-disco.png differ diff --git a/src/blupi.cxx b/src/blupi.cxx index 04d8358..62e88ef 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -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; diff --git a/src/def.h b/src/def.h index 4914071..23fcda6 100644 --- a/src/def.h +++ b/src/def.h @@ -93,6 +93,7 @@ #define CHBACKWIN 22 #define CHBACKLOST 23 #define CHBACKTITLE 24 +#define CHBACKWIN0 25 #define MAX_PRIVATE_MISSIONS 20 diff --git a/src/event.cxx b/src/event.cxx index fedc27f..00d2a36 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -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;