Created
October 27, 2016 19:02
-
-
Save st4rk/6b9ea0e56485952ffb9ff537984e65d0 to your computer and use it in GitHub Desktop.
This file contains 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 <iostream> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
struct RE1_ROOM_ENTRY { | |
signed short enable; | |
signed short x; | |
signed short z; | |
char name[18]; | |
}; | |
int main(int argc, char **argv) { | |
FILE *elf = fopen ("SLPS_002.22", "rb"); | |
unsigned char *file = NULL; | |
unsigned int fileSize = 0; | |
if (elf == NULL) { | |
std::cout << "file not found" << std::endl; | |
return 0; | |
} | |
fseek(elf, 0, SEEK_END); | |
fileSize = ftell(elf); | |
rewind(elf); | |
file = new unsigned char[fileSize]; | |
fread(file, fileSize, 1, elf); | |
/* DUMP STAGE 1 */ | |
RE1_ROOM_ENTRY node; | |
for (unsigned int i = 0; i <= 0x1C; i++) { | |
node = *(RE1_ROOM_ENTRY*)(file + 0x7F74C + i * sizeof(RE1_ROOM_ENTRY)); | |
std::cout << "{" << node.x << ".0f, " << node.z << ".0f, \"" << node.name << "\"}," << std::endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment