[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.19,1.20 globals.cx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.19,1.20 globals.cxx,1.2,1.3 globals.hxx,1.8,1.9 pingus_main.cxx,1.22,1.23 |
Date: |
8 Oct 2002 18:06:27 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv19665
Modified Files:
game_session.cxx globals.cxx globals.hxx pingus_main.cxx
Log Message:
made frameskip configurable
Index: game_session.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- game_session.cxx 8 Oct 2002 17:53:47 -0000 1.19
+++ game_session.cxx 8 Oct 2002 18:06:25 -0000 1.20
@@ -83,6 +83,12 @@
void
PingusGameSession::update (const GameDelta& delta)
{
+ if (number_of_updates == 0)
+ {
+ last_redraw = CL_System::get_time();
+ last_update = CL_System::get_time();
+ }
+
if (server->is_finished())
{
ScreenManager::instance()->pop_screen();
@@ -92,8 +98,6 @@
int time_passed = (CL_System::get_time() - last_update) + left_over_time;
int update_time = game_speed;
- int min_frame_skip = 1;
- int max_frame_skip = 1;
left_over_time = 0;
Index: globals.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/globals.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- globals.cxx 16 Aug 2002 17:15:31 -0000 1.2
+++ globals.cxx 8 Oct 2002 18:06:25 -0000 1.3
@@ -49,10 +49,12 @@
bool background_manipulation_enabled = true;
bool use_datafile = false;
bool max_cpu_usage = false;
-float frame_skip = 1.0f;
bool use_opengl = false;
bool action_help = true;
bool show_input_debug_screen = false;
+
+int min_frame_skip = 1;
+int max_frame_skip = 5;
std::string global_username;
std::string global_email;
Index: globals.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/globals.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- globals.hxx 23 Aug 2002 15:49:48 -0000 1.8
+++ globals.hxx 8 Oct 2002 18:06:25 -0000 1.9
@@ -59,7 +59,6 @@
extern bool debug_game_time; ///< --debug-game-time
extern bool max_cpu_usage; ///< --max-cpu-usage
extern bool use_datafile; ///< --use-datafile
-extern float frame_skip; ///< --frame-skip
extern bool use_opengl; ///< --use-opengl
extern bool action_help; ///< --action-help
extern bool show_input_debug_screen; ///
@@ -69,6 +68,8 @@
extern std::string default_language; ///< The default language,
which is used when the env var LANG is not set
extern int pingus_debug_flags; ///< Set some bits in this
thing to get debug infos
+extern int min_frame_skip;
+extern int max_frame_skip;
enum { PINGUS_DEBUG_ACTIONS = (1 << 0),
PINGUS_DEBUG_SOUND = (1 << 1),
Index: pingus_main.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- pingus_main.cxx 4 Oct 2002 11:38:28 -0000 1.22
+++ pingus_main.cxx 8 Oct 2002 18:06:25 -0000 1.23
@@ -212,7 +212,8 @@
{"use-datafile", no_argument, 0, 150},
{"use-scriptfile", no_argument, 0, 151},
{"max-cpu-usage", no_argument, 0, 153},
- {"frame-skip", required_argument, 0, 154},
+ {"min-frame-skip", required_argument, 0, 154},
+ {"max-frame-skip", required_argument, 0, 155},
#ifdef HAVE_LIBCLANGL
{"use-opengl", no_argument, 0, 'G'},
#endif
@@ -500,7 +501,11 @@
break;
case 154:
- sscanf(optarg, "%f", &frame_skip);
+ sscanf(optarg, "%d", &min_frame_skip);
+ break;
+
+ case 155: // max_frame_skip
+ sscanf(optarg, "%d", &max_frame_skip);
break;
case 156:
@@ -550,7 +555,8 @@
" --config-file FILE Read config from FILE (default:
~/.pingus/config)\n"
" --max-cpu-usage Use all of the cpu power available,
instead of trying to\n"
" reduce CPU usage, might speed up the game
on slower machines\n"
- " --frame-skip N Show only every N's frame, larger values
speed the game up\n"
+ " --min-frame-skip N Skip at least N frames, larger values
speed the game up\n"
+ " --max-frame-skip N Skip at most N frames\n"
"\nDebugging and experimental stuff:\n"
" --maintainer-mode Enables some features, only interesting
programmers\n"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.19,1.20 globals.cxx,1.2,1.3 globals.hxx,1.8,1.9 pingus_main.cxx,1.22,1.23,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.18,1.19
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.20,1.21 time_display.cxx,1.8,1.9
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.18,1.19
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.20,1.21 time_display.cxx,1.8,1.9
- Index(es):