summaryrefslogtreecommitdiff
path: root/source/framebuffer.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-10-09 00:32:14 +0000
committerIan C <ianc@noddybox.co.uk>2006-10-09 00:32:14 +0000
commita50b3820e29af6d12b86c55afb8be1aee9091558 (patch)
treea3e74e4706488db0701bc992b1eb75e29d52e7a1 /source/framebuffer.c
parent09a74c822519bae9d20f79b8e7808f19c5094e7f (diff)
Working version with a few games included
Diffstat (limited to 'source/framebuffer.c')
-rw-r--r--source/framebuffer.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/framebuffer.c b/source/framebuffer.c
index 26b95de..22a4e12 100644
--- a/source/framebuffer.c
+++ b/source/framebuffer.c
@@ -253,3 +253,22 @@ void FB_Clear(void)
*p++=0x8000;
}
}
+
+
+void FB_Blit(sImage *img, int x, int y)
+{
+ if (img->width==WIDTH && img->height==HEIGHT)
+ {
+ dmaCopy(img->data8,buff,SCREEN_WIDTH*SCREEN_HEIGHT*2);
+ }
+ else
+ {
+ int f;
+
+ for(f=0;f<img->height;f++)
+ {
+ dmaCopy(img->data16+(f*img->width),
+ buff+x+(y+f)*WIDTH,img->width*2);
+ }
+ }
+}