Welcome! Log In Create A New Profile

Advanced

Can someone write me or find me a code for loading png to my game?

Posted by 11ssims 
Can someone write me or find me a code for loading png to my game?
April 24, 2011 11:48PM
I need to add a png image that needs to load up at the very beginning and stick with the camera and movements throughout....help??
Re: Can someone write me or find me a code for loading png to my game?
April 25, 2011 01:11AM
Have you ever written any code before? GRRLIB has some functions you can use and some examples. Or try using LuaForWii. Once you identify what you are using to program then it will be easier to help you.

If you want to go the easy root - the way of Lua coding, try download this application: [forum.wiibrew.org]

Download the application, put it on you sd card and then try editing the script.lua file which is in the apps folder



Edited 1 time(s). Last edit at 04/25/2011 01:23AM by owen.
Re: Can someone write me or find me a code for loading png to my game?
April 25, 2011 11:07AM
if you cant figure out how to use any of the readily available libraries, or copy the code from the thousands of programs that have png support, then i dont think youre gonna be able to white any portion of any game worth playing. using a png library and adding the 3 lines of code necessary to load a png is nothing compared to what i would take to write the rest of a game. especially any game that does something with "the cameras and movements" youre talking about.



Edited 1 time(s). Last edit at 04/25/2011 11:09AM by giantpune.
Re: Can someone write me or find me a code for loading png to my game?
April 25, 2011 09:03PM
alright first off i didnt ask for your criticism and ive already got codes for the camera and camera movement...so yeah.....I have been looking around and sorry i cant find it.
Re: Can someone write me or find me a code for loading png to my game?
April 25, 2011 11:47PM
Re: Can someone write me or find me a code for loading png to my game?
April 26, 2011 11:02AM
Yeah - I too find it a real pain to find things, wii brew can be kind of hit and miss, but that's just my opinion

Lots of good stuff hidden under [[List of development tools|Development tools]]

[wiibrew.org] (http://wiibrew.org/wiki/PNGU) is probably what you are after for PNG library support.
Re: Can someone write me or find me a code for loading png to my game?
April 28, 2011 02:26AM
I've given up on making homebrew... :/
Re: Can someone write me or find me a code for loading png to my game?
May 07, 2011 12:23PM
You can link the png to your code and then use a GRRLIB_texImg variable to load it like:

#include "example_png.h"

GRRLIB_texImg img = GRRLIB_LoadTexture(example_png);

Of course you makefile have to be modified (or copied from other program) to link the image.
Take in account the png resolution have to be multiple of 4.



Edited 1 time(s). Last edit at 05/07/2011 12:31PM by wilco2009.
Sorry, only registered users may post in this forum.

Click here to login