Seite 86 von 340 ErsteErste ... 36 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 136 186 ... LetzteLetzte
Zeige Ergebnis 2.551 bis 2.580 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; My method of drawing a filled circle (note this is just written up, havent tried it if itll work, so ...

  
  1. #2551
    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

    My method of drawing a filled circle (note this is just written up, havent tried it if itll work, so give it a shot)
    Code:
    #include <math.h>
    
    #define DEG2RAD 3.14159/180
     
    void drawFilledCircle(int x,int y, float radius)
    {
       for (int i=0; i < 360; i++)
       {
          float degInRad = i*DEG2RAD;
          drawLineScreen(x+radius,y+radius,cos(degInRad)*radius,sin(degInRad)*radius);
       }
    }
    Thats if your using graphics library.



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


  2. #2552
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    No it won't, and even if it did, it would be a lot slower than the previous code :P
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  3. #2553
    QJ Gamer Green
    Points: 9.253, Level: 64
    Level completed: 68%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Australia - A.C.T.
    Beiträge
    1.517
    Points
    9.253
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    can anyone give me some help on recompiling this code
    http://0okm.blogspot.com/2006/11/3rd...in-sample.html
    thx mafia1ft

  4. #2554
    Points: 8.718, Level: 62
    Level completed: 90%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Beiträge
    484
    Points
    8.718
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Why dont you compile it??

  5. #2555
    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 big is flash0 (in bytes) ?

  6. #2556
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    how big is flash0 (in bytes) ?
    Right here.
    I think it is like 20 MB or something but I'm not sure.

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

    yeah ,a bit more ,but i need to now in bytes exactly and where is the system version name stored?

  8. #2558
    Points: 3.797, Level: 38
    Level completed: 98%, Points required for next Level: 3
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Beiträge
    37
    Points
    3.797
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    well i guess, it checks your sceKernelDevKitVersion number and then does if statements to print to the screen the right one...

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

    no i mean on flash , so i can reflash it

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

    Raphael - Can you explain your reasoining? Im learning here, and you arent too helpful by not giving a reason :o

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


  11. #2561
    Points: 3.458, Level: 36
    Level completed: 72%, Points required for next Level: 42
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Beiträge
    2
    Points
    3.458
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    Hello, I've a problem, When I start the .bat file, then comes this when cygwin says that the program is succesfully installed :





    He stays on this part ,, Can someone help me?

    Thnxx, Bennoo

    *Sorry if this English is a little bit strange because i'm dutchman.*

  12. #2562
    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
    Raphael - Can you explain your reasoining? Im learning here, and you arent too helpful by not giving a reason :o
    The biggest difference is that you are calling a sin and cos math function 360 times each which is VERY expensive without a LUT. The other snippet didn't use any.

  13. #2563
    QJ Gamer Green
    Points: 9.253, Level: 64
    Level completed: 68%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Australia - A.C.T.
    Beiträge
    1.517
    Points
    9.253
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Bennoo
    Hello, I've a problem, When I start the .bat file, then comes this when cygwin says that the program is succesfully installed :





    He stays on this part ,, Can someone help me?

    Thnxx, Bennoo

    *Sorry if this English is a little bit strange because i'm dutchman.*
    i remember when i was seting up toolchain i had to go find mirors for half the files because they wern't there maybe you will to or you can try my toolchain.sh file http://rapidshare.com/files/12649221/toolchain.sh.html
    -= Double Post =-
    can some helpme with this code
    i got it to compile but when i run it my psp frezzes up

    main.c
    Code:
    #include <pspkernel.h>
    #include <pspctrl.h>
    
    
    PSP_MODULE_INFO("HOOK", 0x1000, 1, 1);
    PSP_MAIN_THREAD_ATTR(0);
    
    
    
    
    int module_start(int *pad_data, int count, int mode, int ret_data, int *Buff)
    {
    	unsigned int Buttons = pad_data[1];
    	unsigned char Lx = pad_data[2] & 0x000000FF;
    	unsigned char Ly = (pad_data[2] & 0x0000FF00) >> 8;
    	if (Lx > 0xC0)
    	{
    		Buttons = Buttons | PSP_CTRL_RIGHT;
    	}
    	if (Lx < 0x40)
    	{
    		Buttons = Buttons | PSP_CTRL_LEFT;
    	}
    	if (Ly > 0xC0)
    	{
    		Buttons = Buttons | PSP_CTRL_DOWN;
    	}
    	if (Ly < 0x40)
    	{
    		Buttons = Buttons | PSP_CTRL_UP;
    	}
    	pad_data[1] = Buttons;
    
    
    
    	return 0;
    }
    makefile
    Code:
    TARGET = screenshotbmp
    OBJS = main.o
    
    BUILD_PRX=1
    
    
    INCDIR = 
    CFLAGS = -Os -G0 -Wall -fno-strict-aliasing -fno-builtin-printf
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBDIR =
    LDFLAGS = -mno-crt0 -nostartfiles
    LIBS =
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    Geändert von mafia1ft (01-20-2007 um 11:42 PM Uhr) Grund: Automerged Doublepost

  14. #2564
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard Compiler brings up ALOT of errors

    The compiler brings up ALOT of errors, here is the code:

    Code:
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspdisplay.h>
    #include <pspctrl.h>
    
    PSP_MODULE_INFO("Buttons", 0, 1, 1); 
     
    #define printf pspDebugScreenPrintf 
     
    int exit_callback(void) 
    { 
       sceKernelExitGame(); 
    
       return 0; 
    } 
     
    void CallbackThread(void *arg) 
    { 
       int cbid; 
    
       cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL); 
       sceKernelRegisterExitCallback(cbid); 
    
       sceKernelSleepThreadCB(); 
    } 
     
    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() {
        pspDebugScreenInit();
        SetupCallbacks();
        
        int fun = 0;
        int counter = 0;
        int i = 0;
        SceCtrlData pad;
        
        printf("Press X to start the counter");
        
        while(1) {
              sceCtrlReadBufferPositive(&pad, 1);
              if(pad.Buttons & PSP_CTRL_CROSS) {
                             break;
              }
        }
        while(1) {
              sceCtrlReadBufferPositive(&pad, 1);
              if(pad.Buttons & PSP_CTRL_CIRCLE) {
                             break;
              }
              pspDebugScreenClear();
              printf("Press O to stop the counter\n");
              printf("Counter: %i", counter);
              counter++;
              
              for (i=0, i<5, i++) {
                  sceDisplayWaitVBlankStart();
              }
        }
        pspDebugScreenClear();
        printf("Counter Finished\n");
        printf("Final Count: %i\n", counter);
        printf("Press TRIANGLE for the next feature");
        
        while(1) {
              sceCtrlReadBufferPositive(&pad, 1);
              if(pad.Buttons & PSP_CTRL_TRIANGLE) {
                             break;
              }
        }
        
        while(1) {
              sceCtrlReadBufferPositive(&pad, 1);
              if(pad.Buttons & PSP_CTRL_CIRCLE) {
                             break;
              }
              pspDebugScreenClear();
              printf("Press X to increase the number, O to stop\n");
              printf("Number: %i", fun);
              if(pad.Buttons & PSP_CTRL_CROSS) {
                             fun++;
              }
        }
    
        sceKernelSleepThread();
        
        return 0;
    }
    I'm not exactly using CYGWIN, I installed the psp sdk and im compiling using the start.bat. Will it work when i install CYGWIN on my other computer?
    ...Just Returned To The Scene...

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

    yaustar - But it still drew a filled circle right? Just not as efficiently as another method... Im asking because I want to knwo if my mental calculations were wrong when i was writing that up. I cant check it as Im PSPless- but i suppose I could port it to lua and check it out...

    ...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. #2566
    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
    yaustar - But it still drew a filled circle right? Just not as efficiently as another method... Im asking because I want to knwo if my mental calculations were wrong when i was writing that up. I cant check it as Im PSPless- but i suppose I could port it to lua and check it out...
    Nope, I can't see it drawing a circle either.

  17. #2567
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von JaSo PsP
    The compiler brings up ALOT of errors, here is the code:

    Code:
    lol code
    I'm not exactly using CYGWIN, I installed the psp sdk and im compiling using the start.bat. Will it work when i install CYGWIN on my other computer?
    Would you mind posting the errors?

  18. #2568
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    I sorted my problem out.
    ...Just Returned To The Scene...

  19. #2569
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Raphael - Can you explain your reasoining? Im learning here, and you arent too helpful by not giving a reason
    Zitat Zitat von SG57
    My method of drawing a filled circle (note this is just written up, havent tried it if itll work, so give it a shot)
    Code:
    #include <math.h>
    
    #define DEG2RAD 3.14159/180
     
    void drawFilledCircle(int x,int y, float radius)
    {
       for (int i=0; i < 360; i++)
       {
          float degInRad = i*DEG2RAD;
          drawLineScreen(x+radius,y+radius,cos(degInRad)*radius,sin(degInRad)*radius);
       }
    }
    Thats if your using graphics library.
    This does NOT draw a circle. It draws a bunch of lines from the "center" (x+radius, y+radius) to a number of points that lie between (-radius, -radius) and (radius, radius).

    Even if you changed it to draw the lines from center to (center-radius | center+radius) then it would in most cases not be a completely filled circle. Apart from the thousands of times of overdrawing pixels unnecessarily, wasting even more cpu time than for the hundreds of trigonometric function calls.
    If you want to draw filled primitves, always try to draw them in horizontal lines.
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  20. #2570
    QJ Gamer Green
    Points: 9.253, Level: 64
    Level completed: 68%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Australia - A.C.T.
    Beiträge
    1.517
    Points
    9.253
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    ok i havn't done anything with pictures latly but when i was about to try i get a strange error saying:
    main.c.text+0xc): undefined reference to `loadImage'
    main.c.text+0x2c): undefined reference to `blitAlphaImageToScreen'
    here is my code
    Code:
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <png.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <psputils.h>
    #include <malloc.h>
    #include "graphics.h"
    
    #define printf pspDebugScreenPrintf
    #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
    
    PSP_MODULE_INFO("SHUTDOWN", 0, 1, 1);
    
    int main() {
        char buffer[200];
    	Image* splash;
    	splash = loadImage("splash.png");
    	
    blitAlphaImageToScreen(0, 0, 480, 282, splash, 0, 0);
    	
    	sceKernelSleepThread();
    
    	return 0;
    
    }
    /* Exported function returns the address of module_info */
    void* getModuleInfo(void)
    {
    	return (void *) &module_info;
    }
    any help would be great

  21. #2571
    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 are not compiling the graphics.c file and/or you are not linking to the graphics.o file that is generated when you compile graphics.c.

  22. #2572
    QJ Gamer Green
    Points: 9.253, Level: 64
    Level completed: 68%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Australia - A.C.T.
    Beiträge
    1.517
    Points
    9.253
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/ps
    pdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx
    main.o graphics.o framebuffer.o /usr/local/pspdev/psp/sdk/lib/prxexports.o  -lps
    pdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet
    -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o mymodule.
    elf
    graphics.o: In function `loadImage':
    graphics.c:(.text+0x128): undefined reference to `png_create_read_struct'
    graphics.c:(.text+0x148): undefined reference to `png_set_error_fn'
    graphics.c:(.text+0x150): undefined reference to `png_create_info_struct'
    graphics.c:(.text+0x164): undefined reference to `png_init_io'
    graphics.c:(.text+0x170): undefined reference to `png_set_sig_bytes'
    graphics.c:(.text+0x17c): undefined reference to `png_read_info'
    graphics.c:(.text+0x1a4): undefined reference to `png_get_IHDR'
    graphics.c:(.text+0x1e0): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0x20c): undefined reference to `png_set_strip_16'
    graphics.c:(.text+0x214): undefined reference to `png_set_packing'
    graphics.c:(.text+0x248): undefined reference to `png_get_valid'
    graphics.c:(.text+0x260): undefined reference to `png_set_filler'
    graphics.c:(.text+0x2b8): undefined reference to `png_read_end'
    graphics.c:(.text+0x2c8): undefined reference to `png_destroy_read_struct'
    graphics.c:(.text+0x2e0): undefined reference to `png_set_tRNS_to_alpha'
    graphics.c:(.text+0x2f8): undefined reference to `png_read_row'
    graphics.c:(.text+0x360): undefined reference to `png_set_palette_to_rgb'
    graphics.c:(.text+0x370): undefined reference to `png_set_gray_1_2_4_to_8'
    graphics.o: In function `saveImage':
    graphics.c:(.text+0xb08): undefined reference to `png_create_write_struct'
    graphics.c:(.text+0xb18): undefined reference to `png_create_info_struct'
    graphics.c:(.text+0xb2c): undefined reference to `png_init_io'
    graphics.c:(.text+0xb5c): undefined reference to `png_set_IHDR'
    graphics.c:(.text+0xb68): undefined reference to `png_write_info'
    graphics.c:(.text+0xc1c): undefined reference to `png_write_row'
    graphics.c:(.text+0xc38): undefined reference to `png_write_end'
    graphics.c:(.text+0xc44): undefined reference to `png_destroy_write_struct'
    graphics.c:(.text+0xc88): undefined reference to `png_destroy_write_struct'
    graphics.o: In function `flipScreen':
    graphics.c:(.text+0xce0): undefined reference to `sceGuSwapBuffers'
    graphics.o: In function `guStart':
    graphics.c:(.text+0xe6c): undefined reference to `sceGuStart'
    graphics.o: In function `initGraphics':
    graphics.c:(.text+0xe80): undefined reference to `sceGuInit'
    graphics.c:(.text+0xe9c): undefined reference to `sceGuDrawBuffer'
    graphics.c:(.text+0xeb0): undefined reference to `sceGuDispBuffer'
    graphics.c:(.text+0xeb8): undefined reference to `sceGuClear'
    graphics.c:(.text+0xec4): undefined reference to `sceGuDepthBuffer'
    graphics.c:(.text+0xed0): undefined reference to `sceGuOffset'
    graphics.c:(.text+0xee4): undefined reference to `sceGuViewport'
    graphics.c:(.text+0xef0): undefined reference to `sceGuDepthRange'
    graphics.c:(.text+0xf04): undefined reference to `sceGuScissor'
    graphics.c:(.text+0xf0c): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf1c): undefined reference to `sceGuAlphaFunc'
    graphics.c:(.text+0xf24): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf2c): undefined reference to `sceGuDepthFunc'
    graphics.c:(.text+0xf34): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf3c): undefined reference to `sceGuFrontFace'
    graphics.c:(.text+0xf44): undefined reference to `sceGuShadeModel'
    graphics.c:(.text+0xf4c): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf54): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf5c): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xf70): undefined reference to `sceGuTexMode'
    graphics.c:(.text+0xf7c): undefined reference to `sceGuTexFunc'
    graphics.c:(.text+0xf88): undefined reference to `sceGuTexFilter'
    graphics.c:(.text+0xf90): undefined reference to `sceGuAmbientColor'
    graphics.c:(.text+0xf98): undefined reference to `sceGuEnable'
    graphics.c:(.text+0xfb0): undefined reference to `sceGuBlendFunc'
    graphics.c:(.text+0xfb8): undefined reference to `sceGuFinish'
    graphics.c:(.text+0xfc4): undefined reference to `sceGuSync'
    graphics.c:(.text+0xfd4): undefined reference to `sceGuDisplay'
    graphics.o: In function `clearScreen':
    graphics.c:(.text+0x101c): undefined reference to `sceGuClearDepth'
    graphics.c:(.text+0x1024): undefined reference to `sceGuClear'
    graphics.c:(.text+0x102c): undefined reference to `sceGuFinish'
    graphics.c:(.text+0x1040): undefined reference to `sceGuSync'
    graphics.o: In function `blitAlphaImageToScreen':
    graphics.c:(.text+0x10ec): undefined reference to `sceGuTexImage'
    graphics.c:(.text+0x1110): undefined reference to `sceGuTexScale'
    graphics.c:(.text+0x1120): undefined reference to `sceGuFinish'
    graphics.c:(.text+0x1158): undefined reference to `sceGuSync'
    graphics.c:(.text+0x118c): undefined reference to `sceGuGetMemory'
    graphics.c:(.text+0x120c): undefined reference to `sceGuDrawArray'
    graphics.c:(.text+0x1220): undefined reference to `sceGuFinish'
    graphics.c:(.text+0x1258): undefined reference to `sceGuSync'
    graphics.o: In function `blitImageToScreen':
    graphics.c:(.text+0x1320): undefined reference to `sceGuCopyImage'
    graphics.c:(.text+0x1328): undefined reference to `sceGuFinish'
    graphics.c:(.text+0x135c): undefined reference to `sceGuSync'
    collect2: ld returned 1 exit status
    make: *** [mymodule.elf] Error 1
    ok now i get a sh*t load of errors

  23. #2573
    QJ Gamer Green
    Points: 11.300, Level: 70
    Level completed: 13%, Points required for next Level: 350
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Ort
    main();
    Beiträge
    1.071
    Points
    11.300
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    did u include the correct libs (including zlib)

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

    You need to add
    Code:
    -lpspgl -lpng
    To your makefile's LIBS line. There is no reference there to a function in zlib PSPJunkie_.

    You may also have to add -lpspgum, but Im not seeing any references to it, so itd be unnecesary.

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

    Your LIBS line in the makefile should look like this:

    Code:
    LIBS = -lpspgu -lpng -lz -lm
    You also need to have libpng and zlib installed if you haven't already.

    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

  26. #2576
    QJ Gamer Green
    Points: 9.253, Level: 64
    Level completed: 68%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Australia - A.C.T.
    Beiträge
    1.517
    Points
    9.253
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    ok thx guys at least now it will compile
    ok can anyone see where i have made a stupid mistake(it is a prx btw)
    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 printf pspDebugScreenPrintf
    #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
    
    PSP_MODULE_INFO("SHUTDOWN", 0, 1, 1);
    
    
    
    int main() {
    
    SceCtrlData pad;
    
    	Image* splash;
              pspDebugScreenInit();
              initGraphics();
    	splash = loadImage("spalsh.png");
    	                    sceDisplayWaitVblankStart();
    		
    	
    blitAlphaImageToScreen(0, 0, 480, 272, splash, 0, 0);
    
    
    flipScreen();	
    
    	sceKernelSleepThread();
    	return 0;
    
    
    }
    Geändert von mafia1ft (01-22-2007 um 06:56 AM Uhr)

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

    wich errors?

  28. #2578
    Points: 3.469, Level: 36
    Level completed: 80%, Points required for next Level: 31
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Beiträge
    4
    Points
    3.469
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    loadImage("spalsh.png");

    I'm guessing you mean to load splash.png instead.

  29. #2579
    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

    lol , some questions
    is it possible to let led's change of color , they are placed in the r and l button

    i know this will be very difficult

    any idea's?

  30. #2580
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    lol , some questions
    is it possible to let led's change of color , they are placed in the r and l button

    i know this will be very difficult

    any idea's?
    What do you mean?

    You mean if you have LED's in the L and R button is it possible for them to change color with homebrew? If so, then I do think that is impossible. :S


 

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 .