mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
try to track the journal issue in spanish version
svn-id: r13382
This commit is contained in:
parent
997ccc6c05
commit
11ef1b614a
@ -34,14 +34,12 @@
|
||||
|
||||
namespace Queen {
|
||||
|
||||
|
||||
Journal::Journal(QueenEngine *vm)
|
||||
: _vm(vm) {
|
||||
_currentSavePage = 0;
|
||||
_currentSaveSlot = 0;
|
||||
}
|
||||
|
||||
|
||||
void Journal::use() {
|
||||
BobSlot *joe = _vm->graphics()->bob(0);
|
||||
_prevJoeX = joe->x;
|
||||
@ -97,7 +95,6 @@ void Journal::use() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::prepare() {
|
||||
_vm->display()->horizontalScroll(0);
|
||||
_vm->display()->fullscreen(true);
|
||||
@ -140,7 +137,6 @@ void Journal::prepare() {
|
||||
_vm->bankMan()->close(JOURNAL_BANK);
|
||||
}
|
||||
|
||||
|
||||
void Journal::restore() {
|
||||
_vm->display()->fullscreen(false);
|
||||
_vm->display()->forceFullRefresh();
|
||||
@ -152,7 +148,6 @@ void Journal::restore() {
|
||||
_vm->logic()->displayRoom(_vm->logic()->currentRoom(), RDM_FADE_JOE, 0, 0, false);
|
||||
}
|
||||
|
||||
|
||||
void Journal::redraw() {
|
||||
drawNormalPanel();
|
||||
drawConfigPanel();
|
||||
@ -160,7 +155,6 @@ void Journal::redraw() {
|
||||
drawSaveSlot();
|
||||
}
|
||||
|
||||
|
||||
void Journal::update() {
|
||||
_vm->graphics()->update(JOURNAL_ROOM);
|
||||
if (_edit.enable) {
|
||||
@ -172,19 +166,16 @@ void Journal::update() {
|
||||
_vm->display()->update();
|
||||
}
|
||||
|
||||
|
||||
void Journal::showBob(int bobNum, int16 x, int16 y, int frameNum) {
|
||||
BobSlot *bob = _vm->graphics()->bob(bobNum);
|
||||
bob->curPos(x, y);
|
||||
bob->frameNum = JOURNAL_FRAMES + frameNum;
|
||||
}
|
||||
|
||||
|
||||
void Journal::hideBob(int bobNum) {
|
||||
_vm->graphics()->bob(bobNum)->active = false;
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawSaveDescriptions() {
|
||||
int i;
|
||||
for (i = 0; i < SAVE_PER_PAGE; ++i) {
|
||||
@ -199,19 +190,16 @@ void Journal::drawSaveDescriptions() {
|
||||
showBob(BOB_SAVE_PAGE, 300, 3 + _currentSavePage * 15, 6 + _currentSavePage);
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawSaveSlot() {
|
||||
showBob(BOB_SAVE_DESC, 130, 6 + _currentSaveSlot * 13, 17);
|
||||
}
|
||||
|
||||
|
||||
void Journal::enterYesNoMode(int16 zoneNum, int titleNum) {
|
||||
_mode = M_YES_NO;
|
||||
_prevZoneNum = zoneNum;
|
||||
drawYesNoPanel(titleNum);
|
||||
}
|
||||
|
||||
|
||||
void Journal::exitYesNoMode() {
|
||||
_mode = M_NORMAL;
|
||||
if (_prevZoneNum == ZN_MAKE_ENTRY) {
|
||||
@ -221,7 +209,6 @@ void Journal::exitYesNoMode() {
|
||||
redraw();
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleNormalMode(int16 zoneNum, int x) {
|
||||
if (zoneNum == ZN_REVIEW_ENTRY) {
|
||||
enterYesNoMode(zoneNum, TXT_REVIEW_ENTRY);
|
||||
@ -269,13 +256,11 @@ void Journal::handleNormalMode(int16 zoneNum, int x) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleInfoBoxMode(int16 zoneNum) {
|
||||
hideInformationBox();
|
||||
_mode = M_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleYesNoMode(int16 zoneNum) {
|
||||
if (zoneNum == ZN_YES) {
|
||||
_mode = M_NORMAL;
|
||||
@ -312,7 +297,6 @@ void Journal::handleYesNoMode(int16 zoneNum) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleMouseWheel(int inc) {
|
||||
if (_mode == M_NORMAL) {
|
||||
int curSave = _currentSavePage * SAVE_PER_PAGE + _currentSaveSlot + inc;
|
||||
@ -326,7 +310,6 @@ void Journal::handleMouseWheel(int inc) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleMouseDown(int x, int y) {
|
||||
int16 zone = _vm->grid()->findZoneForPos(GS_ROOM, x, y);
|
||||
if (_mode == M_INFO_BOX) {
|
||||
@ -339,7 +322,6 @@ void Journal::handleMouseDown(int x, int y) {
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void Journal::handleKeyDown(uint16 ascii, int keycode) {
|
||||
if (_mode == M_YES_NO) {
|
||||
if (keycode == 27) { // escape
|
||||
@ -352,7 +334,6 @@ void Journal::handleKeyDown(uint16 ascii, int keycode) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::clearPanelTexts() {
|
||||
int i;
|
||||
for (i = 0; i < _panelTextCount; ++i) {
|
||||
@ -360,14 +341,15 @@ void Journal::clearPanelTexts() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawPanelText(int y, const char *text) {
|
||||
debug(5, "Journal::drawPanelText(%d, '%s')", y, text);
|
||||
char s[80];
|
||||
strcpy(s, text);
|
||||
char *p = strchr(s, ' ');
|
||||
if (p == NULL) {
|
||||
int x = (128 - _vm->display()->textWidth(s)) / 2;
|
||||
_vm->display()->setText(x, y, s, false);
|
||||
assert(_panelTextCount < MAX_PANEL_TEXTS);
|
||||
_panelTextY[_panelTextCount++] = y;
|
||||
} else {
|
||||
*p++ = '\0';
|
||||
@ -376,7 +358,6 @@ void Journal::drawPanelText(int y, const char *text) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawCheckBox(bool active, int bobNum, int16 x, int16 y, int frameNum) {
|
||||
if (active) {
|
||||
showBob(bobNum, x, y, frameNum);
|
||||
@ -385,12 +366,10 @@ void Journal::drawCheckBox(bool active, int bobNum, int16 x, int16 y, int frameN
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawSlideBar(int value, int hi, int lo, int bobNum, int16 x, int16 y, int frameNum) {
|
||||
showBob(bobNum, x + value * hi / lo, y, frameNum);
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawPanel(const int *frames, const int *titles, int n) {
|
||||
clearPanelTexts();
|
||||
_panelTextCount = 0;
|
||||
@ -403,14 +382,12 @@ void Journal::drawPanel(const int *frames, const int *titles, int n) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawNormalPanel() {
|
||||
int frames[] = { FRAME_BLUE_1, FRAME_BLUE_2, FRAME_BLUE_1, FRAME_ORANGE };
|
||||
int titles[] = { TXT_REVIEW_ENTRY, TXT_MAKE_ENTRY, TXT_CLOSE, TXT_GIVE_UP };
|
||||
drawPanel(frames, titles, 4);
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawYesNoPanel(int titleNum) {
|
||||
int frames[] = { FRAME_GREY, FRAME_BLUE_1, FRAME_BLUE_2 };
|
||||
int titles[] = { titleNum, TXT_YES, TXT_NO };
|
||||
@ -425,7 +402,6 @@ void Journal::drawYesNoPanel(int titleNum) {
|
||||
hideBob(BOB_MUSIC_TOGGLE);
|
||||
}
|
||||
|
||||
|
||||
void Journal::drawConfigPanel() {
|
||||
_vm->checkOptionSettings();
|
||||
|
||||
@ -438,7 +414,6 @@ void Journal::drawConfigPanel() {
|
||||
drawCheckBox(_vm->sound()->musicOn(), BOB_MUSIC_TOGGLE, 125, 181, FRAME_CHECK_BOX);
|
||||
}
|
||||
|
||||
|
||||
void Journal::showInformationBox() {
|
||||
_vm->display()->clearTexts(0, GAME_SCREEN_HEIGHT - 1);
|
||||
showBob(BOB_INFO_BOX, 72, 221, FRAME_INFO_BOX);
|
||||
@ -486,14 +461,12 @@ void Journal::showInformationBox() {
|
||||
_vm->display()->setTextCentered(156, versionId, false);
|
||||
}
|
||||
|
||||
|
||||
void Journal::hideInformationBox() {
|
||||
_vm->display()->clearTexts(0, GAME_SCREEN_HEIGHT - 1);
|
||||
hideBob(BOB_INFO_BOX);
|
||||
redraw();
|
||||
}
|
||||
|
||||
|
||||
void Journal::initEditBuffer(const char *desc) {
|
||||
_vm->_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
|
||||
_edit.enable = true;
|
||||
@ -503,7 +476,6 @@ void Journal::initEditBuffer(const char *desc) {
|
||||
strcpy(_edit.text, desc);
|
||||
}
|
||||
|
||||
|
||||
void Journal::updateEditBuffer(uint16 ascii, int keycode) {
|
||||
bool dirty = false;
|
||||
switch (keycode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user