TheLivingBlooper 2020-06-13 00:34
1.0
A small library of two subprograms that can be used for drawing text and allocating it in character data. Rather than using text that requires a set amount of data in ROM, CTEXT_ALLOC
uses PEEK
and POKE
to create space for data that depends on the length of the string. CTEXT_ALLOC
overrides any character data that is in its way, so it's recommended that you leave space for text. The amount of space your text needs is always half of it's length in characters, rounded up.
CTEXT_ALLOC(S$,P)
CTEXT_ALLOC
takes a string and a position to start writing with in data (0-255).CTEXT_DRAW(S$,X,Y,C)
CTEXT_DRAW
takes X and Y positions, for where to start drawing onscreen.CTEXT_DRAW
also takes a string and character to start writing with in data.GAMELEGEND 2020-06-13 02:16
is it readable on small devices
TheLivingBlooper 2020-06-13 02:42
Honestly, I'd be surprised if it was.
GAMELEGEND 2020-06-13 04:19 (Edited)
thats what i thought
was8bit 2020-06-13 05:03
Very clever and cool :)
UxoZii 2020-06-13 13:33
Very cool! Also a question, because i don't know too much about modifying memory for the characters:
Would it be possible to use DATA to store all the letters and make a function that handles every single character instead of manually implementing each one? Would be cool
TheLivingBlooper 2020-06-13 13:36
Probably. I'm not very familiar with DATA, but that sounds possible! I'll look into it. I'm thinking about alignment options and maybe a different font as well.
UxoZii 2020-06-13 13:40
DATA is very useful! I recommend using it when possible, it's also fun to use somewhat lol