mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 10:06:35 +03:00
Updated stb_image.
Removed cShapeManager ( i forgot to remove it ). Added FileWrite function.
This commit is contained in:
@@ -371,4 +371,22 @@ eeInt GetNumCPUs() {
|
||||
return nprocs;
|
||||
}
|
||||
|
||||
bool FileWrite( const std::string& filepath, const Uint8* data, const Uint32& dataSize ) {
|
||||
std::fstream fs( filepath.c_str() , std::ios::out | std::ios::binary );
|
||||
|
||||
if ( fs.is_open() ) {
|
||||
fs.write( reinterpret_cast<const char*> (data), dataSize );
|
||||
|
||||
fs.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FileWrite( const std::string& filepath, const std::vector<Uint8>& data ) {
|
||||
return FileWrite( filepath, reinterpret_cast<const Uint8*> ( &data[0] ), data.size() );
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user