diff -r f69b4571a398 -r e6e9ed9d2626 RandomNotes.wiki --- a/RandomNotes.wiki Wed Apr 17 15:27:20 2019 +0100 +++ b/RandomNotes.wiki Wed Apr 17 15:33:04 2019 +0100 @@ -12,16 +12,11 @@ = How to convert a `.hwmap` file to a Lua string = -Run this in a shell: - -IN="map.hwmap";OUT="temp.lua";base64 -d $IN | tail -c +7 | head -c -4 > foo;echo -ne "\x1f\x8b\x08\0\0\0\0\0\x02\xff" > bar;cat bar foo | gunzip > baz;C=0;echo -n "local map = { " >> $OUT;od -w240 -t u1 baz | grep -Ev "^[0-9]*[[:space:]]*$" | while read f;do C=$((C+1));if ((C!=1));then echo "," >> $OUT;fi;echo -n $f | sed "s/^......./'/;s/ */\\\\/g;s/$/'/" >> $OUT;done;echo "}" >> $OUT - - * Input file: `map.hwmap` - * Output file: `temp.lua` +Run the shell script `tools/hwmap2lua.sh` found in the Hedgewars repository. Help is included in the source code. = Undocumented Lua functions = This script was used on [LuaAPI] to detect undocumented functions: [http://hw.ercatec.net/docs/lua_wiki_check.php] -But due to a restructuring, this script no longer works, it needs to be updated. \ No newline at end of file +But due to a restructuring, this script no longer works, it needs to be updated. Functions are now located on LuaEvents, LuaGameplay, LuaGears, LuaStats, LuaGUI, LuaAudio and LuaUtil. \ No newline at end of file