Seite 201 von 340 ErsteErste ... 101 151 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 251 301 ... LetzteLetzte
Zeige Ergebnis 6.001 bis 6.030 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 brethren i'm using psplink for the first time and i'm wondering if theres a command that you type ...

  
  1. #6001
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von brethren
    i'm using psplink for the first time and i'm wondering if theres a command that you type in pcterm to start the vsh so i can look at what modules are loaded and basically just have a look round

    btw i'm on 3.52 m33
    If you download the PSPLink that included in the RemoteJoy package (I know its definatly on Maxconsole, not sure about here) it includes a script that can reboot to the XMB, as far as I'm aware, PCterm is for the old version of PSPLink, PSPSH is the one included in RemoteJoy.

    -Aura


    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  2. #6002
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Raphael
    Only the USE_KERNEL_LIBC :P
    Else the kernel mode prx won't work in anything > 3.40
    when i remove

    USE_KERNEL_LIBC = 1

    line then i get this error:

    Code:
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_sbrk.o): In func
    tion `_sbrk':
    ../../../../../../newlib/libc/sys/psp/libcglue.c:524: undefined reference to `sc
    eKernelMaxFreeMemSize'

  3. #6003
    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 myschoo
    when i remove

    USE_KERNEL_LIBC = 1

    line then i get this error:

    Code:
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_sbrk.o): In func
    tion `_sbrk':
    ../../../../../../newlib/libc/sys/psp/libcglue.c:524: undefined reference to `sc
    eKernelMaxFreeMemSize'
    Because Kernel Libc needs -lpspkernel. Just add it to the last position of the LIBS line in the makefile
    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.

  4. #6004
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    im getting same error

    Zitat Zitat von Makefile
    TARGET = testprx
    OBJS = main.o blit.o
    BUILD_PRX = 1
    #USE_KERNEL_LIBC = 1
    USE_KERNEL_LIBS = 1

    INCDIR =
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)

    LIBDIR =
    LIBS = -lpng -lz -lm -lpspkernel
    LDFLAGS =

    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    also tried build_prx.mak...same error

  5. #6005
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Ugh..I'm still working on my sidescroller. The animation WAS working, but Idk what happened to it.

    Whenever you get to the game part (the code I will post below), you can move 2 pixels, then the game will freeze.

    Code:
     
    #include <pspkernel.h>
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <stdio.h> //ADDITION FOR SPRINTF
    #include </usr/include/sys/stat.h> //ADDITION FOR TIME
    #include "graphics.h"
    
    
    #define RGB(r, g, b) ((r)|((g)<<8)|((b)<<16))
    
    void Game()
    {
     SceCtrlData pad;
    
      // NOTE! LinkWalking1.png is a stand-still motion. 
     
     Image* Link[35];
     Link[0] = loadImage("./Images/Link/LinkWalking1.png");
     Link[1] = loadImage("./Images/Link/LinkWalking1.png");
     Link[2] = loadImage("./Images/Link/LinkWalking1.png");
     Link[2] = loadImage("./Images/Link/LinkWalking1.png");
     Link[4] = loadImage("./Images/Link/LinkWalking1.png"); 
     Link[5] = loadImage("./Images/Link/LinkWalking2.png");
     Link[6] = loadImage("./Images/Link/LinkWalking2.png");
     Link[7] = loadImage("./Images/Link/LinkWalking2.png");
     Link[8] = loadImage("./Images/Link/LinkWalking2.png");
     Link[9] = loadImage("./Images/Link/LinkWalking2.png"); 
     Link[10] = loadImage("./Images/Link/LinkWalking3.png");
     Link[11] = loadImage("./Images/Link/LinkWalking3.png");
     Link[12] = loadImage("./Images/Link/LinkWalking3.png");
     Link[13] = loadImage("./Images/Link/LinkWalking3.png");
     Link[14] = loadImage("./Images/Link/LinkWalking3.png");
     Link[15] = loadImage("./Images/Link/LinkWalking4.png");
     Link[16] = loadImage("./Images/Link/LinkWalking4.png");
     Link[17] = loadImage("./Images/Link/LinkWalking4.png");
     Link[18] = loadImage("./Images/Link/LinkWalking4.png");
     Link[19] = loadImage("./Images/Link/LinkWalking4.png");
     Link[20] = loadImage("./Images/Link/LinkWalking5.png");
     Link[21] = loadImage("./Images/Link/LinkWalking5.png");
     Link[22] = loadImage("./Images/Link/LinkWalking5.png");
     Link[23] = loadImage("./Images/Link/LinkWalking5.png");
     Link[24] = loadImage("./Images/Link/LinkWalking5.png");
     Link[25] = loadImage("./Images/Link/LinkWalking6.png");
     Link[26] = loadImage("./Images/Link/LinkWalking6.png");
     Link[27] = loadImage("./Images/Link/LinkWalking6.png"); 
     Link[28] = loadImage("./Images/Link/LinkWalking6.png");
     Link[29] = loadImage("./Images/Link/LinkWalking6.png");
     Link[30] = loadImage("./Images/Link/LinkWalking7.png");
     Link[31] = loadImage("./Images/Link/LinkWalking7.png");
     Link[32] = loadImage("./Images/Link/LinkWalking7.png");
     Link[33] = loadImage("./Images/Link/LinkWalking7.png");
     Link[34] = loadImage("./Images/Link/LinkWalking7.png");
     
    
     Image* Level1;
     Level1 = loadImage("./Images/Level1/1-1.png");
    
     int FrameCounter = 0;
     int MenuOne = 0;
     
     int LinkPosX = 0;
     int LinkFrameCounter = 0;
     
     while(1)
     {
     sceCtrlReadBufferPositive(&pad, 1);
    
     if (pad.Buttons & PSP_CTRL_RIGHT)
     {
                     LinkPosX += 2;
                     LinkFrameCounter ++;
                     
                     if (LinkFrameCounter > 34)
                     {
                                          LinkFrameCounter = 1;
                     }
     }
     
     if (pad.Buttons & PSP_CTRL_LEFT)
     {
                       LinkFrameCounter++;                
                       LinkPosX -= 2;   
                       
                       if (LinkFrameCounter > 34)
                       {
                                          LinkFrameCounter = 1;
                       }
     }               
     
     
        
    
     blitAlphaImageToScreen(0, 0, 480, 272, Level1, 0, 0); 
     blitAlphaImageToScreen(0, 0, 50, 55, Link[LinkFrameCounter], LinkPosX, 195);
     
    
     sceDisplayWaitVblankStart();
     flipScreen();
    }
    }
    Don't ask why I repeat blitting the same image 5 times...it makes it run smoother.

    And it doesn't freeze because I'm blitting the same image 5 times, becuase it worked before..

    Anyone see the problem?
    Geändert von MrChaos (08-12-2007 um 10:46 AM Uhr)

  6. #6006
    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 MrChaos
    ;
    Link[0] = loadImage("./Images/Link/LinkWalking1.png");
    Link[1] = loadImage("./Images/Link/LinkWalking1.png");
    Link[2] = loadImage("./Images/Link/LinkWalking1.png");
    Link[2] = loadImage("./Images/Link/LinkWalking1.png");
    Link[4] = loadImage("./Images/Link/LinkWalking1.png");
    Link[5] = loadImage("./Images/Link/LinkWalking2.png");
    Link[6] = loadImage("./Images/Link/LinkWalking2.png");
    Link[7] = loadImage("./Images/Link/LinkWalking2.png");
    Link[8] = loadImage("./Images/Link/LinkWalking2.png");
    Link[9] = loadImage("./Images/Link/LinkWalking2.png");
    Link[10] = loadImage("./Images/Link/LinkWalking3.png");
    Link[11] = loadImage("./Images/Link/LinkWalking3.png");
    Link[12] = loadImage("./Images/Link/LinkWalking3.png");
    Link[13] = loadImage("./Images/Link/LinkWalking3.png");
    Link[14] = loadImage("./Images/Link/LinkWalking3.png");
    Link[15] = loadImage("./Images/Link/LinkWalking4.png");
    Link[16] = loadImage("./Images/Link/LinkWalking4.png");
    Link[17] = loadImage("./Images/Link/LinkWalking4.png");
    Link[18] = loadImage("./Images/Link/LinkWalking4.png");
    Link[19] = loadImage("./Images/Link/LinkWalking4.png");
    Link[20] = loadImage("./Images/Link/LinkWalking5.png");
    Link[21] = loadImage("./Images/Link/LinkWalking5.png");
    Link[22] = loadImage("./Images/Link/LinkWalking5.png");
    Link[23] = loadImage("./Images/Link/LinkWalking5.png");
    Link[24] = loadImage("./Images/Link/LinkWalking5.png");
    Link[25] = loadImage("./Images/Link/LinkWalking6.png");
    Link[26] = loadImage("./Images/Link/LinkWalking6.png");
    Link[27] = loadImage("./Images/Link/LinkWalking6.png");
    Link[28] = loadImage("./Images/Link/LinkWalking6.png");
    Link[29] = loadImage("./Images/Link/LinkWalking6.png");
    Link[30] = loadImage("./Images/Link/LinkWalking7.png");
    Link[31] = loadImage("./Images/Link/LinkWalking7.png");
    Link[32] = loadImage("./Images/Link/LinkWalking7.png");
    Link[33] = loadImage("./Images/Link/LinkWalking7.png");
    Link[34] = loadImage("./Images/Link/LinkWalking7.png");

    Image* Level1[1];
    Level1[0] = loadImage("./Images/Level1/1-1.png");

    int FrameCounter = 0;
    int MenuOne = 0;

    int LinkPosX = 0;
    int LinkFrameCounter = 0;

    while(1)
    {
    sceCtrlReadBufferPositive (&pad, 1);

    if (pad.Buttons & PSP_CTRL_RIGHT)
    {
    LinkPosX += 2;
    LinkFrameCounter ++;
    }

    if (pad.Buttons & PSP_CTRL_LEFT)
    {
    LinkFrameCounter++;
    LinkPosX -= 2;
    }


    blitAlphaImageToScreen(0, 0, 480, 272, Level1[0], 0, 0);
    blitAlphaImageToScreen(0, 0, 50, 55, Link[LinkFrameCounter], LinkPosX, 195);


    sceDisplayWaitVblankStart ();
    flipScreen();
    }
    }
    [/code]

    Anyone see the problem?
    Insteading of loading the same image 5 times in array and playing that back, you should instead Use loops and do the manipulation.

    NEVER do:

    Somedatatype var[1]; instead Somedatatype var;

    Image* Level1[1]; -> Image* Level1;

  7. #6007
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305
    Insteading of loading the same image 5 times in array and playing that back, you should instead Use loops and do the manipulation.

    NEVER do:

    Somedatatype var[1]; instead Somedatatype var;

    Image* Level1[1]; -> Image* Level1;
    But would that be the reason it's freezing? Because it worked before.
    EDIT: Nope, that's not fixing the problem.

    Ok, I fixed the Level1 thing.

    So..Can anyone help me..?
    Geändert von MrChaos (08-12-2007 um 10:51 AM Uhr)

  8. #6008
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von myschoo
    im getting same error

    Code:
    TARGET = testprx
    OBJS = main.o blit.o
    BUILD_PRX = 1
    #USE_KERNEL_LIBC = 1
    USE_KERNEL_LIBS = 1
    
    INCDIR =
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBDIR =
    LIBS = -lpng -lz -lm -lpspkernel
    LDFLAGS =
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    also tried build_prx.mak...same error
    can anyone help? :/

  9. #6009
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MrChaos
    But would that be the reason it's freezing? Because it worked before.
    EDIT: Nope, that's not fixing the problem.

    Ok, I fixed the Level1 thing.

    So..Can anyone help me..?
    its probably freezin cuz u are taking up a bunch of pointless memory loading the same image over again. You could change what u had to this (just changin to point to it):
    Code:
    Link[0] = loadImage("./Images/Link/LinkWalking1.png");
    Link[1] = Link[0];
    Link[2] = Link[0];
    Link[2] = Link[0];
    Link[4] = Link[0];
    Link[5] = loadImage("./Images/Link/LinkWalking2.png");
    Link[6] = Link[5];
    Link[7] = Link[5];
    Link[8] = Link[5];
    Link[9] = Link[5];
    Link[10] = loadImage("./Images/Link/LinkWalking3.png");
    Link[11] = Link[10];
    Link[12] = Link[10];
    Link[13] = Link[10];
    Link[14] = Link[10];
    Link[15] = loadImage("./Images/Link/LinkWalking4.png");
    Link[16] = Link[15];
    Link[17] = Link[15];
    Link[18] =  Link[15];
    Link[19] =  Link[15];
    //do that to all of it
    //and so on.....
    just make sure when u do freeImage() that u free only the actual ones that loaded them
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  10. #6010
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspballer07
    its probably freezin cuz u are taking up a bunch of pointless memory loading the same image over again. You could change what u had to this (just changin to point to it):
    Code:
    Link[0] = loadImage("./Images/Link/LinkWalking1.png");
    Link[1] = Link[0];
    Link[2] = Link[0];
    Link[2] = Link[0];
    Link[4] = Link[0];
    Link[5] = loadImage("./Images/Link/LinkWalking2.png");
    Link[6] = Link[5];
    Link[7] = Link[5];
    Link[8] = Link[5];
    Link[9] = Link[5];
    Link[10] = loadImage("./Images/Link/LinkWalking3.png");
    Link[11] = Link[10];
    Link[12] = Link[10];
    Link[13] = Link[10];
    Link[14] = Link[10];
    Link[15] = loadImage("./Images/Link/LinkWalking4.png");
    Link[16] = Link[15];
    Link[17] = Link[15];
    Link[18] =  Link[15];
    Link[19] =  Link[15];
    //do that to all of it
    //and so on.....
    just make sure when u do freeImage() that u free only the actual ones that loaded them
    I changed it and it still freezes..

    Wait a min...freeImage()? I never had that in there..Where should I put it..out of or in the loop?

  11. #6011
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    out of the loop

    and little tip:

    this:

    if (LinkFrameCounter > 34)
    {
    LinkFrameCounter = 1;
    }
    is same as

    if (LinkFrameCounter > 34) LinkFrameCounter = 1;

  12. #6012
    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 want some info about encrypted prx'en

    are this statements correct

    1 We can decrypt prx with ever time the same code , if the prx is of the X.XX kernel that you are using ( where you run the decrypter) , but it wont work with a dump of another firmware

    for example , you are on 150 firmware and decrypt the firmware with the code , then you tried it with a dump of 3.0 but it wont work , but when you launch the same code on 3.0 it will work

    2 eu , let's start with statement one:)

  13. #6013
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Ok, Ive done everything you guys told me to, but it still doesn't work...

    Maybe my RAM is full, because I was never clearing it or something?

  14. #6014
    QJ Gamer Silver
    Points: 7.385, Level: 57
    Level completed: 18%, Points required for next Level: 165
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Finland
    Beiträge
    752
    Points
    7.385
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    I want some info about encrypted prx'en

    are this statements correct

    1 We can decrypt prx with ever time the same code , if the prx is of the X.XX kernel that you are using ( where you run the decrypter) , but it wont work with a dump of another firmware

    for example , you are on 150 firmware and decrypt the firmware with the code , then you tried it with a dump of 3.0 but it wont work , but when you launch the same code on 3.0 it will work

    2 eu , let's start with statement one:)
    1. It depends on the module, if it's different in the other firmware, it won't most likely work as it's missing an export or something. The decryption keys change in most firmware versions.

    I quite didn't understand the example, maybe someone esle does...
    wheeee =:D

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

    nvm , you gave the answer:)

  16. #6016
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspballer07
    its probably freezin cuz u are taking up a bunch of pointless memory loading the same image over again. You could change what u had to this (just changin to point to it):
    Code:
    Link[0] = loadImage("./Images/Link/LinkWalking1.png");
    Link[1] = Link[0];
    Link[2] = Link[0];
    Link[2] = Link[0];
    Link[4] = Link[0];
    Link[5] = loadImage("./Images/Link/LinkWalking2.png");
    Link[6] = Link[5];
    Link[7] = Link[5];
    Link[8] = Link[5];
    Link[9] = Link[5];
    Link[10] = loadImage("./Images/Link/LinkWalking3.png");
    Link[11] = Link[10];
    Link[12] = Link[10];
    Link[13] = Link[10];
    Link[14] = Link[10];
    Link[15] = loadImage("./Images/Link/LinkWalking4.png");
    Link[16] = Link[15];
    Link[17] = Link[15];
    Link[18] =  Link[15];
    Link[19] =  Link[15];
    //do that to all of it
    //and so on.....
    just make sure when u do freeImage() that u free only the actual ones that loaded them

    Surely that also is taking up pointless space, surely you could either just do this with pointers, or better yet, with loops.
    Code:
    u8 sprite = 0;      //takes less memory than int
     while(1)
     {
     sceCtrlReadBufferPositive(&pad, 1);
    
     if (pad.Buttons & PSP_CTRL_RIGHT)
     {
                     LinkPosX += 2;
                     //LinkFrameCounter ++;      //remove
                     sprite++;                   //add to sprite
    
                     if (LinkFrameCounter > 34)  LinkFrameCounter = 1; //much nicer code
     }
    
     if (pad.Buttons & PSP_CTRL_LEFT)
     {
                       //LinkFrameCounter++;     //remove
                       LinkPosX -= 2;
                       spirte++;                 //add to sprite
    
                     if (LinkFrameCounter > 34)  LinkFrameCounter = 1; //much nicer code
     }
    
    
    if(sprite==5){                        //if sprite = 5, move to next Link, then reset spirte to 0
                  LinkFrameCounter++;
                  sprite=0;
                 }
    
     blitAlphaImageToScreen(0, 0, 480, 272, Level1, 0, 0);
     blitAlphaImageToScreen(0, 0, 50, 55, Link[LinkFrameCounter], LinkPosX, 195);
    
    
     sceDisplayWaitVblankStart();
     flipScreen();
    }
    }
    using this, you can remove most of those link[] bits, it will keep moving exactly how you want, you add an extra variable, but you are freeing up a lot more space.

    Hope that of at least some help.
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  17. #6017
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega

    Surely that also is taking up pointless space, surely you could either just do this with pointers, or better yet, with loops.
    Code:
    u8 sprite = 0;      //takes less memory than int
     while(1)
     {
     sceCtrlReadBufferPositive(&pad, 1);
    
     if (pad.Buttons & PSP_CTRL_RIGHT)
     {
                     LinkPosX += 2;
                     //LinkFrameCounter ++;      //remove
                     sprite++;                   //add to sprite
    
                     if (LinkFrameCounter > 34)  LinkFrameCounter = 1; //much nicer code
     }
    
     if (pad.Buttons & PSP_CTRL_LEFT)
     {
                       //LinkFrameCounter++;     //remove
                       LinkPosX -= 2;
                       spirte++;                 //add to sprite
    
                     if (LinkFrameCounter > 34)  LinkFrameCounter = 1; //much nicer code
     }
    
    
    if(sprite==5){                        //if sprite = 5, move to next Link, then reset spirte to 0
                  LinkFrameCounter++;
                  sprite=0;
                 }
    
     blitAlphaImageToScreen(0, 0, 480, 272, Level1, 0, 0);
     blitAlphaImageToScreen(0, 0, 50, 55, Link[LinkFrameCounter], LinkPosX, 195);
    
    
     sceDisplayWaitVblankStart();
     flipScreen();
    }
    }
    using this, you can remove most of those link[] bits, it will keep moving exactly how you want, you add an extra variable, but you are freeing up a lot more space.

    Hope that of at least some help.
    -Aura
    Well, Idk what I did, but I slowly re-made the code and it worked. Thanks for you help, though.

  18. #6018
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Can anyone point me in the direction of an AI tutorial? The one on QJ has been removed by the looks of things, and I couldn't find another.

    Thanks.
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  19. #6019
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    Can anyone point me in the direction of an AI tutorial? The one on QJ has been removed by the looks of things, and I couldn't find another.

    Thanks.
    -Aura
    gamedev.net
    flipcode.com
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  20. #6020
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspballer07
    gamedev.net
    flipcode.com
    Thanks, I'll take a look at them both

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  21. #6021
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    Thanks, I'll take a look at them both

    -Aura
    yup
    they're good for overall game development
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  22. #6022
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I'm still having problems with using GU in the XMB, I've also noticed that using
    Code:
    SceUID vsh_graphics;
    pspSdkReferThreadStatusByName("SCE_VSH_GRAPHICS",&vsh_graphics,0);
    sceKernelSuspendThread(vsh_graphics);
    has no effect unless I'm using PSPLink, when I do this without PSPLink it has no effect at all.

    Does anyone know anything I specifically need to do to solve either problem?

    -Aura
    Geändert von Auraomega (08-13-2007 um 05:48 AM Uhr)
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

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

    For smoothness, Is it recommended to use float or ints ?

    in things involving X & y pos / width /height like in blit functions? [Becz, In smooth scrolling, Decimal values are used]

    What happens when we try to use not integer decimal values like 0.5 [that's half of a pixel]

  24. #6024
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305
    For smoothness, Is it recommended to use float or ints ?

    in things involving X & y pos / width /height like in blit functions? [Becz, In smooth scrolling, Decimal values are used]

    What happens when we try to use not integer decimal values like 0.5 [that's half of a pixel]
    Some of this is only a guess so it may not be correct... Seeing as a pixal is the smallest individual part of a picture you can't have a fraction of that pixal, so the value would do 1 of 4 things:
    1. Crash
    2. Always round up
    3. Always round down
    4. Round up or down depending on number...

    From past experiance (working with my map algorithms) I'd say its most likely to round down, no matter what the value, so 0.5 would become 0, 0.8 would become 0, and 2.2 would become 2. If you tried moved by 0.5 pixals, you wouldn't move anywhere, as you'd technically be moving by 0 pixals.

    Of course, I don't know how much of this is true, its just what I observed when making the maps for RoadBlocks.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  25. #6025
    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 Auraomega
    Some of this is only a guess so it may not be correct... Seeing as a pixal is the smallest individual part of a picture you can't have a fraction of that pixal, so the value would do 1 of 4 things:
    1. Crash
    2. Always round up
    3. Always round down
    4. Round up or down depending on number...

    From past experiance (working with my map algorithms) I'd say its most likely to round down, no matter what the value, so 0.5 would become 0, 0.8 would become 0, and 2.2 would become 2. If you tried moved by 0.5 pixals, you wouldn't move anywhere, as you'd technically be moving by 0 pixals.

    Of course, I don't know how much of this is true, its just what I observed when making the maps for RoadBlocks.

    -Aura
    5. Use subpixel accuracy and filter the pixel accordingly
    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.

  26. #6026
    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 Raphael
    5. Use subpixel accuracy and filter the pixel accordingly
    That means?...

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

    A pixel placed at 0.5 will be drawn at position 0 but only get half intensity (plus half intensity of following pixel).
    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.

  28. #6028
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von myschoo
    im getting same error

    Code:
    TARGET = testprx
    OBJS = main.o blit.o
    BUILD_PRX = 1
    #USE_KERNEL_LIBC = 1
    USE_KERNEL_LIBS = 1
    
    INCDIR =
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBDIR =
    LIBS = -lpng -lz -lm -lpspkernel
    LDFLAGS =
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    also tried build_prx.mak...same error
    pls can anyone help? i cant compile prx in kernel mode, i get error undefined reference to sceKernelMaxFreeMemSize

    Code:
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_sbrk.o): In func
    tion `_sbrk':
    ../../../../../../newlib/libc/sys/psp/libcglue.c:524: undefined reference to `sc
    eKernelMaxFreeMemSize'

  29. #6029
    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 myschoo
    pls can anyone help? i cant compile prx in kernel mode, i get error undefined reference to sceKernelMaxFreeMemSize

    Code:
    /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libc.a(_sbrk.o): In func
    tion `_sbrk':
    ../../../../../../newlib/libc/sys/psp/libcglue.c:524: undefined reference to `sc
    eKernelMaxFreeMemSize'
    get rid of pspDebug* and see if it compiles

  30. #6030
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    im not using pspdebug altogether

    #include <pspkernel.h>
    #include <pspdisplay.h>
    #include <pspgu.h>
    #include <stdio.h>
    #include <pspctrl.h>
    #include <string.h>
    #include <pspiofilemgr.h>
    #include "blit.h"

    am i missing something? :/


 

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

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