Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MW2 Offset : CDE7F800
- MW2 Resolution : 1280x720
- MW2 Format: .DDS DXT5
- MW3 Offset : 0xCCC77000 , 0xCCD27900
- MW3 Resolution : 1280x720
- MW3 Format: .DDS DXT1
- BO2 Offset : 0xCAD88480
- BO2 Resolution : 1024x1024
- BO2 Bytes Length :1000
- C#
- --------
- OpenFileDialog openFileDialog = new OpenFileDialog();
- openFileDialog.ShowDialog();
- byte[] array = File.ReadAllBytes(openFileDialog.FileName);
- PS3.SetMemory(CDE7F800 , array);
- C++
- --------
- int getFileSize(char *file)
- {
- int fd;
- int ret;
- uint64_t pos;
- uint64_t nread;
- ret = cellFsOpen(file, 0, &fd, NULL, 0);
- if (!ret) {
- CellFsStat sb;
- ret = cellFsFstat(fd, &sb);
- if (!ret) {
- return sb.st_size;
- }
- }
- return -1;
- }
- void readFile(char *file, char buf[], int size)
- {
- int fd;
- int ret;
- uint64_t pos;
- uint64_t nread;
- ret = cellFsOpen(file, 0, &fd, NULL, 0);
- if (!ret)
- {
- cellFsLseek(fd, 0, CELL_FS_SEEK_SET, &pos);
- ret = cellFsRead(fd, buf, size, &nread);
- if (!ret)
- {
- cellFsClose(fd);
- }
- }
- }
- int ByteLength;
- unsigned int MALLOC = 0x100000; //921584
- unsigned int loc = 0xCDE7F800;
- void imginject(char *file)
- {
- ByteLength = getFileSize(file);
- if (ByteLength != -1)
- {
- readFile(file, (char*)loc, MALLOC);
- }
- else
- {
- // DrawOkayMessageDialog("\nUnable to Inject Image\n");
- }
- }
- bool imageinjected;
- bool imgfirst;
- void injectimagepls(uint64_t nothing)
- {
- for (;;)
- {
- if (imgfirst == false)
- {
- Sleep(6000);
- imginject("/dev_hdd0/tmp/SpaceMW2.dds");
- imgfirst = true;
- }
- if (imageinjected == false && IsInGame == false)
- {
- imginject("/dev_hdd0/tmp/SpaceMW2.dds");
- imageinjected = true;
- }
- Sleep(3000);
- }
- sys_ppu_thread_exit(nothing);
- }
- Then Put this somewhere that constantly runs in game. (the image resets when you join a game)
- Code:
- if (DvarGetBool("cl_ingame")) {
- imageinjected = false;
- }
- sys_ppu_thread_t startimageinject;
- sys_ppu_thread_create(&startimageinject, injectimagepls, 0, 10, 0x0A, 0, "imageInjector")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement