Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*(qouted Milky4444)
- ayyy ngu, so since theres been lots of scripts released for prx modulus i decided to just make a big thread to keep it organized
- http[dankz to blb]:
- header: [C++] SPRX webRequests - http://adf.ly/rt4sE
- add libs:
- */
- $(SCE_PS3_ROOT)\target\ppu\lib\libhttp_stub.a
- $(SCE_PS3_ROOT)\target\ppu\lib\libhttp_util_stub.a
- $(SCE_PS3_ROOT)\target\ppu\lib\libnet_stub.a
- //ex:
- char response[255];
- SendRequest("http://www.google.com/", response, 255);
- //button monitoring:
- //header: http://adf.ly/rt4tg (pad.h) or http://adf.ly/rt4tO
- //init:
- #inlcude "pad.h"
- extern "C" int main(void)//main entry
- {
- cellPadInit(MAX_PAD);
- }
- /*
- analog monitoring:
- step 1:
- link the pad library to your project:
- */
- $(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a
- /*step2:
- go to the sample of pad utility from sony:
- */
- $(SCE_PS3_ROOT)\samples\common\padutil
- /*step3:
- add padutil.h & padutil.cpp to your project
- ex:
- */
- #include <cell/pad.h>
- #include <cell/padfilter.h>
- #include "padutil.h"
- void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
- {
- CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
- CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
- *Lx = buffL.x;
- *Rx = buffR.x;
- *Ly = buffL.y;
- *Ry = buffR.y;
- }
- uint32_t lel[4];
- extern "C" int main()
- {
- ex(&lel[0],&lel[1],&lel[2],&lel[3]);
- if(lel[0] > lel[1])
- printf(":P");
- return 0;
- }
- //printf:
- void printf(int n,...)
- {
- void* lol;
- va_list a;
- va_start(a,n);
- lol = va_arg(a,void*);
- uint32_t len;
- system_call_4(403, 0, (uint64_t)lol, 32, (uint64_t) &len);
- va_end(a);
- }
- //va (short version of sprintf) :
- void* va(int n,...)
- {
- void* buff;
- va_list a;
- va_start(a,n);
- buff = va_arg(a,void*);
- va_end(a);
- return buff;
- }
- /*dialog[again dankz to blb]:
- Header: [C++] [C++] Dialogs.h - http://pastebin.com/zPWdmgAC
- LIB:*/ $(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_stub.a
- /*HOW TO USE IT
- Simple dialog:
- */
- Dialog::msgdialog_mode = Dialog::MODE_STRING_OK;
- Dialog::Show("Hey, this is a dialog");
- //a YES/NO dialog:
- Dialog::msgdialog_mode = Dialog::MODE_STRING_YESNO;
- Dialog::ShowYESNO("[NGU]: ELITE REJECTED, Want to try again?");
- while(!Dialog::Finished){} //wait for it to end
- bool ret = Dialog::YESNO; //if true, its YES, else its NO
- Dialog::End(); //end the yes/no dialog
- The keyboard(still in alpha):
- Code:
- char retText[32]; //our buffer
- Keyboard::oskdialog_mode = Keyboard::MODE_OPEN;
- while(Keyboard::oskdialog_mode != Keyboard::MODE_EXIT)
- { Keyboard::keyboard(retText, "Title", "Preset Text");} //wait for the keyboard to end and run it meanwhile
- Last edited by milky4444; Today at 04:42 AM.
Add Comment
Please, Sign In to add comment