Skip to content
Permalink
Browse files

Write events in EGM

  • Loading branch information
JoshDreamland committed Nov 26, 2019
1 parent d4bd952 commit 6ffb436fbf48cdba6147b12bc80f017a873c28ca
Showing with 5 additions and 2 deletions.
  1. +2 −0 CommandLine/gm2egm/main.cpp
  2. +3 −2 CommandLine/libEGM/egm-write.cpp
@@ -3,6 +3,7 @@
#include "yyp.h"
#include "egm.h"
#include "filesystem.h"
#include <event_reader/event_parser.h>

#include <iostream>
#include <string>
@@ -34,6 +35,7 @@ int main(int argc, char *argv[])
return -5;
}
}
event_parse_resourcefile();

std::string input_file = argv[1];
std::string ext;
@@ -20,6 +20,7 @@
#include "filesystem.h"

#include <yaml-cpp/yaml.h>
#include <event_reader/event_parser.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/util/message_differencer.h>
#include <iostream>
@@ -227,7 +228,7 @@ bool WriteRoom(const fs::path &egm_root, const fs::path &dir,
}

// Write the code to edl
if (std::ofstream fout{(dir/"create[room].edl").string()}) {
if (std::ofstream fout{(dir/"roomcreate.edl").string()}) {
fout << room->creation_code();
} else return false;

@@ -301,7 +302,7 @@ bool WriteObject(const fs::path &egm_root, const fs::path &dir, const buffers::r
return false;

for (auto &e : events) {
string edlFile = dir.string() + "/" + e.name() + ".edl";
string edlFile = dir.string() + "/" + event_get_function_name(e.type(), e.number()) + ".edl";
std::ofstream fout{edlFile};
fout << e.code();
}

0 comments on commit 6ffb436

Please sign in to comment.
You can’t perform that action at this time.