Seite 6 von 340 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 56 106 ... LetzteLetzte
Zeige Ergebnis 151 bis 180 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; Hi, I'm new to the PSP homebrew programing scene, lucky not to C++ however, and I can't figure out for ...

  
  1. #151
    Points: 4.193, Level: 41
    Level completed: 22%, Points required for next Level: 157
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Arkhangelsk, Russia
    Beiträge
    21
    Points
    4.193
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Hi, I'm new to the PSP homebrew programing scene, lucky not to C++ however, and I can't figure out for the life of me how to display one picture over the other withough erasing the first picture. If anyone could help it would be greatly appresiated.

    Curently I have it set up as such.

    Code:
        char buffer1[200];
        char buffer2[200];
        
        Image* bg;
        Image* set;
        
        sprintf(buffer1, "bg.png");
        bg = loadImage(buffer1);
        
        sprintf(buffer2, "set.png");
        set = loadImage(buffer2);
        
        sceDisplayWaitVblankStart();
        blitAlphaImageToScreen(0 ,0 ,480 ,272 ,bg ,0 ,0 );
        flipScreen();
        
        sceDisplayWaitVblankStart();
        blitAlphaImageToScreen(0 ,0 ,60 ,34 ,set ,60 ,34 );
        flipScreen();
    As you can see I have it draw one picture and then draw the smaller, however, instead of drawind the second picture over the first, it just erases the first picture instead of drawing over it.

    Sorry if this is noobish BTW.


    Geändert von F.T.P. (03-28-2006 um 06:52 PM Uhr)

  2. #152
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    F.T.P.: Try this
    Code:
     void printTextImage(int x, int y, const char* text, u32 color, Image* image)
    but I'm not sure it will work, I just found it.

  3. #153
    Points: 4.279, Level: 41
    Level completed: 65%, Points required for next Level: 71
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    10
    Points
    4.279
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    F.T.P. you have 2 screen buffers, remove the flipScreen between your blitAlphaImageToScreen, you'll draw on the same screen buffer.

  4. #154
    Mushroom Man
    Points: 7.283, Level: 56
    Level completed: 67%, Points required for next Level: 67
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    UK
    Beiträge
    318
    Points
    7.283
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von F.T.P.
    Hi, I'm new to the PSP homebrew programing scene, lucky not to C++ however, and I can't figure out for the life of me how to display one picture over the other withough erasing the first picture. If anyone could help it would be greatly appresiated.

    Curently I have it set up as such.

    Code:
        char buffer1[200];
        char buffer2[200];
        
        Image* bg;
        Image* set;
        
        sprintf(buffer1, "bg.png");
        bg = loadImage(buffer1);
        
        sprintf(buffer2, "set.png");
        set = loadImage(buffer2);
        
        sceDisplayWaitVblankStart();
        blitAlphaImageToScreen(0 ,0 ,480 ,272 ,bg ,0 ,0 );
        flipScreen();
        
        sceDisplayWaitVblankStart();
        blitAlphaImageToScreen(0 ,0 ,60 ,34 ,set ,60 ,34 );
        flipScreen();
    As you can see I have it draw one picture and then draw the smaller, however, instead of drawind the second picture over the first, it just erases the first picture instead of drawing over it.

    Sorry if this is noobish BTW.
    The graphics.c package uses double buffering, so when you flip the buffers(between displayed and hidden) the buffer that you were editing is now being displayed, and the buffer that was being displayed is now being edited. Writing to the first buffer will not write over to the second, so in essence you must re-draw the scene upon every flip.

    Code:
        sceDisplayWaitVblankStart();
        blitAlphaImageToScreen(0 ,0 ,480 ,272 ,bg ,0 ,0 );
        blitAlphaImageToScreen(0 ,0 ,60 ,34 ,set ,60 ,34 );
        flipScreen();

  5. #155
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Does anyone know the command to activate usb ( I found the example in the sdk but somehow it didnt work form me...). Cause I want to activate it when I press 'X'. If anyone wold give me an example it would be great. Thanks in advance.

    Edit: Nevermind I just got it to compile. Too bad that I just lost my USB-cable =S
    Geändert von SodR (03-29-2006 um 11:58 AM Uhr)

  6. #156
    Points: 4.193, Level: 41
    Level completed: 22%, Points required for next Level: 157
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Arkhangelsk, Russia
    Beiträge
    21
    Points
    4.193
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Damn, that helped alot. Thanks you guys. :)

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

    Have anyone ever notice that when printing text to the screen whether over a picture or not, if the xcoord is <0 of the screen... nothing is printed at all?

    Would someone mind telling me what can be done about this?
    I'm currently using: printTextScreen(,,,)
    Geändert von Devun_06 (03-30-2006 um 12:35 PM Uhr)

  8. #158
    Points: 4.439, Level: 42
    Level completed: 45%, Points required for next Level: 111
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Beiträge
    32
    Points
    4.439
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Hey, how could I disable 'Home' -button, so nothing would happen if you press it, or how could I get my program to straight exit when pressing 'Home'? I tried one method, and when you press 'Home', that stupid "Do you want to quit program" -popup comes to the screen, but after a second it will get me back to XMB. So how could I disable that "Do you want to quit program" -popup showing up at all?

    EDIT: Got it working, no problems anymore :)
    Geändert von MiiKKiZ (03-31-2006 um 01:48 PM Uhr)

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

    Talking

    If you're getting the XMB return system then I guess your running 1.5. I've never tried overriding the original home key feature, but I think this might help.

    SceCtrlData Pad;
    sceCtrlReadBufferPositive (&Pad,1);
    if(Pad.Buttons & PSP_CTRL_HOME){sceKernelE xitGame();}

  10. #160
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    I have not tested it my self but if you code that nothing will happen when you press home, like this:
    SceCtrlData Pad;
    sceCtrlReadBufferPositive (&Pad,1);
    if(Pad.Buttons & PSP_CTRL_HOME)

    I think it will work as it were disabled. At least you can always try.

  11. #161
    Art
    Art ist offline
    Bush Programmer
    Points: 60.149, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    3.658
    Points
    60.149
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Hi Guys, just a little Q re C syntax.

    I have some variables in a buffer that represent ASCII values that I
    would like to print to screen as ASCII.
    I can print them as decimal values like so:
    printf("variable is: %d",data[0]);

    So if I have the ASCII character '0' in the buffer, it will print as:
    variable is: 48

    which is it's decimal value. What do I need to replace the %d with for ASCII?
    Cheers, Art.

  12. #162
    QJ Gamer Green
    Points: 25.223, Level: 95
    Level completed: 88%, Points required for next Level: 127
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    4.289
    Points
    25.223
    Level
    95
    Downloads
    0
    Uploads
    0

    Standard

    %c I believe. If I'm right, I read it here: http://irc.essex.ac.uk/www.iota-six....ming_intro.asp

  13. #163
    Art
    Art ist offline
    Bush Programmer
    Points: 60.149, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    3.658
    Points
    60.149
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Yep, I Googled it and came back to answer myself
    Thanx ;)

  14. #164
    QJ Gamer Green
    Points: 25.223, Level: 95
    Level completed: 88%, Points required for next Level: 127
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    4.289
    Points
    25.223
    Level
    95
    Downloads
    0
    Uploads
    0

    Standard

    No prob. You know You can also do other things, like %02x for showing the value in a 2 character hex form, and %08x for 8 char...

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

    hmmm....Soccer, thats what you told me for hex, and its true, looked it up and everything... use %02x to only use/get the hex in 2 character/byte form...

    ...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. #166
    QJ Gamer Blue
    Points: 4.272, Level: 41
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    Northampton, England
    Beiträge
    59
    Points
    4.272
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Hi everyone, i'm trying to make a png photo viewer with music in the background. Can anybody please help.

    Code:
    #include <pspkernel.h>
    #include <pspdisplay.h>
    #include <pspdebug.h>
    #include <pspgu.h>
    #include <png.h>
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <stdio.h>
    #include <psppower.h>
    #include <pspaudio.h>
    #include <pspaudiolib.h>
    #include "mp3player.h"
    #include "graphics.h"
    
    PSP_MODULE_INFO("images and music", 0, 1, 1);
    #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
    #define printf pspDebugScreenPrintf
    
    /* Exit callbacks */
    int exit_callback(int arg1, int arg2, void *common) {
        sceKernelExitGame();
        return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
        int cbid;
        
        cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
        sceKernelSleepThreadCB();
        
        return 0;
    }
    
    /* Sets up the callback thread and returns its id */
    int SetupCallbacks(void) {
        int thid = 0;
        
        thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
        if(thid >= 0) {
                sceKernelStartThread(thid, 0, 0);
                }
                
    return thid;
    }
    
    int main(void) {
        SetupCallbacks();
        initGraphics();
        SceCtrlData pad;
        int i;
        int j;
        int selComponent = 0;
        int selComponent2 = 0;
        char buffer[200];
        char image[5];
        char music[5];
        Image* ourImage;
        pspAudioInit();
            
            while(1) {
                 sceCtrlReadBufferPositive(&pad, 1);
    
    if(selComponent == 0) {
    image == "1.png";
    } else if(selComponent == 1) {
    image == "2.png";
    } else if(selComponent == 2) {
    image == "3.png";
    } else if(selComponent == 3) {
    image == "4.png";
    } else if(selComponent == 4) {
    image == "5.png";
    }
    
    if(selComponent2 == 0) {
    music == "1.mp3";
    } else if(selComponent2 == 1) {
    music == "2.mp3";
    } else if(selComponent2 == 2) {
    music == "3.mp3";
    } else if(selComponent2 == 3) {
    music == "4.mp3";
    } else if(selComponent2 == 4) {
    music == "5.mp3";
    }
    
                 
    if(pad.Buttons & PSP_CTRL_UP) {
                   if(selComponent > 0) {
                                   selComponent--;
                                   }
                                   for(i=0; i<10; i++) {
                                            sceDisplayWaitVblankStart();
    }
    } else if(pad.Buttons & PSP_CTRL_DOWN) {
           if(selComponent < 4) {
                           selComponent++;
                           }
                           for(i=0; i<10; i++) {
                                    sceDisplayWaitVblankStart();
                                    }
    }
    
    if(pad.Buttons & PSP_CTRL_LEFT) {
                   
    if(selComponent2 > 0) {
                           selComponent2--;
                           }
                           for(j=0; j<10; j++) {
                                    sceDisplayWaitVblankStart();
                                    }
    if(pad.Buttons & PSP_CTRL_RIGHT) {
                   
    if(selComponent2 > 1) {
                           selComponent2++;
                           }
                           for(j=0; j<10; j++) {
                                    sceDisplayWaitVblankStart();
                                    }
    
                                        }
    
    
    printf("Image viewer (with added music!)");
    sprintf(buffer, image);
    
    if (!ourImage) {
    //Image load failed
    printf("Image load failed!/n");
    } else {
    int x = 0;
    int y = 0;
    sceDisplayWaitVblankStart();
    
    while (x <= 480) {
    while (y <= 272) {
    blitAlphaImageToScreen(0, 0, 480, 272, ourImage, x, y);
    y += 272;
    }
    
    x += 480;
    y = 0;
    }
    
    MP3_Init(1);
    MP3_Load(music);
    MP3_Play();
    
    while(1) {
    sceCtrlReadBufferPositive(&pad, 1);
    if(pad.Buttons & PSP_CTRL_CROSS) {
    break;
    } else if(pad.Buttons & PSP_CTRL_CIRCLE) {
    MP3_Pause();
    for(i=0; i<10; i++) {
    sceDisplayWaitVblankStart();
    }
    }
    
    MP3_Stop();
    MP3_FreeTune();
    
    
    flipScreen();
    
    for(i=0; i<1; i++) {
             sceDisplayWaitVblankStart();
             }
             }
             return 0;
    }
    Any help would be greatly appreciated.

  17. #167
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    code-zero: Maybe you should tell us what the problem is instead of yout posting your source. Doesn't it compile? If so what error code? Or at which point does your program crash?? We need more info

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

    code-zero, there are multiple resons why it might not work... 1 being you initalized the MP3 playing in a loop, along with 2 infinite loops as well lol.. . Why not post your problems complying? Oh and it also looks like you are just copying and pasting from Yeldarbs *tuts*, 'ourImage'? SelComponent? blitting the backround/image with a loop for know reason? (remove the > and < junk, just do blitAlphaImageToScreen(0, 0, 480, 272, ourImage, 0, 0)<- that will blit ourImage to the co-ordinates of 0, 0 and the ourImage's dimensions are 480x272 in this) There are some more problems in theree, but ill let you debug to get used to having too.
    Geändert von SG57 (04-07-2006 um 11:32 AM 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


  19. #169
    QJ Gamer Blue
    Points: 4.272, Level: 41
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    Northampton, England
    Beiträge
    59
    Points
    4.272
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    I went through yeldarbs tuts, but I used the same variables to try and make it a little easier to understand, and I didn't copy and paste. I printed it off and typed it, .

  20. #170
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    I'm having problem installing PSPGL on my PC. I downloaded pspgl using svn (svn co svn://svn.ps2dev.org/psp/trunk/pspgl ) and that works just fine. But how am I supposed to install it?? The readme is like a riddle, why cant it just tell me what to do? I tryed to just go into the dir (cd pspgl) and type "make". After that alot of text rolls on the screen and after like a half a minute I get this error:
    Code:
    [Alotofdirnameshere]/TEMP/ccimwEpb.s: Assembler messages:
    [Alotofdirnameshere]/TEMP/ccimwEpb.s: "Error: Illegal operands 'vmidt.q m700'
    make: *** [glLoadIdentity.o] Error 1
    I have tryed to re-download pspgl a couple of times but I get the same error everytime. Worth to notice is that almost every line of the text that rolls by before the error looks like this:
    Code:
     psp-gcc -std=gnu99 -g -Wall -Wmissing-prototypes -Os -G0
     -fsingle-precision-constant -I. -I /usr/local/pspdev/psp/include -I 
    /usr/local/pspdev/psp/include funit-at-a-time -MD -MF .deps/[Filename].d -c
     [Filename].c

  21. #171
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Meh, I need help with blitting an image to the screen. Code:

    Code:
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspgu.h>
    #include <png.h>
    #include <stdio.h>
    #include "graphics.h"
    
    #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
    #define printf pspDebugScreenPrintf
    
    PSP_MODULE_INFO("Button Basher", 0, 1, 1);
    
    
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    
    int main() {
    	char buffer[200];
    	Image* menubg;
    
    	pspDebugScreenInit();
    	SetupCallbacks();
    	initGraphics();
    
    	sprintf(buffer, "menubg.png");
    	menubg = loadImage(buffer);
    
    	if (!menubg) {
    			//Image load failed
    			printf("Image load failed! Please email [email protected]!\n");
    	} else {
    		int x = 0;
    		int y = 0;
    		sceDisplayWaitVblankStart();
    		while (x < 480) {
    			while (y < 272) {
    				blitAlphaImageToScreen(0, 0, 480, 272, menubg, x, y);
    			x = 0;
                                  y = 0;
                        }
    			flipScreen();
    		}
    	}
    	sceKernelSleepThread();
    	return 0;
    }
    It compiles successfully but when I view it on my PSP it does not show. Just a black screen. it doesnt crash by PSP though. I can go back to the eloader.


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  22. #172
    Points: 4.145, Level: 40
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    13
    Points
    4.145
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    At first, you dont need this:
    while (x < 480) {
    while (y < 272) {
    blitAlphaImageToScreen(0, 0, 480, 272, menubg, x, y);
    x = 0;
    y = 0;
    }
    flipScreen();
    }


    you just have to write:

    blitAlphaImageToScreen(0, 0, 480, 272, menubg, x, y);
    flipscreen();


    you kopie the code, or?, try to understand why you dont need the 2 while sharpens.

    and now to your problem, i think you need a larger buffer, so test it with 20000 or more ;)

  23. #173
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Nvm I fixed it I somehow got yeldarbs MSN and he helped me I just need to find a tut on how to make a menu now


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

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

    Zitat Zitat von kozine
    Nvm I fixed it I somehow got yeldarbs MSN and he helped me I just need to find a tut on how to make a menu now
    Since im feeling nice today, i just throguh together a quick Simple Menu Tutorial. I uploaded it as a .txt since PSPU doesnt like C source files

    Anyway, i have included one of those copyright Comments at the top, so if you copy and paste, then youd have to include something about it. Instead just read it, get an idea of how it works, and then make your own. Very simple.

    P.S. If something is wrong in it, forgive me since i just throguh it together to help some new devlopers out since i too had a hard time with a menu.

    your welcome.
    Angehängte Dateien Angehängte Dateien

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


  25. #175
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    ty so much I can carry on now XD


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  26. #176
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Sorry for double post!

    Im gettin eally annoyed with this oggplayer LIB. Here is a screenshot of my compiling error:



    Code:

    Code:
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspgu.h>
    #include <png.h>
    #include <stdio.h>
    #include "graphics.h"
    #include <stdlib.h>
    #include <malloc.h>
    #include <stdio.h>
    #include <stdarg.h>
    #include <string.h>
    #include <limits.h>
    #include <errno.h>
    #include <pspaudiolib.h>
    #include <pspaudio.h>
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <psputils.h>
    #include <psptypes.h>
    #include <psppower.h>
    #include <pspiofilemgr.h>
    #include <png.h>
    #include <stdio.h>
    #include "graphics.h"
    
    //Ogg include
    #include "ogg/ivorbisfile.h"
    #include "oggplayer.h"
    
    #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
    #define printf pspDebugScreenPrintf
    
    PSP_MODULE_INFO("Button Basher", 0, 1, 1);
    
    
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();    
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    
    int main() {
      
    	char buffer[200];
    	Image* menubg;
    
    	pspDebugScreenInit();
    	SetupCallbacks();
    	initGraphics();
        pspAudioInit();
        
        //Initialize OGG port
      OGG_Init(1);
      //Load OGG file
      OGG_Load("sounds/menu.ogg");
      //Play the loaded file
      OGG_Play();
      
    	sprintf(buffer, "menubg.png");
    	menubg = loadImage(buffer);
    
    	if (!menubg) {
    			//Image load failed
    			printf("Image load failed! Please email [email protected]!\n");
    	} else {
    		int x = 0;
    		int y = 0;
    		sceDisplayWaitVblankStart();
    		blitAlphaImageToScreen(0, 0, 480, 272, menubg, x, y);
                        }
      
    			flipScreen();
    		
    	sceKernelSleepThread();
    	return 0;
    }
    I would like it so the sound keeps repeating and never stops.


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  27. #177
    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

    Its noi doubt you either dont ahve the OGGlib installed/not including then OGGlib/do not have the OGG lib in the makefile. But o have it repeat and never stop, look at the .h file of it and a protoyp will be in there for something similar.

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


  28. #178
    QJ Gamer Green
    Points: 25.223, Level: 95
    Level completed: 88%, Points required for next Level: 127
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    4.289
    Points
    25.223
    Level
    95
    Downloads
    0
    Uploads
    0

    Standard

    SG57, do you know SDL or a good tutorial of one? I'm interested in learning it, for menus mostly.

  29. #179
    Mindless Fanboy
    Points: 17.218, Level: 83
    Level completed: 74%, Points required for next Level: 132
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.907
    Points
    17.218
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    how do i create barriers for a character? such as walls. how would i make a whole image impossible for a character to go inside? like a buildings walls. thank you!

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

    sorry unsure where else to post this but when i'm trying to get c to work i notice it is trying to dl from a website heres the full error

    --15:23:54-- ftp://ftp.gnu.org/pub/gnu/binutils/b...-2.16.1.tar.gz
    (try: 6) => `binutils-2.16.1.tar.gz'
    Connecting to ftp.gnu.org|199.232.41.7| :21... failed: Connection timed out.
    Retrying.

    anyway around this would be much appreciated=-)
    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


 
Seite 6 von 340 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 56 106 ... LetzteLetzte

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:15 PM Uhr.

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