Homebrew GRRLIB help

  • Thread starter Deleted User
  • Start date
  • Views 1,810
  • 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
1
XP
59
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
1
XP
59
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
  • Sicklyboy @ Sicklyboy:
    real
  • K3Nv3 @ K3Nv3:
    Master potter
  • Sicklyboy @ Sicklyboy:
    Harry-117
  • K3Nv3 @ K3Nv3:
    Wonder if they ever have missprints like that I wanted John Lennon not Chris rock!
    +1
  • Sicklyboy @ Sicklyboy:
    Sometimes yeah but it doesn't seem to be a super common thing, mostly just like a "whoops, some labels for the wrong record got mixed into the stack somehow, nobody noticed, then someone else further down the process went wait how did album B get mixed in with album A, let me put those in the right pile" sort of thing.
  • K3Nv3 @ K3Nv3:
    Biggie smalls wasn't supposed to be on that Tupac song
  • Veho @ Veho:
    And now they're both dead.
  • Veho @ Veho:
    Coincidence?
  • Veho @ Veho:
    I don't think.
  • Veho @ Veho:
    No, really. I don't think. Too much work.
  • SylverReZ @ SylverReZ:
    Conspiracy?
  • Sicklyboy @ Sicklyboy:
    @Veho, huh, that's pretty neat, never seen those
  • Veho @ Veho:
    Yeah, I love those mechanical games, they have a ton of charm.
  • SylverReZ @ SylverReZ:
    One of my family members have one of those Grandstand LCD games.
  • SylverReZ @ SylverReZ:
    Not related to Tomy but I thought I would share. :P
  • Veho @ Veho:
    Were those even LCD, or did they have tiny lamps inside?
  • SylverReZ @ SylverReZ:
    @Veho, They were LCD games if I'm not mistaken with lamps inside.
  • SylverReZ @ SylverReZ:
    Took full sized C cell batteries.
  • Veho @ Veho:
    In the distant past before all these fancy solid state electronic gizmos, there were segmented displays with tiny lamps under each segment instead of one backlight and then an LCD overlay.
    +1
  • K3Nv3 @ K3Nv3:
    Yay chemical tube lighting doctors hate led
  • Veho @ Veho:
    A vacuum tube a day keeps the doctor away. Or something.
    Veho @ Veho: A vacuum tube a day keeps the doctor away. Or something.