This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, master has been updated
via 459688b5d2255395c6c99341e7aa68723a101cac (commit)
from 23a654d9e8f4bdb160dc4ded438676f2ae6d2793 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 459688b5d2255395c6c99341e7aa68723a101cac
Author: Lawrence Sebald <ljs...@us...>
Date: Fri May 8 23:08:13 2015 -0400
Fix compilation in new kos-ports.
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 +-
pcx.c | 10 +++++-----
pcx_texture.c | 5 ++---
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index 6e9206f..dcf2020 100755
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@
TARGET = libpcx.a
OBJS = pcx.o
+KOS_CFLAGS += -Iinclude
all: create_kos_link defaultall
@@ -14,4 +15,3 @@ create_kos_link:
ln -s ../libpcx/include ../include/pcx
include $(KOS_BASE)/addons/Makefile.prefab
-
diff --git a/pcx.c b/pcx.c
index 40a7ff6..66052ca 100644
--- a/pcx.c
+++ b/pcx.c
@@ -7,8 +7,8 @@
*/
#include <kos.h>
-#include <pcx/pcx.h>
#include <assert.h>
+#include "pcx.h"
typedef struct {
char mfg; /* manufacturer, always 0xa0 */
@@ -90,21 +90,21 @@ int pcx_to_img(const char *fn, kos_img_t *rv) {
else
image[bytes++] = c;
} while (bytes < num_bytes);
-
+
/* Load the palette */
fs_read(fd, &c, 1); /* This is a marker before the palette */
pcxpal = image + num_bytes;
fs_read(fd, pcxpal, 768);
fs_close(fd);
-
+
/* Decode the image into RGB565 */
for (i=0; i<num_bytes; i++) {
v = image[i];
r = pcxpal[v*3+0];
g = pcxpal[v*3+1];
b = pcxpal[v*3+2];
-
+
v = (((r >> 3) & 0x1f) << 11)
| (((g >> 2) & 0x3f) << 5)
| (((b >> 3) & 0x1f) << 0);
@@ -113,6 +113,6 @@ int pcx_to_img(const char *fn, kos_img_t *rv) {
/* Free temp buffers */
free(image);
-
+
return 0;
}
diff --git a/pcx_texture.c b/pcx_texture.c
index 2047858..e6bbf2a 100644
--- a/pcx_texture.c
+++ b/pcx_texture.c
@@ -7,7 +7,7 @@
*/
#include <kos.h>
-#include <pcx/pcx.h>
+#include "pcx.h"
/* Adjusts a 16-bit image so that instead of RGB565 gray scales, you will
have ARGB4444 alpha scales. The resulting image will be entirely white. */
@@ -15,7 +15,7 @@
static void _txr_to_alpha(uint16 *img, int x, int y) {
int i;
short v;
-
+
for (i=0; i<x*y; i++) {
v = img[i] & 0x1f;
v = ((v >> 1) << 12) | 0x0fff;
@@ -56,4 +56,3 @@ int pcx_load_texture(const char *fn, int twiddle, int alpha,
return 0;
}
-
hooks/post-receive
--
UNNAMED PROJECT
|