I'd like to make a better replacement for "GrabListener", a tool made for Discreet's gMax, which saves text in it's console window to a text based file. gMax is limited to the wrong kind of export format for CE developers, so it's a pain.
This is for Halo Custom Edition developers who can't afford 3ds max.
High poly exports like non-simple quality maps take too long, in my opinion, considering the many exports during the debug process.
I've found the lengthy part to be when the export script is streaming newline characters to gmax's listener window. It can take hours to export more than a simple map. Preparing the data for export takes a couple minutes, and exporting with 3ds takes a bit more, but this streaming to listener process is ridiculous. A cumbersome workaround is to export most newline characters as something else, and use a text search/replace program to convert them back to newline chars after the window's text is "grabbed" and saved, but it'd be nice if it just exported, and a side app just saved it. Potential high-end developers would still be encouraged to purchase the full app without this no-exporting bs, as gMax is otherwise limited in features, most notably rendering.
I imagine it's possible to have the external program (GrabListener2 maybe) get it's data from a global variable holding an array or structure, rather than the console window, but this must be complicated, acquiring content of dynamically allocated data from a variable found in a stack or heap or whatever the case is.
I see a variable's name can be found, and a couple addresses point to it. It's value must not be far away, as well as it's position in a heap. I image it'd need to start at the heap root or some such, to export in a timely fashion.
I need to reorganize the script so the data it collects is in a struct, but maybe we can figure some stuff out in the meantime.
Guidance, guesses, and/or suggestions would be greatly appreciated.