Forum: PS3 Technical Development - Topics relating to Playstation 3 Technical development ONLY! Read and discuss the latest Cobra USB updates, tutorials and explanations or find out about bluray drive bypass firmwares plus much more.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: [AHL] Advance Homebrew Library
  

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23
  1. #11  
    syntex is offline Member
    Join Date
    Sep 2010
    Posts
    83
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Quote Originally Posted by Chossy View Post
    forgive my ignorance but how do you draw text with this ?
    Its simplie:
    Code:
    // I used Hello_Wolrd source of Slynk as refrence.
    float x = 100;
    float y = 100;
    
    void DrawFont() {
           dbgFontPrintf(x,y,1.5f,"Hello World"); 
           dbgFontDraw();
    }
    When I implemented to show which button is pressed into the Hello World source I ended with hanging on Install my PKG:
    Code:
    if(padData.button[2]&CELL_PAD_CTRL_LEFT)
    {
    		x--;
    		dbgFontPrintf(100,100,1.5f,"Left Stick"); // right would be 100,200
                    dbgFontDraw();
     }
    Dunno why it hangs on Install that PKG, still trying to figure out.
    Reply With Quote  

  2. #12  
    syntex is offline Member
    Join Date
    Sep 2010
    Posts
    83
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Just download the Hello_World.7z from "help to help others" thread and compile it or change the string to print.

    It works well with the source of Slynk, and its also a clean and easy understandable source. I added one thing, a resolution check for compability with every screen.

    You can use left,right,up,down to move the text... he uses his x , y variables to update text and in the main func you can see it gets rendered by calling the function for it. You can also delete that and fix the text to a static area... if you dont mind leave it
    Reply With Quote  

  3. #13  
    Access_Denied is offline Banned
    Join Date
    Sep 2010
    Posts
    112
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    2
    Quote Originally Posted by Slynk View Post
    SYS_DEV_HDD0 will take care of that. My demo uses
    SYS_DEV_HDD0"/game/PLIB00000/USRDIR/flag.png"

    to point to the image. I was looking for a way to include the path to the application dynamically but I haven't found anything. It'd be nice if:
    "/dev_hdd0/game/GAME00000" was all in a system variable like SYS_DEV_HDD0. If you know of anything, it's a quick switch in the code but for now, yeah you have to use the full path.
    That's odd, as when I compile the code as you have it, with the SYS_DEV_HDD0"...", it doesn't seem to work. But if I compile the code with "/dev_hdd0/..." it works just fine. Odd. I'll have to try that again, maybe I'm mistaken and there's something else causing it not to function.
    Reply With Quote  

  4. #14  
    Slynk is offline Member
    Join Date
    Sep 2010
    Posts
    754
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    361
    Quote Originally Posted by Access_Denied View Post
    That's odd, as when I compile the code as you have it, with the SYS_DEV_HDD0"...", it doesn't seem to work. But if I compile the code with "/dev_hdd0/..." it works just fine. Odd. I'll have to try that again, maybe I'm mistaken and there's something else causing it not to function.
    that's because you have to
    #include <sys/paths>

    to use it. ^^

    Quote Originally Posted by Chossey
    I had loads of other errors when trying to use the console/debug stuff in the libs folder
    Did you add the cpp file to the Makefile? It's important if you change the files the project uses to add it to the make file.
    Reply With Quote  

  5. #15  
    Slynk is offline Member
    Join Date
    Sep 2010
    Posts
    754
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    361
    Quote Originally Posted by syntex View Post
    Its simplie:
    Code:
    // I used Hello_Wolrd source of Slynk as refrence.
    float x = 100;
    float y = 100;
    
    void DrawFont() {
           dbgFontPrintf(x,y,1.5f,"Hello World"); 
           dbgFontDraw();
    }
    When I implemented to show which button is pressed into the Hello World source I ended with hanging on Install my PKG:
    Code:
    if(padData.button[2]&CELL_PAD_CTRL_LEFT)
    {
    		x--;
    		dbgFontPrintf(100,100,1.5f,"Left Stick"); // right would be 100,200
                    dbgFontDraw();
     }
    Dunno why it hangs on Install that PKG, still trying to figure out.
    I'm not sure but it's probably a logical thing. You print out "Left Stick" for code that activates when pressing left on the d-pad. And you decrement x when it looks like you're not using it. So just look at your logic and see if there's something to fix there. And right would be 200,100 (x,y)
    Reply With Quote  

  6. #16  
    syntex is offline Member
    Join Date
    Sep 2010
    Posts
    83
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Got it working now, I had problems generate the pkg file, it messed up installing but now it works somehow.

    Could you Implement auto-resolution to your lib?
    Reply With Quote  

  7. #17  
    Slynk is offline Member
    Join Date
    Sep 2010
    Posts
    754
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    361
    It already does as far as I know:
    CellVideoOutState videoState;
    do {
    cellVideoOutGetState(CELL_VIDEO_OUT_PRIMARY, 0, &videoState);
    } while(videoState.state != CELL_VIDEO_OUT_OUTPUT_STATE_ENABLED );

    and

    psglGetDeviceDimensions(device, &width, &height);

    Sets up the width, height, and ratio. What would you rather have?

    Edit: In fact xwolf HAD the resolution switch case from the samples but it LOOSES compatibility

    1080p is defined on the PS3 as 1920 x 1080

    and when I tried using his original GL class, the apps wouldn't load on my PS3. Know why? Because my monitor is 1920 x 1200. A somewhat obscure resolution for 1080p. So the way the code is set up right now, it works for any resolution.
    Reply With Quote  

  8. #18  
    syntex is offline Member
    Join Date
    Sep 2010
    Posts
    83
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    could you upload makefile, makedef and other needed files to compile? I tried to write my own makefile but it always fails on compiling :|

    im fine with your hello_world source, made some experience but I would like to use this lib instead of hello_world source to figure things out :P
    Reply With Quote  

  9. #19  
    Slynk is offline Member
    Join Date
    Sep 2010
    Posts
    754
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    4
    Likes Received
    361
    Use the make file in the demo o.O It uses the library and everything...
    Reply With Quote  

  10. #20  
    Access_Denied is offline Banned
    Join Date
    Sep 2010
    Posts
    112
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    2
    I have another question. :/

    Looking through the code, it seems that every time you create a sprite, you reload that image into memory. So if I have 2 sprites with the same .png file, it loads that .png file into memory twice. Is this right? I don't know a lot of the the PS3 GL, so I'm not sure.

    If this is true, I think I'll be writing a quick function that will draw an image just given a PNG structure and a set of coordinates. If I want to draw an image many times, I don't want to burn up all the memory.
    Reply With Quote  

Page 2 of 3 FirstFirst 1 2 3 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •