summaryrefslogtreecommitdiff
path: root/hw/tcx.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-10 16:06:20 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-10 16:06:20 +0000
commit9447084492da7ca69ce0c16a35971157f690e631 (patch)
tree3013133d8dcc91a2c02dec0390b3bbe4c09a5708 /hw/tcx.c
parent2a1086d91c19cc058f74fb2913e05f262f37cdc7 (diff)
downloadqemu-9447084492da7ca69ce0c16a35971157f690e631.tar.gz
Merge TCX and VGA pixel operations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2973 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tcx.c')
-rw-r--r--hw/tcx.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/hw/tcx.c b/hw/tcx.c
index bfcb386f7b..2c65a0568e 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "vl.h"
+#include "pixel_ops.h"
#define MAXX 1024
#define MAXY 768
@@ -47,27 +48,6 @@ static void tcx24_screen_dump(void *opaque, const char *filename);
static void tcx_invalidate_display(void *opaque);
static void tcx24_invalidate_display(void *opaque);
-/* XXX: unify with vga draw line functions */
-static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b)
-{
- return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
-}
-
-static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b)
-{
- return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);
-}
-
-static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g, unsigned b)
-{
- return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
-}
-
-static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, unsigned b)
-{
- return (r << 16) | (g << 8) | b;
-}
-
static void update_palette_entries(TCXState *s, int start, int end)
{
int i;