Seite 304 von 340 ErsteErste ... 204 254 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 ... LetzteLetzte
Zeige Ergebnis 9.091 bis 9.120 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; can someone show me how to create a simple bullet system for a side scroller game...

  
  1. #9091
    Points: 2.361, Level: 29
    Level completed: 41%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    18
    Points
    2.361
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    can someone show me how to create a simple bullet system for a side scroller game



  2. #9092
    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

    At least pretend you have tried to code one.

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

    When bullet is fired, create a new bullet object.
    Give the new bullet object a start position and a velocity.
    Add the bullet object to the list of bullets.
    Every frame, iterate through the list, update the position of each bullet based on it's velocity and time elapsed since last frame. Also check with if the bullet has collided with another object.
    If you want to destroy the bullet, remove it from the list.

  4. #9094
    Points: 2.361, Level: 29
    Level completed: 41%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    18
    Points
    2.361
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    i eventually figured it out thanks anyway yaustar

  5. #9095
    Points: 2.721, Level: 31
    Level completed: 81%, Points required for next Level: 29
    Overall activity: 0%

    Registriert seit
    Mar 2008
    Beiträge
    19
    Points
    2.721
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    sort of off topic, but how long do you think it would take for a n00b to figure out how to do some basic things in lua? and what specific program is recommended?

  6. #9096
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Well, it depends on the noob. If you're posting Lua questions in the C/C++ help thread then probably a long time. If you want to learn Lua then the program you'll want to work with would probably be Lua. If you want to use Lua on the PSP then LuaPlayer.

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

    <shameless plug>Or PGE Lua</shameless plug>

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

    I was wondering How I can obtain FPS in VSH's context? :confusion:

    I'm out of ideas... :o

  9. #9099
    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 Mr305 Beitrag anzeigen
    I was wondering How I can obtain FPS in VSH's context? :confusion:

    I'm out of ideas... :o
    Wouldn't it be like counting the FPS in any other program? Just count the number of loops your program does in a set period of time. You can use psprtc.h to get the system time.

  10. #9100
    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 Access_Denied Beitrag anzeigen
    Wouldn't it be like counting the FPS in any other program? Just count the number of loops your program does in a set period of time. You can use psprtc.h to get the system time.
    No, because our thread isnt as complicated as VSH's. FPS is as high as 1280 based on thread delay which IS wrong.

  11. #9101
    Points: 2.361, Level: 29
    Level completed: 41%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    18
    Points
    2.361
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    ok i need alil help..i know alot of ppl in this qj forum dnt want to help noobs..anyway i know some will so asking asking what i am doing wrong in these lines of code,
    // Here it is the begin of the player jump code



    if (osl_keys->held.cross && sprite->y == 200)
    {if (!collision(sprite,sprite->x, sprite->y - 2, platform, platform->x, platform->y ))// test collision - 2 pixel

    sprite_vel_y = 20;
    sprite_jumping = 1;
    }
    if (!collision(sprite, sprite->x, sprite->y + 2, platform, platform->x, platform->y ))// test collision + 2 pixel


    if (sprite_jumping == 1) /* Move sprite if we are jumping */
    {
    sprite_vel_y = sprite_vel_y - sprite_accel;
    sprite->y = sprite->y - sprite_vel_y;

    }

    if (sprite->y >= 200) /* Check to see if sprite has hit floor */
    {
    sprite_vel_y = 0;
    sprite_jumping = 0;
    sprite->y = 200;
    }
    ok here is my explaination of whats wrong, i try to make my sprite jump on to a small platform.i did the collision function thing if am correct and i got to the point where the sprite gets collision block when its under the platform and tries to jump which is a good thing and when i jump on to it i get collision and the sprite just stays there cnt be moved, i cnt seem to make my sprite jump off again i think i know whats the problem but being a noob 2days trying to slove it on my own just isnt helping lol plz point me int the right direction.tanx

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

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

    Standard

    cleaned up code a bit

    Code:
    if (osl_keys->held.cross && sprite->y == 200){
       if (!collision(sprite,sprite->x, sprite->y - 2, platform, platform->x, platform->y)){
          sprite_vel_y = 20;
       }
       sprite_jumping = 1;
    }
    
    if (!collision(sprite, sprite->x, sprite->y + 2, platform, platform->x, platform->y )){
       if (sprite_jumping == 1){
          sprite_vel_y = sprite_vel_y - sprite_accel;
          sprite->y = sprite->y - sprite_vel_y;
       }
    }
    
    if (sprite->y >= 200){
       sprite_vel_y = 0;
       sprite_jumping = 0; //never reset if on tile(at least not with the code shown here)
       sprite->y = 200;
    }
    now than, i can't see the problem with just this code, at the same time i put {}'s around all the if statements,

    anyways, can you show the movement code also.

    and finally, just to clarify the problem, once on a tile, you can not move any longer
    anyways, if you could show us your movement code, and when collision is detected on a tile code, that'd help.
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  13. #9103
    Points: 2.361, Level: 29
    Level completed: 41%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    18
    Points
    2.361
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    This is the movement code..its a side scoller game..
    if (osl_keys->held.left)
    {
    if (!collision(sprite, sprite->x -2, sprite->y, platform, platform->x, platform->y ))// test collision - 2 pixel
    {
    sprite->x -= 1;
    }
    }

    if (osl_keys->held.right)
    {
    if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )) // test collision + 2 pixel
    {
    sprite->x += 1;
    }

    }

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

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

    Standard

    well their we go=-)
    Code:
    if (osl_keys->held.left){
       if (!collision(sprite, sprite->x -2, sprite->y, platform, platform->x, platform->y )){
          sprite->x -= 1;
       }//think about this if statement...if it's not colliding than move, however if it is....i think you can see where i'm going with this
    }
    
    if (osl_keys->held.right){
       if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )){
          sprite->x += 1;
       }//same here
    }
    hope this helps, i suggest removing:
    if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )){
    if your doing this so if you horizontal checking for a collision, i'd suggest changing it so that the collision function returns a number indicating rather it's a vertical collision or a horizontal collision, hope this helps
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  15. #9105
    Points: 2.361, Level: 29
    Level completed: 41%, Points required for next Level: 89
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    18
    Points
    2.361
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    ok ill give it a try

  16. #9106
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    What do i use to blit a string in vsh (4.01)
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

  17. #9107
    QJ Gamer Silver
    Points: 8.475, Level: 62
    Level completed: 9%, Points required for next Level: 275
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Perth, Scotland
    Beiträge
    1.094
    Points
    8.475
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von basfreak Beitrag anzeigen
    What do i use to blit a string in vsh (4.01)
    Vshblitter.

  18. #9108
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Beiträge
    232
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Search at psp-programming.com for VSH Blitter 0.2

  19. #9109
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Ok got it.

    But i got an error:
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/
    /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401   -c -o blit.o blit.c
    blit.c: In function 'blit_setup':
    blit.c:51: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes integ
    from pointer without a cast
    blit.c: In function 'blit_string46':
    blit.c:141: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes inte
     from pointer without a cast
    blit.c: In function 'FillRect':
    blit.c:263: warning: assignment from incompatible pointer type
    blit.c:260: warning: unused variable 'vptr0'
    blit.c: In function 'FillRect2':
    blit.c:283: warning: assignment from incompatible pointer type
    blit.c: In function 'Fillvram':
    blit.c:300: warning: assignment from incompatible pointer type
    blit.c: In function 'FillvramPlus':
    blit.c:315: warning: assignment from incompatible pointer type
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/
    /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401   -c -o graphics.o graphics.c
    graphics.c:8:21: error: jpeglib.h: No such file or directory
    graphics.c:9:20: error: jerror.h: No such file or directory
    graphics.c:152: warning: 'struct jpeg_decompress_struct' declared inside para
    er list
    graphics.c:152: warning: its scope is only this definition or declaration, wh
     is probably not what you want
    graphics.c:152: error: parameter 1 ('dinfo') has incomplete type
    graphics.c: In function 'loadJpegImageImpl':
    graphics.c:154: warning: implicit declaration of function 'jpeg_read_header'
    graphics.c:157: warning: implicit declaration of function 'jpeg_start_decompr
    '
    graphics.c:160: warning: implicit declaration of function 'jpeg_destroy_decom
    ss'
    graphics.c:177: error: 'JCS_GRAYSCALE' undeclared (first use in this function
    graphics.c:177: error: (Each undeclared identifier is reported only once
    graphics.c:177: error: for each function it appears in.)
    graphics.c:180: warning: implicit declaration of function 'jpeg_read_scanline
    graphics.c:201: warning: implicit declaration of function 'jpeg_finish_decomp
    s'
    graphics.c: In function 'loadJpegImage':
    graphics.c:209: error: storage size of 'dinfo' isn't known
    graphics.c:210: error: storage size of 'jerr' isn't known
    graphics.c:211: warning: implicit declaration of function 'jpeg_std_error'
    graphics.c:212: warning: implicit declaration of function 'jpeg_create_decomp
    s'
    graphics.c:218: warning: implicit declaration of function 'jpeg_stdio_src'
    graphics.c:219: error: type of formal parameter 1 is incomplete
    graphics.c:210: warning: unused variable 'jerr'
    graphics.c:209: warning: unused variable 'dinfo'
    graphics.c: At top level:
    graphics.c:227: error: field 'pub' has incomplete type
    graphics.c:232: error: expected specifier-qualifier-list before 'JOCTET'
    graphics.c:241: warning: return type defaults to 'int'
    graphics.c: In function 'METHODDEF':
    graphics.c:241: error: expected declaration specifiers before 'mem_init_sourc
    graphics.c:255: error: expected declaration specifiers before 'METHODDEF'
    graphics.c:289: error: expected declaration specifiers before 'METHODDEF'
    graphics.c:305: error: expected declaration specifiers before 'METHODDEF'
    graphics.c:309: error: expected declaration specifiers before 'GLOBAL'
    graphics.c:338: error: storage class specified for parameter 'PngData'
    graphics.c:341: error: expected '=', ',', ';', 'asm' or '__attribute__' befor
    {' token
    graphics.c:353: error: expected '=', ',', ';', 'asm' or '__attribute__' befor
    {' token
    graphics.c:386: error: expected '=', ',', ';', 'asm' or '__attribute__' befor
    {' token
    graphics.c:392: error: expected '=', ',', ';', 'asm' or '__attribute__' befor
    {' token
    graphics.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' befor
    {' token
    graphics.c:526: error: old-style parameter declarations in prototyped functio
    efinition
    graphics.c:526: error: expected '{' at end of input
    make: *** [graphics.o] Error 1
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

  20. #9110
    QJ Gamer Silver
    Points: 8.475, Level: 62
    Level completed: 9%, Points required for next Level: 275
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Perth, Scotland
    Beiträge
    1.094
    Points
    8.475
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    You're compiling graphics.c under kernel libs?

  21. #9111
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Beiträge
    232
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    You must install jpeg lib. Get it from SVN

  22. #9112
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Hmm,
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401  -L. -L/usr/local/pspdev/psp/sdk/li
    b -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/s
    dk/lib/linkfile.prx -mno-crt0 -nostartfiles  main.o blit.o graphics.o /usr/local
    /pspdev/psp/sdk/lib/prxexports.o -lpspsdk -lpspctrl -lpsppower -lpsprtc -lpspdeb
    ug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lps
    pnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o LastTime.elf
    graphics.o: In function `jpeg_mem_src':
    graphics.c:(.text+0x118): undefined reference to `jpeg_resync_to_restart'
    graphics.c:(.text+0x120): undefined reference to `jpeg_resync_to_restart'
    graphics.o: In function `ReadPngData':
    graphics.c:(.text+0x2ac): undefined reference to `png_get_io_ptr'
    graphics.o: In function `loadJpegImageImpl':
    graphics.c:(.text+0x5ac): undefined reference to `jpeg_read_header'
    graphics.c:(.text+0x5bc): undefined reference to `jpeg_start_decompress'
    graphics.c:(.text+0x5ec): undefined reference to `jpeg_destroy_decompress'
    graphics.c:(.text+0x690): undefined reference to `jpeg_read_scanlines'
    graphics.c:(.text+0x6b4): undefined reference to `jpeg_finish_decompress'
    graphics.c:(.text+0x6bc): undefined reference to `jpeg_destroy_decompress'
    graphics.c:(.text+0x6f4): undefined reference to `jpeg_read_scanlines'
    graphics.o: In function `loadJpegImage':
    graphics.c:(.text+0x7ec): undefined reference to `jpeg_std_error'
    graphics.c:(.text+0x800): undefined reference to `jpeg_CreateDecompress'
    graphics.c:(.text+0x82c): undefined reference to `jpeg_stdio_src'
    graphics.c:(.text+0x864): undefined reference to `jpeg_destroy_decompress'
    graphics.o: In function `loadPngImageImpl':
    graphics.c:(.text+0x888): undefined reference to `png_create_info_struct'
    graphics.c:(.text+0x89c): undefined reference to `png_set_sig_bytes'
    graphics.c:(.text+0x8a8): undefined reference to `png_read_info'
    graphics.c:(.text+0x8d0): undefined reference to `png_get_IHDR'
    graphics.c:(.text+0x8fc): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0x978): undefined reference to `png_set_strip_16'
    graphics.c:(.text+0x980): undefined reference to `png_set_packing'
    graphics.c:(.text+0x9a8): undefined reference to `png_get_valid'
    graphics.c:(.text+0x9c0): undefined reference to `png_set_filler'
    graphics.c:(.text+0xa14): undefined reference to `png_read_row'
    graphics.c:(.text+0xa84): undefined reference to `png_read_end'
    graphics.c:(.text+0xa94): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0xac4): undefined reference to `png_set_gray_1_2_4_to_8'
    graphics.c:(.text+0xad4): undefined reference to `png_set_tRNS_to_alpha'
    graphics.c:(.text+0xae4): undefined reference to `png_set_palette_to_rgb'
    graphics.c:(.text+0xb08): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0xb54): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0xb9c): undefined reference to `png_destroy_read_struct'
    graphics.o: In function `loadImageFromMemory':
    graphics.c:(.text+0xc04): undefined reference to `jpeg_std_error'
    graphics.c:(.text+0xc18): undefined reference to `jpeg_CreateDecompress'
    graphics.c:(.text+0xcb4): undefined reference to `png_create_read_struct'
    graphics.c:(.text+0xcdc): undefined reference to `png_set_read_fn'
    graphics.o: In function `loadPngImage':
    graphics.c:(.text+0xd70): undefined reference to `png_create_read_struct'
    graphics.c:(.text+0xd88): undefined reference to `png_init_io'
    collect2: ld returned 1 exit status
    make: *** [LastTime.elf] Error 1
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

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

    You also need to link -ljpeg -lpng -lz.

    Good luck getting that plugin to load with all that bloat :)

    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

  24. #9114
    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 Mr305 Beitrag anzeigen
    I was wondering How I can obtain FPS in VSH's context? :confusion:

    I'm out of ideas... :o
    Quoting...

  25. #9115
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Ok im really confused right now
    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401  -L. -L/usr/local/pspdev/psp/sdk/li
    b -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/s
    dk/lib/linkfile.prx -mno-crt0 -nostartfiles  main.o blit.o graphics.o /usr/local
    /pspdev/psp/sdk/lib/prxexports.o -lpspsdk -lpspctrl -lpsppower -lpsprtc -ljpeg -
    lpng -lz -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -
    lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
     -o LastTime.elf
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libjpeg.a(jerror.o): In
    function `output_message':
    jerror.c:(.text+0x224): undefined reference to `_impure_ptr'
    jerror.c:(.text+0x224): relocation truncated to fit: R_MIPS_GPREL16 against `_im
    pure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libjpeg.a(jmemmgr.o): In
     function `jinit_memory_mgr':
    jmemmgr.c:(.text+0x77c): undefined reference to `sscanf'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_warning':
    pngerror.c:(.text+0x14c): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x14c): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1ac): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1ac): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_error':
    pngerror.c:(.text+0x2a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x2a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x310): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x310): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o):pngerror.c:(.text+0x314): mor
    e undefined references to `_impure_ptr' follow
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_error':
    pngerror.c:(.text+0x314): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrtran.o): In function `png_build_gamma
    _table':
    pngrtran.c:(.text+0x1228): undefined reference to `pow'
    pngrtran.c:(.text+0x1418): undefined reference to `pow'
    pngrtran.c:(.text+0x14bc): undefined reference to `pow'
    pngrtran.c:(.text+0x15c0): undefined reference to `pow'
    pngrtran.c:(.text+0x1694): undefined reference to `pow'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrtran.o):pngrtran.c:(.text+0x1770): mo
    re undefined references to `pow' follow
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_gAMA
    ':
    pngrutil.c:(.text+0xd08): undefined reference to `_impure_ptr'
    pngrutil.c:(.text+0xd08): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_cHRM
    $
    pngrutil.c:(.text+0x146c): undefined reference to `_impure_ptr'
    pngrutil.c:(.text+0x146c): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    pngrutil.c:(.text+0x14dc): undefined reference to `_impure_ptr'
    pngrutil.c:(.text+0x14dc): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_sRGB
    ':
    pngrutil.c:(.text+0x178c): undefined reference to `_impure_ptr'
    pngrutil.c:(.text+0x178c): additional relocation overflows omitted from the outp
    ut
    collect2: ld returned 1 exit status
    make: *** [LastTime.elf] Error 1
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

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

    Don't link -lpsplibc.

    Link -lm after -lz.
    -=Double Post Merge =-
    Zitat Zitat von Mr305 Beitrag anzeigen
    Quoting...
    sceDisplayGetVcount() Maybe?

    I'm guessing...

    Or you could hook sceGuSwapBuffers() then time it as a regular FPS counter.
    Geändert von Insert_Witty_Name (09-26-2008 um 06:11 AM Uhr) Grund: Automerged Doublepost

    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

  27. #9117
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    $ make
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
    401  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/pr
    xspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nostartfil
    es  main.o blit.o graphics.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lpspsdk
     -lpspctrl -lpsppower -lpsprtc -ljpeg -lpng -lz -lm -lpspdebug -lpspdisplay -lps
    pge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolv
    er -lpsputility -lpspuser -lpspkernel -o LastTime.elf
    graphics.o: In function `loadPngImageImpl':
    graphics.c:(.text+0x904): undefined reference to `__iob'
    graphics.c:(.text+0x910): undefined reference to `__iob'
    graphics.c:(.text+0xb10): undefined reference to `__iob'
    graphics.c:(.text+0xb1c): undefined reference to `__iob'
    graphics.c:(.text+0xb5c): undefined reference to `__iob'
    graphics.o:graphics.c:(.text+0xb68): more undefined references to `__iob' follow
    
    collect2: ld returned 1 exit status
    make: *** [LastTime.elf] Error 1
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

  28. #9118
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Beiträge
    232
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    make clean
    make

  29. #9119
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Hmmm, its build right now but still with errors:
    Code:
    $ make
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V
    401   -c -o main.o main.c
    main.c: In function 'main_thread':
    main.c:23: warning: unused variable 'pad'
    main.c: At top level:
    blit.h:13: warning: 'vram32' defined but not used
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V
    401   -c -o blit.o blit.c
    blit.c: In function 'blit_setup':
    blit.c:51: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes i
    from pointer without a cast
    blit.c: In function 'blit_string46':
    blit.c:141: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes
     from pointer without a cast
    blit.c: In function 'FillRect':
    blit.c:263: warning: assignment from incompatible pointer type
    blit.c:260: warning: unused variable 'vptr0'
    blit.c: In function 'FillRect2':
    blit.c:283: warning: assignment from incompatible pointer type
    blit.c: In function 'Fillvram':
    blit.c:300: warning: assignment from incompatible pointer type
    blit.c: In function 'FillvramPlus':
    blit.c:315: warning: assignment from incompatible pointer type
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V
    401   -c -o graphics.o graphics.c
    graphics.c: In function 'blitImageToVram':
    graphics.c:506: warning: assignment from incompatible pointer type
    graphics.c: At top level:
    blit.h:13: warning: 'vram32' defined but not used
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V
    401  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk
    xspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nos
    es  main.o blit.o graphics.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -
     -lpspctrl -lpsppower -lpsprtc -ljpeg -lpng -lz -lm -lpspdebug -lpspdispl
    pge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet
    er -lpsputility -lpspuser -lpspkernel -o LastTime.elf
    psp-fixup-imports LastTime.elf
    psp-prxgen LastTime.elf LastTime.prx
    
    [email protected] /cygdrive/c/psp/lasttime
    $
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

  30. #9120
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Beiträge
    232
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    where are the errors?


 

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

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