mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-28 14:13:24 +00:00
PRINCE: Revert incorrect const'ness at printAt()
This commit is contained in:
parent
0afaf44409
commit
3899532440
@ -1125,21 +1125,18 @@ int PrinceEngine::checkMob(Graphics::Surface *screen, Common::Array<Mob> &mobLis
|
||||
return mobNumber;
|
||||
}
|
||||
|
||||
void PrinceEngine::printAt(uint32 slot, uint8 color, const char *s, uint16 x, uint16 y) {
|
||||
void PrinceEngine::printAt(uint32 slot, uint8 color, char *s, uint16 x, uint16 y) {
|
||||
debugC(1, DebugChannel::kEngine, "PrinceEngine::printAt slot %d, color %d, x %02d, y %02d, str %s", slot, color, x, y, s);
|
||||
|
||||
char tmpStr[1024];
|
||||
strncpy(tmpStr, s, 1024);
|
||||
|
||||
if (getLanguage() == Common::DE_DEU)
|
||||
correctStringDEU(tmpStr);
|
||||
correctStringDEU(s);
|
||||
|
||||
Text &text = _textSlots[slot];
|
||||
text._str = tmpStr;
|
||||
text._str = s;
|
||||
text._x = x;
|
||||
text._y = y;
|
||||
text._color = color;
|
||||
int lines = calcTextLines(tmpStr);
|
||||
int lines = calcTextLines(s);
|
||||
text._time = calcTextTime(lines);
|
||||
}
|
||||
|
||||
@ -2473,7 +2470,7 @@ void PrinceEngine::inventoryLeftMouseButton() {
|
||||
int invObjExamEvent = _script->scanMobEvents(_invMobList[_selectedMob]._mask, _script->_scriptInfo.invObjExam);
|
||||
if (invObjExamEvent == -1) {
|
||||
// do_standard
|
||||
printAt(0, 216, _invMobList[_selectedMob]._examText.c_str(), kNormalWidth / 2, _invExamY);
|
||||
printAt(0, 216, (char *)_invMobList[_selectedMob]._examText.c_str(), kNormalWidth / 2, _invExamY);
|
||||
_interpreter->setCurrentString(_invMobList[_selectedMob]._mask + 70000);
|
||||
setVoice(0, 28, 1);
|
||||
playSample(28, 0);
|
||||
|
@ -308,7 +308,7 @@ public:
|
||||
virtual GUI::Debugger *getDebugger();
|
||||
|
||||
void changeCursor(uint16 curId);
|
||||
void printAt(uint32 slot, uint8 color, const char *s, uint16 x, uint16 y);
|
||||
void printAt(uint32 slot, uint8 color, char *s, uint16 x, uint16 y);
|
||||
int calcTextLines(const char *s);
|
||||
int calcTextTime(int numberOfLines);
|
||||
void correctStringDEU(char *s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user