[Scummvm-cvs-logs] CVS: scummvm/queen journal.cpp,1.34,1.35

Gregory Montoir cyx at users.sourceforge.net
Thu Mar 25 13:52:12 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9412/queen

Modified Files:
	journal.cpp 
Log Message:
try to track the journal issue in spanish version

Index: journal.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- journal.cpp	9 Mar 2004 00:52:07 -0000	1.34
+++ journal.cpp	25 Mar 2004 21:40:35 -0000	1.35
@@ -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::prepare() {
 	_vm->display()->horizontalScroll(0);
 	_vm->display()->fullscreen(true);
@@ -140,7 +137,6 @@
 	_vm->bankMan()->close(JOURNAL_BANK);
 }
 
-
 void Journal::restore() {
 	_vm->display()->fullscreen(false);
 	_vm->display()->forceFullRefresh();
@@ -152,7 +148,6 @@
 	_vm->logic()->displayRoom(_vm->logic()->currentRoom(), RDM_FADE_JOE, 0, 0, false);
 }
 
-
 void Journal::redraw() {
 	drawNormalPanel();
 	drawConfigPanel();
@@ -160,7 +155,6 @@
 	drawSaveSlot();
 }
 
-
 void Journal::update() {
 	_vm->graphics()->update(JOURNAL_ROOM);
 	if (_edit.enable) {
@@ -172,19 +166,16 @@
 	_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 @@
 	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 @@
 	redraw();
 }
 
-
 void Journal::handleNormalMode(int16 zoneNum, int x) {
 	if (zoneNum == ZN_REVIEW_ENTRY) {
 		enterYesNoMode(zoneNum, TXT_REVIEW_ENTRY);
@@ -269,13 +256,11 @@
 	}
 }
 
-
 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::handleMouseWheel(int inc) {
 	if (_mode == M_NORMAL) {
 		int curSave = _currentSavePage * SAVE_PER_PAGE + _currentSaveSlot + inc;
@@ -326,7 +310,6 @@
 	}
 }
 
-
 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 @@
 	update();
 }
 
-
 void Journal::handleKeyDown(uint16 ascii, int keycode) {
 	if (_mode == M_YES_NO) {
 		if (keycode == 27) { // escape
@@ -352,7 +334,6 @@
 	}
 }
 
-
 void Journal::clearPanelTexts() {
 	int i;
 	for (i = 0; i < _panelTextCount; ++i) {
@@ -360,14 +341,15 @@
 	}
 }
 
-
 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::drawCheckBox(bool active, int bobNum, int16 x, int16 y, int frameNum) {
 	if (active) {
 		showBob(bobNum, x, y, frameNum);
@@ -385,12 +366,10 @@
 	}
 }
 
-
 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::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 @@
 	hideBob(BOB_MUSIC_TOGGLE);
 }
 
-
 void Journal::drawConfigPanel() {
 	_vm->checkOptionSettings();
 
@@ -438,7 +414,6 @@
 	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 @@
 	_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 @@
 	strcpy(_edit.text, desc);
 }
 
-
 void Journal::updateEditBuffer(uint16 ascii, int keycode) {
 	bool dirty = false;
 	switch (keycode) {





More information about the Scummvm-git-logs mailing list