Join us on Discord!
You can help CodeWalrus stay online by donating here.

CE Textlib/Basic Drawing

Started by Dudeman313, March 11, 2016, 11:34:14 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dream of Omnimaga

{16,TextColor,17,BackgroundColor
Asm(prgmTEXTLIB
For example, {16,10:Asm(prgmTEXTLIB would set the text color to blue and leave the background color unchanged. You can put all commands in one list, such as {16,TextColor,17,BackgroundColor , or you can make them separate.

Have you checked the CE Textlib readme.txt, by the way?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

Yes, I have. I know how to do that, but what if I did this:

{16, LTBLUE,17,NAVY}
Asm(prgmTEXTLIB
Output(1,1,"This text should be blue.
Output(2,1,"This text should be red.
Output(3,1,"This text should be blue.

How would I change the 2nd Output( text
while keeping the others with the FGcolor command?

I'm sorry if I was unclear, but that's what I meant.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

Do you mean you want to preserve the foreground color? If so, then you would have to do this:

{16, LTBLUE,17,NAVY
Asm(prgmTEXTLIB
Output(1,1,"This text should be blue.
{17,YELLOW
Asm(prgmTEXTLIB
Output(2,1,"This text should be red.
{17,RED
Asm(prgmTEXTLIB
Output(3,1,"This text should be blue.


Also, you don't have to use the textual color names. You can use the numerical values from 10 to 24 as well. That can be handy if you use a variable to change the color or want to randomize it.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

Not exactly. I meant something like TextColor( , but for Output(.

Is that possible? To keep the FG color and BG color on the rest of the Output( s and to change the color of a single line?
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

I don't get what I mean. {16,color:Asm(prgmTEXTLIB is essentially the same thing as TextColor(COLOR), but for Output() instead of Text(). You would need to show a mockup picture to explain what you want to do.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

#20
If I do this:

{16,10
Asm(prgmTEXTLIB
Output(1,1,"Hello
{16,11
Asm(prgmTEXTLIB
Output(2,1,"It's me...
Pause
ClrHome

Will I get this?
Hello
It's me...

EDIT:
Apparently, the answer is yes. I don't know how I didn't think of trying it before. ;D
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

Now that that's taken care of, another question, for basic on general.

Is it possible to display a character backwards?
I'm trying to remix Matt Crespin's French Flappy Bird into an English Tappy Fish with Textlib, and I found a character  that looks like a fish, but is facing the wrong way. Can I change that?

If you want to know which charater I mean, look at the fourth row from the top and the fourth column from the right in Charz 3.0.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

Nope, you can't display a character backwards. It's best to just use a different character. You could also use multiple characters stuck together, such as >(v') and ('v)< , but that's Cemetech mascot (blub), so perhaps you might want to modify it a bit for originality, such as >(^)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

I'd be harder to do it with more than one character, so I'll probably just keep it a Tappy Bird game.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

That's fine. It doesn't really need to be that detailed anyway, since it's an hybrid BASIC game, after all.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

#26
Yeah. So far, Tappy Bird's really slow, but when I get finished with the slow versions of both TimberDodge and TB, I'll make a topic for them.

BTW, is it possible to display pics/images on the Home Screen?
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

#27
Pic/images on the home Screen are impossible. The only way is with CE Textlib but then it looks blocky as hell. There is probably a way that I'm trying to figure out right now, but the graphics would be slanted diagonally, so it won't be practical. The other way gives you a resolution of 13x59 pixels (stretched so that each pixel are actually 12x4 pixels large) and it takes a long while to load.

Otherwise you would need to learn C and do a library that can be used in TI-BASIC to display pictures.

EDIT @Dudeman313 this is probably the best quality you could get from a CE Textlib-generated image (this is a mockup. I didn't do a converter nor anything):



It would probably take close to 50 seconds to draw. This is Rick Astley, by the way.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dudeman313

What about something that's only 3 colors, in which most of it is blue and there are no curves?
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


c4ooo

Quote from: DJ Omnimaga on March 17, 2016, 12:33:52 AM
Pic/images on the home Screen are impossible. The only way is with CE Textlib but then it looks blocky as hell. There is probably a way that I'm trying to figure out right now, but the graphics would be slanted diagonally, so it won't be practical. The other way gives you a resolution of 13x59 pixels (stretched so that each pixel are actually 12x4 pixels large) and it takes a long while to load.

Otherwise you would need to learn C and do a library that can be used in TI-BASIC to display pictures.

EDIT @Dudeman313 this is probably the best quality you could get from a CE Textlib-generated image (this is a mockup. I didn't do a converter nor anything):



It would probably take close to 50 seconds to draw. This is Rick Astley, by the way.
That looks kinda cool though ^.^

Powered by EzPortal