Created
May 16, 2022 03:12
-
-
Save IntriguingTiles/c35e0a36692fa41a70d02af075b03d2b to your computer and use it in GitHub Desktop.
Unlocks all levels in the Half-Life: Decay PC "port".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| int main(int argc, char* argv[]) { | |
| FILE* file; | |
| fopen_s(&file, "save0.sv2", "rb"); | |
| if (!file) { | |
| printf("You must run this next to \"save0.sv2\"!\n"); | |
| return -1; | |
| } | |
| fseek(file, 0, SEEK_END); | |
| int size = ftell(file); | |
| fseek(file, 0, SEEK_SET); | |
| uint8_t* data = (uint8_t*)malloc(size + 1); | |
| fread(data, size, 1, file); | |
| fclose(file); | |
| for (int i = 0xA3; i < size; i += 0x174) { | |
| uint8_t b = data[i]; | |
| printf("0x%X\n", b); | |
| data[i] = 0x0; | |
| } | |
| fopen_s(&file, "save0.sv2", "wb"); | |
| fwrite(data, size, 1, file); | |
| fclose(file); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment