Update of /cvsroot/opentnl/tnl/zap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12861/zap
Modified Files:
UI.cpp UI.h UIGame.cpp UIMenus.cpp quickChat.cpp sfx.cpp sfx.h
Log Message:
Added menu boop.
Index: UIGame.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** UIGame.cpp 22 Apr 2004 07:27:27 -0000 1.6
--- UIGame.cpp 22 Apr 2004 07:46:20 -0000 1.7
***************
*** 307,310 ****
--- 307,311 ----
case 'v':
case 'V':
+ UserInterface::playBoop();
mVChat->show();
mCurrentMode = VChatMode;
Index: UIMenus.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/UIMenus.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** UIMenus.cpp 21 Apr 2004 20:19:07 -0000 1.2
--- UIMenus.cpp 22 Apr 2004 07:46:20 -0000 1.3
***************
*** 85,88 ****
--- 85,90 ----
if(selectionIndex < 0)
selectionIndex = menuItems.size() - 1;
+
+ UserInterface::playBoop();
}
else if(key == GLUT_KEY_DOWN || key == GLUT_KEY_RIGHT)
***************
*** 91,94 ****
--- 93,98 ----
if(selectionIndex >= menuItems.size())
selectionIndex = 0;
+
+ UserInterface::playBoop();
}
}
***************
*** 98,101 ****
--- 102,106 ----
if(key == '\r')
{
+ UserInterface::playBoop();
processSelection(selectionIndex);
selectionIndex = 0;
***************
*** 103,106 ****
--- 108,112 ----
else if(key == 27)
{
+ UserInterface::playBoop();
selectionIndex = 0;
onEscape();
Index: sfx.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/sfx.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sfx.cpp 21 Apr 2004 01:59:26 -0000 1.8
--- sfx.cpp 22 Apr 2004 07:46:20 -0000 1.9
***************
*** 39,53 ****
static SFXProfile gSFXProfiles[] = {
! { "phaser.wav", false, 0.45f, false, 150, 600 },
! { "phaser_impact.wav", false, 0.7f, false, 150, 600 },
! { "ship_explode.wav", false, 1.0, false, 300, 1000 },
! { "flag_capture.wav", true, 0.45f, false, 0, 0 },
! { "flag_drop.wav", true, 0.45f, false, 0, 0 },
! { "flag_return.wav", true, 0.45f, false, 0, 0 },
! { "flag_snatch.wav", true, 0.45f, false, 0, 0 },
! { "teleport_in.wav", false, 1.0, false, 200, 500 },
! { "teleport_out.wav", false, 1.0, false, 200, 500 },
! { "bounce_wall.wav", false, 0.7f, false, 150, 600 },
! { "bounce_obj.wav", false, 0.7f, false, 150, 600 },
{ NULL, false, 0, false, 0, 0 },
};
--- 39,54 ----
static SFXProfile gSFXProfiles[] = {
! { "phaser.wav", false, 0.45f, false, 150, 600 },
! { "phaser_impact.wav", false, 0.7f, false, 150, 600 },
! { "ship_explode.wav", false, 1.0, false, 300, 1000 },
! { "flag_capture.wav", true, 0.45f, false, 0, 0 },
! { "flag_drop.wav", true, 0.45f, false, 0, 0 },
! { "flag_return.wav", true, 0.45f, false, 0, 0 },
! { "flag_snatch.wav", true, 0.45f, false, 0, 0 },
! { "teleport_in.wav", false, 1.0, false, 200, 500 },
! { "teleport_out.wav", false, 1.0, false, 200, 500 },
! { "bounce_wall.wav", false, 0.7f, false, 150, 600 },
! { "bounce_obj.wav", false, 0.7f, false, 150, 600 },
! { "boop.wav", true, 0.4f, false, 150, 600 },
{ NULL, false, 0, false, 0, 0 },
};
Index: UI.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/UI.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** UI.h 20 Apr 2004 04:27:19 -0000 1.1
--- UI.h 22 Apr 2004 07:46:20 -0000 1.2
***************
*** 61,64 ****
--- 61,65 ----
static void drawStringf(S32 x, S32 y, S32 size, const char *fmt, ...);
static U32 getStringWidth(S32 size, const char *string, U32 len = 0);
+ static void playBoop();
};
Index: UI.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/UI.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** UI.cpp 20 Apr 2004 04:27:19 -0000 1.1
--- UI.cpp 22 Apr 2004 07:46:20 -0000 1.2
***************
*** 29,32 ****
--- 29,33 ----
#include "UI.h"
+ #include "sfx.h"
#include <stdarg.h>
***************
*** 95,98 ****
--- 96,103 ----
}
+ void UserInterface::playBoop()
+ {
+ SFXObject::play(SFXUIBoop, 1);
+ }
void UserInterface::render()
Index: quickChat.cpp
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/quickChat.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** quickChat.cpp 22 Apr 2004 07:27:43 -0000 1.1
--- quickChat.cpp 22 Apr 2004 07:46:20 -0000 1.2
***************
*** 135,139 ****
{2, 'Y', false, "Yoohoo!", "Yoohoo!"},
{2, 'H', false, "How'd THAT feel?", "How'd THAT feel?"},
! {2, 'I', false, "I've had worse..." "I've had worse..."},
{2, 'M', false, "Missed me!", "Missed me!"},
{2, 'D', false, "Dance!", "Dance!"},
--- 135,139 ----
{2, 'Y', false, "Yoohoo!", "Yoohoo!"},
{2, 'H', false, "How'd THAT feel?", "How'd THAT feel?"},
! {2, 'I', false, "I've had worse...", "I've had worse..."},
{2, 'M', false, "Missed me!", "Missed me!"},
{2, 'D', false, "Dance!", "Dance!"},
***************
*** 199,202 ****
--- 199,203 ----
if(key == 27)
{
+ UserInterface::playBoop();
mVisible = false;
return;
***************
*** 223,226 ****
--- 224,229 ----
mCurNode = walk;
+ UserInterface::playBoop();
+
// If we're at a leaf (ie, next child down is higher or equal to us), then issue the chat and call it good...
walk++;
Index: sfx.h
===================================================================
RCS file: /cvsroot/opentnl/tnl/zap/sfx.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sfx.h 20 Apr 2004 19:25:49 -0000 1.4
--- sfx.h 22 Apr 2004 07:46:20 -0000 1.5
***************
*** 49,52 ****
--- 49,53 ----
SFXBounceWall,
SFXBounceObject,
+ SFXUIBoop,
NumSFXBuffers
};
|