Seite 94 von 340 ErsteErste ... 44 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 144 194 ... LetzteLetzte
Zeige Ergebnis 2.791 bis 2.820 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; http://www.dcemu.co.uk/vbulletin/showthread.php?t=25564 Scroll down and click on the link in the PSP Libs part. Also make sur to downlaod the graphics.h ...

  
  1. #2791
    QJ Gamer Blue
    Points: 3.624, Level: 37
    Level completed: 83%, Points required for next Level: 26
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    67
    Points
    3.624
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    http://www.dcemu.co.uk/vbulletin/showthread.php?t=25564

    Scroll down and click on the link in the PSP Libs part.

    Also make sur to downlaod the graphics.h and framebuffer.h pack in the lesson, serched them for hours and they were in the lesson



  2. #2792
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    lol, thanks, I actually dled the frambuffer.h and the graphics.h but i didn't use it till now, stupid me, so do i just put them in the same directory as the main.c right? Ill go get the libs now, thanks alot!
    EDIT: do i need the framebuffer.c and Graphics.c that came with it? or are they just examples?
    EDIT2: ok nvm, i found out I do need them :) afnd YAY, I handcoded my first C Program, no copy and paste job!
    Geändert von BlackShark (02-16-2007 um 01:10 PM Uhr)
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  3. #2793
    QJ Gamer Blue
    Points: 3.624, Level: 37
    Level completed: 83%, Points required for next Level: 26
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    67
    Points
    3.624
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    .c and .h files must be in the same directory as your project (or can be in another directory, is the makefile is well done, but that's another story)

    --------

    Now for my problems : ^^
    I'm experiencing PSPGL. I've been compiling and testing all the examples, and I have been modifying the celshading example, wich learnt me things like ^= (if anyone can give me precisions about that following code is welcome :

    unsigned int flags = PSP_CTRL_CIRCLE | PSP_CTRL_CROSS | PSP_CTRL_SQUARE | PSP_CTRL_TRIANGLE;
    flags ^= pad.Buttons;

    It seems that it's like an "on/off" switch trigerred when you press the button.)

    Now for the main prob :
    I want to change the torus' color.
    So i've fired up Paint.Net (only thing i have here) and picked up some red (#FF0000). the problem is that it shows up as blue.
    The psp pallete seems to be inverted compared to that one.

    I'm sure that there's something different between #FF0000 and 0xFF0000 , but how can i convert #COLOR to 0xCOLOR ?

  4. #2794
    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

    strange prob
    Code:
    dumpMenu.o: In function `setBlueTextColor':
    dumpMenu.c:(.text+0x0): multiple definition of `setBlueTextColor'
    colors.o:colors.c:(.text+0x0): first defined here
    part in colors.c
    Code:
    int setBlueTextColor()
    {
        return(0xFF5555);
    }

    use in dumpMenu.c

    Code:
    printg(20,150," Dump flash1" ,setBlueTextColor() );

    colors.h
    Code:
    int setBlueTextColor();



    i dont really understand this

  5. #2795
    QJ Gamer Blue
    Points: 3.624, Level: 37
    Level completed: 83%, Points required for next Level: 26
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    67
    Points
    3.624
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    When functions are called multiple time, it can think you are trying to define them when you have missed a ;

    sometime i had that error with sceDisplayWaitvBlankStart
    Just check your line ends , check all of your ;

    BTW, you could change that with simply :

    #define BlueTextColor 0xFF5555
    printg(20,150," Dump flash1" ,BlueTextColor );

    Don't know if that works, haven't tested it but there's no reason that it fails. I've already used that

  6. #2796
    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

    Dream_Team - I use PSPGL as my main graphics API for hte PSP, and you are corerct, the Hex value coloring system is inverted, so instead of hte reknown RGBA, it's ABGR (32-bit on both).

    Ex:

    Red - 0x000000FF
    Green - 0x0000FF00
    Blue - 0x00FF0000
    Black - 0x00000000
    White - 0x00FFFFFF

    Also, I dont think your talking about PSPGL, as there is no torus example (that i know of) but I do know there is a GU torus example.
    -= Double Post =-
    DreamTeam - That would work (however I think that function requires a 32-bit color), also, that method is more efficient as macros are simply names of the code following them, that are replaced by the code following them during preprocessing, compared to a function.
    Geändert von SG57 (02-16-2007 um 02:30 PM Uhr) Grund: Automerged Doublepost

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


  7. #2797
    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 SG57
    -= Double Post =-
    DreamTeam - That would work (however I think that function requires a 32-bit color), also, that method is more efficient as macros are simply names of the code following them, that are replaced by the code following them during preprocessing, compared to a function.
    Beware of this 'trap'. Macros are not automatically faster as you can easily inline small functions and the compiler is most likely to do a better optimisation then you can by hand.

    Always assume the compiler can optimise better then you can unless you can prove otherwise (ie use a profiler).

    Instead of #defines for literal values, use constants. Much easier to debug.

  8. #2798
    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

    In his case, that would be better seeing as how it's a value:
    Code:
    const blue = 0x00FF0000L
    But what if it were a function ;) Macros seem best there:
    Code:
    #define sayHello pspDebugScreenPrintf("Hello")
    Also, this is automatically inlined when using C++ right?:
    Code:
    if ( blah == "blah" ) { blah = "no_blah"; } else if (blah == "no_blah") { blah = "blah"; }
    inlining confuses me What is the advantages of it? I know that 'inline' anything (functions, lines of code) might make the code faster, might make it slower. They might make the EBOOT larger, they might make it smaller. They might cause crashing, they might prevent crashing. And they might be totally irrelevant to speed . So what's the big deal? I mean, if there are soo many pros and cons, Im sure for every pro, there's a con, making it poitnless to inline in the first place... ahhh my head hurts... I need a crash course on the 'inline' keyword When to use it, when it's effective, example of when it's effective, etc... yaustar, Raphael, Insomniac, etc. - your view and knowledge on the 'inline' keyword maybe? sorry for being real naieve on the matter, but googling doesnt give me a fully understandable definition

    Ive gone so far, but I know so little... embarassing
    Geändert von SG57 (02-16-2007 um 06:20 PM Uhr)

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


  9. #2799
    likes kittens....awww....
    Points: 6.975, Level: 55
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Detroit
    Beiträge
    628
    Points
    6.975
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    strange prob
    Code:
    dumpMenu.o: In function `setBlueTextColor':
    dumpMenu.c:(.text+0x0): multiple definition of `setBlueTextColor'
    colors.o:colors.c:(.text+0x0): first defined here
    part in colors.c
    Code:
    int setBlueTextColor()
    {
        return(0xFF5555);
    }

    use in dumpMenu.c

    Code:
    printg(20,150," Dump flash1" ,setBlueTextColor() );

    colors.h
    Code:
    int setBlueTextColor();



    i dont really understand this
    NEVER EVER #INCLUDE .C FILES!!!

  10. #2800
    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

    what you think the colors.h is for

  11. #2801
    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 psphacker12.
    NEVER EVER #INCLUDE .C FILES!!!
    Explain...why not -_-
    [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]

  12. #2802
    likes kittens....awww....
    Points: 6.975, Level: 55
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Detroit
    Beiträge
    628
    Points
    6.975
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    what you think the colors.h is for
    !!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!! !!!
    YOU GOT THE 2800th post on the 280th page !!!!!!!!!

  13. #2803
    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
    what you think the colors.h is for
    Why cant you use



    pspDebugScreenSetTextColo r();

    ... like normal people :P
    -= Double Post =-
    Zitat Zitat von psphacker12.
    !!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!! !!!
    YOU GOT THE 2800th post on the 280th page !!!!!!!!!
    Thanks for spamming the C/C++ help thread.
    Geändert von Moca (02-16-2007 um 11:59 PM 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]

  14. #2804
    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

    because i aint using pspDebugScreenPrintf

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

    Including .c files is kind of like appending whatever is in that file, to your code. I believe that unless you externally declare your function/prototype or variable:
    Code:
    extern long SetBlueColor();
    it will complain of multiple references as it'd be 'seeing' the first definition of SetBlueColor, than see if re-declared as if you were trying to make another function with the same name... Im sure that's wrong but seeing it from a logical point of view, thats how I would imagine it...

    However, its good practice to put common definitions in a header file which is #included by all your C source files. Note that this should only have definitions, not statements that actually generate code. So for example it should contain function prototypes, not function definitions. This will avoid the multiple function definition problems you had. Similarly, you can define variables that are to be used between source files as extern in the include file: this will allow all source filess to be aware that the variable exists and can be linked to, but only one of the source files should then declare the actual instance of the variable.
    -= Double Post =-
    Ok, time for me to havea question (also, raphael, yaustar or insomniac please read my 'inline' questions somewhere above this post, or in the last page depending on your posts-per-page viewing...).

    Ok, I have a nice 3D world set up, and can walk around via symbol buttons, and look around via analog stick. So basically, it has a FPS control scheme. Ive just rendered a 3D gridded box as my little playing field until i decide to work on my sky box tesselation. Ive just applied boundaries so you can't walk outside the gridded box, and so now it's all working well. After adjusting my fovy to 90 rather than 45, the culling has reduced significantly and only little culling on hte grided box, but never an entire side is culled. Now, this presents me with a new problem now that I can draw new objects into the scene to create my world. To start, Ive drawn a simple cube. Only problem is, all my translation calls get messed up when moving the camera via walking around... Its hard to explain, so if youd like to help, and Id really like you to as Im a novice in 3D programming, ill send you my current build, and you can see just waht im talking about... Im sure it's a problem on my part, but right now im just testing around and seeing if there are other methods to fix it, other than supply definate set of verticies, compared to being able to translate a group...
    Geändert von SG57 (02-17-2007 um 05:14 AM Uhr) Grund: Automerged Doublepost

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


  16. #2806
    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 SG57
    In his case, that would be better seeing as how it's a value:
    Code:
    const blue = 0x00FF0000L
    But what if it were a function ;) Macros seem best there:
    Code:
    #define sayHello pspDebugScreenPrintf("Hello")
    Also, this is automatically inlined when using C++ right?:
    Code:
    if ( blah == "blah" ) { blah = "no_blah"; } else if (blah == "no_blah") { blah = "blah"; }
    inlining confuses me What is the advantages of it? I know that 'inline' anything (functions, lines of code) might make the code faster, might make it slower. They might make the EBOOT larger, they might make it smaller. They might cause crashing, they might prevent crashing. And they might be totally irrelevant to speed . So what's the big deal? I mean, if there are soo many pros and cons, Im sure for every pro, there's a con, making it poitnless to inline in the first place... ahhh my head hurts... I need a crash course on the 'inline' keyword When to use it, when it's effective, example of when it's effective, etc... yaustar, Raphael, Insomniac, etc. - your view and knowledge on the 'inline' keyword maybe? sorry for being real naieve on the matter, but googling doesnt give me a fully understandable definition

    Ive gone so far, but I know so little... embarassing
    First, you example of inlining above is not making use of the inline keyword. You are just writing literal values/magic number which has no effect on speed.

    Code:
    #define sayHello pspDebugScreenPrintf("Hello")
    Always prefer inlining over macros like these:

    Code:
    inline void sayHello()
    {
        pspDebugScreenPrintf("Hello");
    }
    What this does is suggest to the compiler to do the same thing as a macro if it thinks it is faster to do so during optimisation.

    So if we use it here:
    Code:
    while (true)
    {
        sayHello();
    }
    If the compiler doesn't think it be faster inilining the function, it will act like a function call, if it does, the compiled code will look like this effectively:

    Code:
    while (true)
    {
        pspDebugScreenPrintf("Hello");
    }
    The question is now why use inlined functions over macros. First, it lets the compiler decide on the optimisation and there generally your programs will be faster. Also it is a lot easier to debug, you can step into the inlined function in code during debugging and track each step whereas with macros, you have to resort to going into dissassembly since the text replacement is done before compile time. Also macros tend to be VERY error prone because of the nature of textual replacement.

    Inlined functions work best for small functions (several lines of code).

    Macros generally should be avoided, unless you start using the advanced features or the standard #ifdefs, #ifndef, etc. The preprocessor is a lot more powerful then what you are currently using it for. Have a read:
    http://gcc.gnu.org/onlinedocs/cpp/

    For inlined functions, read Chapter 9 in Thinking in C++ Vol 1 (free ebook)
    -= Double Post =-
    Zitat Zitat von Moca
    Explain...why not -_-
    C/C++ Programming Help Thread

    That's why.
    -= Double Post =-
    Zitat Zitat von SG57
    -= Double Post =-
    Ok, time for me to havea question (also, raphael, yaustar or insomniac please read my 'inline' questions somewhere above this post, or in the last page depending on your posts-per-page viewing...).

    Ok, I have a nice 3D world set up, and can walk around via symbol buttons, and look around via analog stick. So basically, it has a FPS control scheme. Ive just rendered a 3D gridded box as my little playing field until i decide to work on my sky box tesselation. Ive just applied boundaries so you can't walk outside the gridded box, and so now it's all working well. After adjusting my fovy to 90 rather than 45, the culling has reduced significantly and only little culling on hte grided box, but never an entire side is culled. Now, this presents me with a new problem now that I can draw new objects into the scene to create my world. To start, Ive drawn a simple cube. Only problem is, all my translation calls get messed up when moving the camera via walking around... Its hard to explain, so if youd like to help, and Id really like you to as Im a novice in 3D programming, ill send you my current build, and you can see just waht im talking about... Im sure it's a problem on my part, but right now im just testing around and seeing if there are other methods to fix it, other than supply definate set of verticies, compared to being able to translate a group...
    Right, this is going to ne a nutshell verison, the matrix system in OGL works on a stack base structure.

    PushMatrix
    TranslateMatrix
    DrawModel
    PopMatrix

    What this does is:

    Push current matrix down on the stack
    Applies Translation on the current matrix on the stack (ie the one you just pushed)
    'Draw' the model
    Pop the matrix off the stack

    Because, it is a stack structure, its first in last out, so the last matrix to be popped is your translation matrix which gets applied to the model. So in 'reality' it would do is:

    Draw the model
    Translate it

    If we had:

    PushMatrix
    TranslateMatrix
    RotateMatrix
    DrawModel
    PopMatrix

    This would rotate the model first then translate it.

    PushMatrix
    RotateMatrix
    TranslateMatrix
    DrawModel
    PopMatrix

    This would translate the model then rotate it round the current matrix.

    If there is no matrix on the stack when you push it, it is the identity matrix (0, 0, 0) position with the standard axes.
    Geändert von yaustar (02-17-2007 um 05:58 AM Uhr) Grund: Automerged Doublepost

  17. #2807
    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 declare a variabel that you can use in all .c files
    (no constant)

    for example
    int pressedbutton=false;

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

    In the header file

    globals.h
    Code:
    #ifndef GLOBALS_H
    #define GLOBALS_H
    
    extern int pressedbutton;
    
    #endif // GLOBALS_H
    In ONE source file
    globals.c
    Code:
    #include "globals.h"
    
    int pressedbutton = 0;
    Then when you want to use it:
    main.c
    Code:
    #include "globals.h"
    
    int main( )
    {
        pressbutton = 10;
        return 0;
    }

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

    thnx :) , trying it out
    i did always in the header file this
    extern int pressedbutton=0;
    and no source file:)

  20. #2810
    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

    Does anyone have an idea about Multithreading.
    Tired of looping within loop within... so on.
    Also sometimes it's impossible to do two different things at the same time!
    Neither does sdk have any such samples!
    Attach a small sample if possible....

    Any help?

  21. #2811
    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
    Does anyone have an idea about Multithreading.
    Tired of looping within loop within... so on.
    Also sometimes it's impossible to do two different things at the same time!
    Neither does sdk have any such samples!
    Attach a small sample if possible....

    Any help?
    Why do you need multi threading?

  22. #2812
    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 am aboout the complete reinstall the toolchain
    how do i do it the best way for
    -making eboots (ofcourse)
    -making prx
    -use fonts
    -...

  23. #2813
    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
    Why do you need multi threading?
    Need Simultaenous interaction of user control processing & aswell as background/enemy rendering.

    When I tried, When that happens[background rendering] the other doesn't respond [reponce to key pressess/analog movement]. :o

  24. #2814
    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

    You don't need multithreading for that. A single thread is more then enough. It is more likely that your code is the problem rather then lack of multi threading.

  25. #2815
    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
    You don't need multithreading for that. A single thread is more then enough. It is more likely that your code is the problem rather then lack of multi threading.
    Would you mind sharing how it is doen?

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

    In puesdo code:

    begin game loop
    - get user input
    - process user input
    - render
    end game loop

  27. #2817
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    Here should be a simple question,
    how do you exit a program? like...


    Code:
    if(pad.Buttons & PSP_CTRL_CROSS) {
                                  if(selComponent == 2 ) {
                                           *INSERT PSP EXIT FUNCTION HERE*
                                  } else if (selComponent == 1) {
                                    Blabla bla
                                  }
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

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

    Code:
    int main ()
    {
      bool gameOver = false;
      while( !gameOver )
      {
        // Get pad data
        if(pad.Buttons & PSP_CTRL_CROSS)
        {
          gameOver = true;
        }
      }
    }

  29. #2819
    QJ Gamer Blue
    Points: 3.642, Level: 37
    Level completed: 95%, Points required for next Level: 8
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    99
    Points
    3.642
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BlackShark
    Here should be a simple question,
    how do you exit a program? like...


    Code:
    if(pad.Buttons & PSP_CTRL_CROSS) {
                                  if(selComponent == 2 ) {
                                           *INSERT PSP EXIT FUNCTION HERE*
                                  } else if (selComponent == 1) {
                                    Blabla bla
                                  }
    Fairly simple:

    Code:
    if(pad.Buttons & PSP_CTRL_CROSS) {
    		sceKernelExitGame();
                             }

  30. #2820
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    cool, that is fairly simple :P, thanks
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.


 

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 .