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

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

Zero redundant declarations.

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[f40a309]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
[b28a12e]8#include "ram.h"
[f40a309]9
[7258c6a]10static int8_t cl[81];
[f40a309]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*/
[7258c6a]30
[f40a309]31void vspray4(uint16_t *vobj, int16_t vwid, int16_t fg, int16_t vb, int16_t pitch, int8_t *ml[])
[7258c6a]32{
33 register int8_t *cp, *lp, c;
[f40a309]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 }
[6262b5c]62}
63
Note: See TracBrowser for help on using the repository browser.