Seite 82 von 340 ErsteErste ... 32 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 132 182 ... LetzteLetzte
Zeige Ergebnis 2.431 bis 2.460 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 hallo007 check the source of dark alex downgraders tests there formats he flash0 -= Double Post =- Spoiler ...

  
  1. #2431
    The Unique Developer
    Points: 7.101, Level: 55
    Level completed: 76%, Points required for next Level: 49
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Canada
    Beiträge
    1.059
    Points
    7.101
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    check the source of dark alex downgraders tests
    there formats he flash0
    -= Double Post =-
    Spoiler for g:

    if( current_pad.Buttons & PSP_CTRL_CROSS)
    {
    char temp[200];
    strcpy( temp, current_dir);
    if( strcmp( ".", gameEntry[current_selection].name) != 0 && strcmp( "..", gameEntry[current_selection].name) != 0)
    {
    strcat( temp, gameEntry[current_selection].name);
    if( is_file(temp))
    {
    selection = (char*)malloc( sizeof(temp));
    strcpy( selection, temp);
    browsing = 0;
    }
    else
    {
    current_selection = 0;
    strcpy( current_dir, temp);
    strcat( current_dir, "/");
    pspDebugScreenClear();
    recacheGameDir();
    current_selection = 0;
    }
    }
    else if( strcmp( ".", gameEntry[current_selection].name) == 0)
    {
    sprintf( current_dir, "%s", "ms0:/");
    pspDebugScreenClear();
    recacheGameDir();
    current_selection = 0;
    }
    else if( strcmp( "..", gameEntry[current_selection].name) == 0)
    {
    int i = 0;
    int max = strlen( current_dir);
    int dir_no = 0;
    while( (i < max))
    {
    if( current_dir[i] == '/')
    {
    dir_no++;
    }
    i++;
    }
    if( dir_no > 1)
    {
    char * temp2 = strtok( current_dir, "/");
    strcpy( temp, temp2);
    strcat( temp, "/");
    i = 2;
    while( (i < dir_no))
    {
    temp2 = strtok( NULL, "/");
    strcat( temp, temp2);
    strcat( temp, "/");
    i++;
    }
    strcpy( current_dir, temp);
    }
    pspDebugScreenClear();
    recacheGameDir();
    current_selection = 0;
    }
    }
    }
    sceDisplayWaitVblankStart ();
    }
    pspDebugScreenClear();

    return selection;
    }

    this is a part of a file browser
    if i press cross i select the file (variabel = temp)
    how do i know of the file is an mp3 or an png or an.....????
    :::::

    Code:
    #include <stdio.h>
    #include <string.h>
    
    int main ()
    {
     char str[] = "ms0:/google/music.mp3"
           if ( (strstr (str,"mp3")) != NULL )
                        printf("How Many Times Do I Have To Tell You Don't \n Choos MP3's idiot!\n");
            else
               printf("Your All Good!\n");
    }


    Malloc.Us Network Administrator

    Decryption of the Encrypted


    You are the unseen, the unstoppable and in power of your code. The God of your software.

  2. #2432
    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
    check the source of dark alex downgraders tests
    there formats he flash0
    Too bad im trying to format flash1 :P
    [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]

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

    Devun - It's not possible at compiling time. Just use a seprate integer (or array) per variable...

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


  4. #2434
    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 check the width and the height of an image??? (an unknow image selected by an user of the app ofcourse;))

  5. #2435
    QJ Gamer Bronze
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    338
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Devun - It's not possible at compiling time. Just use a seprate integer (or array) per variable...
    Thanks...

    Zitat Zitat von hallo007
    how do you check the width and the height of an image??? (an unknow image selected by an user of the app ofcourse;))
    To find the width and height of an image.

    After the image has been loaded use Image* ->imageWidth; and
    Image* ->imageHeight;

    replacing the Image* with the actual images name within the source!

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

    wat is the reason that when i do sceKernelExitGame my psp crashes (with the sound of the umd drive) and three days ago the function did work and i didnt change that function:-s

  7. #2437
    The Unique Developer
    Points: 7.101, Level: 55
    Level completed: 76%, Points required for next Level: 49
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Canada
    Beiträge
    1.059
    Points
    7.101
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    wat is the reason that when i do sceKernelExitGame my psp crashes (with the sound of the umd drive) and three days ago the function did work and i didnt change that function:-s
    IF your using SE SDK , use sceKernelExitVSHVSH();.

    And Thank Any One Who helped you please :) . (not me :P ).
    Malloc.Us Network Administrator

    Decryption of the Encrypted


    You are the unseen, the unstoppable and in power of your code. The God of your software.

  8. #2438
    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 not using the SE SDK tnx devenu;)

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

    Well, I dunno what may be causing a crash upon exiting, a corrupt stack maybe? I dunno...

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


  10. #2440
    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 load bmp images

    while searching i found some header files , but i dindt understand it

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

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

    Standard

    I think it will benefit you to write your own BMP loading library... I, for one, have written multiple versions of BMP loaders for when I was using PSPGL and loading textures such as PCX, BMP, RAW, etc. I learned alot from it. But if your not looking to learn, google for a BMP image loader in C and port it to work with the PSP. Simplest way i see fit.

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


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

    Is it possible to add something to my makefile that makes cygwin automaticly run the code,
    "rm main.o"
    everytime I compile?

    It's tiresome to have to delete main.o manually everytime I have made a modification to a different file than main.c.


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

    GNU make should do that automatically for you as it will detect a code change in the dependency chain of files. If main source and any other files that main source #includes does not change, then that object file does not need to be recompiled.

    Read up on how the compiler works: http://www.ibiblio.org/obp/thinkCS/c...ish/chap01.htm

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

    Honestly, I like to 'clean' my envirorment right after compiling, whether debug or releease version... This makes sure the current version of my code is being compiled, and leaves virtually, no room for error, if the compiler were to randomly mistake an edited source file as for not edited...

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


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

    'make clean' will delete those files for you.

    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

  16. #2446
    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

    *wonders why he is ignored*

    *and wonders why Insomniac can't see my impliation of 'make clean' from the quoted 'clean' in lsat post*

    >:{

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


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

    Cryptic answers to questions aren't useful.

    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

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

    OK I need to know how to install libogg!
    I have done:
    Code:
    svn checkout svn://svn.ps2dev.org/psp/trunk/libogg
    Now what should I do?

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

    Insomniac - Bite me... ;)

    psp - Sooner or later your going to need to think logically about problems for yourself... I can tell you right now, the folder you just downloaded, somewhere in it is a readme or more specifically 'README.PSP' that will tell you EXACTLY what library requirements it needs, as well as what to do to install the library... I know from experience libogg needs libvorbis and libtremor... Unless, Ive mixed up the 3 and libtremor needs libogg and libvorbis, or the other ways around...

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


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

    SG57, I have "cygwin1.dll" in "C:/cygwin/bin/cygwin1.dll" but still doesn't work

  21. #2451
    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

    Did you read README.PSP?

  22. #2452
    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 psphacker12.
    SG57, I have "cygwin1.dll" in "C:/cygwin/bin/cygwin1.dll" but still doesn't work
    Read the error message again. You have multiple versions of cygwin1.dll, remove those that are not in the path given.

    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

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

    when i add -lpspkernel to my makefile , my app just crashes , when i dont add it my app works but kernelloads (like scekernelexitgame) dont work

    any sugestions?

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

    If you're following the samples and have these lines in your makefile:

    Code:
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    Then there is no need to add -lpspkernel as it will be already included.

    It sounds as though your error is something else, post your code.

    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

  25. #2455
    Points: 3.564, Level: 37
    Level completed: 43%, Points required for next Level: 86
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Beiträge
    7
    Points
    3.564
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Hi all.

    I have downloaded the source code that ahman released for VNC and decided to make a skin for it but the problem is I have no idea how to compile the code. I usually manage ok by searching forums and googling but after 4 days of getting it wrong I thought it was time to ask for a little help.
    I'm not a total noob but this is something I have never done so I don't really know where to start.

    I know I could probably find someone to compile it for me but I would rather expand my knowledge so that next time I can just get on and do it myself.

    Many thanks to anyone willing to take the time to point me in the right direction.

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

    check the tutorials on psp-programming.com

  27. #2457
    Points: 3.564, Level: 37
    Level completed: 43%, Points required for next Level: 86
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Beiträge
    7
    Points
    3.564
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    check the tutorials on psp-programming.com
    Thanks :)

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

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

    Standard

    Zitat Zitat von Insert_Witty_Name
    If you're following the samples and have these lines in your makefile:

    Code:
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    Then there is no need to add -lpspkernel as it will be already included.

    It sounds as though your error is something else, post your code.
    it is 1107 lines :/

    but here is the makefile
    Code:
    TARGET =noname
    OBJS =  filebrowser/mp3player.o  main.o  filebrowser/file_browser.o graphics/graphics.o graphics/framebuffer.o 
    
    
    CFLAGS = -O2 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBS =  -lmad -lpspusb -lpspusbstor -lpsppower -lpspgu -lpng -lz -lm -lpspumd -lpspaudiolib -lpspaudio
    LDFLAGS = 
    EXTRA_TARGETS = EBOOT.PBP
    PSP_EBOOT_TITLE = nonameyetv0.2
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak

  29. #2459
    QJ Gamer Blue
    Points: 8.686, Level: 62
    Level completed: 79%, Points required for next Level: 64
    Overall activity: 45,0%

    Registriert seit
    Jan 2006
    Ort
    CO
    Beiträge
    150
    Points
    8.686
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    Hello all,
    I was wondering if anyone knew why when I compile lesson4 I get this in the compiler log

    Code:
    Compiler: Default compiler
    Executing  make...
    make.exe -f "makefile" all
    unknown option -- aInvalid option '?'
    unknown option -- tInvalid option '?'
    unknown option -- hInvalid option '?'
    unknown option -- aInvalid option '?'
    unknown option -- tInvalid option '?'
    unknown option -- hInvalid option '?'
    unknown option -- aInvalid option '?'
    unknown option -- tInvalid option '?'
    unknown option -- hInvalid option '?'
    unknown option -- aInvalid option '?'
    unknown option -- tInvalid option '?'
    unknown option -- hInvalid option '?'
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   main.c graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
    psp-fixup-imports hello.elf
    mksfo 'Image Example' PARAM.SFO
    psp-strip hello.elf -o hello_strip.elf
    pack-pbp EBOOT.PBP PARAM.SFO NULL  \
    	NULL NULL NULL  \
    	NULL  hello_strip.elf NULL
    rm -f hello_strip.elf
    Execution terminated
    Compilation successful
    whats all the unknown option stuff mean? it's not really that big of a deal (or maybe it is idk) because it compiles and runs. I'm just curious is all.

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

    Can someone re-order my LIBS correctly pls?
    Code:
    LIBS = -lpspctrl -lpspgu -lfreetype -lmad -lpspaudiolib -lpspaudio -lpsppower -lpspumd -lpng -lpsprtc -lpspusb -lpspusbstor -lz -lm -lvorbisidec


 

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 .