COLOURED TEXT in KOS HOW?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
reaper2k2
DC Developer
DC Developer
Posts: 2648
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

COLOURED TEXT in KOS HOW?

Post by reaper2k2 »

Well ive got sick of white is there a simple function to turn the text printed to the screen with kos to new colours as if i change the background screen colour


the text allways has black colour around it and thats just annoying

(around the text the screen colour does not change)

thanks ive not seen the colour of the text changed in kos yet
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

Hmmm, you just recolor the quad the text is textured onto. That's why all of the textured fonts are defaulted to white, because it won't distort the color of the quad.
No signature.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

OK thanks toastman give it more of a look!
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

If you're rendering to the framebuffer, it's harder to change the colours. It's much, much easier to load the font as a texture, and draw each letter as a quad. If you load the texture as something that has an alpha channel (ARGB4444, ARGB1555), loading the font data into the alpha map and having the colours as all white, you can draw each letter as a transparent quad, and change colours.

I think KOS has some functions to do all that somewhere, but I never use them.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

Parallax and dcplib do.
It's pretty simple to do with KGL as well.
No signature.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

Interesting have to have a go at this . Im rendering to the framebuffer so that prolly why ive this much trouble ...

any one got a example bit code rendering to the framebuffer as a new colour

print one letter on the screen would be fine in the meantime im going to try write one thanks guys for the reply's
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Post Reply