Most changes are trivial:
- Adding the function signature and scope
- Indent and linewrap
- changing g_Map.ExportMap() to return g_Map
- changing Engine.SetProgress(NN) to yield NN
- changing var g_Map = ... to global.g_Map = ...
On some maps I used the argument mapSettings.
Some scripts are split up in multiple functions. Since many variables aren't global anymore I had to pass them to thous helper-functions.
In "unknown.js" there was a function called like this global[...](). Since the functions aren't global anymore i put them in an object. Now it's they are called like this unknownFunctions[...]().
I also converted the tests. I'm not sure that's usefull since the tests don't test the generator-interface but the rmlib which could be tested on global scope.
Refs: #4964