From a9d1d51f562a7a62b66bf29b7cc8ce1c0cd7a5f1 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Sun, 10 Jun 2012 14:49:13 +0000 Subject: [PATCH] Added demo applicaion showcasing sp65 in combination with GEOS. TODO: Fix the assert() calls. git-svn-id: svn://svn.cc65.org/cc65/trunk@5699 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/geos/bitmap-demo.c | 32 ++++++++++++++++++++++++++++++++ samples/geos/bitmap-demores.grc | 5 +++++ 2 files changed, 37 insertions(+) create mode 100644 samples/geos/bitmap-demo.c create mode 100644 samples/geos/bitmap-demores.grc diff --git a/samples/geos/bitmap-demo.c b/samples/geos/bitmap-demo.c new file mode 100644 index 000000000..8aa687d07 --- /dev/null +++ b/samples/geos/bitmap-demo.c @@ -0,0 +1,32 @@ +/* + * Minimalistic GEOSLib bitmap demo program + * + * 2012-06-10, Oliver Schmidt (ol.sc@web.de) + * + * To create bitmap.c use the sp65 sprite and bitmap utility: + * sp65 -r .pcx -c geos-bitmap -w bitmap.c,ident=bitmap + * + */ + + +#include +#include +#include + + +#include "bitmap.c" + +//assert(bitmap_COLORS == 2); +//assert(bitmap_WIDTH%8 == 0); +//assert(bitmap_WIDTH <= SC_PIX_WIDTH); +//assert(bitmap_HEIGHT <= SC_PIX_HEIGHT); + + +struct iconpic picture = {(char*)bitmap, 0, 0, bitmap_WIDTH/8, bitmap_HEIGHT}; + + +void main(void) +{ + BitmapUp(&picture); + cgetc(); +} diff --git a/samples/geos/bitmap-demores.grc b/samples/geos/bitmap-demores.grc new file mode 100644 index 000000000..1ca3c0798 --- /dev/null +++ b/samples/geos/bitmap-demores.grc @@ -0,0 +1,5 @@ +HEADER APPLICATION "Bitmap Demo" "Bitmap Demo" "V1.0" { + author "Oliver Schmidt" + info "This is a minimalistic cc65 GEOSLib bitmap demo program written in C." + date 12 06 10 12 00 +} -- 2.39.5