[Scummvm-cvs-logs] CVS: scummvm/sword2 build_display.cpp,1.66,1.67 controls.cpp,1.77,1.78 debug.cpp,1.45,1.46 function.cpp,1.71,1.72 maketext.cpp,1.44,1.45 save_rest.cpp,1.61,1.62 sword2.cpp,1.130,1.131 sword2.h,1.72,1.73
Max Horn
fingolfin at users.sourceforge.net
Mon Jan 10 14:08:15 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.32,1.33 control.cpp,1.46,1.47 credits.cpp,1.8,1.9 music.cpp,1.36,1.37 music.h,1.15,1.16 sword1.cpp,1.80,1.81
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.38,1.39 animation.cpp,1.48,1.49 d_draw.cpp,1.63,1.64 d_sound.cpp,1.134,1.135 d_sound.h,1.58,1.59 menu.cpp,1.30,1.31 palette.cpp,1.35,1.36 rdwin.cpp,1.49,1.50 render.cpp,1.68,1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4479/sword2
Modified Files:
build_display.cpp controls.cpp debug.cpp function.cpp
maketext.cpp save_rest.cpp sword2.cpp sword2.h
Log Message:
system.h was being included in tons of places, without any good reason; reduced this (total dependencies on system.h went down from 193 to 85 files)
Index: build_display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/build_display.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- build_display.cpp 1 Jan 2005 15:07:01 -0000 1.66
+++ build_display.cpp 10 Jan 2005 22:06:22 -0000 1.67
@@ -22,6 +22,7 @@
// ---------------------------------------------------------------------------
#include "common/stdafx.h"
+#include "common/system.h"
#include "sword2/sword2.h"
#include "sword2/console.h"
#include "sword2/defs.h"
@@ -103,10 +104,10 @@
_graphics->updateDisplay();
_frameCount++;
- if (_system->getMillis() > _cycleTime) {
+ if (getMillis() > _cycleTime) {
_fps = _frameCount;
_frameCount = 0;
- _cycleTime = _system->getMillis() + 1000;
+ _cycleTime = getMillis() + 1000;
}
} while (!_graphics->endRenderCycle());
@@ -174,7 +175,7 @@
_graphics->waitForFade();
if (time > 0) {
- uint32 targetTime = _system->getMillis() + (time * 1000);
+ uint32 targetTime = getMillis() + (time * 1000);
sleepUntil(targetTime);
} else {
while (!_quit) {
Index: controls.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/controls.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- controls.cpp 1 Jan 2005 15:07:01 -0000 1.77
+++ controls.cpp 10 Jan 2005 22:06:23 -0000 1.78
@@ -20,6 +20,7 @@
#include "common/stdafx.h"
#include "common/rect.h"
#include "common/config-manager.h"
+#include "common/system.h"
#include "sword2/sword2.h"
#include "sword2/controls.h"
#include "sword2/defs.h"
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/debug.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- debug.cpp 1 Jan 2005 15:07:02 -0000 1.45
+++ debug.cpp 10 Jan 2005 22:06:25 -0000 1.46
@@ -116,7 +116,7 @@
// debug info at top of screen - enabled/disabled as one complete unit
if (_displayTime) {
- int32 time = _vm->_system->getMillis();
+ int32 time = _vm->getMillis();
if ((time - _startTime) / 1000 >= 10000)
_startTime = time;
Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/function.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- function.cpp 1 Jan 2005 15:07:02 -0000 1.71
+++ function.cpp 10 Jan 2005 22:06:25 -0000 1.72
@@ -19,6 +19,7 @@
#include "common/stdafx.h"
#include "common/file.h"
+#include "common/system.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/interpreter.h"
@@ -588,7 +589,7 @@
bool abortCredits = false;
int scrollSteps = lineTop + CREDITS_FONT_HEIGHT;
- uint32 musicStart = _vm->_system->getMillis();
+ uint32 musicStart = _vm->getMillis();
// Ideally the music should last just a tiny bit longer than the
// credits. Note that musicTimeRemaining() will return 0 if the music
Index: maketext.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/maketext.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- maketext.cpp 6 Jan 2005 12:30:24 -0000 1.44
+++ maketext.cpp 10 Jan 2005 22:06:25 -0000 1.45
@@ -36,6 +36,7 @@
// as a resource) on 5dec96.
#include "common/stdafx.h"
+#include "common/system.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/logic.h"
Index: save_rest.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/save_rest.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- save_rest.cpp 1 Jan 2005 15:07:03 -0000 1.61
+++ save_rest.cpp 10 Jan 2005 22:06:25 -0000 1.62
@@ -27,6 +27,7 @@
// ---------------------------------------------------------------------------
#include "common/stdafx.h"
+#include "common/savefile.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
#include "sword2/interpreter.h"
Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sword2.cpp,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- sword2.cpp 1 Jan 2005 15:07:03 -0000 1.130
+++ sword2.cpp 10 Jan 2005 22:06:32 -0000 1.131
@@ -18,11 +18,15 @@
*/
#include "common/stdafx.h"
+
#include "backends/fs/fs.h"
+
#include "base/gameDetector.h"
#include "base/plugins.h"
+
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/system.h"
#include "sword2/sword2.h"
#include "sword2/console.h"
@@ -545,7 +549,7 @@
// FIXME: Move this to some better place?
void Sword2Engine::sleepUntil(uint32 time) {
- while (_system->getMillis() < time) {
+ while (getMillis() < time) {
// Make sure menu animations and fades don't suffer, but don't
// redraw the entire scene.
_graphics->processMenu();
@@ -612,4 +616,8 @@
setMouse(NORMAL_MOUSE_ID);
}
+uint32 Sword2Engine::getMillis() {
+ return _system->getMillis();
+}
+
} // End of namespace Sword2
Index: sword2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sword2.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- sword2.h 1 Jan 2005 15:07:03 -0000 1.72
+++ sword2.h 10 Jan 2005 22:06:32 -0000 1.73
@@ -29,7 +29,7 @@
#include "base/engine.h"
-#include "common/system.h"
+#include "common/util.h"
#include "sword2/driver/driver96.h"
#include "sword2/build_display.h"
@@ -41,6 +41,7 @@
#include "sword2/save_rest.h"
class GameDetector;
+class OSystem;
namespace Sword2 {
@@ -407,6 +408,11 @@
void errorString(const char *buf_input, char *buf_output);
void initialiseFontResourceFlags();
void initialiseFontResourceFlags(uint8 language);
+
+
+ // Convenience alias for OSystem::getMillis().
+ // This is a bit hackish, of course :-).
+ uint32 getMillis();
};
} // End of namespace Sword2
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.32,1.33 control.cpp,1.46,1.47 credits.cpp,1.8,1.9 music.cpp,1.36,1.37 music.h,1.15,1.16 sword1.cpp,1.80,1.81
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.38,1.39 animation.cpp,1.48,1.49 d_draw.cpp,1.63,1.64 d_sound.cpp,1.134,1.135 d_sound.h,1.58,1.59 menu.cpp,1.30,1.31 palette.cpp,1.35,1.36 rdwin.cpp,1.49,1.50 render.cpp,1.68,1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list