1001th post! i am a winner
anyway, any help or update on the collision test/detection help yet? i do not even know here to start!
Printable View
1001th post! i am a winner
anyway, any help or update on the collision test/detection help yet? i do not even know here to start!
god, in wanted that 1000th post, u anus, :( not every day theres 1000 posts in a topic but i got 1001 which is better than 1000 so i win!
did u edit the cygwin.bat? i ddint and got that error, and if u did make sure ur Drive letter is specified (ehemm yeldarb, who told u about that in the first place, huh? huh? thats right me)Zitat:
Zitat von Rooster Cogburn
SG57 - On stopping an Mp3 after it has finished, put this command in a loop somewhere...
That loop can be one specifically for the music or a game loop.Code:if (MP3_EndOfStream() == 1) MP3_Stop();
Essentially, when madlib finishes an Mp3, madlib changes EOS (EndOfStream) to 1. Therefore, if EOS == 1 then it will stop the Mp3.
Sorry I forgot to mention this in the tutorial, will be mentioned in the one Yeldarb and I are putting together.
Dude, just come to the MD Party Room, we're almost on our 18,000th post.Zitat:
Zitat von SG57
If I want R trigger instead of X what do I change this to?
"pad.Buttons & PSP_CTRL_CROSS"
"pad.Buttons & PSP_CTRL_RTRIGGER"
Thanks, for the quick reply.
No problem. The various things you can put in place of cross are:
square
circle
triangle
ltrigger
rtrigger
up
down
left
right
start
select
All in caps of course. I am not too sure about the Home and other buttons though. Someone else can probably help you with that.
Can anybody help, keep getting the error "no rule to make target main.o". I think the problem is in my cygwin.bat file (I heard the location of the SDK chaned), but I have on Ideao what change it to. My program is the hello world from the second lesson.
How do I add another image to this?
Code:int main() {
char buffer[200];
Image* bar;
pspDebugScreenInit();
SetupCallbacks();
initGraphics();
sprintf(buffer, "bar.png");
bar = loadImage(buffer);
if (!bar) {
//Image load failed
printf("Image load failed!\n");
} else {
int x = 0;
int y = 0;
sceDisplayWaitVblankStart();
while (x < 480) {
while (y < 16) {
blitAlphaImageToScreen(0 ,0 ,480 , 16, bar, 0, 256);
y += 16;
}
x += 480;
y = 0;
}
flipScreen();
}
just put this under neath the bar = loadImage
its basically just the same as the one in the tut, except underneath the loops in the middle, just add what ni put into the correct placeCode:sprintf(buffer, "yourextra image here.png");
extra image = loadImage(buffer);
while(1) {
blitAlphaImageToScreen(all the same stuff here ya da ya da);
}
}
tailsnake - I knew I had seen your error before. It shouldn't have anything to do with your cygwin.bat
Ie, when I change my (working) example from main.o to hello.o it says -
make: *** No rule to make target `hello.o', needed by `mp3.elf'. Stop.
So that means that you have the wrong filename for your source code. Have you got the main source code as "main.c"?
-Edit-
If you're pretty sure you have the right extension, open Cygwin, go to the right folder, and type in ls (list directory) -
If you can't find 'main.c' or if you find 'main.c.txt' listed there then you know something has gone wrong.
Else, I'm not sure what to suggest, but the fact that I get the same error as you from a malformed Makefile suggests that the problem lies in the naming convention.
Hi,
In the 4th turorial it refers to graphics.h. Im not sure where I am supposed to find this, can anyone help.
thanks,
Marty
Martyburns - The link is in the tutorial, must have skipped over it. Anyway, it's here -
http://www.scriptscribbler.com/psp/t...s/lesson04.zip
thanks v. much.
Thanks, That solved my problem. Now live out my dream of writing code for a hentai game :icon_razzZitat:
Zitat von Smerity
wow... thats pretty 'interesting'... a hentai game...so far im all for SimGirl, but thats it
Anyone who pretty much knows what they're doing have time to proofread Lesson 06 for me? (It's not very long)
Sure!
Thanks, anyone else?
I'll have a look if you still need someone else :)
me also
Ok, well, I got one proofreader to get through it, so here it is
Lesson 06 - Adding Sound
Written by guest writer Smerity, editted and elaborated upon by me.
Hi Guys,
I don't know if I've posted this one before.
This was the reason I uninstalled the whole thing and started again re-downloading
cygwin.
I don't know why it would look in this directory after PSPide has been uninstalled.
This is one of the steps in Lesson 4.
I've never used PSPide so I don't know, but it could have altered some path settings. Maybe look in your registry for PSPide?
I did, cygwin deos put entries in there, but nothing I can't delete and have it
put back when installing another item.
This is out of the makefile for hello world:
include $(PSPSDK)/lib/build.mak
Is there supposed to be a lib direcory within the PSPSDK directory?
This line:
set PSPSDK=C:/cygwin/usr/local/pspdev
that you put in your cygwin.bat file redirects that to C:/cygwin/usr/local/pspdev/lib/build.mak
Did you remember to edit CYGWIN.bat?
Yes I did, but I don't have a PSPdev folder in my 'Art' directory.
At some stage while setting it up the PSPsdk directory was deleted.
It might have something to do with that.
I had to replace it with the same directory from the last install that I saved to DVD.
Sorry, that path is there, under usr dir, but no build.mak file,
only a 'gcc' folder, and a file called libiberty.a.
Is the biuld.mak small enough to post?
Art.
Yay,
I have a dual boot machine and I was able to get it going on my Windows 2000 installation.
For anyone who might be interested, cygwin leaves registry keys in at least two directories.
An entire Windows 2000 installation is straight foward to back up onto media though,
so this is easy to restore if there is a problem.
I would suggest never installing the program "PSPide".
Art.
Glad you got it working on at least one machine =)
Im trying to finish off Flashmod 3.0 with useing the 2.0 source and when I get to this I press R and it only goes to menu_three for a split second.Code:if (pad.Buttons & PSP_CTRL_RTRIGGER) {
if (menu == 1) {
screenblit(0, 0, 480, 272, menu_three);
flipScreen();
for(i=0; i<10; i++) {
sceDisplayWaitVblankStart();
}
}
}
EDIT: I just changed it to this and it worked.
Code:if (pad.Buttons & PSP_CTRL_RTRIGGER) {
if (menu == 1) {
menu++;
menu++;
flipScreen();
for(i=0; i<10; i++) {
sceDisplayWaitVblankStart();
}
}
}
Nice, already did that though, but very well written tutorial, maybe next could be a tutorial on how to add any 'sound' using mikmod? It loads .wav, .mod, .xm, and some other ones I can not think of right now.Zitat:
Zitat von Yeldarb
Ok, about that tutorial/.mp3. I have backround music playing ya da ya da all fine and all, and I have start stop and freetune the music and stuff, then bring me back to another source code, then when I go back to that source code again, it turns all black. This means the song/music did'nt "FreeTune"? Cause it stops all fine and it says frames decoded or whatever, and then the music stops, goes to menu, click X again to go back, it goes black. So basically, how do I get a .mp3 to be able to play more than once going in between sources?
I'm in the process of writing the next tutorial already; it's about the math library.
:humped: ...i love you...:humped:Zitat:
Zitat von Yeldarb
...but seriously, that's a good idea, these **** sqrt and Sin/Con are a pain, keep giving me implicate declaration :twisted:
actually, there are some new ones to that list:Zitat:
Zitat von soccerPMN
- square
- circle
- triangle
- ltrigger
- rtrigger
- up
- down
- left
- right
- start
- select
- Cross
- Note (music)
Maybe add something like that to that "If Statement" tut of yours Yeldarb? Just so people can "experiment"?
- Home (? it is but doesn't work)
Also, in SDL, isn't F12 the Remote thing Play/Pause button? I tried it but implicate declation!
*warning, extreme newb question*
is there any way for me to use Microsoft Visual Studio to do the programing, like droping in the libraries and such, cygwin download is hell
MPH developed a VS setup a while back. I can't seem to find it but I know it's out there.Zitat:
Zitat von Frozen
I'm not sure you'd find it any easier than the cygwin setup.
EDIT: Found it: http://mphwebsite.tuxfamily.org/index.php?program=10
Now read those instructions and learn to love your simple cygwin/toolchain installation ;)
I am having trouble with the dirent.h to read the files from the ms0:/PSP/MUSIC folder for any .mp3 inside. Shatterdome has told me how and gave me an example, and it complies right, but gives me an unrecoverable error (framebuff error (NULL pointer)) or something like that. Maybe something like:
? Yeldarb or someone, could you tell me what is wrong with this or how to read the MUSIC folder and feed the entrys into a buffer I can call using MP3_Load();?Code:char mp3list[20]; // 20 songs will be read
opendirectory = opendir("ms0:/PSP/MUSIC/.");
sprintf(mp3list, "%s", readdir(opendirectory));
MP3_Init(1);
MP3_Load(mp3list);
Shatterdome, yours complied right but didn't play anything, I'll keep messing with yours some more until I get an answer.
SG57 - I'm not 100% sure, haven't used dirent.h et al on the PSP before myself, but...
Pretty much, that means you're telling Mp3_Load() to load not a music file, but a struct containing information on the directory.Code:Upon successful completion, readdir() returns a pointer to an object of type struct dirent.
Because I haven't actually done anything similar before, I don't know the answer straight off the bat. In my head however, it goes something along the lines of parse the struct dirent into the different files, select one of the files, place it into 'mp3list' and then it should load in Mp3_Load.
If I get an answer, I'll post it.
Also, http://www.opengroup.org/onlinepubs/...h/readdir.html is pretty good reference for the readdir