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

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

Zero redundant declarations.

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