diff options
author | Torbjörn Andersson | 2004-03-17 09:03:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-03-17 09:03:15 +0000 |
commit | 4c3a68027f7f84a58664f77c847d24ab5b9757e4 (patch) | |
tree | bf20e888b9ea1cc2045df84aad12ef1cd54ec7de /sword2/maketext.cpp | |
parent | 03200025dfb030d887ff9b07d180a8f9e2f225bc (diff) | |
download | scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.gz scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.bz2 scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.zip |
Use the same syntax for accessing script variables as BS1 does, i.e. now
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it
makes it much easier to tell the difference between variables and constants
when looking at the code.
Of course, this sort of sweeping changes is jolly good for introducing
truly weird regressions, which is why I waited until after 0.6.0.
svn-id: r13331
Diffstat (limited to 'sword2/maketext.cpp')
-rw-r--r-- | sword2/maketext.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp index 3555e46a1a..bc528bba28 100644 --- a/sword2/maketext.cpp +++ b/sword2/maketext.cpp @@ -49,6 +49,7 @@ #include "common/stdafx.h" #include "sword2/sword2.h" #include "sword2/defs.h" +#include "sword2/logic.h" #include "sword2/maketext.h" #include "sword2/resman.h" #include "sword2/driver/d_draw.h" @@ -87,7 +88,7 @@ Memory *FontRenderer::makeTextSprite(uint8 *sentence, uint16 maxWidth, uint8 pen // allocate memory for array of lineInfo structures - line = _vm->_memory->allocMemory(MAX_LINES * sizeof(LineInfo), MEM_locked, (uint32)UID_temp); + line = _vm->_memory->allocMemory(MAX_LINES * sizeof(LineInfo), MEM_locked, (uint32) UID_temp); // get details of sentence breakdown into array of LineInfo structures // and get the no of lines involved @@ -213,7 +214,7 @@ Memory *FontRenderer::buildTextSprite(uint8 *sentence, uint32 fontRes, uint8 pen // allocate memory for sprite, and lock it ready for use // NB. 'textSprite' is the given pointer to the handle to be used - textSprite = _vm->_memory->allocMemory(sizeof(FrameHeader) + sizeOfSprite, MEM_locked, (uint32)UID_text_sprite); + textSprite = _vm->_memory->allocMemory(sizeof(FrameHeader) + sizeOfSprite, MEM_locked, (uint32) UID_text_sprite); // the handle (*textSprite) now points to UNMOVABLE memory block // set up the frame header @@ -579,7 +580,7 @@ void Sword2Engine::initialiseFontResourceFlags(void) { // Get the text line - skip the 2 chars containing the wavId - if (DEMO) + if (Logic::_scriptVars[DEMO]) textLine = fetchTextLine(textFile, 451) + 2; else textLine = fetchTextLine(textFile, 54) + 2; |