Shop OBEX P1 Docs P2 Docs Learn Events
TV_WTEXT: TV_TEXT with windowed regions (sort of) — Parallax Forums

TV_WTEXT: TV_TEXT with windowed regions (sort of)

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2007-02-05 05:43 in Propeller 1
Attached is an archive containing tv_wtext.spin, which is based on Chip's tv_text.spin, but with independently-controllable rectangular regions. This object implements a "flat windows" display model. This means that there is no notion of one window being above another, "hiding" its contents. In tv_wtext, windows that overlap will clobber each other. But still, it might be a handy tool for controlling a text display.

The included demo program shows pretty much everything it can do.

Enjoy!
Phil

Comments

  • cgraceycgracey Posts: 14,133
    edited 2006-06-09 08:19
    Phil,

    That's pretty useful! I've thought about the need for a windowed text system, and you've just made one. It looks really good. And your demo is even choreographed. The way you presented the first and last text, with fade in and fade out, made me wonder for a second what I was looking at (a Propeller, really?). Super!


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • IbsenIbsen Posts: 68
    edited 2006-06-09 15:03
    Can you post a picture ???





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    *.*

    Ibsen

    " It's nice to be important, but
    ·· more important to be nice... "
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-06-09 17:23
    Chip,

    A completely layered windowing approach would certainly be more useful. I can envision an object with a CreateWindow method, wherein the caller provides the address of an array large enough to contain the new window's text. From there, it's a matter of determining what gets copied to the display buffer as windows pop up, move, etc. The tricky part is doing it in such a way that performance isn't adversely affected. One limitation would simplify things enormously: allow changes to only those windows that're either on top or not displayed at all. That way, either all changes to a window are copied to the display buffer, or none of them is.

    Ibsen,

    I'm afraid a static picture would do little to convey the object's capabilities. The output looks just like that of Chip's tv_text object. The difference is in the dynamics of changing screen content.

    -Phil
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-06-09 18:34
    I cant wait till I get home to try this and the microphone...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-02-05 05:21
    This thing would be great for text-based games.

    Edit: Conceivably one could extend the object so that you could specify that a window could be made "transparent" to expose a graphics bitmap underneath. Then you could have an RPG with lots of text windows and occaisional graphics in windows.

    Post Edited (Dennis Ferron) : 2/5/2007 5:25:43 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-05 05:43
    The current version of the Propeller OS uses a version of this windowed text display modified to work with either the TV or VGA displays (Chip's tiled 1024 x 768). Unfortunately, the current TV and VGA drivers use slightly different tile formats. It's not a big deal to change the TV driver to match the VGA driver. It would then be fairly easy to define a window as a graphics window with all the tiles pointing to a bitmap which is controlled with the graphics object in the Propeller Tool library. With the TV display, there are only 40 x 13 tiles, each 16 x 16 pixels. With the VGA display (as Chip's demo illustrates) things are much better.
    Mike
Sign In or Register to comment.