Shop OBEX P1 Docs P2 Docs Learn Events
TV_Text getxy method — Parallax Forums

TV_Text getxy method

jmspaggijmspaggi Posts: 629
edited 2010-09-02 14:20 in Propeller 1
Hi,

I have an outxy methode on TV_Text as followed:
PUB outxy(x, y, c)
  screen[y * cols + x] := (color << 1 + c & 1) << 10 + $200 + c & $FE

And I build this one.
PUB getxy(x, y)
  result := ((screen[y * cols + x] >> 10) & 1) | (screen[y * cols + x] & $FE)

The goal of this method is to retreive a character on the screen. That way you can use the screen buffer to process some logic.

So I'm just sharing ;) So feel free to improve it.

JM
Sign In or Register to comment.