I'm writing a game which I've recently decided to to all in text graphics (chr$(219)s and chr$(177)s) so I've had to write my own text GET and PUT routines. Here is my PUT routine:

Code: Select all

```
SUB TextSprite (xpos, ypos, array(), index)
ctr = index + 2
FOR v = ypos to ypos + array(index + 1) - 1
FOR h = xpos to xpos + array(index) - 1
colr = array(ctr)
IF colr > 0 AND h > -1 AND v > -1 AND h < 80 AND v < 50 THEN
IF colr < 128 THEN
POKE h * 2 + v * 160, 219
POKE h * 2 + v * 160 + 1, colr
ELSE
POKE h * 2 + v * 160, 177
POKE h * 2 + v * 160 + 1, colr - 128
END IF
END IF
ctr = ctr + 1
NEXT h
NEXT v
END SUB
```

So how do I (properly) pass an array into a SUB? Or, if it cannot be done, what can I do as a work around?