diff options
| -rw-r--r-- | engines/touche/staticres.cpp | 36 | ||||
| -rw-r--r-- | engines/touche/touche.cpp | 5 | ||||
| -rw-r--r-- | engines/touche/touche.h | 6 | ||||
| -rw-r--r-- | engines/touche/ui.cpp | 70 | 
4 files changed, 67 insertions, 50 deletions
| diff --git a/engines/touche/staticres.cpp b/engines/touche/staticres.cpp index 82c2025fb5..4015ba68c3 100644 --- a/engines/touche/staticres.cpp +++ b/engines/touche/staticres.cpp @@ -16,7 +16,7 @@   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   *   * $URL$ - * $Id: $ + * $Id$   *   */ @@ -235,21 +235,25 @@ char ToucheEngine::_saveLoadDescriptionsTable[10][33] = {  	"[Empty.9.......................]"  }; -const Common::Rect ToucheEngine::_inventoryAreasTable[13] = { -	Common::Rect(  0, 354,  50, 400), -	Common::Rect( 66, 354, 124, 380), -	Common::Rect( 74, 380, 116, 398), -	Common::Rect(116, 380, 158, 398), -	Common::Rect(144, 354, 198, 380), -	Common::Rect(202, 354, 238, 396), -	Common::Rect(242, 354, 300, 396), -	Common::Rect(300, 354, 358, 396), -	Common::Rect(358, 354, 416, 396), -	Common::Rect(416, 354, 474, 396), -	Common::Rect(474, 354, 532, 396), -	Common::Rect(532, 354, 590, 396), -	Common::Rect(594, 354, 640, 395) -}; +void ToucheEngine::setupRect() { +	static const Common::Rect inventoryAreasTable[13] = { +		Common::Rect(  0, 354,  50, 400), +		Common::Rect( 66, 354, 124, 380), +		Common::Rect( 74, 380, 116, 398), +		Common::Rect(116, 380, 158, 398), +		Common::Rect(144, 354, 198, 380), +		Common::Rect(202, 354, 238, 396), +		Common::Rect(242, 354, 300, 396), +		Common::Rect(300, 354, 358, 396), +		Common::Rect(358, 354, 416, 396), +		Common::Rect(416, 354, 474, 396), +		Common::Rect(474, 354, 532, 396), +		Common::Rect(532, 354, 590, 396), +		Common::Rect(594, 354, 640, 395) +	}; + +	_inventoryAreasTable = inventoryAreasTable; +}  const uint16 Graphics::_fontOffs[] = {  	0x0000, 0x0007, 0x0024, 0x0043, 0x0072, 0x00AD, 0x00E0, 0x0113, 0x0124, 0x0141, diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index f037d7010c..721a2febc2 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -16,7 +16,7 @@   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   *   * $URL$ - * $Id: $ + * $Id$   *   */ @@ -64,7 +64,10 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)  	_fullRedrawCounter = 0;  	_redrawScreenCounter1 = 0;  	memset(_paletteBuffer, 0, sizeof(_paletteBuffer)); +  	setupOpcodes(); +	setupRect(); +	setupUIRect();  	Common::addSpecialDebugLevel(kDebugEngine,   "Engine",   "Engine debug level");  	Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level"); diff --git a/engines/touche/touche.h b/engines/touche/touche.h index 65b196aff6..c2076f68a2 100644 --- a/engines/touche/touche.h +++ b/engines/touche/touche.h @@ -16,7 +16,7 @@   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   *   * $URL$ - * $Id: $ + * $Id$   *   */ @@ -732,10 +732,12 @@ protected:  	static SpriteData _spritesTable[NUM_SPRITES];  	static const uint8 _directionsTable[];  	static char _saveLoadDescriptionsTable[10][33]; -	static const Common::Rect _inventoryAreasTable[13];  	const OpcodeProc *_opcodesTable; +	const Common::Rect *_inventoryAreasTable;  	void setupOpcodes(); +	void setupRect(); +	void setupUIRect();  };  /* diff --git a/engines/touche/ui.cpp b/engines/touche/ui.cpp index 997420345d..c95fb87631 100644 --- a/engines/touche/ui.cpp +++ b/engines/touche/ui.cpp @@ -16,7 +16,7 @@   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   *   * $URL$ - * $Id: $ + * $Id$   *   */ @@ -29,36 +29,44 @@  namespace Touche { -static const Common::Rect buttonsRectTable1[15] = { -	Common::Rect(108, 120, 444, 135), -	Common::Rect(108, 136, 444, 151), -	Common::Rect(108, 152, 444, 167), -	Common::Rect(108, 168, 444, 183), -	Common::Rect(108, 184, 444, 199), -	Common::Rect(108, 200, 444, 215), -	Common::Rect(108, 216, 444, 231), -	Common::Rect(108, 232, 444, 247), -	Common::Rect(108, 248, 444, 263), -	Common::Rect(108, 264, 444, 279), -	Common::Rect(452, 120, 546, 144), -	Common::Rect(452, 152, 546, 176), -	Common::Rect(452, 216, 546, 240), -	Common::Rect(452, 248, 546, 272), -	Common::Rect(452, 184, 546, 208) -}; - -static const Common::Rect buttonsRectTable2[10] = { -	Common::Rect(396, 130, 420, 154), -	Common::Rect(396, 160, 420, 184), -	Common::Rect(396, 190, 420, 214), -	Common::Rect(126, 130, 380, 154), -	Common::Rect(126, 160, 380, 184), -	Common::Rect(126, 190, 380, 214), -	Common::Rect(126, 250, 150, 274), -	Common::Rect(396, 250, 420, 274), -	Common::Rect(154, 256, 392, 268), -	Common::Rect(126, 222, 420, 242) -}; +static const Common::Rect *buttonsRectTable1; +static const Common::Rect *buttonsRectTable2; + +void ToucheEngine::setupUIRect() { +	static const Common::Rect inButtonsRectTable1[15] = { +		Common::Rect(108, 120, 444, 135), +		Common::Rect(108, 136, 444, 151), +		Common::Rect(108, 152, 444, 167), +		Common::Rect(108, 168, 444, 183), +		Common::Rect(108, 184, 444, 199), +		Common::Rect(108, 200, 444, 215), +		Common::Rect(108, 216, 444, 231), +		Common::Rect(108, 232, 444, 247), +		Common::Rect(108, 248, 444, 263), +		Common::Rect(108, 264, 444, 279), +		Common::Rect(452, 120, 546, 144), +		Common::Rect(452, 152, 546, 176), +		Common::Rect(452, 216, 546, 240), +		Common::Rect(452, 248, 546, 272), +		Common::Rect(452, 184, 546, 208) +	}; + +	static const Common::Rect inButtonsRectTable2[10] = { +		Common::Rect(396, 130, 420, 154), +		Common::Rect(396, 160, 420, 184), +		Common::Rect(396, 190, 420, 214), +		Common::Rect(126, 130, 380, 154), +		Common::Rect(126, 160, 380, 184), +		Common::Rect(126, 190, 380, 214), +		Common::Rect(126, 250, 150, 274), +		Common::Rect(396, 250, 420, 274), +		Common::Rect(154, 256, 392, 268), +		Common::Rect(126, 222, 420, 242) +	}; +	 +	buttonsRectTable1 = inButtonsRectTable1; +	buttonsRectTable2 = inButtonsRectTable2; +}  static int16 settingsMenuTextsTable[] = { 0, 0, 0, -92, -93, -94, -87, -88, 0, -91 }; | 
