aboutsummaryrefslogtreecommitdiff
path: root/sword2/anims.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-11-08 15:47:51 +0000
committerTorbjörn Andersson2003-11-08 15:47:51 +0000
commit688c80b0620ae5765355a4048864bb3de84ebf74 (patch)
tree497d8efc73b08f5a4d58c45c52b7a6bafa1975ff /sword2/anims.cpp
parentb04ddef7506bfa08527da9e79040c583fb765b2e (diff)
downloadscummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.tar.gz
scummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.tar.bz2
scummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.zip
Moved more stuff into classes, changed some static allocation to dynamic,
and removed some of the references to global variables. At this point I believe everything in the main game engine has been moved into classes - not necessarily the correct ones, but still... However, there is some stuff in the driver directory that need to be taken care of as well. svn-id: r11207
Diffstat (limited to 'sword2/anims.cpp')
-rw-r--r--sword2/anims.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp
index 1b14ca409a..00797a7300 100644
--- a/sword2/anims.cpp
+++ b/sword2/anims.cpp
@@ -161,7 +161,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
#endif
// point to anim header
- anim_head = g_sword2->fetchAnimHeader(anim_file);
+ anim_head = _vm->fetchAnimHeader(anim_file);
/* #ifdef _SWORD2_DEBUG
// check there's at least one frame
@@ -177,7 +177,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
ob_graphic->anim_pc = anim_head->noAnimFrames - 1;
else
ob_graphic->anim_pc = 0;
- } else if (Get_sync()) {
+ } else if (g_logic->getSync()) {
// We've received a sync - return to script immediately
debug(5, "**sync stopped %d**", ID);
@@ -191,7 +191,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
// open anim file and point to anim header
anim_file = res_man->openResource(ob_graphic->anim_resource);
- anim_head = g_sword2->fetchAnimHeader(anim_file);
+ anim_head = _vm->fetchAnimHeader(anim_file);
if (reverse)
ob_graphic->anim_pc--;
@@ -284,7 +284,7 @@ int32 Logic::fnSetFrame(int32 *params) {
#endif
// set up pointer to the animation header
- anim_head = g_sword2->fetchAnimHeader(anim_file);
+ anim_head = _vm->fetchAnimHeader(anim_file);
/* #ifdef _SWORD2_DEBUG
// check there's at least one frame
@@ -497,7 +497,7 @@ void Logic::createSequenceSpeech(_movieTextObject *sequenceText[]) {
local_text = _sequenceTextList[line].textNumber & 0xffff;
// open text resource & get the line
- text = g_sword2->fetchTextLine(res_man->openResource(text_res), local_text);
+ text = _vm->fetchTextLine(res_man->openResource(text_res), local_text);
wavId = (int32) READ_LE_UINT16(text);
// now ok to close the text file
@@ -540,7 +540,7 @@ void Logic::createSequenceSpeech(_movieTextObject *sequenceText[]) {
if (gui->_subtitles || !speechRunning) {
// open text resource & get the line
- text = g_sword2->fetchTextLine(res_man->openResource(text_res), local_text);
+ text = _vm->fetchTextLine(res_man->openResource(text_res), local_text);
// make the sprite
// 'text+2' to skip the first 2 bytes which form the
// line reference number
@@ -551,7 +551,7 @@ void Logic::createSequenceSpeech(_movieTextObject *sequenceText[]) {
// When rendering text over a sequence we need a
// different colour for the border.
- _sequenceTextList[line].text_mem = fontRenderer.makeTextSprite(text + 2, 600, 255, g_sword2->_speechFontId, 1);
+ _sequenceTextList[line].text_mem = fontRenderer->makeTextSprite(text + 2, 600, 255, _vm->_speechFontId, 1);
// ok to close the text resource now
res_man->closeResource(text_res);
@@ -727,7 +727,7 @@ int32 Logic::fnPlaySequence(int32 *params) {
MoviePlayer player;
- if (_sequenceTextLines && !(g_sword2->_features & GF_DEMO))
+ if (_sequenceTextLines && !(_vm->_features & GF_DEMO))
rv = player.play(filename, sequenceSpeechArray, leadOut);
else
rv = player.play(filename, NULL, leadOut);