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

(-)files/patch-src_core_image.c (+41 lines)
Line 0 Link Here
1
--- src/core/image.c.orig	2017-11-14 12:17:25 UTC
2
+++ src/core/image.c
3
@@ -34,12 +34,6 @@
4
 #include "resourcemanager.h"
5
 #include "util.h"
6
 
7
-/* image structure */
8
-struct image_t {
9
-    BITMAP *data; /* this must be the first field */
10
-    int w, h;
11
-};
12
-
13
 /* useful stuff */
14
 #define IS_PNG(path) (str_icmp((path)+strlen(path)-4, ".png") == 0)
15
 typedef int (*fast_getpixel_funptr)(BITMAP*,int,int);
16
@@ -233,25 +227,6 @@ image_t *image_create_shared(const image
17
     return img;
18
 }
19
 
20
-/*
21
- * image_width()
22
- * The width of the image
23
- */
24
-inline int image_width(const image_t *img)
25
-{
26
-    return img->w;
27
-}
28
-
29
-
30
-/*
31
- * image_height()
32
- * The height of the image
33
- */
34
-inline int image_height(const image_t *img)
35
-{
36
-    return img->h;
37
-}
38
-
39
 
40
 /*
41
  * image_getpixel()
(-)files/patch-src_core_image.h (+51 lines)
Line 0 Link Here
1
--- src/core/image.h.orig	2017-11-14 12:16:37 UTC
2
+++ src/core/image.h
3
@@ -22,10 +22,15 @@
4
 #ifndef _IMAGE_H
5
 #define _IMAGE_H
6
 
7
+#include "allegro.h"
8
 #include "global.h"
9
 #include "v2d.h"
10
 
11
-/* opaque image type */
12
+/* image structure */
13
+struct image_t {
14
+    BITMAP *data; /* this must be the first field */
15
+    int w, h;
16
+};
17
 typedef struct image_t image_t;
18
 
19
 /* image flags (bitwise OR) */
20
@@ -42,13 +47,29 @@ void image_save(const image_t *img, cons
21
 image_t *image_create_shared(const image_t *parent, int x, int y, int width, int height); /* creates a sub-image */
22
 
23
 /* properties */
24
-inline int image_width(const image_t *img);
25
-inline int image_height(const image_t *img);
26
 uint32 image_rgb(uint8 r, uint8 g, uint8 b);
27
 void image_color2rgb(uint32 color, uint8 *r, uint8 *g, uint8 *b);
28
 int image_pixelperfect_collision(const image_t *img1, const image_t *img2, int x1, int y1, int x2, int y2);
29
 uint32 image_getpixel(const image_t *img, int x, int y);
30
 
31
+/*
32
+ * image_width()
33
+ * The width of the image
34
+ */
35
+inline int image_width(const image_t *img)
36
+{ 
37
+    return img->w;
38
+}
39
+
40
+/*
41
+ * image_height()
42
+ * The height of the image
43
+ */
44
+inline int image_height(const image_t *img)
45
+{
46
+    return img->h;
47
+}
48
+
49
 /* drawing primitives */
50
 void image_clear(image_t *img, uint32 color);
51
 void image_putpixel(image_t *img, int x, int y, uint32 color);
(-)Makefile (-4 lines)
Lines 18-27 LICENSE_COMB= multi Link Here
18
LICENSE_FILE_GPLv2+ =	${WRKSRC}/licenses/GPLv2.txt
18
LICENSE_FILE_GPLv2+ =	${WRKSRC}/licenses/GPLv2.txt
19
LICENSE_FILE_CC-BY-SA-3.0=	${WRKSRC}/licenses/CC-BY-SA-3.0.txt
19
LICENSE_FILE_CC-BY-SA-3.0=	${WRKSRC}/licenses/CC-BY-SA-3.0.txt
20
20
21
BROKEN=		Does not build
22
DEPRECATED=	Does not build
23
EXPIRATION_DATE=2018-02-01
24
25
BUILD_DEPENDS=	${LOCALBASE}/lib/libaldmb.a:audio/dumb-allegro \
21
BUILD_DEPENDS=	${LOCALBASE}/lib/libaldmb.a:audio/dumb-allegro \
26
		${LOCALBASE}/include/alfont.h:x11-fonts/alfont \
22
		${LOCALBASE}/include/alfont.h:x11-fonts/alfont \
27
		alureplay:audio/alure
23
		alureplay:audio/alure

Return to bug 223746