Seite 11 von 340 ErsteErste ... 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 61 111 ... LetzteLetzte
Zeige Ergebnis 301 bis 330 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 SodR When I do like this I get a "makes pointer from integer without a cast" error. I ...

  
  1. #301
    Developer
    Points: 7.058, Level: 55
    Level completed: 54%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    408
    Points
    7.058
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    When I do like this I get a "makes pointer from integer without a cast" error. I can't figure out why. Do you know what to do to fix this?

    btw. I assume that "i" is an integer with a value of 0 ( int i = 0; )
    You'll get that if you declare "line" as an integer, but "i" should be an integer. I've used line as an array of char pointers like this:

    Code:
    char *line[NUMBER_OF_LINES];
    
    line[0] = "First line";
    line[1] = "Next line";
    // etc
    But this is just an example. If you want to list entries in a directory all you really need to do is loop through directory entries and send each entry individually with text_to_screen(), making sure you add to y each time to start a new line. Keep in mind that there's also no screen scrolling so when you get to the bottom of the screen you'll lose anything you print below that.



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

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

    Standard

    It might be easier to help me if I give you the full function. Here it's:

    /////////////////////////////////////////////////////////////////////////////
    //
    // Directory Listing Sample Program
    // Copyright (c) 2006 Christopher Phillips <[email protected]> (aka Dr. Vegetable)
    //
    // This is free software, and is intended for demonstration purposes only.
    // You may freely use this program or its source code as long as you assume
    // all responsibility for any consequences.
    //
    /////////////////////////////////////////////////////////////////////////////
    //
    // This program demonstrates how to use the 'dirent' functions to enumerate
    // the names of all files and subdirectories contained in a particular folder.
    //
    // The listDirectory() function does all of the interesting stuff; the
    // remainder of this program is just boilerplate Sony PSP homebrew code.
    //
    /////////////////////////////////////////////////////////////////////////////

    int listDirectory(char* szRoot)
    {
    // This function prints out the names of all files and directories
    // contained in the szRoot directory.

    // The szRoot path should be specified in the following general form:
    // listDirectory("ms0:/PSP/GAME/");
    // (Note trailing backslash!)


    DIR* dirParent;
    struct dirent* dirEntry;
    int n = 0;



    if ((dirParent = opendir(szRoot)) != NULL)
    {

    while ((dirEntry = readdir(dirParent)) != NULL)
    {



    set_font_color(0xFF000000 ); // black
    set_font_size(15); // 15 point
    set_font_angle(0.0); // no angle


    // It looked like this originally (at least I think so...)
    // pspDebugScreenPrintf("%d \n", dirEntry->d_name);

    // I just want to do the exact same as above except I have a
    // image to print the text on. (and I also want to print the first line to 350, 50
    // and the next line of text to 350, 65 ect.)


    // This only works if there's only one file/dir in the readdir =S
    text_to_screen(dirEntry->d_name, 350, 50);

    n++;


    }
    // No need fo this right now
    // pspDebugScreenPrintf("%d files found.\n", n);

    closedir(dirParent);
    }

    return n;
    }
    I'm going to use this as a menu where the user can select a folder that this function has printed out. Is it possible to use this so I can copy files out of the selected dir?? I mean the let's say the function displays the content of "ms0:/PSP/GAME/MYAPP/FOLDER/" and in that folder I have two subfolders called "SUBFOLDER1" and "SUBFOLDER2".
    The function will print out "Subfolder1" and "subfolder2" to the screen and the user will select one, let's say subfolder2.

    Then I want to copy a file from subfolder2, I do that with a function called copy_file (this is already done) so I want it to look like this (when the user have selected subfolder2):
    copy_file("ms0:/PSP/GAME/MYAPP/FOLDER/SUBFOLDER2/", "[insertcopy-to dir here]");

    (maybe you can do like this?: copy_file("ms0:/PSP/GAME/MYAPP/FOLDER/" Dirname, "[insert copy-to dir here]) Dirname sould be the selected dirs name.

    I hope you understand what I mean.

    btw. maybe you got a better way to solve my problem?
    Geändert von SodR (06-06-2006 um 11:59 AM Uhr)

  3. #303
    Developer
    Points: 7.058, Level: 55
    Level completed: 54%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    408
    Points
    7.058
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    It might be easier to help me if I give you the full function.
    That makes more sense now. Here's a few small changes that will work with flib:
    Code:
    int listDirectory(char* szRoot)
    {
    // This function prints out the names of all files and directories
    // contained in the szRoot directory.
    
    // The szRoot path should be specified in the following general form:
    // listDirectory("ms0:/PSP/GAME/");
    // (Note trailing backslash!)
    
    
    DIR* dirParent;
    struct dirent* dirEntry;
    int n = 0;
    int y = 50;
    
    set_font_color(0xFF000000 ); // black
    set_font_size(15); // 15 point
    set_font_angle(0.0); // no angle
    
    if ((dirParent = opendir(szRoot)) != NULL)
    {
    
    while ((dirEntry = readdir(dirParent)) != NULL)
    {
    
    // It looked like this originally (at least I think so...)
    // pspDebugScreenPrintf("%d \n", dirEntry->d_name);
    
    // I just want to do the exact same as above except I have a
    // image to print the text on. (and I also want to print the first line to 350, 50
    // and the next line of text to 350, 65 ect.)
    
    
    // This only works if there's only one file/dir in the readdir =S
    text_to_screen(dirEntry->d_name, 350, y);
    
    n++;
    y += 15;
    
    
    }
    // No need fo this right now
    // pspDebugScreenPrintf("%d files found.\n", n);
    
    closedir(dirParent);
    }
    
    return n;
    }
    I moved the font color/size/angle functions out of the loop since they only need to be set once, and added a y variable that increments by 15 (this may not be enough for 15-point to look good).

    This will only display the directory contents. To allow the user to navigate and select will require quite a bit more code. For one thing you're going to need to keep track of which entry is highlighted and display it differently, either a different color, larger size, drawing a box around it, etc. You'll need code to take button input and change which entry is highlighted. And when the user finally picks an item you'll need to determine what to do with it depending on what your code is intended to accomplish.

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

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

    Standard

    I finally got this to work (except one thing...)

    Now what I would need is to be able to use the name of the selected file (as a variable). This should go under the 'if Cross is pressed' in the main function. What I would need is like "if dirEntry->d_name = blue (blue is the color of the selected name) then...". I hope you guys can help me.

    This is what it looks like:

    First some global variables to make this work:
    Code:
    SceCtrlData pad;
    DIR* dirParent;
    struct dirent* dirEntry;
    int n = 0;
    int y = 50;
    int selected = 0;
    int sel = 3;
    Here is my main code:
    Code:
    int main() {
    
    blablablabla (display BG and other init functions here)
    
    	if(!listDirectory("ms0:/PSP/GAME/Stuff/"))
    	{
    		printf("Error opening ms0:/PSP/GAME/Stuff/");
    	}
    
    	while (1)
    	{
    		sceCtrlReadBufferPositive(&pad, 1);
    		if (pad.Buttons & PSP_CTRL_UP)
    		{
    
                   // Move up in the list:
    
    				selected = 0;
    				y = 50;
    				sel--;
    				// Refresh Screen
    				screenblit(0, 0, 480, 272, menu); 	
    				listDirectory("ms0:/PSP/GAME/ThemePSP/Themes/");
    				flipScreen();
    		}
    
    		sceCtrlReadBufferPositive(&pad, 1);
    		if (pad.Buttons & PSP_CTRL_DOWN)
    		{
    
                   // Move down in the list:
    
    				selected = 0;
    				y = 50;
    				sel++;
    				// Refresh Screen
    				screenblit(0, 0, 480, 272, menu); 	
    				listDirectory("ms0:/PSP/GAME/ThemePSP/Themes/");
    				flipScreen();
    		}
    
    
                   //This is where I don't know what to do:
    
    		sceCtrlReadBufferPositive(&pad, 1);
    		if (pad.Buttons & PSP_CTRL_CROSS)
    		{
    			
    //I would like to change the working dir to the name that is
    //selected: (like sceIoChdir(dirEntry->d_name);) 
    //But this doesn't work since the app doesn't which name is selected
    
    		}
    
    
    
    		sceCtrlReadBufferPositive(&pad, 1);
    		if (pad.Buttons & PSP_CTRL_CIRCLE)
    		{
    				sceKernelExitGame();
    		}
    		sceDisplayWaitVblankStart(); 
    	}
    
    return 0;
    
    }
    Here is the funcion:
    Code:
    int listDirectory(char* szRoot)
    {
    
    if ((dirParent = opendir(szRoot)) != NULL)
    {
    
    while ((dirEntry = readdir(dirParent)) != NULL)
    {
    
    if (selected == sel) {
    
    // The selected name will be blue
    
    set_font_color(RGB(66,56,255)); // blue
    set_font_size(15); // 15 point
    set_font_angle(0.0); // no angle
    
    // Maybe something here?
    
    } else {
    
    // The non selected names will be black
    
    set_font_color(RGB(0,0,0)); // black
    set_font_size(15); // 15 point
    set_font_angle(0.0); // no angle
    }
    
    text_to_screen(dirEntry->d_name, 340, y);
    
    selected++;
     
    n++;
    y += 15;
    
    
    }
    // No need fo this right now
    // pspDebugScreenPrintf("%d files found.\n", n);
    
    closedir(dirParent);
    }
    
    return n;
    Another thing is that before the file/dirnames are beeing printed out to the screen the function prints out '.' and '..' (wihtout the ' '). Do you know why?
    Geändert von SodR (06-07-2006 um 12:57 PM Uhr)

  5. #305
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    Another thing is that before the file/dirnames are beeing printed out to the screen the function prints out '.' and '..' (wihtout the ' '). Do you know why?
    You just want to work from the 3rd result to the number of results for this kind of thing.

    It's a standard thing when working with directorys.

    Your n variable will also return 'number of files + 2' I think.
    Geändert von Insomniac197 (06-07-2006 um 03:43 PM Uhr)

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

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

    Standard

    Zitat Zitat von Insomniac197
    You just want to work from the 3rd result to the number of results for this kind of thing.

    It's a standard thing when working with directorys.

    Your n variable will also return 'number of files + 2' I think.
    Yes, I have figured that out. (btw. the n returns 'number of files +1', not 2). I have also managed to make so the user can't navigate outside the menu. The only thing left now is to edit the function so the program can see a difference between when the "text_to_screen(dirEn try->d_name, 335, y);" is selected or not. If you know how please tell me (cause I'm kinda stuck at this point).

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

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

    Standard

    I too want this, but in printf debug form...

    Having a selector of a file/browser is just like a table with a pointer basically...

    I can display adn read files easy, its jsut the navigation thats a biotch...

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


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

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

    Standard

    Zitat Zitat von SG57
    I too want this, but in printf debug form...

    Having a selector of a file/browser is just like a table with a pointer basically...

    I can display adn read files easy, its jsut the navigation thats a biotch...
    Maybe we can make a function that displays the contents of a dir and put each name of a file/folder in a separate string??

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

    Thats what i was thinking, a table of strings (table = array) then print out the table with a selection in hand...

    Well, it is the weekend, do you want to try SodR?

    I have a couple resource sfor you to look at here at QJ that discuss File Browsing...

    I already can display the contents of a directory, read files when X on select (used to be manual file name entry), and label the amount of files in a directory with a number so we could in fact make a table out of all this...

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

    Projects

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


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

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

    Standard

    Was someone paying forum points to sticky this?

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

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

    Standard

    Zitat Zitat von Art
    Was someone paying forum points to sticky this?
    The mods unsticked this and created a sticky that was locked with both the lua and c++ help threads. It's idiotic if you ask me, since now we have to bump the thread ourselfs so that someone might see your post and help you instead of just looking at the stickies. And they only spared one "stickie-spot" by creating the "programing help" sticky aswell... (not much of a gain if you ask me)

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

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

    Standard

    lol, agreed. I didn't notice the new sticky before.
    Better to merge some of the other threads in the same way rather than this one..
    Like author donation thread, how many ppl will need to bump that.

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

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

    Standard

    Well somebody should pay forum points to sticky this ;)...
    QJ loads way 2 slow & the theme is ugly as hell, gone are the glory days

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

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

    Standard

    Zitat Zitat von soccerPMN
    Well somebody should pay forum points to sticky this ;)...
    Someone that has the points that is... =)

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

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

    Standard

    Zitat Zitat von SodR
    Someone that has the points that is... =)
    That person would have to be premium ... :icon_wink
    QJ loads way 2 slow & the theme is ugly as hell, gone are the glory days

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

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

    Standard

    I would pay the 2000 I have in the bank, but I hear the sticky isn't permanent when done
    that way, and it costs 9900 points.
    Also, I don't think it's up to any member to do it anyway, it should be supported by the site.
    It's not as big a deal as I first thought.. at least there's a link to it in a sticky...
    not as good, but.. oh well.

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

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

    Standard

    Zitat Zitat von Art
    I would pay the 2000 I have in the bank, but I hear the sticky isn't permanent when done
    that way, and it costs 9900 points.
    Also, I don't think it's up to any member to do it anyway, it should be supported by the site.
    It's not as big a deal as I first thought.. at least there's a link to it in a sticky...
    not as good, but.. oh well.
    Maybe SG57 got the points? After all he was the one who started the thread.

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

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

    Unhappy

    I know right now you all are trying to figureout a way to resticky this somehow, but could one of you kindly tell me why this won't even load the sample PRX...

    Code:
    //////////////////////Loading a PRX
    int LoadAndStartModule_PRX(char *ModuleFILE, int UserMode)//UserMode mode: 1==true:0 == false
    {//start moduling
    SceKernelLMOption moduleprx;
                      moduleprx.mpidtext = (UserMode+1);// 2 is equivalent to usermode ;)
                      moduleprx.mpiddata = (UserMode+1);
                      moduleprx.position = 0;
                      moduleprx.access = 1;// 2 is equivalent to usermode ;)
                      moduleprx.size = sizeof(moduleprx);
    SceUID PrxID=0;
    PrxID = sceKernelLoadModuleMs(ModuleFILE,0,UserMode > 0 ? &moduleprx : NULL);// If in usermode, don't call as NULL >:// this carrys MS for Memory Stick ;)
    int prxstatus=-1;
    if( ( sceKernelStartModule (PrxID, 0,NULL,prxstatus,moduleprx) ) !=0)
    {//I think this is an okay error check<-
        //do nothing until necessary... :), but this is upon an errors existance
    }//last argument is 0 for usermode! #3 is NULL because it's okay, and I don't know wtf it's it's honestly asking for... :'(
    //Finish MODULING: Stop & Unload Relative MODULE
    sceKernelStopModule(PrxID, 0, NULL,prxstatus,moduleprx);
    sceKernelUnloadModule(PrxID);
    return prxstatus;
    }//end moduling
    //////////////////////Loading a PRX
    and yes, it's nice to have a form of order around here, I think it would've been easier to have people just start new threads because finding solutions already out there are hard searching through the 100 something pages in one thread instead of using the forum search to point out a past thread with the same problem already.

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

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

    Standard

    whats not working with your code? ie what errors are you getting?
    QJ loads way 2 slow & the theme is ugly as hell, gone are the glory days

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

    SodR - I wish, i really do, wish to sticky this, but I have no where near the points to maintain such a hefty price... I agree with Soccer, Art, and you all the same...

    Why take away probably the 2 most active threads on this forum away from a spot where it wont matter whethere its stickyd or not since people will just keep posting in it to bump it up, thus cluttering it...

    I must say, the PSPU team this month has gone a tad downhill...

    The Devhook launcher is one of them... IT does do more good then bad, but why must they start to contemplate themselves with yet another piece of news explaining how they can and will host it here? Obviously we all wernt complaining... And now this? Someone needs a bit brighter MODS....

    On Topic: SodR - we need to talk! Soccer hooked me up with a dead link's file so now i have a filebrowser! Its in SDL mainly, so im converting to match pretty much gengeral C in my case...

    EDIT

    I have around 25 k points in the bank...

    not sure if thats enough
    Geändert von SG57 (06-09-2006 um 07:03 PM Uhr)

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

    Projects

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


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

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

    Unhappy

    I'm not getting any errors, it's just that the little message the sample PRX displays won't show... and it compiles nice, but then when I apply the filename argument then run the LoadAndStart function... my screen goes black

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

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

    Standard

    Have you tried running the PRX using PSPLink or some other app? Perhaps the PRX is messed up, and not the actual loading code.
    QJ loads way 2 slow & the theme is ugly as hell, gone are the glory days

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

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

    Unhappy

    Yeah, I had first compiled the PRX loader in the sample folder, read the code, studied it, and watched it... it worked.

    The PRX should say "Hello from the PRX" or something like that

    Okay, now I've set in NULL values in the same areas the sample did and now the screen doesn't go black, but it doesn't show the message...
    PRX MODULE OPERATOR
    Code:
    //////////////////////Loading a PRX
    int LoadAndStartModule_PRX(char *ModuleFILE, int UserMode)//UserMode mode: 1==true; 0 == false;
    {//start moduling
    SceKernelLMOption moduleprx;
                      moduleprx.mpidtext = (UserMode+1);// 2 is equivalent to usermode ;)
                      moduleprx.mpiddata = (UserMode+1);// 2 is equivalent to usermode ;)
                      moduleprx.position = 0;
                      moduleprx.access = 1;
                      moduleprx.size = sizeof(moduleprx);
    SceUID PrxID=0;
    PrxID = sceKernelLoadModuleMs(ModuleFILE,0,UserMode > 0 ? &moduleprx : NULL);// If in usermode, don't call as NULL >:// this carrys MS for Memory Stick ;)
    int prxstatus=-1;
    if( ( sceKernelStartModule (PrxID, 0,NULL,&prxstatus,NULL) ) !=0)// it was :if( ( sceKernelStartModule (PrxID, 0,NULL,&prxstatus,moduleprx) ) !=0)
    {//I think this is an okay error check<-
        //do nothing until necessary... :), but this is on an errors existance
    }//last argument is 0 for usermode! #3 is NULL becaus it's okay, and I don't know wtf it's it's honestly asking for... :'(
    //Finish MODULING: Stop & Unload Relative MODULE
    sceKernelStopModule(PrxID, 0, NULL,&prxstatus,NULL);// it was:sceKernelStopModule(PrxID, 0, NULL,&prxstatus,moduleprx);
    sceKernelUnloadModule(PrxID);
    return prxstatus;
    }//end moduling
    //////////////////////Loading a PRX
    PRX MODULE INITIATOR & CALLER
    Code:
    if(Controller.Buttons & PSP_CTRL_LTRIGGER){LoadAndStartModule_PRX("ms0:/XT1_Module.prx", 0);}
    if(Controller.Buttons & PSP_CTRL_RTRIGGER){LoadAndStartModule_PRX("ms0:/XT1_Module.prx", 1);}
    Geändert von Devun_06 (06-09-2006 um 09:10 PM Uhr)

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

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

    Standard

    Zitat Zitat von SG57
    I have around 25 k points in the bank...
    It costs 10k to sticky a thread. But it's up to you if you want to do it.

    Devun_06: Are you sure that it's not your .prx file that it's something wrong with? And why can't you just use the sample included in the sdk?

    btw. It might be time to register at psp-programming.com...
    Geändert von SodR (06-10-2006 um 04:02 AM Uhr)

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

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

    Standard

    I am using the sample PRX, but it's just renamed

    I even changed the sample to read it with the new name, and it still works!

    This honestly makes no sense... I though I had done it right :icon_mad: ...
    PLEASE HELP ME!
    *and why, the only thing at that site is Yalderb's noob tutorials and a list of terms... (which btw didn't define prx&modules... )

    [email protected], I just went, when did it turn into a community???
    Geändert von Devun_06 (06-10-2006 um 09:46 AM Uhr)

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

    When you turned less arogant... That community is very live over there... its where all the real devlopers for the PSP actually discuss there problems and acheivements... ps2dev is more lib related problems and acheivements while psp-programming.com is more of a general app and game related problems...

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


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

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

    Arrow

    I wasn't trying to be arrogant, I just see a person who is NEW TO THIS to be a Noob, and with that I then saw the tutorials as learning aids for people who are NEW TO THIS.

    Not to say I see my self as better than anyone else, but I've already completed those tutorials and I'm no longer new to this programming thing in general, just to a few pieces of it now... and in that case, I could be considered a Noob too... :icon_bigg

    Although, with you guys... I do eat a lot of humble pie and would like to apologize to anyone who thinks I was trying to put them or anyone else down, I had no intentions of using it as an insult.

    *in that case, what is pspupdates mainly?
    Geändert von Devun_06 (06-10-2006 um 12:49 PM Uhr)

  28. #328
    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

    lol, ask the forerunners of this... I came in when KXploit came out I think...

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


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

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

    Talking

    Alright, I guess this means psp-programming... here I come (*lol)

  30. #330
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    hi, i just read my first c book today, (600) pages. and i have 3 questons:

    1. is the function main() like the while true do in lua?? i know that while (1) { also means while true do, but is it needed??

    2. why do some people put "int main()" instead of "main"??

    3. i havent yet read yeldarbs tuts, but do you have to load an image, before blitting it?? if so how?? ( in the psp)

    4. whats the use of pointers? they seem useless. who want to know where a int or a char is stored??

    yes i know, im a n00b at c, im gonna reread the book again 2morrow.
    --------------------------------------------------------------------------------------


 
Seite 11 von 340 ErsteErste ... 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 61 111 ... LetzteLetzte

Tags for this Thread

Forumregeln

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





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

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