mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-06 22:20:35 +01:00
019fc1a2c6
byuu says (about higan): - dropped release/ root node for individual games (still there in ananke's database.) - Memory export uses smarter names (vram.rwm -> video.ram, etc.) - cheat database moved from XML to BML (3.1MB to 1.9MB file size.) - cheat codes moved from XML to BML - resource manifest moved from XML to BML What can I say, I like consistency. But I'll leave the shaders alone until I get around to shader folders. byuu says (about ananke): Works with higan v091r13. Only does SNES stuff so far.
16 lines
482 B
C++
16 lines
482 B
C++
void Ananke::applyBeatPatch(vector<uint8_t> &buffer) {
|
|
string name = {nall::basename(information.name), ".bps"};
|
|
if(!file::exists(name)) return;
|
|
|
|
bpspatch patch;
|
|
if(patch.modify(name) == false) return;
|
|
patch.source(buffer.data(), buffer.size());
|
|
vector<uint8_t> output;
|
|
output.resize(patch.size());
|
|
patch.target(output.data(), output.size());
|
|
if(patch.apply() == bpspatch::result::success) {
|
|
buffer = output;
|
|
information.manifest = patch.metadata();
|
|
}
|
|
}
|