SPlNeTe

Membres
  • Compteur de contenus

    4
  • Inscription

  • Dernière visite

SPlNeTe's Achievements

Débutant

Débutant (1/7)

0

Réputation sur la communauté

  1. Thank you very much for the source code Ski-lleR. Don't work for me, in xbox. //---------------------------------------------------------------------------------- // Carga el fondo de pantalla //---------------------------------------------------------------------------------- VOID CargarFondo() { LPWSTR lpGameNameW = new wchar_t[MAX_PATH]; //Nombre del fichero caracteres anchos string sNxeartFile; char cNxeartFile[MAX_PATH]; char cGameImagesFile[MAX_PATH]; sNxeartFile= sDirAct; sNxeartFile+= "\\nxeart"; sNxeartFile._Copy_s(cNxeartFile, sNxeartFile.length(), sNxeartFile.length()); cNxeartFile[sNxeartFile.length()]='\0'; // Ouverture du fichier nxeart pour traitement ifstream in; stringstream out; string content; size_t start, end, length; in.open(cNxeartFile, ios::in | ios::binary); out << in.rdbuf(); // On stock le fichier entier en mémoire content=out.str(); // On extrait le nom string gameName = content.substr( 5778, 40 ); for (size_t i = 0; i < gameName.length(); i++) { if (gameName.at(i) == 0x00) gameName.erase(i, 1); } char *cGameName = new char[gameName.length()+1]; gameName._Copy_s(cGameName, gameName.length(), gameName.length()); cGameName[gameName.length()] = '/0'; // On extrait l'icone du jeu start = content.find("PNG"); start -= 1; end = content.find("IEND"); end += 7; length = end - start; string icon = content.substr( start, length ); start = content.find("JFIF"); start -= 6; end = start + 688128; length = end - start; string wallpaperHD = content.substr( start, length ); // Deuxième partie de l'image start = end + 8192; end = content.find("ÿÙ", start ); length = end - start; // On colle les 2 bouts wallpaperHD.append( content.substr( start, length+2 ) ); /* // On extrait l'image utiliser pour le preview start = content.find("JFIF", end); start -= 6; end = content.find("ÿÙ", start ); end += 5; end = content.find("ÿÙ", end ); end += 5; end = content.find("ÿÙ", end ); length = end - start; string logo = content.substr( start, length+2 );*/ //Se crea el directorio CreateDirectory( "usb0:\\media\\gameimages", // directory name NULL // SD ); ofstream out2;sprintf_s( cGameImagesFile,"usb0:\\media\\gameimages\\%s_icon.jpg", cGameName ); out2.open(cGameImagesFile, ios::out | ios::binary); out2.write(icon.c_str(), icon.length()); out2.close();/* sprintf_s( cGameImagesFile,"usb0:\\media\\gameimages\\%s_logo.jpg", cGameName ); out2.open(cGameImagesFile, ios::out | ios::binary); out2.write(logo.c_str(), logo.length()); out2.close();*/ sprintf_s( cGameImagesFile,"usb0:\\media\\gameimages\\%s_wallpaperHD.jpg", cGameName ); out2.open(cGameImagesFile, ios::out | ios::binary); out2.write(wallpaperHD.c_str(), wallpaperHD.length()); out2.close(); ::MultiByteToWideChar( CP_ACP, NULL, cGameName, -1, lpGameNameW, MAX_PATH); m_image1.SetImagePath(lpGameNameW); } The wallpaperHD content starts correctly, but the rest of the file copy nxeart. The icon are correctly. What happens?
  2. Thanks for the code. I'm trying to create a temporary file with the background but I can not. I tried with the following boxes ofstream os ( "file: / / game: / media / nxebg.jpg") but I do not work. I have also tried the following for read a file with RedFile function, but neither. hFile = CreateFile( "file://usb0:/Assassins Creed 2/nxeart", // file name GENERIC_READ, // access mode FILE_SHARE_READ, // share mode NULL, // SD OPEN_EXISTING, // how to create FILE_ATTRIBUTE_NORMAL, // file attributes NULL // handle to template file ); Could your help me? I think we can access nxeart file with XContentCreate function. Thanks
  3. Thank you for your code Ski-lleR. I don't know because can't copy files with CopyFileEx, could you help me. Do you know how extract xneart images?.