diff options
author | Travis Howell | 2006-04-06 10:47:37 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-06 10:47:37 +0000 |
commit | 87de34a8d512e9821293296b09b0d715294168f6 (patch) | |
tree | 27ab15bb548041dc1cd0d9fd3fd8ee776dd266df /engines | |
parent | dd9f4d9f99097f0ae96abaa958e426fb396c7d66 (diff) | |
download | scummvm-rg350-87de34a8d512e9821293296b09b0d715294168f6.tar.gz scummvm-rg350-87de34a8d512e9821293296b09b0d715294168f6.tar.bz2 scummvm-rg350-87de34a8d512e9821293296b09b0d715294168f6.zip |
Cleanup
svn-id: r21640
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/charset.cpp | 10 | ||||
-rw-r--r-- | engines/simon/icons.cpp | 2 | ||||
-rw-r--r-- | engines/simon/items.cpp | 87 | ||||
-rw-r--r-- | engines/simon/saveload.cpp | 151 | ||||
-rw-r--r-- | engines/simon/simon.cpp | 52 | ||||
-rw-r--r-- | engines/simon/simon.h | 22 | ||||
-rw-r--r-- | engines/simon/verb.cpp | 62 |
7 files changed, 182 insertions, 204 deletions
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp index c8ee4ca3f4..dea54a41a6 100644 --- a/engines/simon/charset.cpp +++ b/engines/simon/charset.cpp @@ -37,7 +37,7 @@ void SimonEngine::print_char_helper_1(const byte *src, uint len) { if (getBitFlag(93)) { if (_curWindow == 3) { if ((_newLines >= _textWindow->scrollY) && (_newLines < (_textWindow->scrollY + 3))) - fcs_putchar(*src); + windowPutChar(*src); if (*src == '\n') // Do two top lines of text only _newLines++; src++; @@ -46,7 +46,7 @@ void SimonEngine::print_char_helper_1(const byte *src, uint len) { if (getBitFlag(94)) { if (_curWindow == 3) { if (_newLines == (_textWindow->scrollY + 7)) - fcs_putchar(*src); + windowPutChar(*src); if (*src == '\n') // Do two top lines of text only _newLines++; src++; @@ -54,7 +54,7 @@ void SimonEngine::print_char_helper_1(const byte *src, uint len) { } else { //if (getBitFlag(92)) // while(!_nextCharacter); - fcs_putchar(*src++); + windowPutChar(*src++); //_nextCharacter = false; } } @@ -66,7 +66,7 @@ void SimonEngine::print_char_helper_1(const byte *src, uint len) { _fcsData2[ind] = 1; } - fcs_putchar(*src++); + windowPutChar(*src++); } } } @@ -346,7 +346,7 @@ void SimonEngine::showmessage_helper_3(uint a, uint b) { _newLines = 0; } -void SimonEngine::video_putchar(WindowBlock *window, byte c, byte b) { +void SimonEngine::videoPutchar(WindowBlock *window, byte c, byte b) { byte width = 6; if (c == 12) { diff --git a/engines/simon/icons.cpp b/engines/simon/icons.cpp index 3220b72b8a..59dfc955bb 100644 --- a/engines/simon/icons.cpp +++ b/engines/simon/icons.cpp @@ -553,7 +553,7 @@ void SimonEngine::removeIconArray(uint num) { if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { changeWindow(num); - fcs_putchar(12); + windowPutChar(12); changeWindow(curWindow); } diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index 7d23e2764f..bcae8d00cd 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -1533,93 +1533,6 @@ void SimonEngine::o_unlockZone() { _vgaBufStart = _vgaFileBufOrg; } -int SimonEngine::o_unk_132_helper(bool *b, char *buf) { - HitArea *ha; - *b = true; - - if (!_saveLoadFlag) { - strange_jump:; - _saveLoadFlag = false; - saveGameDialog(buf); - } - -start_over:; - _keyPressed = 0; - -start_over_2:; - _lastHitArea = _lastHitArea3 = 0; - - do { - if (_keyPressed != 0) { - if (_saveLoadFlag) { - *b = false; - return _keyPressed; - } - goto start_over; - } - delay(100); - } while (_lastHitArea3 == 0); - - ha = _lastHitArea; - - if (ha == NULL || ha->id < 205) - goto start_over_2; - - if (ha->id == 205) - return ha->id; - - if (ha->id == 206) { - if (_saveLoadRowCurPos == 1) - goto start_over_2; - if (_saveLoadRowCurPos < 7) - _saveLoadRowCurPos = 1; - else - _saveLoadRowCurPos -= 6; - - goto strange_jump; - } - - if (ha->id == 207) { - if (!_saveDialogFlag) - goto start_over_2; - _saveLoadRowCurPos += 6; - if (_saveLoadRowCurPos >= _numSaveGameRows) - _saveLoadRowCurPos = _numSaveGameRows; - goto strange_jump; - } - - if (ha->id >= 214) - goto start_over_2; - return ha->id - 208; -} - -void SimonEngine::o_unk_132_helper_3() { - for (int i = 208; i != 208 + 6; i++) - set_hitarea_bit_0x40(i); -} - -void SimonEngine::o_clearCharacter(WindowBlock *window, int x, byte b) { - byte old_text; - - video_putchar(window, x, b); - old_text = window->text_color; - window->text_color = window->fill_color; - - if (_language == Common::HB_ISR) { //Hebrew - x = 128; - } else { - x += 120; - if (x != 128) - x = 129; - - } - - video_putchar(window, x); - - window->text_color = old_text; - video_putchar(window, 8); -} - void SimonEngine::o_playMusic() { int music = getVarOrWord(); int track = getVarOrWord(); diff --git a/engines/simon/saveload.cpp b/engines/simon/saveload.cpp index c56ac38aab..9362d290fd 100644 --- a/engines/simon/saveload.cpp +++ b/engines/simon/saveload.cpp @@ -180,7 +180,7 @@ void SimonEngine::saveOrLoadDialog(bool load) { int number_of_savegames; int i; int unk132_result; - WindowBlock *fcs; + WindowBlock *window; char *name; int name_len; bool b; @@ -224,20 +224,20 @@ restart:; // some code here - fcs = _windowArray[5]; + window = _windowArray[5]; - fcs->textRow = unk132_result; + window->textRow = unk132_result; if (_language == Common::HB_ISR) { //Hebrew // init x offset with a 2 character savegame number + a period (18 pix) - fcs->textColumn = 3; - fcs->textColumnOffset = 6; - fcs->textLength = 3; + window->textColumn = 3; + window->textColumnOffset = 6; + window->textLength = 3; } else { // init x offset with a 2 character savegame number + a period (18 pix) - fcs->textColumn = 2; - fcs->textColumnOffset = 2; - fcs->textLength = 3; + window->textColumn = 2; + window->textColumnOffset = 2; + window->textLength = 3; } name = buf + i * 18; @@ -249,20 +249,20 @@ restart:; byte width = 6; if (name[name_len] >= 64 && name[name_len] < 91) width = _hebrew_char_widths [name[name_len] - 64]; - fcs->textLength++; - fcs->textColumnOffset -= width; - if (fcs->textColumnOffset < width) { - fcs->textColumnOffset += 8; - fcs->textColumn++; + window->textLength++; + window->textColumnOffset -= width; + if (window->textColumnOffset < width) { + window->textColumnOffset += 8; + window->textColumn++; } } else { - fcs->textLength++; - fcs->textColumnOffset += 6; + window->textLength++; + window->textColumnOffset += 6; if (name[name_len] == 'i' || name[name_len] == 'l') - fcs->textColumnOffset -= 2; - if (fcs->textColumnOffset >= 8) { - fcs->textColumnOffset -= 8; - fcs->textColumn++; + window->textColumnOffset -= 2; + if (window->textColumnOffset >= 8) { + window->textColumnOffset -= 8; + window->textColumn++; } } name_len++; @@ -271,7 +271,7 @@ restart:; // do_3_start for (;;) { - video_putchar(fcs, 0x7f); + videoPutchar(window, 0x7f); _saveLoadFlag = true; @@ -322,7 +322,7 @@ restart:; } else if (i >= 32 && name_len != 17) { name[name_len++] = i; - video_putchar(_windowArray[5], i); + videoPutchar(_windowArray[5], i); } } @@ -350,7 +350,94 @@ get_out:; g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); } -void SimonEngine::o_fileError(WindowBlock *fcs, bool save_error) { +int SimonEngine::o_unk_132_helper(bool *b, char *buf) { + HitArea *ha; + *b = true; + + if (!_saveLoadFlag) { + strange_jump:; + _saveLoadFlag = false; + saveGameDialog(buf); + } + +start_over:; + _keyPressed = 0; + +start_over_2:; + _lastHitArea = _lastHitArea3 = 0; + + do { + if (_keyPressed != 0) { + if (_saveLoadFlag) { + *b = false; + return _keyPressed; + } + goto start_over; + } + delay(100); + } while (_lastHitArea3 == 0); + + ha = _lastHitArea; + + if (ha == NULL || ha->id < 205) + goto start_over_2; + + if (ha->id == 205) + return ha->id; + + if (ha->id == 206) { + if (_saveLoadRowCurPos == 1) + goto start_over_2; + if (_saveLoadRowCurPos < 7) + _saveLoadRowCurPos = 1; + else + _saveLoadRowCurPos -= 6; + + goto strange_jump; + } + + if (ha->id == 207) { + if (!_saveDialogFlag) + goto start_over_2; + _saveLoadRowCurPos += 6; + if (_saveLoadRowCurPos >= _numSaveGameRows) + _saveLoadRowCurPos = _numSaveGameRows; + goto strange_jump; + } + + if (ha->id >= 214) + goto start_over_2; + return ha->id - 208; +} + +void SimonEngine::o_unk_132_helper_3() { + for (int i = 208; i != 208 + 6; i++) + set_hitarea_bit_0x40(i); +} + +void SimonEngine::o_clearCharacter(WindowBlock *window, int x, byte b) { + byte old_text; + + videoPutchar(window, x, b); + old_text = window->text_color; + window->text_color = window->fill_color; + + if (_language == Common::HB_ISR) { //Hebrew + x = 128; + } else { + x += 120; + if (x != 128) + x = 129; + + } + + videoPutchar(window, x); + + window->text_color = old_text; + videoPutchar(window, 8); +} + +void SimonEngine::o_fileError(WindowBlock *window, bool save_error) { HitArea *ha; const char *string, *string2; @@ -362,23 +449,23 @@ void SimonEngine::o_fileError(WindowBlock *fcs, bool save_error) { string2 = "\r File not found."; } - video_putchar(fcs, 0xC); + videoPutchar(window, 0xC); for (; *string; string++) - video_putchar(fcs, *string); + videoPutchar(window, *string); for (; *string2; string2++) - video_putchar(fcs, *string2); + videoPutchar(window, *string2); - fcs->textColumn = (fcs->width >> 1) - 3; - fcs->textRow = fcs->height - 1; - fcs->textLength = 0; + window->textColumn = (window->width / 2) - 3; + window->textRow = window->height - 1; + window->textLength = 0; string = "[ OK ]"; for (; *string; string++) - video_putchar(fcs, *string); + videoPutchar(window, *string); ha = findEmptyHitArea(); - ha->x = ((fcs->width >> 1) + (fcs->x - 3)) << 3; - ha->y = (fcs->height << 3) + fcs->y - 8; + ha->x = ((window->width >> 1) + (window->x - 3)) * 8; + ha->y = (window->height << 3) + window->y - 8; ha->width = 48; ha->height = 8; ha->flags = 0x20; diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index d41de44243..09beee9418 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -291,7 +291,7 @@ SimonEngine::SimonEngine(OSystem *syst) _leftButtonDown = 0; _hitAreaSubjectItem = 0; _currentVerbBox = 0; - _hitAreaPtr7 = 0; + _lastVerbOn = 0; _needHitAreaRecalc = 0; _verbHitArea = 0; _defaultVerb = 0; @@ -418,7 +418,7 @@ SimonEngine::SimonEngine(OSystem *syst) memset(_videoBuf1, 0, sizeof(_videoBuf1)); - _fcs_list = new WindowBlock[16]; + _windowList = new WindowBlock[16]; memset(_lettersToPrintBuf, 0, sizeof(_lettersToPrintBuf)); @@ -658,7 +658,7 @@ SimonEngine::~SimonEngine() { delete _dummyItem2; delete _dummyItem3; - delete [] _fcs_list; + delete [] _windowList; delete _sound; delete _debugger; @@ -1687,7 +1687,7 @@ void SimonEngine::mouseOn() { _lockWord &= ~1; } -void SimonEngine::handle_mouse_moved() { +void SimonEngine::handleMouseMoved() { uint x; if (_mouseHideCount) { @@ -1740,16 +1740,15 @@ void SimonEngine::handle_mouse_moved() { setVerb(NULL); } } - if (getGameType() == GType_SIMON2) { if (getBitFlag(79)) { if (!_vgaVar9) { - if (_mouseX >= 630 / 2 || _mouseX < 9) + if (_mouseX >= 315 || _mouseX < 9) goto get_out2; _vgaVar9 = 1; } if (_scrollCount == 0) { - if (_mouseX >= 631 / 2) { + if (_mouseX >= 315) { if (_scrollX != _scrollXMax) _scrollFlag = 1; } else if (_mouseX < 8) { @@ -1801,7 +1800,7 @@ uint SimonEngine::itemGetIconNumber(Item *item) { return child->array[offs]; } -void SimonEngine::f10_key() { +void SimonEngine::displayBoxStars() { HitArea *ha, *dha; uint count; uint y_, x_; @@ -1918,7 +1917,7 @@ startOver: for (;;) { if (_keyPressed == 35) - f10_key(); + displayBoxStars(); processSpecialKeys(); if (_lastHitArea3 == (HitArea *) -1) goto startOver; @@ -1981,7 +1980,7 @@ void SimonEngine::hitarea_stuff_helper() { Subroutine *sub = getSubroutineByID(subr_id); if (sub != NULL) { startSubroutineEx(sub); - startUp_helper_2(); + permitInput(); } _variableArray[254] = 0; _runScriptReturn1 = false; @@ -1996,7 +1995,7 @@ void SimonEngine::hitarea_stuff_helper() { if ((uint) cur_time != _lastTime) { _lastTime = cur_time; if (kickoffTimeEvents()) - startUp_helper_2(); + permitInput(); } } @@ -2011,7 +2010,7 @@ void SimonEngine::hitarea_stuff_helper_2() { if (sub != NULL) { _variableArray[249] = 0; startSubroutineEx(sub); - startUp_helper_2(); + permitInput(); } _variableArray[249] = 0; } @@ -2022,7 +2021,7 @@ void SimonEngine::hitarea_stuff_helper_2() { if (sub != NULL) { _variableArray[254] = 0; startSubroutineEx(sub); - startUp_helper_2(); + permitInput(); } _variableArray[254] = 0; } @@ -2030,7 +2029,7 @@ void SimonEngine::hitarea_stuff_helper_2() { _runScriptReturn1 = false; } -void SimonEngine::startUp_helper_2() { +void SimonEngine::permitInput() { if (!_mortalFlag) { _mortalFlag = true; showmessage_print_char(0); @@ -2051,7 +2050,7 @@ void SimonEngine::pollMouseXY() { _mouseY = _sdlMouseY; } -void SimonEngine::handle_verb_clicked(uint verb) { +void SimonEngine::handleVerbClicked(uint verb) { Subroutine *sub; int result; @@ -2106,7 +2105,7 @@ void SimonEngine::handle_verb_clicked(uint verb) { if (getGameType() == GType_SIMON2 || getGameType() == GType_FF) _runScriptReturn1 = false; - startUp_helper_2(); + permitInput(); } TextLocation *SimonEngine::getTextLocation(uint a) { @@ -2786,7 +2785,7 @@ void SimonEngine::timer_proc1() { swapCharacterLogo(); } } - handle_mouse_moved(); + handleMouseMoved(); dx_update_screen_and_palette(); _updateScreen = false; } @@ -2847,7 +2846,6 @@ bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) { return item->state == b; } -// OK void SimonEngine::closeWindow(uint a) { if (_windowArray[a] == NULL) return; @@ -2860,7 +2858,6 @@ void SimonEngine::closeWindow(uint a) { } } -// OK void SimonEngine::changeWindow(uint a) { a &= 7; @@ -2877,11 +2874,10 @@ void SimonEngine::changeWindow(uint a) { showmessage_helper_3(_textWindow->textLength, _textWindow->textMaxLength); } -// OK WindowBlock *SimonEngine::openWindow(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint text_color) { WindowBlock *window; - window = _fcs_list; + window = _windowList; while (window->mode != 0) window++; @@ -2965,19 +2961,16 @@ void SimonEngine::o_pathfind(int x, int y, uint var_1, uint var_2) { } } -// ok void SimonEngine::delete_hitarea_by_index(uint index) { CHECK_BOUNDS(index, _hitAreas); _hitAreas[index].flags = 0; } -// ok -void SimonEngine::fcs_putchar(uint a) { +void SimonEngine::windowPutChar(uint a) { if (_textWindow != _windowArray[0]) - video_putchar(_textWindow, a); + videoPutchar(_textWindow, a); } -// ok void SimonEngine::clearWindow(WindowBlock *window) { if (window->flags & 0x10) restoreWindow(window); @@ -2990,7 +2983,6 @@ void SimonEngine::clearWindow(WindowBlock *window) { window->textLength = 0; } -// ok void SimonEngine::restoreWindow(WindowBlock *window) { _lockWord |= 0x8000; @@ -3738,7 +3730,7 @@ void SimonEngine::openGameFile() { vc34_setMouseOff(); runSubroutine101(); - startUp_helper_2(); + permitInput(); } void SimonEngine::runSubroutine101() { @@ -3748,7 +3740,7 @@ void SimonEngine::runSubroutine101() { if (sub != NULL) startSubroutineEx(sub); - startUp_helper_2(); + permitInput(); } void SimonEngine::restoreBlock(uint b, uint r, uint y, uint x) { @@ -3940,7 +3932,7 @@ int SimonEngine::go() { while (1) { hitarea_stuff(); - handle_verb_clicked(_verbHitArea); + handleVerbClicked(_verbHitArea); delay(100); } diff --git a/engines/simon/simon.h b/engines/simon/simon.h index 00555f87ae..3061693f1a 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -285,7 +285,7 @@ protected: byte _leftButtonDown; byte _rightButtonDown; Item *_hitAreaSubjectItem; - HitArea *_currentVerbBox, *_hitAreaPtr7; + HitArea *_currentVerbBox, *_lastVerbOn; uint _needHitAreaRecalc; uint _verbHitArea; uint16 _defaultVerb; @@ -407,7 +407,7 @@ protected: VgaTimerEntry _vgaTimerList[95]; - WindowBlock *_fcs_list; + WindowBlock *_windowList; byte _lettersToPrintBuf[80]; @@ -639,12 +639,12 @@ protected: void checkDown(WindowBlock *window); void inventoryUp(WindowBlock *window); void inventoryDown(WindowBlock *window); - void hitareaChangedHelper(); - void focusVerb(uint hitarea_id); + void resetNameWindow(); + void printVerbOf(uint hitarea_id); HitArea *findHitAreaByID(uint hitarea_id); - void showActionString(uint x, const byte *string); - void video_putchar(WindowBlock *window, byte c, byte b = 0); + void showActionString(const byte *string); + void videoPutchar(WindowBlock *window, byte c, byte b = 0); void clearWindow(WindowBlock *window); void video_toggle_colors(HitArea * ha, byte a, byte b, byte c, byte d); @@ -656,10 +656,10 @@ protected: void displayName(HitArea * ha); bool printTextOf(uint a); bool printNameOf(Item *item); - void f10_key(); + void displayBoxStars(); void hitarea_stuff(); - void handle_mouse_moved(); + void handleMouseMoved(); void pollMouseXY(); void drawMousePointer(); @@ -675,11 +675,11 @@ protected: void processSpecialKeys(); void hitarea_stuff_helper(); - void startUp_helper_2(); + void permitInput(); void showmessage_helper_3(uint a, uint b); void showmessage_print_char(byte chr); - void handle_verb_clicked(uint verb); + void handleVerbClicked(uint verb); void o_set_video_mode(uint mode, uint vga_res); void set_video_mode_internal(uint mode, uint vga_res_id); @@ -836,7 +836,7 @@ protected: void delete_hitarea_by_index(uint index); void removeArrows(WindowBlock *window, uint num); - void fcs_putchar(uint a); + void windowPutChar(uint a); void restoreWindow(WindowBlock *window); void colorWindow(WindowBlock *window); diff --git a/engines/simon/verb.cpp b/engines/simon/verb.cpp index 42dbd11f75..d9d149a30d 100644 --- a/engines/simon/verb.cpp +++ b/engines/simon/verb.cpp @@ -210,18 +210,17 @@ void SimonEngine::clearName() { last = _currentVerbBox; - if (last == _hitAreaPtr7) + if (last == _lastVerbOn) return; - hitareaChangedHelper(); - _hitAreaPtr7 = last; + resetNameWindow(); + _lastVerbOn = last; if (last != NULL && (ha = findHitAreaByID(200)) && (ha->flags & 0x40) && !(last->flags & 0x40)) - focusVerb(last->id); + printVerbOf(last->id); } -void SimonEngine::focusVerb(uint hitarea_id) { - uint x; +void SimonEngine::printVerbOf(uint hitarea_id) { const char *txt; const char * const *verb_names; const char * const *verb_prep_names; @@ -281,38 +280,42 @@ void SimonEngine::focusVerb(uint hitarea_id) { CHECK_BOUNDS(hitarea_id, english_verb_names); txt = verb_names[hitarea_id]; } - x = (53 - strlen(txt)) * 3; - showActionString(x, (const byte *)txt); + showActionString((const byte *)txt); } -void SimonEngine::showActionString(uint x, const byte *string) { +void SimonEngine::showActionString(const byte *string) { WindowBlock *window; + uint x; window = _windowArray[1]; if (window == NULL || window->text_color == 0) return; - window->textColumn = x >> 3; + // Arisme : hack for long strings in the French version + if ((strlen((const char*)string) - 1) <= 53) + x = (53 - (strlen((const char *)string) - 1)) * 3; + else + x = 0; + + window->textColumn = x / 8; window->textColumnOffset = x & 7; for (; *string; string++) - video_putchar(window, *string); + videoPutchar(window, *string); } -void SimonEngine::hitareaChangedHelper() { +void SimonEngine::resetNameWindow() { WindowBlock *window; - if (getGameType() == GType_SIMON2) { - if (getBitFlag(79)) - return; - } + if (getGameType() == GType_SIMON2 && getBitFlag(79)) + return; window = _windowArray[1]; if (window != NULL && window->text_color != 0) clearWindow(window); _lastNameOn = NULL; - _hitAreaPtr7 = NULL; + _lastVerbOn = NULL; } HitArea *SimonEngine::findHitAreaByID(uint hitarea_id) { @@ -574,7 +577,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) { if (getGameType() == GType_FF) { _marks = 0; checkUp(window); - loadSprite(4, 9 ,21 ,0 ,0, 0); + loadSprite(4, 9, 21, 0 ,0, 0); while(1) { if (_currentBoxNumber != 0x7FFB || !_leftButtonDown) break; @@ -690,7 +693,7 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) { void SimonEngine::displayName(HitArea *ha) { bool result; - hitareaChangedHelper(); + resetNameWindow(); if (ha->flags & 1) { result = printTextOf(ha->flags >> 8); } else { @@ -702,9 +705,6 @@ void SimonEngine::displayName(HitArea *ha) { } bool SimonEngine::printTextOf(uint a) { - uint x; - const byte *string_ptr; - if (getGameType() == GType_SIMON2) { if (getBitFlag(79)) { Subroutine *sub; @@ -719,21 +719,13 @@ bool SimonEngine::printTextOf(uint a) { if (a >= 20) return false; - string_ptr = getStringPtrByID(_stringIdArray2[a]); - // Arisme : hack for long strings in the French version - if ((strlen((const char*)string_ptr) - 1) <= 53) - x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; - else - x = 0; - showActionString(x, string_ptr); + showActionString(getStringPtrByID(_stringIdArray2[a])); return true; } bool SimonEngine::printNameOf(Item *item) { Child2 *child2; - uint x; - const byte *string_ptr; if (item == 0 || item == _dummyItem2 || item == _dummyItem3) return false; @@ -742,13 +734,7 @@ bool SimonEngine::printNameOf(Item *item) { if (child2 == NULL) return false; - string_ptr = getStringPtrByID(child2->string_id); - // Arisme : hack for long strings in the French version - if ((strlen((const char*)string_ptr) - 1) <= 53) - x = (53 - (strlen((const char *)string_ptr) - 1)) * 3; - else - x = 0; - showActionString(x, string_ptr); + showActionString(getStringPtrByID(child2->string_id)); return true; } |