NOOB: How to blit images & print to coordinates?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

NOOB: How to blit images & print to coordinates?

Post by JoshDB »

Yep - Noob question. How do I blit images or print text to coordinates? I've already successfully created the Hello World application, along with a counter, and a program that animates a smiley when you press O. Yeah, simple stuff... Anyways, I haven't even blitted yet, so if you can lead me in the right direction atleast there then I'll figure out how to blit to coordinates...

I already know LUA and some other scripting languages (AutoItv3 and ACTS, mostly), but I want to learn C for more flexibility. So far it's not so easy :p

Thanks,
~JDB
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

On blitting - I found a little out, but I'm still stuck. I check the SVN at PSPDev.org and downloaded zlib and libpng. I extracted them and placed both of them in my home/user/** directories, ** being zlib and libpng. I directed cygwin to the zlib directory and entered 'make', and it did so. I went into the libpng scripts directory and copied makefile.cygwin to the parent dir of libpng and renamed it to Makefile - Sent 'make' to the dir, and it installed for a while... Then it said
make: *** No rule to make target 'scripts/png32ms.def', needed by 'libpng.def'
Stop.
I don't really know if I properly installed zlib, let alone libpng.

Help?
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

Hi JoshDB,
I'm presuming that you downloaded the SDK to somewhere on your HDD.
CD into your zlib folder and type 'make', once that is completed type 'make install' and the necessary files will be copied into your Cygwin PSP folder.
Do exactly the same for libpng, it'll all get copied automatically to the correct folders again with the 'make install' command.

Hope that helps.

Cheers,
71M
Paco
Posts: 54
Joined: Sun Oct 09, 2005 6:53 pm

Post by Paco »

JoshDB wrote:copied makefile.cygwin to the parent dir of libpng and renamed it to Makefile
You tried to compile libpng for Windows / Cygwin, not for PSP.
Paco
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

I used make install on zlib and it worked like a charm - But I can't find the libpng for psp. I know it's in the svn at ps2dev.org, but how the hell do I download it!? All I can do is view the files through the svn browser...

Anyways, thanks guys. Atleast I got zlib ready to go.
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

Install http://tortoisesvn.tigris.org/ and then browse to the libpng folder as usual, right click the libpng folder and select 'Export'
It'll then ask you were you want to download the folder to, nice and easy :)

Cheers,
71M
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

You're a godsend, 71M.

I got the files out of the repository. Staright from there. I tried sening 'make' to it (it was in the psptoolchain folder, name 'libpng.' zlib was already installed.), and it gave the same error. I copied the make.filecygwin and renamed it again, and it got further... Still stopped, though.

Damn, I'm thinking of going back to LUA.
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

Just to make sure you're doing everything right, download www.easy-monkey.co.uk/libpng.rar
Extract the package to c:/temp, open Cygwin, cd into c:/temp/libpng and type make.
On my install it then goes away and compiles libpng correctly.
It'll be interesting to see what it does on your installation.

Cheers,
71M
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

make: *** [png.o] Error 1

That's preceded by about 60 lines of pointer errors.
71M
Posts: 122
Joined: Tue Jun 21, 2005 5:28 am
Location: London

Post by 71M »

Hmm, that leads me to suspect that something is either incorrect with your Cygwin installation or your PSPToolchain installation.
Could you post the full error message please?
Akimaru
Posts: 1
Joined: Sat Nov 19, 2005 8:15 pm

Post by Akimaru »

Install Zlib first Rename the folders "zlib-x.x.x" and "libpng-x.x.x" (x.x.x is the version number) to zlib and libpng...put them both in the same parent folder
so you have:

From Install file

Code: Select all

Your directory structure should look like this:

   ..       (the parent directory)
      libpng  (this directory)
          INSTALL (this file)
          README
          *.h
          *.c
          contrib
             gregbook
             pngminus
             pngsuite
             visupng
          projects
             beos
             c5builder (Borland)
             visualc6 (msvc)
             netware.txt
             wince.txt
          scripts
             makefile.*
          pngtest.png
          etc.
      zlib
          README
          *.h
          *.c
          contrib
          etc.
this should solve your problem.
Post Reply