-
Notifications
You must be signed in to change notification settings - Fork 2
/
draw.c
92 lines (83 loc) · 1.93 KB
/
draw.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <stddef.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <conio.h>
#include <dos.h>
#include "config.h"
#include "debug.h"
#include "idatypes.h"
#include "lottypes.h"
#include "lotcalls.h"
#include "bundle.h"
#include "lmbcs.h"
#include "attr.h"
#include "caca.h"
#include "draw.h"
// The canvas used for drawing ascii-art graphics.
extern caca_canvas_t *cv;
void __pascal exprt_scan_linx(int x, int y, int width, int attr)
{
traceent("exprt_scan_linx");
traceint(x);
traceint(y);
traceint(width);
traceint(attr);
caca_set_color_ansi(cv, attr, attr);
caca_draw_line(cv, x, y, x + width, y, '-');
return;
}
void __pascal exprt_fill_rect(int x, int y, int width, int height, int attr)
{
traceent("exprt_fill_rect");
traceint(x);
traceint(y);
traceint(width);
traceint(height);
traceint(attr);
traceptr(cv);
caca_set_color_ansi(cv, attr, CACA_WHITE);
caca_fill_box(cv, x, y, width, height, ' ');
return;
}
void __pascal exprt_thin_diag_line(int x1, int y1, int x2, int y2, int attr)
{
traceent("exprt_thin_diag_line");
traceint(x1);
traceint(y1);
traceint(x2);
traceint(y2);
traceint(attr);
caca_set_color_ansi(cv, attr, attr);
caca_draw_thin_line(cv, x1, y1, x2, y2);
return;
}
void __pascal exprt_thin_vert_line(int x, int y, int height, int attr)
{
traceent("exprt_thin_vert_line");
traceint(x);
traceint(y);
traceint(height);
traceint(attr);
caca_set_color_ansi(cv, attr, attr);
caca_draw_line(cv, x, y, x, y + height, '|');
return;
}
void __pascal exprt_shade_rect(int a, int b, int c, int d, void far *e, int f)
{
traceent("exprt_shade_rect");
traceint(a);
traceint(b);
traceint(c);
traceint(d);
traceptr(e);
traceint(f);
return;
}
void __pascal exprt_fill_scan_list()
{
traceent("exprt_fill_scan_list");
return;
}