Update of /cvsroot/opentnl/tnl/zap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8819/zap
Modified Files:
barrier.cpp moveObject.cpp sfx.cpp sfx.h ship.cpp
Log Message:
Updated docs.
Added images for docs.
Enhanced SFX, attempted to fix barrier issues.
Index: moveObject.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/moveObject.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** moveObject.cpp 20 Apr 2004 04:27:20 -0000 1.1
--- moveObject.cpp 20 Apr 2004 08:51:29 -0000 1.2
***************
*** 28,31 ****
--- 28,32 ----
#include "SweptEllipsoid.h"
#include "sparkManager.h"
+ #include "sfx.h"
namespace Zap
***************
*** 297,300 ****
--- 298,305 ----
if(scale > 0.5f)
{
+ // Make a noise...
+ SFXHandle h = new SFXObject(SFXBounceWall, collisionPoint, Point());
+ h->play();
+
Color bumpC(scale/3, scale/3, scale);
***************
*** 334,337 ****
--- 339,346 ----
mMoveState[stateIndex].vel += collisionVector * (v1f - v1i);
shipHit->mMoveState[stateIndex].vel += collisionVector * (v2f - v2i);
+
+ SFXHandle h = new SFXObject(SFXBounceObject, shipHit->mMoveState[stateIndex].pos, Point());
+ h->play();
+
}
Index: sfx.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/sfx.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sfx.cpp 20 Apr 2004 04:27:20 -0000 1.1
--- sfx.cpp 20 Apr 2004 08:51:29 -0000 1.2
***************
*** 48,52 ****
"teleport_in.wav",
"teleport_out.wav",
!
NULL,
};
--- 48,53 ----
"teleport_in.wav",
"teleport_out.wav",
! "bounce_wall.wav",
! "bounce_obj.wav",
NULL,
};
Index: barrier.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/barrier.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** barrier.cpp 20 Apr 2004 04:27:19 -0000 1.1
--- barrier.cpp 20 Apr 2004 08:51:29 -0000 1.2
***************
*** 206,209 ****
--- 206,210 ----
}
}
+
// if both are in, just go to the next edge.
Index: sfx.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/sfx.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sfx.h 20 Apr 2004 04:27:20 -0000 1.1
--- sfx.h 20 Apr 2004 08:51:29 -0000 1.2
***************
*** 47,50 ****
--- 47,52 ----
SFXTeleportIn,
SFXTeleportOut,
+ SFXBounceWall,
+ SFXBounceObject,
NumSFXBuffers
};
Index: ship.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/ship.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ship.cpp 20 Apr 2004 04:27:20 -0000 1.1
--- ship.cpp 20 Apr 2004 08:51:29 -0000 1.2
***************
*** 175,179 ****
float time = deltaT * 0.001;
Point deltap = mMoveState[ActualState].pos -
! mMoveState[RenderState].pos;
Point requestVel = deltap;
--- 175,179 ----
float time = deltaT * 0.001;
Point deltap = mMoveState[ActualState].pos -
! mMoveState[RenderState].pos;
Point requestVel = deltap;
***************
*** 211,244 ****
else
mMoveState[RenderState] = mMoveState[ActualState];
- /*
-
- U32 timeUsed = deltaT;
- if(interpTime)
- {
- if(interpTime < timeUsed)
- {
- timeUsed -= interpTime;
- interpTime = 0;
- mMoveState[RenderState] = mMoveState[ActualState];
- }
- else
- {
- Point totalDelta = mMoveState[ActualState].pos -
- mMoveState[RenderState].pos;
- mMoveState[RenderState].pos +=
- totalDelta * (timeUsed / F32(interpTime));
-
- interpTime -= timeUsed;
- timeUsed = 0;
- }
- }
- if(timeUsed)
- {
- lastMove.time = timeUsed;
- processMove(&lastMove, ActualState);
- mMoveState[RenderState] = mMoveState[ActualState];
- }*/
updateExtent();
if(hasExploded && timeUntilRemove)
--- 211,216 ----
***************
*** 424,428 ****
{
Rect queryRect(mMoveState[ActualState].pos, mMoveState[ActualState].pos);
! queryRect.expand(Point(500, 400));
fillVector.clear();
--- 396,400 ----
{
Rect queryRect(mMoveState[ActualState].pos, mMoveState[ActualState].pos);
! queryRect.expand(Point(600, 500));
fillVector.clear();
***************
*** 476,491 ****
Color ShipExplosionColors[NumShipExplosionColors] = {
! Color(1, 0, 0),
! Color(0.9, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 1, 0),
! Color(1, 0, 0),
! Color(0.8, 1.0, 0),
! Color(1, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 0, 0),
! Color(0.9, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 1, 0),
};
--- 448,463 ----
Color ShipExplosionColors[NumShipExplosionColors] = {
! Color(1, 0, 0),
! Color(0.9, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 1, 0),
! Color(1, 0, 0),
! Color(0.8, 1.0, 0),
! Color(1, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 0, 0),
! Color(0.9, 0.5, 0),
! Color(1, 1, 1),
! Color(1, 1, 0),
};
|