summaryrefslogtreecommitdiff
blob: b7cb4a7eaf0a505660eb46947c9c417318262a3c (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--- src/clone/mpq.c.old	2006-05-27 12:13:54.000000000 +0200
+++ src/clone/mpq.c	2006-05-27 12:16:51.000000000 +0200
@@ -106,9 +106,9 @@
 extern const unsigned char dcl_table[];
 local UInt8 *explode_buffer;
 
-extern const UInt8 wav_table[2512];
-extern const UInt32 small_tbl1[90];
-extern const UInt32 small_tbl2[32];
+local const UInt8 wav_table[2512];
+local const UInt32 small_tbl1[90];
+local const UInt32 small_tbl2[32];
 
 local UInt32 offset_mpq;		/// Offset to MPQ file data
 local UInt32 offset_htbl;		/// Offset to hash_table of MPQ
--- src/clone/scm.c.old	2006-05-27 12:17:38.000000000 +0200
+++ src/clone/scm.c	2006-05-27 12:37:29.000000000 +0200
@@ -165,7 +165,9 @@
 */
 local inline int ChkReadByte(void)
 {
-    return *((unsigned char*)chk_ptr)++;
+    int r = *(unsigned char *)chk_ptr;
+    chk_ptr = ((unsigned char *)chk_ptr) + 1;
+    return r;
 }
 
 /**
--- src/unit/unittype.c.old	2006-05-27 12:28:11.000000000 +0200
+++ src/unit/unittype.c	2006-05-27 12:46:31.000000000 +0200
@@ -266,7 +266,7 @@
 }
 
     /// Macro to fetch an 8bit value, to have some looking 8/16/32 bit funcs.
-#define Fetch8(p)   (*((unsigned char*)(p))++)
+#define Fetch8(p)   (*((unsigned char*)(p))); p = ((unsigned char*)(p)) + 1
 
 /**
 **	Parse UDTA area from puds.
--- src/video/linedraw.c.old	2006-05-27 12:46:57.000000000 +0200
+++ src/video/linedraw.c	2006-05-27 12:47:56.000000000 +0200
@@ -1432,7 +1432,8 @@
     f=((unsigned long)Pixels16[color]<<16)|Pixels16[color];
 
     while( p<e ) {			// draw 2 pixels
-	*((unsigned long*)p)++=f;
+	*((unsigned long*)p)=f;
+	p=((unsigned long*)p)+1;
     }
 
     if( p<=e ) {
--- src/include/myendian.h.old	2006-05-27 12:29:53.000000000 +0200
+++ src/include/myendian.h	2006-05-27 12:45:29.000000000 +0200
@@ -85,8 +85,6 @@
 **	Fetch a 16 bit value in little endian with incrementing pointer
 **	and return it in native format.
 */
-#ifdef __ULTRA_SPARC__
-
 extern unsigned short inline _FetchLE16(unsigned char **pp) {
     unsigned char *p = *pp;
     unsigned short i = p[0] + (p[1] << 8);
@@ -95,18 +93,10 @@
 }
 #define FetchLE16(p)    _FetchLE16(&p)
 
-#else
-
-#define	FetchLE16(p)	SDL_SwapLE16(*((unsigned short*)(p))++)
-
-#endif
-
 /**
 **	Fetch a 32 bit value in little endian with incrementing pointer
 **	and return it in native format.
 */
-#ifdef __ULTRA_SPARC__
-
 extern unsigned inline _FetchLE32(unsigned char **pp) {
     unsigned char *p = *pp;
     unsigned int i = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] <<24);
@@ -115,12 +105,6 @@
 }
 #define FetchLE32(p)    _FetchLE32(&p)
 
-#else
-
-#define	FetchLE32(p)	SDL_SwapLE32(*((unsigned int*)(p))++)
-
-#endif
-
 // ============================================================================
 #else		// }{ SDL
 // ============================================================================