__
This commit is contained in:
parent
6587d22d2c
commit
3f548f2d09
@ -29,7 +29,7 @@ void BMP::Save(std::string path, BMP::Bitmap *bitmap)
|
|||||||
tempbuf[0x36+(bitmap->width)*(bitmap->height)*moltiplier]=0;
|
tempbuf[0x36+(bitmap->width)*(bitmap->height)*moltiplier]=0;
|
||||||
//FS_CreateFile(sdmc_archive, path.c_str(), (u16)(0x36+(bitmap->width)*(bitmap->height)*moltiplier))
|
//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);
|
//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;
|
*(u16*)&tempbuf[0x0] = 0x4D42;
|
||||||
*(u32*)&tempbuf[0x2] = 0x36 + (bitmap->width)*(bitmap->height)*moltiplier;
|
*(u32*)&tempbuf[0x2] = 0x36 + (bitmap->width)*(bitmap->height)*moltiplier;
|
||||||
*(u32*)&tempbuf[0xA] = 0x36;
|
*(u32*)&tempbuf[0xA] = 0x36;
|
||||||
@ -44,8 +44,8 @@ void BMP::Save(std::string path, BMP::Bitmap *bitmap)
|
|||||||
tempbuf[0x36+i] = bitmap->pixels[i];
|
tempbuf[0x36+i] = bitmap->pixels[i];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
//FSFILE_Write(fileHandle, &bytesWritten, 0, (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 + (src->width)*(src->height)*moltiplier, 0x10001);
|
FS_Write(sdmc_archive, path.c_str(), (u32*)tempbuf, 0x36 + (bitmap->width)*(bitmap->height)*moltiplier, 0x10001);
|
||||||
|
|
||||||
free(tempbuf);
|
free(tempbuf);
|
||||||
FS_CloseArchive(sdmc_archive);
|
FS_CloseArchive(sdmc_archive);
|
||||||
|
Loading…
Reference in New Issue
Block a user