rpms/chess/devel chess-ogre16.patch,NONE,1.1 chess.spec,1.20,1.21

Alexey Torkhov atorkhov at fedoraproject.org
Fri Sep 19 07:37:36 UTC 2008


Author: atorkhov

Update of /cvs/pkgs/rpms/chess/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3617

Modified Files:
	chess.spec 
Added Files:
	chess-ogre16.patch 
Log Message:
* Fri Sep 19 2008 Alexey Torkhov <atorkhov at gmail.com> 1.0-19
- Port to OGRE 1.6


chess-ogre16.patch:

--- NEW FILE chess-ogre16.patch ---
diff -urp chess.orig/include/stdafx.h chess/include/stdafx.h
--- chess.orig/include/stdafx.h	2008-09-14 14:18:19.000000000 +0400
+++ chess/include/stdafx.h	2008-09-14 14:18:34.000000000 +0400
@@ -18,8 +18,6 @@
 #ifndef STDAFX_H
 #define STDAFX_H
 
-#include "OgreNoMemoryMacros.h"
-
 #include <CEGUI/CEGUISystem.h>
 #include <CEGUI/CEGUILogger.h>
 #include <CEGUI/CEGUISchemeManager.h>
@@ -32,8 +30,6 @@
 #include <coldet.h>
 #include <math3d.h>
 
-#include "OgreMemoryMacros.h" 
-
 #include <Ogre.h>
 
 using namespace Ogre;
diff -urp chess.orig/src/CaptureState.cpp chess/src/CaptureState.cpp
--- chess.orig/src/CaptureState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/CaptureState.cpp	2008-09-14 14:56:33.000000000 +0400
@@ -48,7 +48,7 @@ void CaptureState::CreateMovementTrack(c
 
     // make sure the scene node's rotation is taken into account
     Ogre::Matrix3 nodeRot;      
-    mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot);  
+    mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot);
     mOffset = mOffset * nodeRot;
 
     // tweak the position according to the offsets
diff -urp chess.orig/src/ChessApplication.cpp chess/src/ChessApplication.cpp
--- chess.orig/src/ChessApplication.cpp	2008-09-14 14:18:19.000000000 +0400
+++ chess/src/ChessApplication.cpp	2008-09-14 15:09:29.000000000 +0400
@@ -118,7 +118,7 @@ void ChessApplication::createScene()
   plane.d = 0;
   MeshManager::getSingleton().createPlane("board", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 160,160,1,1,true,1,1,1,Vector3::UNIT_Z);
 
-  RenderTexture* rttTex = mRoot->getRenderSystem()->createRenderTexture( "RttTex", 1024, 1024, TEX_TYPE_2D, PF_R8G8B8 );  
+  RenderTexture* rttTex = (RenderTexture*) TextureManager::getSingleton().createManual("RttTex", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, 1024, 1024, MIP_DEFAULT, PF_R8G8B8, TU_RENDERTARGET).get();
   Viewport *v = rttTex->addViewport(mReflectCamera);
   v->setClearEveryFrame(true);
   v->setBackgroundColour(ColourValue::Black);
@@ -159,7 +159,7 @@ void ChessApplication::createScene()
   mPlaneNode->attachObject(mPlane);
   mPlaneNode->translate(0, -15, 0);  
 
-  RenderTexture* rttTexa = mRoot->getRenderSystem()->createRenderTexture("RttTexa", 1024, 1024, TEX_TYPE_2D, PF_R8G8B8 );
+  RenderTexture* rttTexa = (RenderTexture*) TextureManager::getSingleton().createManual("RttTexa", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, 1024, 1024, MIP_DEFAULT, PF_R8G8B8, TU_RENDERTARGET).get();
   {
       Viewport *va = rttTexa->addViewport( mReflectCameraGround );
       va->setClearEveryFrame( true );
diff -urp chess.orig/src/HandState.cpp chess/src/HandState.cpp
--- chess.orig/src/HandState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/HandState.cpp	2008-09-14 15:17:09.000000000 +0400
@@ -69,16 +69,16 @@ void HandState::AttachPiece(const String
   Bone* bone = mHandEntity->getSkeleton()->getBone(bonename);     
 
   // work out the offset orientation
-  Quaternion offsetRotation = (bone->getWorldOrientation().Inverse() * pieceNode->getOrientation());
+  Quaternion offsetRotation = (bone->_getDerivedOrientation().Inverse() * pieceNode->getOrientation());
 
   // work out the offset position
   Ogre::Matrix3 boneRot, nodeRot;    
 
   Vector3 nodePos = pieceNode->getPosition();
   Vector3 handPos = mHandNode->getPosition(); 
-  Vector3 bonePos = bone->getWorldPosition();             
+  Vector3 bonePos = bone->_getDerivedPosition();
 
-  bone->getWorldOrientation().ToRotationMatrix(boneRot);
+  bone->_getDerivedOrientation().ToRotationMatrix(boneRot);
   mHandNode->getOrientation().ToRotationMatrix(nodeRot);
 
   Vector3 offsetPosition = (nodePos - (handPos + (nodeRot * bonePos))); 
@@ -102,7 +102,7 @@ void HandState::BaseCreateMovementTrack(
 {
   // make sure the scene node's rotation is taken into account
   Ogre::Matrix3 nodeRot;      
-  mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot); 
+  mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot); 
 
   mTargetPosition = (mStartingPosition * nodeRot);  
 
diff -urp chess.orig/src/MovePieceState.cpp chess/src/MovePieceState.cpp
--- chess.orig/src/MovePieceState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/MovePieceState.cpp	2008-09-14 15:18:31.000000000 +0400
@@ -61,7 +61,7 @@ void MovePieceState::CreateMovementTrack
 
   // make sure the scene node's rotation is taken into account
   Ogre::Matrix3 nodeRot;      
-  mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot);  
+  mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot);
   mOffset = mOffset * nodeRot;
 
   // tweak the position according to the offsets
@@ -148,4 +148,4 @@ HandState::StateType MovePieceState::Upd
   }
   else    
     return mStateType;  
-}
\ В конце файла нет новой строки
+}
diff -urp chess.orig/src/PickupState.cpp chess/src/PickupState.cpp
--- chess.orig/src/PickupState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/PickupState.cpp	2008-09-14 15:19:24.000000000 +0400
@@ -70,7 +70,7 @@ void PickupState::CreateMovementTrack()
 
   // make sure the scene node's rotation is taken into account
   Ogre::Matrix3 nodeRot;      
-  mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot);  
+  mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot);  
   mOffset = mOffset * nodeRot;
 
   // tweak the position according to the offsets
@@ -140,4 +140,4 @@ HandState::StateType PickupState::Update
   }
   else    
     return mStateType;
-}
\ В конце файла нет новой строки
+}
diff -urp chess.orig/src/RemoveState.cpp chess/src/RemoveState.cpp
--- chess.orig/src/RemoveState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/RemoveState.cpp	2008-09-14 15:26:24.000000000 +0400
@@ -49,7 +49,7 @@ void RemoveState::CreateMovementTrack()
 
   // make sure the scene node's rotation is taken into account
   Ogre::Matrix3 nodeRot;      
-  mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot);  
+  mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot);
   
   // tweak the position according to the offsets
   mTargetPosition += mOffset;  
@@ -115,4 +115,4 @@ HandState::StateType RemoveState::Update
   }
   else    
     return HandState::Remove;
-}
\ В конце файла нет новой строки
+}
diff -urp chess.orig/src/StaticState.cpp chess/src/StaticState.cpp
--- chess.orig/src/StaticState.cpp	2008-09-14 14:18:15.000000000 +0400
+++ chess/src/StaticState.cpp	2008-09-14 15:28:13.000000000 +0400
@@ -33,7 +33,7 @@ void StaticState::Initialise(void)
   // put the hand in it's starting position
   // - make sure the scene node's rotation is taken into account
   Ogre::Matrix3 nodeRot;      
-  mHandNode->getWorldOrientation().ToRotationMatrix(nodeRot); 
+  mHandNode->_getDerivedOrientation().ToRotationMatrix(nodeRot);
   mTargetPosition = (mStartingPosition * nodeRot);  
   mHandNode->setPosition(mTargetPosition);   
 }


Index: chess.spec
===================================================================
RCS file: /cvs/pkgs/rpms/chess/devel/chess.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- chess.spec	26 Aug 2008 14:34:09 -0000	1.20
+++ chess.spec	19 Sep 2008 07:37:06 -0000	1.21
@@ -1,6 +1,6 @@
 Name:           chess
 Version:        1.0
-Release:        18%{?dist}
+Release:        19%{?dist}
 Summary:        3D chess game
 Group:          Amusements/Games
 License:        GPLv2+
@@ -13,6 +13,7 @@
 Source3:        cegui-0.5-windowslook.tar.gz
 Patch0:         chess-ogre12+gcc41+fixes.patch
 Patch1:         chess-ogre14.patch
+Patch2:         chess-ogre16.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
@@ -29,6 +30,7 @@
 %setup -q -c -a 3
 %patch0 -p1
 %patch1 -p1 -z .ogre14
+%patch2 -p1
 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
@@ -85,6 +87,9 @@
 
 
 %changelog
+* Fri Sep 19 2008 Alexey Torkhov <atorkhov at gmail.com> 1.0-19
+- Port to OGRE 1.6
+
 * Sun Aug 17 2008 Hans de Goede <jwrdegoede at fedoraproject.org> 1.0-18
 - Rebuild for new boost
 




More information about the scm-commits mailing list