[Scummvm-cvs-logs] SF.net SVN: scummvm: [21901] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Fri Apr 14 23:36:03 CEST 2006


Revision: 21901
Author:   kirben
Date:     2006-04-14 23:35:40 -0700 (Fri, 14 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21901&view=rev

Log Message:
-----------
Increase array sizes for FF and cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/simon/charset.cpp
    scummvm/trunk/engines/simon/items.cpp
    scummvm/trunk/engines/simon/saveload.cpp
    scummvm/trunk/engines/simon/simon.cpp
    scummvm/trunk/engines/simon/simon.h
Modified: scummvm/trunk/engines/simon/charset.cpp
===================================================================
--- scummvm/trunk/engines/simon/charset.cpp	2006-04-15 05:24:44 UTC (rev 21900)
+++ scummvm/trunk/engines/simon/charset.cpp	2006-04-15 06:35:40 UTC (rev 21901)
@@ -396,7 +396,7 @@
 	} else if ((c == 1 && _language != Common::HB_ISR) || (c == 8)) {
 		if (_language == Common::HB_ISR) { //Hebrew
 			if (b >= 64 && b < 91)
-				width = _hebrew_char_widths [b - 64];
+				width = _hebrewCharWidths [b - 64];
 
 			if (window->textLength != 0) {
 				window->textLength--;
@@ -434,7 +434,7 @@
 
 		if (_language == Common::HB_ISR) { //Hebrew
 			if (c >= 64 && c < 91)
-				width = _hebrew_char_widths [c - 64];
+				width = _hebrewCharWidths [c - 64];
 			window->textColumnOffset  -= width;
 			if (window->textColumnOffset >= width) {
 				window->textColumn++;

Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp	2006-04-15 05:24:44 UTC (rev 21900)
+++ scummvm/trunk/engines/simon/items.cpp	2006-04-15 06:35:40 UTC (rev 21901)
@@ -1018,7 +1018,7 @@
 void SimonEngine::o_defObj() {
 	// 121: set vga item
 	uint slot = getVarOrByte();
-	_vcItemArray[slot] = getNextItemPtr();
+	_objectArray[slot] = getNextItemPtr();
 }
 
 void SimonEngine::o_here() {
@@ -1197,12 +1197,12 @@
 	// 151: set array6 to item
 	uint var = getVarOrByte();
 	Item *item = getNextItemPtr();
-	_itemArray6[var] = item;
+	_itemStore[var] = item;
 }
 
 void SimonEngine::o_getItem() {
 	// 152: set m1 to m3 to array 6
-	Item *item = _itemArray6[getVarOrByte()];
+	Item *item = _itemStore[getVarOrByte()];
 	uint var = getVarOrByte();
 	if (var == 1) {
 		_subjectItem = item;

Modified: scummvm/trunk/engines/simon/saveload.cpp
===================================================================
--- scummvm/trunk/engines/simon/saveload.cpp	2006-04-15 05:24:44 UTC (rev 21900)
+++ scummvm/trunk/engines/simon/saveload.cpp	2006-04-15 06:35:40 UTC (rev 21901)
@@ -240,7 +240,7 @@
 			if (_language == Common::HB_ISR) { //Hebrew
 				byte width = 6;
 				if (name[name_len] >= 64 && name[name_len] < 91)
-					width = _hebrew_char_widths [name[name_len] - 64];
+					width = _hebrewCharWidths [name[name_len] - 64];
 				window->textLength++;
 				window->textColumnOffset -= width;
 				if (window->textColumnOffset < width) {
@@ -554,7 +554,7 @@
 
 	// write the items in array 6
 	for (i = 0; i != 10; i++) {
-		f->writeUint16BE(itemPtrToID(_itemArray6[i]));
+		f->writeUint16BE(itemPtrToID(_itemStore[i]));
 	}
 
 	// Write the bits in array 1 & 2
@@ -684,7 +684,7 @@
 
 	// read the items in array 6
 	for (i = 0; i != 10; i++) {
-		_itemArray6[i] = derefItem(f->readUint16BE());
+		_itemStore[i] = derefItem(f->readUint16BE());
 	}
 
 	// Read the bits in array 1 & 2

Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-04-15 05:24:44 UTC (rev 21900)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-04-15 06:35:40 UTC (rev 21901)
@@ -388,8 +388,8 @@
 
 	_nextVgaTimerToProcess = 0;
 
-	memset(_vcItemArray, 0, sizeof(_vcItemArray));
-	memset(_itemArray6, 0, sizeof(_itemArray6));
+	memset(_objectArray, 0, sizeof(_objectArray));
+	memset(_itemStore, 0, sizeof(_itemStore));
 
 	memset(_stringIdArray2, 0, sizeof(_stringIdArray2));
 	memset(_stringIdArray3, 0, sizeof(_stringIdArray3));
@@ -462,7 +462,7 @@
 	_sdl_buf_scaled = 0;
 
 	_vc10BasePtrOld = 0;
-	memcpy (_hebrew_char_widths,
+	memcpy (_hebrewCharWidths,
 		"\x5\x5\x4\x6\x5\x3\x4\x5\x6\x3\x5\x5\x4\x6\x5\x3\x4\x6\x5\x6\x6\x6\x5\x5\x5\x6\x5\x6\x6\x6\x6\x6", 32);
 
 
@@ -2788,9 +2788,9 @@
 bool SimonEngine::itemIsSiblingOf(uint16 a) {
 	Item *item;
 
-	CHECK_BOUNDS(a, _vcItemArray);
+	CHECK_BOUNDS(a, _objectArray);
 
-	item = _vcItemArray[a];
+	item = _objectArray[a];
 	if (item == NULL)
 		return true;
 
@@ -2800,11 +2800,11 @@
 bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
 	Item *item_a, *item_b;
 
-	CHECK_BOUNDS(a, _vcItemArray);
-	CHECK_BOUNDS(b, _vcItemArray);
+	CHECK_BOUNDS(a, _objectArray);
+	CHECK_BOUNDS(b, _objectArray);
 
-	item_a = _vcItemArray[a];
-	item_b = _vcItemArray[b];
+	item_a = _objectArray[a];
+	item_b = _objectArray[b];
 
 	if (item_a == NULL || item_b == NULL)
 		return true;
@@ -2815,9 +2815,9 @@
 bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
 	Item *item;
 
-	CHECK_BOUNDS(a, _vcItemArray);
+	CHECK_BOUNDS(a, _objectArray);
 
-	item = _vcItemArray[a];
+	item = _objectArray[a];
 	if (item == NULL)
 		return true;
 	return item->state == b;

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-15 05:24:44 UTC (rev 21900)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-15 06:35:40 UTC (rev 21901)
@@ -375,18 +375,18 @@
 
 	VgaTimerEntry *_nextVgaTimerToProcess;
 
-	Item *_vcItemArray[20];
-	Item *_itemArray6[20];
+	Item *_objectArray[20];
+	Item *_itemStore[20];
 
-	uint16 _stringIdArray2[20];
-	uint16 _stringIdArray3[20];
-	uint16 _speechIdArray4[20];
+	uint16 _stringIdArray2[40];
+	uint16 _stringIdArray3[40];
+	uint16 _speechIdArray4[40];
 
 	uint16 _bitArray[48];
 	int16 _variableArray[256];
 	int16 _variableArray2[256];
 
-	WindowBlock *_windowArray[8];
+	WindowBlock *_windowArray[16];
 
 	byte _fcsData1[8];
 	bool _fcsData2[8];
@@ -397,11 +397,11 @@
 
 	byte _stringReturnBuffer[2][180];
 
-	HitArea _hitAreas[90];
+	HitArea _hitAreas[250];
 
 	VgaPointersEntry _vgaBufferPointers[450];
 	VgaSprite _vgaSprites[180];
-	VgaSleepStruct _vgaSleepStructs[30];
+	VgaSleepStruct _vgaSleepStructs[60];
 
 	const uint16 *_pathFindArray[100];
 
@@ -447,7 +447,7 @@
 	bool _saveLoadFlag;
 
 	byte _saveLoadType, _saveLoadSlot;
-	char _saveLoadName[32];
+	char _saveLoadName[108];
 
 	int _sdlMouseX, _sdlMouseY;
 
@@ -459,7 +459,7 @@
 	Common::RandomSource _rnd;
 
 	const byte *_vc10BasePtrOld;
-	byte _hebrew_char_widths[32];
+	byte _hebrewCharWidths[32];
 
 public:
 	SimonEngine(OSystem *syst);


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