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; Zitat von Grimfate126 in order to do animation, you will need to use a model file, such as md2, md3, ...
-
04-04-2007, 01:37 PM #3691
Just saw a few sdk samples about skinning all that...
Zitat von Grimfate126
But how do we render them onto screen [ex: a low polygon model]?
[No worries, space escape will still be in it's top most place :)
]
--------------
I donot see anything helpful by learning how to draw cubes, boxes on screen...
Anyone post any useful examples....
Are there any tutorials besides PSP-programming's Nehe OpenGL Ports?
Geändert von Mr305 (04-04-2007 um 01:51 PM Uhr)
-
04-04-2007, 02:24 PM #3692QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Wrong mentality. By learning how to draw textured cubes and polygons to the screen, you learn how to use the graphics pipeline. All models are are polygons that are translated, rotated, scaled and drawn to the backbuffer.
Zitat von Mr305
This is the kind of crap that I was talking about in this post:
Goodbye Homebrew - How the psp scene is dying and what could save it!
My advice to you several pages back was clearly ignored.
Learn OpenGL. Its the closest API to the GU I know of. The fact that are ****loads of tutorials and reference material on the Internet ALONE is reason enough. Once you have got the hang of OpenGL, learning the GU will be a **** load easier.[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]
-
04-04-2007, 02:30 PM #3693QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
I tried the sample. It didn't work. It froze when it said Loading Exec wait. Btw, i am using 3.10 OE-A. Does anyone know how to load a umd with 3.10 oe-a? I couldn't get the 4th brightness code i found at psp-programming either.
Zitat von hallo007

Also, does anyone know how to animate text? Like move it accross the screen or something?Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-04-2007, 06:06 PM #3694
Zitat von yaustar
If aneone happens to know any open source 3d prog please post a link...
[simple ones not psp quake]
Indeed, i read, re-read and tri-read those tuts...
-
04-04-2007, 11:25 PM #3695Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
never tried it but
Zitat von TMNT
you need the graphics.c from the luplayer , but i normally you got that already somewherCode:while(x++) { clearScreen(0xFFFFFF); if(x == 480) x =0; printTextScreen( x , 0 "HELLO WORLD" , 0x0000FF); flipScreen(); sceKernelDelayThread(100000); 1/10second , dont know thats enough or to much }
-
04-05-2007, 01:07 AM #3696QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Stop reading them and start doing them.
Zitat von Mr305
[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]
-
04-05-2007, 02:01 AM #3697Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
How do you change the name of your home folder???
"My name"
needs to become "myname"
-
04-05-2007, 03:11 AM #3698QJ Gamer Green
- Registriert seit
- Jan 2007
- Ort
- beside my PC
- Beiträge
- 520
- Points
- 6.446
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Zitat von Kwastie
this is menu in c?!? omg thats too long....
where did u learn that? i wanna learn C too!:)
how to access memory stick and flash with c?
something like file viewer?
-
04-05-2007, 03:27 AM #3699Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
1) cprogramming.com
2) dont touch flash if you cant program
-
04-05-2007, 04:29 AM #3700Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
that menu is a poor example of C. it can be made 1/3 of the size it is right now. why do you want to access flash? last thing we need is another flasher.
Zitat von ai3gtmc
--------------------------------------------------------------------------------------
-
04-05-2007, 07:25 AM #3701QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Anyone? I need help with using 4th brightness, loading umd, and/or loading eboots in custom firmware- 3.10 oe.
Zitat von TMNT
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-05-2007, 07:27 AM #3702Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
for brightness , use search or check pspdev.org forums
for the rest check the sdk samples
-
04-05-2007, 07:40 AM #3703Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
on 3.10 OE you already have 4th brightness so i find that pointless.
-
04-05-2007, 07:46 AM #3704QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
That menu is horrible if you are dealing with lots of items. I also made a menu like that, but when your menu has more than 4 items, that method it highly inefficient. Thanks to the help of someone, they pointed me in the right direction(no pun intended :| ).
Use pointers. :)
Something like that. Then use FUNCTION POINTERS.Code:int yourmenu(void) { char menutextarray[4] = { "Sel1","Sel2","Sel3", "Sel4","Sel5" }; while(1) { if(pad.Buttons & PSP_CTRL_UP) { selection++; } for(i = 0; i < 5; i++) { pspDebugScreenSetXY(0,0); printf("%s \n",menutextarray[i]); } } }
then you have the functions...Code:void (*menufunction[TOTALMENUITEMS])(void) = {selection1,selection2,selection3,selection4};
Im away from home right now, so I cant explain much until saturday. Ill make any corrections on Saturday too due to the fact I am doing this from memory -_-Code:void selection1(void) { printf("This is selection 1"); }
That is how you would select the function that corresponds to the text printed to the screen.Code:(*menufunction[selection])();
Thanks to the one who showed me this method btw if you are reading this, which i doubt
.
-= Double Post =-
:|
Zitat von eldiablov
Not everyone is on 3.10OE. He didnt ask if that function was built in. He asked how to implement it into a program.Geändert von Moca (04-05-2007 um 07:48 AM Uhr) Grund: Automerged Doublepost
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
04-05-2007, 07:54 AM #3705Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
i dont like your menu either

i work always with 3 loops
first loop
another loop for the menu printf (in char menuoptions =....) (with for loop)
another for the buttons and if option change , just break , it's easy and small;)
-
04-05-2007, 08:13 AM #3706QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Here's a new word i learned. Concatenate. :)
Zitat von hallo007
There is a C function that joins strings of text.
Take a look in string.h. strcat is the function.
-= Double Post =-
Wow. Sounds horrible.
Zitat von hallo007
Mind posting a sample of it? Im guessing it looks something like what Kwastie posted which is simply, ugly. Theres only 6 selections, and look how much space it takes up.Geändert von Moca (04-05-2007 um 08:18 AM Uhr) Grund: Automerged Doublepost
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
04-05-2007, 08:58 AM #3707Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-= Double Post =-Code:pspDebugScreenClear(); // Clear the Screen // pspDebugScreenSetXY(0 , 0); //Set current pixel to 0,0 // // currentSelection = 0; SceCtrlData pad; int selecting = TRUE; char *menuOption[5] = { "Extract Eboot" , "Make eboot", "Launch eboot", "Exit" }; while(selecting) { pspDebugScreenClear(); printf("MAIN MENU made by hallo007 \n%s" ,nickText); for(loop=0; loop<4; loop++) { pspDebugScreenSetXY(16 , 15+loop); if(loop != currentSelection) printf(" %s" , menuOption[loop]); else printf("=> %s" , menuOption[loop]); } while(selecting) { sceCtrlPeekBufferPositive(&pad, 1); if(pad.Buttons & PSP_CTRL_UP) { if(!buttonPressed) { (currentSelection == 0) ? currentSelection = 3 : currentSelection--; buttonPressed = TRUE; break; } } else if(pad.Buttons & PSP_CTRL_DOWN) { if(!buttonPressed) { (currentSelection == 3) ? currentSelection = 0 : currentSelection++; buttonPressed = TRUE; break; } }
WTF???? is this a joke ??????
Zitat von Moca
i ask for changing the name of the home folder in cygwin because main has white spaces and so i cant install some libs!!!!Geändert von hallo007 (04-05-2007 um 09:00 AM Uhr) Grund: Automerged Doublepost
-
04-05-2007, 09:01 AM #3708QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
My menu code is pretty repetitive (from psp-programming) and it seems kinda ineffecient. However, it is fast because i set up an array to quickly load and buffer my images (taught by SG). I also tried using for(;;) instead of while(1) but that flashes the memory stick a lot. It depends on the situation is what i am trying to say.
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-05-2007, 09:09 AM #3709Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
i never understond menu examples when i started coding , but after a few weeks i made my own , (a bit like kwastie's one) without ny help , the first time is just brain storming;)
-
04-05-2007, 09:27 AM #3710Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
In Linux you can get around that by using the opposite slash character and then a space. It's how I access the folders of my Windows install, e.g.:
Zitat von hallo007
I don't know if it's the same with cygwin, though.Code:/mnt/vista/Program\ Files/...
-
04-05-2007, 09:42 AM #3711QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
hallo007, since this is the C/C++ help thread and not the cygwin help thread, I assumed your question was regarding C/C++ and folders :| . Also, you didnt mention cygwin in your question.
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
04-05-2007, 10:12 AM #3712Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
forgotten , but I am not that nooby with i/o
-
04-05-2007, 11:01 AM #3713QJ Gamer Blue
- Registriert seit
- Mar 2007
- Ort
- Holland..
- Beiträge
- 154
- Points
- 4.022
- Level
- 40
- Downloads
- 0
- Uploads
- 0
could someone give me a proper example of menu, please? :Cry:
-
04-05-2007, 11:27 AM #3714QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
I already explained. If you don't understand what i posted, then there is no reason in giving you a full example because you wont understand it anyway.
Zitat von Kwastie
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
04-05-2007, 03:01 PM #3715QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 172
- Points
- 3.680
- Level
- 38
- Downloads
- 0
- Uploads
- 0
hey i need some help i find it hard to write text while working in 3d so i'm working on a way to write text while in 3d space so i had to re create the whole alaphabet in 3d and now i'm stuck
Spoiler for code:
now i can't seem to get it work
i call it by:
printing("test",4,-10,0,0);
anyways after some testing i found:
it seperates the t and e fine but when it gets to s it outputs like:
sozl
and for the last t it's like:
tzl0
and i'm unsure also it doesn't seem to output the t and e which seems to work yet doesn't
-= Double Post =-
ok for now i'm trying to see if i can't get a letter to display but after some more testing i found that
strcmd(test_i,"e") set it to 0
but when i do an if(strcmd(test_i,"e")==0) { it doesn't read that if statement and bypasses or just skips it and i'm unsure y
-= Double Post =-
ok i fixed that prob but i have another i'm trying to add it so it can read numbers yet i'm unsure how to do this:
with sprintf you can do: sprintf(buffer,"jfjg %d",int);
but i'm unsure how to get the %f/%d/%c stuff to be read by my program so any help would be much appreciatedGeändert von seenit (04-05-2007 um 06:38 PM Uhr) Grund: Automerged Doublepost
-
04-05-2007, 08:59 PM #3716QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
LOL, nvm. This is too easy....
Geändert von SuperBatXS (04-05-2007 um 09:41 PM Uhr)
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-05-2007, 10:04 PM #3717
I would also like help on this. I tried using it, and it just crashed. So then I manually added the function stubs for it (properly, mind you), and the functions didnt do anything. So yeah, help?
Zitat von TMNT
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-05-2007, 10:07 PM #3718QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 172
- Points
- 3.680
- Level
- 38
- Downloads
- 0
- Uploads
- 0
@TMNT if mine is that easy then can you plz give me an answer this is the help thread
-
04-05-2007, 10:23 PM #3719
I can help. Use graphics.c's printTextToScreen, it uses direct screen access and draws each pixel, it is 2D though.
Zitat von seenit
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-05-2007, 10:35 PM #3720QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 172
- Points
- 3.680
- Level
- 38
- Downloads
- 0
- Uploads
- 0
i know that but doesn't:
pspDebugScreenSetOffset(( int)fbp0);
pspDebugScreenSetXY(0,0);
pspDebugScreenPrintf(Disp lay);
do the same plus i'm liking my text style if i can't get it to do this one final thing


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