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 yaustar So in short, this is what we think it is supposed to look like without fixing the ...
-
06-28-2007, 08:01 AM #5221QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Well, syntax-wise, that is still wrong as 'vertexs[polygons[actual_polygon]]' is a 1D array. We would need him to explain a bit more in detail what he is doing. Also, 'vertexs' and 'polygons' still do not contain anything, so right now his snippet is pretty pointless.
Zitat von yaustar
By the way, congrats on OOTF being shipped.
-
06-28-2007, 08:33 AM #5222QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
But the elements are of the same type, hence the copy operation (=) is fine as is.Well, syntax-wise, that is still wrong as 'vertexs[polygons[actual_polygon]]' is a 1D array.
Code:int iarray1[3]; int iarray2[5][2]; iarray1[2] = 5; iarray2[4][1] = iarray1[2]; // iarray2[4][1] = 5
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.
-
06-28-2007, 08:37 AM #5223QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Cheers, everyone is pretty psyched for this release :)
Zitat von FistPump
[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]
-
06-28-2007, 09:48 AM #5224words 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
What did you specifically work on yaustar (main menu, pause menu, storyline, etc.)? Did you use a pre-made harry potter game engine or did you make a new one (or are you using a non-harry potter specific game engine?)? How long was development time altogether?

...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
-
06-28-2007, 10:14 AM #5225
u used b sg57?
Zitat von AdjutantReflex
-
06-28-2007, 10:34 AM #5226QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Yes.
Zitat von Mr305
-= Double Post =-
That's not my point, Raph. What he did was like:
Zitat von Raphael
GCC gave me:Code:#include <stdio.h> int main() { int iarray1[5][2]; int iarray2[6][3]; iarray1[4] = 1; iarray2[5][2] = iarray1[4]; printf("%d\n", iarray2[5][2]); return 0; }
main.c: In function 'main':
main.c:8: error: incompatible types in assignment
main.c:9: warning: assignment makes integer from pointer without a castGeändert von PSPJunkie_ (06-28-2007 um 10:41 AM Uhr) Grund: Automerged Doublepost
-
06-28-2007, 12:56 PM #5227QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Oh, well I got that point wrong then :/ Yeah, that's just wrong.
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.
-
06-28-2007, 01:12 PM #5228
drawLineScreen+ PrintTextscreen broke ever since i switched to pgeFontsystem from font loader :o
Zitat von the unique warrior
Any sols?
-
06-28-2007, 01:51 PM #5229QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Without going into too much detail due to NDAs, I did a lot of the metagame (side quests, some aspects of the mini games, discoverables etc) including the tracking of rewards/achievements and infrastructure and the prompt system. I also did some "behind the scene" stuff that you can't see or directly affect the game.
Zitat von AdjutantReflex
I can't say anything about the game engine because I am not sure what are the limits of what is public knowledge.
Development time was 18 months, I was on for the last 9 months.[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]
-
06-28-2007, 02:10 PM #5230
fixed ... hiuh:Jump:
Zitat von Mr305
-
06-28-2007, 02:11 PM #5231QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
You shouldn't be using drawLineScreen() or printTextScreen() anyway. They use VRAM manipulation, and are very slow.
-
06-28-2007, 02:34 PM #5232words 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
All of a sudden we're 'public'? Well.... I guess we all learned a little something today... Are you one of the 'low-end' programmers or are you one of the lead programmers? I'd expect somewhere in the middle maybe... What was the overall cost of production? Was it a p/ hour programming job, a flat rate or commission if you can reveal that info?
Zitat von yaustar
Are you sure you can't as much as describe a little about the game engine? (visual real-time debugging, VB.net interface or is it more of a library and it's all code (like LTE engine for PSP / irrlicht engine for PC))
...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
-
06-28-2007, 02:57 PM #5233
Actually, I
Zitat von FistPump
nded up ritin 1 that uses gu_lines.
-= Double Post =-
Did u deal w/ anything that gets loaded 4m mem stick? ;) j/k
Zitat von yaustar
Geändert von Mr305 (06-28-2007 um 03:03 PM Uhr) Grund: Automerged Doublepost
-
06-28-2007, 03:12 PM #5234QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
omg seriously 2 pages back stfu when i was posting my problem i cut out diffrent areas so i didn't post my entire code seriously, it was meant to be a code snippet i already have stuff allocated to those areas of memory because i didn't relieze when i placed the code here that their were floats with the same name so stfu i know what i'm doing just because i didn't post my entire code doesn't mean i don't know anything
also seriously firstpump just stfu it's mostly u i'm talking about because you literally thought it was my entire code
especially when you say:
obviously i'm calling
Zitat von firstpump
float vertexs[MAX_VERTICES][7]
as a 2d array when i use:
test.vertexs[number][3]
notice number is my first call and 3 is my SECOND!!!
anyways i figured out the reason and it was because i did give a bad code snippet and left out the true problemGeändert von slicer4ever (06-28-2007 um 03:29 PM Uhr)
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
-
06-28-2007, 03:31 PM #5235
If u r tryin to "rearrange" vertices to make em gu compatible then, shouldN'T be so hard.
Zitat von slicer4ever
-= Double Post =-
-cont-
One doesNT have to b a mastermind to achieve it . Alternative: Use pspglGeändert von Mr305 (06-28-2007 um 03:35 PM Uhr) Grund: Automerged Doublepost
-
06-28-2007, 03:38 PM #5236QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
@mr305 i've already completed it now that i figured out my problem
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
-
06-28-2007, 03:53 PM #5237QJ Gamer Green
- Registriert seit
- Dec 2006
- Ort
- main();
- Beiträge
- 1.071
- Points
- 11.300
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von slicer4ever
Okay, don't yell at me. All I did was note the mistakes in the code you posted.
-
06-28-2007, 03:59 PM #5238QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
sry i got a little cared away
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
-
06-28-2007, 04:23 PM #5239words 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
No, you got a little carried away... Oh the irony :P

...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
-
06-28-2007, 04:25 PM #5240QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
....
-= Double Post =-
is it possible to do the following:
float **afloat;
afloat=(float**)malloc(si zeof(float)*100);
everytime i try to do this it crashes my program when it gets to that line
-= Double Post =-
well it seems after a little more testing it won't call
afloat[1][1]
this is when it crashes not when i allocate the memory for itGeändert von slicer4ever (06-28-2007 um 10:36 PM Uhr) Grund: Automerged Doublepost
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
-
06-29-2007, 12:55 AM #5241QJ Gamer Green
- Registriert seit
- Sep 2006
- Ort
- Cape Town, South Africa
- Beiträge
- 714
- Points
- 5.795
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Try something like:
Pointers to pointers are confusing...Code:float **afloat; afloat=&(malloc(sizeof(float)*100)));
-
06-29-2007, 01:01 AM #5242QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
doesn't seem like it well work but have nothing to lose
-= Double Post =-
nope get a compiler error like i thought it didn't workGeändert von slicer4ever (06-29-2007 um 01:02 AM Uhr) Grund: Automerged Doublepost
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
-
06-29-2007, 01:10 AM #5243QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
2D arrays are always a pain in the arse. I will tell you now that:
Zitat von slicer4ever
are NOT the same. To prove it, look at the result here:Code:float * apfloat != float aFloat[] float ** apfloat != float aFloat[][]
Gives the result:Code:#include <iostream> using namespace std; int main() { float * apFloat = new float[100]; float aFloat[100]; cout << "size of apFloat: " << sizeof(apFloat) << endl; cout << "size of aFloat : " << sizeof(aFloat ) << endl; delete [] apFloat; return 0; }
Code:size of apFloat: 4 size of aFloat : 400
[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]
-
06-29-2007, 01:15 AM #5244QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
o, i did not know
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
-
06-29-2007, 12:26 PM #5245
i'm on 1.50. I've intercepted vshmain.prx and replaced it with one i've written so i can add features. so far i've added a startup manager, some patches from the pspsdk so i can load plain modules etc and i've integrated moonlights no kxploit patch. Now everything works as expected except for the no kxploit patch. I know its actually done the patch but it seems it doesn't work until the second time i load a 1.00 eboot, the first time i attempt to load one i get an error message.
anybody got any ideas
-
06-29-2007, 06:16 PM #5246
- Registriert seit
- May 2007
- Beiträge
- 31
- Points
- 3.340
- Level
- 35
- Downloads
- 0
- Uploads
- 0
would like to know if there is a function to wake up the psp from sleep mode?
-
06-29-2007, 10:10 PM #5247QJ 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
yes, what you do is take the thumb() function and allocate it to the powerSwitch[1];, then check to see if thumb() is returning an "up" integer, if its not, have it increase "up" velocity by 1 every loop, once the "up" velocity is above 255 then discontinue the thumb() function, there, and thats how you would get the psp back from sleep mode!
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
06-29-2007, 11:30 PM #5248
if i have two .c files, one is main.c and the other is draw.c, how can i call draw.c from main.c? in lua it would be dofile()
-
06-29-2007, 11:43 PM #5249QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
#include "draw.c"
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
-
06-29-2007, 11:49 PM #5250
yes, but how do i disable main.c and enable draw.c?


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