r9837 - packages/trunk/libtuxcap/debian

Miriam Ruiz miriam at alioth.debian.org
Tue Jun 9 21:54:18 UTC 2009


Author: miriam
Date: 2009-06-09 21:54:17 +0000 (Tue, 09 Jun 2009)
New Revision: 9837

Modified:
   packages/trunk/libtuxcap/debian/demos.patch
Log:
Fix demos properly



Modified: packages/trunk/libtuxcap/debian/demos.patch
===================================================================
--- packages/trunk/libtuxcap/debian/demos.patch	2009-06-09 19:18:12 UTC (rev 9836)
+++ packages/trunk/libtuxcap/debian/demos.patch	2009-06-09 21:54:17 UTC (rev 9837)
@@ -952,201 +952,176 @@
 -	
 -#Once you're done modifying this template, you should rename it to "CMakeLists.txt"
 +TARGET_LINK_LIBRARIES(${CurrentExe} tuxcap)
---- libtuxcap-1.4.0.orig/tuxcap/demo2/GameApp.cpp
-+++ libtuxcap-1.4.0/tuxcap/demo2/GameApp.cpp
-@@ -132,7 +132,7 @@
- 	//	underscore instead of ending with it, it matters not, and again,
- 	//	is automatically loaded in by the image loading code.
- 	//	You need to clean up the memory allocated by these functions yourself.
--	mOpaqueBeamImg = (Image*) GetImage("images/beam_opaque.jpg");
-+	mOpaqueBeamImg = (Image*) GetImage("/usr/share/libtuxcap-demos/images/beam_opaque.jpg");
+--- libtuxcap-1.4.0.orig/tuxcap/demo1/main.cpp
++++ libtuxcap-1.4.0/tuxcap/demo1/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// If the file was not found or couldn't be loaded (i.e. due to an
- 	// incompatible file format) the returned value will be NULL.
-@@ -154,7 +154,7 @@
- 	}
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// Now load the other two images
--	mMoonImg = (Image*) GetImage("images/moon.gif");
-+	mMoonImg = (Image*) GetImage("/usr/share/libtuxcap-demos/images/moon.gif");
- 	if (mMoonImg == NULL)
- 	{
- #if 0	
-@@ -164,7 +164,7 @@
- 		return;
- 	}
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/demo2/main.cpp
++++ libtuxcap-1.4.0/tuxcap/demo2/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
--	mTurbotImg = (Image*) GetImage("images/turbot_worry.gif");
-+	mTurbotImg = (Image*) GetImage("/usr/share/libtuxcap-demos/images/turbot_worry.gif");
- 	if (mTurbotImg == NULL)
- 	{
- #if 0	
-@@ -221,7 +221,7 @@
- 	//	just an image but with an extra data file that tells the program
- 	//	how to map strings to their image representation.
- 	//		You load a font by specifying the text data file.
--	mTextFont = new ImageFont(this, "fonts/Kiloton9.txt");
-+	mTextFont = new ImageFont(this, "/usr/share/libtuxcap-demos/fonts/Kiloton9.txt");
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// We need to check to see if the font was properly initialized.
- 	// If it wasn't, then an error occurred and we need to abort.
-@@ -235,7 +235,7 @@
- 		return;
- 	}
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/demo3/main.cpp
++++ libtuxcap-1.4.0/tuxcap/demo3/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
--	mNumberFont = new ImageFont(this, "fonts/supernova20.txt");
-+	mNumberFont = new ImageFont(this, "/usr/share/libtuxcap-demos/fonts/supernova20.txt");
- 	if (!mNumberFont->mFontData->mInitialized)	
- 	{
- 		delete mNumberFont;
-@@ -256,7 +256,7 @@
- 	// to specify the file extension. LoadSound returns a boolean
- 	// indicating success or failure.
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--	if (!mSoundManager->LoadSound(1, "sounds/timer"))
-+	if (!mSoundManager->LoadSound(1, "/usr/share/libtuxcap-demos/sounds/timer"))
- 	{
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/demo4/main.cpp
++++ libtuxcap-1.4.0/tuxcap/demo4/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- #if 0
-@@ -266,7 +266,7 @@
- 		return;
- 	}
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--	if (!mSoundManager->LoadSound(2, "sounds/mutator"))
-+	if (!mSoundManager->LoadSound(2, "/usr/share/libtuxcap-demos/sounds/mutator"))
- 	{
- #if 0
- 		Popup("There was an error loading sounds/mutator");
---- libtuxcap-1.4.0.orig/tuxcap/demo3/GameApp.cpp
-+++ libtuxcap-1.4.0/tuxcap/demo3/GameApp.cpp
-@@ -131,7 +131,7 @@
- 	//	underscore instead of ending with it, it matters not, and again,
- 	//	is automatically loaded in by the image loading code.
- 	//	You need to clean up the memory allocated by these functions yourself.
--	mTurbotImg = (DDImage*) GetImage("images/turbot_worry.gif");
-+	mTurbotImg = (DDImage*) GetImage("/usr/share/libtuxcap-demos/images/turbot_worry.gif");
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/demo5/main.cpp
++++ libtuxcap-1.4.0/tuxcap/demo5/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// If the file was not found or couldn't be loaded (i.e. due to an
- 	// incompatible file format) the returned value will be NULL.
-@@ -151,7 +151,7 @@
- 		return;
- 	}
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--	mLightningImg = (DDImage*) GetImage("images/lightning.gif");
-+	mLightningImg = (DDImage*) GetImage("/usr/share/libtuxcap-demos/images/lightning.gif");
- 	if (mLightningImg == NULL)
- 	{
- 		mLoadingFailed = true;
-@@ -198,7 +198,7 @@
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/hungarr/main.cpp
++++ libtuxcap-1.4.0/tuxcap/hungarr/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// This is the same as in Demo2. Check the comments there
- 	// if you've forgotten how to load and initialize a font.
--	mFont = new ImageFont(this, "fonts/Kiloton9.txt");
-+	mFont = new ImageFont(this, "/usr/share/libtuxcap-demos/fonts/Kiloton9.txt");
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// We need to check to see if the font was properly initialized.
- 	// If it wasn't, then an error occurred and we need to abort.
---- libtuxcap-1.4.0.orig/tuxcap/demo4/GameApp.cpp
-+++ libtuxcap-1.4.0/tuxcap/demo4/GameApp.cpp
-@@ -188,12 +188,12 @@
- 	// We load our file manually, we do not use the resource manager for this.
- 	// The first parameter is the ID to associate the song with. Just as sounds
- 	// have IDs, so do music tracks.
--	mMusicInterface->LoadMusic(0, "music/music.mo3");
-+	mMusicInterface->LoadMusic(0, "/usr/share/libtuxcap-demos/music/music.mo3");
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/particledemo/main.cpp
++++ libtuxcap-1.4.0/tuxcap/particledemo/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// Let's load another copy of the file. Why? In order to fade from one
- 	// track to another, we need two instances of the track on different
- 	// channels. Let's load it again and give it a different ID, 1.
--	mMusicInterface->LoadMusic(1, "music/music.mo3");
-+	mMusicInterface->LoadMusic(1, "/usr/share/libtuxcap-demos/music/music.mo3");
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// Now we need to start playing a track. Because we are using an MO3
- 	// and because the original format was a .it (Impulse Tracker) file,
---- libtuxcap-1.4.0.orig/tuxcap/demo5/GameApp.cpp
-+++ libtuxcap-1.4.0/tuxcap/demo5/GameApp.cpp
-@@ -189,12 +189,12 @@
- 	// We load our file manually, we do not use the resource manager for this.
- 	// The first parameter is the ID to associate the song with. Just as sounds
- 	// have IDs, so do music tracks.
--	mMusicInterface->LoadMusic(0, "music/hungarr.ogg");
-+	mMusicInterface->LoadMusic(0, "/usr/share/libtuxcap-demos/music/hungarr.ogg");
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// Let's load another copy of the file. Why? In order to fade from one
- 	// track to another, we need two instances of the track on different
- 	// channels. Let's load it again and give it a different ID, 1.
--	mMusicInterface->LoadMusic(1, "music/hungarr.ogg");
-+	mMusicInterface->LoadMusic(1, "/usr/share/libtuxcap-demos/music/hungarr.ogg");
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// Now we need to start playing a track. Because we are using an MO3
- 	// and because the original format was a .it (Impulse Tracker) file,
---- libtuxcap-1.4.0.orig/tuxcap/hungarr/GameApp.cpp
-+++ libtuxcap-1.4.0/tuxcap/hungarr/GameApp.cpp
-@@ -25,7 +25,7 @@
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo2/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo2/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	mDebugKeysEnabled = true;
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--        mWindowIconBMP = "images/unicron_baby.bmp";
-+        mWindowIconBMP = "/usr/share/libtuxcap-demos/images/unicron_baby.bmp";
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo3/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo3/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	// By setting this to true, the framework will automatically check to see
- 	// if hardware acceleration can be turned on. This doesn't guarantee that it
-@@ -126,7 +126,7 @@
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
- 	// This example just uses 1 standard OGG file instead of a tracker file.
- 	// Since we aren't cross fading at all, we'll only load it once.
--	mMusicInterface->LoadMusic(0, "music/hungarr.ogg");
-+	mMusicInterface->LoadMusic(0, "/usr/share/libtuxcap-demos/music/hungarr.ogg");
- 	mMusicInterface->FadeIn(0, 0, 0.002, false);
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo4/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo4/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
- 	mNumLoadingThreadTasks = mResourceManager->GetNumResources("Game") + 
---- libtuxcap-1.4.0.orig/tuxcap/particledemo/Board.cpp
-+++ libtuxcap-1.4.0/tuxcap/particledemo/Board.cpp
-@@ -55,12 +55,12 @@
-         obj->AddSegmentShape(SexyVector2(340,400), SexyVector2(350, 400), 0.0f,0.0f,1.0f);
-         obj->SetCollisionType(3);
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--        DDImage* sprite = (DDImage*) gSexyAppBase->GetImage("images/particle.png");
-+        DDImage* sprite = (DDImage*) gSexyAppBase->GetImage("/usr/share/libtuxcap-demos/images/particle.png");
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo5/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo5/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
-         pmanager = new hgeParticleManager();
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
-         //creating the lava particle system with physics enabled
--        hgeParticleSystem* p = pmanager->SpawnPS("images/particle10.psi", sprite, 320,240, false, false, physics);
-+        hgeParticleSystem* p = pmanager->SpawnPS("/usr/share/libtuxcap-demos/images/particle10.psi", sprite, 320,240, false, false, physics);
-         
-         p->SetCollisionType(4); //This id is used to set the type of the particlesystem which can be used to register collisions between objects of the physics engine, see the
-         //example below in which collisions between the lava particles and the platforms are registered and handled in HandleTypedCollision
-@@ -71,12 +71,12 @@
-         //p->SetScale(2.0f);
-         
-         ///same particle system but no physics
--        //gSexyAppBase->mParticleManager->SpawnPS("images/particle10.psi", sprite, 320,240,  false, false);
-+        //gSexyAppBase->mParticleManager->SpawnPS("/usr/share/libtuxcap-demos/images/particle10.psi", sprite, 320,240,  false, false);
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo6/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo6/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
-         //alternatives to create a particle system, use this if you're gonna  reuse the same particlesystem to avoid loading it.
-         //the pro of declaring a hgeParticleSystem is that you can use the system to spawn both physics enabled and physics disabled particle systems from it
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--        //hgeParticleSystem* system = new hgeParticleSystem("images/particle10.psi",sprite, 0.0f, false, false);
-+        //hgeParticleSystem* system = new hgeParticleSystem("/usr/share/libtuxcap-demos/images/particle10.psi",sprite, 0.0f, false, false);
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/physicsdemo7/main.cpp
++++ libtuxcap-1.4.0/tuxcap/physicsdemo7/main.cpp
+@@ -3,6 +3,7 @@
+ using namespace Sexy;
  
-         //creates a particle system without physics
-         //gSexyAppBase->mParticleManager->SpawnPS(system, 320,400);
-@@ -86,7 +86,7 @@
-         
-         //it is also possible to use the ParticlePhysicsSystem class directly but you can only spawn physics enabled particle systems from it
+ int main(int argc, char** argv) {
++	SetAppResourceFolder("/usr/share/libtuxcap-demos");
+ 	GameApp app;
  
--        //ParticlePhysicsSystem* p_system = new ParticlePhysicsSystem("images/particle10.psi",sprite, physics, 0.0f, false, false);
-+        //ParticlePhysicsSystem* p_system = new ParticlePhysicsSystem("/usr/share/libtuxcap-demos/images/particle10.psi",sprite, physics, 0.0f, false, false);
+ 	app.Init();
+--- libtuxcap-1.4.0.orig/tuxcap/pythondemo1/main.cpp
++++ libtuxcap-1.4.0/tuxcap/pythondemo1/main.cpp
+@@ -5,7 +5,7 @@
+ int main(int argc, char** argv) {
+   PycapApp app;
  
-         //creates a particle system with physics
-         //gSexyAppBase->mParticleManager->SpawnPS(p_system, 320,400);
-@@ -96,7 +96,7 @@
-        
-         //explosion system which is used to spawn a new particle system from,  this is done whenever the lava hits the platforms, see the HandleTypedCollision function.
-         //this system does not have physics enabled
--        explosion= new hgeParticleSystem("images/particle6.psi",sprite, 0.0f, false, false);
-+        explosion= new hgeParticleSystem("/usr/share/libtuxcap-demos/images/particle6.psi",sprite, 0.0f, false, false);
-         explosion->SetParticleScale(2.0f);//scales the particles in the explosion particle system
-         explosion->SetScale(2.0f);//scales the explosion particle system itself
+-  SetAppResourceFolder("../images");
++  SetAppResourceFolder("/usr/share/libtuxcap-demos/images");
  
+   app.Init(argc, argv, false);
+   app.Start();
+--- libtuxcap-1.4.0.orig/tuxcap/pythondemo2/main.cpp
++++ libtuxcap-1.4.0/tuxcap/pythondemo2/main.cpp
+@@ -5,7 +5,7 @@
+ int main(int argc, char** argv) {
+   PycapApp app;
+ 
+-  SetAppResourceFolder("../images");
++  SetAppResourceFolder("/usr/share/libtuxcap-demos/images");
+ 
+   app.Init(argc,argv, false);
+   app.Start();
+--- libtuxcap-1.4.0.orig/tuxcap/pythondemo_template/main.cpp
++++ libtuxcap-1.4.0/tuxcap/pythondemo_template/main.cpp
+@@ -5,7 +5,7 @@
+ int main(int argc, char** argv) {
+   PycapApp app;
+ 
+-  SetAppResourceFolder("../images");
++  SetAppResourceFolder("/usr/share/libtuxcap-demos/images");
+ 
+   app.Init(argc,argv, false);
+   app.Start();




More information about the Pkg-games-commits mailing list