Homebrew GRRLIB help

  • Thread starter Deleted User
  • Start date
  • Views 1,673
  • Replies 3
D

Deleted User

Guest
OP
Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen. Lorem Ipsum is de standaard proeftekst in deze bedrijfstak sinds de 16e eeuw, toen een onbekende drukker een zethaak met letters nam en ze door elkaar husselde om een font-catalogus te maken.
 
Last edited by ,

usptactical

Well-Known Member
Member
Joined
Apr 7, 2009
Messages
317
Trophies
0
XP
49
Country
United States
diego_pmc said:
I have some questions about GRRLIB_Printf():

• How can I use one of the default fonts? For example, when I use the standard Printf(), the font used is Lucida Console; how can I use this in GRRLIB_Printf()?
• How can I make GRRLIB_Printf() print the text after the text that is already present on the screen? In other words, if here already is some text present on the screen, how can I make GRRLIB_Printf() know which are the x and y coordinates it should use to print the piece of text I give it?

You have to create a tilemap image of the font - WiiBuilder can do this for you. There's also a width limit on the image (1024, if I recall) so depending on font size chosen, you need to split that into 2 (or more) lines. It might be easier for you to just use FreeTypeGX instead.

If you want to print after that line, you need to keep track of the total width/height of the previous word/line based on the sum of it's tiles.
 
D

Deleted User

Guest
OP
Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen. Lorem Ipsum is de standaard proeftekst in deze bedrijfstak sinds de 16e eeuw, toen een onbekende drukker een zethaak met letters nam en ze door elkaar husselde om een font-catalogus te maken.
 
Last edited by ,

usptactical

Well-Known Member
Member
Joined
Apr 7, 2009
Messages
317
Trophies
0
XP
49
Country
United States
diego_pmc said:
Aha, thanks.
smile.gif

I want to ask another question: where can I get RGBA color codes that I can use with the GRRLIB functions? I've Googled (of course) but was not able to find any table that would give the the RGBA codes in the same format as the ones used in Sand Traps, for example, a game that also uses GRRLIB (e.g.: 0x0f0c03FF).

The colors are just basic hex codes plus alpha stored in a u32:

0xRRGGBBAA -> Red Green Blue Alpha

so 0x0f0c03FF would be Red 15 Green 12 Blue 3 Alpha 255
 

Similar threads

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    ButterScott101 @ ButterScott101: +1