[Scummvm-cvs-logs] CVS: scummvm/scumm/smush insane.cpp,1.31,1.32 insane.h,1.17,1.18 smush_player.cpp,1.95,1.96 smush_player.h,1.21,1.22
Max Horn
fingolfin at users.sourceforge.net
Thu Jan 8 12:38:03 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.15,1.16 dimuse.h,1.11,1.12 dimuse_sndmgr.cpp,1.12,1.13 dimuse_sndmgr.h,1.9,1.10
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.100,1.101 dialogs.h,1.36,1.37 player_v1.cpp,1.19,1.20 player_v2.cpp,2.45,2.46 player_v2.h,2.26,2.27 player_v2a.cpp,2.19,2.20 player_v2a.h,2.8,2.9 player_v3a.cpp,1.18,1.19 player_v3a.h,1.17,1.18 script.cpp,1.142,1.143 scumm.h,1.352,1.353 scummvm.cpp,2.537,2.538 sound.cpp,1.310,1.311 sound.h,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv30933/smush
Modified Files:
insane.cpp insane.h smush_player.cpp smush_player.h
Log Message:
unify _vm / _scumm usage
Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- insane.cpp 6 Jan 2004 17:28:29 -0000 1.31
+++ insane.cpp 8 Jan 2004 20:37:26 -0000 1.32
@@ -59,10 +59,10 @@
Insane::Insane(ScummEngine *scumm) {
- _scumm = scumm;
+ _vm = scumm;
// Demo has different insane, so disable it now
- if (_scumm->_features & GF_DEMO)
+ if (_vm->_features & GF_DEMO)
return;
initvars();
@@ -77,14 +77,14 @@
readFileToMem("minedriv.flu", &_smush_minedrivFlu);
readFileToMem("minefite.flu", &_smush_minefiteFlu);
- _smush_iconsNut = new NutRenderer(_scumm);
- _smush_iconsNut->loadFont("icons.nut", _scumm->getGameDataPath());
- _smush_icons2Nut = new NutRenderer(_scumm);
- _smush_icons2Nut->loadFont("icons2.nut", _scumm->getGameDataPath());
- _smush_bensgoggNut = new NutRenderer(_scumm);
- _smush_bensgoggNut->loadFont("bensgogg.nut", _scumm->getGameDataPath());
- _smush_bencutNut = new NutRenderer(_scumm);
- _smush_bencutNut->loadFont("bencut.nut", _scumm->getGameDataPath());
+ _smush_iconsNut = new NutRenderer(_vm);
+ _smush_iconsNut->loadFont("icons.nut", _vm->getGameDataPath());
+ _smush_icons2Nut = new NutRenderer(_vm);
+ _smush_icons2Nut->loadFont("icons2.nut", _vm->getGameDataPath());
+ _smush_bensgoggNut = new NutRenderer(_vm);
+ _smush_bensgoggNut->loadFont("bensgogg.nut", _vm->getGameDataPath());
+ _smush_bencutNut = new NutRenderer(_vm);
+ _smush_bencutNut->loadFont("bencut.nut", _vm->getGameDataPath());
// FIXME: implement
// openManyResource(0, 4, "specfnt.nut", "titlfnt.nut", "techfnt.nut", "scummfnt.nut");
@@ -733,7 +733,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -878,7 +878,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1027,7 +1027,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1185,7 +1185,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1355,7 +1355,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1499,7 +1499,7 @@
_enHdlVar[EN_VULTF2][0]++;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1626,7 +1626,7 @@
_actor[actor1].cursorX = -160;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[0].act[2].state = 97;
@@ -1714,7 +1714,7 @@
_enHdlVar[EN_CAVEFISH][0] = act1damage;
// Shift+V cheat to win the battle
- if (_scumm->getKeyState(0x56) && !_beenCheated &&
+ if (_vm->getKeyState(0x56) && !_beenCheated &&
!_actor[0].lost && !_actor[1].lost) {
_beenCheated = 1;
_actor[1].damage = _actor[1].maxdamage + 10;
@@ -1771,11 +1771,11 @@
int32 Insane::processMouse(void) {
int32 buttons = 0;
- _enemyState[EN_BEN][0] = _scumm->_mouse.x;
- _enemyState[EN_BEN][1] = _scumm->_mouse.y;
+ _enemyState[EN_BEN][0] = _vm->_mouse.x;
+ _enemyState[EN_BEN][1] = _vm->_mouse.y;
- buttons = _scumm->VAR(_scumm->VAR_LEFTBTN_HOLD) ? 1 : 0;
- buttons |= _scumm->VAR(_scumm->VAR_RIGHTBTN_HOLD) ? 2 : 0;
+ buttons = _vm->VAR(_vm->VAR_LEFTBTN_HOLD) ? 1 : 0;
+ buttons |= _vm->VAR(_vm->VAR_RIGHTBTN_HOLD) ? 2 : 0;
return buttons;
}
@@ -1785,16 +1785,16 @@
int dx = 0, dy = 0;
int tmpx, tmpy;
- if (_scumm->getKeyState(0x14f) || _scumm->getKeyState(0x14b) || _scumm->getKeyState(0x147))
+ if (_vm->getKeyState(0x14f) || _vm->getKeyState(0x14b) || _vm->getKeyState(0x147))
dx--;
- if (_scumm->getKeyState(0x151) || _scumm->getKeyState(0x14d) || _scumm->getKeyState(0x149))
+ if (_vm->getKeyState(0x151) || _vm->getKeyState(0x14d) || _vm->getKeyState(0x149))
dx++;
- if (_scumm->getKeyState(0x147) || _scumm->getKeyState(0x148) || _scumm->getKeyState(0x149))
+ if (_vm->getKeyState(0x147) || _vm->getKeyState(0x148) || _vm->getKeyState(0x149))
dy--;
- if (_scumm->getKeyState(0x14f) || _scumm->getKeyState(0x150) || _scumm->getKeyState(0x151))
+ if (_vm->getKeyState(0x14f) || _vm->getKeyState(0x150) || _vm->getKeyState(0x151))
dy++;
if (dx == _keybOldDx)
@@ -1830,10 +1830,10 @@
_enemyState[EN_BEN][1] += tmpy;
}
- if (_scumm->getKeyState(0x0d))
+ if (_vm->getKeyState(0x0d))
retval |= 1;
- if (_scumm->getKeyState(0x09))
+ if (_vm->getKeyState(0x09))
retval |= 2;
return retval;
@@ -1844,7 +1844,7 @@
uint32 len;
in = new File();
- in->open(name, _scumm->getGameDataPath());
+ in->open(name, _vm->getGameDataPath());
len = in->size();
*buf = (byte *)malloc(len);
in->read(*buf, len);
@@ -1858,7 +1858,7 @@
// ptrMainLoop = &ptrMainLoopBody;
_insaneIsRunning = true;
- _player = new SmushPlayer(_scumm, _speed);
+ _player = new SmushPlayer(_vm, _speed);
_player->insanity(true);
_numberArray = arraynum;
@@ -1966,7 +1966,7 @@
smush_proc39();
putActors();
smush_proc40();
- _scumm->_sound->pauseSounds(0); // IMUSE_Resume();
+ _vm->_sound->pauseSounds(0); // IMUSE_Resume();
_enemy[EN_ROTT3].maxdamage = 120;
_insaneIsRunning = false;
@@ -1990,7 +1990,7 @@
setWordInString(_numberArray, 56, _enemy[EN_CAVEFISH].field_10);
setWordInString(_numberArray, 340, _enemy[EN_VULTM2].field_10);
// insane_unlock(); // FIXME
- _scumm->_sound->stopAllSounds(); // IMUSE_StopAllSounds();
+ _vm->_sound->stopAllSounds(); // IMUSE_StopAllSounds();
if (_memoryAllocatedNotOK) {
error("Memory Alloc Error in Mineroad (Heap Size?)");
}
@@ -2002,7 +2002,7 @@
int doMainLoop, byte *fluPtr, int32 numFrames) {
// Demo has different insane, so disable it now
- if (_scumm->_features & GF_DEMO)
+ if (_vm->_features & GF_DEMO)
return;
_smush_curFrame = 0;
@@ -2019,7 +2019,7 @@
smush_setupSanFromStart(filename, 0, -1, -1, 0);
}
- _player->play(filename, _scumm->getGameDataPath());
+ _player->play(filename, _vm->getGameDataPath());
}
int Insane::smlayer_mainLoop(void) {
@@ -2045,7 +2045,7 @@
}
void Insane::smush_warpMouse(int x, int y, int buttons) {
- _scumm->_system->warp_mouse(x, y);
+ _vm->_system->warp_mouse(x, y);
}
void Insane::putActors(void) {
@@ -2745,15 +2745,15 @@
if(!(resid = idx2Tweak()))
continue;
- _scumm->ensureResourceLoaded(rtSound, resid);
- _scumm->setResourceCounter(rtSound, resid, 1);
+ _vm->ensureResourceLoaded(rtSound, resid);
+ _vm->setResourceCounter(rtSound, resid, 1);
}
- _scumm->increaseResourceCounter();
+ _vm->increaseResourceCounter();
while (!idx1Compare()) {
resid = idx1Tweak();
- _scumm->ensureResourceLoaded(rtCostume, resid);
- _scumm->setResourceCounter(rtCostume, resid, 1);
+ _vm->ensureResourceLoaded(rtCostume, resid);
+ _vm->setResourceCounter(rtCostume, resid, 1);
// smlayer_lock (rtCostume, resid);
}
@@ -2809,12 +2809,12 @@
void Insane::smush_setToFinish(void) {
debug(0, "Video is set to finish");
- _scumm->_videoFinished = 1;
+ _vm->_videoFinished = 1;
}
// smlayer_stopSound
void Insane::smlayer_stopSound(int idx) {
- _scumm->_sound->stopSound(readArray(_numberArray, idx));
+ _vm->_sound->stopSound(readArray(_numberArray, idx));
}
void Insane::procPreRendering(void) {
@@ -3045,7 +3045,7 @@
smlayer_drawSomething(renderBitmap, codecparam, 89, 56, 1, _smush_bencutNut, 0, 0, 0);
if (!_keyboardDisable && !_val116w)
- _scumm->processActors();
+ _vm->processActors();
if (needMore)
postCaseMore(renderBitmap, codecparam, setupsan12, setupsan13, curFrame, maxFrame);
@@ -5665,7 +5665,7 @@
//if (!_ptrMainLoop) { } // We don't need it
// Demo has different insane, so disable it now
- if (!_insaneIsRunning || _scumm->_features & GF_DEMO) {
+ if (!_insaneIsRunning || _vm->_features & GF_DEMO) {
smush_setToFinish();
return;
}
@@ -5834,9 +5834,9 @@
return 0;
if (phase == 2)
- _scumm->ensureResourceLoaded(rtSound, resid);
+ _vm->ensureResourceLoaded(rtSound, resid);
- _scumm->setResourceCounter(rtSound, resid, 1);
+ _vm->setResourceCounter(rtSound, resid, 1);
if (phase == 1) {
_objArray2Idx2++;
@@ -5851,12 +5851,12 @@
void Insane::IMUSE_shutVolume(void) {
debug(0, "***************************************************");
- _scumm->_imuse->pause(true);
+ _vm->_imuse->pause(true);
}
void Insane::IMUSE_restoreVolume(void) {
debug(0, "***************************************************");
- _scumm->_imuse->pause(false);
+ _vm->_imuse->pause(false);
}
// smlayer_loadCostume1 && smlayer_loadCostume2
@@ -5867,8 +5867,8 @@
if (!resid)
return 0;
- _scumm->ensureResourceLoaded(rtCostume, resid);
- _scumm->setResourceCounter(rtCostume, resid, 1);
+ _vm->ensureResourceLoaded(rtCostume, resid);
+ _vm->setResourceCounter(rtCostume, resid, 1);
// smlayer_lock(rtCostume, resid); // FIXME
@@ -5883,7 +5883,7 @@
}
void Insane::smlayer_setActorCostume(int actornum, int actnum, int costume) {
- Actor *a = _scumm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorCostume");
+ Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorCostume");
a->setActorCostume(costume);
a->setDirection(180);
a->startAnimActor(1);
@@ -5891,12 +5891,12 @@
}
void Insane::smlayer_putActor(int actornum, int actnum, int x, int y, byte room) {
- Actor *a = _scumm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_putActor");
+ Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_putActor");
a->putActor(x, y, room);
}
void Insane::smlayer_setActorLayer(int actornum, int actnum, int layer) {
- Actor *a = _scumm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorLayer");
+ Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorLayer");
a->layer = layer;
}
@@ -5910,12 +5910,12 @@
}
bool Insane::smlayer_isSoundRunning(int32 sound) {
- return _scumm->_sound->isSoundRunning(readArray(_numberArray, sound)) != 0;
+ return _vm->_sound->isSoundRunning(readArray(_numberArray, sound)) != 0;
}
bool Insane::smlayer_startSound1(int32 sound) {
if (smlayer_loadSound(sound, 0, 2)) {
- _scumm->_imuseDigital->startSfx(readArray(_numberArray, sound));
+ _vm->_imuseDigital->startSfx(readArray(_numberArray, sound));
return true;
} else
return false;
@@ -5923,14 +5923,14 @@
bool Insane::smlayer_startSound2(int32 sound) {
if (smlayer_loadSound(sound, 0, 2)) {
- _scumm->_imuseDigital->startSfx(readArray(_numberArray, sound));
+ _vm->_imuseDigital->startSfx(readArray(_numberArray, sound));
return true;
} else
return false;
}
void Insane::smlayer_soundSetPan(int32 soundid, int32 pan) {
- _scumm->_imuseDigital->parseScriptCmds(12, soundid, 0x700, pan, 0, 0, 0, 0);
+ _vm->_imuseDigital->parseScriptCmds(12, soundid, 0x700, pan, 0, 0, 0, 0);
}
void Insane::smlayer_soundSetPriority(int32 sound, int32 priority) {
@@ -8061,7 +8061,7 @@
void Insane::smlayer_setActorFacing(int actornum, int actnum, int frame, int direction) {
if (_actor[actornum].act[actnum].room) {
- Actor *a = _scumm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorFacing");
+ Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorFacing");
a->setDirection(direction);
a->startAnimActor(frame);
_actor[actornum].act[actnum].frame = 0;
@@ -8100,11 +8100,11 @@
}
int32 Insane::getLastKey(bool arg_0) {
- return _scumm->_lastKeyHit;
+ return _vm->_lastKeyHit;
}
bool Insane::smlayer_actorNeedRedraw(int actornum, int actnum) {
- Actor *a = _scumm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_actorNeedRedraw");
+ Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_actorNeedRedraw");
return a->needRedraw;
}
@@ -8115,11 +8115,11 @@
}
int32 Insane::readArray (int number, int item) {
- return _scumm->readArray (number, 0, item);
+ return _vm->readArray (number, 0, item);
}
void Insane::setWordInString(int number, int item, int value) {
- _scumm->writeArray(number, 0, item, value);
+ _vm->writeArray(number, 0, item, value);
}
void Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
@@ -8179,9 +8179,9 @@
void Insane::smush_setupSanFile(const char *filename, int32 offset, int32 contFrame) {
debug(0, "smush_setupSanFile(%s, %x)", filename, offset);
- _player->seekSan(filename, _scumm->getGameDataPath(), offset, contFrame);
+ _player->seekSan(filename, _vm->getGameDataPath(), offset, contFrame);
- _scumm->_imuseDigital->pause(false);
+ _vm->_imuseDigital->pause(false);
}
}
Index: insane.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- insane.h 6 Jan 2004 12:45:31 -0000 1.17
+++ insane.h 8 Jan 2004 20:37:26 -0000 1.18
@@ -71,7 +71,7 @@
private:
- ScummEngine *_scumm;
+ ScummEngine *_vm;
SmushPlayer *_player;
int32 _speed;
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- smush_player.cpp 6 Jan 2004 17:28:29 -0000 1.95
+++ smush_player.cpp 8 Jan 2004 20:37:26 -0000 1.96
@@ -211,7 +211,7 @@
}
SmushPlayer::SmushPlayer(ScummEngine *scumm, int speed) {
- _scumm = scumm;
+ _vm = scumm;
_version = -1;
_nbframes = 0;
_smixer = 0;
@@ -245,20 +245,20 @@
_frame = 0;
- _scumm->_videoFinished = false;
- _scumm->_insaneState = true;
+ _vm->_videoFinished = false;
+ _vm->_insaneState = true;
- _smixer = new SmushMixer(_scumm->_mixer);
+ _smixer = new SmushMixer(_vm->_mixer);
- _scumm->setDirtyColors(0, 255);
- _dst = _scumm->virtscr[0].screenPtr + _scumm->virtscr[0].xstart;
+ _vm->setDirtyColors(0, 255);
+ _dst = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart;
g_timer->installTimerProc(&timerCallback, _speed, this);
_alreadyInit = false;
}
void SmushPlayer::deinit() {
- _scumm->_timer->removeTimerProc(&timerCallback);
+ _vm->_timer->removeTimerProc(&timerCallback);
for (int i = 0; i < 5; i++) {
if (_sf[i]) {
@@ -283,10 +283,10 @@
_base = NULL;
}
- _scumm->_mixer->stopHandle(_IACTchannel);
+ _vm->_mixer->stopHandle(_IACTchannel);
- _scumm->_insaneState = false;
- _scumm->_fullRedraw = true;
+ _vm->_insaneState = false;
+ _vm->_fullRedraw = true;
}
void SmushPlayer::checkBlock(const Chunk &b, Chunk::type type_expected, uint32 min_size) {
@@ -381,7 +381,7 @@
int32 size = b.getDword();
int32 bsize = b.getSize() - 18;
- if (_scumm->_gameId != GID_CMI) {
+ if (_vm->_gameId != GID_CMI) {
int32 track = track_id;
if (track_flags == 1) {
track = track_id + 100;
@@ -456,8 +456,8 @@
} while (--count);
if (!_IACTchannel.isActive())
- _scumm->_mixer->newStream(&_IACTchannel, 22050, SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 400000);
- _scumm->_mixer->appendStream(_IACTchannel, output_data, 0x1000);
+ _vm->_mixer->newStream(&_IACTchannel, 22050, SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 400000);
+ _vm->_mixer->appendStream(_IACTchannel, output_data, 0x1000);
bsize -= len;
d_src += len;
@@ -512,11 +512,11 @@
str++; // For Full Throttle text resources
}
- if (_scumm->_gameId == GID_CMI) {
- _scumm->translateText((const byte *)str - 1, _scumm->_transText);
+ if (_vm->_gameId == GID_CMI) {
+ _vm->translateText((const byte *)str - 1, _vm->_transText);
while (*str++ != '/')
;
- string2 = (char *)_scumm->_transText;
+ string2 = (char *)_vm->_transText;
// If string2 contains formatting information there probably
// wasn't any translation for it in the language.tab file. In
@@ -548,7 +548,7 @@
assert(sf != NULL);
sf->setColor(color);
- if (_scumm->_gameId == GID_CMI && string2[0] != 0) {
+ if (_vm->_gameId == GID_CMI && string2[0] != 0) {
str = string2;
}
@@ -673,7 +673,7 @@
int width = b.getWord();
int height = b.getWord();
- if ((height != _scumm->_screenHeight) || (width != _scumm->_screenWidth))
+ if ((height != _vm->_screenHeight) || (width != _vm->_screenWidth))
return;
if (!_alreadyInit) {
@@ -725,11 +725,11 @@
_skipNext = false;
uint32 start_time, end_time;
- start_time = _scumm->_system->get_msecs();
+ start_time = _vm->_system->get_msecs();
#ifdef INSANE
if (_insanity) {
- _scumm->_insane->procPreRendering();
+ _vm->_insane->procPreRendering();
}
#endif
@@ -756,7 +756,7 @@
#ifdef INSANE
// FIXME: check parameters
if (_insanity)
- _scumm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0);
+ _vm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0);
else
handleIACT(*sub);
#else
@@ -772,7 +772,7 @@
case TYPE_SKIP:
#ifdef INSANE
if (_insanity)
- _scumm->_insane->procSKIP(*sub);
+ _vm->_insane->procSKIP(*sub);
else
handleSkip(*sub);
#else
@@ -791,11 +791,11 @@
#ifdef INSANE
// FIXME: Check either parameters are valid
if (_insanity) {
- _scumm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1);
+ _vm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1);
}
#endif
- end_time = _scumm->_system->get_msecs();
+ end_time = _vm->_system->get_msecs();
updateScreen();
_smixer->handleFrame();
@@ -827,29 +827,29 @@
handleAnimHeader(*sub);
if (_insanity) {
- if(!(_scumm->_features & GF_DEMO))
+ if(!(_vm->_features & GF_DEMO))
readString("mineroad.trs", directory);
} else
readString(file, directory);
- if (_scumm->_gameId == GID_FT) {
- if (!(_scumm->_features & GF_DEMO)) {
+ if (_vm->_gameId == GID_FT) {
+ if (!(_vm->_features & GF_DEMO)) {
_sf[0] = new SmushFont(true, false);
_sf[2] = new SmushFont(true, false);
_sf[0]->loadFont("scummfnt.nut", directory);
_sf[2]->loadFont("titlfnt.nut", directory);
}
- } else if (_scumm->_gameId == GID_DIG) {
- if (!(_scumm->_features & GF_DEMO)) {
+ } else if (_vm->_gameId == GID_DIG) {
+ if (!(_vm->_features & GF_DEMO)) {
for (i = 0; i < 4; i++) {
sprintf(file_font, "font%d.nut", i);
_sf[i] = new SmushFont(i != 0, false);
_sf[i]->loadFont(file_font, directory);
}
}
- } else if (_scumm->_gameId == GID_CMI) {
+ } else if (_vm->_gameId == GID_CMI) {
for (i = 0; i < 5; i++) {
- if ((_scumm->_features & GF_DEMO) && (i == 4))
+ if ((_vm->_features & GF_DEMO) && (i == 4))
break;
sprintf(file_font, "font%d.nut", i);
_sf[i] = new SmushFont(false, true);
@@ -863,11 +863,11 @@
}
void SmushPlayer::parseNextFrame() {
- if (_scumm->_smushPaused)
+ if (_vm->_smushPaused)
return;
if (_base->eof()) {
- _scumm->_videoFinished = true;
+ _vm->_videoFinished = true;
return;
}
@@ -894,14 +894,14 @@
*p++ = 0;
}
- _scumm->_system->set_palette(palette_colors, 0, 256);
+ _vm->_system->set_palette(palette_colors, 0, 256);
}
void SmushPlayer::updateScreen() {
#ifdef DUMP_SMUSH_FRAMES
char fileName[100];
// change path below for dump png files
- sprintf(fileName, "/path/to/somethere/%s%04d.png", _scumm->getGameName(), _frame);
+ sprintf(fileName, "/path/to/somethere/%s%04d.png", _vm->getGameName(), _frame);
FILE *file = fopen(fileName, "wb");
if (file == NULL)
error("can't open file for writing png");
@@ -949,10 +949,10 @@
png_destroy_write_struct(&png_ptr, &info_ptr);
#endif
- uint32 end_time, start_time = _scumm->_system->get_msecs();
- _scumm->_system->copy_rect(_dst, _width, 0, 0, _width, _height);
+ uint32 end_time, start_time = _vm->_system->get_msecs();
+ _vm->_system->copy_rect(_dst, _width, 0, 0, _width, _height);
_updateNeeded = true;
- end_time = _scumm->_system->get_msecs();
+ end_time = _vm->_system->get_msecs();
debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time);
}
@@ -1000,40 +1000,40 @@
_updateNeeded = false;
// Hide mouse
- bool oldMouseState = _scumm->_system->show_mouse(false);
+ bool oldMouseState = _vm->_system->show_mouse(false);
// Load the video
setupAnim(filename, directory);
init();
while (true) {
- _scumm->parseEvents();
- _scumm->processKbd();
+ _vm->parseEvents();
+ _vm->processKbd();
if (_updateNeeded) {
uint32 end_time, start_time;
- start_time = _scumm->_system->get_msecs();
- _scumm->_system->update_screen();
+ start_time = _vm->_system->get_msecs();
+ _vm->_system->update_screen();
_updateNeeded = false;
if (_insanity)
- _scumm->_sound->processSoundQues();
+ _vm->_sound->processSoundQues();
- end_time = _scumm->_system->get_msecs();
+ end_time = _vm->_system->get_msecs();
debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time);
}
- if (_scumm->_videoFinished || _scumm->_quit || _scumm->_saveLoadFlag)
+ if (_vm->_videoFinished || _vm->_quit || _vm->_saveLoadFlag)
break;
- _scumm->_system->delay_msecs(10);
+ _vm->_system->delay_msecs(10);
};
deinit();
// Reset mouse state
- _scumm->_system->show_mouse(oldMouseState);
+ _vm->_system->show_mouse(oldMouseState);
}
} // End of namespace Scumm
Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- smush_player.h 6 Jan 2004 12:45:31 -0000 1.21
+++ smush_player.h 8 Jan 2004 20:37:26 -0000 1.22
@@ -37,7 +37,7 @@
class SmushPlayer {
friend class Insane;
private:
- ScummEngine *_scumm;
+ ScummEngine *_vm;
int _version;
int32 _nbframes;
SmushMixer *_smixer;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.15,1.16 dimuse.h,1.11,1.12 dimuse_sndmgr.cpp,1.12,1.13 dimuse_sndmgr.h,1.9,1.10
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.100,1.101 dialogs.h,1.36,1.37 player_v1.cpp,1.19,1.20 player_v2.cpp,2.45,2.46 player_v2.h,2.26,2.27 player_v2a.cpp,2.19,2.20 player_v2a.h,2.8,2.9 player_v3a.cpp,1.18,1.19 player_v3a.h,1.17,1.18 script.cpp,1.142,1.143 scumm.h,1.352,1.353 scummvm.cpp,2.537,2.538 sound.cpp,1.310,1.311 sound.h,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list