SHERLOCK: Change FixedText::getText to return const char *

This commit is contained in:
Paul Gilbert 2015-07-03 16:01:20 -04:00
parent d3a5db8ad7
commit 1e37f0b2ef
7 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ public:
/**
* Gets text
*/
virtual const Common::String getText(int fixedTextId) = 0;
virtual const char *getText(int fixedTextId) = 0;
/**
* Get action message

View File

@ -359,8 +359,8 @@ ScalpelFixedText::ScalpelFixedText(SherlockEngine *vm) : FixedText(vm) {
_curLanguageEntry = curLanguageEntry;
}
const Common::String ScalpelFixedText::getText(int fixedTextId) {
return Common::String(_curLanguageEntry->fixedTextArray[fixedTextId]);
const char *ScalpelFixedText::getText(int fixedTextId) {
return _curLanguageEntry->fixedTextArray[fixedTextId];
}
const Common::String ScalpelFixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) {

View File

@ -93,7 +93,7 @@ public:
/**
* Gets text
*/
virtual const Common::String getText(int fixedTextId);
virtual const char *getText(int fixedTextId);
/**
* Get action message

View File

@ -62,8 +62,8 @@ static const char *const FIXED_TEXT_ENGLISH[] = {
TattooFixedText::TattooFixedText(SherlockEngine *vm) : FixedText(vm) {
}
const Common::String TattooFixedText::getText(int fixedTextId) {
return Common::String(FIXED_TEXT_ENGLISH[fixedTextId]);
const char *TattooFixedText::getText(int fixedTextId) {
return FIXED_TEXT_ENGLISH[fixedTextId];
}
const Common::String TattooFixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) {

View File

@ -68,7 +68,7 @@ public:
/**
* Gets text
*/
virtual const Common::String getText(int fixedTextId);
virtual const char *getText(int fixedTextId);
/**
* Get action message

View File

@ -497,7 +497,7 @@ void WidgetInventory::handleEvents() {
}
if (!found)
ui.putMessage("%s", FIXED(NoEffect).c_str());
ui.putMessage("%s", FIXED(NoEffect));
}
} else if ((_outsideMenu && !_bounds.contains(mousePos)) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) {
// Want to close the window (clicked outside of it). So close the window and return to Standard
@ -540,7 +540,7 @@ void WidgetInventory::handleEvents() {
}
}
if (!found)
ui.putMessage("%s",FIXED(NoEffect).c_str());
ui.putMessage("%s", FIXED(NoEffect));
} else {
// See if they right clicked on an item

View File

@ -406,7 +406,7 @@ void WidgetTalk::handleEvents() {
if (select == -1) {
talk.freeTalkVars();
ui.putMessage("%s", FIXED(NothingToSay).c_str());
ui.putMessage("%s", FIXED(NothingToSay));
return;
}