Welcome! Log In Create A New Profile

Advanced

Drawing images?

Posted by profetylen 
Drawing images?
April 07, 2009 11:38PM
How do everyone do this (I'm new to this)?

I have went trough all the tutorials from codemii. It tells me how to display jpeg images, but that it isn't the best way to do graphics. What do all of you recommend? And how do I exactly load the image-files. Do I need a picture.s-file for that?
My C knowledge is not very good ATM but I'm learning.

Thanks in advance.
Re: Drawing images?
April 08, 2009 12:34AM
Use either of the three following libs to help you:

Libwiisprite, GRRLIB, libwiigui (<-- Reccomended)

Or you could go on a lower level and directly use libjpg or libpng.
Re: Drawing images?
April 08, 2009 11:10AM
Yes, I have tried libwiigui.

The problem is I can't figure out how it works. I have read everything on the wiki page, but it only tells me to learn from the included example. However, the example doesn't have a .pnproj file so I tried to check it out with the classical Notepad. However, to me all the files just displays random inunderstandable stuff and I don't know where to start.
Re: Drawing images?
April 08, 2009 08:48PM
Thanks for the feedback. I didn't think to include a project file for Programmer Notepad, since I don't use that. I'll include one in the next version.
But, I've made one for you and you can download it here: [libwiigui.googlecode.com]

Just save that file into the main libwiigui folder, alongside the Makefile.

Hope this helps.
Re: Drawing images?
April 08, 2009 09:41PM
The programmers notepad project files from any of your other projects will work fine with compiling this.
Re: Drawing images?
April 09, 2009 01:02AM
Or within Programmer's Notepad, you can open the Makefile, and compile. The project file just lets you browse the listing of files associated with the project.
Re: Drawing images?
April 09, 2009 06:00PM
Hm, thank you, but I still cannot compile this.

When i tried it gave me this error:
> "make" 
FreeTypeGX.cpp
In file included from c:/Projects/wii/libwiigui/source/FreeTypeGX.cpp:23:
c:/Projects/wii/libwiigui/source/FreeTypeGX.h:155:22: warning: ft2build.h: No such file or directory
c:/Projects/wii/libwiigui/source/FreeTypeGX.h:156:10: error: #include expects "FILENAME" or 
c:/Projects/wii/libwiigui/source/FreeTypeGX.h:157:10: error: #include expects "FILENAME" or 
c:/Projects/wii/libwiigui/source/FreeTypeGX.h:158:25: warning: Metaphrasis.h: No such file or directory
make[1]: *** [FreeTypeGX.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:01

What will even happen when I succeed compiling it?
All I try to do is to learn how it works, but I don't know where I should look for that information.

Can I have extracted the libs in the wrong place?
I put them in "C:/devkitPro/libogc/".
Re: Drawing images?
April 09, 2009 06:41PM
That's the right place, but you're doing something wrong, somehow...

ft2build.h should be at:

C:/devkitPro/libogc/include/ft2build.h

If you can't find it, redownload the libs from the libwiigui site and try again.
Re: Drawing images?
April 09, 2009 07:20PM
The file actually is at "C:\devkitPro\devkitPPC\include". (I have checked at least 10 times and I'm absolutely certain it's there.)

So it seems like Programmers Notepad doesn't find the libraries. Is all I have to do to extract the files in the correct directory for Programmers Notepad to know that they are there or must I tell it someway that I have put them there?
Re: Drawing images?
April 09, 2009 08:15PM
You would have to tell it where you them in the Makefile.

Or, just move the files to where I said to put them - C:\devkitPro\libogc
Re: Drawing images?
April 10, 2009 12:38AM
Aaaahahhahaa! That was what was wrong! They weren't at the right place!

Thank you very much for helping me out with this!

I have one more question though:
How do the compiler know which files are being executed first?
Is it all the header files or something or all the main loops?
Can there be only one main loop?
Or is the information in the makefile?

OK, that was four questions...
Very nice GUI by the way!!
Re: Drawing images?
April 10, 2009 04:59AM
Ok i can't get it to compile. I installed the neccicary library's and include files. I just copied the contents of the folder into another folder onto my desktop and used command line make. I have also tryed with pn2.
Am I even supposed to compile the file?
Here is the error
make[1]: /c/Documents: No such file or directory
make[1]: *** No rule to make target `/c/Documents'.  Stop.
"make": *** [build] Error 2
Re: Drawing images?
April 10, 2009 06:39AM
are there spaces in the path? Your source files shouldn't be in a subfolder that includes spaces.
Try moving it to c:\Projects or something
Re: Drawing images?
April 10, 2009 10:38PM
Yeah, the makefile sucks and can't take spaces in the path, since it doesn't properly escape the commands.
Re: Drawing images?
April 10, 2009 11:51PM
It worked :)
Sorry, only registered users may post in this forum.

Click here to login