21 std::ifstream stream(filename.c_str(), std::ios::binary);
22 if (!stream.is_open()) {
23 fprintf(stderr,
"Failed to open LMT file `%s' for reading : %s\n", filename.c_str(), strerror(errno));
30 std::ofstream stream(filename.c_str(), std::ios::binary);
31 if (!stream.is_open()) {
32 fprintf(stderr,
"Failed to open LMT file `%s' for writing : %s\n", filename.c_str(), strerror(errno));
39 std::ofstream stream(filename.c_str(), std::ios::binary);
40 if (!stream.is_open()) {
41 fprintf(stderr,
"Failed to open LMT XML file `%s' for writing : %s\n", filename.c_str(), strerror(errno));
48 std::ifstream stream(filename.c_str(), std::ios::binary);
49 if (!stream.is_open()) {
50 fprintf(stderr,
"Failed to open LMT XML file `%s' for reading : %s\n", filename.c_str(), strerror(errno));
64 if (header.length() != 10) {
68 if (header !=
"LcfMapTree") {
69 fprintf(stderr,
"Warning: This header is not LcfMapTree and might not be a valid RPG2000 map tree.\n");
84 header =
"LcfMapTree";
108 if (!reader.
IsOk()) {