[Scummvm-cvs-logs] CVS: scummvm/simon charset.cpp,1.18,1.19 items.cpp,1.93,1.94 simon.cpp,1.315,1.316 simon.h,1.91,1.92

Travis Howell kirben at users.sourceforge.net
Mon Oct 20 23:39:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv24975/simon

Modified Files:
	charset.cpp items.cpp simon.cpp simon.h 
Log Message:

Fix text spacing when backspace key is used when entering save game name in Hebrew version. Need to pass along last character printed, so correct spacing can be used.


Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/charset.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- charset.cpp	21 Oct 2003 05:48:32 -0000	1.18
+++ charset.cpp	21 Oct 2003 06:35:19 -0000	1.19
@@ -210,7 +210,7 @@
 	_num_letters_to_print = 0;
 }
 
-void SimonEngine::video_putchar(FillOrCopyStruct *fcs, byte c) {
+void SimonEngine::video_putchar(FillOrCopyStruct *fcs, byte c, byte b) {
 	byte width = 6;
 
 	if (c == 0xC) {
@@ -219,8 +219,8 @@
 		video_putchar_newline(fcs);
 	} else if ((c == 1 && _language != 20) || (c == 8)) {
 		if (_language == 20) { //Hebrew
-			if (c >= 64 && c < 91)
-				width = _hebrew_char_widths [c-64];
+			if (b >= 64 && b < 91)
+				width = _hebrew_char_widths [b - 64];
 
 			if (fcs->textLength != 0) {
 				fcs->textLength--;			
@@ -252,7 +252,7 @@
 
 		if (_language == 20) { //Hebrew
 			if (c >= 64 && c < 91)
-				width = _hebrew_char_widths [c-64];
+				width = _hebrew_char_widths [c - 64];
 			fcs->textColumnOffset  -= width;
 			if (fcs->textColumnOffset >= width) {
 				fcs->textColumn++;

Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- items.cpp	3 Oct 2003 19:42:27 -0000	1.93
+++ items.cpp	21 Oct 2003 06:35:19 -0000	1.94
@@ -1485,10 +1485,10 @@
 		set_hitarea_bit_0x40(i);
 }
 
-void SimonEngine::o_unk_132_helper_2(FillOrCopyStruct *fcs, int x) {
+void SimonEngine::o_unk_132_helper_2(FillOrCopyStruct *fcs, int x, byte b) {
 	byte old_text;
 
-	video_putchar(fcs, x);
+	video_putchar(fcs, x, b);
 	old_text = fcs->text_color;
 	fcs->text_color = fcs->fill_color;
 

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- simon.cpp	18 Oct 2003 00:22:46 -0000	1.315
+++ simon.cpp	21 Oct 2003 06:35:19 -0000	1.316
@@ -2749,7 +2749,7 @@
 			if (_language == 20) { //Hebrew
 				byte width = 6;
 				if (name[name_len] >= 64 && name[name_len] < 91)
-					width = _hebrew_char_widths [name[name_len]-64];
+					width = _hebrew_char_widths [name[name_len] - 64];
 				fcs->textLength++;
 				fcs->textColumnOffset -= width;
 				if (fcs->textColumnOffset < width) {
@@ -2806,8 +2806,10 @@
 				// do_backspace
 				if (name_len != 0) {
 					int x;
+					byte b;
 
 					name_len--;
+					b = name[name_len];
 
 					if (_language == 20) //Hebrew
 						x = 8;
@@ -2816,7 +2818,7 @@
 
 					name[name_len] = 0;
 
-					o_unk_132_helper_2(_fcs_ptr_array_3[5], x);
+					o_unk_132_helper_2(_fcs_ptr_array_3[5], x, b);
 				}
 			} else if (i >= 32 && name_len != 17) {
 				name[name_len++] = i;

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- simon.h	8 Oct 2003 07:38:48 -0000	1.91
+++ simon.h	21 Oct 2003 06:35:19 -0000	1.92
@@ -526,7 +526,7 @@
 	HitArea *findHitAreaByID(uint hitarea_id);
 
 	void showActionString(uint x, const byte *string);
-	void video_putchar(FillOrCopyStruct *fcs, byte c);
+	void video_putchar(FillOrCopyStruct *fcs, byte c, byte b = 0);
 	void video_fill_or_copy_from_3_to_2(FillOrCopyStruct *fcs);
 	void video_toggle_colors(HitArea * ha, byte a, byte b, byte c, byte d);
 
@@ -788,7 +788,7 @@
 	void save_or_load_dialog(bool load);
 	void o_unk_132_helper_3();
 	int o_unk_132_helper(bool *b, char *buf);
-	void o_unk_132_helper_2(FillOrCopyStruct *fcs, int x);
+	void o_unk_132_helper_2(FillOrCopyStruct *fcs, int x, byte b = 0);
 	void savegame_dialog(char *buf);
 
 	int count_savegames();





More information about the Scummvm-git-logs mailing list