1 |
nyhm 07/11/02 21:57:15 |
2 |
|
3 |
Added: amphetamine-0.8.10-64bit.patch |
4 |
Removed: amphetamine-0.8.10-gentoo.patch |
5 |
020_assumed_sizeof_long.diff |
6 |
Log: |
7 |
patching goes in src_unpack |
8 |
(Portage version: 2.1.3.16) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 games-arcade/amphetamine/files/amphetamine-0.8.10-64bit.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/amphetamine/files/amphetamine-0.8.10-64bit.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/amphetamine/files/amphetamine-0.8.10-64bit.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: amphetamine-0.8.10-64bit.patch |
17 |
=================================================================== |
18 |
--- amphetamine-0.8.10.orig/src/Shape.cpp |
19 |
+++ amphetamine-0.8.10/src/Shape.cpp |
20 |
@@ -56,12 +56,12 @@ |
21 |
*/ |
22 |
#ifdef __OPT_MEM_ACCESS__ |
23 |
|
24 |
-#define GET_LONG(adr) *(unsigned long *)adr |
25 |
-#define SET_LONG(adr, l) *(unsigned long *)adr = l |
26 |
+#define GET_LONG(adr) *(uint32_t *)adr |
27 |
+#define SET_LONG(adr, l) *(uint32_t *)adr = l |
28 |
|
29 |
#else |
30 |
|
31 |
-#define GET_LONG(adr) ((long)((unsigned char *)(adr))[0] << 24) + ((long)((unsigned char *)(adr))[1] << 16) + ((long)((unsigned char *)(adr))[2] << 8) + ((long)((unsigned char *)(adr))[3]) |
32 |
+#define GET_LONG(adr) ((uint32_t)((unsigned char *)(adr))[0] << 24) + ((uint32_t)((unsigned char *)(adr))[1] << 16) + ((uint32_t)((unsigned char *)(adr))[2] << 8) + ((uint32_t)((unsigned char *)(adr))[3]) |
33 |
#define SET_LONG(adr, l) ((unsigned char *)adr)[0] = (unsigned char)((l) >> 24); \ |
34 |
((unsigned char *)adr)[1] = (unsigned char)((l) >> 16); \ |
35 |
((unsigned char *)adr)[2] = (unsigned char)((l) >> 8); \ |
36 |
@@ -116,7 +116,7 @@ |
37 |
{ |
38 |
// store the location of this line start |
39 |
lineStartPtr = destPtr; |
40 |
- destPtr += sizeof( unsigned long ); |
41 |
+ destPtr += sizeof( uint32_t ); |
42 |
|
43 |
// at the beginning of each row we are not in any run |
44 |
drawRunFlag = kFalse; |
45 |
@@ -160,7 +160,7 @@ |
46 |
// create the skip token |
47 |
//*( ( unsigned long * )destPtr ) = ( kSkipPixelsToken << 24 ) + runCounter; |
48 |
SET_LONG(destPtr, ( kSkipPixelsToken << 24 ) + runCounter); |
49 |
- destPtr += sizeof( unsigned long ); |
50 |
+ destPtr += sizeof( uint32_t ); |
51 |
} |
52 |
|
53 |
// are we in a draw run |
54 |
@@ -179,7 +179,7 @@ |
55 |
|
56 |
// save the location of the token (so we can fill it in later) |
57 |
runTokenPtr = destPtr; |
58 |
- destPtr += sizeof( unsigned long ); |
59 |
+ destPtr += sizeof( uint32_t ); |
60 |
|
61 |
// copy the pixel |
62 |
*destPtr = *srcPtr; |
63 |
@@ -215,7 +215,7 @@ |
64 |
|
65 |
// create the end of shape token |
66 |
SET_LONG(destPtr, kEndShapeToken << 24); |
67 |
- destPtr += sizeof( unsigned long ); |
68 |
+ destPtr += sizeof( uint32_t ); |
69 |
|
70 |
// Resize the handle to match the real size of the shape |
71 |
//SetHandleSize( shapeHandle, destPtr - ( unsigned char * )( *shapeHandle ) ); |
72 |
@@ -280,7 +280,7 @@ |
73 |
// get a token |
74 |
tokenOp = GET_LONG(srcPtr ) >> 24; |
75 |
tokenData = GET_LONG(srcPtr ) & 0x00ffffff; |
76 |
- srcPtr += sizeof( unsigned long ); |
77 |
+ srcPtr += sizeof( uint32_t ); |
78 |
|
79 |
// depending on the token |
80 |
switch( tokenOp ) |
81 |
@@ -435,7 +435,7 @@ |
82 |
// get a token |
83 |
tokenOp = GET_LONG(srcPtr) >> 24; |
84 |
tokenData = GET_LONG(srcPtr) & 0x00ffffff; |
85 |
- srcPtr += sizeof( unsigned long ); |
86 |
+ srcPtr += sizeof( uint32_t ); |
87 |
|
88 |
// depending on the token |
89 |
switch( tokenOp ) |
90 |
|
91 |
|
92 |
|
93 |
-- |
94 |
gentoo-commits@g.o mailing list |