View | Details | Raw Unified | Return to bug 116831
Collapse All | Expand All

(-)Makefile (-7 / +1 lines)
Lines 80-89 Link Here
80
	${MKDIR} ${DATADIR}/mod
80
	${MKDIR} ${DATADIR}/mod
81
	${INSTALL_DATA} ${MUSICSRC}/*.xm ${MUSICSRC}/sound.conf ${DATADIR}/mod
81
	${INSTALL_DATA} ${MUSICSRC}/*.xm ${MUSICSRC}/sound.conf ${DATADIR}/mod
82
82
83
.include <bsd.port.pre.mk>
83
.include <bsd.port.mk>
84
85
.if ${OSVERSION} >= 700042
86
BROKEN=		Does not compile with GCC 4.2
87
.endif
88
89
.include <bsd.port.post.mk>
(-)files/patch-src_hedlite.c (+184 lines)
Added Link Here
1
--- src/hedlite.c.orig	2002-02-06 22:49:44.000000000 +0100
2
+++ src/hedlite.c	2007-10-02 16:33:06.000000000 +0200
3
@@ -45,7 +45,7 @@
4
 #include "dirname.h"
5
 
6
 static a_pcx_image heditrsc;
7
-static a_pcx_image tile_set_img;
8
+static a_pcx_image tile_set_img_local;
9
 
10
 unsigned short int xdalles = 0;
11
 unsigned short int ydalles = 0;
12
@@ -144,9 +144,9 @@
13
 static void
14
 copy_tile (int src_, a_pixel *dest)
15
 {
16
-  int i = tile_set_img.width;
17
+  int i = tile_set_img_local.width;
18
   int j;
19
-  a_pixel *src = tile_set_img.buffer + src_;
20
+  a_pixel *src = tile_set_img_local.buffer + src_;
21
   for (j = 20; j > 0; j--) {
22
     fastmem4 (src, dest, 24 >> 2);
23
     src += i;
24
@@ -157,9 +157,9 @@
25
 static void
26
 copy_tile_pcx (int src_, a_pixel *dest)
27
 {
28
-  int i = tile_set_img.width;
29
+  int i = tile_set_img_local.width;
30
   int j;
31
-  a_pixel *src = tile_set_img.buffer + src_;
32
+  a_pixel *src = tile_set_img_local.buffer + src_;
33
   for (j = 20; j > 0; j--) {
34
     fastmem4 (src, dest, 24 >> 2);
35
     src += i;
36
@@ -170,9 +170,9 @@
37
 static void
38
 copy_tile_transp (int src_, a_pixel *dest)
39
 {
40
-  int i = tile_set_img.width;
41
+  int i = tile_set_img_local.width;
42
   int j, k;
43
-  a_pixel *src = tile_set_img.buffer + src_;
44
+  a_pixel *src = tile_set_img_local.buffer + src_;
45
   for (j = 20; j > 0; j--) {
46
     for (k = 24; k > 0; k--) {
47
       if (*src != 0)
48
@@ -188,9 +188,9 @@
49
 static void
50
 copy_tile_transp_pcx (int src_, a_pixel *dest)
51
 {
52
-  int i = tile_set_img.width;
53
+  int i = tile_set_img_local.width;
54
   int j, k;
55
-  a_pixel *src = tile_set_img.buffer + src_;
56
+  a_pixel *src = tile_set_img_local.buffer + src_;
57
   for (j = 20; j > 0; j--) {
58
     for (k = 24; k > 0; k--) {
59
       if (*src != 0)
60
@@ -555,7 +555,7 @@
61
 static void
62
 update_middle_panel (void)
63
 {
64
-  rectangle_copy (xdalles, 0, 144, 200, 145, 0, &tile_set_img);
65
+  rectangle_copy (xdalles, 0, 144, 200, 145, 0, &tile_set_img_local);
66
   frame (145 + xdallesdec, ydalles, 23, 19, 15);
67
   rectangle_copy (0, 64, 30, 6, 290, 64, &heditrsc);
68
   sprintf (nombre, "%u", (xdalles + xdallesdec) / 24);
69
@@ -670,7 +670,7 @@
70
 curdalled (void)
71
 {
72
   int i =
73
-    (xdalles + xdallesdec) / 24 + (ydalles / 20) * (tile_set_img.width / 24);
74
+    (xdalles + xdallesdec) / 24 + (ydalles / 20) * (tile_set_img_local.width / 24);
75
   return i;
76
 }
77
 
78
@@ -894,7 +894,7 @@
79
   free (tempc);
80
   putc (0xC, fpcx);
81
   for (i1 = 0; i1 < 768; i1++)
82
-    putc (tile_set_img.palette.global[i1] << 2, fpcx);
83
+    putc (tile_set_img_local.palette.global[i1] << 2, fpcx);
84
   fclose (fpcx);
85
 }
86
 
87
@@ -1225,7 +1225,7 @@
88
     }
89
   } else if (i == HK_End) {
90
     if (mod & HK_MOD_Ctrl) {
91
-      xdalles = (tile_set_img.width / 24) * 24 - 144;
92
+      xdalles = (tile_set_img_local.width / 24) * 24 - 144;
93
       update_middle_panel ();
94
     }
95
   } else if (i == HK_PageDown) {
96
@@ -1250,7 +1250,7 @@
97
     }
98
   } else if (i == HK_Right) {
99
     if (mod & HK_MOD_Ctrl) {
100
-      if (xdalles + 168U < tile_set_img.width) {
101
+      if (xdalles + 168U < tile_set_img_local.width) {
102
 	xdalles += 24;
103
 	update_middle_panel ();
104
       } else if (xdallesdec < 120) {
105
@@ -1337,7 +1337,7 @@
106
   } else if (i == HK_Space) {
107
     j = curdallep ();
108
     level_map[j].number =
109
-      xdalles + xdallesdec + ydalles * (tile_set_img.width);
110
+      xdalles + xdallesdec + ydalles * (tile_set_img_local.width);
111
     level_map[j].type = ddef[curdalled ()].type;
112
     level_map[j].info = ddef[curdalled ()].info;
113
     gestclav (HK_i, HK_MOD_None);
114
@@ -1351,9 +1351,9 @@
115
       level_map[j].collision[3] = 0;
116
     }
117
     for (j = hplaninfo.xt * hplaninfo.yt - 1; j >= 0; j--) {
118
-      k = (((level_map[j].number % tile_set_img.width) / 24) +
119
-	   (level_map[j].number / (tile_set_img.width * 20)) *
120
-	   (tile_set_img.width / 24));
121
+      k = (((level_map[j].number % tile_set_img_local.width) / 24) +
122
+	   (level_map[j].number / (tile_set_img_local.width * 20)) *
123
+	   (tile_set_img_local.width / 24));
124
       level_map[j].type = ddef[k].type;
125
       if (level_map[j].type != t_tunnel) {
126
 	if (level_map[j].type == t_anim || i == 0x1749)
127
@@ -1404,7 +1404,7 @@
128
     if (mod & HK_MOD_Ctrl) {
129
       for (j = hplaninfo.xt * hplaninfo.yt - 1; j >= 0; j--) {
130
 	level_map[j].number = xdalles + xdallesdec +
131
-	  ydalles * (tile_set_img.width);
132
+	  ydalles * (tile_set_img_local.width);
133
 	level_map[j].type = ddef[curdalled ()].type;
134
 	level_map[j].info = ddef[curdalled ()].info;
135
       }
136
@@ -1414,7 +1414,7 @@
137
 
138
 	level_map[j].number =
139
 	  (((j % hplaninfo.xt) + (j / hplaninfo.xt)) & 1) * 20 *
140
-	  tile_set_img.width;
141
+	  tile_set_img_local.width;
142
       update_left_panel ();
143
     }
144
   } else if (i == HK_F3) {
145
@@ -1427,7 +1427,7 @@
146
     if (level_map[curdallep ()].sprite == 0)
147
 
148
       level_map[curdallep ()].sprite =
149
-	(short int) (xdalles + xdallesdec + ydalles * (tile_set_img.width));
150
+	(short int) (xdalles + xdallesdec + ydalles * (tile_set_img_local.width));
151
     else
152
       level_map[curdallep ()].sprite = 0;
153
     update_left_panel ();
154
@@ -1707,17 +1707,17 @@
155
 				   hplaninfo.tile_set_name), ".pie");
156
 
157
   pcx_load_from_rsc ("editor-img", &heditrsc);
158
-  pcx_load (tile_set_name, &tile_set_img);
159
+  pcx_load (tile_set_name, &tile_set_img_local);
160
 
161
   /* read the tileset definition */
162
-  XCALLOC_ARRAY (ddef, (tile_set_img.width / 24) * 10);
163
+  XCALLOC_ARRAY (ddef, (tile_set_img_local.width / 24) * 10);
164
   if (!((ftmp = fopen (dallepie, "rb")) == NULL))
165
-    fread (ddef, sizeof (a_tile_info), (tile_set_img.width / 24) * 10, ftmp);
166
+    fread (ddef, sizeof (a_tile_info), (tile_set_img_local.width / 24) * 10, ftmp);
167
   fclose (ftmp);
168
 
169
   outwayinit ();
170
   XCALLOC_ARRAY (hedit_buffer, xbuf * 200);
171
-  set_pal (tile_set_img.palette.global, 0, 256 * 3);
172
+  set_pal (tile_set_img_local.palette.global, 0, 256 * 3);
173
   rectangle_copy (0, 0, 30, 200, 290, 0, &heditrsc);
174
   strupr (levelnomshort);
175
   draw_text (levelnomshort, 305, 29, 8, 1);
176
@@ -1767,7 +1767,7 @@
177
     free (ddef);
178
     free (level_map);
179
     img_free (&heditrsc);
180
-    img_free (&tile_set_img);
181
+    img_free (&tile_set_img_local);
182
   }
183
 
184
   free (dallepie);

Return to bug 116831