Update to v106r65 release.

byuu says:

This synchronizes bsnes/higan with many recent internal nall changes.

This will be the last WIP until I am situated in Japan. Apologies for the
bugfixes that didn't get applied yet, I ran out of time.
This commit is contained in:
Tim Allen
2018-10-04 20:11:23 +10:00
parent 336d20123f
commit 03b06257d3
75 changed files with 2242 additions and 1371 deletions

View File

@@ -4,7 +4,7 @@ namespace nall { namespace Encode {
struct BMP {
static auto create(const string& filename, const void* data, uint pitch, uint width, uint height, bool alpha) -> bool {
file fp{filename, file::mode::write};
auto fp = file::open(filename, file::mode::write);
if(!fp) return false;
uint bitsPerPixel = alpha ? 32 : 24;

View File

@@ -49,14 +49,14 @@ inline auto LZSA(array_view<uint8_t> input) -> vector<uint8_t> {
int length, offset;
suffixArray.previous(length, offset, index);
for(uint ahead = 1; ahead <= 2; ahead++) {
/* for(uint ahead = 1; ahead <= 2; ahead++) {
int aheadLength, aheadOffset;
suffixArray.previous(aheadLength, aheadOffset, index + ahead);
if(aheadLength > length && aheadOffset >= 0) {
length = 0;
break;
}
}
} */
if(length < 6 || offset < 0) {
flagWrite(0);

View File

@@ -19,7 +19,7 @@ struct ZIP {
filename.transform("\\", "/");
if(!timestamp) timestamp = this->timestamp;
uint32_t checksum = Hash::CRC32({data, size}).digest().hex();
directory.append({filename, timestamp, checksum, size, fp.offset()});
directory.append({filename, timestamp, checksum, size, (uint32_t)fp.offset()});
fp.writel(0x04034b50, 4); //signature
fp.writel(0x0014, 2); //minimum version (2.0)
@@ -34,7 +34,7 @@ struct ZIP {
fp.writel(0x0000, 2); //extra field length
fp.print(filename); //file name
fp.write(data, size); //file data
fp.write({data, size}); //file data
}
~ZIP() {
@@ -86,7 +86,7 @@ protected:
return ((info->tm_year - 80) << 9) | ((1 + info->tm_mon) << 5) + (info->tm_mday);
}
file fp;
file_buffer fp;
time_t timestamp;
struct entry_t {
string filename;