C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; yaustar - It seems gluLookAt has all glLoadIdentities point to where the camera is, which is where my person is. ...
-
02-17-2007, 02:42 PM #2821words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
yaustar - It seems gluLookAt has all glLoadIdentities point to where the camera is, which is where my person is. After removing the glLoadIdentity() from my cube function, it draws the cube just as i wanted.
Ok, now the only thing is, can I use glPush/PopMatrix to be able to translate, and still go back to 0,0,0 without calling glLoadIdentity, or after all drawing is done after translating to where i wanted and retranslating back negative whatever i had before... ahh its hard to explain. Can i do this:
Would the above draw 2 cubes at 10,4,10, or would it drawone cube at 10,4,10 and one at 0,0,0?Code:glPushMatrix(); DrawCube(10,4,10); // x,y,z are the arguments glPopMatrix(); DrawCube(0,0,0);
If it does draw 2 cubesat 10,4,10, than can ido this to compensate:
Code:DrawCube(10,4,10); DrawCube(-10,-4,-10);

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-17-2007, 03:10 PM #2822Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Both of your code samples will work SG57.
I'd recommend using push/pop or using something like:
Code:glLoadIdentity(); DrawCube(10,4,10); // x,y,z are the arguments glLoadIdentity(); DrawCube(0,0,0);

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
02-17-2007, 03:13 PM #2823words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Thats just it though, it seems when using gluLookAt (im using it for my camera class, so i can move around, look around, etc.) it resest the view matrix to my camera, so calling glLoadIdentity() than drawcube(1,1,1), it draws my cube where my camera is + 1,1,1. But your saying hte pushing/popping of hte matrix will work? Either way, Id get it to work as reverse translating would be hte same as reloading the identity.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-17-2007, 03:55 PM #2824QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
I have made a game. When the game is complete, i want to be able to restart the game. I am looking for a method to restart the application. Any ideas? Would calling the main loop work?
...Just Returned To The Scene...
-
02-17-2007, 03:57 PM #2825QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
It has been a while since I used OpenGL, this *should work*
Zitat von SG57
glLookAt
glPushMatrix
glTranslate
// Draw the first model
glPopMatrix
glPushMatrix
glTranslate
// Draw the second model
glPopMatrix
-= Double Post =-
No.
Zitat von JaSo PsP
Code:bool exitFlag = false, resetFlag = false; while( !exitFlag ) { // Reinitialise the game while( !resetFlag ) { // Run the game if( /* the reset condition is met */ ) { resetFlag = true; } } // Deinit the game resetFlag = false; }Geändert von yaustar (02-17-2007 um 04:03 PM Uhr) Grund: Automerged Doublepost
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-17-2007, 04:30 PM #2826
Zitat von JaSo PsP
just some help from my part;Code:continue; Or Use goto
-
02-17-2007, 04:38 PM #2827QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Woah. Goto == bad. There is on one real reason to use goto in code and that is to get out of a REALLY nested loop/if statements. Goto in general confuses the compiler so it won't make the best optimisations and also VERY prone to spagetti code and is a maintenence nightmare. You don't need goto for something this simple.
Zitat von Mr305
Continue just finishes the current loop immediately. It doesn't really reset anything.[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-17-2007, 05:57 PM #2828QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
yet again, this (i hope) should be a fairly simple question, how do you play sounds on the psp?
-= Double Post =-
O also, How do you make the "printTextScreen" text bigger, (is there a way?) or can you load true type fonts?Geändert von BlackShark (02-17-2007 um 06:16 PM Uhr) Grund: Automerged Doublepost
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-17-2007, 06:18 PM #2829words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
I was told goto and continue statments should be avoided at all costs. So, I didnt learn how to use them :P Im sure it's something like:
Im sure it's wrong, but from a logical point of view, thats how Id imagine it works... Its probably for hte best i dont learn them, else ill try to use them in situations where i have no other choice (that i know of).Code:constructor: score = 0; life=100; // basically run through whole code, from the start of 'main' ... if(life<=0) { goto constructor; }
I can load and render MD2 models and there animations now very easily, ive been able to since last summer, but until now i could never get the rendering correct since when i translated my model, itd always move with the camera. This was good, but only for the characters model :P
Anyways... Ill post back here with another question/problem. One will most likely be collision, Ill be doing either bounding box collision in 3 dimensions, or sphere-sphere collision insomniac mentioned to me... Can anyone possibly paste the function for one of them? If not, thats fine, ill go googling around and find one, and port it to C/C++ if necessary.
BlackShark - How about you take the initiative and SEARCH. The SDK has audio samples. As for the printTextScreen, you CANT change hte font size, and you CAN load and display TTF fonts (which can be scaled in size and whatnot incode). Try searching for a change... FLIB i believe its called.
-= Double Post =-
ahhh... Ok, i need someone to look at my code. After changing all my macros to constants, and changing all things like 'macro*2' to there actual values) Now its all screwd up :-\ Ive tried changing them all back, but its still happening, meaning i havent changed everything back... Im sure theres just some bug that is making hte camera move out in the middle of nowwhere. I mean, it should atleast show the 200x200 grid that is around thecamera, but it doesnt... So, insomniac/yaustar (raphael probably won't want to help sincehe's away from his computer.... or he might not want to help period
) if you are feeling generous, could you help if i dont eventually get it tonight? As I said, it's probably a novice mistake, so it should stick out i hope (although it isnt sticking out for me...). Thanks alot if you canhelp, im just starting to find my models and whatnot, so having to stop and debug is kind of a let down :-\
-= Double Post =-
I know how much all of you were dying to help me with my problem [/sarcasm] but Ive fixed it. Turns out my little tweakings led to a push/popMatrix error, which led to unknown results which endep sending my camera flying randomly 8-|
Now, Im getting back to actual fun stuff... Time to render alot of MD2 models, animate each one by the same animation number, and see which one i like... Oh and my game im planning on creating, is a type of sword fighting survival game... You go into a room, you fight an enemy, if you win, you go to the next room and fight either: the same guy but with a different skin, or scaled bigger, or better health or better strength and whatnot. Or, a completely diferent model. I hope to have it after you get past every 5 rooms, you have a different weapon. I have a whole surplus of MD2 models, and weapons and all there animations, so given timethis will work. And best of all, the collision shouldnt be too difficult. If you wswing your sword and it collides with teh enemy (give or take a unit or 2) and the sword collides with the other model, it hurts them. The problem that is closest to me in code is the tesselation of the rooms walls. I know each room can be a skybox which i will be doing, but first i need to write the function that Raphael posted an example, im just procrastinating as i really dont want to do the math and work it out so all 6 faces of the room are drawn without culling :\ Id absolutly love if someone else did
Save me the headache, but im a novice, so it might be best if i do it myself...
Geändert von SG57 (02-17-2007 um 11:26 PM Uhr) Grund: Automerged Doublepost

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-18-2007, 12:14 AM #2830QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
mm, im having trouble introducing a state system, what im trying to do is first define the state like...
bool gState = "menu";
then ill try to make loops that happen when in that state, like
while (gState == "menu") {
blaba bal
balb al bal
interger 1337 bla counterstrike bap
blaj baoi }
so fare i tried adding just those to but i get errors such as,
'bool' undeclared (first use in this function)
syntax error before 'gState'
'gState' undeclared (first use in this function)
any suggestions?NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-18-2007, 01:10 AM #2831words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
I suggest you read up on the bool data type (booleans are either true or false Also, Ill spare you the bash and just say, either include typedef.h or copy and paste:
into your code. But enumerators arent that necessary when you can simply use the integer data type, along with 2 macros (or const if you wish)Code:typedef enum _bool { FALSE, TRUE } bool;
or you can even go a step further:Code:#define true 1 #define false !true int my_bool = false;
Anyawys, for your case, youd have to use C++ to compare strings using the == operator, else youll have to use strcmp or some other method .. But, i highly recommend using macros as they would take up 2 bytes or so (i think its 2 bytes for just a whole number), compared to the 2 bytes per-character if you were to use a string (i think it's 2 bytes per char.. or is it 4?) This is what im talking about:Code:#define true 1 #define false !true #define bool int bool my_bool = false;
Code:#define menu 1 int game_state = menu; ... while(game_state == menu) { ... }
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-18-2007, 01:25 AM #2832QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
a boolean is generally a variable that is made to hold two states: TRUE or FALSE. You are trying to assign it a string. That won't work. Apart from that, there's no default bool type defined in GCC (you'd have to do it yourself through a typedef int bool;).
This will work because you are having constant strings in memory and assigning a pointer to the string to the variable gState. Don't get the idea that it actually copies the string "statex" into the variable gState, or that you can compare two strings with 'string1 == string2'. It only works because they are always different in this case, if the pointers are different.Code:char* gState = "state1"; while (gState=="state1") { ... // some condition gState = "state2"; }
However, for your minds' sake, I would recommend you try to define states through integer values as most people do it.
@SG57: Try to come up with that yourself, really. It's not hard at all, you just need to concentrate on what you want to achieve (create a tesselated unit cube) and go through the single steps of my sample code and think up what it actually does, then change it so it fits your need. Most of the time you'll only need to swap around two of three coordinates in my code to get another cube face.Code:#define STATE1 0 #define STATE2 1 ... more int gState = STATE1; while (gState==STATE1) { .... // The same gState = STATE2; }Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
02-18-2007, 02:23 AM #2833QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
hmm, I dont quite understand whats going on? How do I 'Deinit' the game?
Zitat von yaustar
...Just Returned To The Scene...
-
02-18-2007, 03:01 AM #2834QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Ok, I rephrase that:
Code:bool exitFlag = false, resetFlag = false; while( false == exitFlag ) { // Initiialise the game. Allocate memory, set values correctly etc. while( false == resetFlag ) { // Run the game if( /* the reset condition is met */ ) { resetFlag = true; } } // Clean up the game. Free any allocated memory, resest values etc resetFlag = false; }[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-18-2007, 04:22 AM #2835words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Raphael - Didnt I say a variation of what you said ;) As for the tesselation (god i love that word... its just so... foreign to me...) I know, Ill probably just treat one value as a '1', and the other as 0. Than, ill compare your set of verticies to a cubes set, and replace all 1s with there respective values, and 0s with theres. Its hard to explain it, but I understand it, and I know i can do it myself, i just am procrastinating the headache I have a feeling ill get

Also, 10, ~1,000 poly, animated-textured MD2 models of a knight and his sword (so its 20 models, since tris + weapon), running at around 30 FPS. (sorry for the attactment, i cant upload it to my site at the moment) Thats promising :) That means i can have around 7,500 (im averaging) poly's for a decent game all rendered at once... Yay :)
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-18-2007, 04:32 AM #2836
Can someone tell me how exactly (and/or provide a sampleà to print a png on the screen using Gu ? i have one way to do it, but it's really dirtry coz it implies blitting the images then start gu and finally draw what gu has to draw, and then flip the screen. This causes an huge performance loss and I think it would be better to use Gu (less graphics bugs than the described "workaround" (we can see the screen flicker when an mp3 is played)), but I really ain't able to use Gu properly by unterstanding it's parameters. You'll understand why I ask :)
Basically, what I want to do is to draw a background under the "donut" gu example (celshading), already managed to print texte, but I don't undersand for png files.
-
02-18-2007, 05:05 AM #2837words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
DreamTeam - Simple; map your PNG texture onto a quad, and scale it so it fills the screen (or us an ortho view, but i dont know if you can z-order it so the torus is infront).

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-18-2007, 09:21 AM #2838QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
thank you very much! it works very well!
Zitat von yaustar
...Just Returned To The Scene...
-
02-18-2007, 10:18 AM #2839Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
7,500 isn't a lot really at 30 FPS. Once you add sound playback, collisions etc etc that'll drop dramatically.
Zitat von SG57
That's 225,000 triangles per second.
For comparison I'm pushing around 20,000 triangles with 3 lights, full audio playback, collisions etc etc at around ~120 FPS.
That's 2,400,000 triangles per second - a big difference :)
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
02-18-2007, 10:34 AM #2840QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Thank you SG57 and Raphael, very helpful

EDIT: nice screen there SG :)Geändert von BlackShark (02-18-2007 um 10:45 AM Uhr)
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-18-2007, 12:47 PM #2841Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
error
Code:/tmp/pspdev/pspsdk/src/startup/crt0_prx.c:88: undefined reference to `atexit' /tmp/pspdev/pspsdk/src/startup/crt0_prx.c:94: undefined reference to `exit' /usr/local/pspdev/psp/sdk/lib/libpspdebug.a(scr_printf.o): In function `pspDebug ScreenPrintf': /tmp/pspdev/pspsdk/src/debug/scr_printf.c:168: undefined reference to `vsnprintf ' collect2: ld returned 1 exit status make: *** [file1.elf] Error 1
Code:TARGET = file1 OBJS = main.o BUILD_PRX=1 PRX_EXPORTS=exports.exp USE_KERNEL_LIBC = 1 CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBS = -lpsppower PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
i found its because the USE_KERNEL_LIBC = 1
(it compilles fine as eboot) , how do i fix this?
-
02-18-2007, 03:34 PM #2842QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
when making a game have hi scores, how would i go about saving them to a file so it cant be altered by anyone exept the PSP?
...Just Returned To The Scene...
-
02-18-2007, 04:19 PM #2843words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
JaSo - You'd have to encrypt the highscores file. As for read/writing to and from it, google fread and fwrite. Or, use the PSPs sceIo* functions, but thos ehave less documentation..

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
02-18-2007, 11:51 PM #2844QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
I got a problem with a while loop, when i run it the Menu works Perfectly, but when i press X on Zombie hunt (the first option) i have it go to another loop, all it should do is desplay a background, and stay there untill START is pressed, then it should go back to the menu, but when i press Zombie Hunt, it crashes, Here is the While Parts of my code,
Spoiler for Code:
any thing obvious that would make it crash? (it compiles and runs the menu correctly)
EDIT: My code really is Indented but it isn't in this post, just to make that clear :PNEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-19-2007, 12:29 AM #2845QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Your level1b is NULL or just not loaded correctly?
Also, you should think about putting your "STATE2" loop into a seperate funtion and just call that when the first option is selected. That saves you a lot of while(while(while(while repetition.
Also, try using sceKernelDelayThread(micr oseconds); rather than that ugly looped VBlank that just takes 1/6th of a second. sceKernelDelayThread(1000 *1000*1/6); would be equal but only one line. Plus you can easily change the delay to any amount of seconds.
PS: You could also have relabeled my STATE1/STATE2 defines :PRaphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
-
02-19-2007, 12:46 AM #2846Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
I need help
evrytime i want to do something new it goes wrong
i cant make
a VSH prx
install zziplib
install prxtool
intstall freetype
i always read the readme and the how to install
has this something to do with my toolchain or something?
-
02-19-2007, 08:27 AM #2847
A huge problem.
Did any one ever experience a problem with Start?
even if I press it once, it acts as if the button's pressed twice, breaking the loop!
OR is my button faulty?
-
02-19-2007, 11:11 AM #2848QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Random Numbers. I need to be able to create random numbers between two integers. I dont have a clue how to get started on how to create a random seed and display a number. I need some in-depth help on how to do randoms. Post an example maybe? I need to know the libs used too, and what to put into my makefile. Thanx very much in advance.
...Just Returned To The Scene...
-
02-19-2007, 11:12 AM #2849QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
thanks very much for your help (also i was going to change the STATE names but thats what they really were, STATEs, so i just decided to keep them, but looks like i won't need alot of them much longer, thanks again!
Zitat von Raphael
EDIT: alright this should be about the last question I but you with for now,
but how would i go about making a 4 direction bullet system and how do I implement the analogue stick?
-= Double Post =-
Zitat von JaSo PsP
Try defining this above your while loop...
Then call it like,Code:int GetRandomNum(int lo, int hi) { SceKernelUtilsMt19937Context ctx; sceKernelUtilsMt19937Init(&ctx, time(NULL)); //SEED TO TIME u32 rand_val = sceKernelUtilsMt19937UInt(&ctx); rand_val = lo + rand_val % hi; return (int)rand_val; }
Code:GetRandomNum(*INSERT # HERE* , *INSERT # HERE*)
O yes, and MAKE SURE that you put
up were the rest of your #include's are let me know if this works for you.Code:#include </usr/include/sys/stat.h>
Geändert von BlackShark (02-19-2007 um 08:43 PM Uhr) Grund: Automerged Doublepost
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
02-19-2007, 11:36 PM #2850QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Ill try it when i get home from school, thanx
Zitat von BlackShark
...Just Returned To The Scene...


LinkBack URL
About LinkBacks
Mit Zitat antworten


Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum