X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Ftools%2Fbitmapcode.cpp;h=4425062ac1f57b717660f6118facd0df6afe96a2;hp=b0541047187088510db0d372983074c3fc9a6f82;hb=3ef806261b5482a584e05dc8311c8d7633f146b4;hpb=2ead500a411cadcabbe7bcf7efe74a139137d445 diff --git a/source/tools/bitmapcode.cpp b/source/tools/bitmapcode.cpp index b054104..4425062 100644 --- a/source/tools/bitmapcode.cpp +++ b/source/tools/bitmapcode.cpp @@ -100,8 +100,8 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter) // Setup the inclusion guard. cppfile << "#include " << endl << endl; - cppfile << "#ifndef " << outname.c_str() << "_CPP" << endl; - cppfile << "#define " << outname.c_str() << "_CPP" << endl << endl; + cppfile << "#ifndef " << outname.ToStdString() << "_CPP" << endl; + cppfile << "#define " << outname.ToStdString() << "_CPP" << endl << endl; outname.Clear(); outname.Append(wxString::FromUTF8(DirFilenameOnly.c_str())); @@ -113,7 +113,7 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter) // Convert the PNG file into an unsigned char array. - cppfile << "static unsigned char " << outname.c_str() << + cppfile << "static unsigned char " << outname.ToStdString() << "[] = {" << endl; while (pngfile){ @@ -148,10 +148,9 @@ void CreateCPPFile(wxString dirfilename, wxString PNGFilename, int* counter) cppfile << "#endif" << endl << endl; cppfile.close(); - cout << "CPP\t" << CPPFilename.c_str() << endl; + cout << "CPP\t" << CPPFilename.ToStdString() << endl; ++*counter; - } void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, @@ -171,7 +170,7 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, bool fmatch = FALSE; wxString finaldirname; - wxString HPPFilename = dirfilename.c_str(); + wxString HPPFilename = dirfilename.ToStdString(); wxString DirFilenameOnly; wxString HPPFilenameOnly; @@ -224,8 +223,8 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, #endif hppfile << "#include " << endl << endl; - hppfile << "#ifndef " << finaldirname.c_str() << "_H" << endl; - hppfile << "#define " << finaldirname.c_str() << "_H" << endl << endl; + hppfile << "#ifndef " << finaldirname.ToStdString() << "_H" << endl; + hppfile << "#define " << finaldirname.ToStdString() << "_H" << endl << endl; hppfile << "// List all CPP files in the directory." << endl << endl; // Write each CPP file into the header file. @@ -255,8 +254,8 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, CPPFileOnly.RemoveLast(4); CPPFileOnly.Append(wxT(".cpp")); - hppfile << "#include \"" << DirFilenameOnly.c_str() << - "/" << CPPFileOnly.c_str() << "\"" << endl; + hppfile << "#include \"" << DirFilenameOnly.ToStdString() << + "/" << CPPFileOnly.ToStdString() << "\"" << endl; } @@ -267,7 +266,7 @@ void CreateHPPFileDir(wxString dirfilename, wxArrayString filelist, // Increment the HPP file counter. - cout << "HPPDIR\t" << HPPFilename.c_str() << endl; + cout << "HPPDIR\t" << HPPFilename.ToStdString() << endl; ++*counter; } @@ -386,7 +385,7 @@ int main(int argc, char *argv[]) DirFilenameWxS.Empty(); - std::cout << BitmapHeaderFilename.c_str() << std::endl; + std::cout << BitmapHeaderFilename.ToStdString() << std::endl; #if defined(__WIN32__) @@ -448,7 +447,7 @@ int main(int argc, char *argv[]) for (int fi = 0; fi < filelist.GetCount(); fi++) { - CreateCPPFile(dirlist[bi].wc_str(), filelist[fi].wc_str(), &cppg); + CreateCPPFile(dirlist[bi].ToStdString(), filelist[fi].ToStdString(), &cppg); fp++; } @@ -487,12 +486,12 @@ int main(int argc, char *argv[]) #elif defined(__WIN32__) - finalhppfile << "#include \"bitmaps\\" << DirNameSplit.c_str() << + finalhppfile << "#include \"bitmaps\\" << DirNameSplit.ToStdString() << ".h\"" << endl; #else - finalhppfile << "#include \"bitmaps/" << DirNameSplit.c_str() << + finalhppfile << "#include \"bitmaps/" << DirNameSplit.ToStdString() << ".h\"" << endl; #endif