Fix some warnings on 32-bit, add build_wad.sh script, more work on sync