__
This commit is contained in:
		| @@ -29,7 +29,7 @@ void BMP::Save(std::string path, BMP::Bitmap *bitmap) | ||||
| 	tempbuf[0x36+(bitmap->width)*(bitmap->height)*moltiplier]=0; | ||||
| 	//FS_CreateFile(sdmc_archive, path.c_str(), (u16)(0x36+(bitmap->width)*(bitmap->height)*moltiplier)) | ||||
| 	//Result ret = FS_OpenFile(fileHandle, sdmc_archive, path.c_str(), (FS_OPEN_READ | FS_OPEN_WRITE), 0); | ||||
| 	if(ret) printf("error"); | ||||
| 	//if(ret) printf("error"); | ||||
| 	*(u16*)&tempbuf[0x0] = 0x4D42; | ||||
| 	*(u32*)&tempbuf[0x2] = 0x36 + (bitmap->width)*(bitmap->height)*moltiplier; | ||||
| 	*(u32*)&tempbuf[0xA] = 0x36; | ||||
| @@ -44,8 +44,8 @@ void BMP::Save(std::string path, BMP::Bitmap *bitmap) | ||||
| 		tempbuf[0x36+i] = bitmap->pixels[i]; | ||||
| 		i++; | ||||
| 	} | ||||
| 	//FSFILE_Write(fileHandle, &bytesWritten, 0, (u32*)tempbuf, 0x36 + (src->width)*(src->height)*moltiplier, 0x10001); | ||||
| 	FS_Write(sdmc_archive, path.c_str(), (u32*)tempbuf, 0x36 + (src->width)*(src->height)*moltiplier, 0x10001); | ||||
| 	//FSFILE_Write(fileHandle, &bytesWritten, 0, (u32*)tempbuf, 0x36 + (bitmap->width)*(bitmap->height)*moltiplier, 0x10001); | ||||
| 	FS_Write(sdmc_archive, path.c_str(), (u32*)tempbuf, 0x36 + (bitmap->width)*(bitmap->height)*moltiplier, 0x10001); | ||||
| 	 | ||||
| 	free(tempbuf); | ||||
| 	FS_CloseArchive(sdmc_archive); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user