[chess] Change to handle ogre upgrade.
Bruno Wolff III
bruno at fedoraproject.org
Sat Jan 8 05:04:26 UTC 2011
commit 004a8c6a7d776d7cfed12b728beb94cd42ff96a6
Author: Bruno Wolff III <bruno at wolff.to>
Date: Fri Jan 7 23:02:58 2011 -0600
Change to handle ogre upgrade.
chess-ogre17.patch | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
chess.spec | 9 +++-
2 files changed, 111 insertions(+), 2 deletions(-)
---
diff --git a/chess-ogre17.patch b/chess-ogre17.patch
new file mode 100644
index 0000000..6d3e518
--- /dev/null
+++ b/chess-ogre17.patch
@@ -0,0 +1,104 @@
+diff -up chess-1.0/include/Application.h.ogre17 chess-1.0/include/Application.h
+--- chess-1.0/include/Application.h.ogre17 2010-12-21 16:11:52.200242001 -0500
++++ chess-1.0/include/Application.h 2010-12-21 16:11:52.238242001 -0500
+@@ -33,7 +33,7 @@ public:
+
+ SceneManager* getSceneManager();
+ RenderWindow* getRenderWindow();
+- CEGUI::OgreCEGUIRenderer* getGUIRenderer();
++ CEGUI::OgreRenderer* getGUIRenderer();
+ CEGUI::System* getGUISystem();
+
+ protected:
+@@ -49,7 +49,7 @@ protected:
+ RenderWindow *mWindow;
+ SceneManager *mSceneManager;
+ CollisionManager *mCollisionManager;
+- CEGUI::OgreCEGUIRenderer *mGUIRenderer;
++ CEGUI::OgreRenderer *mGUIRenderer;
+ CEGUI::System *mGUISystem;
+ };
+
+diff -up chess-1.0/include/stdafx.h.ogre17 chess-1.0/include/stdafx.h
+--- chess-1.0/include/stdafx.h.ogre17 2010-12-21 16:11:52.230242001 -0500
++++ chess-1.0/include/stdafx.h 2010-12-21 16:11:52.239242001 -0500
+@@ -21,8 +21,8 @@
+ #include <CEGUI/CEGUISystem.h>
+ #include <CEGUI/CEGUILogger.h>
+ #include <CEGUI/CEGUISchemeManager.h>
+-#include "OgreCEGUIRenderer.h"
+-#include "OgreCEGUIResourceProvider.h"
++#include <RendererModules/Ogre/CEGUIOgreRenderer.h>
++#include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
+
+ #include <boost/thread/thread.hpp>
+ #include <boost/bind.hpp>
+diff -up chess-1.0/Makefile.ogre17 chess-1.0/Makefile
+--- chess-1.0/Makefile.ogre17 2010-12-21 16:11:52.228242001 -0500
++++ chess-1.0/Makefile 2010-12-21 16:11:52.239242001 -0500
+@@ -2,7 +2,7 @@ PREFIX = /home/opt
+ DATADIR = $(PREFIX)/share/$(TARGET)
+ OPTFLAGS= -g -Wall -O2
+ CFLAGS = $(OPTFLAGS) -Iinclude $(shell pkg-config --cflags OGRE) \
+- $(shell pkg-config --cflags OIS) -I/usr/include/coldet
++ $(shell pkg-config --cflags CEGUI-OGRE) $(shell pkg-config --cflags OIS) -I/usr/include/coldet
+ CXXFLAGS= $(CFLAGS)
+ LDFLAGS = $(shell pkg-config --libs OGRE) -lcoldet -lboost_thread-mt \
+ $(shell pkg-config --libs CEGUI-OGRE) $(shell pkg-config --libs OIS)
+diff -up chess-1.0/src/Application.cpp.ogre17 chess-1.0/src/Application.cpp
+--- chess-1.0/src/Application.cpp.ogre17 2010-12-21 16:12:41.554241999 -0500
++++ chess-1.0/src/Application.cpp 2010-12-21 16:33:43.468242000 -0500
+@@ -28,8 +28,6 @@ Application::Application() : mRoot(0), m
+ Application::~Application()
+ {
+ delete mCollisionManager;
+- delete mGUISystem;
+- delete mGUIRenderer;
+ mRoot->destroySceneManager(mSceneManager);
+ delete mRoot;
+ }
+@@ -55,7 +53,7 @@ RenderWindow* Application::getRenderWind
+ return mWindow;
+ }
+
+-CEGUI::OgreCEGUIRenderer* Application::getGUIRenderer()
++CEGUI::OgreRenderer* Application::getGUIRenderer()
+ {
+ return mGUIRenderer;
+ }
+@@ -91,12 +89,13 @@ bool Application::initialize()
+ ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+
+ // CEGUI setup
+- mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneManager);
+- mGUISystem = new CEGUI::System(mGUIRenderer);
++ Ogre::RenderTarget *mRenderTarget = mWindow;
++ mGUIRenderer = &CEGUI::OgreRenderer::bootstrapSystem(*mRenderTarget);
++ mGUISystem = CEGUI::System::getSingletonPtr();
+ mGUISystem->setMouseMoveScaling(1.25); // adjust the speed
+
+ // Mouse
+- CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"WindowsLook.scheme");
++ CEGUI::SchemeManager::getSingleton().create((CEGUI::utf8*)"WindowsLook.scheme");
+ CEGUI::MouseCursor::getSingleton().setImage("WindowsLook", "MouseArrow");
+
+ // create a new collision manager
+diff -up chess-1.0/src/CollisionEntity.cpp.ogre17 chess-1.0/src/CollisionEntity.cpp
+--- chess-1.0/src/CollisionEntity.cpp.ogre17 2010-12-21 16:57:28.713241999 -0500
++++ chess-1.0/src/CollisionEntity.cpp 2010-12-21 16:58:07.220242000 -0500
+@@ -98,7 +98,7 @@ void CollisionEntity::Initialise(void)
+ void CollisionEntity::SetWorldTransform()
+ {
+ Matrix4 world;
+- mEntity->getParentSceneNode()->getWorldTransforms(&world);
++ world = mEntity->getParentSceneNode()->_getFullTransform();
+
+ float fMatrix[16];
+
+@@ -120,4 +120,4 @@ void CollisionEntity::SetWorldTransform(
+ fMatrix[15] = world[3][3];
+
+ mCollisionModel->setTransform(fMatrix);
+-}
+\ No newline at end of file
++}
diff --git a/chess.spec b/chess.spec
index dc45643..47e9eaf 100644
--- a/chess.spec
+++ b/chess.spec
@@ -1,6 +1,6 @@
Name: chess
Version: 1.0
-Release: 30%{?dist}
+Release: 31%{?dist}
Summary: 3D chess game
Group: Amusements/Games
License: GPLv2+
@@ -15,6 +15,7 @@ Patch0: chess-ogre12+gcc41+fixes.patch
Patch1: chess-ogre14.patch
Patch2: chess-ogre16.patch
Patch3: chess-disambiguate-Vector3.patch
+Patch4: chess-ogre17.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ogre-devel ois-devel cegui-devel coldet-devel boost-devel
BuildRequires: desktop-file-utils
@@ -33,6 +34,7 @@ graphics this is not playable!
%patch1 -p1 -z .ogre14
%patch2 -p1
%patch3 -p1
+%patch4 -p1 -b .ogre17
sed -i 's/\r//' Readme.txt License/gpl.txt
# remove patch backup file to stop it from getting installed
rm media/gui/tahoma-12.font.ogre14
@@ -40,7 +42,7 @@ rm media/gui/tahoma-12.font.ogre14
sed -i 's!/usr/lib!%{_libdir}!' plugins.cfg
# convert models to latest format
for i in media/models/*.mesh; do
- OgreMeshUpgrade $i
+ OgreMeshUpgrader $i
done
@@ -89,6 +91,9 @@ fi
%changelog
+* Tue Dec 21 2010 Tom Callaway <spot at fedoraproject.org> - 1.2-31
+- rebuild for new ogre
+
* Fri Jan 27 2010 Bruno Wolff III <bruno at wolff.to> - 1.2-30
- Rebuild for boost soname bump
More information about the scm-commits
mailing list