]>
Commit | Line | Data |
---|---|---|
dfa19a77 JB |
1 | --- HElliZER-1.0/3d.cpp.orig 1999-12-21 05:47:30.000000000 +0100 |
2 | +++ HElliZER-1.0/3d.cpp 2006-05-20 03:17:19.567470250 +0200 | |
3 | @@ -22,6 +22,7 @@ | |
4 | #include "video.h" | |
5 | #include "resource.h" | |
6 | #include "parts.h" | |
7 | +#include <string.h> | |
8 | ||
9 | int x1,x2,ls,zs,txs,tys; | |
10 | ||
11 | @@ -102,7 +103,7 @@ | |
12 | if(x2 > offset && x1<offset+vidSizeX) { | |
13 | if(x2 > offset+vidSizeX-2) x2 = offset+vidSizeX-2; | |
14 | if(x1<offset) { | |
15 | - register tmp = offset-x1; | |
16 | + register int tmp = offset-x1; | |
17 | DrawLineShadow( offset, leftz+zs*tmp, leftl+ls*tmp, | |
18 | lefttx+txs*tmp, leftty+tys*tmp ); | |
19 | } | |
20 | @@ -126,7 +127,7 @@ | |
21 | if(x2 > offset && x1<offset+vidSizeX-1) { | |
22 | if(x2 > offset+vidSizeX-2) x2 = offset+vidSizeX-2; | |
23 | if(x1<offset) { | |
24 | - register tmp = offset-x1; | |
25 | + register int tmp = offset-x1; | |
26 | DrawLineNoShadow( offset, leftz+zs*tmp, leftl+ls*tmp, | |
27 | lefttx+txs*tmp, leftty+tys*tmp ); | |
28 | } | |
29 | @@ -150,7 +151,7 @@ | |
30 | if(x2 > offset && x1<offset+vidSizeX) { | |
31 | if(x2 > offset+vidSizeX-2) x2 = offset+vidSizeX-2; | |
32 | if(x1<offset) { | |
33 | - register tmp = offset-x1; | |
34 | + register int tmp = offset-x1; | |
35 | DrawLineNoTexture( offset, leftz+zs*tmp, | |
36 | leftl+ls*tmp, 0, 0 ); | |
37 | } | |
38 | @@ -164,18 +165,18 @@ | |
39 | } | |
40 | } | |
41 | ||
42 | -inline FacedObject::setDrawLineShadow( PAGE color, PAGE bw, int shadow_offset ) | |
43 | +inline void FacedObject::setDrawLineShadow( PAGE color, PAGE bw, int shadow_offset ) | |
44 | { | |
45 | DrawFace = &DrawFaceShadow; | |
46 | shadow = bw - shadow_offset; | |
47 | } | |
48 | ||
49 | -inline FacedObject::setDrawLineNoShadow( PAGE color, PAGE bw ) | |
50 | +inline void FacedObject::setDrawLineNoShadow( PAGE color, PAGE bw ) | |
51 | { | |
52 | DrawFace = &DrawFaceNoShadow; | |
53 | } | |
54 | ||
55 | -inline FacedObject::setDrawLineNoTexture( PAGE bw ) | |
56 | +inline void FacedObject::setDrawLineNoTexture( PAGE bw ) | |
57 | { | |
58 | DrawFace = &DrawFaceNoTexture; | |
59 | } | |
60 | @@ -263,7 +264,7 @@ | |
61 | offset = 0; tmpr += y0; | |
62 | } | |
63 | { | |
64 | - register tmp = (rightxs-leftxs)>>8; | |
65 | + register int tmp = (rightxs-leftxs)>>8; | |
66 | if( tmp ) { | |
67 | ls = (rightls-leftls)/tmp << 8; | |
68 | zs = (rightzs-leftzs)/tmp << 8; | |
69 | @@ -341,7 +342,7 @@ | |
70 | tmpr -= y2-vidSizeY; | |
71 | } | |
72 | { | |
73 | - register tmp = (rightxs-leftxs)>>8; | |
74 | + register int tmp = (rightxs-leftxs)>>8; | |
75 | if( tmp ) { | |
76 | ls = (rightls-leftls)/tmp << 8; | |
77 | zs = (rightzs-leftzs)/tmp << 8; | |
78 | --- HElliZER-1.0/3d.h.orig 1999-12-21 05:47:29.000000000 +0100 | |
79 | +++ HElliZER-1.0/3d.h 2006-05-20 03:16:04.614786000 +0200 | |
80 | @@ -145,9 +145,9 @@ | |
81 | bool morphTexture ); | |
82 | void MoveAbs( int dx, int dy, int dz ); | |
83 | void RotateAbs( int rx, int ry, int rz ); | |
84 | - setDrawLineShadow( PAGE color, PAGE bw, int shadow_offset ); | |
85 | - setDrawLineNoShadow( PAGE color, PAGE bw ); | |
86 | - setDrawLineNoTexture( PAGE bw ); | |
87 | + void setDrawLineShadow( PAGE color, PAGE bw, int shadow_offset ); | |
88 | + void setDrawLineNoShadow( PAGE color, PAGE bw ); | |
89 | + void setDrawLineNoTexture( PAGE bw ); | |
90 | }; | |
91 | ||
92 | #endif | |
93 | --- HElliZER-1.0/image.cpp.orig 1999-12-21 05:47:29.000000000 +0100 | |
94 | +++ HElliZER-1.0/image.cpp 2006-05-20 03:18:43.412710250 +0200 | |
95 | @@ -188,7 +188,7 @@ | |
96 | uchar* from = data + offsety*bytesPerLine + offsetx/8; | |
97 | uchar* to = page + y*vidBytesPerLine + x; | |
98 | for( int i=0; i<sizey; i++ ) { | |
99 | - register mask = 0x80 >> (offsetx&7); | |
100 | + register int mask = 0x80 >> (offsetx&7); | |
101 | for( int j=0,k=0; j<sizex; j++ ) { | |
102 | if( from[k] & mask ) to[j]=color; | |
103 | mask >>= 1; if( !mask ) { mask = 0x80; k++; } | |
104 | @@ -252,7 +252,7 @@ | |
105 | int stepy = (sizeY<<16)/h; y=0; | |
106 | for( int i=0; i<size_y; i++, y+=stepy ) { | |
107 | from1 = from+(y>>16)*bytesPerLine; | |
108 | - register stepx = (sizeX<<16)/w; | |
109 | + register int stepx = (sizeX<<16)/w; | |
110 | for( int j=0, x=0; j<size_x; j++, x+=stepx ) { | |
111 | if( from1[x>>16] ) to[j] = from1[x>>16]; | |
112 | } | |
113 | @@ -283,7 +283,7 @@ | |
114 | int stepy = (sizeY<<16)/h; y=0; | |
115 | for( int i=0; i<size_y; i++, y+=stepy ) { | |
116 | from1 = from+(y>>16)*bytesPerLine; | |
117 | - register stepx = (sizeX<<16)/w; | |
118 | + register int stepx = (sizeX<<16)/w; | |
119 | for( int j=0, x=0; j<size_x; j++, x+=stepx ) { | |
120 | if( from1[x>>16] ) to[j] = color; | |
121 | } | |
122 | @@ -314,7 +314,7 @@ | |
123 | int stepy = (sizeY<<16)/h; y=0; | |
124 | for( int i=0; i<size_y; i++, y+=stepy ) { | |
125 | from1 = from+(y>>16)*bytesPerLine; | |
126 | - register stepx = (sizeX<<16)/w; | |
127 | + register int stepx = (sizeX<<16)/w; | |
128 | for( int j=0, x=0; j<size_x; j++, x+=stepx ) { | |
129 | to[j] = from1[x>>16]+to[j] <= 255 ? from1[x>>16]+to[j] : 255; | |
130 | } |