[Scummvm-cvs-logs] SF.net SVN: scummvm: [28690] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Aug 21 20:07:18 CEST 2007


Revision: 28690
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28690&view=rev
Author:   thebluegr
Date:     2007-08-21 11:07:17 -0700 (Tue, 21 Aug 2007)

Log Message:
-----------
The button sprites of the warnings dialogs of IHNM are loaded correctly now. Also, the save file slider is shown correctly now (although it still needs some tweaking, as its virtual height is still the same as in ITE)

Modified Paths:
--------------
    scummvm/trunk/engines/saga/detection_tables.h
    scummvm/trunk/engines/saga/interface.cpp
    scummvm/trunk/engines/saga/saga.h
    scummvm/trunk/engines/saga/sagaresnames.h

Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h	2007-08-21 18:04:47 UTC (rev 28689)
+++ scummvm/trunk/engines/saga/detection_tables.h	2007-08-21 18:07:17 UTC (rev 28690)
@@ -34,6 +34,7 @@
 	RID_ITE_CONVERSE_PANEL,
 	RID_ITE_OPTION_PANEL,
 	0,					// Warning panel (IHNM only)
+	0,					// Warning panel sprites (IHNM only)
 	RID_ITE_MAIN_SPRITES,
 	RID_ITE_MAIN_PANEL_SPRITES,
 	0,					// Option panel sprites (IHNM only)
@@ -50,6 +51,7 @@
 	RID_ITEDEMO_CONVERSE_PANEL,
 	RID_ITEDEMO_OPTION_PANEL,
 	0,						// Warning panel (IHNM only)
+	0,						// Warning panel sprites (IHNM only)
 	RID_ITEDEMO_MAIN_SPRITES,
 	RID_ITEDEMO_MAIN_PANEL_SPRITES,
 	0,						// Option panel sprites (IHNM only)
@@ -248,6 +250,7 @@
 	RID_IHNM_CONVERSE_PANEL,
 	RID_IHNM_OPTION_PANEL,
 	RID_IHNM_WARNING_PANEL,
+	RID_IHNM_WARNING_PANEL_SPRITES,
 	RID_IHNM_MAIN_SPRITES,
 	RID_IHNM_MAIN_PANEL_SPRITES,
 	RID_IHNM_OPTION_PANEL_SPRITES,
@@ -264,6 +267,7 @@
 	RID_IHNMDEMO_CONVERSE_PANEL,
 	RID_IHNMDEMO_OPTION_PANEL,
 	RID_IHNMDEMO_WARNING_PANEL,
+	RID_IHNMDEMO_WARNING_PANEL_SPRITES,
 	RID_IHNMDEMO_MAIN_SPRITES,
 	RID_IHNMDEMO_MAIN_PANEL_SPRITES,
 	RID_IHNMDEMO_OPTION_PANEL_SPRITES,

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2007-08-21 18:04:47 UTC (rev 28689)
+++ scummvm/trunk/engines/saga/interface.cpp	2007-08-21 18:07:17 UTC (rev 28690)
@@ -229,6 +229,12 @@
 	_vm->_sprite->loadList(_vm->getResourceDescription()->mainPanelSpritesResourceId, _mainPanel.sprites);
 	// Option panel sprites
 	_vm->_sprite->loadList(_vm->getResourceDescription()->optionPanelSpritesResourceId, _optionPanel.sprites);
+	// Save panel sprites
+	_vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _savePanel.sprites);
+	// Load panel sprites
+	_vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _loadPanel.sprites);
+	// Quit panel sprites
+	_vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _quitPanel.sprites);
 
 	if (_vm->getGameType() == GType_ITE) {
 		_vm->_sprite->loadList(_vm->getResourceDescription()->defaultPortraitsResourceId, _defPortraits);
@@ -921,6 +927,7 @@
 	PanelButton *panelButton;
 	Point textPoint;
 	Point point;
+	Point sliderPoint;
 	int spritenum = 0;
 
 	backBuffer = _vm->_gfx->getBackBuffer();
@@ -949,8 +956,16 @@
 			backBuffer->drawRect(_optionSaveRectTop, kITEColorDarkGrey);
 	}
 
-	drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+	if (_vm->getGameType() == GType_ITE) {
+		drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+	} else {
+		panelButton = &_optionPanel.buttons[0];
+		sliderPoint.x = _optionPanel.x + panelButton->xOffset;
+		sliderPoint.y = _optionSaveRectSlider.top;
+		_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _optionPanel.sprites, 0 + _optionSaveFileSlider->state, sliderPoint, 256);
 
+	}
+
 	if (_optionSaveRectBottom.height() > 0) {
 		backBuffer->drawRect(_optionSaveRectBottom, kITEColorDarkGrey);
 	}
@@ -2245,21 +2260,25 @@
 		litButton = panelButton->state > 0;
 
 		if (panel == &_optionPanel) {
-			texturePoint.x = _optionPanel.x + panelButton->xOffset;
-			texturePoint.y = _optionPanel.y + panelButton->yOffset;
+			texturePoint.x = _optionPanel.x + panelButton->xOffset - 1;
+			texturePoint.y = _optionPanel.y + panelButton->yOffset - 1;
 			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, spritenum + 2 + litButton, texturePoint, 256);
 		} else if (panel == &_quitPanel) {
-			texturePoint.x = _quitPanel.x + panelButton->xOffset;
-			texturePoint.y = _quitPanel.y + panelButton->yOffset;
-			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+			texturePoint.x = _quitPanel.x + panelButton->xOffset - 3;
+			texturePoint.y = _quitPanel.y + panelButton->yOffset - 3;
+			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _quitPanel.sprites, litButton, texturePoint, 256);
 		} else if (panel == &_savePanel) {
-			texturePoint.x = _savePanel.x + panelButton->xOffset;
-			texturePoint.y = _savePanel.y + panelButton->yOffset;
-			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+			texturePoint.x = _savePanel.x + panelButton->xOffset - 3;
+			texturePoint.y = _savePanel.y + panelButton->yOffset - 3;
+			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, litButton, texturePoint, 256);
+			// Input text box sprite
+			texturePoint.x = _savePanel.x + _saveEdit->xOffset - 2;
+			texturePoint.y = _savePanel.y + _saveEdit->yOffset - 2;
+			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, 2, texturePoint, 256);
 		} else if (panel == &_loadPanel) {
-			texturePoint.x = _loadPanel.x + panelButton->xOffset;
-			texturePoint.y = _loadPanel.y + panelButton->yOffset;
-			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+			texturePoint.x = _loadPanel.x + panelButton->xOffset - 3;
+			texturePoint.y = _loadPanel.y + panelButton->yOffset - 3;
+			_vm->_sprite->draw(ds, _vm->getDisplayClip(), _loadPanel.sprites, litButton, texturePoint, 256);
 		} else {
 			// revert to default behavior
 			drawButtonBox(ds, rect, kButton, panelButton->state > 0);

Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h	2007-08-21 18:04:47 UTC (rev 28689)
+++ scummvm/trunk/engines/saga/saga.h	2007-08-21 18:07:17 UTC (rev 28690)
@@ -297,6 +297,7 @@
 	uint32 conversePanelResourceId;
 	uint32 optionPanelResourceId;
 	uint32 warningPanelResourceId;
+	uint32 warningPanelSpritesResourceId;
 	uint32 mainSpritesResourceId;
 	uint32 mainPanelSpritesResourceId;
 	uint32 optionPanelSpritesResourceId;

Modified: scummvm/trunk/engines/saga/sagaresnames.h
===================================================================
--- scummvm/trunk/engines/saga/sagaresnames.h	2007-08-21 18:04:47 UTC (rev 28689)
+++ scummvm/trunk/engines/saga/sagaresnames.h	2007-08-21 18:07:17 UTC (rev 28690)
@@ -108,6 +108,7 @@
 #define RID_IHNM_OPTION_PANEL 15
 #define RID_IHNM_OPTION_PANEL_SPRITES 16
 #define RID_IHNM_WARNING_PANEL 17
+#define RID_IHNM_WARNING_PANEL_SPRITES 18
 #define RID_IHNM_BOSS_SCREEN 19
 #define RID_IHNM_PROFILE_BG 20
 #define RID_IHNM_MAIN_STRINGS 21
@@ -122,7 +123,8 @@
 #define RID_IHNMDEMO_OPTION_PANEL 10
 #define RID_IHNMDEMO_OPTION_PANEL_SPRITES 11
 #define RID_IHNMDEMO_WARNING_PANEL 12
-#define RID_IHNMDEMO_BOSS_SCREEN 13				// Does not exist in the demo
+#define RID_IHNMDEMO_WARNING_PANEL_SPRITES 13
+#define RID_IHNMDEMO_BOSS_SCREEN 14				// Does not exist in the demo
 #define RID_IHNMDEMO_PROFILE_BG 15
 #define RID_IHNMDEMO_MAIN_STRINGS 16
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list