summaryrefslogtreecommitdiff
path: root/games-puzzle/magiccube4d/files/magiccube4d-2.2-64bit-ptr.patch
blob: 7fbd52871887fcc25d188dc72f8ff02816273aa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -Nru magiccube4d-src-2_2.orig/EventHandler.cpp magiccube4d-src-2_2/EventHandler.cpp
--- magiccube4d-src-2_2.orig/EventHandler.cpp	2007-09-30 12:01:46.503967712 +0200
+++ magiccube4d-src-2_2/EventHandler.cpp	2007-09-30 12:03:23.489172011 +0200
@@ -20,6 +20,7 @@
 #include <iostream>
 #include <unistd.h>
 #include <stdio.h>
+#include <stdint.h>
 
 #include "MagicCube.h"
 #include "Puzzlest.h"
@@ -415,7 +416,7 @@
 void
 EventHandler::undo_cb(void* argp)
 {
-    int arg = (int) argp;
+    int arg = (intptr_t) argp;
     struct stickerspec grip;
     int         dir;
     int         slicesmask;
@@ -461,7 +462,7 @@
 void
 EventHandler::redo_cb(void* argp)
 {
-    int arg = (int) argp;
+    int arg = (intptr_t) argp;
     struct stickerspec grip;
     int         dir;
     int         slicesmask;
@@ -507,7 +508,7 @@
 void
 EventHandler::scramble_cb(void *arg = NULL)
 {
-    int n = (int)arg;
+    int n = (intptr_t)arg;
     struct stickerspec grip;
     int i, previous_face = -1;
     int ngrips = NFACES * 3 * 3 * 3;
@@ -855,12 +856,12 @@
 void
 EventHandler::newPuzzle_cb(void* arg)
 {
-    if ((int)arg == preferences.getLength())
+    if ((intptr_t)arg == preferences.getLength())
     {
         reset_cb(0);
         return;
     }
-    preferences.setLength((int)arg);
+    preferences.setLength((intptr_t)arg);
     int length = preferences.getLength();
 
     polymgr->reset(length);