From 83d5b34416d1aac9e3f381ddd967dfe05c8a9d37 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Mon, 23 Jul 2018 18:41:54 +0200 Subject: [PATCH] Add widescreen background for title screen --- src/blupi.cxx | 8 ++++++++ src/def.h | 1 + src/event.cxx | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/blupi.cxx b/src/blupi.cxx index 35ae8de..04d8358 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -847,6 +847,14 @@ DoInit (int argc, char * argv[], bool & exit) g_pPixmap->DrawImage (-1, CHBACK, rcRect); // dessine le fond g_pPixmap->Display (); + totalDim.x = LXLOGIC (); + totalDim.y = LYLOGIC (); + iconDim.x = 0; + iconDim.y = 0; + if (!g_pPixmap->Cache ( + CHBACKTITLE, "image/back-title.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 0c0833d..4914071 100644 --- a/src/def.h +++ b/src/def.h @@ -92,6 +92,7 @@ #define CHBACKBYE 21 #define CHBACKWIN 22 #define CHBACKLOST 23 +#define CHBACKTITLE 24 #define MAX_PRIVATE_MISSIONS 20 diff --git a/src/event.cxx b/src/event.cxx index 9dbc819..fedc27f 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -102,7 +102,7 @@ static Phase table[] = { EV_PHASE_TESTCD, "image/init.png", - CHNONE, + CHBACKTITLE, CPixmap::Mode::FIX, false, { @@ -128,7 +128,7 @@ static Phase table[] = { EV_PHASE_INIT, "image/init.png", - CHNONE, + CHBACKTITLE, CPixmap::Mode::FIX, false, {