Well write this one in the books, I can help.. a little :X
Im not sure why the samples do it this way. What they've done, is converted ( using the program bin2o ) the image ( logo.raw ) speicified in the makefile, into a linkable object file. So the image ( i believe ) is statically built into the executable.
I dont see how the variable logo_start is referenced anywhere else? Its not in the makefile, or anywhere else in the program.
So, Ill be looking into loading raw files by hand, where you can do a fopen, parse and close. Im tring to get far enough in development so I can post a bunch a samples to encourage others to get into developing for psp.
I found an example last night of how to parse bmp and jpg files. Altho, im sure this is not optimal, the raw images do not have headers and are probably as small as images can get file size unless they are compressed.
not sure about the alpha? I havent got this far, but im sure there are texture states you must set to activate transparancy.
Last edited by Stellar on Thu Jan 12, 2006 11:32 pm, edited 1 time in total.
At the expense of a larger executable and always having it in ram. The only images I might do this way, are images that would always be used in a game, like a menu background mabey.
Psp development is very different. If you were to write a small demo, all the textures would have to be loaded to ram anyway. A game however changes them depending on the current map/level.
well actually i do not care if i have to link images into my PBP or load em (at least at my current status)
but i would like to know how i can define where i can load it (i can build the objects as i can use the sample makefile and mod it...)
@alpha, the interesting part is i can save RGB with Alpha to raw in photoshop;
when i load it again, its CYMK without alpha?!
EDIT: if i open this file again and add another alpha layer... the image is fucked up so.. bad luck
is there a way to load up PNG images as textures, would be nice due they do have alpha channel and 32bit :))
greets
lumo, who is still testing...
"Good artists copy, great artists steal." Pablo Picasso go2lumo.com
the logo_start is defined in the logo.o file and search the forums, theres info about loading up pngs, and as for alpha ive yet to attempt it but i will in the next day or so so ill post my findigns here
nicoli_s wrote:the logo_start is defined in the logo.o file and search the forums, theres info about loading up pngs, and as for alpha ive yet to attempt it but i will in the next day or so so ill post my findigns here
i already write down png-screenshots, and able to load pngs, but not sure if its accepted as texture...
@Stellar
append _start ... good to know!
i know how to handle photoshop and the importing image problem is no real problem as i always keep my psd file :) but thanks for the link
greets
lumo
"Good artists copy, great artists steal." Pablo Picasso go2lumo.com
The default way the graphics.c library (from Lua) sets up the states with initGrapics() works for alpha blending. It's in the svn repository (google it or go to svn.pspdev.org).