[SCM] ballz (platform/puzzle game) branch, master, updated. upstream/1.0-13-gf6c9245
Sylvain Beucler
beuc at beuc.net
Sat Oct 11 12:35:50 UTC 2008
The following commit has been merged in the master branch:
commit 61bd4dd1c0b9a97a21b306eb8290e90543c3c91c
Author: Sylvain Beucler <beuc at beuc.net>
Date: Sat Oct 11 13:55:06 2008 +0200
Add menu entry to toggle fullscreen
diff --git a/debian/patches/ballz-1.0-fullscreen.patch b/debian/patches/ballz-1.0-fullscreen.patch
deleted file mode 100644
index 662c37d..0000000
--- a/debian/patches/ballz-1.0-fullscreen.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ballz-1.0/src/game.cpp~ 2007-04-17 20:08:11.000000000 +0200
-+++ ballz-1.0/src/game.cpp 2007-04-17 20:08:11.000000000 +0200
-@@ -48,7 +48,7 @@
-
- set_window_title("Darkbits - B.A.L.L.Z.");
-
-- int driver = GFX_AUTODETECT_WINDOWED;
-+ int driver = GFX_AUTODETECT;
- set_color_depth(32);
- if (set_gfx_mode(driver, 640, 480, 0, 0) < 0) {
- set_color_depth(24);
diff --git a/debian/patches/ballz-1.0-toggle-fullscreen.patch b/debian/patches/ballz-1.0-toggle-fullscreen.patch
new file mode 100644
index 0000000..d14987f
--- /dev/null
+++ b/debian/patches/ballz-1.0-toggle-fullscreen.patch
@@ -0,0 +1,58 @@
+diff --git a/src/game.cpp b/src/game.cpp
+index 92c3085..8f11e34 100644
+--- a/src/game.cpp
++++ b/src/game.cpp
+@@ -41,7 +41,7 @@
+ #include "fading.hpp"
+ #include <cmath>
+
+-Game::Game()
++Game::Game() : fullscreen(false)
+ {
+ allegro_init();
+ install_keyboard();
+@@ -311,6 +311,14 @@ void Game::action(const gcn::ActionEvent& actionEvent)
+ mMainMenuContainer->setVisible(false);
+ mCreditsContainer->setVisible(true);
+ }
++ else if (mMainMenuListBox->getSelected() == 2)
++ {
++ if (fullscreen)
++ set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
++ else
++ set_gfx_mode(GFX_AUTODETECT_FULLSCREEN, 640, 480, 0, 0);
++ fullscreen = !fullscreen;
++ }
+ }
+ else if (actionEvent.getSource() == mLevelSelector)
+ {
+diff --git a/src/game.hpp b/src/game.hpp
+index a3b7761..2501a56 100644
+--- a/src/game.hpp
++++ b/src/game.hpp
+@@ -68,7 +68,7 @@ private:
+ public:
+ int getNumberOfElements()
+ {
+- return 2;
++ return 3;
+ }
+
+ std::string getElementAt(int i)
+@@ -79,6 +79,8 @@ private:
+ return std::string("PLAY");
+ case 1:
+ return std::string("CREDITS");
++ case 2:
++ return std::string("FULLSCREEN");
+ default: // Just to keep warnings away
+ return std::string("");
+ }
+@@ -94,6 +96,7 @@ private:
+ EXIT
+ };
+
++ bool fullscreen;
+ bool fadeRequested;
+ State state;
+ gcn::Gui* mGui;
diff --git a/debian/patches/series b/debian/patches/series
index bda142f..553a017 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
ballz-1.0-syslibs.patch
-ballz-1.0-fullscreen.patch
+ballz-1.0-toggle-fullscreen.patch
ballz-1.0-guichan081.patch
--
ballz (platform/puzzle game)
More information about the Pkg-games-commits
mailing list