notaz.gp2x.de
/
saturn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5491df4
)
fix rgb order
master
author
notaz
<notasas@gmail.com>
Thu, 11 Sep 2014 01:21:26 +0000
(
04:21
+0300)
committer
notaz
<notasas@gmail.com>
Thu, 11 Sep 2014 01:21:26 +0000
(
04:21
+0300)
Makefile
patch
|
blob
|
blame
|
history
vdp1_to_png.c
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index
d73cb81
..
219e9e0
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-10,4
+10,4
@@
all: $(TARGETS)
vdp1_to_png: LDLIBS += -lpng
clean:
- $(RM) $(TARGET)
+ $(RM) $(TARGET
S
)
diff --git
a/vdp1_to_png.c
b/vdp1_to_png.c
index
6b62437
..
3d1da46
100644
(file)
--- a/
vdp1_to_png.c
+++ b/
vdp1_to_png.c
@@
-33,9
+33,9
@@
static int writepng(const char *fname, const unsigned short *src)
row_pointers[i] = dst;
for (j = 0; j < WIDTH; j++, src++, dst += 3) {
unsigned short v = (*src >> 8) | (*src << 8);
- dst[0] = (v & 0x
7c00) >> 7;
- dst[1] = (v & 0x03e0) >> 2;
- dst[2] = (v & 0x
001f) << 3;
+ dst[0] = (v & 0x
001f) << 3; // r
+ dst[1] = (v & 0x03e0) >> 2;
// g
+ dst[2] = (v & 0x
7c00) >> 7; // b
}
}