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

@@ -11,7 +11,27 @@ template<> struct vector<uint8_t> : vector_base<uint8_t> {
}
template<typename U> auto appendm(U value, uint size) -> void {
for(uint byte : reverse(range(size))) append(uint8_t(value >> byte * 8));
for(uint byte : nall::reverse(range(size))) append(uint8_t(value >> byte * 8));
}
//note: string_view is not declared here yet ...
auto appends(array_view<uint8_t> memory) -> void {
for(uint8_t byte : memory) append(byte);
}
template<typename U> auto readl(int offset, uint size) -> U {
if(offset < 0) offset = this->size() - abs(offset);
U value = 0;
for(uint byte : range(size)) value |= (U)operator[](offset + byte) << byte * 8;
return value;
}
auto view(uint offset, uint length) -> array_view<uint8_t> {
#ifdef DEBUG
struct out_of_bounds {};
if(offset + length >= size()) throw out_of_bounds{};
#endif
return {data() + offset, length};
}
};