[MAZE*]
authorDaniel Reimer <reimer.daniel@freenet.de>
Sat, 16 May 2015 21:00:03 +0000 (21:00 +0000)
committerDaniel Reimer <reimer.daniel@freenet.de>
Sat, 16 May 2015 21:00:03 +0000 (21:00 +0000)
Loading from ini file works flawless, even on ROS, so... ENABLE it.

svn path=/trunk/; revision=67788

rosapps/applications/screensavers/mazescr/maze.c
rosapps/demos/maze/maze.c

index 567042c..2015c65 100644 (file)
@@ -524,18 +524,10 @@ static BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
 
     srand((unsigned) time(NULL));
 
 
     srand((unsigned) time(NULL));
 
-#if 0
-    /* FIXME GetPrivateProfileInt not yet implemented in ReactOS */
-    size = GetPrivateProfileInt("maze", "gridsize", 0, "maze.ini");
-    pre_solve_delay = GetPrivateProfileInt("maze", "predelay", 5000, "maze.ini");
-    post_solve_delay = GetPrivateProfileInt("maze", "postdelay", 5000, "maze.ini");
-    solve_delay = GetPrivateProfileInt("maze", "solvedelay", 10, "maze.ini");
-#else
-    size = 10;
-    pre_solve_delay = 5000;
-    post_solve_delay = 5000;
-    solve_delay = 1;
-#endif
+    size = GetPrivateProfileIntW(L"maze", L"gridsize", 10, L"maze.ini");
+    pre_solve_delay = GetPrivateProfileIntW(L"maze", L"predelay", 5000, L"maze.ini");
+    post_solve_delay = GetPrivateProfileIntW(L"maze", L"postdelay", 5000, L"maze.ini");
+    solve_delay = GetPrivateProfileIntW(L"maze", L"solvedelay", 1, L"maze.ini");
 
     if (size < 2) {
         size = 7 + (rand() % 30);
 
     if (size < 2) {
         size = 7 + (rand() % 30);
index 105dd72..a2f3300 100644 (file)
@@ -830,21 +830,10 @@ OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
 
        srand((unsigned) time(NULL));
 
 
        srand((unsigned) time(NULL));
 
-#if 0
-       /* FIXME GetPrivateProfileInt not yet implemented in ReactOS */
-       size = GetPrivateProfileInt("maze", "gridsize", 0, "maze.ini");
-       pre_solve_delay = GetPrivateProfileInt("maze", "predelay", 5000,
-                                              "maze.ini");
-       post_solve_delay = GetPrivateProfileInt("maze", "postdelay", 5000,
-                                               "maze.ini");
-       solve_delay = GetPrivateProfileInt("maze", "solvedelay", 10,
-                                          "maze.ini");
-#else
-       size = 10;
-       pre_solve_delay = 5000;
-       post_solve_delay = 5000;
-       solve_delay = 20;
-#endif
+       size = GetPrivateProfileIntA("maze", "gridsize", 10, "maze.ini");
+       pre_solve_delay = GetPrivateProfileIntA("maze", "predelay", 5000, "maze.ini");
+       post_solve_delay = GetPrivateProfileIntA("maze", "postdelay", 5000, "maze.ini");
+       solve_delay = GetPrivateProfileIntA("maze", "solvedelay", 1, "maze.ini");
 
        if (size < 2) {
                size = 7 + (rand() % 30);
 
        if (size < 2) {
                size = 7 + (rand() % 30);