Seite 124 von 340 ErsteErste ... 24 74 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 174 224 ... LetzteLetzte
Zeige Ergebnis 3.691 bis 3.720 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; Zitat von Grimfate126 in order to do animation, you will need to use a model file, such as md2, md3, ...

  
  1. #3691
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    in order to do animation, you will need to use a model file, such as md2, md3, etc. the only way you can alter existing models is by purely using the GU. and that means you can rotate it, and scale it, and move it around. basically, if you use the GU, your polygon list stays the same.
    Just saw a few sdk samples about skinning all that...
    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?



  2. #3692
    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 Mr305
    --------------
    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?
    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.

    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.

  3. #3693
    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

    Zitat Zitat von hallo007
    check the hense sdk if you are using custom firmware
    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.
    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...)

  4. #3694
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yaustar
    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.

    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.


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

  5. #3695
    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

    Zitat Zitat von TMNT
    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.
    Also, does anyone know how to animate text? Like move it accross the screen or something?
    never tried it but
    Code:
    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
    }
    you need the graphics.c from the luplayer , but i normally you got that already somewher

  6. #3696
    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 Mr305
    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...
    Stop reading them and start doing them.

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

    How do you change the name of your home folder???

    "My name"
    needs to become "myname"

  8. #3698
    QJ Gamer Green
    Points: 6.446, Level: 52
    Level completed: 48%, Points required for next Level: 104
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    beside my PC
    Beiträge
    520
    Points
    6.446
    Level
    52
    Downloads
    0
    Uploads
    0

    Question

    Zitat Zitat von Kwastie
    can someone help me with this menu:
    Code:
    {
    
    SceCtrlData pad;
    
        if(tempMenuSelection == 1)
    
        {
    printf("==> menu 1");
    printf("         menu 2");
    printf("         menu 3");
    printf("         menu 4");
    printf("         menu 5");
    printf("         menu 6");
    
    
                          } 
       if(tempMenuSelection == 2)
    
        {
    printf("         menu 1");
    printf(" ==>menu 2");
    printf("         menu 3");
    printf("         menu 4");
    printf("         menu 5");
    printf("         menu 6");
    
    
                          } 
    
        else if(tempMenuSelection == 3)
    
        {
    printf("         menu 1");
    printf("         menu 2");
    printf("==> menu 3");
    printf("         menu 4");
    printf("         menu 5");
    printf("         menu 6");
    
    
                         }  
    
        else if(tempMenuSelection == 4)
    
            {
    printf("         menu 1");
    printf("         menu 2");
    printf("         menu 3");
    printf(" ==>menu 4");
    printf("         menu 5");
    printf("         menu 6");                
    
    }
      else if(tempMenuSelection == 5)
    
            {
    printf("         menu 1");
    printf("         menu 2");
    printf("         menu 3");
    printf("         menu 4");
    printf(" ==>menu 5");
    printf("         menu 6");
    
    
    
    }
      else if(tempMenuSelection == 6)
    
            {
    printf("         menu 1");
    printf("         menu 2");
    printf("         menu 3");
    printf("         menu 4");
    printf("         menu 5");
    printf(" ==>menu 6");
    
    
    }
    
      
    
        while(1)
    
    {
        sceCtrlReadBufferPositive(&pad, 1);
        if (pad.Buttons & PSP_CTRL_UP) {      // i
            tempMenuSelection--;             // 
            wait(7); //scrollspeed
    }
    
        else if (pad.Buttons & PSP_CTRL_DOWN){ // otherwise if the down button is pressed,
    
            tempMenuSelection++;		     // increment the menu selection.
            wait(7); //scrollspeed
    }
    
    
    
        if (tempMenuSelection > 6)      // if the menu selector is past the end of the menu,
    
            tempMenuSelection = 1;      // move it to the beginning,
    
        else if (tempMenuSelection < 1) // otherwise if it is before the beginning,
    
            tempMenuSelection = 6;      // move it to the end.
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    
    if(tempMenuSelection==1)
    
    {
    pspDebugScreenClear();
    printf("option 1\n");
    wait(140);
    menu();
    }
    }
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    if(tempMenuSelection==2)
    {
    pspDebugScreenClear();
    printf("option 2\n");
    wait(140);
    menu();
    }
    }
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    if(tempMenuSelection==3){
    pspDebugScreenClear();
    printf("option 3\n");
    wait(140);
    menu();
    }
    }
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    if(tempMenuSelection==4){
    pspDebugScreenClear();
    printf("option 4\n");
    wait(140);
    menu();
    }
    }
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    if(tempMenuSelection==5){
    pspDebugScreenClear();
    printf("option 5\n");
    wait(140);
    menu();
    }
    }
    
    if(pad.Buttons & PSP_CTRL_CROSS){
    if(tempMenuSelection==6){
    pspDebugScreenClear();
    printf("option 6\n");
    wait(140);
    menu();
    }
    }
    }
    }
    what's wrong with this menu :Cry:
    and something else; how do i get size of font bigger and how do i change the font ??

    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?

  9. #3699
    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

    1) cprogramming.com
    2) dont touch flash if you cant program

  10. #3700
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ai3gtmc
    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?
    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.
    --------------------------------------------------------------------------------------

  11. #3701
    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

    Zitat Zitat von TMNT
    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.
    Also, does anyone know how to animate text? Like move it accross the screen or something?
    Anyone? I need help with using 4th brightness, loading umd, and/or loading eboots in custom firmware- 3.10 oe.
    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...)

  12. #3702
    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

    for brightness , use search or check pspdev.org forums

    for the rest check the sdk samples

  13. #3703
    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

    on 3.10 OE you already have 4th brightness so i find that pointless.

  14. #3704
    QJ Gamer Green
    Points: 5.712, Level: 48
    Level completed: 81%, Points required for next Level: 38
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    USA SC/NC
    Beiträge
    699
    Points
    5.712
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

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

    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]);  
            }
        }    
             
    }
    Something like that. Then use FUNCTION POINTERS.

    Code:
    void (*menufunction[TOTALMENUITEMS])(void) = {selection1,selection2,selection3,selection4};
    then you have the functions...

    Code:
    void selection1(void)
    {
        printf("This is selection 1");
    }
    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:
    (*menufunction[selection])();
    That is how you would select the function that corresponds to the text printed to the screen.

    Thanks to the one who showed me this method btw if you are reading this, which i doubt .
    -= Double Post =-
    Zitat Zitat von eldiablov
    on 3.10 OE you already have 4th brightness so i find that pointless.
    :|

    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]

  15. #3705
    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

    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;)

  16. #3706
    QJ Gamer Green
    Points: 5.712, Level: 48
    Level completed: 81%, Points required for next Level: 38
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    USA SC/NC
    Beiträge
    699
    Points
    5.712
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    How do you change the name of your home folder???

    "My name"
    needs to become "myname"
    Here's a new word i learned. Concatenate. :)
    There is a C function that joins strings of text.
    Take a look in string.h. strcat is the function.

    -= Double Post =-
    Zitat Zitat von hallo007
    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;)
    Wow. Sounds horrible.
    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]

  17. #3707
    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

    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;
                                                           }
                                         }
    -= Double Post =-
    Zitat Zitat von Moca
    Here's a new word i learned. Concatenate. :)
    There is a C function that joins strings of text.
    Take a look in string.h. strcat is the function.
    WTF???? is this a joke ??????

    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

  18. #3708
    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

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

  19. #3709
    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

    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;)

  20. #3710
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    i ask for changing the name of the home folder in cygwin because main has white spaces and so i cant install some libs!!!!
    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.:

    Code:
    /mnt/vista/Program\ Files/...
    I don't know if it's the same with cygwin, though.

  21. #3711
    QJ Gamer Green
    Points: 5.712, Level: 48
    Level completed: 81%, Points required for next Level: 38
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    USA SC/NC
    Beiträge
    699
    Points
    5.712
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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]

  22. #3712
    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

    forgotten , but I am not that nooby with i/o

  23. #3713
    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

    could someone give me a proper example of menu, please? :Cry:

  24. #3714
    QJ Gamer Green
    Points: 5.712, Level: 48
    Level completed: 81%, Points required for next Level: 38
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    USA SC/NC
    Beiträge
    699
    Points
    5.712
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Kwastie
    could someone give me a proper example of menu, please? :Cry:
    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.
    [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]

  25. #3715
    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

    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:

    Code:
    void printing(char *text,int text_num,float z_distance,float x,float y){
         int i;
         float letter_spaceing = 1.16;
         char text_i[0];
         for(i=0;i<text_num;i++){
              text_i[0] = text[i];
              xtrans = x+(i*letter_spaceing);
              ytrans = y;
              ztrans = z_distance;
              sceGumLoadIdentity();
              {
              	ScePspFVector3 move = {xtrans,ytrans, ztrans};
              	sceGumTranslate( &move );
              	sceGumRotateY(180*(PI/180.0f));
              }
              sceGumUpdateMatrix();
              if(strcmp(text_i,"a")==0 || strcmp(text_i,"A")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,A);
              }
              if(strcmp(text_i,"b")==0 || strcmp(text_i,"B")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,30, 0,B);
              }
              if(strcmp(text_i,"c")==0 || strcmp(text_i,"C")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,30, 0,C);
              }
              if(strcmp(text_i,"d")==0 || strcmp(text_i,"D")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,30, 0,D);
              }
              if(strcmp(text_i,"e")==0 || strcmp(text_i,"E")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,24, 0,E);
              }
              if(strcmp(text_i,"f")==0 || strcmp(text_i,"F")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,F);
              }
              if(strcmp(text_i,"g")==0 || strcmp(text_i,"G")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,51, 0,G);
              }
              if(strcmp(text_i,"h")==0 || strcmp(text_i,"H")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,H);
              }
              if(strcmp(text_i,"i")==0 || strcmp(text_i,"I")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,I);
              }
              if(strcmp(text_i,"j")==0 || strcmp(text_i,"J")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,30, 0,J);
              }
              if(strcmp(text_i,"k")==0 || strcmp(text_i,"K")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,K);
              }
              if(strcmp(text_i,"l")==0 || strcmp(text_i,"L")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,12, 0,L);
              }
              if(strcmp(text_i,"m")==0 || strcmp(text_i,"M")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,24, 0,M);
              }
              if(strcmp(text_i,"n")==0 || strcmp(text_i,"N")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,N);
              }
              if(strcmp(text_i,"o")==0 || strcmp(text_i,"O")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,36, 0,O);
              }
              if(strcmp(text_i,"p")==0 || strcmp(text_i,"P")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,33, 0,P);
              }
              if(strcmp(text_i,"q")==0 || strcmp(text_i,"Q")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,42, 0,Q);
              }
              if(strcmp(text_i,"r")==0 || strcmp(text_i,"R")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,39, 0,R);
              }
              if(strcmp(text_i,"s")==0 || strcmp(text_i,"S")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,30, 0,S);
              }
              if(strcmp(text_i,"t")==0 || strcmp(text_i,"T")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,12, 0,T);
              }
              if(strcmp(text_i,"u")==0 || strcmp(text_i,"U")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,24, 0,U);
              }
              if(strcmp(text_i,"v")==0 || strcmp(text_i,"V")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,12, 0,V);
              }
              if(strcmp(text_i,"w")==0 || strcmp(text_i,"W")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,24, 0,W);
              }
              if(strcmp(text_i,"x")==0 || strcmp(text_i,"X")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,12, 0,X);
              }
              if(strcmp(text_i,"y")==0 || strcmp(text_i,"Y")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,Y);
              }
              if(strcmp(text_i,"z")==0 || strcmp(text_i,"Z")==0){
              	sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,18, 0,Z);
              }
         }
    }

    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 appreciated
    Geändert von seenit (04-05-2007 um 06:38 PM Uhr) Grund: Automerged Doublepost

  26. #3716
    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

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

  27. #3717
    Points: 24.247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    texas
    Beiträge
    2.803
    Points
    24.247
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TMNT
    Anyone? I need help with using 4th brightness, loading umd, and/or loading eboots in custom firmware- 3.10 oe.
    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?
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  28. #3718
    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

    @TMNT if mine is that easy then can you plz give me an answer this is the help thread

  29. #3719
    Points: 24.247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    texas
    Beiträge
    2.803
    Points
    24.247
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von seenit
    @TMNT if mine is that easy then can you plz give me an answer this is the help thread
    I can help. Use graphics.c's printTextToScreen, it uses direct screen access and draws each pixel, it is 2D though.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  30. #3720
    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

    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


 

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 .