[planetblupi] 04/05: merge patched-debian/master into debian/master
Didier Raboud
odyx at moszumanska.debian.org
Fri Feb 2 18:26:08 UTC 2018
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to annotated tag debian/1.12.1-22-g13a7e27-3
in repository planetblupi.
commit 1412e873bb6c9cc5dd81a54c1a90201ff9d0bd27
Merge: f2d93e1 3baa931
Author: Didier Raboud <odyx at debian.org>
Date: Fri Feb 2 19:12:58 2018 +0100
merge patched-debian/master into debian/master
debian/.git-dpm | 4 +-
...de-to-retrieve-the-music-in-a-dedicated-m.patch | 106 +++++++++++++++++++++
...-music-choices-accordingly-to-the-availab.patch | 74 ++++++++++++++
debian/patches/series | 2 +
src/event.cxx | 65 ++++++++-----
src/event.h | 22 +++--
6 files changed, 238 insertions(+), 35 deletions(-)
diff --cc debian/.git-dpm
index bd3ade5,0000000..5589174
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
+# see git-dpm(1) from git-dpm package
- 13a7e27133bfb0ceb5c4df8a377354c580bf3b01
- 13a7e27133bfb0ceb5c4df8a377354c580bf3b01
++3baa931c68cc55464f545163b4f8c4f6f9537f40
++3baa931c68cc55464f545163b4f8c4f6f9537f40
+13a7e27133bfb0ceb5c4df8a377354c580bf3b01
+13a7e27133bfb0ceb5c4df8a377354c580bf3b01
+planetblupi_1.12.1-22-g13a7e27.orig.tar.xz
+af499e148a32d28bb1f8e1f1620c1f5bc362dd49
+83827908
diff --cc debian/patches/0001-Move-the-code-to-retrieve-the-music-in-a-dedicated-m.patch
index 0000000,0000000..3fc23bc
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-Move-the-code-to-retrieve-the-music-in-a-dedicated-m.patch
@@@ -1,0 -1,0 +1,106 @@@
++From c2db10c29276a6bdab67c64cc290a6347b35a9b5 Mon Sep 17 00:00:00 2001
++From: Mathieu Schroeter <mathieu at schroetersa.ch>
++Date: Wed, 31 Jan 2018 06:50:56 +0100
++Subject: Move the code to retrieve the music in a dedicated method
++
++---
++ src/event.cxx | 46 ++++++++++++++++++++++++++--------------------
++ src/event.h | 21 +++++++++++----------
++ 2 files changed, 37 insertions(+), 30 deletions(-)
++
++diff --git a/src/event.cxx b/src/event.cxx
++index 31429a9..9854f0c 100644
++--- a/src/event.cxx
+++++ b/src/event.cxx
++@@ -3065,6 +3065,31 @@ CEvent::IsHelpHide ()
++ return bHide;
++ }
++
+++std::string
+++CEvent::GetMusicLocation (Sint32 music)
+++{
+++ static const std::string exts[] = {"ogg", "mid"};
+++ static const Location locs[] = {LOCATION_USER, LOCATION_BASE};
+++ std::string absolute;
+++
+++ // Look for music in the user directory, then in the game directory.
+++ for (size_t i = 0; i < countof (locs); ++i)
+++ {
+++ auto filename = string_format (
+++ "music/music%.3d.%s", music - 1, exts[g_restoreMidi ? 1 : 0].c_str ());
+++ if (!FileExists (filename, absolute, locs[i]))
+++ filename = string_format (
+++ "music/music%.3d.%s", music - 1, exts[g_restoreMidi ? 0 : 1].c_str ());
+++
+++ if (FileExists (filename, absolute, locs[i]))
+++ break;
+++
+++ absolute = "";
+++ }
+++
+++ return absolute;
+++}
+++
++ /**
++ * \brief Change the phase.
++ *
++@@ -3374,26 +3399,7 @@ CEvent::ChangePhase (Uint32 phase)
++ music = m_pDecor->GetMusic ();
++ if (music > 0)
++ {
++- static const std::string exts[] = {"ogg", "mid"};
++- static const Location locs[] = {LOCATION_USER, LOCATION_BASE};
++- std::string absolute;
++-
++- // Look for music in the user directory, then in the game directory.
++- for (size_t i = 0; i < countof (locs); ++i)
++- {
++- filename = string_format (
++- "music/music%.3d.%s", music - 1,
++- exts[g_restoreMidi ? 1 : 0].c_str ());
++- if (!FileExists (filename, absolute, locs[i]))
++- filename = string_format (
++- "music/music%.3d.%s", music - 1,
++- exts[g_restoreMidi ? 0 : 1].c_str ());
++-
++- if (FileExists (filename, absolute, locs[i]))
++- break;
++-
++- absolute = "";
++- }
+++ auto absolute = this->GetMusicLocation (music);
++
++ m_pSound->StopMusic ();
++ m_pSound->PlayMusic (absolute);
++diff --git a/src/event.h b/src/event.h
++index 4f16e91..73fe2d5 100644
++--- a/src/event.h
+++++ b/src/event.h
++@@ -94,16 +94,17 @@ public:
++
++ Point GetMousePos ();
++ void
++- Create (CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie);
++- void SetFullScreen (bool bFullScreen);
++- Sint32 GetWorld ();
++- Sint32 GetPhysicalWorld ();
++- Sint32 GetImageWorld ();
++- bool IsHelpHide ();
++- bool ChangePhase (Uint32 phase);
++- bool MovieToStart ();
++- Uint32 GetPhase ();
++- void TryInsert ();
+++ Create (CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie);
+++ void SetFullScreen (bool bFullScreen);
+++ Sint32 GetWorld ();
+++ Sint32 GetPhysicalWorld ();
+++ Sint32 GetImageWorld ();
+++ bool IsHelpHide ();
+++ std::string GetMusicLocation (Sint32 music);
+++ bool ChangePhase (Uint32 phase);
+++ bool MovieToStart ();
+++ Uint32 GetPhase ();
+++ void TryInsert ();
++
++ Sint32 GetButtonIndex (Sint32 button);
++ Sint32 GetState (Sint32 button);
diff --cc debian/patches/0002-Enable-only-music-choices-accordingly-to-the-availab.patch
index 0000000,0000000..ffa4774
new file mode 100644
--- /dev/null
+++ b/debian/patches/0002-Enable-only-music-choices-accordingly-to-the-availab.patch
@@@ -1,0 -1,0 +1,74 @@@
++From 3baa931c68cc55464f545163b4f8c4f6f9537f40 Mon Sep 17 00:00:00 2001
++From: Mathieu Schroeter <mathieu at schroetersa.ch>
++Date: Wed, 31 Jan 2018 07:32:33 +0100
++Subject: Enable only music choices accordingly to the available formats
++
++It fixes OdyX need #47.
++---
++ src/event.cxx | 19 ++++++++++++++++---
++ src/event.h | 1 +
++ 2 files changed, 17 insertions(+), 3 deletions(-)
++
++diff --git a/src/event.cxx b/src/event.cxx
++index 9854f0c..ad7876b 100644
++--- a/src/event.cxx
+++++ b/src/event.cxx
++@@ -2075,6 +2075,10 @@ CEvent::DrawButtons ()
++ SetEnable (EV_BUTTON10, bEnable);
++ }
++
+++ /* Check if both music formats are available */
+++ auto ogg = this->IsBaseMusicAvailable (1, "ogg");
+++ auto mid = this->IsBaseMusicAvailable (1, "mid");
+++
++ if (m_phase == EV_PHASE_SETTINGS)
++ {
++ SetEnable (EV_BUTTON1, m_Lang != m_Languages.begin ());
++@@ -2086,8 +2090,8 @@ CEvent::DrawButtons ()
++ SetEnable (EV_BUTTON5, !g_bFullScreen && g_zoom > 1);
++ SetEnable (EV_BUTTON6, !g_bFullScreen && g_zoom < 2);
++
++- SetEnable (EV_BUTTON7, g_restoreMidi);
++- SetEnable (EV_BUTTON8, !g_restoreMidi);
+++ SetEnable (EV_BUTTON7, g_restoreMidi && mid && ogg);
+++ SetEnable (EV_BUTTON8, !g_restoreMidi && mid && ogg);
++ }
++
++ assert (m_index >= 0);
++@@ -2577,7 +2581,7 @@ CEvent::DrawButtons ()
++ DrawText (m_pPixmap, pos, res);
++ }
++
++- text = g_restoreMidi ? gettext ("Midi") : gettext ("Ogg");
+++ text = (g_restoreMidi && mid) || !ogg ? gettext ("Midi") : gettext ("Ogg");
++ lg = GetTextWidth (text);
++ pos.x = (399 + 40) - lg / 2;
++ pos.y = 330 - 20;
++@@ -3065,6 +3069,15 @@ CEvent::IsHelpHide ()
++ return bHide;
++ }
++
+++bool
+++CEvent::IsBaseMusicAvailable (Sint32 music, const std::string & format)
+++{
+++ std::string absolute;
+++ auto filename =
+++ string_format ("music/music%.3d.%s", music - 1, format.c_str ());
+++ return FileExists (filename, absolute, LOCATION_BASE);
+++}
+++
++ std::string
++ CEvent::GetMusicLocation (Sint32 music)
++ {
++diff --git a/src/event.h b/src/event.h
++index 73fe2d5..d31a532 100644
++--- a/src/event.h
+++++ b/src/event.h
++@@ -100,6 +100,7 @@ public:
++ Sint32 GetPhysicalWorld ();
++ Sint32 GetImageWorld ();
++ bool IsHelpHide ();
+++ bool IsBaseMusicAvailable (Sint32 music, const std::string & format);
++ std::string GetMusicLocation (Sint32 music);
++ bool ChangePhase (Uint32 phase);
++ bool MovieToStart ();
diff --cc debian/patches/series
index 0000000,0000000..78289af
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,2 @@@
++0001-Move-the-code-to-retrieve-the-music-in-a-dedicated-m.patch
++0002-Enable-only-music-choices-accordingly-to-the-availab.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/planetblupi.git
More information about the Pkg-games-commits
mailing list