parent
052a482f40
commit
af2574c02d
2 changed files with 16 additions and 6 deletions
|
@ -524,7 +524,7 @@ bool ScummDebugger::Cmd_ImportRes(int argc, const char** argv) {
|
|||
|
||||
bool ScummDebugger::Cmd_PrintScript(int argc, const char **argv) {
|
||||
int i;
|
||||
ScriptSlot *ss = &_s->vm.slot[0];
|
||||
ScriptSlot *ss = _s->vm.slot;
|
||||
Debug_Printf("+--------------------------------------+\n");
|
||||
Debug_Printf("|# | num | offset|sta|typ|fr|rec|fc|cut|\n");
|
||||
Debug_Printf("+--+-----+-------+---+---+--+--+---+---+\n");
|
||||
|
|
|
@ -1696,17 +1696,27 @@ void Scumm_v8::o8_getObjectImageHeight() {
|
|||
|
||||
void Scumm_v8::o8_getStringWidth() {
|
||||
int charset = pop();
|
||||
int len = resStrLen(_scriptPointer);
|
||||
int oldID = _charset->getCurID();
|
||||
int width;
|
||||
const byte *msg = _scriptPointer;
|
||||
|
||||
// Skip to the next instruction
|
||||
_scriptPointer += resStrLen(_scriptPointer) + 1;
|
||||
|
||||
if (msg[0] == '/') {
|
||||
translateText(msg, _transText);
|
||||
msg = _transText;
|
||||
}
|
||||
|
||||
|
||||
// Temporary set the specified charset id
|
||||
_charset->setCurID(charset);
|
||||
width = _charset->getStringWidth(0, _scriptPointer);
|
||||
_charset->setCurID(_string[charset].charset);
|
||||
// Determine the strings width
|
||||
width = _charset->getStringWidth(0, msg);
|
||||
// Revert to old font
|
||||
_charset->setCurID(oldID);
|
||||
|
||||
|
||||
push(width);
|
||||
_scriptPointer += len + 1;
|
||||
}
|
||||
|
||||
void Scumm_v8::o8_drawObject() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue