implement episode 3 battles

This commit is contained in:
Martin Michelsen
2022-11-09 22:48:27 -08:00
parent 8481ba23c5
commit 9f2f0ccc14
41 changed files with 19300 additions and 2891 deletions
+12 -1
View File
@@ -833,4 +833,15 @@ shared_ptr<PSOBBEncryption> PSOBBMultiKeyImitatorEncryption::ensure_crypt() {
}
}
return this->active_crypt;
}
}
void decrypt_trivial_gci_data(void* data, size_t size, uint8_t basis) {
uint8_t* bytes = reinterpret_cast<uint8_t*>(data);
uint8_t key = basis + 0x80;
for (size_t z = 0; z < size; z++) {
key = (key * 5) + 1;
bytes[z] ^= key;
}
}