[Pkg-nethack-devel] nethack/sys/wince Install.ce,1.1.1.1,1.2 mhdlg.c,1.1.1.1,1.2 mhtxtbuf.c,1.1.1.1,1.2 winhack.rc,1.1.1.1,1.2 winhcksp.rc,1.1.1.1,1.2

Joshua Kwan joshk-guest@quantz.debian.org
Tue, 09 Dec 2003 16:14:47 +0000


Update of /cvsroot/pkg-nethack/nethack/sys/wince
In directory quantz:/tmp/cvs-serv9687/sys/wince

Modified Files:
	Install.ce mhdlg.c mhtxtbuf.c winhack.rc winhcksp.rc 
Log Message:
Merge Nethack 3.4.3 upstream source.


Index: winhcksp.rc
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/wince/winhcksp.rc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- winhcksp.rc	7 Oct 2003 19:00:37 -0000	1.1.1.1
+++ winhcksp.rc	9 Dec 2003 16:14:44 -0000	1.2
@@ -268,17 +268,17 @@
     BEGIN
         BLOCK "040904b0"
         BEGIN
-            VALUE "Comments", "NetHack 3.4.2 for Smartphone 2002\0"
+            VALUE "Comments", "NetHack 3.4.3 for Smartphone 2002\0"
             VALUE "CompanyName", " \0"
             VALUE "FileDescription", "nethackm\0"
-            VALUE "FileVersion", "3, 4, 2, 0\0"
+            VALUE "FileVersion", "3, 4, 3, 0\0"
             VALUE "InternalName", "nethackm\0"
             VALUE "LegalCopyright", "Copyright © 2003\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "nethackm.exe\0"
-            VALUE "PrivateBuild", "030825\0"
+            VALUE "PrivateBuild", "031014\0"
             VALUE "ProductName", "NetHack For Smartphone\0"
-            VALUE "ProductVersion", "3, 4, 2, 0\0"
+            VALUE "ProductVersion", "3, 4, 3, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END

Index: Install.ce
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/wince/Install.ce,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Install.ce	7 Oct 2003 19:00:36 -0000	1.1.1.1
+++ Install.ce	9 Dec 2003 16:14:44 -0000	1.2
@@ -2,7 +2,7 @@
 NetHack may be freely redistributed.  See license for details.
 ========================================================================
                  Instructions for compiling and installing
-             NetHack 3.4.2 on a Windows CE or PocketPC system
+             NetHack 3.4.3 on a Windows CE or PocketPC system
 ========================================================================
 		      Last revision: $Date$
 

Index: mhdlg.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/wince/mhdlg.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- mhdlg.c	7 Oct 2003 19:00:36 -0000	1.1.1.1
+++ mhdlg.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -464,6 +464,20 @@
 	return FALSE;
 }
 
+void setComboBoxValue(HWND hWnd, int combo_box, int value)
+{
+	int index_max = SendDlgItemMessage(hWnd, combo_box, CB_GETCOUNT, 0, 0);
+	int index;
+	int value_to_set = LB_ERR;
+	for (index = 0; index < index_max; index++) {
+	    if (SendDlgItemMessage(hWnd, combo_box, CB_GETITEMDATA, (WPARAM)index, 0) == value) {
+		value_to_set = index;
+		break;
+	    }
+	}
+	SendDlgItemMessage(hWnd, combo_box, CB_SETCURSEL, (WPARAM)value_to_set, 0);
+}
+
 /* initialize player selector dialog */
 void plselInitDialog(HWND hWnd)
 {
@@ -497,7 +511,7 @@
 	} else {
 		CheckDlgButton(hWnd, IDC_PLSEL_ROLE_RANDOM, BST_UNCHECKED);
 		EnableWindow(GetDlgItem(hWnd, IDC_PLSEL_ROLE_LIST), TRUE);
-		SendDlgItemMessage(hWnd, IDC_PLSEL_ROLE_LIST, CB_SETCURSEL, (WPARAM)flags.initrole, 0);
+		setComboBoxValue(hWnd, IDC_PLSEL_ROLE_LIST, flags.initrole);
 	}
 
 	/* intialize races list */
@@ -507,7 +521,7 @@
 	} else {
 		CheckDlgButton(hWnd, IDC_PLSEL_RACE_RANDOM, BST_UNCHECKED);
 		EnableWindow(GetDlgItem(hWnd, IDC_PLSEL_RACE_LIST), TRUE);
-		SendDlgItemMessage(hWnd, IDC_PLSEL_RACE_LIST, CB_SETCURSEL, (WPARAM)flags.initrace, 0);
+		setComboBoxValue(hWnd, IDC_PLSEL_RACE_LIST, flags.initrace);
 	}
 
 	/* intialize genders list */
@@ -517,7 +531,7 @@
 	} else {
 		CheckDlgButton(hWnd, IDC_PLSEL_GENDER_RANDOM, BST_UNCHECKED);
 		EnableWindow(GetDlgItem(hWnd, IDC_PLSEL_GENDER_LIST), TRUE);
-		SendDlgItemMessage(hWnd, IDC_PLSEL_GENDER_LIST, CB_SETCURSEL, (WPARAM)flags.initgend, 0);
+		setComboBoxValue(hWnd, IDC_PLSEL_GENDER_LIST, flags.initgend);
 	}
 
 	/* intialize alignments list */
@@ -527,7 +541,7 @@
 	} else {
 		CheckDlgButton(hWnd, IDC_PLSEL_ALIGN_RANDOM, BST_UNCHECKED);
 		EnableWindow(GetDlgItem(hWnd, IDC_PLSEL_ALIGN_LIST), TRUE);
-		SendDlgItemMessage(hWnd, IDC_PLSEL_ALIGN_LIST, CB_SETCURSEL, (WPARAM)flags.initalign, 0);
+		setComboBoxValue(hWnd, IDC_PLSEL_ALIGN_LIST, flags.initalign);
 	}
 }
 

Index: mhtxtbuf.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/wince/mhtxtbuf.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- mhtxtbuf.c	7 Oct 2003 19:00:37 -0000	1.1.1.1
+++ mhtxtbuf.c	9 Dec 2003 16:14:44 -0000	1.2
@@ -234,4 +234,5 @@
 		free(pText);
 	}
 }
-/*----------------------------------------------------------------*/
\ No newline at end of file
+/*----------------------------------------------------------------*/
+

Index: winhack.rc
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/sys/wince/winhack.rc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- winhack.rc	7 Oct 2003 19:00:37 -0000	1.1.1.1
+++ winhack.rc	9 Dec 2003 16:14:44 -0000	1.2
@@ -299,17 +299,17 @@
     BEGIN
         BLOCK "040904b0"
         BEGIN
-            VALUE "Comments", "NetHack 3.4.2 for Windows CE\0"
+            VALUE "Comments", "NetHack 3.4.3 for Windows CE\0"
             VALUE "CompanyName", " \0"
             VALUE "FileDescription", "nethackm\0"
-            VALUE "FileVersion", "3, 4, 2, 0\0"
+            VALUE "FileVersion", "3, 4, 3, 0\0"
             VALUE "InternalName", "nethackm\0"
             VALUE "LegalCopyright", "Copyright © 2003\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "nethackm.exe\0"
-            VALUE "PrivateBuild", "030825\0"
+            VALUE "PrivateBuild", "031014\0"
             VALUE "ProductName", "NetHack\0"
-            VALUE "ProductVersion", "3, 4, 2, 0\0"
+            VALUE "ProductVersion", "3, 4, 3, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END