LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

TGRP

Root / Submissions / [.]

MZ952Created:
Download:4DVX5E23
Version:Size:
This is a proof of concept which shows the text page being used as a secondary graphics screen. If you run it, you'll see you can draw pretty pictures with it, but none of those pictures are being stored on the graphics page. It uses FONTDEF to systematically rewrite text characters. There are a number of crappy drawing functions included, but if you've got your own it's pretty easy to adapt them by replacing any GLINEs and GPSETs in them with TLINEs/TPSETs. To create a TPAGE, first set the DISPLAY to whatever display you want it on and then START_TPAGE. That will fill the text screen with invisible characters the library will use to display graphics (it uses text characters 128 and beyond, which means most typing characters are preserved for your convenience). After executing text-graphics commands, you must use TRENDER to render the new graphics. It takes around 20 milliseconds to rerender a whole frame.

Instructions:

Pressing B will change the display being drawn on, pressing X will fill the screen with a random color. Touching the screen creates art. START_TPAGE sets a display to display TPAGE graphics. HIDE_TPAGE temporarily hides a TPAGE from the screen, though doesn't initialize the FONTDEF. SHOW_TPAGE shows the hidden TPAGE again. END_TPAGE resets the screens and initializes the FONTDEF back to its default state. It does not erase the TPAGE data, which can be viewed again by calling START_TPAGE. TCLS ColorCode fills the display TPAGE with the color code. Color codes can be either strings or integers, example: TCLS "F801" or TCLS &HF801. TRENDER renders the data stored in the cache onto the FONTDEF. About 20 milliseconds per render, or about 50 frames per second. Because of how the text screen works, there will be a 16 millisecond moment where the text screen isn't fully rendered. TPSET PosX,PosY,ColorCode basically GPSET, but on the text screen... TLINE StartX,StartY,EndX,EndY,ColorCode basically GLINE, but on the text screen... TFILL... TBOX... TTRI... TCIRCLE... TLIPSE...

No posts yet (will you be the first?)