diff options
author | notaz | 2011-09-24 18:41:41 +0300 |
---|---|---|
committer | notaz | 2011-09-25 01:24:11 +0300 |
commit | 55b0eeea6028e00741e620d28ab3211c49b8515f (patch) | |
tree | cc652ae976722211ff4bc7d65c9c890ad1057099 /frontend/cspace.c | |
parent | 15776b68de021ae41ebd5d8d646beca694c3784d (diff) | |
download | pcsx_rearmed-55b0eeea6028e00741e620d28ab3211c49b8515f.tar.gz pcsx_rearmed-55b0eeea6028e00741e620d28ab3211c49b8515f.tar.bz2 pcsx_rearmed-55b0eeea6028e00741e620d28ab3211c49b8515f.zip |
add pollux/caanoo port, refactor things
Diffstat (limited to 'frontend/cspace.c')
-rw-r--r-- | frontend/cspace.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/frontend/cspace.c b/frontend/cspace.c index f5f8d35..eee56ce 100644 --- a/frontend/cspace.c +++ b/frontend/cspace.c @@ -1,7 +1,21 @@ #include "cspace.h" +void bgr555_to_rgb565(void *dst_, const void *src_, int bytes) +{ + unsigned int *src = (unsigned int *)src_; + unsigned int *dst = (unsigned int *)dst_; + unsigned int p; + int x; + + for (x = 0; x < bytes / 4; x++) { + p = src[x]; + p = ((p & 0x7c007c00) >> 10) | ((p & 0x03e003e0) << 1) + | ((p & 0x001f001f) << 11); + dst[x] = p; + } +} + // TODO? -void bgr555_to_rgb565(void *dst, const void *src, int bytes) {} void bgr888_to_rgb888(void *dst, const void *src, int bytes) {} void bgr888_to_rgb565(void *dst, const void *src, int bytes) {} |