source: buchla-68k/vlib/vspray4.c@ 0580615

Last change on this file since 0580615 was 0580615, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Point of no return.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 =============================================================================
3 vspray4.c -- spray a pattern onto a graphics screen using tsplot4()
4 Version 5 -- 1987-10-09 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "vsddsw.h"
10
11static char cl[81];
12
13/*
14 =============================================================================
15 vspray4(vobj, vwid, fg, ml, vb, pitch) -- spray a pattern on the screen
16
17 Uses 'vobj' of width 'vwid' as the screen, 'fg' as the color, 'vb' as
18 the bank, 'pitch' as the vertical pitch, and 'ml' as the pattern.
19
20 If 'vb' EQ -1, the bank is not set. The color in 'fg' will be taken
21 from the lower 4 bits.
22
23 The list 'ml' points at pairs of counts and characters. The last count
24 is -1, and the list terminates with a null pointer.
25 =============================================================================
26*/
27
28/*
29
30*/
31
32void vspray4(unsigned *vobj, short vwid, short fg, short vb, short pitch, char *ml[])
33{
34 register char *cp, *lp, c;
35 register short j, k, row;
36
37 row = 0;
38
39 fg &= 0x000F;
40 fg |= fg << 4;
41 fg |= fg << 8;
42
43 if (-1 NE vb)
44 vbank(vb);
45
46 while (NULL NE (cp = *ml++)) {
47
48 lp = cl;
49
50 while (-1 NE (j = *cp++)) {
51
52 j &= 0x00FF;
53 c = *cp++;
54
55 for (k = 0; k < j; k++)
56 *lp++ = c;
57 }
58
59 *lp = '\0';
60
61 tsplot4(vobj, vwid, fg, row++, 0, cl, pitch);
62 }
63}
Note: See TracBrowser for help on using the repository browser.