Homebrew Displaying images (JPEGs)

  • Thread starter Deleted User
  • Start date
  • Views 1,621
  • Replies 4
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 ,

pembo

Well-Known Member
Member
Joined
Jun 1, 2009
Messages
105
Trophies
0
XP
121
Country
diego_pmc said:
I've been trying to figure this out for quite some time, but I always got to a dead end. I tried using the method described at the CodeMii tutorial, but it's not a very nice way to do it; I've tried using several third-party libraries, including GRRLIB, but this one's not good for me either. Images are very easy to display with GRRLIB, but I also have a lot of text in my game, and it's very hard to work with text (the way I need it) in GRRLIB.

So my question is, what is the optimal way to display images, keeping in mind that these are my requirements:
  • If it's a library it must not be in conflict wih 'printf' (GRRLIB, for example, is);
  • I need to be able to specify its position (this will probably not be a problem
    smile.gif
    );
  • I need to be able to stretch the image on the whole screen;
  • I need to be able to remove the image;
  • I need to be able to print text over the image.
So can anyone help me with a recommendation, and perhaps a template? (libjpeg maybe?)

it's not particularly easy to mix images in with a console mode application.

If you want to use images, I'd recommend using GRRLib as a starter, though you can't then use console text, so you have to use the GRRLib commands to put text onto the screen, i.e.

CODEGRRLIB_Printf(380,370, tex_font, 0xFFFFFFFF, 1, "This is some text!");

where tex_font is the image file containing the font.
 
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 ,

pembo

Well-Known Member
Member
Joined
Jun 1, 2009
Messages
105
Trophies
0
XP
121
Country
diego_pmc said:
GRRLIB is the first thing I've tried, but it is not very good at doing what I need in terms of text. When I call GRRLIB_Render(), the library renders everything I've told it to render until that point, then if I try to add something to the screen I have to call GRRLIB_Render() again, which will remove what's already present on the screen — this makes GRRLIB not the best choice for me.

you really have to run GRRLib in a loop where each iteration you draw the images, the text, etc, then call render when you want to show these to the screen.
Just put the render at the end of the loop once only.

Almost all graphical libraries work in a similar way.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
look at any of wanin's apps or even cfg loader. there really isnt a library that uses a console and shows images. why do you want to keep the console so bad? being able to show text in any font is better than being stuck with the same small, ugly font. check the source for my brawl+updatifier. i made a console in libwiigui

it doesnt act exactly like the traditional one, but it can be changed around however you like it.
 

Similar threads

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol