From 1ce25913ddb3f9610770006670557b86c7b0c7ee Mon Sep 17 00:00:00 2001 From: izydorst Date: Fri, 15 Aug 2003 19:55:37 +0000 Subject: [PATCH] fixed bug in DrawLine function; extended DrawLine behavior git-svn-id: svn://svn.cc65.org/cc65/trunk@2326 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- doc/geos.sgml | 7 +++++-- include/geos/ggraph.h | 8 ++++++-- libsrc/geos/graph/drawline.s | 11 ++++++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/geos.sgml b/doc/geos.sgml index 61e4f837e..2c38256de 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -278,10 +278,13 @@ number as set in DrawLine

- Point Functions

diff --git a/include/geos/ggraph.h b/include/geos/ggraph.h index 6171cf61d..9a81b7181 100644 --- a/include/geos/ggraph.h +++ b/include/geos/ggraph.h @@ -30,7 +30,7 @@ void __fastcall__ InvertRectangle(void); void __fastcall__ ImprintRectangle(void); void __fastcall__ RecoverRectangle(void); -void __fastcall__ DrawLine(struct window *topBotCoords); +void __fastcall__ DrawLine(char mode, struct window *topBotCoords); void __fastcall__ DrawPoint(struct pixel *myPixel); char __fastcall__ TestPoint(struct pixel *myPixel); @@ -166,10 +166,14 @@ void __fastcall__ GraphicsString(char *myGfxString); /* justification */ #define SET_RIGHTJUST 0 #define SET_LEFTJUST 0x80 -/* C128 x flags */ +/* C128 x-extension flags */ #define ADD1_W 0x2000 #define DOUBLE_B 0x80 #define DOUBLE_W 0x8000 +/* DrawLine mode values */ +#define DRAW_ERASE 0x00 +#define DRAW_DRAW 0x40 +#define DRAW_COPY 0x80 typedef void graphicStr; diff --git a/libsrc/geos/graph/drawline.s b/libsrc/geos/graph/drawline.s index baa68bce6..874a58bbd 100644 --- a/libsrc/geos/graph/drawline.s +++ b/libsrc/geos/graph/drawline.s @@ -1,12 +1,14 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 29.10.99 +; 29.10.99, 15.08.2003 -; void DrawLine (struct window *mywindow); +; void DrawLine (char mode, struct window *mywindow); .import _InitDrawWindow + .import popa + .importzp tmp1 .export _DrawLine .include "../inc/jumptab.inc" @@ -20,4 +22,7 @@ _DrawLine: jsr _InitDrawWindow MoveW r2, r11 PopW r2 + jsr popa + sta tmp1 + bit tmp1 jmp DrawLine -- 2.39.5