1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00

fixed bug in DrawLine function; extended DrawLine behavior

git-svn-id: svn://svn.cc65.org/cc65/trunk@2326 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
izydorst 2003-08-15 19:55:37 +00:00
parent a0209d0a86
commit 1ce25913dd
3 changed files with 19 additions and 7 deletions

View File

@ -278,10 +278,13 @@ number as set in <tt/SetPattern/ but a true bit pattern.
<sect3>DrawLine
<p>
<tt/void DrawLine (struct window *myWindow)/
<tt/void DrawLine (char mode, struct window *myWindow)/
<p>
<tt/top/ parameters of <tt/struct window/ describe the starting point of the line, while
<tt/bottom/ are for the ending point. Current pattern from <tt/SetPattern/ is used for drawing.
<tt/bottom/ are for the ending point. If <tt/mode/ is <tt/DRAW_DRAW/ then current pattern from
<tt/SetPattern/ is used for drawing. If <tt/mode/ is <tt/DRAW_ERASE/ then line is erased from the
screen. If <tt/mode/ is <tt/DRAW_COPY/ then line is copied from/to back/frontbuffer, according to
<tt/dispBufferOn/ setting.
<sect2>Point Functions
<p>

View File

@ -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;

View File

@ -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