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 ButMan Yea i know and it works thanks but now when i have pressed X it works but ...
-
12-31-2009, 10:02 AM #10021QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
that's because the screen is never cleared at the menu, so it's always being drawn to the framebuffer, and the framebuffer is never cleared for when their's a change, which is why the select stays the same, as for the black->white flashing, in your old code you filled the screen white(which also acted as a screen clearer), i don't see that here, so i'm not sure why it'd be flashing white
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
12-31-2009, 05:24 PM #10022QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
okay, so I'm trying to use the regular intraFont lib by benHur in my C++ program, I know how to use intraFont but the only problem is, C++ has some issues with the fact of making pointers out of voids.
does someone know how to work around this?Geändert von mootjeuh (02-11-2010 um 10:42 AM Uhr)
-
12-31-2009, 05:28 PM #10023QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
haha, mootjeuh, u be in luck, just today i changed the code to work in c++, i'll upload the new intrafont.cpp and libccc.cpp, all i did was change the void's to typecasted them to what they needed to be, i plan to take it further and remove malloc/free into new/delete, but it works in c++ now
edit: just realized i added one line that refrences some stuff in my code, so i've updated the file so it should work fully now1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
01-01-2010, 05:01 AM #10024QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
dude you saved my life =D thanks man! really appreciated
Geändert von mootjeuh (02-11-2010 um 10:42 AM Uhr)
-
01-03-2010, 11:31 AM #10025QJ Gamer Green
- Registriert seit
- Jun 2009
- Beiträge
- 61
- Points
- 2.003
- Level
- 27
- Downloads
- 0
- Uploads
- 0
Does some1 knows the code to printf the pommel, tachyon and baryon of the psp...I already found 1 but i needed a homemade header file but the download link is gone

Here's also a much easier question that I just can't figure out for some reason: I wanna print the cpu speed like
But then in printextscreen from graphics.h Cause for some reason my program wont work whit pspdebugCode:printf("%-14s: %d mHz\n", "CPU Speed", scePowerGetCpuClockFrequency()); printf("%-14s: %d mHz\n", "Bus Speed", scePowerGetBusClockFrequency());Geändert von LegendMythe (01-06-2010 um 12:13 PM Uhr)
-
01-08-2010, 08:58 AM #10026
Is there still interest in creating VSH prxes?
-
01-08-2010, 02:13 PM #10027QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
-
01-08-2010, 06:37 PM #10028
Achievements:
- Registriert seit
- Jan 2010
- Ort
- asdf
- Beiträge
- 6
- Points
- 1.356
- Level
- 20
- Downloads
- 0
- Uploads
- 0
Hey, can you or someone explain thoroughly how to compile.
-
01-09-2010, 09:27 AM #10029QJ Gamer Green
- Registriert seit
- Jun 2009
- Beiträge
- 61
- Points
- 2.003
- Level
- 27
- Downloads
- 0
- Uploads
- 0
What are you having problems with? Do you already have something like cygwin, minipspw ore pspdev?
If you have , put your program files (main.c and makefile) in a folder and call it "Project" and paste the folder on your "c" drive then open cmd (go to start tipe cmd in the search thingy and then klik cmd) then type "cd/" and hit enter then type "cd Project" and hit enter then type "make" then hit enter it wait it'll make an EBOOT
If you still have problems tell me what you wanna make and give you error code and tell me your os(Ubuntu,Windows, Linux , mac)
-
01-09-2010, 11:15 AM #10030QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
-
01-09-2010, 02:02 PM #10031
Achievements:
- Registriert seit
- Jan 2010
- Ort
- asdf
- Beiträge
- 6
- Points
- 1.356
- Level
- 20
- Downloads
- 0
- Uploads
- 0
Thanks :) thats gonna be helpful, but i was reading the tutorial by Acess_denied, and i didnt really understand how to create a MakeFile. :\
Thats why i actually posted up here. Could you please link a tut for me thats specific to the psp, or tell me where to go?
-
01-10-2010, 01:21 AM #10032QJ Gamer Green
- Registriert seit
- Jun 2009
- Beiträge
- 61
- Points
- 2.003
- Level
- 27
- Downloads
- 0
- Uploads
- 0
Here's a short tut how to make a makefile:
1)First open bloc notes, if you dont have bloc notes you can try using Microsoft visual (it's free) ore codeblock (also free)
2)Then don't type anything, but click directly the "save as" button.
3)Then under the browser whit all your folders you'll see to phrases :"filename" and " "save as" (it may be different cause i got a dutch pc wich i'm trying to translate)
4)the cange the save as to "all filles" and type as filename:"Makefile"(and not.txt)
5)Close blocknotes and open your makefile
6)Open your makefile with blocnotes and paste your makefile text and save it
If this don't work and it saves it as txt, then go to your sdk directory and then go to psp/sdk/samples/controller and copy the makefile, then open it with bloc notes and erase the text and type your normal makefile text
hope this'll work
Anyways does anyone else knows a sample ore source of a pluginGeändert von LegendMythe (01-10-2010 um 09:31 AM Uhr)
-
01-16-2010, 02:56 AM #10033xMod.
- Registriert seit
- Oct 2008
- Ort
- Melbourne, Australia
- Beiträge
- 675
- Points
- 4.576
- Level
- 43
- My Mood
-
- Downloads
- 0
- Uploads
- 0
In the templates folder.Anyways does anyone else knows a sample ore source of a plugin
-
01-16-2010, 03:56 AM #10034QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
sure, here you are: [TUT] Beginner C Programming Tutorials
-
01-17-2010, 10:01 AM #10035QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
okay, so I started working on a Vlf version of my image viewer (ASIV), but the only thing is with Vlf I can't compile with the pspiofilemgr (which I use for the browser). Does anybody how to work around that? I've tried editing my Makefile in every way possible :(
-
01-24-2010, 08:42 PM #10036
Achievements:
- Registriert seit
- Jan 2010
- Ort
- london
- Beiträge
- 1
- Points
- 1.295
- Level
- 19
- Downloads
- 0
- Uploads
- 0
Good information, thanks for sharing with us. It would be helpful for me....
-
01-25-2010, 01:04 AM #10037QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
01-26-2010, 08:37 AM #10038QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
I'm guessing he's trying to bring his post count up to 10. God Damn Spammer ARGH:rtfm:
That epic dude.
-
01-27-2010, 05:28 AM #10039QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
01-27-2010, 01:32 PM #10040Developer
- Registriert seit
- Jul 2008
- Ort
- Grand Rapids! MI
- Beiträge
- 125
- Points
- 8.092
- Level
- 60
- Downloads
- 5
- Uploads
- 2
i think its time to leave that in the past get back to some sort of talk about programming *hint hint*
-
02-03-2010, 09:43 AM #10041QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
Today, I made a little function that allows me to set the alpha value of an image (for the libGE library). But whenever I try to use it for a fade in effect, my PSP crashes. Here's the code, maybe I did something wrong?
Code:void SetAlphaValue(ge_Image *image, u8 alpha) { u8 r, g, b, a; image->alpha = alpha; int key = 0; int i, j; for(i = 0; i < (image->textureWidth*image->textureHeight); i++) { r = image->data[i] & 0xff; g = (image->data[i] >> 8) & 0xff; b = (image->data[i] >> 16) & 0xff; a = (image->data[i] >> 24); for(j = 0; j < image->nColorKeys; j++) { if(image->data[i] == image->ColorKeys[j]) { key = 1; break; } } if(!key) image->data[i] = r | (g << 8) | (b << 16) | ((a - (a-alpha)) << 24); key = 0; } }Geändert von mootjeuh (02-03-2010 um 10:12 AM Uhr)
-
02-03-2010, 03:20 PM #10042QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
02-11-2010, 10:40 AM #10043QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
does anyone know how to export a class
-
02-11-2010, 04:21 PM #10044QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
[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-12-2010, 06:21 AM #10045QJ Gamer Gold

- Registriert seit
- Nov 2008
- Ort
- CAD
- Beiträge
- 693
- Points
- 13.372
- Level
- 75
- Downloads
- 19
- Uploads
- 4
-
02-12-2010, 08:32 PM #10046words 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
Whoa whoa whoa. Is that... yaustar? You're alive! :humped:
How've you been? Been working on anything since Harry Potter 5?
ON TOPIC:
Don't suppose anyone has any good references to entity management in an RPG? As in character class design, take for example a modern MMORPGm like LotrO. You got your hunter, your champion, your burglar, etc. These are defined as character classes, though are all these really their own base class or are they later inherited by the super Character class, etc.?
I guess I'm asking because there are numerous ways I can go about character creation but I guess I'm a little lost as to what should be the main, base class for a player. (if you don't understand what I'm saying I'll try and re-word it, or I might post an example).
...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-13-2010, 09:34 AM #10047
dont subclass like that, they dont differ enough. Whats the diff between a rogue + a fighter? rogue has higher dex, fighter higher strength. work out your skills + stats, then give your hunter a higher dex + critical hit skill. give rogue higher sneak skill. give fighter high melee skill.
this is all humanoid base class stuff.-- Code Monkey : Sarien, Fishguts, Cracks and Crevices --
"Did IQ's just drop sharply while I was away?" (Ripley)
-
02-13-2010, 06:32 PM #10048words 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
Yea, I think you're right _df_, I'm not looking for incredible scalability of my classes so it's best to keep it simple, here's a very general idea....
Whether a Character is the Player or a Non-player, it doesn't matter so. The pure virtual base class a 'hunter/burglar/champion' would inherit should contain the health, power, level and attributes every character has.
Health, Power and Level are all amounts the current player has. Meaning Health and Power and Level are NOT the maximums, rather the current amount of health and power and the current Level.
Strength (for dmg), Dexterity (for accuracy), Vitality (for health), Speed (for rate of attack), etc. These will all be numerical values affected by the gear and level of the character and used as 'maximums' for certain conditions (eg, max health is calculated from Vitality * 10)
Now, every character has a 3D character model representation as well as a 3D weapon model representation. No dua-wielding, no two-characters, none of that. Very straightforward - Biped model, Weapon model. I think putting these in base class as well would be logical, I could have these be class specific, eg Champs have 2 weapons, etc. but nah, simple stuff, Biped and Weapon.
Lastly, in this particular game, all characters have an assortment of skills that are granted by the equipment/gear currently being worn and by the characters level (level up, get new skill). I think this can be done using a pure virtual 'factory' of skills. In other words, a virtual STL vector of a 'skill' class. I can add/remove a character's skills by simply adding/removing that particular 'skill' object from the vector. Now, in order to have this factory be in the pure virtual Character class, it must be capable of 'executing' any and all skills all the classes have. This is good when we think of an auto-attack skill, however this means a Mage could have access to the skills a Rogue has, and vice versa, which can be good or bad depending on the situation. I mean, if I were to expand upon my game in the future and I decided my Rogue can blast fireballs, well shoot that's easy with this design.
One thing though.. if I am not able to wrap up all the skills possible in the game into one generic class (if this Skills class poses a problem), I can move the factory of skills (vector of Skill objects) into each sub-class so only characters of the class Rogue have access to Rogue skills. This allows for a much more specific subset of skills geared to the Rogue making it work(eg, I don't need to worry about a dynamic 'range' of a skill if all a Rogue's skills are the same range, etc.) but the draw back is the expandability in the future if I want my rogue to do a fireball from the mage's subset of skills, he can't access them (though I could use a cheap hack and re-route a mage skill to a rogue skill
)
Anyways, sorry for this wall of text, if anyone bothers to read it and wants to help me expand upon my idea please go right ahead - especially you C++ gurus (yaustar if you can be bothered to take a look I'd greatly appreciate it!)
...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-15-2010, 04:16 AM #10049QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Worked on HP6 and Need for Speed Shift PSP. I have been okay, looking at various other technologies (Fe.g lixel for Flash) and just building up lots of reference material as usual.How've you been? Been working on anything since Harry Potter 5?
You may want to consider a Composite Pattern:Don't suppose anyone has any good references to entity management in an RPG?
Cowboy Programming » Evolve Your Hierarchy[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-15-2010, 05:01 AM #10050words 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 have been looking forward to your response, yaustar. Trust you to be hard at work :)
I read through that article and I really like the idea of 'basic building blocks', as I've come to call it, for each of my required classes. I particularly like how building onto a class is either creating a new component to add to it or simply adding a pre-existing component to it. In the end, doesn't this mean I could end up with, say, 40 source files each relatively small in size?
I would love to see some C++ source code of this pattern, I think I've been following something of the sort all along (as in, couldn't one say using a 3D vector class to handle storing positions/velocities/orientations a composite pattern?)
...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


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