[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.80,1.81 script_v8.cpp,2.143,2.144 scumm.h,1.159,1.160 scummvm.cpp,2.61,2.62
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Mar 17 04:34:36 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_font.cpp,NONE,1.1 smush_font.h,NONE,1.1 smush_mixer.cpp,NONE,1.1 smush_mixer.h,NONE,1.1 smush_player.cpp,NONE,1.1 smush_player.h,NONE,1.1 channel.h,1.9,1.10 chunk.cpp,1.10,1.11 chunk.h,1.7,1.8 codec1.cpp,1.8,1.9 codec37.cpp,1.17,1.18 codec37.h,1.10,1.11 codec47.cpp,1.44,1.45 codec47.h,1.13,1.14 imuse_channel.cpp,1.13,1.14 saud_channel.cpp,1.10,1.11 brenderer.cpp,1.6,NONE brenderer.h,1.10,NONE codec1.h,1.6,NONE codec44.cpp,1.9,NONE codec44.h,1.8,NONE color.cpp,1.4,NONE color.h,1.6,NONE config.h,1.6,NONE decoder.h,1.8,NONE frenderer.cpp,1.18,NONE frenderer.h,1.13,NONE mixer.h,1.5,NONE palette.h,1.6,NONE player.cpp,1.43,NONE player.h,1.15,NONE renderer.h,1.8,NONE scumm_renderer.cpp,1.30,NONE scumm_renderer.h,1.14,NONE
- Next message: [Scummvm-cvs-logs] CVS: scummvm Makefile.common,1.46,1.47 scumm.dsp,1.34,1.35 scummvm.dsp,1.35,1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv8824
Modified Files:
script_v6.cpp script_v8.cpp scumm.h scummvm.cpp
Log Message:
split waitForTimer func, update for smush,
btw, switching scalers while playing smush movies doesn't work or at least SDL backend,
it hang on SDL_SetVideo func
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- script_v6.cpp 9 Mar 2003 15:35:19 -0000 1.80
+++ script_v6.cpp 17 Mar 2003 12:32:45 -0000 1.81
@@ -30,8 +30,7 @@
#include "sound.h"
#include "verbs.h"
#include <time.h>
-#include "smush/player.h"
-#include "smush/scumm_renderer.h"
+#include "smush/smush_player.h"
#include "sound/mididrv.h"
@@ -2337,11 +2336,8 @@
debug(1, "INSANE Arg: %d", args[1]);
- ScummRenderer *sr = new ScummRenderer(this, speed);
- SmushPlayer *sp = new SmushPlayer(sr);
-
- if (_noSubtitles)
- sp->hide("subtitles");
+ SmushPlayer *sp = new SmushPlayer(this, speed, !_noSubtitles);
+
// INSANE mode 0: SMUSH movie playback
if (args[1] == 0) {
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
@@ -2378,7 +2374,7 @@
putState(235, 1); // Cheat and activate Ramp
writeVar(142 | 0x8000, 1); // Cheat and activate auto-booster (fan)
}
-// sp->play("minefite.san", getGameDataPath());
+// smush->play("minefite.san", getGameDataPath());
break;
}
case 4:
@@ -2403,7 +2399,6 @@
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
}
delete sp;
- delete sr;
}
break;
case 7:
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.143
retrieving revision 2.144
diff -u -d -r2.143 -r2.144
--- script_v8.cpp 15 Mar 2003 21:28:22 -0000 2.143
+++ script_v8.cpp 17 Mar 2003 12:32:45 -0000 2.144
@@ -27,8 +27,7 @@
#include "sound.h"
#include "verbs.h"
-#include "smush/player.h"
-#include "smush/scumm_renderer.h"
+#include "smush/smush_player.h"
#include <time.h>
@@ -1334,16 +1333,9 @@
warning("o8_startVideo(%s/%s)", getGameDataPath(), (char*)_scriptPointer);
- ScummRenderer * sr = new ScummRenderer(this, 83333);
- SmushPlayer * sp = new SmushPlayer(sr);
-
- if (_noSubtitles)
- sp->hide("subtitles");
-
+ SmushPlayer *sp = new SmushPlayer(this, 83333, !_noSubtitles);
sp->play((char*)_scriptPointer, getGameDataPath());
-
delete sp;
- delete sr;
_scriptPointer += len + 1;
}
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- scumm.h 13 Mar 2003 02:23:55 -0000 1.159
+++ scumm.h 17 Mar 2003 12:32:46 -0000 1.160
@@ -257,7 +257,7 @@
class Scumm : public Engine {
friend class ScummDebugger;
- friend class ScummRenderer; // FIXME - this is mostly for the destructor
+ friend class SmushPlayer;
void errorString(const char *buf_input, char *buf_output);
public:
/* Put often used variables at the top.
@@ -321,6 +321,7 @@
int scummLoop(int delta);
// Event handling
+ void parseEvents();
void waitForTimer(int msec_delay);
void processKbd();
int checkKeyHit();
@@ -341,6 +342,7 @@
int _smushFrameRate;
bool _insaneState;
bool _videoFinished;
+ bool _smushPlay;
void pauseGame(bool user);
void shutDown(int i);
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.61
retrieving revision 2.62
diff -u -d -r2.61 -r2.62
--- scummvm.cpp 9 Mar 2003 02:41:35 -0000 2.61
+++ scummvm.cpp 17 Mar 2003 12:32:46 -0000 2.62
@@ -1147,12 +1147,18 @@
bool old_soundsPaused = _sound->_soundsPaused;
_sound->pauseSounds(true);
+ // Pause playing smush movie
+ _smushPlay = false;
+
// Open & run the dialog
int result = dialog->runModal();
// Restore old cursor
updateCursor();
+ // Restore playing smush movie
+ _smushPlay = true;
+
// Resume sound output
_sound->pauseSounds(old_soundsPaused);
@@ -1496,89 +1502,95 @@
}
void Scumm::waitForTimer(int msec_delay) {
- OSystem::Event event;
uint32 start_time;
- if (_fastMode&2)
+ if (_fastMode & 2)
msec_delay = 0;
- else if (_fastMode&1)
+ else if (_fastMode & 1)
msec_delay = 10;
start_time = _system->get_msecs();
- for(;;) {
- while (_system->poll_event(&event)) {
+ for (;;) {
+ parseEvents();
- switch(event.event_code) {
- case OSystem::EVENT_KEYDOWN:
- if (event.kbd.keycode >= '0' && event.kbd.keycode<='9'
- && (event.kbd.flags == OSystem::KBD_ALT ||
- event.kbd.flags == OSystem::KBD_CTRL)) {
- _saveLoadSlot = event.kbd.keycode - '0';
+ _sound->updateCD(); // Loop CD Audio if needed
+ if (_system->get_msecs() >= start_time + msec_delay)
+ break;
+ _system->delay_msecs(10);
+ }
+}
- // don't overwrite autosave (slot 0)
- if (_saveLoadSlot == 0)
- _saveLoadSlot = 10;
+void Scumm::parseEvents() {
+ OSystem::Event event;
- sprintf(_saveLoadName, "Quicksave %d", _saveLoadSlot);
- _saveLoadFlag = (event.kbd.flags == OSystem::KBD_ALT) ? 1 : 2;
- _saveLoadCompatible = false;
- } else if (event.kbd.flags==OSystem::KBD_CTRL) {
- if (event.kbd.keycode=='f')
- _fastMode ^= 1;
- else if (event.kbd.keycode=='g')
- _fastMode ^= 2;
- else if ((event.kbd.keycode=='d') && (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)))
- g_debugger.attach(this);
- else if (event.kbd.keycode=='s')
- resourceStats();
- else
- _keyPressed = event.kbd.ascii; // Normal key press, pass on to the game.
- } else if (event.kbd.flags & OSystem::KBD_ALT) {
- // The result must be 273 for Alt-W
- // because that's what MI2 looks for in
- // its "instant win" cheat.
- _keyPressed = event.kbd.keycode + 154;
- } else
+ while (_system->poll_event(&event)) {
+
+ switch(event.event_code) {
+ case OSystem::EVENT_KEYDOWN:
+ if (event.kbd.keycode >= '0' && event.kbd.keycode<='9'
+ && (event.kbd.flags == OSystem::KBD_ALT ||
+ event.kbd.flags == OSystem::KBD_CTRL)) {
+ _saveLoadSlot = event.kbd.keycode - '0';
+
+ // don't overwrite autosave (slot 0)
+ if (_saveLoadSlot == 0)
+ _saveLoadSlot = 10;
+
+ sprintf(_saveLoadName, "Quicksave %d", _saveLoadSlot);
+ _saveLoadFlag = (event.kbd.flags == OSystem::KBD_ALT) ? 1 : 2;
+ _saveLoadCompatible = false;
+ } else if (event.kbd.flags==OSystem::KBD_CTRL) {
+ if (event.kbd.keycode == 'f')
+ _fastMode ^= 1;
+ else if (event.kbd.keycode == 'g')
+ _fastMode ^= 2;
+ else if ((event.kbd.keycode == 'd') && (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)))
+ g_debugger.attach(this);
+ else if (event.kbd.keycode == 's')
+ resourceStats();
+ else
_keyPressed = event.kbd.ascii; // Normal key press, pass on to the game.
- break;
+ } else if (event.kbd.flags & OSystem::KBD_ALT) {
+ // The result must be 273 for Alt-W
+ // because that's what MI2 looks for in
+ // its "instant win" cheat.
+ _keyPressed = event.kbd.keycode + 154;
+ } else
+ _keyPressed = event.kbd.ascii; // Normal key press, pass on to the game.
+ break;
- case OSystem::EVENT_MOUSEMOVE:
- mouse.x = event.mouse.x;
- mouse.y = event.mouse.y;
- _system->set_mouse_pos(event.mouse.x, event.mouse.y);
- _system->update_screen();
- break;
+ case OSystem::EVENT_MOUSEMOVE:
+ mouse.x = event.mouse.x;
+ mouse.y = event.mouse.y;
+ _system->set_mouse_pos(event.mouse.x, event.mouse.y);
+ _system->update_screen();
+ break;
- case OSystem::EVENT_LBUTTONDOWN:
- _leftBtnPressed |= msClicked|msDown;
+ case OSystem::EVENT_LBUTTONDOWN:
+ _leftBtnPressed |= msClicked|msDown;
#ifdef _WIN32_WCE
- mouse.x = event.mouse.x;
- mouse.y = event.mouse.y;
+ mouse.x = event.mouse.x;
+ mouse.y = event.mouse.y;
#endif
- break;
+ break;
- case OSystem::EVENT_RBUTTONDOWN:
- _rightBtnPressed |= msClicked|msDown;
+ case OSystem::EVENT_RBUTTONDOWN:
+ _rightBtnPressed |= msClicked|msDown;
#ifdef _WIN32_WCE
- mouse.x = event.mouse.x;
- mouse.y = event.mouse.y;
+ mouse.x = event.mouse.x;
+ mouse.y = event.mouse.y;
#endif
- break;
+ break;
- case OSystem::EVENT_LBUTTONUP:
- _leftBtnPressed &= ~msDown;
- break;
+ case OSystem::EVENT_LBUTTONUP:
+ _leftBtnPressed &= ~msDown;
+ break;
- case OSystem::EVENT_RBUTTONUP:
- _rightBtnPressed &= ~msDown;
- break;
- }
- }
- _sound->updateCD(); // Loop CD Audio if needed
- if (_system->get_msecs() >= start_time + msec_delay)
+ case OSystem::EVENT_RBUTTONUP:
+ _rightBtnPressed &= ~msDown;
break;
- _system->delay_msecs(10);
+ }
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_font.cpp,NONE,1.1 smush_font.h,NONE,1.1 smush_mixer.cpp,NONE,1.1 smush_mixer.h,NONE,1.1 smush_player.cpp,NONE,1.1 smush_player.h,NONE,1.1 channel.h,1.9,1.10 chunk.cpp,1.10,1.11 chunk.h,1.7,1.8 codec1.cpp,1.8,1.9 codec37.cpp,1.17,1.18 codec37.h,1.10,1.11 codec47.cpp,1.44,1.45 codec47.h,1.13,1.14 imuse_channel.cpp,1.13,1.14 saud_channel.cpp,1.10,1.11 brenderer.cpp,1.6,NONE brenderer.h,1.10,NONE codec1.h,1.6,NONE codec44.cpp,1.9,NONE codec44.h,1.8,NONE color.cpp,1.4,NONE color.h,1.6,NONE config.h,1.6,NONE decoder.h,1.8,NONE frenderer.cpp,1.18,NONE frenderer.h,1.13,NONE mixer.h,1.5,NONE palette.h,1.6,NONE player.cpp,1.43,NONE player.h,1.15,NONE renderer.h,1.8,NONE scumm_renderer.cpp,1.30,NONE scumm_renderer.h,1.14,NONE
- Next message: [Scummvm-cvs-logs] CVS: scummvm Makefile.common,1.46,1.47 scumm.dsp,1.34,1.35 scummvm.dsp,1.35,1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list