RandomNotes.wiki
changeset 1814 e6e9ed9d2626
parent 1765 3e23edc6d087
child 1834 323d6e659cd7
equal deleted inserted replaced
1813:f69b4571a398 1814:e6e9ed9d2626
    10  * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values
    10  * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values
    11  * `PageOptions::PageOptions(QWidget* parent) :  AbstractPage(parent)` is where you would add your widget
    11  * `PageOptions::PageOptions(QWidget* parent) :  AbstractPage(parent)` is where you would add your widget
    12 
    12 
    13 = How to convert a `.hwmap` file to a Lua string =
    13 = How to convert a `.hwmap` file to a Lua string =
    14 
    14 
    15 Run this in a shell:
    15 Run the shell script `tools/hwmap2lua.sh` found in the Hedgewars repository. Help is included in the source code.
    16 
       
    17 <code>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</code>
       
    18 
       
    19  * Input file: `map.hwmap`
       
    20  * Output file: `temp.lua`
       
    21 
    16 
    22 = Undocumented Lua functions =
    17 = Undocumented Lua functions =
    23 This script was used on [LuaAPI] to detect undocumented functions:
    18 This script was used on [LuaAPI] to detect undocumented functions:
    24 
    19 
    25 [http://hw.ercatec.net/docs/lua_wiki_check.php]
    20 [http://hw.ercatec.net/docs/lua_wiki_check.php]
    26 
    21 
    27 But due to a restructuring, this script no longer works, it needs to be updated.
    22 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.