Seite 32 von 340 ErsteErste ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 82 132 ... LetzteLetzte
Zeige Ergebnis 931 bis 960 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 a function that converts degrees to radians just take degrees*(3,1415/180); 2. ALSO, how would i "blit" a ...

  
  1. #931
    Developer
    Points: 5.359, Level: 47
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Norway
    Beiträge
    384
    Points
    5.359
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    a function that converts degrees to radians
    just take degrees*(3,1415/180);

    2. ALSO, how would i "blit" a 3D model to the screen using x,y,z positionst? (in 3D)

    YES, i have read BILLIONS of tutorials, looked at the samples, BUT, all of them use prespective. i want to actually "blit" a model using x,y, and z coordinates, and be able to change them.
    can't you just do,

    {
    ScePspFVector3 move = { 0.0f-posx, 0.0f-posy, -8.0f-posz };
    sceGumTranslate( &move );
    }
    sceGumDrawArray( GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_3 2BITF|GU_TRANSFORM_3D,
    3*12, 0, exampleobject);

    ?




  2. #932
    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 waterbottle
    just take degrees*(3,1415/180);



    can't you just do,

    {
    ScePspFVector3 move = { 0.0f-posx, 0.0f-posy, -8.0f-posz };
    sceGumTranslate( &move );
    }
    sceGumDrawArray( GU_TRIANGLES, GU_COLOR_8888|GU_VERTEX_3 2BITF|GU_TRANSFORM_3D,
    3*12, 0, exampleobject);

    ?

    hmm. i have 2 questions about that moving code:

    1.
    Code:
    ScePspFVector3 move = { 0.0f-posx, 0.0f-posy, -8.0f-posz };
    what is the 'f' after each number? adn why is the last number 8 instead of 0?

    2.
    Code:
    sceGumTranslate( &move );
    what does that mean??




    thx for helping!!!
    --------------------------------------------------------------------------------------

  3. #933
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Hmm.. Did you read these tutorials about using the GU?
    http://www.psp-programming.com/code/...id=c:tutorials


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  4. #934
    Developer
    Points: 5.359, Level: 47
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Norway
    Beiträge
    384
    Points
    5.359
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    hmm. i have 2 questions about that moving code:

    1.
    Code:
    ScePspFVector3 move = { 0.0f-posx, 0.0f-posy, -8.0f-posz };
    what is the 'f' after each number? adn why is the last number 8 instead of 0?

    2.
    Code:
    sceGumTranslate( &move );
    what does that mean??




    thx for helping!!!
    the f is just there becouse it's a float. I don't think you need it.

    it's -8 instead of 0 becouse that positiones the object so you can see it.

    sceGumTranslate( &move );

    moves the position thingh accoriding to what move is.

    I recommend you to do the GU tutorials
    http://www.psp-programming.com/code/...id=c:tutorials


  5. #935
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    2. ALSO, how would i "blit" a 3D model to the screen using x,y,z positionst? (in 3D)

    YES, i have read BILLIONS of tutorials, looked at the samples, BUT, all of them use prespective. i want to actually "blit" a model using x,y, and z coordinates, and be able to change them.
    Check out the SDK sample in gu/cube it teaches you everything you need to know.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  6. #936
    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 waterbottle
    the f is just there becouse it's a float. I don't think you need it.

    it's -8 instead of 0 becouse that positiones the object so you can see it.

    sceGumTranslate( &move );

    moves the position thingh accoriding to what move is.

    I recommend you to do the GU tutorials
    http://www.psp-programming.com/code/...id=c:tutorials
    thx! i read the tutorials. they were great!! i never even saw that site.. but i have two more (simple) questions:

    in the makefile (in the first tut) at the end there is this:

    Code:
    ./main.o: ./main.cpp 
    	$(CXX) $(CXXFLAGS) -c ./main.cpp -o ./main.o
    what would i put there if i had like these two files:

    Code:
    main.c
    bullet.c

    and, im using C, so will that make any difference to the code/makefile?
    --------------------------------------------------------------------------------------

  7. #937
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    in the makefile (in the first tut) at the end there is this:

    Code:
    ./main.o: ./main.cpp 
    	$(CXX) $(CXXFLAGS) -c ./main.cpp -o ./main.o
    what would i put there if i had like these two files:

    Code:
    main.c
    bullet.c

    and, im using C, so will that make any difference to the code/makefile?
    Yes and yes. You don't need that code in your makefile - just list the files in the OBJs line.

    You'll likely have to modify the code to fit with C.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  8. #938
    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 Insomniac197
    Yes and yes. You don't need that code in your makefile - just list the files in the OBJs line.

    You'll likely have to modify the code to fit with C.

    what do you mean by "list the files in the obj's lines?"

    and how much should i have to modify it. i think not having the structures should make it work. other than that, it should work.. shouldnt it??

    oh and one more thing:

    how would i blit an obj wit your lib. so far it only supports loading.
    -= Double Post =-
    one more thing: in the GU tuts, they use:

    Code:
    dList = malloc( 1500 );

    what does "malloc" do? and what does the argument mean?

    thx!
    Geändert von Grimfate126 (09-20-2006 um 06:34 PM Uhr) Grund: Automerged Doublepost
    --------------------------------------------------------------------------------------

  9. #939
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    what do you mean by "list the files in the obj's lines?"

    and how much should i have to modify it. i think not having the structures should make it work. other than that, it should work.. shouldnt it??

    oh and one more thing:

    how would i blit an obj wit your lib. so far it only supports loading.
    -= Double Post =-
    one more thing: in the GU tuts, they use:

    Code:
    dList = malloc( 1500 );

    what does "malloc" do? and what does the argument mean?

    thx!
    You need to put the PSP down and learn some basic C mate first.

    In your makefile will be a line that starts with 'OBJS =' that's your OBJS line!

    'mylib' is not a lib, it's code to load an obj file, which it does perfectly.

    Read some basic C tutorials to learn what malloc is used for.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  10. #940
    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 Insomniac197
    You need to put the PSP down and learn some basic C mate first.

    In your makefile will be a line that starts with 'OBJS =' that's your OBJS line!

    'mylib' is not a lib, it's code to load an obj file, which it does perfectly.

    Read some basic C tutorials to learn what malloc is used for.

    lol. i misunderstood you. i thought you were talking about the obj loader you gave me, not the actual OBJ line. ;)

    and i found out malloc does 2 minutes after posted.


    sry for the confusion, and thx!
    --------------------------------------------------------------------------------------

  11. #941
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    I'm trying to compile the custom firmware, proof of concept, but I keep getting an error. And the only thing I changed in it is the directory of the config file, so I know I didn't make an error. Anyone know the problem.
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall  -L../libs -L. -L/usr/local/pspdev/psp/sdk/lib -Telf_mips
    allegrexel_psp_2.x -mno-crt0 -nostartfiles  main.o conf.o -lpspvshbridge_2 -lpsp
    debug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -
    lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o vshmain.el
    f
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lpspvsh
    bridge_2
    collect2: ld returned 1 exit status
    make: *** [vshmain.elf] Error 1

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

    Yes, it says the error in the message that you shown:
    Code:
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lpspvsh
    bridge_2
    You are missing the pspvshbridge_2.a library.

  13. #943
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von head_54us
    Yes, it says the error in the message that you shown:
    Code:
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lpspvsh
    bridge_2
    You are missing the pspvshbridge_2.a library.
    Yeah, I seen that file, but how do I install it?
    -= Double Post =-
    Anyone?
    Geändert von ARza (09-22-2006 um 11:02 AM Uhr) Grund: Automerged Doublepost

  14. #944
    QJ Gamer Blue
    Points: 5.768, Level: 49
    Level completed: 9%, Points required for next Level: 182
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    457
    Points
    5.768
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    post your make file please.

  15. #945
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    EDIT: I found the problem.
    -= Double Post =-
    Now I have a new problem. I'm trying to make a PRX that loads an EBOOT automatically at startup. I used this tutorial to learn how to load EBOOTs, but when I try to compile, it doesn't work. Here's my code.

    Code:
    Code:
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <string.h>
    #include <psploadexec.h>
    
    PSP_MODULE_INFO("EBOOTLOADER", 0x1000, 1, 1);
    PSP_MAIN_THREAD_ATTR (0);
    pspDebugInstallKprintfHandler (NULL);
    pspDebugInstallErrorHandler (NULL);
    
    void loadeboot()
    {
    //char *pbpath;
    const u32 pbplen = strlen("flash0:/vsh/etc/EBOOT.PBP")+1;
    struct SceKernelLoadExecParam eloader;
    eloader.args = pbplen;
    eloader.argp = "flash0:/vsh/etc/EBOOT.PBP";
    eloader.key = NULL;
    eloader.size = sizeof(eloader) + pbplen;
    }
    
    int main()
    {
    pspDebugScreenInit();
    pspDebugScreenPrintf("Loading EBOOT..\n");
    loadeboot();
    }
    Makefile:
    Code:
    TARGET = EBOOT Loader
    OBJS = main.o
    BUILD_PRX=1
    PRX_EXPORTS=exports.exp
    
    USE_PSPSDK_LIBC = 1
    
    INCDIR = 
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBDIR =
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    Error:
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    main.c:8: error: syntax error before '(' token
    main.c:9: error: syntax error before '(' token
    make: *** [main.o] Error 1
    Geändert von ARza (09-22-2006 um 12:21 PM Uhr) Grund: Automerged Doublepost

  16. #946
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Ehm, you can't call functions outside of a function.
    You'd have to do like
    Code:
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <string.h>
    #include <psploadexec.h>
    
    PSP_MODULE_INFO("EBOOTLOADER", 0x1000, 1, 1);
    PSP_MAIN_THREAD_ATTR (0);
    
    void loadeboot()
    {
    //char *pbpath;
    const u32 pbplen = strlen("flash0:/vsh/etc/EBOOT.PBP")+1;
    struct SceKernelLoadExecParam eloader;
    eloader.args = pbplen;
    eloader.argp = "flash0:/vsh/etc/EBOOT.PBP";
    eloader.key = NULL;
    eloader.size = sizeof(eloader) + pbplen;
    if(sceKernelLoadExec("flash0:/vsh/etc/EBOOT.PBP",&eloader)<0) {pspDebugScreenPrintf("Load Failed\n");}
    }
    
    int main()
    {
    pspDebugInstallKprintfHandler (NULL);
    pspDebugInstallErrorHandler (NULL);
    
    pspDebugScreenInit();
    pspDebugScreenPrintf("Loading EBOOT..\n");
    loadeboot();
    }


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  17. #947
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von homer
    Ehm, you can't call functions outside of a function.
    You'd have to do like
    Oh, I see. The thing is, I got that code from Nathan over at PSP-programming.com. He posted in some thread, and said the code worked perfectly. Anyway, thanks.
    -= Double Post =-
    Sigh. I still get this error.
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    main.c: In function 'main':
    main.c:33: warning: control reaches end of non-void function
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/ps
    pdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx
    main.o exports.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -
    lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -l
    pspkernel -o EBOOT
    exports.o:(.rodata.sceResident+0x4): undefined reference to `getModuleInfo'
    collect2: ld returned 1 exit status
    make: *** [EBOOT] Error 1
    Geändert von ARza (09-22-2006 um 12:39 PM Uhr) Grund: Automerged Doublepost

  18. #948
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    You need to add this to main.c
    Code:
    /* Exported function returns the address of module_info */
    void* getModuleInfo(void)
    {
    	return (void *) &module_info;
    }


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  19. #949
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Am I the only person that thinks the compiler gives really good error messaging?

    You also need to add 'return 0;' before the end of your main function.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  20. #950
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insomniac197
    Am I the only person that thinks the compiler gives really good error messaging?

    You also need to add 'return 0;' before the end of your main function.
    Not everyone knows how to interpret the error messages though.

    Now, I just have a simple question. I want something to happen if I press X and 3 variables are at a certain amount. For example, in Lua it would be

    if pad:cross() and p1 = 1 and p2 = 1 and p3 = 1 then

    But I can't figure out how to do it in C. I've tried this:

    if(pad.Buttons & PSP_CTRL_CROSS) and (p1 = 1) and (p2 =1) and (p3 = 1) {

    But that doesn't work either. How do I do it?
    Geändert von ARza (09-22-2006 um 04:58 PM Uhr) Grund: Automerged Doublepost

  21. #951
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    You need a double = in if statements. But it won't work anyway.
    Try this:
    Code:
    if((pad.Buttons & PSP_CTRL_CROSS) && (p1 == 1) && (p2 == 1) && (p3 == 1)) 
    {
      do something
    }


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

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

    Now, I just have a simple question. I want something to happen if I press X and 3 variables are at a certain amount.
    homer already answered, but I would recommend reading through these tutorials (at least the first few) and taking the quizzes. It hardly takes any time at all, and you can save your questions for deciphering those crazy compiler errors. The syntax errors are easy (you should've known how to fix those, Lua errors aren't much different), but you spoke the truth, it's not always clear to us noobs how to fix some of the other ones, even when we know where there error is. :)

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

    help
    how do you change the image of your programma on PC
    (not to load an image but give the (example) calculator.exe , an image)

  24. #954
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard Writing a simple XBM

    Writing a simple XMB

    Hi,
    I'm trying to write a simple XMB but I'm already stuck at moving the menu left/right. If you hold the left (or right) button, I want it to move one element, wait for a sec. and then rush throught the rest (just like the PSP's original XMB. Here's what I tried:

    Code:
    while(1)
    {
            sceCtrlReadBufferPositive(&pad, 1);
    
            if (pad.Buttons & PSP_CTRL_LEFT) {
                if(keyPressCounter == 0) {    // Pressed for the first time
                    if(selComponent > 0) {    // needed lest to stop at the most left menuitem 
                        selComponent--;
                        xmbMoveTo += xmbDistance;    //move it
                    }
                    keyPressCounter++;    // make it jump to the next part
                } else {
                    if(keyPressCounter<=10) {  // wait 10 frames (little pause between press and hold)
                        sceDisplayWaitVblankStart();
                        keyPressCounter++;
                    } else {
                        if(selComponent > 0) {    // move while holding
                            selComponent--;
                            xmbMoveTo += xmbDistance;
                        }
                    }
                }
            } else {
                keyPressCounter = 0;
            }
    
            // same with PSP_CTRL_RIGHT
    
    
            if(xmbOffsetX < xmbMoveTo)
            {
                xmbOffsetX += 10;
            } else if (xmbOffsetX > xmbMoveTo) {
                xmbOffsetX -= 10;
            }
    
            // draw the menu according to xmbOffsetX
    }
    What it does is move from one end to the other once you press (not hold) a key.
    -= Double Post =-
    I changed the waitingtime ( if(keyPressCounter<=10) ) to 100 and it seems he doesn't even go there!
    -= Double Post =-
    I added some debug-messages everywhere "xmbMoveTo" is being altered and I got proof: He never gets to the hold-thebutton-part
    -= Double Post =-
    Can anyone please tell me that this should work? Or maybe have an idea (i don't even need complete code) how to do this otherwise?
    Geändert von Lukeson (09-23-2006 um 09:36 AM Uhr) Grund: Automerged Doublepost

  25. #955
    QJ Gamer Blue
    Points: 5.768, Level: 49
    Level completed: 9%, Points required for next Level: 182
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    457
    Points
    5.768
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    if this is the whole code i can tell you that you forgot a

    int main() {
    youre code here
    }
    -= Double Post =-
    now to my question does anyone now a good tut's for making games on a windows PC
    Geändert von PSP-Maniac (09-23-2006 um 09:50 AM Uhr) Grund: Automerged Doublepost

  26. #956
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    >if this is the whole code
    (of course) it isn't

  27. #957
    QJ Gamer Blue
    Points: 5.768, Level: 49
    Level completed: 9%, Points required for next Level: 182
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    457
    Points
    5.768
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Lukeson
    >if this is the whole code
    (of course) it isn't
    well i just tried to help you hmf:Cry:

  28. #958
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSP-Maniac
    well i just tried to help you hmf:Cry:
    ^^ ok, thank you

    I just found the cause of the problem.
    Geändert von Lukeson (09-23-2006 um 10:18 AM Uhr)

  29. #959
    QJ Gamer Blue
    Points: 5.768, Level: 49
    Level completed: 9%, Points required for next Level: 182
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    457
    Points
    5.768
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    does anyone now a good tut for making games on a windows PC

    someone??
    Geändert von PSP-Maniac (09-23-2006 um 01:37 PM Uhr)

  30. #960
    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 PSP-Maniac
    does anyone now a good tut for making games on a windows PC

    someone??
    That is a REALLY broad question.

    For C/C++: http://parabellumgames.no-ip.org/articles/ (Many links inside the article)

    However, Python is one of the easiest langauges to grasp and allows you to learn the concepts easily. Used with Pygame (SDL bindings) and you can easily make games out of it.

    Another alternative is C# (a great OO language) with the ever improving XNA SDK. However this limits you to the PC and Xbox360 for development.

    If you can be more specific in your question then it will be much easier to give you a direction.

    In general, this will be a good start: http://gpwiki.org/


 

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:27 PM Uhr.

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