diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/bmv.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/dialogs.cpp | 33 | ||||
-rw-r--r-- | engines/tinsel/pdisplay.cpp | 18 | ||||
-rw-r--r-- | engines/tinsel/text.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/text.h | 2 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 12 |
6 files changed, 34 insertions, 35 deletions
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index 2077789b9c..fd5088636f 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -514,7 +514,7 @@ void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, CO LoadSubString(stringId, 0, TextBufferAddr(), TBUFSZ); texts[index].dieFrame = currentFrame + duration; - texts[index].pText = ObjectTextOut(coroParam, GetPlayfieldList(FIELD_STATUS), + texts[index].pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x, y, diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index ed59b5669b..135db71575 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1587,7 +1587,7 @@ static bool InvKeyIn(const Common::KeyState &kbd) { MultiDeleteObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL3]); iconArray[HL3] = NULL; } - iconArray[HL3] = ObjectTextOut(nullContext, + iconArray[HL3] = ObjectTextOut( GetPlayfieldList(FIELD_STATUS), sedit, 0, InvD[ino].inventoryX + cd.box[cd.selBox].xpos + 2, InvD[ino].inventoryY + cd.box[cd.selBox].ypos + TYOFF, @@ -1595,7 +1595,7 @@ static bool InvKeyIn(const Common::KeyState &kbd) { if (MultiRightmost(iconArray[HL3]) > MAX_NAME_RIGHT) { MultiDeleteObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL3]); UpdateString(Common::KeyState(Common::KEYCODE_BACKSPACE)); - iconArray[HL3] = ObjectTextOut(nullContext, + iconArray[HL3] = ObjectTextOut( GetPlayfieldList(FIELD_STATUS), sedit, 0, InvD[ino].inventoryX + cd.box[cd.selBox].xpos + 2, InvD[ino].inventoryY + cd.box[cd.selBox].ypos + TYOFF, @@ -1669,7 +1669,7 @@ static void Select(int i, bool force) { } #endif - iconArray[HL3] = ObjectTextOut(nullContext, + iconArray[HL3] = ObjectTextOut( GetPlayfieldList(FIELD_STATUS), sedit, 0, InvD[ino].inventoryX + cd.box[i].xpos + 2, #ifdef JAPAN @@ -2634,17 +2634,16 @@ static void AddBackground(OBJECT **rect, OBJECT **title, int extraH, int extraV, return; // Create text object using title string - CoroContext dummyCoro; if (textFrom == FROM_HANDLE) { LoadStringRes(InvD[ino].hInvTitle, TextBufferAddr(), TBUFSZ); - *title = ObjectTextOut(dummyCoro, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, + *title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, InvD[ino].inventoryX + width/2, InvD[ino].inventoryY + M_TOFF, GetTagFontHandle(), TXT_CENTRE); assert(*title); // Inventory title string produced NULL text MultiSetZPosition(*title, Z_INV_HTEXT); } else if (textFrom == FROM_STRING && cd.ixHeading != NO_HEADING) { LoadStringRes(configStrings[cd.ixHeading], TextBufferAddr(), TBUFSZ); - *title = ObjectTextOut(dummyCoro, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, + *title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, InvD[ino].inventoryX + width/2, InvD[ino].inventoryY + M_TOFF, GetTagFontHandle(), TXT_CENTRE); assert(*title); // Inventory title string produced NULL text @@ -2668,7 +2667,7 @@ static void AddTitle(POBJECT *title, int extraH) { // Create text object using title string if (InvD[ino].hInvTitle != (SCNHANDLE)NO_HEADING) { LoadStringRes(InvD[ino].hInvTitle, TextBufferAddr(), TBUFSZ); - *title = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, + *title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, InvD[ino].inventoryX + (width/2)+NM_BG_POS_X, InvD[ino].inventoryY + NM_TOFF, GetTagFontHandle(), TXT_CENTRE, 0); assert(*title); @@ -2749,14 +2748,14 @@ static void AddBox(int *pi, const int i) { (!TinselV2 && (cd.box[i].ixText == USE_POINTER))) { if (cd.box[i].boxText != NULL) { if (cd.box[i].boxType == RGROUP) { - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), cd.box[i].boxText, 0, + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), cd.box[i].boxText, 0, #ifdef JAPAN x + 2, y+2, GetTagFontHandle(), 0); #else x + 2, y + TYOFF, GetTagFontHandle(), 0); #endif } else { - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), cd.box[i].boxText, 0, + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), cd.box[i].boxText, 0, #ifdef JAPAN // Note: it never seems to go here! x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTRE); @@ -2782,10 +2781,10 @@ static void AddBox(int *pi, const int i) { } if (TinselV2 && (cd.box[i].boxType == RGROUP)) - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + 2, y + TYOFF, GetTagFontHandle(), 0, 0); else - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, #ifdef JAPAN x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTRE); @@ -2842,7 +2841,7 @@ static void AddBox(int *pi, const int i) { assert(cd.box[i].ixText != USE_POINTER); LoadStringRes(configStrings[cd.box[i].ixText], TextBufferAddr(), TBUFSZ); } - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + MDTEXT_XOFF, y + MDTEXT_YOFF, GetTagFontHandle(), TXT_RIGHT); MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT); *pi += 1; @@ -2869,11 +2868,11 @@ static void AddBox(int *pi, const int i) { } if (cd.box[i].boxType == TOGGLE2) { - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + cd.box[i].w / 2, y + TOG2_YOFF, GetTagFontHandle(), TXT_CENTRE, 0); } else { - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + MDTEXT_XOFF, y + MDTEXT_YOFF, GetTagFontHandle(), TXT_RIGHT, 0); } @@ -2908,7 +2907,7 @@ static void AddBox(int *pi, const int i) { assert(cd.box[i].ixText != USE_POINTER); LoadStringRes(configStrings[cd.box[i].ixText], TextBufferAddr(), TBUFSZ); } - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x+MDTEXT_XOFF, y+MDTEXT_YOFF, GetTagFontHandle(), TXT_RIGHT); MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT); *pi += 1; @@ -2933,7 +2932,7 @@ static void AddBox(int *pi, const int i) { // Stick in the text assert(cd.box[i].textMethod == TM_INDEX); LoadStringRes(SysString(cd.box[i].ixText), TextBufferAddr(), TBUFSZ); - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + cd.box[i].w / 2, y + TOG2_YOFF, GetTagFontHandle(), TXT_CENTRE, 0); MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT); @@ -2945,7 +2944,7 @@ static void AddBox(int *pi, const int i) { break; LoadStringRes(LanguageDesc(displayedLanguage), TextBufferAddr(), TBUFSZ); - iconArray[*pi] = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, + iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x + cd.box[i].w / 2, y + ROT_YOFF, GetTagFontHandle(), TXT_CENTRE, 0); MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT); *pi += 1; diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp index e05a6f6a9a..d55f8be260 100644 --- a/engines/tinsel/pdisplay.cpp +++ b/engines/tinsel/pdisplay.cpp @@ -155,7 +155,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { // New text objects sprintf(PositionString, "%d %d", aniX + Loffset, aniY + Toffset); - _ctx->cpText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->cpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, 0, CPOSX, POSY, GetTagFontHandle(), TXT_CENTRE); if (DispPath) { HPOLYGON hp = InPolygon(aniX + Loffset, aniY + Toffset, PATH); @@ -167,7 +167,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { PolyCornerX(hp, 1), PolyCornerY(hp, 1), PolyCornerX(hp, 2), PolyCornerY(hp, 2), PolyCornerX(hp, 3), PolyCornerY(hp, 3)); - _ctx->cpathText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->cpathText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, 0, 4, POSY+ 10, GetTagFontHandle(), 0); } @@ -213,7 +213,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { // create new text object list sprintf(PositionString, "%d %d", aniX, aniY); - _ctx->rpText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->rpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, 0, LPOSX, POSY, GetTagFontHandle(), TXT_CENTRE); // update previous position @@ -232,7 +232,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) { } sprintf(PositionString, "String: %d", newestString); - _ctx->spText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), PositionString, + _ctx->spText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString, 0, SPOSX, POSY+10, GetTalkFontHandle(), TXT_CENTRE); // update previous value @@ -407,7 +407,7 @@ static bool ActorTag(int curX, int curY, HotSpotTag *pTag, OBJECT **ppText) { // May have buggered cursor EndCursorFollowed(); - *ppText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), tagBuffer, + *ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), tagBuffer, 0, tagX, tagY, GetTagFontHandle(), TXT_CENTRE, 0); assert(*ppText); MultiSetZPosition(*ppText, Z_TAG_TEXT); @@ -452,7 +452,7 @@ static bool ActorTag(int curX, int curY, HotSpotTag *pTag, OBJECT **ppText) { PlayfieldGetPos(FIELD_WORLD, &tagX, &tagY); LoadStringRes(GetActorTag(ano), TextBufferAddr(), TBUFSZ); - *ppText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + *ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, xtext - tagX, ytext - tagY, GetTagFontHandle(), TXT_CENTRE); assert(*ppText); // Actor tag string produced NULL text MultiSetZPosition(*ppText, Z_TAG_TEXT); @@ -555,7 +555,7 @@ static bool PolyTag(HotSpotTag *pTag, OBJECT **ppText) { // May have buggered cursor EndCursorFollowed(); - *ppText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + *ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, tagx - Loffset, tagy - Toffset, GetTagFontHandle(), TXT_CENTRE, 0); } else if (TinselV2) { @@ -565,11 +565,11 @@ static bool PolyTag(HotSpotTag *pTag, OBJECT **ppText) { StartCursorFollowed(); GetCursorXYNoWait(&curX, &curY, false); - *ppText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + *ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, curX, curY, GetTagFontHandle(), TXT_CENTRE, 0); } else { // Handle displaying the tag text on-screen - *ppText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + *ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, tagx - Loffset, tagy - Toffset, GetTagFontHandle(), TXT_CENTRE); assert(*ppText); // Polygon tag string produced NULL text diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp index c7c921b935..d2939281eb 100644 --- a/engines/tinsel/text.cpp +++ b/engines/tinsel/text.cpp @@ -107,7 +107,7 @@ int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) { * @param mode Mode flags for the string * @param sleepTime Sleep time between each character (if non-zero) */ -OBJECT *ObjectTextOut(CORO_PARAM, OBJECT *pList, char *szStr, int colour, +OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour, int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime) { int xJustify; // x position of text after justification int yOffset; // offset to next line of text diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h index 664f0d207c..a849e286ec 100644 --- a/engines/tinsel/text.h +++ b/engines/tinsel/text.h @@ -98,7 +98,7 @@ struct TEXTOUT { * @param mode mode flags for the string * @param sleepTime Sleep time between each character (if non-zero) */ -OBJECT *ObjectTextOut(CORO_PARAM, OBJECT *pList, char *szStr, int colour, +OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour, int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime = 0); OBJECT *ObjectTextOutIndirect( // output a string of text diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index e89010b9d7..a1c39bffde 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1949,7 +1949,7 @@ static void Print(CORO_PARAM, int x, int y, SCNHANDLE text, int time, bool bSust if (TinselV2) { int Loffset, Toffset; PlayfieldGetPos(FIELD_WORLD, &Loffset, &Toffset); - _ctx->pText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + _ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x - Loffset, y - Toffset, GetTagFontHandle(), TXT_CENTRE, 0); assert(_ctx->pText); @@ -1962,7 +1962,7 @@ static void Print(CORO_PARAM, int x, int y, SCNHANDLE text, int time, bool bSust } else if (bJapDoPrintText || (!isJapanMode() && (_vm->_config->_useSubtitles || !_ctx->bSample))) { int Loffset, Toffset; // Screen position PlayfieldGetPos(FIELD_WORLD, &Loffset, &Toffset); - _ctx->pText = ObjectTextOut(coroParam, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + _ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, x - Loffset, y - Toffset, TinselV2 ? GetTagFontHandle() : GetTalkFontHandle(), TXT_CENTRE); assert(_ctx->pText); // string produced NULL text @@ -2126,7 +2126,7 @@ static void PrintObj(CORO_PARAM, const SCNHANDLE hText, const INV_OBJECT *pinvo, else LoadStringRes(hText, TextBufferAddr(), TBUFSZ); - _ctx->pText = ObjectTextOut(coroParam, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + _ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, _ctx->textx, _ctx->texty, GetTagFontHandle(), TXT_CENTRE); assert(_ctx->pText); // PrintObj() string produced NULL text @@ -2178,7 +2178,7 @@ static void PrintObj(CORO_PARAM, const SCNHANDLE hText, const INV_OBJECT *pinvo, // Re-display in the same place LoadStringRes(hText, TextBufferAddr(), TBUFSZ); - _ctx->pText = ObjectTextOut(nullContext, GetPlayfieldList(FIELD_STATUS), + _ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, _ctx->textx, _ctx->texty, GetTagFontHandle(), TXT_CENTRE, 0); assert(_ctx->pText); @@ -2295,7 +2295,7 @@ static void PrintObjPointed(CORO_PARAM, const SCNHANDLE text, const INV_OBJECT * // Re-display in the same place LoadStringRes(text, TextBufferAddr(), TBUFSZ); - pText = ObjectTextOut(coroParam, GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), + pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, textx, texty, GetTagFontHandle(), TXT_CENTRE); assert(pText); // PrintObj() string produced NULL text MultiSetZPosition(pText, Z_INV_ITEXT); @@ -3364,7 +3364,7 @@ static void TalkOrSay(CORO_PARAM, SPEECH_TYPE speechType, SCNHANDLE hText, int x _ctx->y -= _ctx->Toffset; } - _ctx->pText = ObjectTextOut(coroParam, GetPlayfieldList(FIELD_STATUS), + _ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0, _ctx->x - _ctx->Loffset, _ctx->y - _ctx->Toffset, GetTalkFontHandle(), TXT_CENTRE); assert(_ctx->pText); // talk() string produced NULL text; |