Seite 231 von 340 ErsteErste ... 131 181 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 281 331 ... LetzteLetzte
Zeige Ergebnis 6.901 bis 6.930 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; Hello again, I've been getting some strange errors when I try to compile a project I'm working on. These are ...

  
  1. #6901
    QJ Gamer Blue
    Points: 3.389, Level: 36
    Level completed: 26%, Points required for next Level: 111
    Overall activity: 6,0%

    Registriert seit
    Sep 2007
    Beiträge
    105
    Points
    3.389
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    Hello again,

    I've been getting some strange errors when I try to compile a project I'm working on. These are the errors:

    Code:
    psp-gcc -I. -I/cygdrive/c/CSP/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -W
    all -D_PSP_FW_VERSION=150   -c -o main.o main.c
    In file included from main.c:10:
    Game.h:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Game'
    
    Game.h:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Enemy
    '
    Game.h:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Hero
    '
    make: *** [main.o] Error 1
    I've had these errors before, but I do not remember how I managed to fix it. Does anyone know what these mean? Apparantly these are common when I googled them.

    Here is the header file:

    Code:
    // Game.h - Contains the *Game Parent Class* and its *Child Sub-Classes*
    
    #ifndef GAME_H_
    #define GAME_H_
    
    /*---------------------------------------*/
    /*                                       */
    /* PARENT CLASS DECLARATION - Game CLASS */
    /*                                       */
    /*---------------------------------------*/
    
    class Game
    {
    	// Data Member Declarations
    	
    	public:
    	//Constructor
    	Game();
    	
    	//Destructor
    	~Game();
    	
    	protected:
    	//Methods
    	void HeroIsAttacked(Hero & theHero, Enemy & theEnemy);
    	void EnemyIsAttacked(Enemy & theEnemy, Hero & theHero);
    	
    	//Variables
    };
    
    /*---------------------------------------*/
    /*                                       */
    /* CHILD CLASS DECLARATION - Enemy CLASS */
    /*                                       */
    /*---------------------------------------*/
    
    class Enemy : public Game
    {
    	// Data Member Declarations
    	public:
    	// Constructor
      Enemy(char cst_name[15]);
    	
    	// Destructor
    	~Enemy(); 
    	
    	// Methods
    	int defend();
    	
    	// Vars
    	char enemyName[];
    	int mE_attackPts; 
    	int mE_healthPts;
    	int mE_defendPts;
    };
    
    /*---------------------------------------*/
    /*                                       */
    /* CHILD CLASS DECLARATION - Hero CLASS  */
    /*                                       */
    /*---------------------------------------*/
    
    class Hero : public Game
    {
    	// Data Member Declarations
    	public:	
    	// Constructor
    	Hero(bool isMale);
    	
    	// Destructor
    	~Hero();
    	
    	// Methods
    	int defend();
    	
    	// Vars
    	int mH_attackPts;
    	int mH_healthPts;
    	int mH_defensePts;
    	bool mH_gender;
    };
    	
    #endif
    The method definitions are in another .c file btw, and main.c has #include "Game.h".

    Any ideas?



  2. #6902
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    The file you've provided has less lines than the output suggests. Are you sure it's the right file?
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

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

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

    Standard

    Zitat Zitat von hallo007
    .set noreorder

    #include "pspstub.s"

    STUB_START "NandDumper",0x40090000,0 x00010005
    STUB_FUNC 0x9EDD6EE1,readBlock
    STUB_END

    what's wrong with this?

    Code:
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o main.o main.cpp
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o io.o io.cpp
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o NandDumper.o NandDumper.S
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o io.o NandDumper.o -lpsppower -lstdc++ -lpsprtc -lpspnand_driver -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o powersample.elf
    io.o: In function `dumpNand()':
    io.cpp:(.text+0x1b8): undefined reference to `readBlock(unsigned long, unsigned char*)'
    I found a solution , when I compille it as c , it'd just works fine
    any reason it doesn't works with c++?

  4. #6904
    QJ Gamer Blue
    Points: 3.389, Level: 36
    Level completed: 26%, Points required for next Level: 111
    Overall activity: 6,0%

    Registriert seit
    Sep 2007
    Beiträge
    105
    Points
    3.389
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    The file you've provided has less lines than the output suggests. Are you sure it's the right file?
    Yes I'm sure. I'm not sure if you're the one I mentioned to that sometimes the lines are incorrect. Like if it says error on a string in line 32, when line 32 is blank. I have no idea why it does that. : /

  5. #6905
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Hey everyone, i was just wondering if anyone knew a library that has mp3 playback othre than mp3player.c. thanks

  6. #6906
    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 Gusjdt
    Hello again,

    I've been getting some strange errors when I try to compile a project I'm working on. These are the errors:

    code snipped

    The method definitions are in another .c file btw, and main.c has #include "Game.h".

    Any ideas?
    You are using C++ so your files need to be .cpp not .c

  7. #6907
    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 Archaemic
    Okay, already did that with that post. All I copied and pasted was the function names, NOT the arguments. You'll see I changed a lot of things. All I did wrong was forget what arguments sceIoWriteAsync took. I thought he was trying to write the address, and I momentarily forgot that it took a pointer and not something like printf takes. Writing the contents of the address would be pretty pointless because we already know it would be 140 if the match succeeds.
    Sorry, I was actually referring to JaSo PSP, not you. You gave him lots of hints of what he could do better and had a small mistake left in your code - which he just copied and pasted and then wondered why it didn't work. That's stupid. Basically, with this mentality, you could have given him the code for a bricker and he would have tested it, seeing how his PSP gets bricked just because he didn't take the effort to see what the code actually does.
    And the error was pretty obvious if you know what you're doing and trying to do - at least you seem to, seeing the corrected version.
    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.

  8. #6908
    QJ Gamer Blue
    Points: 3.389, Level: 36
    Level completed: 26%, Points required for next Level: 111
    Overall activity: 6,0%

    Registriert seit
    Sep 2007
    Beiträge
    105
    Points
    3.389
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yaustar
    You are using C++ so your files need to be .cpp not .c
    Thanks again Yaustar, I appreciate it. I knew it was something silly...

  9. #6909
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Guys I'll post this again, as the last one got one answer, but when I tried to contact the guy who answered, I got no response.

    +++++++++++++++
    Hi, is somebody here using DSX to display stuff on the XMB?

    I'm currently working on a plugin, and am finding that it's flickering a bit. Also, it's conflicting with some items on the XMB, such as video and browser.

    I thought about either disabling it when loading video or browser, or find a way to fix it.

    Also the flickering thing is very annoying

    Does anyone know how to fix that?

    Cheers
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

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

    Conflicting with browser/video: Plugin takes too much memory, code better
    Flickering: Hook sceDisplaySetFrameBuf and do your drawing before calling the original function
    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.

  11. #6911
    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 changed 'i' to '&i' anyway, i just didn't mention it here...
    ...Just Returned To The Scene...

  12. #6912
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Raphael
    Conflicting with browser/video: Plugin takes too much memory, code better
    Flickering: Hook sceDisplaySetFrameBuf and do your drawing before calling the original function
    Thanks for that Raphael. I know you answered me on the other forum about this, but my pc has been a bit flakey lately. Sorry for not sending you another message.

    In fact, I think it's the vsxlib that uses too much memory, as I'm sure my plugin is very light.

    I tried to use sceDisplaySetFrameBuf, but it didn't really change much. I don't know if I'm using it the wrong way, but basically, even if I print a basic hello world on the screen using vsx ans try to use sceDisplaySetFrameBuf, I still have the flickering.

    Do you know what else it could be? Or, do you have any example using this lib that doesn't flicker and doesn't crash the browser?

    Would you suggest a library change (from vsx to another)?

    Thank you very much!
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

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

    By "hooking" I meant you should use something like API hook by Tyranid or write your own function hooking to be able to intercept the firmwares own calls to sceDisplaySetFramebuf and get your own drawing done before the VSH swaps the framebuffer. By doing that you won't get any flickering ever (see JoySens plugin).
    If you don't understand a single word of that - well, then you better just live with the flickering for the moment.
    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.

  14. #6914
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    How do I write a single bit to a file?

  15. #6915
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    You can't. You can modify the byte that you want, but you can't modify bit at a time.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  16. #6916
    Points: 3.026, Level: 33
    Level completed: 84%, Points required for next Level: 24
    Overall activity: 27,0%

    Registriert seit
    Sep 2007
    Beiträge
    16
    Points
    3.026
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    im making an app and my menu is like this:

    Code:
    void refreshArrow(void)
    {
    	setXY(2, rowprev + row_offset);
    	printf("  ");
    	setXY(2, row + row_offset);
    	printf("->");
    
    }
    
    main
    {
                 ......
    
    	row = 0;
    	rowprev = 0;
    	maxrows = 4;
    
            printf("*    Start ");
            printf("\n*    Settings");
            printf("\n*    Choose Playlist");
            printf("\n*    Exit");
    	refreshArrow();
    	
    		unsigned int b;
    		b = wait_press(PSP_CTRL_UP|PSP_CTRL_DOWN|PSP_CTRL_CROSS);
    		wait_release(PSP_CTRL_UP|PSP_CTRL_DOWN|PSP_CTRL_CROSS);
    	
    		if (b & PSP_CTRL_DOWN) {
    			rowprev = row;
    			if (row == maxrows) row = 0;
    
    			else if (row == (maxrows - 1)) row += 1;
    			else row++;
    			refreshArrow();
    		}
    		else if (b & PSP_CTRL_UP) {
    			rowprev = row;
    			if (row == 0) row = maxrows;
    
    			else if (row == maxrows) row -= 1;
    			else row--;
    			refreshArrow();
    		}
    		else if (b & PSP_CTRL_CROSS) {
    			if (row == maxrows) {
    			setXY(5, 25);
    			printf("Good Bye");
    			sceKernelDelayThread(3 * 1000 * 1000);
    			
                                    vshKernelExitVSHVSH(NULL);
    			    } 
    .....
    rest of code
    this is taken from Cory's Pandora Battert Menu source and what i want to know is how can I make the selected menu item higlighted in a color like this:
    Code:
    Start
    Settings
    Choose Playlist
    Exit
    so its not like this:
    Code:
       Start
    -> Settings
       Choose Playlist
       Exit
    Im sorry but Im really a noob.

  17. #6917
    QJ Gamer Silver
    Points: 8.717, Level: 62
    Level completed: 89%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Ort
    Melbourne, Australia
    Beiträge
    1.773
    Points
    8.717
    Level
    62
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    read here:

    HERE

    it is about creating a menu.
    WHA!?

  18. #6918
    Points: 3.026, Level: 33
    Level completed: 84%, Points required for next Level: 24
    Overall activity: 27,0%

    Registriert seit
    Sep 2007
    Beiträge
    16
    Points
    3.026
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    I don't need to know how to make a menu, as you can see I already Have 1. I just want to make it look nicer.

  19. #6919
    QJ Gamer Silver
    Points: 8.717, Level: 62
    Level completed: 89%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Ort
    Melbourne, Australia
    Beiträge
    1.773
    Points
    8.717
    Level
    62
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    if you use that code you can use colours, it was just an option...
    WHA!?

  20. #6920
    Points: 3.026, Level: 33
    Level completed: 84%, Points required for next Level: 24
    Overall activity: 27,0%

    Registriert seit
    Sep 2007
    Beiträge
    16
    Points
    3.026
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    But then I have to rewrite alot of code just for some simple colors. I just want a simple sloution to highlight the selected item.

  21. #6921
    QJ Gamer Silver
    Points: 8.717, Level: 62
    Level completed: 89%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Ort
    Melbourne, Australia
    Beiträge
    1.773
    Points
    8.717
    Level
    62
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    Okay, I am trying to make a little game but i keep getting an error..

    Zitat Zitat von Error
    main.c: In function ‘CallbackThread’:
    main.c:22: error: ‘pad’ undeclared (first use in this function)
    main.c:22: error: (Each undeclared identifier is reported only once
    main.c:22: error: for each function it appears in.)
    main.c:23: error: ‘y’ undeclared (first use in this function)
    main.c: In function ‘main’:
    main.c:66: warning: operation on ‘x’ may be undefined
    main.c:71: warning: operation on ‘x’ may be undefined
    main.c:76: warning: operation on ‘y’ may be undefined
    main.c:81: warning: operation on ‘y’ may be undefined
    make: *** [main.o] Error 1
    (main function code)
    Code:
    int main(void) {
        pspDebugScreenInit();
        SetupCallbacks();
        SceCtrlData pad;
    
        int ok = 1;
        int x = 100;
        int y = 100;
        int width = 50;
        int height = 50;
    
        Color red = RGB(0, 255, 0);
        Image* Background;
        Background = loadImage("./Images/Background.png");
    
        while(1) {
    	sceCtrlReadBufferPositive(&pad, 1);
    
    	blitAlphaImageToScreen(0, 0 , 480, 272, Background, 0, 0);
    
    	// move square left
          if(pad.Buttons & PSP_CTRL_SQUARE) {
    	x = x--;
          }
    
    	// move square right
          if(pad.Buttons & PSP_CTRL_CIRCLE) {
    	x = x++;
          }
    
    	// move square up
          if(pad.Buttons & PSP_CTRL_TRIANGLE) {
    	y = y--;
          }
    
    	// move square down
          if(pad.Buttons & PSP_CTRL_CROSS) {
    	y = y++;
          }
    
    
    	// draw our little square!
          if(ok >= 1){
    	fillScreenRect(red, x, y, width, height);
          }
    
    	sceDisplayWaitVblankStart();
    	flipScreen();
    
        }	
        sceKernelSleepThread();
        return 0;
    }
    WHA!?

  22. #6922
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspN00bDevoloper
    im making an app and my menu is like this:

    Code:
    void refreshArrow(void)
    {
    	setXY(2, rowprev + row_offset);
    	printf("  ");
    	setXY(2, row + row_offset);
    	printf("->");
    
    }
    
    main
    {
                 ......
    
    	row = 0;
    	rowprev = 0;
    	maxrows = 4;
    
            printf("*    Start ");
            printf("\n*    Settings");
            printf("\n*    Choose Playlist");
            printf("\n*    Exit");
    	refreshArrow();
    	
    		unsigned int b;
    		b = wait_press(PSP_CTRL_UP|PSP_CTRL_DOWN|PSP_CTRL_CROSS);
    		wait_release(PSP_CTRL_UP|PSP_CTRL_DOWN|PSP_CTRL_CROSS);
    	
    		if (b & PSP_CTRL_DOWN) {
    			rowprev = row;
    			if (row == maxrows) row = 0;
    
    			else if (row == (maxrows - 1)) row += 1;
    			else row++;
    			refreshArrow();
    		}
    		else if (b & PSP_CTRL_UP) {
    			rowprev = row;
    			if (row == 0) row = maxrows;
    
    			else if (row == maxrows) row -= 1;
    			else row--;
    			refreshArrow();
    		}
    		else if (b & PSP_CTRL_CROSS) {
    			if (row == maxrows) {
    			setXY(5, 25);
    			printf("Good Bye");
    			sceKernelDelayThread(3 * 1000 * 1000);
    			
                                    vshKernelExitVSHVSH(NULL);
    			    } 
    .....
    rest of code
    this is taken from Cory's Pandora Battert Menu source and what i want to know is how can I make the selected menu item higlighted in a color like this:
    Code:
    Start
    Settings
    Choose Playlist
    Exit
    so its not like this:
    Code:
       Start
    -> Settings
       Choose Playlist
       Exit
    Im sorry but Im really a noob.
    Well that's basical logic, but I'll tell you how to do giving you the logic and not simply the code.

    Basically the idea is:

    You have a loop right?

    In the loop, you need to check the cursor position everytime.

    I see that you're doing that with the "row" variable.

    You can just put an if around each of the items in the menu like

    if(row == 1)
    set other colour here
    printf("Start ");
    set colour back to the original

    if(row == 2)
    set other colour here
    printf("item2 ");
    set colour back to the original

    Then you'll have colours on your menu


    You shouldn't just copy things from other soucrs, it's so much more fun if you do it from scratch.

    Also I'm sure that there's some code in your menu that you don't even know why is there.

    If you need another example, post back, but I think you should try to figure out by yourself with the logic I gave you.

    Cheers
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

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

    Code:
    x = x--;
    And any similar code is undefined because you post evaluate x, assign it to itself and then decrement itself. The undefined part comes in the order of the operations differ with different compilers.

    What you want is either:
    Code:
    x = x - 1;
    or
    Code:
    --x;

  24. #6924
    QJ Gamer Silver
    Points: 8.717, Level: 62
    Level completed: 89%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Ort
    Melbourne, Australia
    Beiträge
    1.773
    Points
    8.717
    Level
    62
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    okay thanks :), also where can i find a basic tutorial on how to make a PRX? (one for on the XMB (VSH)?)
    WHA!?

  25. #6925
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BigSanFrey
    okay thanks :), also where can i find a basic tutorial on how to make a PRX? (one for on the XMB (VSH)?)
    Just look for VSX or VSH Blit

    There's some examples, and it's pretty easy.

    Also, you may look at VSH Bitter 0.2 posted on this topic somewhere
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

  26. #6926
    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 want to display a volume bar much like the PSPs own, but I'm not sure how to check what the volume is, the only examples I have found don't actually do what I need they appear to change a different volume, I want, for example, the left and right shoulder buttons to do what the + and - volume buttons do, but to also display that same bar in an app.

    Sorry if I didn't explain that well, I'm not sure how to explain it, if none of that made sense I'll try and think of another way of saying it.

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

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

  27. #6927
    QJ Gamer Green
    Points: 5.795, Level: 49
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Cape Town, South Africa
    Beiträge
    714
    Points
    5.795
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    @BigSanFrey: Why are you trying to access pad and y in your CallbackThread function?

  28. #6928
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    I want to display a volume bar much like the PSPs own, but I'm not sure how to check what the volume is, the only examples I have found don't actually do what I need they appear to change a different volume, I want, for example, the left and right shoulder buttons to do what the + and - volume buttons do, but to also display that same bar in an app.

    Sorry if I didn't explain that well, I'm not sure how to explain it, if none of that made sense I'll try and think of another way of saying it.

    -Aura
    Aura, have you tried looking at the User Udio Library? (http://psp.jim.sh/pspsdk-doc/group__Audio.html) well I believe so, but thought it'd worth sending the link.

    I think you need to know what the channel is. As far as I'm aware, there's 8 chanels. And *if* I'm not mistaken, you could just test'em too see if the volume increases or decreses. Then you'd need to be able to siplay the actual bar
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

  29. #6929
    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 was using that library before, I guess it would make logical sense to check all of the channels, one is bound to be the correct one.

    Displaying the bar shouldn't be too hard, if worst comes to worst, I guess I could simply make my own which in the end is what I was going to do, it just means I go from A to C without B

    I'll try all that later when I get access to a compiler, thanks for that :)

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

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

  30. #6930
    QJ Gamer Green
    Points: 5.795, Level: 49
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Cape Town, South Africa
    Beiträge
    714
    Points
    5.795
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Okay, I need some help with something. I need to get a list of files in a directory. I've found how do it using sceIoDopen and so on, but that requires the path to that directory to be hard-coded. For example, I might expect the directory to be in ms0:/PSP/GAME/blah/huh/, but the user might have placed the eboot in GAME150, so it would fail. For normal file reading, I've used the f-something functions (fopen, fread etc.) instead of the SceIo* functions, so I can use relative paths. But how do I do this for finding the files in a directory?


 

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 .