rpms/chess/devel chess-disambiguate-Vector3.patch,NONE,1.1
Bruno Wolff III
bruno at fedoraproject.org
Tue Nov 17 09:40:22 UTC 2009
Author: bruno
Update of /cvs/pkgs/rpms/chess/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29519
Added Files:
chess-disambiguate-Vector3.patch
Log Message:
Add in the patch file.
chess-disambiguate-Vector3.patch:
include/GameOGRE.h | 2 +-
include/HandState.h | 8 ++++----
include/InputManager.h | 2 +-
include/Piece.h | 4 ++--
src/CaptureState.cpp | 8 ++++----
src/ChessApplication.cpp | 8 ++++----
src/GameOGRE.cpp | 12 ++++++------
src/GameState.cpp | 2 +-
src/HandState.cpp | 16 ++++++++--------
src/InputManager.cpp | 10 +++++-----
src/MovePieceState.cpp | 4 ++--
src/PickupState.cpp | 6 +++---
src/Piece.cpp | 4 ++--
src/RemoveState.cpp | 2 +-
14 files changed, 44 insertions(+), 44 deletions(-)
--- NEW FILE chess-disambiguate-Vector3.patch ---
diff -ru chess-1.0.orig/include/GameOGRE.h chess-1.0/include/GameOGRE.h
--- chess-1.0.orig/include/GameOGRE.h 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/include/GameOGRE.h 2009-11-14 14:50:57.000000000 -0600
@@ -34,7 +34,7 @@
void Pause(bool toggle) {mPaused = toggle;}
Ray CreateRay(void);
- Vector3 mCameraTarget;
+ Ogre::Vector3 mCameraTarget;
Real mCameraWantedYaw;
Real mCameraWantedPitch;
Real mCameraWantedDistance;
diff -ru chess-1.0.orig/include/HandState.h chess-1.0/include/HandState.h
--- chess-1.0.orig/include/HandState.h 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/include/HandState.h 2009-11-14 14:50:57.000000000 -0600
@@ -78,16 +78,16 @@
String mPromoType;
// used to tweak track positioning
- Vector3 mOffset;
+ Ogre::Vector3 mOffset;
// holds the target position (in world coordinates) at the end of this current state's life
- Vector3 mTargetPosition;
+ Ogre::Vector3 mTargetPosition;
// sets where the hand goes between moves
- Vector3 mStartingPosition;
+ Ogre::Vector3 mStartingPosition;
// this is used to help calculate the animation tracks properly
- Vector3 mMovementVector;
+ Ogre::Vector3 mMovementVector;
// holds which action the hand should be performing
ActionType mActionType;
diff -ru chess-1.0.orig/include/InputManager.h chess-1.0/include/InputManager.h
--- chess-1.0.orig/include/InputManager.h 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/include/InputManager.h 2009-11-14 14:50:57.000000000 -0600
@@ -29,7 +29,7 @@
void ShowSelectionNode(SceneNode *node);
void HideSelectionNode(void);
- void ShowCurrentNode(Vector3 position, Piece* thePiece, int& currentPosition);
+ void ShowCurrentNode(Ogre::Vector3 position, Piece* thePiece, int& currentPosition);
void HideCurrentNode(void);
void Update(Real dt);
diff -ru chess-1.0.orig/include/Piece.h chess-1.0/include/Piece.h
--- chess-1.0.orig/include/Piece.h 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/include/Piece.h 2009-11-14 14:50:57.000000000 -0600
@@ -54,8 +54,8 @@
int mColour;
int mPosition;
String mShortCode;
- Vector3 mOrigin;
- Vector3 mDestination;
+ Ogre::Vector3 mOrigin;
+ Ogre::Vector3 mDestination;
Entity *mEntity;
CollisionEntity *mColEntity;
SceneNode *mScenenode;
diff -ru chess-1.0.orig/src/CaptureState.cpp chess-1.0/src/CaptureState.cpp
--- chess-1.0.orig/src/CaptureState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/CaptureState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -38,7 +38,7 @@
if (Type == 0)
{
// get the world coordinates of where the piece is to be moved to
- mTargetPosition = Vector3::ZERO;
+ mTargetPosition = Ogre::Vector3::ZERO;
Functions::ConvertCoords(mDestinationSquare, mTargetPosition.x, mTargetPosition.z);
// tweak the offsets
@@ -79,15 +79,15 @@
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.4);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.1), mTargetPosition.y + 35, mTargetPosition.z - (mMovementVector.z * 0.1)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.1), mTargetPosition.y + 35, mTargetPosition.z - (mMovementVector.z * 0.1)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.6);
- key->setTranslate(Vector3(mTargetPosition.x, mTargetPosition.y + 25, mTargetPosition.z));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x, mTargetPosition.y + 25, mTargetPosition.z));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration);
- key->setTranslate(Vector3(mTargetPosition.x - (mOffset.x * 0.78), mTargetPosition.y, mTargetPosition.z + (mOffset.z * 0.38))); // tweaked 'til it looks good
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mOffset.x * 0.78), mTargetPosition.y, mTargetPosition.z + (mOffset.z * 0.38))); // tweaked 'til it looks good
key->setRotation(mHandNode->getOrientation());
// start the animation
diff -ru chess-1.0.orig/src/ChessApplication.cpp chess-1.0/src/ChessApplication.cpp
--- chess-1.0.orig/src/ChessApplication.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/ChessApplication.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -114,9 +114,9 @@
mGameRoot->attachObject(mBoard);
// set up the board's reflections
- Ogre::Plane plane(Vector3::UNIT_Y, 0 );
+ Ogre::Plane plane(Ogre::Vector3::UNIT_Y, 0 );
plane.d = 0;
- MeshManager::getSingleton().createPlane("board", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 160,160,1,1,true,1,1,1,Vector3::UNIT_Z);
+ MeshManager::getSingleton().createPlane("board", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 160,160,1,1,true,1,1,1,Ogre::Vector3::UNIT_Z);
Ogre::TexturePtr rttTexPtr = TextureManager::getSingleton().createManual("RttTex", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, 1024, 1024, MIP_DEFAULT, PF_R8G8B8, TU_RENDERTARGET);
RenderTexture* rttTex = rttTexPtr->getBuffer()->getRenderTarget();
@@ -148,8 +148,8 @@
mPlane = new MovablePlane("ReflectPlane");
Entity* mPlaneEnt;
mPlane->d = 0;
- mPlane->normal = Vector3::UNIT_Y;
- MeshManager::getSingleton().createPlane("ReflectionPlane", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, *mPlane, 600, 600, 1, 1, true, 1, 1, 1, Vector3::UNIT_Z);
+ mPlane->normal = Ogre::Vector3::UNIT_Y;
+ MeshManager::getSingleton().createPlane("ReflectionPlane", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, *mPlane, 600, 600, 1, 1, true, 1, 1, 1, Ogre::Vector3::UNIT_Z);
mPlaneEnt = mSceneManager->createEntity( "Plane", "ReflectionPlane" );
// Attach the rtt entity to the root of the scene
diff -ru chess-1.0.orig/src/GameOGRE.cpp chess-1.0/src/GameOGRE.cpp
--- chess-1.0.orig/src/GameOGRE.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/GameOGRE.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -39,14 +39,14 @@
: mCamera(camera), mReflectCamera(reflectcamera), mReflectCameraGround(reflectcamera2), mSceneManager(scenemanager), mWindow(window), mPaused(false)
{
// Initialize camera
- mCameraTarget = Vector3(0.0, 2.0, 15.0); //
+ mCameraTarget = Ogre::Vector3(0.0, 2.0, 15.0); //
mCameraWantedYaw = 0;
mCameraWantedPitch = -60;
mCameraWantedDistance = 250.0;
mCameraCorrection = 15.0;
- mCamera->setOrientation(Quaternion(Radian(Degree(mCameraWantedYaw)), Vector3::UNIT_Y)
- * Quaternion(Radian(Degree(mCameraWantedPitch)), Vector3::UNIT_X));
+ mCamera->setOrientation(Quaternion(Radian(Degree(mCameraWantedYaw)), Ogre::Vector3::UNIT_Y)
+ * Quaternion(Radian(Degree(mCameraWantedPitch)), Ogre::Vector3::UNIT_X));
mCamera->setPosition(mCameraTarget - mCameraWantedDistance*mCamera->getDirection());
// Setup animation default
@@ -107,8 +107,8 @@
t = 1.0;
// Create quaternion describing wanted orientation
- wantedOrientation = Quaternion(Radian(Degree(mCameraWantedYaw)), Vector3::UNIT_Y)
- * Quaternion(Radian(Degree(mCameraWantedPitch)), Vector3::UNIT_X);
+ wantedOrientation = Quaternion(Radian(Degree(mCameraWantedYaw)), Ogre::Vector3::UNIT_Y)
+ * Quaternion(Radian(Degree(mCameraWantedPitch)), Ogre::Vector3::UNIT_X);
currentDistance = (mCamera->getPosition() - mCameraTarget).length();
distance = currentDistance + t*(mCameraWantedDistance - currentDistance);
@@ -122,4 +122,4 @@
mReflectCameraGround->setOrientation(mCamera->getOrientation());
mReflectCameraGround->setPosition(mCamera->getPosition());
-}
\ No newline at end of file
+}
diff -ru chess-1.0.orig/src/GameState.cpp chess-1.0/src/GameState.cpp
--- chess-1.0.orig/src/GameState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/GameState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -37,7 +37,7 @@
mRaySceneQuery->setSortByDistance(true);
// Create a plane
- mPlane = new Ogre::Plane(Vector3::UNIT_Y, 0);
+ mPlane = new Ogre::Plane(Ogre::Vector3::UNIT_Y, 0);
}
GameState::~GameState()
diff -ru chess-1.0.orig/src/HandState.cpp chess-1.0/src/HandState.cpp
--- chess-1.0.orig/src/HandState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/HandState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -24,10 +24,10 @@
// default constructor
HandState::HandState(Hand* hand, const ActionType action, const int SourceSquare, const int DestinationSquare,
const int CastlingSource, const int CastlingDestination, const String PromoType)
- : mHand(hand), mAnimationBlender(0), mMoveState(0), mTargetPosition(Vector3::ZERO),
- mStartingPosition(Vector3(140,-7.5,180)), mMovementVector(Vector3::ZERO), mActionType(action), mStateType(Static),
+ : mHand(hand), mAnimationBlender(0), mMoveState(0), mTargetPosition(Ogre::Vector3::ZERO),
+ mStartingPosition(Ogre::Vector3(140,-7.5,180)), mMovementVector(Ogre::Vector3::ZERO), mActionType(action), mStateType(Static),
mSourceSquare(SourceSquare), mDestinationSquare(DestinationSquare), mStateDuration(0),
- mMPSceneNode(0), mCPSceneNode(0), mMovingPiece(0), mCapturedPiece(0), mOffset(Vector3::ZERO),
+ mMPSceneNode(0), mCPSceneNode(0), mMovingPiece(0), mCapturedPiece(0), mOffset(Ogre::Vector3::ZERO),
mCastleFirst(false), mCastlingSource(CastlingSource), mCastlingDestination(CastlingDestination), mPromoType(PromoType), mEnPassantFirst(false)
{
// create a new animation blender and set the initial animation
@@ -74,14 +74,14 @@
// work out the offset position
Ogre::Matrix3 boneRot, nodeRot;
- Vector3 nodePos = pieceNode->getPosition();
- Vector3 handPos = mHandNode->getPosition();
- Vector3 bonePos = bone->_getDerivedPosition();
+ Ogre::Vector3 nodePos = pieceNode->getPosition();
+ Ogre::Vector3 handPos = mHandNode->getPosition();
+ Ogre::Vector3 bonePos = bone->_getDerivedPosition();
bone->_getDerivedOrientation().ToRotationMatrix(boneRot);
mHandNode->getOrientation().ToRotationMatrix(nodeRot);
- Vector3 offsetPosition = (nodePos - (handPos + (nodeRot * bonePos)));
+ Ogre::Vector3 offsetPosition = (nodePos - (handPos + (nodeRot * bonePos)));
offsetPosition = offsetPosition * (nodeRot * boneRot);
// finally, attach the object to the bone
@@ -125,7 +125,7 @@
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.5);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.5), mTargetPosition.y + 65, mTargetPosition.z - (mMovementVector.z * 0.5)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.5), mTargetPosition.y + 65, mTargetPosition.z - (mMovementVector.z * 0.5)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration);
diff -ru chess-1.0.orig/src/InputManager.cpp chess-1.0/src/InputManager.cpp
--- chess-1.0.orig/src/InputManager.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/InputManager.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -36,11 +36,11 @@
// create a plane to show the current mouse position
mPlane = new MovablePlane("CurrentMPlane");
mPlane->d = 0;
- mPlane->normal = Vector3::UNIT_Y;
+ mPlane->normal = Ogre::Vector3::UNIT_Y;
MeshManager::getSingleton().createPlane("CurrentPlane",
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
*mPlane, 20, 20,
- 1, 1, true, 1, 1, 1, Vector3::UNIT_Z);
+ 1, 1, true, 1, 1, 1, Ogre::Vector3::UNIT_Z);
mCurrentEntity = mSceneManager->createEntity("CurrentEntity", "CurrentPlane" );
// create the nodes to hang off
@@ -99,9 +99,9 @@
mSelectionNode->setVisible(false);
}
-void ChessInputManager::ShowCurrentNode(Vector3 position, Piece* thePiece, int& currentPosition)
+void ChessInputManager::ShowCurrentNode(Ogre::Vector3 position, Piece* thePiece, int& currentPosition)
{
- Vector3 showPos;
+ Ogre::Vector3 showPos;
int pos;
if (!Functions::GetNearestPosition(position, showPos, pos))
@@ -140,4 +140,4 @@
// rotate the entity
if (mSelectionNode != 0)
mSelectionNode->yaw(Degree(-360 * dt), Node::TS_PARENT);
-}
\ No newline at end of file
+}
diff -ru chess-1.0.orig/src/MovePieceState.cpp chess-1.0/src/MovePieceState.cpp
--- chess-1.0.orig/src/MovePieceState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/MovePieceState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -50,7 +50,7 @@
else
{
// get the world coordinates of where the piece is to be moved to
- mTargetPosition = Vector3::ZERO;
+ mTargetPosition = Ogre::Vector3::ZERO;
Functions::ConvertCoords(mDestinationSquare, mTargetPosition.x, mTargetPosition.z);
}
@@ -89,7 +89,7 @@
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.5);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.5), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.5)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.5), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.5)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration);
diff -ru chess-1.0.orig/src/PickupState.cpp chess-1.0/src/PickupState.cpp
--- chess-1.0.orig/src/PickupState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/PickupState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -60,7 +60,7 @@
void PickupState::CreateMovementTrack()
{
// get the world coordinates of the piece being picked up
- mTargetPosition = Vector3::ZERO;
+ mTargetPosition = Ogre::Vector3::ZERO;
Functions::ConvertCoords(mSourceSquare, mTargetPosition.x, mTargetPosition.z);
// tweak the offsets
@@ -95,11 +95,11 @@
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.25);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.85), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.85)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.85), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.85)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.75);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.15), mTargetPosition.y + 35, mTargetPosition.z - (mMovementVector.z * 0.15)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.15), mTargetPosition.y + 35, mTargetPosition.z - (mMovementVector.z * 0.15)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration);
diff -ru chess-1.0.orig/src/Piece.cpp chess-1.0/src/Piece.cpp
--- chess-1.0.orig/src/Piece.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/Piece.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -33,7 +33,7 @@
CollisionEntity* Piece::GetCollisionEntity(void) {return mColEntity;}
Piece::Piece(const int colour, const String type, const int position, const int rotation, const String shortcode)
- : mOrigin(Vector3::ZERO), mDestination(Vector3::ZERO)// , mColEntity(0)
+ : mOrigin(Ogre::Vector3::ZERO), mDestination(Ogre::Vector3::ZERO)// , mColEntity(0)
{
// get a pointer for quickness
mSceneManager = static_cast<ChessApplication*>(ChessApplication::getSingletonPtr())->getSceneManager();
@@ -247,4 +247,4 @@
return true;
}
return false;
-}
\ No newline at end of file
+}
diff -ru chess-1.0.orig/src/RemoveState.cpp chess-1.0/src/RemoveState.cpp
--- chess-1.0.orig/src/RemoveState.cpp 2009-11-14 14:31:29.000000000 -0600
+++ chess-1.0/src/RemoveState.cpp 2009-11-14 14:50:57.000000000 -0600
@@ -85,7 +85,7 @@
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration * 0.5);
- key->setTranslate(Vector3(mTargetPosition.x - (mMovementVector.x * 0.1), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.1)));
+ key->setTranslate(Ogre::Vector3(mTargetPosition.x - (mMovementVector.x * 0.1), mTargetPosition.y + 25, mTargetPosition.z - (mMovementVector.z * 0.1)));
key->setRotation(mHandNode->getOrientation());
key = track->createNodeKeyFrame(mStateDuration);
More information about the scm-commits
mailing list