Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20884/src
Modified Files:
gameloop.cpp timer.cpp timer.h
Log Message:
minor updates
Index: timer.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/timer.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- timer.h 26 Apr 2004 19:11:54 -0000 1.14
+++ timer.h 10 May 2004 20:00:22 -0000 1.15
@@ -27,6 +27,7 @@
void st_pause_ticks_init(void);
void st_pause_ticks_start(void);
void st_pause_ticks_stop(void);
+bool st_pause_ticks_started(void);
class Timer
{
Index: gameloop.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- gameloop.cpp 10 May 2004 19:06:01 -0000 1.122
+++ gameloop.cpp 10 May 2004 20:00:20 -0000 1.123
@@ -188,6 +188,7 @@
else if (!Menu::current())
{
Menu::set_current(game_menu);
+ st_pause_ticks_start();
}
}
@@ -217,7 +218,8 @@
if (Menu::current())
{
Menu::current()->event(event);
- st_pause_ticks_start();
+ if(!Menu::current())
+ st_pause_ticks_stop();
}
switch(event.type)
@@ -259,7 +261,8 @@
if (Menu::current())
{
Menu::current()->event(event);
- st_pause_ticks_start();
+ if(!Menu::current())
+ st_pause_ticks_stop();
}
else
{
Index: timer.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/timer.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- timer.cpp 26 Apr 2004 19:11:54 -0000 1.12
+++ timer.cpp 10 May 2004 20:00:22 -0000 1.13
@@ -53,6 +53,14 @@
st_pause_count = 0;
}
+bool st_pause_ticks_started(void)
+{
+if(st_pause_count == 0)
+return false;
+else
+return true;
+}
+
Timer::Timer()
{
init(true);
|