Seite 126 von 340 ErsteErste ... 26 76 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 176 226 ... LetzteLetzte
Zeige Ergebnis 3.751 bis 3.780 von 10174

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; check the sdk samples in the gu folder, there maybe something there ?...

  
  1. #3751
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    check the sdk samples in the gu folder, there maybe something there ?



  2. #3752
    QJ Gamer Blue
    Points: 4.421, Level: 42
    Level completed: 36%, Points required for next Level: 129
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    96
    Points
    4.421
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard Help including pspmath.h

    Hey everyone or anyone,

    I'm trying to include pspmath.h into one of my projects, but I have no idea how to accomplish this.

    Tried search these forums and Google without luck so I decided to ask here.

    Hope someone can help me out.

    Thanks in advance,
    Gh0sT

  3. #3753
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Can't find an example there. What I'm trying to do is move away from LUA. So I'm making a game in C, got the menu to show up, but nothing is rendering so I can't use it.


    Gh0st,

    #include <pspmath.h> ?
    Geändert von MrChaos (04-08-2007 um 05:46 AM Uhr) Grund: Automerged Doublepost

  4. #3754
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    ghost try <math.h>

  5. #3755
    QJ Gamer Blue
    Points: 4.421, Level: 42
    Level completed: 36%, Points required for next Level: 129
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    96
    Points
    4.421
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MrChaos
    #include <pspmath.h> ?
    Thanks, but obviously I tried that. Think I don't have the appropriate lib installed.

    Code:
    main.c:8:21: error: pspmath.h: No such file or directory
    EDIT:
    Zitat Zitat von eldiablov
    ghost try <math.h>
    OMG, that actually worked! Thanks alot!

    Greets,
    Gh0sT

  6. #3756
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Oh, and I got another question. Can you include images in a EBOOT, instead of having to put them in a folder?

    (Meaning PSP/GAME/[Gamefolder])
    Geändert von MrChaos (04-08-2007 um 06:03 AM Uhr) Grund: Automerged Doublepost

  7. #3757
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    np Ghost :)

    Anyway mr chaos when you compile an eboot images are compiled aswell so you wont see them in a folder.

    Do you have the toolchain and cygwin installed MrChaos ?

  8. #3758
    QJ Gamer Silver
    Points: 7.385, Level: 57
    Level completed: 18%, Points required for next Level: 165
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Finland
    Beiträge
    752
    Points
    7.385
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von eldiablov
    Anyway mr chaos when you compile an eboot images are compiled aswell so you wont see them in a folder.
    He didn't mean that....

    MrChaos: Yeah, use bin2c <filename>, that creates an unsigned char of the file, then you include <filename>.c in your makefile as <filename>.o. After that, you just load the image from a buffer instead of a file.
    wheeee =:D

  9. #3759
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    is there anyway to test your eboots made in C on your computer?

  10. #3760
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von michaelp
    is there anyway to test your eboots made in C on your computer?
    Short answer, no. Long answer, yes but you have to design your code so it can be compiled on different platforms.

  11. #3761
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    so specific app's no , games are a bit possible

  12. #3762
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    I still need help rendering something in a program.

    Ex. Making a menu render, so I could swap bettwen menu options. What am I missing, cases?
    Geändert von MrChaos (04-08-2007 um 02:33 PM Uhr)

  13. #3763
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    hey when you make an EBOOT.PBP, can you edit what you put in later, or would you have to make a whole new EBOOT?

  14. #3764
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    new eboot
    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

  15. #3765
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    damn
    well, i think i'm gonna quit lua and start learning C, because it'll help in the long run

  16. #3766
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Does anyone know whether or not the psp-gcc will support Obj-C at some point? Itd be a great new learning experience for me to learn Obj-C, but I dont want to as my main console i develpe for is the PSP :-\

    Thanks.

    ...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


  17. #3767
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    ok i need some help as i'm very close to release my beta of celestial cunning but i've come up 2 a prob which i can't seem to find a solution 2(probably well after i post)

    now then i believe the following code goes somehow into an infinite loop because normally when my program stops it quits after a moment but this just freezes all movement and the home button quits working so that is why i conclude it enters an infinite loop anyways any1 who can help me would be much appreciated
    Spoiler for code:

    Code:
    void attacking(int unit_number_f){
         int attack_unit=-1;
         unit_attack_scan_time[unit_number_f]++;
         if(unit_attack[unit_number_f] != -1){
              sprintf(printing_text,"attacking: %d",unit_attack[unit_number_f]);
              printing(0,0,printing_text);
         }
         if(unit_attack_scan_time[unit_number_f]>fps*30 && unit_attack[unit_number_f] == -1){
              if(unitstatus[unit_number_f]==-1 && unit_attack_able[unit_number_f]==0){
                   for(i=0;i<10;i++){
                        for(d=0;d<10;d++){
                             for(g=0;g<unit_num;g++){
                                  if(attack_unit == -1){
                                       if(round(unitx[g+1]) == round(unitx[unit_number_f])+i || round(unitx[g+1]) == round(unitx[unit_number_f])-i){
                                            if(round(unitz[g+1]) == round(unitz[unit_number_f])+d || round(unitz[g+1]) == round(unitz[unit_number_f])-d){
                                                 if(unit_owner[g+1] != unit_owner[unit_number_f]){
                                                      attack_unit=g+1;
                                                 }
                                            }
                                       }
                                  }
                             }
                        }
                   }
                   if(attack_unit != -1){
                        unitstatus[unit_number_f]=4;
                        unit_attack[unit_number_f]=attack_unit;
                        unitgx[unit_number_f]=round(unitx[unit_attack[unit_number_f]]);
                        unitgz[unit_number_f]=round(unitz[unit_attack[unit_number_f]]);
                   }
              }
              unit_attack_scan_time[unit_number_f]=0;
         }


    thats not the full function but the part that i've concluded enters the infinite loop or slows down the program an extreme amount(unlikly more likly of infinite loop 2 me)

    anyways don't tip me on optimising just help me fix it and thanks

    (also good 2 be back)
    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

  18. #3768
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    I dont see a problem there, however i have only looked at the conditions for the statements.

    However, one thingi might add is that when you setup your callbacks, your setting up an entirely new thread that the home button is hooked to and starts it. Having teh home button stop from working means a crash stopping the polling for Home button pressed. If that is wrong, please correct me, as thats how ive seen 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


  19. #3769
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    i don't see a prob either yet after many tests i know thats the source, although i'm not 100% sure if it is a crash as like i said after a moment it usually shuts down when crashed from what your saying it sounds like it crashes yet i can't find the source to this crash (which has to be there somewhere) which rly sucks cause if i can get this 2 work then i can release a beta of celestial cunning
    -= Double Post =-
    ok i fixed it which is good but now i have a few new bugs so hopefully my beta well be out by tommorow or maybe later tonight
    Geändert von slicer4ever (04-08-2007 um 08:42 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

  20. #3770
    QJ Gamer Green
    Points: 8.459, Level: 62
    Level completed: 3%, Points required for next Level: 291
    Overall activity: 32,0%

    Registriert seit
    Apr 2007
    Beiträge
    886
    Points
    8.459
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    I want to create a app that will change the firmware system version. What im thinking of doing is having a TXT file with the system version yuo want written into it then the app will covert it to unicode and overwrite the offsets in the vshctrl.prx in flash0:/kn. how would i go about doing this

    BTW: Yes i know there are apps that can change system version but i am a trying to improve my coding and want to create one myself

  21. #3771
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Okay, I want to start learning C, so I need CYGWIN right?
    I transfered the PSPtool chain and CYGWIN to a computer in my room that DOES NOT HAVE internet.
    So I tried the option "install from local directory"
    But when it ask where to save the install files or whatever it is, a message comes up say that I have performed an illegal operation.

    It's a Windows '98 computer.

    Also, could I install CYGWIN on a computer, than transfer the files that were installed to the '98 computer?

  22. #3772
    QJ Gamer Blue
    Points: 3.680, Level: 38
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    172
    Points
    3.680
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    you need the internet unfortuantly for toolchain and to use the setup of cygwin

  23. #3773
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    michael i have told you countless times to use THE PRECOMPILED ENVIRONMENT !!!

  24. #3774
    QJ Gamer Blue
    Points: 4.022, Level: 40
    Level completed: 36%, Points required for next Level: 128
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Ort
    Holland..
    Beiträge
    154
    Points
    4.022
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    I creating a whooping Stopwatch XD:ROFL: just to improve my coding skill's but
    but the screen is flickering as hell, so does someone know at what rate i don't see it flickering any more?!?
    or is there a way i only have to refresh the numbers of my stopwatch , the whole menu get's

    sceKernelDelayThread(1000 000); = 1 seconde
    my pc has about 80 Hz so if I refresh the screen but for calculating 100 Hz is much better
    @ 1000000/100= 10000 so if I do
    sceKernelDelayThread(1000 0) it has 100 Hz?!?

    i'll give a example
    Code:
    printf(" Your running this program for");
    printf" i%", hour)
    printf":i%", minute)
    printf":i%", seconde);
    sceKernelDelayThread(10000)
    ms ++
    if (ms > 100)
    {
    seconde ++
    ms = 0;
    } 
    if (seconde >60)
    {
    minute ++
    seconde = 0;
    }
    if (minute >60)
    hour ++
    minute = 0;
    }
    if (hour >24)
    {
    hour = 0;
    }
    i am like 20% sure this is going to work but ok it's something to work on

  25. #3775
    QJ Gamer Silver
    Points: 10.921, Level: 69
    Level completed: 18%, Points required for next Level: 329
    Overall activity: 0%

    Registriert seit
    May 2006
    Ort
    Behind you.
    Beiträge
    1.814
    Points
    10.921
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Hey guys,
    1000th post!!!! YES! Anyways, i need help with this code:

    Code:
    	{	
    		ScePspFVector3 move = { 0.0f, 0.0f, -3.0f };
    		
    		sceGumTranslate( &move );
    		sceGumRotateY( rquad );
    		double PI = 3.14159265358979323846264338327;
    		sceGumRotateY(90*(PI/180.0f));
    	}
    This code doesn't seem to work. It keeps rotating the cube. If i use this:

    Code:
    	{	
    		ScePspFVector3 move = { 0.0f, 0.0f, -3.0f };
    		
    		sceGumTranslate( &move );
    		double PI = 3.14159265358979323846264338327;
    		sceGumRotateY(90*(PI/180.0f));
    	}
    This code doesn't do anything. What do i use to make it rotate the cube (rquad) exactly 90 degrees left or right using radians?
    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...)

  26. #3776
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    where is this precompiled environment

  27. #3777
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

  28. #3778
    QJ Gamer Silver
    Points: 10.921, Level: 69
    Level completed: 18%, Points required for next Level: 329
    Overall activity: 0%

    Registriert seit
    May 2006
    Ort
    Behind you.
    Beiträge
    1.814
    Points
    10.921
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Can anyone help?
    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...)

  29. #3779
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    thanks
    i won't need to use anything else will i?
    this is all i need for developing in C

    edit: got an error when downloding it

  30. #3780
    Developer
    Points: 11.815, Level: 71
    Level completed: 42%, Points required for next Level: 235
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    262
    Points
    11.815
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    michaelp, I installed cygwin and toolchain on a lab pc at school on to my jumpdrive and then took it home and copied it to my own Win XP box. Trying to run things compiled for XP on 9x causes problems. But it is good if you found a solution for your problem.


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:15 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .