]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'master' into 'master' 16/head
authorJay Dolan <jay.t.dolan+github@gmail.com>
Mon, 21 Dec 2015 00:49:37 +0000 (00:49 +0000)
committerJay Dolan <jay.t.dolan+github@gmail.com>
Mon, 21 Dec 2015 00:49:37 +0000 (00:49 +0000)
Fix crash on launch on OS X. Also describe installing deps with homebrew.

Hi,
I applied this patch to fix the crash after the initial game selection dialog: https://github.com/TTimo/GtkRadiant/issues/289

Also made a small update to COMPILING describing how you can build using dependencies installed with Homebrew.

See merge request !1

255 files changed:
.gitignore
Makefile
contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp [deleted file]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.png [new file with mode: 0644]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp [deleted file]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.png [new file with mode: 0644]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp [deleted file]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.png [new file with mode: 0644]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp [deleted file]
contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.png [new file with mode: 0644]
contrib/bkgrnd2d/plugin.cpp
contrib/bobtoolz/bitmaps/README-bitmaps.txt [new file with mode: 0644]
contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_split.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp [deleted file]
contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp [deleted file]
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/camera/bitmaps/camera_insp.bmp [deleted file]
contrib/camera/bitmaps/camera_insp.png [new file with mode: 0644]
contrib/camera/camera.cpp
contrib/ufoaiplug/bitmaps/README-bitmaps.txt [new file with mode: 0644]
contrib/ufoaiplug/bitmaps/ufoai_actorclip.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level1.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level2.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level3.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level4.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level5.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level6.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level7.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_level8.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_nodraw.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_stepon.bmp [deleted file]
contrib/ufoaiplug/bitmaps/ufoai_weaponclip.bmp [deleted file]
contrib/ufoaiplug/ufoai_gtk.cpp
download-gamepacks.sh
libs/bytestreamutils.h
libs/etclib.c [new file with mode: 0644]
libs/etclib.h [new file with mode: 0644]
libs/gtkutil/image.cpp
libs/shaderlib.h
plugins/image/image.cpp
plugins/image/ktx.cpp [new file with mode: 0644]
plugins/image/ktx.h [new file with mode: 0644]
plugins/image/tga.cpp
plugins/shaders/plugin.cpp
plugins/shaders/shaders.cpp
radiant/camwindow.cpp
radiant/eclass_doom3.cpp
radiant/environment.cpp
radiant/gtkdlgs.cpp
radiant/mainframe.cpp
radiant/patchdialog.cpp
radiant/patchmanip.cpp
radiant/patchmanip.h
radiant/select.cpp
radiant/surfacedialog.cpp
radiant/texwindow.cpp
setup/data/tools-src/notex.xcf [new file with mode: 0644]
setup/data/tools-src/shadernotex.xcf [new file with mode: 0644]
setup/data/tools/bitmaps/black.bmp [deleted file]
setup/data/tools/bitmaps/black.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_flipx.bmp [deleted file]
setup/data/tools/bitmaps/brush_flipx.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_flipy.bmp [deleted file]
setup/data/tools/bitmaps/brush_flipy.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_flipz.bmp [deleted file]
setup/data/tools/bitmaps/brush_flipz.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_rotatex.bmp [deleted file]
setup/data/tools/bitmaps/brush_rotatex.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_rotatey.bmp [deleted file]
setup/data/tools/bitmaps/brush_rotatey.png [new file with mode: 0644]
setup/data/tools/bitmaps/brush_rotatez.bmp [deleted file]
setup/data/tools/bitmaps/brush_rotatez.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_bevel.bmp [deleted file]
setup/data/tools/bitmaps/cap_bevel.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_curve.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_cylinder.bmp [deleted file]
setup/data/tools/bitmaps/cap_cylinder.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_endcap.bmp [deleted file]
setup/data/tools/bitmaps/cap_endcap.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_ibevel.bmp [deleted file]
setup/data/tools/bitmaps/cap_ibevel.png [new file with mode: 0644]
setup/data/tools/bitmaps/cap_iendcap.bmp [deleted file]
setup/data/tools/bitmaps/cap_iendcap.png [new file with mode: 0644]
setup/data/tools/bitmaps/console.bmp [deleted file]
setup/data/tools/bitmaps/console.png [new file with mode: 0644]
setup/data/tools/bitmaps/curve_cap.bmp [deleted file]
setup/data/tools/bitmaps/dontselectcurve.bmp [deleted file]
setup/data/tools/bitmaps/dontselectcurve.png [new file with mode: 0644]
setup/data/tools/bitmaps/dontselectmodel.bmp [deleted file]
setup/data/tools/bitmaps/dontselectmodel.png [new file with mode: 0644]
setup/data/tools/bitmaps/ellipsis.bmp [deleted file]
setup/data/tools/bitmaps/ellipsis.png [new file with mode: 0644]
setup/data/tools/bitmaps/entities.bmp [deleted file]
setup/data/tools/bitmaps/entities.png [new file with mode: 0644]
setup/data/tools/bitmaps/file_open.bmp [deleted file]
setup/data/tools/bitmaps/file_open.png [new file with mode: 0644]
setup/data/tools/bitmaps/file_save.bmp [deleted file]
setup/data/tools/bitmaps/file_save.png [new file with mode: 0644]
setup/data/tools/bitmaps/icon.bmp [deleted file]
setup/data/tools/bitmaps/icon.png [new file with mode: 0644]
setup/data/tools/bitmaps/lightinspector.bmp [deleted file]
setup/data/tools/bitmaps/lightinspector.png [new file with mode: 0644]
setup/data/tools/bitmaps/logo.bmp [deleted file]
setup/data/tools/bitmaps/logo.png [new file with mode: 0644]
setup/data/tools/bitmaps/modify_edges.bmp [deleted file]
setup/data/tools/bitmaps/modify_edges.png [new file with mode: 0644]
setup/data/tools/bitmaps/modify_faces.bmp [deleted file]
setup/data/tools/bitmaps/modify_faces.png [new file with mode: 0644]
setup/data/tools/bitmaps/modify_vertices.bmp [deleted file]
setup/data/tools/bitmaps/modify_vertices.png [new file with mode: 0644]
setup/data/tools/bitmaps/noFalloff.bmp [deleted file]
setup/data/tools/bitmaps/noFalloff.png [new file with mode: 0644]
setup/data/tools/bitmaps/notex.bmp [deleted file]
setup/data/tools/bitmaps/notex.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_bend.bmp [deleted file]
setup/data/tools/bitmaps/patch_bend.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_drilldown.bmp [deleted file]
setup/data/tools/bitmaps/patch_drilldown.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_insdel.bmp [deleted file]
setup/data/tools/bitmaps/patch_insdel.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_showboundingbox.bmp [deleted file]
setup/data/tools/bitmaps/patch_showboundingbox.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_weld.bmp [deleted file]
setup/data/tools/bitmaps/patch_weld.png [new file with mode: 0644]
setup/data/tools/bitmaps/patch_wireframe.bmp [deleted file]
setup/data/tools/bitmaps/patch_wireframe.png [new file with mode: 0644]
setup/data/tools/bitmaps/popup_selection.bmp [deleted file]
setup/data/tools/bitmaps/popup_selection.png [new file with mode: 0644]
setup/data/tools/bitmaps/redo.bmp [deleted file]
setup/data/tools/bitmaps/redo.png [new file with mode: 0644]
setup/data/tools/bitmaps/refresh_models.bmp [deleted file]
setup/data/tools/bitmaps/refresh_models.png [new file with mode: 0644]
setup/data/tools/bitmaps/scalelockx.bmp [deleted file]
setup/data/tools/bitmaps/scalelockx.png [new file with mode: 0644]
setup/data/tools/bitmaps/scalelocky.bmp [deleted file]
setup/data/tools/bitmaps/scalelocky.png [new file with mode: 0644]
setup/data/tools/bitmaps/scalelockz.bmp [deleted file]
setup/data/tools/bitmaps/scalelockz.png [new file with mode: 0644]
setup/data/tools/bitmaps/select_mouseresize.bmp [deleted file]
setup/data/tools/bitmaps/select_mouseresize.png [new file with mode: 0644]
setup/data/tools/bitmaps/select_mouserotate.bmp [deleted file]
setup/data/tools/bitmaps/select_mouserotate.png [new file with mode: 0644]
setup/data/tools/bitmaps/select_mousescale.bmp [deleted file]
setup/data/tools/bitmaps/select_mousescale.png [new file with mode: 0644]
setup/data/tools/bitmaps/select_mousetranslate.bmp [deleted file]
setup/data/tools/bitmaps/select_mousetranslate.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_csgmerge.bmp [deleted file]
setup/data/tools/bitmaps/selection_csgmerge.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_csgsubtract.bmp [deleted file]
setup/data/tools/bitmaps/selection_csgsubtract.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_makehollow.bmp [deleted file]
setup/data/tools/bitmaps/selection_makehollow.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_selectcompletetall.bmp [deleted file]
setup/data/tools/bitmaps/selection_selectcompletetall.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_selectcompletetall_old.bmp [deleted file]
setup/data/tools/bitmaps/selection_selectinside.bmp [deleted file]
setup/data/tools/bitmaps/selection_selectinside.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_selectpartialtall.bmp [deleted file]
setup/data/tools/bitmaps/selection_selectpartialtall.png [new file with mode: 0644]
setup/data/tools/bitmaps/selection_selectpartialtall_old.bmp [deleted file]
setup/data/tools/bitmaps/selection_selecttouching.bmp [deleted file]
setup/data/tools/bitmaps/selection_selecttouching.png [new file with mode: 0644]
setup/data/tools/bitmaps/shadernotex.bmp [deleted file]
setup/data/tools/bitmaps/shadernotex.png [new file with mode: 0644]
setup/data/tools/bitmaps/show_entities.bmp [deleted file]
setup/data/tools/bitmaps/show_entities.png [new file with mode: 0644]
setup/data/tools/bitmaps/splash.bmp [deleted file]
setup/data/tools/bitmaps/splash.png [new file with mode: 0644]
setup/data/tools/bitmaps/texture_browser.bmp [deleted file]
setup/data/tools/bitmaps/texture_browser.png [new file with mode: 0644]
setup/data/tools/bitmaps/texture_lock.bmp [deleted file]
setup/data/tools/bitmaps/texture_lock.png [new file with mode: 0644]
setup/data/tools/bitmaps/textures_popup.bmp [deleted file]
setup/data/tools/bitmaps/textures_popup.png [new file with mode: 0644]
setup/data/tools/bitmaps/undo.bmp [deleted file]
setup/data/tools/bitmaps/undo.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_cameratoggle.bmp [deleted file]
setup/data/tools/bitmaps/view_cameratoggle.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_cameraupdate.bmp [deleted file]
setup/data/tools/bitmaps/view_cameraupdate.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_change.bmp [deleted file]
setup/data/tools/bitmaps/view_change.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_clipper.bmp [deleted file]
setup/data/tools/bitmaps/view_clipper.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_cubicclipping.bmp [deleted file]
setup/data/tools/bitmaps/view_cubicclipping.png [new file with mode: 0644]
setup/data/tools/bitmaps/view_entity.bmp [deleted file]
setup/data/tools/bitmaps/view_entity.png [new file with mode: 0644]
setup/data/tools/bitmaps/white.bmp [deleted file]
setup/data/tools/bitmaps/white.png [new file with mode: 0644]
setup/data/tools/bitmaps/window1.bmp [deleted file]
setup/data/tools/bitmaps/window1.png [new file with mode: 0644]
setup/data/tools/bitmaps/window2.bmp [deleted file]
setup/data/tools/bitmaps/window2.png [new file with mode: 0644]
setup/data/tools/bitmaps/window3.bmp [deleted file]
setup/data/tools/bitmaps/window3.png [new file with mode: 0644]
setup/data/tools/bitmaps/window4.bmp [deleted file]
setup/data/tools/bitmaps/window4.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_caulk.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_caulk.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_dropent.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_dropent.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_merge.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_merge.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_poly.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_poly.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_split.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_split.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.bmp [deleted file]
setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_actorclip.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_actorclip.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level1.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level1.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level2.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level2.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level3.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level3.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level4.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level4.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level5.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level5.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level6.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level6.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level7.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level7.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_level8.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_level8.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_nodraw.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_nodraw.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_stepon.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_stepon.png [new file with mode: 0644]
setup/data/tools/plugins/bitmaps/ufoai_weaponclip.bmp [deleted file]
setup/data/tools/plugins/bitmaps/ufoai_weaponclip.png [new file with mode: 0644]
tools/quake3/common/imagelib.c
tools/quake3/common/imagelib.h
tools/quake3/common/threads.c
tools/quake3/q3map2/image.c
tools/quake3/q3map2/main.c

index bbcc964d9e1328ab6c845895f21643f7859bc5e5..250315188585b8595175591bba8efa14e8f801ff 100644 (file)
@@ -2,3 +2,4 @@
 .settings
 games
 install
+games
index 1fe334df7457a43184c1335cc3792db9e32e03fe..a68f3c61410274c1ff28c2ca7aa39b63908f5946 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -534,6 +534,7 @@ $(INSTALLDIR)/q3map2.$(EXE): \
        tools/quake3/q3map2/vis.o \
        tools/quake3/q3map2/writebsp.o \
        libddslib.$(A) \
+       libetclib.$(A) \
        libfilematch.$(A) \
        libl_net.$(A) \
        libmathlib.$(A) \
@@ -583,6 +584,10 @@ libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
 libddslib.$(A): \
        libs/ddslib/ddslib.o \
 
+libetclib.$(A): CPPFLAGS_EXTRA := -Ilibs
+libetclib.$(A): \
+       libs/etclib.o \
+
 $(INSTALLDIR)/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_ZLIB)
 $(INSTALLDIR)/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_ZLIB) -Itools/quake3/common -Ilibs -Iinclude
 $(INSTALLDIR)/q3data.$(EXE): \
@@ -607,6 +612,7 @@ $(INSTALLDIR)/q3data.$(EXE): \
        tools/quake3/q3data/stripper.o \
        tools/quake3/q3data/video.o \
        libfilematch.$(A) \
+       libetclib.$(A) \
        libl_net.$(A) \
        libmathlib.$(A) \
        $(if $(findstring $(OS),Win32),icons/q3data.o,) \
@@ -801,9 +807,11 @@ $(INSTALLDIR)/modules/image.$(DLL): \
        plugins/image/dds.o \
        plugins/image/image.o \
        plugins/image/jpeg.o \
+       plugins/image/ktx.o \
        plugins/image/pcx.o \
        plugins/image/tga.o \
        libddslib.$(A) \
+       libetclib.$(A) \
 
 $(INSTALLDIR)/modules/imageq2.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
 $(INSTALLDIR)/modules/imageq2.$(DLL): \
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp
deleted file mode 100644 (file)
index bc307e2..0000000
Binary files a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.bmp and /dev/null differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.png b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.png
new file mode 100644 (file)
index 0000000..895cdd8
Binary files /dev/null and b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_conf.png differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp
deleted file mode 100644 (file)
index d95fa28..0000000
Binary files a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.bmp and /dev/null differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.png b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.png
new file mode 100644 (file)
index 0000000..e03b63a
Binary files /dev/null and b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xy_toggle.png differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp
deleted file mode 100644 (file)
index 6af8308..0000000
Binary files a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.bmp and /dev/null differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.png b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.png
new file mode 100644 (file)
index 0000000..cbc9809
Binary files /dev/null and b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_xz_toggle.png differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp
deleted file mode 100644 (file)
index de9f4df..0000000
Binary files a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.bmp and /dev/null differ
diff --git a/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.png b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.png
new file mode 100644 (file)
index 0000000..8ecffa7
Binary files /dev/null and b/contrib/bkgrnd2d/bitmaps/bkgrnd2d_yz_toggle.png differ
index 447057110ad4d99fe5fcdebdb7eed55ba8a37473..35fb072071286131eff680f1ea983cd2e79c63b2 100644 (file)
@@ -107,28 +107,28 @@ struct toolbar_button_info_s
 struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
 {
        {
-               "bkgrnd2d_xy_toggle.bmp",
+               "bkgrnd2d_xy_toggle.png",
                "xy background",
                "Toggle xy background image",
                DoBkgrndToggleXY,
                IToolbarButton::eToggleButton
        },
        {
-               "bkgrnd2d_xz_toggle.bmp",
+               "bkgrnd2d_xz_toggle.png",
                "xz background",
                "Toggle xz background image",
                DoBkgrndToggleXZ,
                IToolbarButton::eToggleButton
        },
        {
-               "bkgrnd2d_yz_toggle.bmp",
+               "bkgrnd2d_yz_toggle.png",
                "yz background",
                "Toggle yz background image",
                DoBkgrndToggleYZ,
                IToolbarButton::eToggleButton
        },
        {
-               "bkgrnd2d_conf.bmp",
+               "bkgrnd2d_conf.png",
                "Configure",
                "Configure background images",
                ShowBackgroundDialog,
diff --git a/contrib/bobtoolz/bitmaps/README-bitmaps.txt b/contrib/bobtoolz/bitmaps/README-bitmaps.txt
new file mode 100644 (file)
index 0000000..48e7794
--- /dev/null
@@ -0,0 +1 @@
+bobtoolz bitmaps are in setup/data/tools/plugins/bitmaps 
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp
deleted file mode 100644 (file)
index 5223950..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_caulk.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp
deleted file mode 100644 (file)
index 33cc949..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_cleanup.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp
deleted file mode 100644 (file)
index 2fcdcba..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_dropent.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp
deleted file mode 100644 (file)
index cc5e272..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_merge.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp
deleted file mode 100644 (file)
index ed720e9..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_poly.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_split.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_split.bmp
deleted file mode 100644 (file)
index fbb1571..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_split.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp
deleted file mode 100644 (file)
index 66537dc..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_trainpathplot.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp
deleted file mode 100644 (file)
index 08f55f3..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_treeplanter.bmp and /dev/null differ
diff --git a/contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp b/contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp
deleted file mode 100644 (file)
index b72cb2a..0000000
Binary files a/contrib/bobtoolz/bitmaps/bobtoolz_turnedge.bmp and /dev/null differ
index d7893955406236a4c0ece233280a04b81ac89641..4eecfd92d5b210538188b3e91190826babe90f39 100644 (file)
@@ -166,20 +166,20 @@ class CBobtoolzToolbarButton : public IToolbarButton
 public:
 virtual const char* getImage() const {
        switch ( mIndex ) {
-       case 0: return "bobtoolz_cleanup.bmp";
-       case 1: return "bobtoolz_poly.bmp";
-       case 2: return "bobtoolz_caulk.bmp";
+       case 0: return "bobtoolz_cleanup.png";
+       case 1: return "bobtoolz_poly.png";
+       case 2: return "bobtoolz_caulk.png";
        case 3: return "";
-       case 4: return "bobtoolz_treeplanter.bmp";
-       case 5: return "bobtoolz_trainpathplot.bmp";
-       case 6: return "bobtoolz_dropent.bmp";
+       case 4: return "bobtoolz_treeplanter.png";
+       case 5: return "bobtoolz_trainpathplot.png";
+       case 6: return "bobtoolz_dropent.png";
        case 7: return "";
-       case 8: return "bobtoolz_merge.bmp";
-       case 9: return "bobtoolz_split.bmp";
-       case 10: return "bobtoolz_splitrow.bmp";
-       case 11: return "bobtoolz_splitcol.bmp";
+       case 8: return "bobtoolz_merge.png";
+       case 9: return "bobtoolz_split.png";
+       case 10: return "bobtoolz_splitrow.png";
+       case 11: return "bobtoolz_splitcol.png";
        case 12: return "";
-       case 13: return "bobtoolz_turnedge.bmp";
+       case 13: return "bobtoolz_turnedge.png";
        }
        return NULL;
 }
diff --git a/contrib/camera/bitmaps/camera_insp.bmp b/contrib/camera/bitmaps/camera_insp.bmp
deleted file mode 100644 (file)
index 1286716..0000000
Binary files a/contrib/camera/bitmaps/camera_insp.bmp and /dev/null differ
diff --git a/contrib/camera/bitmaps/camera_insp.png b/contrib/camera/bitmaps/camera_insp.png
new file mode 100644 (file)
index 0000000..fd9c24f
Binary files /dev/null and b/contrib/camera/bitmaps/camera_insp.png differ
index 5647f4c0f082f0bd683368eceb73f271b6c5b196..4e74460bae7327cf4e664d0e84e5aff98cb54496 100644 (file)
@@ -132,7 +132,7 @@ class CameraInspectorButton : public IToolbarButton
 {
 public:
 virtual const char* getImage() const {
-       return "camera_insp.bmp";
+       return "camera_insp.jpg";
 }
 virtual const char* getText() const {
        return "Inspector";
diff --git a/contrib/ufoaiplug/bitmaps/README-bitmaps.txt b/contrib/ufoaiplug/bitmaps/README-bitmaps.txt
new file mode 100644 (file)
index 0000000..575e508
--- /dev/null
@@ -0,0 +1 @@
+ufoaiplug bitmaps are in setup/data/tools/plugins/bitmaps 
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_actorclip.bmp b/contrib/ufoaiplug/bitmaps/ufoai_actorclip.bmp
deleted file mode 100644 (file)
index 43bdf93..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_actorclip.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level1.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level1.bmp
deleted file mode 100644 (file)
index 80a4b29..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level1.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level2.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level2.bmp
deleted file mode 100644 (file)
index e84e254..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level2.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level3.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level3.bmp
deleted file mode 100644 (file)
index 141c324..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level3.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level4.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level4.bmp
deleted file mode 100644 (file)
index 3783a80..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level4.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level5.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level5.bmp
deleted file mode 100644 (file)
index 8f62851..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level5.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level6.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level6.bmp
deleted file mode 100644 (file)
index 418fdd2..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level6.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level7.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level7.bmp
deleted file mode 100644 (file)
index d82dab6..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level7.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_level8.bmp b/contrib/ufoaiplug/bitmaps/ufoai_level8.bmp
deleted file mode 100644 (file)
index c380953..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_level8.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_nodraw.bmp b/contrib/ufoaiplug/bitmaps/ufoai_nodraw.bmp
deleted file mode 100644 (file)
index b994856..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_nodraw.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_stepon.bmp b/contrib/ufoaiplug/bitmaps/ufoai_stepon.bmp
deleted file mode 100644 (file)
index 828449e..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_stepon.bmp and /dev/null differ
diff --git a/contrib/ufoaiplug/bitmaps/ufoai_weaponclip.bmp b/contrib/ufoaiplug/bitmaps/ufoai_weaponclip.bmp
deleted file mode 100644 (file)
index fe6b348..0000000
Binary files a/contrib/ufoaiplug/bitmaps/ufoai_weaponclip.bmp and /dev/null differ
index c01a31fe721158748cda9cd267571fb59640f956..c547047431968301491b59ff066da872e697ab80 100644 (file)
@@ -88,18 +88,18 @@ public:
 virtual const char* getImage() const {
        switch ( mIndex )
        {
-       case 0: return "ufoai_level1.bmp";
-       case 1: return "ufoai_level2.bmp";
-       case 2: return "ufoai_level3.bmp";
-       case 3: return "ufoai_level4.bmp";
-       case 4: return "ufoai_level5.bmp";
-       case 5: return "ufoai_level6.bmp";
-       case 6: return "ufoai_level7.bmp";
-       case 7: return "ufoai_level8.bmp";
-       case 8: return "ufoai_stepon.bmp";
-       case 9: return "ufoai_actorclip.bmp";
-       case 10: return "ufoai_weaponclip.bmp";
-       case 11: return "ufoai_nodraw.bmp";
+       case 0: return "ufoai_level1.png";
+       case 1: return "ufoai_level2.png";
+       case 2: return "ufoai_level3.png";
+       case 3: return "ufoai_level4.png";
+       case 4: return "ufoai_level5.png";
+       case 5: return "ufoai_level6.png";
+       case 6: return "ufoai_level7.png";
+       case 7: return "ufoai_level8.png";
+       case 8: return "ufoai_stepon.png";
+       case 9: return "ufoai_actorclip.png";
+       case 10: return "ufoai_weaponclip.png";
+       case 11: return "ufoai_nodraw.png";
        }
        return NULL;
 }
index d573d60f3d599ded91989ae2d29016be82ee24ac..269d8c8a0069cd1afc5d35d8c656159da93542dc 100755 (executable)
@@ -153,10 +153,11 @@ pack OpenArenaPack   unknown     zip1   http://ingar.satgnu.net/files/gtkradiant
 pack OsirionPack     GPL         zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/OsirionPack.zip
 pack Q3Pack          proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
 pack Quake2Pack      proprietary zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake2Pack.zip
-pack Quake2WorldPack GPL         svn    svn://svn.icculus.org/gtkradiant-gamepacks/Q2WPack/branches/1.5/
 pack QuakePack       GPL         zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake1Pack.zip
+pack QuetooPack      GPL         svn    svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
 pack TremulousPack   proprietary zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/TremulousPack.zip
 pack UFOAIPack       proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
 #pack WarsowPack     GPL         svn    https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
-pack WarsowPack      GPL         zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/WarsowPack.zip
+#pack WarsowPack     GPL         zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/WarsowPack.zip
+pack WarsowPack      GPL         git    https://github.com/Warsow/NetRadiantPack.git
 pack XonoticPack     GPL         git    http://git.xonotic.org/xonotic/netradiant-xonoticpack.git
index 156333a17cd6d599f7eff919250005977da8d6dd..90a9048a61cd16b30a52ecdc3827b8567913686f 100644 (file)
@@ -82,6 +82,13 @@ inline int16_t istream_read_int16_le( InputStreamType& istream ){
        return value;
 }
 
+template<typename InputStreamType>
+inline int16_t istream_read_int16_be( InputStreamType& istream ){
+       int16_t value;
+       istream_read_big_endian( istream, value );
+       return value;
+}
+
 template<typename InputStreamType>
 inline uint16_t istream_read_uint16_le( InputStreamType& istream ){
        uint16_t value;
@@ -89,6 +96,13 @@ inline uint16_t istream_read_uint16_le( InputStreamType& istream ){
        return value;
 }
 
+template<typename InputStreamType>
+inline uint16_t istream_read_uint16_be( InputStreamType& istream ){
+       uint16_t value;
+       istream_read_big_endian( istream, value );
+       return value;
+}
+
 template<typename InputStreamType>
 inline int32_t istream_read_int32_le( InputStreamType& istream ){
        int32_t value;
@@ -96,6 +110,13 @@ inline int32_t istream_read_int32_le( InputStreamType& istream ){
        return value;
 }
 
+template<typename InputStreamType>
+inline int32_t istream_read_int32_be( InputStreamType& istream ){
+       int32_t value;
+       istream_read_big_endian( istream, value );
+       return value;
+}
+
 template<typename InputStreamType>
 inline uint32_t istream_read_uint32_le( InputStreamType& istream ){
        uint32_t value;
@@ -103,6 +124,13 @@ inline uint32_t istream_read_uint32_le( InputStreamType& istream ){
        return value;
 }
 
+template<typename InputStreamType>
+inline uint32_t istream_read_uint32_be( InputStreamType& istream ){
+       uint32_t value;
+       istream_read_big_endian( istream, value );
+       return value;
+}
+
 template<typename InputStreamType>
 inline float istream_read_float32_le( InputStreamType& istream ){
        float value;
@@ -110,6 +138,13 @@ inline float istream_read_float32_le( InputStreamType& istream ){
        return value;
 }
 
+template<typename InputStreamType>
+inline float istream_read_float32_be( InputStreamType& istream ){
+       float value;
+       istream_read_big_endian( istream, value );
+       return value;
+}
+
 template<typename InputStreamType>
 inline typename InputStreamType::byte_type istream_read_byte( InputStreamType& istream ){
        typename InputStreamType::byte_type b;
diff --git a/libs/etclib.c b/libs/etclib.c
new file mode 100644 (file)
index 0000000..09a149e
--- /dev/null
@@ -0,0 +1,114 @@
+// Copyright 2009 Google Inc.
+//
+// Based on the code from Android ETC1Util.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "etclib.h"
+
+static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){
+       int baseX = 0, baseY = 0;
+       const int modifierTable[] = {
+               2, 8, -2, -8,
+               5, 17, -5, -17,
+               9, 29, -9, -29,
+               13, 42, -13, -42,
+               18, 60, -18, -60,
+               24, 80, -24, -80,
+               33, 106, -33, -106,
+               47, 183, -47, -183
+       };
+       const int *table = modifierTable + tableIndex * 4;
+       int i;  
+
+       if ( second ) {
+               if ( flipped ) {
+                       baseY = 2;
+               }
+               else {
+                       baseX = 2;
+               }
+       }
+
+       for ( i = 0; i < 8; i++ )
+       {
+               int x, y, k, delta;
+               int qr, qg, qb;
+               byte *q;
+
+               if ( flipped ) {
+                       x = baseX + ( i >> 1 );
+                       y = baseY + ( i & 1 );
+               }
+               else {
+                       x = baseX + ( i >> 2 );
+                       y = baseY + ( i & 3 );
+               }
+               k = y + ( x * 4 );
+               delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )];
+
+               qr = r + delta;
+               qg = g + delta;
+               qb = b + delta;
+               if ( outRGBA ) {
+                       q = out + 4 * ( x + 4 * y );
+               }
+               else {
+                       q = out + 3 * ( x + 4 * y );
+               }
+               *( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 );
+               *( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 );
+               *( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 );
+               if ( outRGBA ) {
+                       *( q++ ) = 255;
+               }
+       }
+}
+
+void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){
+       unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3];
+       unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7];
+       int r1, r2, g1, g2, b1, b2;
+       qboolean flipped = ( ( high & 1 ) != 0 );
+
+       if ( high & 2 ) {
+               int rBase, gBase, bBase;
+               const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 };
+
+               rBase = ( high >> 27 ) & 31;
+               r1 = ( rBase << 3 ) | ( rBase >> 2 );
+               rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31;
+               r2 = ( rBase << 3 ) | ( rBase >> 2 );
+
+               gBase = ( high >> 19 ) & 31;
+               g1 = ( gBase << 3 ) | ( gBase >> 2 );
+               gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31;
+               g2 = ( gBase << 3 ) | ( gBase >> 2 );
+
+               bBase = ( high >> 11 ) & 31;
+               b1 = ( bBase << 3 ) | ( bBase >> 2 );
+               bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31;
+               b2 = ( bBase << 3 ) | ( bBase >> 2 );
+       }
+       else {
+               r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf );
+               r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf );
+               g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf );
+               g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf );
+               b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf );
+               b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf );
+       }
+
+       ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped );
+       ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped );
+}
diff --git a/libs/etclib.h b/libs/etclib.h
new file mode 100644 (file)
index 0000000..7d24074
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2009 Google Inc.
+//
+// Based on the code from Android ETC1Util.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef INCLUDED_ETCLIB_H
+#define INCLUDED_ETCLIB_H
+
+#include "bytebool.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 4605d3f5f9ad79548bb8315c533c0a6c7ee27e3a..b8cd7bef97fa1d958cf7eec2f55cea93b8db3324 100644 (file)
@@ -45,7 +45,7 @@ GdkPixbuf* pixbuf_new_from_file_with_mask( const char* filename ){
        }
        else
        {
-               GdkPixbuf* rgba = gdk_pixbuf_add_alpha( rgb, TRUE, 255, 0, 255 );
+               GdkPixbuf* rgba = gdk_pixbuf_add_alpha( rgb, FALSE, 255, 0, 255 );
                gdk_pixbuf_unref( rgb );
                return rgba;
        }
index c4e5ba3b2f20309c5e83c847ebcfcfba1f2318a8..1d9f5e0a7983216b7660f698ae2e28980b829701 100644 (file)
@@ -51,13 +51,22 @@ bool operator()( const CopiedString& shader, const CopiedString& other ) const {
 };
 
 static inline bool shader_is_diffuse( const char *shader ){
-       return !string_equal_suffix( shader, "_bump" )
-                  && !string_equal_suffix( shader, "_glow" )
-                  && !string_equal_suffix( shader, "_h" )
-                  && !string_equal_suffix( shader, "_local" )
-                  && !string_equal_suffix( shader, "_luma" )
-                  && !string_equal_suffix( shader, "_nm" )
-                  && !string_equal_suffix( shader, "_s" );
+       return
+               /* Quetoo */
+               !string_equal_suffix( shader, "_h" )
+               && !string_equal_suffix( shader, "_local" )
+               && !string_equal_suffix( shader, "_nm" )
+               && !string_equal_suffix( shader, "_s" )
+               /* DarkPlaces */
+               && !string_equal_suffix( shader, "_bump" )
+               && !string_equal_suffix( shader, "_glow" )
+               && !string_equal_suffix( shader, "_gloss" )
+               && !string_equal_suffix( shader, "_luma" )
+               && !string_equal_suffix( shader, "_norm" )
+               && !string_equal_suffix( shader, "_pants" )
+               && !string_equal_suffix( shader, "_shirt" )
+               && !string_equal_suffix( shader, "_reflect" )
+               ;
 }
 
 inline bool shader_valid( const char* shader ){
index fcfdd01875510561f8db08617b2cb2aec269d05a..4f3e07a8790d45716441d958796601ad7b95564e 100644 (file)
@@ -29,6 +29,7 @@
 #include "bmp.h"
 #include "pcx.h"
 #include "dds.h"
+#include "ktx.h"
 
 
 #include "modulesystem/singletonmodule.h"
@@ -137,6 +138,26 @@ typedef SingletonModule<ImageDDSAPI, ImageDependencies> ImageDDSModule;
 ImageDDSModule g_ImageDDSModule;
 
 
+class ImageKTXAPI
+{
+_QERPlugImageTable m_imagektx;
+public:
+typedef _QERPlugImageTable Type;
+STRING_CONSTANT( Name, "ktx" );
+
+ImageKTXAPI(){
+       m_imagektx.loadImage = LoadKTX;
+}
+_QERPlugImageTable* getTable(){
+       return &m_imagektx;
+}
+};
+
+typedef SingletonModule<ImageKTXAPI, ImageDependencies> ImageKTXModule;
+
+ImageKTXModule g_ImageKTXModule;
+
+
 extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){
        initialiseModule( server );
 
@@ -145,4 +166,5 @@ extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server
        g_ImageBMPModule.selfRegister();
        g_ImagePCXModule.selfRegister();
        g_ImageDDSModule.selfRegister();
+       g_ImageKTXModule.selfRegister();
 }
diff --git a/plugins/image/ktx.cpp b/plugins/image/ktx.cpp
new file mode 100644 (file)
index 0000000..582d0b8
--- /dev/null
@@ -0,0 +1,415 @@
+/*
+   Copyright (C) 2015, SiPlus, Chasseur de bots.
+   All Rights Reserved.
+
+   This file is part of GtkRadiant.
+
+   GtkRadiant is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GtkRadiant is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GtkRadiant; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "ktx.h"
+
+#include <string.h>
+
+#include "bytestreamutils.h"
+#include "etclib.h"
+#include "ifilesystem.h"
+#include "imagelib.h"
+
+
+#define KTX_TYPE_UNSIGNED_BYTE                         0x1401
+#define KTX_TYPE_UNSIGNED_SHORT_4_4_4_4                0x8033
+#define KTX_TYPE_UNSIGNED_SHORT_5_5_5_1                0x8034
+#define KTX_TYPE_UNSIGNED_SHORT_5_6_5          0x8363
+
+#define KTX_FORMAT_ALPHA                                       0x1906
+#define KTX_FORMAT_RGB                                         0x1907
+#define KTX_FORMAT_RGBA                                                0x1908
+#define KTX_FORMAT_LUMINANCE                           0x1909
+#define KTX_FORMAT_LUMINANCE_ALPHA                     0x190A
+#define KTX_FORMAT_BGR                                         0x80E0
+#define KTX_FORMAT_BGRA                                                0x80E1
+
+#define KTX_FORMAT_ETC1_RGB8                           0x8D64
+
+class KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ) = 0;
+       virtual unsigned int GetPixelSize() = 0;
+};
+
+class KTX_Decoder_A8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               out[0] = out[1] = out[2] = 0;
+               out[3] = istream_read_byte( istream );
+       }
+       virtual unsigned int GetPixelSize(){
+               return 1;
+       }
+};
+
+class KTX_Decoder_RGB8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               istream.read( out, 3 );
+               out[3] = 255;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 3;
+       }
+};
+
+class KTX_Decoder_RGBA8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               istream.read( out, 4 );
+       }
+       virtual unsigned int GetPixelSize(){
+               return 4;
+       }
+};
+
+class KTX_Decoder_L8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               byte l = istream_read_byte( istream );
+               out[0] = out[1] = out[2] = l;
+               out[3] = 255;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 1;
+       }
+};
+
+class KTX_Decoder_LA8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               byte la[2];
+               istream.read( la, 2 );
+               out[0] = out[1] = out[2] = la[0];
+               out[3] = la[1];
+       }
+       virtual unsigned int GetPixelSize(){
+               return 2;
+       }
+};
+
+class KTX_Decoder_BGR8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               byte bgr[3];
+               istream.read( bgr, 3 );
+               out[0] = bgr[2];
+               out[1] = bgr[1];
+               out[2] = bgr[0];
+               out[3] = 255;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 3;
+       }
+};
+
+class KTX_Decoder_BGRA8 : public KTX_Decoder
+{
+public:
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               byte bgra[4];
+               istream.read( bgra, 4 );
+               out[0] = bgra[2];
+               out[1] = bgra[1];
+               out[2] = bgra[0];
+               out[3] = bgra[3];
+       }
+       virtual unsigned int GetPixelSize(){
+               return 4;
+       }
+};
+
+class KTX_Decoder_RGBA4 : public KTX_Decoder
+{
+protected:
+       bool m_bigEndian;
+public:
+       KTX_Decoder_RGBA4( bool bigEndian ) : m_bigEndian( bigEndian ){}
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               uint16_t rgba;
+               if ( m_bigEndian ) {
+                       rgba = istream_read_uint16_be( istream );
+               }
+               else {
+                       rgba = istream_read_uint16_le( istream );
+               }
+               int r = ( rgba >> 12 ) & 0xf;
+               int g = ( rgba >> 8 ) & 0xf;
+               int b = ( rgba >> 4 ) & 0xf;
+               int a = rgba & 0xf;
+               out[0] = ( r << 4 ) | r;
+               out[1] = ( g << 4 ) | g;
+               out[2] = ( b << 4 ) | b;
+               out[3] = ( a << 4 ) | a;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 2;
+       }
+};
+
+class KTX_Decoder_RGBA5 : public KTX_Decoder
+{
+protected:
+       bool m_bigEndian;
+public:
+       KTX_Decoder_RGBA5( bool bigEndian ) : m_bigEndian( bigEndian ){}
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               uint16_t rgba;
+               if ( m_bigEndian ) {
+                       rgba = istream_read_uint16_be( istream );
+               }
+               else {
+                       rgba = istream_read_uint16_le( istream );
+               }
+               int r = ( rgba >> 11 ) & 0x1f;
+               int g = ( rgba >> 6 ) & 0x1f;
+               int b = ( rgba >> 1 ) & 0x1f;
+               out[0] = ( r << 3 ) | ( r >> 2 );
+               out[1] = ( g << 3 ) | ( g >> 2 );
+               out[2] = ( b << 3 ) | ( b >> 2 );
+               out[3] = ( rgba & 1 ) * 255;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 2;
+       }
+};
+
+class KTX_Decoder_RGB5 : public KTX_Decoder
+{
+protected:
+       bool m_bigEndian;
+public:
+       KTX_Decoder_RGB5( bool bigEndian ) : m_bigEndian( bigEndian ){}
+       virtual void Decode( PointerInputStream& istream, byte* out ){
+               uint16_t rgb;
+               if ( m_bigEndian ) {
+                       rgb = istream_read_uint16_be( istream );
+               }
+               else {
+                       rgb = istream_read_uint16_le( istream );
+               }
+               int r = ( rgb >> 11 ) & 0x1f;
+               int g = ( rgb >> 5 ) & 0x3f;
+               int b = rgb & 0x1f;
+               out[0] = ( r << 3 ) | ( r >> 2 );
+               out[1] = ( g << 2 ) | ( g >> 4 );
+               out[2] = ( b << 3 ) | ( b >> 2 );
+               out[3] = 255;
+       }
+       virtual unsigned int GetPixelSize(){
+               return 2;
+       }
+};
+
+static void KTX_DecodeETC1( PointerInputStream& istream, Image& image ){
+       unsigned int width = image.getWidth(), height = image.getHeight();
+       unsigned int stride = width * 4;
+       byte* pixbuf = image.getRGBAPixels();
+       byte etc[8], rgba[64];
+
+       for ( unsigned int y = 0; y < height; y += 4, pixbuf += stride * 4 )
+       {
+               unsigned int blockrows = height - y;
+               if ( blockrows > 4 ) {
+                       blockrows = 4;
+               }
+
+               byte* p = pixbuf;
+               for ( unsigned int x = 0; x < width; x += 4, p += 16 )
+               {
+                       istream.read( etc, 8 );
+                       ETC_DecodeETC1Block( etc, rgba, qtrue );
+
+                       unsigned int blockrowsize = width - x;
+                       if ( blockrowsize > 4 ) {
+                               blockrowsize = 4;
+                       }
+                       blockrowsize *= 4;
+                       for ( unsigned int blockrow = 0; blockrow < blockrows; blockrow++ )
+                       {
+                               memcpy( p + blockrow * stride, rgba + blockrow * 16, blockrowsize );
+                       }
+               }
+       }
+}
+
+Image* LoadKTXBuff( PointerInputStream& istream ){
+       byte identifier[12];
+       istream.read( identifier, 12 );
+       if ( memcmp( identifier, "\xABKTX 11\xBB\r\n\x1A\n", 12 ) ) {
+               globalErrorStream() << "LoadKTX: Image has the wrong identifier\n";
+               return 0;
+       }
+
+       bool bigEndian = ( istream_read_uint32_le( istream ) == 0x01020304 );
+
+       unsigned int type;
+       if ( bigEndian ) {
+               type = istream_read_uint32_be( istream );
+       }
+       else {
+               type = istream_read_uint32_le( istream );
+       }
+
+       // For compressed textures, the format is in glInternalFormat.
+       // For uncompressed textures, it's in glBaseInternalFormat.
+       istream.seek( ( type ? 3 : 2 ) * sizeof( uint32_t ) );
+       unsigned int format;
+       if ( bigEndian ) {
+               format = istream_read_uint32_be( istream );
+       }
+       else {
+               format = istream_read_uint32_le( istream );
+       }
+       if ( !type ) {
+               istream.seek( sizeof( uint32_t ) );
+       }
+
+       unsigned int width, height;
+       if ( bigEndian ) {
+               width = istream_read_uint32_be( istream );
+               height = istream_read_uint32_be( istream );
+       }
+       else {
+               width = istream_read_uint32_le( istream );
+               height = istream_read_uint32_le( istream );
+       }
+       if ( !width ) {
+               globalErrorStream() << "LoadKTX: Image has zero width\n";
+               return 0;
+       }
+       if ( !height ) {
+               height = 1;
+       }
+
+       // Skip the key/values and load the first 2D image in the texture.
+       // Since KTXorientation is only a hint and has no effect on the texture data and coordinates, it must be ignored.
+       istream.seek( 4 * sizeof( uint32_t ) );
+       unsigned int bytesOfKeyValueData;
+       if ( bigEndian ) {
+               bytesOfKeyValueData = istream_read_uint32_be( istream );
+       }
+       else {
+               bytesOfKeyValueData = istream_read_uint32_le( istream );
+       }
+       istream.seek( bytesOfKeyValueData + sizeof( uint32_t ) );
+
+       RGBAImage* image = new RGBAImage( width, height );
+
+       if ( type ) {
+               KTX_Decoder* decoder = NULL;
+               switch ( type )
+               {
+               case KTX_TYPE_UNSIGNED_BYTE:
+                       switch ( format )
+                       {
+                       case KTX_FORMAT_ALPHA:
+                               decoder = new KTX_Decoder_A8();
+                               break;
+                       case KTX_FORMAT_RGB:
+                               decoder = new KTX_Decoder_RGB8();
+                               break;
+                       case KTX_FORMAT_RGBA:
+                               decoder = new KTX_Decoder_RGBA8();
+                               break;
+                       case KTX_FORMAT_LUMINANCE:
+                               decoder = new KTX_Decoder_L8();
+                               break;
+                       case KTX_FORMAT_LUMINANCE_ALPHA:
+                               decoder = new KTX_Decoder_LA8();
+                               break;
+                       case KTX_FORMAT_BGR:
+                               decoder = new KTX_Decoder_BGR8();
+                               break;
+                       case KTX_FORMAT_BGRA:
+                               decoder = new KTX_Decoder_BGRA8();
+                               break;
+                       }
+                       break;
+               case KTX_TYPE_UNSIGNED_SHORT_4_4_4_4:
+                       if ( format == KTX_FORMAT_RGBA ) {
+                               decoder = new KTX_Decoder_RGBA4( bigEndian );
+                       }
+                       break;
+               case KTX_TYPE_UNSIGNED_SHORT_5_5_5_1:
+                       if ( format == KTX_FORMAT_RGBA ) {
+                               decoder = new KTX_Decoder_RGBA5( bigEndian );
+                       }
+                       break;
+               case KTX_TYPE_UNSIGNED_SHORT_5_6_5:
+                       if ( format == KTX_FORMAT_RGB ) {
+                               decoder = new KTX_Decoder_RGB5( bigEndian );
+                       }
+                       break;
+               }
+
+               if ( !decoder ) {
+                       globalErrorStream() << "LoadKTX: Image has an unsupported pixel type " << type << " or format " << format << "\n";
+                       image->release();
+                       return 0;
+               }
+
+               unsigned int inRowLength = width * decoder->GetPixelSize();
+               unsigned int inPadding = ( ( inRowLength + 3 ) & ~3 ) - inRowLength;
+               byte* out = image->getRGBAPixels();
+               for ( unsigned int y = 0; y < height; y++ )
+               {
+                       for ( unsigned int x = 0; x < width; x++, out += 4 )
+                       {
+                               decoder->Decode( istream, out );
+                       }
+
+                       if ( inPadding ) {
+                               istream.seek( inPadding );
+                       }
+               }
+
+               delete decoder;
+       }
+       else {
+               switch ( format )
+               {
+               case KTX_FORMAT_ETC1_RGB8:
+                       KTX_DecodeETC1( istream, *image );
+                       break;
+               default:
+                       globalErrorStream() << "LoadKTX: Image has an unsupported compressed format " << format << "\n";
+                       image->release();
+                       return 0;
+               }
+       }
+
+       return image;
+}
+
+Image* LoadKTX( ArchiveFile& file ){
+       ScopedArchiveBuffer buffer( file );
+       PointerInputStream istream( buffer.buffer );
+       return LoadKTXBuff( istream );
+}
diff --git a/plugins/image/ktx.h b/plugins/image/ktx.h
new file mode 100644 (file)
index 0000000..6070077
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+   Copyright (C) 2015, SiPlus, Chasseur de bots.
+   All Rights Reserved.
+
+   This file is part of GtkRadiant.
+
+   GtkRadiant is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GtkRadiant is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GtkRadiant; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#if !defined( INCLUDED_KTX_H )
+#define INCLUDED_KTX_H
+
+class Image;
+class ArchiveFile;
+
+Image* LoadKTX( ArchiveFile& file );
+
+#endif
index bc498a8fff6972afae3c6e4597492d68fb617c49..4fa8731f5a3b7600ead4d9e16982b0002567bb58 100644 (file)
@@ -165,6 +165,42 @@ inline TargaPacketSize targa_packet_size( const TargaPacket& packet ){
 }
 
 
+class TargaDecodeGrayPixelRLE
+{
+TargaPacketSize m_packetSize;
+RGBAPixel m_pixel;
+TargaPacket m_packet;
+public:
+TargaDecodeGrayPixelRLE() : m_packetSize( 0 ){
+}
+void operator()( PointerInputStream& istream, RGBAPixel& pixel ){
+       if ( m_packetSize == 0 ) {
+               targa_packet_read_istream( m_packet, istream );
+               m_packetSize = targa_packet_size( m_packet );
+
+               if ( targa_packet_is_rle( m_packet ) ) {
+                       istream_read_gray( istream, m_pixel );
+               }
+       }
+
+       if ( targa_packet_is_rle( m_packet ) ) {
+               pixel = m_pixel;
+       }
+       else
+       {
+               istream_read_gray( istream, pixel );
+       }
+
+       --m_packetSize;
+}
+};
+
+template<typename Flip>
+void targa_decode_rle_grayscale( PointerInputStream& istream, RGBAImage& image, const Flip& flip ){
+       TargaDecodeGrayPixelRLE decode;
+       image_decode( istream, decode, image, flip );
+}
+
 class TargaDecodeRGBPixelRLE
 {
 TargaPacketSize m_packetSize;
@@ -305,9 +341,12 @@ Image* Targa_decodeImageData( const TargaHeader& targa_header, PointerInputStrea
                        return 0;
                }
        }
-       else if ( targa_header.image_type == 10 ) {
+       else if ( targa_header.image_type == 10 || targa_header.image_type == 11 ) {
                switch ( targa_header.pixel_size )
                {
+               case 8:
+                       targa_decode_rle_grayscale( istream, *image, flip );
+                       break;
                case 24:
                        targa_decode_rle_rgb( istream, *image, flip );
                        break;
@@ -333,9 +372,9 @@ Image* LoadTGABuff( const byte* buffer ){
 
        targa_header_read_istream( targa_header, istream );
 
-       if ( targa_header.image_type != 2 && targa_header.image_type != 10 && targa_header.image_type != 3 ) {
+       if ( targa_header.image_type != 2 && targa_header.image_type != 10 && targa_header.image_type != 3 && targa_header.image_type != 11 ) {
                globalErrorStream() << "LoadTGA: TGA type " << targa_header.image_type << " not supported\n";
-               globalErrorStream() << "LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported\n";
+               globalErrorStream() << "LoadTGA: Only type 2 (RGB), 3 (gray), 10 (RGB), and 11 (gray) TGA images supported\n";
                return 0;
        }
 
@@ -344,9 +383,9 @@ Image* LoadTGABuff( const byte* buffer ){
                return 0;
        }
 
-       if ( ( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 )
-                && targa_header.image_type != 3 ) {
-               globalErrorStream() << "LoadTGA: Only 32 or 24 bit images supported\n";
+       if ( ( ( targa_header.image_type == 2 || targa_header.image_type == 10 ) && targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) ||
+            ( ( targa_header.image_type == 3 || targa_header.image_type == 11 ) && targa_header.pixel_size != 8 ) ) {
+               globalErrorStream() << "LoadTGA: Only 32, 24 or 8 bit images supported\n";
                return 0;
        }
 
index 3f2cc48351fc6d4780ef16caa5a7d209ac9ece4d..ee021936d5611d7304b17e1a2adcd5f7dcd00fc0 100644 (file)
@@ -41,7 +41,7 @@ class ShadersDependencies :
 ImageModuleRef m_bitmapModule;
 public:
 ShadersDependencies() :
-       m_bitmapModule( "bmp" ){
+       m_bitmapModule( "png" ){
 }
 ImageModuleRef& getBitmapModule(){
        return m_bitmapModule;
index 54df7abc499c4658c464d4f068bf9e2d4a49051a..a7a3078dbbde5f319d21b777f7fde25ad25184e3 100644 (file)
@@ -207,7 +207,7 @@ Image* loadHeightmap( void* environment, const char* name ){
 Image* loadSpecial( void* environment, const char* name ){
        if ( *name == '_' ) { // special image
                StringOutputStream bitmapName( 256 );
-               bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".bmp";
+               bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".png";
                Image* image = loadBitmap( environment, bitmapName.c_str() );
                if ( image != 0 ) {
                        return image;
@@ -951,7 +951,7 @@ void realise(){
 
                {
                        StringOutputStream name( 256 );
-                       name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.bmp" : "shadernotex.bmp" );
+                       name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.png" : "shadernotex.png" );
                        m_pTexture = GlobalTexturesCache().capture( LoadImageCallback( 0, loadBitmap ), name.c_str() );
                }
        }
index de2e03e0e1b438b6a514d9754e0aa05ae8ed17c7..9e97ce966e39ea4a49b1e3a014ac28d4266a2c0a 100644 (file)
@@ -1664,7 +1664,7 @@ void Camera_ToggleFarClip(){
 
 
 void CamWnd_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (\\)", "view_cubicclipping.bmp", "ToggleCubicClip" );
+       toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (\\)", "view_cubicclipping.png", "ToggleCubicClip" );
 }
 
 void CamWnd_registerShortcuts(){
index 620cc276808309c33c868327dfb7e8e78aa30c62..f9598e4b9d094707ff541de9b505474350be745c 100644 (file)
@@ -502,7 +502,9 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){
                else
                {
                        CopiedString tmp( key );
-                       ASSERT_MESSAGE( !string_equal_n( key, "editor_", 7 ), "unsupported editor key: " << makeQuoted( key ) );
+                       if ( string_equal_n( key, "editor_", 7 ) ) {
+                               globalErrorStream() << "unsupported editor key " << makeQuoted( key ) ;
+                       }
                        EntityClassAttribute& attribute = EntityClass_insertAttribute( entityClass, key ).second;
                        attribute.m_type = "string";
                        const char* value;
index 9583b90fbc3761fff1e41f25be173f376aec0401..954847eba3bbb0a6e8ca0f582a579676e440f483 100644 (file)
@@ -136,8 +136,8 @@ void gamedetect(){
 #endif
                        { return; }
 
-                       // try to detect Q2World installs
-                       if ( gamedetect_check_game( "q2w.game", "default/quake2world.version", NULL, buf, p - buf ) ) {
+                       // try to detect Quetoo installs
+                       if ( gamedetect_check_game( "quetoo.game", "default/icons/quetoo.png", NULL, buf, p - buf ) ) {
                                return;
                        }
 
index 34fc54c7a80e1a4ecd9884a4d699a22986a32f3c..daa0f31c5f1be2b3e3d7f65740df5dd8febe6e23 100644 (file)
@@ -465,7 +465,7 @@ void DoAbout(){
                                        GtkFrame* frame = create_dialog_frame( 0, GTK_SHADOW_IN );
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
                                        {
-                                               GtkImage* image = new_local_image( "logo.bmp" );
+                                               GtkImage* image = new_local_image( "logo.png" );
                                                gtk_widget_show( GTK_WIDGET( image ) );
                                                gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( image ) );
                                        }
index a9c970723648708e88cf2b54ecb2074605e29566..a91dccdd93f8245ba377fc7b9b5ba71436ac142e 100644 (file)
@@ -2207,10 +2207,10 @@ void PatchInspector_registerShortcuts(){
 void Patch_registerShortcuts(){
        command_connect_accelerator( "InvertCurveTextureX" );
        command_connect_accelerator( "InvertCurveTextureY" );
-       command_connect_accelerator( "IncPatchColumn" );
-       command_connect_accelerator( "IncPatchRow" );
-       command_connect_accelerator( "DecPatchColumn" );
-       command_connect_accelerator( "DecPatchRow" );
+       command_connect_accelerator( "PatchInsertInsertColumn" );
+       command_connect_accelerator( "PatchInsertInsertRow" );
+       command_connect_accelerator( "PatchDeleteLastColumn" );
+       command_connect_accelerator( "PatchDeleteLastRow" );
        command_connect_accelerator( "NaturalizePatch" );
        //command_connect_accelerator("CapCurrentCurve");
 }
@@ -2273,55 +2273,55 @@ void register_shortcuts(){
 }
 
 void File_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "Open an existing map (CTRL + O)", "file_open.bmp", "OpenMap" );
-       toolbar_append_button( toolbar, "Save the active map (CTRL + S)", "file_save.bmp", "SaveMap" );
+       toolbar_append_button( toolbar, "Open an existing map (CTRL + O)", "file_open.png", "OpenMap" );
+       toolbar_append_button( toolbar, "Save the active map (CTRL + S)", "file_save.png", "SaveMap" );
 }
 
 void UndoRedo_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "Undo (CTRL + Z)", "undo.bmp", "Undo" );
-       toolbar_append_button( toolbar, "Redo (CTRL + Y)", "redo.bmp", "Redo" );
+       toolbar_append_button( toolbar, "Undo (CTRL + Z)", "undo.png", "Undo" );
+       toolbar_append_button( toolbar, "Redo (CTRL + Y)", "redo.png", "Redo" );
 }
 
 void RotateFlip_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "x-axis Flip", "brush_flipx.bmp", "MirrorSelectionX" );
-       toolbar_append_button( toolbar, "x-axis Rotate", "brush_rotatex.bmp", "RotateSelectionX" );
-       toolbar_append_button( toolbar, "y-axis Flip", "brush_flipy.bmp", "MirrorSelectionY" );
-       toolbar_append_button( toolbar, "y-axis Rotate", "brush_rotatey.bmp", "RotateSelectionY" );
-       toolbar_append_button( toolbar, "z-axis Flip", "brush_flipz.bmp", "MirrorSelectionZ" );
-       toolbar_append_button( toolbar, "z-axis Rotate", "brush_rotatez.bmp", "RotateSelectionZ" );
+       toolbar_append_button( toolbar, "x-axis Flip", "brush_flipx.png", "MirrorSelectionX" );
+       toolbar_append_button( toolbar, "x-axis Rotate", "brush_rotatex.png", "RotateSelectionX" );
+       toolbar_append_button( toolbar, "y-axis Flip", "brush_flipy.png", "MirrorSelectionY" );
+       toolbar_append_button( toolbar, "y-axis Rotate", "brush_rotatey.png", "RotateSelectionY" );
+       toolbar_append_button( toolbar, "z-axis Flip", "brush_flipz.png", "MirrorSelectionZ" );
+       toolbar_append_button( toolbar, "z-axis Rotate", "brush_rotatez.png", "RotateSelectionZ" );
 }
 
 void Select_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "Select touching", "selection_selecttouching.bmp", "SelectTouching" );
-       toolbar_append_button( toolbar, "Select inside", "selection_selectinside.bmp", "SelectInside" );
+       toolbar_append_button( toolbar, "Select touching", "selection_selecttouching.png", "SelectTouching" );
+       toolbar_append_button( toolbar, "Select inside", "selection_selectinside.png", "SelectInside" );
 }
 
 void CSG_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "CSG Subtract (SHIFT + U)", "selection_csgsubtract.bmp", "CSGSubtract" );
-       toolbar_append_button( toolbar, "CSG Merge (CTRL + U)", "selection_csgmerge.bmp", "CSGMerge" );
-       toolbar_append_button( toolbar, "Hollow", "selection_makehollow.bmp", "CSGHollow" );
+       toolbar_append_button( toolbar, "CSG Subtract (SHIFT + U)", "selection_csgsubtract.png", "CSGSubtract" );
+       toolbar_append_button( toolbar, "CSG Merge (CTRL + U)", "selection_csgmerge.png", "CSGMerge" );
+       toolbar_append_button( toolbar, "Hollow", "selection_makehollow.png", "CSGHollow" );
 }
 
 void ComponentModes_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_toggle_button( toolbar, "Select Vertices (V)", "modify_vertices.bmp", "DragVertices" );
-       toolbar_append_toggle_button( toolbar, "Select Edges (E)", "modify_edges.bmp", "DragEdges" );
-       toolbar_append_toggle_button( toolbar, "Select Faces (F)", "modify_faces.bmp", "DragFaces" );
+       toolbar_append_toggle_button( toolbar, "Select Vertices (V)", "modify_vertices.png", "DragVertices" );
+       toolbar_append_toggle_button( toolbar, "Select Edges (E)", "modify_edges.png", "DragEdges" );
+       toolbar_append_toggle_button( toolbar, "Select Faces (F)", "modify_faces.png", "DragFaces" );
 }
 
 void Clipper_constructToolbar( GtkToolbar* toolbar ){
 
-       toolbar_append_toggle_button( toolbar, "Clipper (X)", "view_clipper.bmp", "ToggleClipper" );
+       toolbar_append_toggle_button( toolbar, "Clipper (X)", "view_clipper.png", "ToggleClipper" );
 }
 
 void XYWnd_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "Change views", "view_change.bmp", "NextView" );
+       toolbar_append_button( toolbar, "Change views", "view_change.png", "NextView" );
 }
 
 void Manipulators_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_toggle_button( toolbar, "Translate (W)", "select_mousetranslate.bmp", "MouseTranslate" );
-       toolbar_append_toggle_button( toolbar, "Rotate (R)", "select_mouserotate.bmp", "MouseRotate" );
-       toolbar_append_toggle_button( toolbar, "Scale", "select_mousescale.bmp", "MouseScale" );
-       toolbar_append_toggle_button( toolbar, "Resize (Q)", "select_mouseresize.bmp", "MouseDrag" );
+       toolbar_append_toggle_button( toolbar, "Translate (W)", "select_mousetranslate.png", "MouseTranslate" );
+       toolbar_append_toggle_button( toolbar, "Rotate (R)", "select_mouserotate.png", "MouseRotate" );
+       toolbar_append_toggle_button( toolbar, "Scale", "select_mousescale.png", "MouseScale" );
+       toolbar_append_toggle_button( toolbar, "Resize (Q)", "select_mouseresize.png", "MouseDrag" );
 
        Clipper_constructToolbar( toolbar );
 }
@@ -2377,18 +2377,18 @@ GtkToolbar* create_main_toolbar( MainFrame::EViewStyle style ){
 
        gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
 
-       toolbar_append_toggle_button( toolbar, "Texture Lock (SHIFT +T)", "texture_lock.bmp", "TogTexLock" );
+       toolbar_append_toggle_button( toolbar, "Texture Lock (SHIFT +T)", "texture_lock.png", "TogTexLock" );
 
        gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
 
-       GtkButton* g_view_entities_button = toolbar_append_button( toolbar, "Entities (N)", "entities.bmp", "ToggleEntityInspector" );
-       GtkButton* g_view_console_button = toolbar_append_button( toolbar, "Console (O)", "console.bmp", "ToggleConsole" );
-       GtkButton* g_view_textures_button = toolbar_append_button( toolbar, "Texture Browser (T)", "texture_browser.bmp", "ToggleTextures" );
+       GtkButton* g_view_entities_button = toolbar_append_button( toolbar, "Entities (N)", "entities.png", "ToggleEntityInspector" );
+       GtkButton* g_view_console_button = toolbar_append_button( toolbar, "Console (O)", "console.png", "ToggleConsole" );
+       GtkButton* g_view_textures_button = toolbar_append_button( toolbar, "Texture Browser (T)", "texture_browser.png", "ToggleTextures" );
        // TODO: call light inspector
-       //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.bmp", "ToggleLightInspector");
+       //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.png", "ToggleLightInspector");
 
        gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
-       GtkButton* g_refresh_models_button = toolbar_append_button( toolbar, "Refresh Models", "refresh_models.bmp", "RefreshReferences" );
+       GtkButton* g_refresh_models_button = toolbar_append_button( toolbar, "Refresh Models", "refresh_models.png", "RefreshReferences" );
 
 
        // disable the console and texture button in the regular layouts
@@ -2680,7 +2680,7 @@ GtkWindow* create_splash(){
        gtk_window_set_position( window, GTK_WIN_POS_CENTER );
        gtk_container_set_border_width( GTK_CONTAINER( window ), 0 );
 
-       GtkImage* image = new_local_image( "splash.bmp" );
+       GtkImage* image = new_local_image( "splash.png" );
        gtk_widget_show( GTK_WIDGET( image ) );
        gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( image ) );
 
@@ -2724,7 +2724,7 @@ void MainFrame::Create(){
 
 #if !defined( WIN32 )
        {
-               GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.bmp" );
+               GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.png" );
                if ( pixbuf != 0 ) {
                        gtk_window_set_icon( window, pixbuf );
                        gdk_pixbuf_unref( pixbuf );
@@ -3140,7 +3140,7 @@ void GlobalGL_sharedContextDestroyed(){
 
 void Layout_constructPreferences( PreferencesPage& page ){
        {
-               const char* layouts[] = { "window1.bmp", "window2.bmp", "window3.bmp", "window4.bmp" };
+               const char* layouts[] = { "window1.png", "window2.png", "window3.png", "window4.png" };
                page.appendRadioIcons(
                        "Window Layout",
                        STRING_ARRAY_RANGE( layouts ),
index daa79f65e5337bb8ec6850345f8777ae44a53867..73639e5463756bf4b3686d29b0b48d7662d5b71f 100644 (file)
@@ -376,29 +376,27 @@ void Scene_PatchTileTexture_Selected( scene::Graph& graph, float s, float t ){
 }
 
 static void OnBtnPatchdetails( GtkWidget *widget, gpointer data ){
-       UndoableCommand command( "patchCapTexture" );
-
-       Scene_PatchCapTexture_Selected( GlobalSceneGraph() );
+       Patch_CapTexture();
 }
 
 static void OnBtnPatchfit( GtkWidget *widget, gpointer data ){
-       UndoableCommand command( "patchFitTexture" );
-
-       Scene_PatchTileTexture_Selected( GlobalSceneGraph(), 1, 1 );
+       Patch_FitTexture();
 }
 
 static void OnBtnPatchnatural( GtkWidget *widget, gpointer data ){
-       UndoableCommand command( "patchNaturalTexture" );
-
-       Scene_PatchNaturalTexture_Selected( GlobalSceneGraph() );
+       Patch_NaturalTexture();
 }
 
 static void OnBtnPatchreset( GtkWidget *widget, gpointer data ){
-       float fx, fy;
-       if ( DoTextureLayout( &fx, &fy ) == eIDOK ) {
-               UndoableCommand command( "patchTileTexture" );
-               Scene_PatchTileTexture_Selected( GlobalSceneGraph(), fx, fy );
-       }
+       Patch_ResetTexture();
+}
+
+static void OnBtnPatchFlipX( GtkWidget *widget, gpointer data ){
+       Patch_FlipTextureX();
+}
+
+static void OnBtnPatchFlipY( GtkWidget *widget, gpointer data ){
+       Patch_FlipTextureY();
 }
 
 struct PatchRotateTexture
@@ -457,6 +455,10 @@ void Scene_PatchTranslateTexture_Selected( scene::Graph& graph, float s, float t
        Scene_forEachVisibleSelectedPatch( PatchTranslateTexture( s, t ) );
 }
 
+static void OnBtnPatchAutoCap( GtkWidget *widget, gpointer data ){
+       Patch_AutoCapTexture();
+}
+
 static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){
        texdef_t td;
 
@@ -825,7 +827,7 @@ GtkWindow* PatchInspector::BuildDialog(){
                                                g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
                                        }
                                        {
-                                               GtkTable* table = GTK_TABLE( gtk_table_new( 5, 3, FALSE ) );
+                                               GtkTable* table = GTK_TABLE( gtk_table_new( 5, 4, FALSE ) );
                                                gtk_widget_show( GTK_WIDGET( table ) );
                                                gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
                                                gtk_table_set_row_spacings( table, 5 );
@@ -833,16 +835,16 @@ GtkWindow* PatchInspector::BuildDialog(){
                                                {
                                                        GtkLabel* label = GTK_LABEL( gtk_label_new( "Horizontal Shift Step" ) );
                                                        gtk_widget_show( GTK_WIDGET( label ) );
-                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 0, 1,
-                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 0, 1,
+                                                                                         (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
                                                {
                                                        GtkLabel* label = GTK_LABEL( gtk_label_new( "Vertical Shift Step" ) );
                                                        gtk_widget_show( GTK_WIDGET( label ) );
-                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 1, 2,
-                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 1, 2,
+                                                                                         (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
@@ -850,23 +852,41 @@ GtkWindow* PatchInspector::BuildDialog(){
                                                        GtkLabel* label = GTK_LABEL( gtk_label_new( "Horizontal Stretch Step" ) );
                                                        gtk_widget_show( GTK_WIDGET( label ) );
                                                        gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 2, 3,
-                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                                                         (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
+                                               {
+                                                       GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Flip" ) );
+                                                       gtk_widget_show( GTK_WIDGET( button ) );
+                                                       gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 2, 3,
+                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                                                         (GtkAttachOptions)( 0 ), 0, 0 );
+                                                       g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchFlipX ), 0 );
+                                                       gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
+                                               }
                                                {
                                                        GtkLabel* label = GTK_LABEL( gtk_label_new( "Vertical Stretch Step" ) );
                                                        gtk_widget_show( GTK_WIDGET( label ) );
                                                        gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 3, 4,
-                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                                                         (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
+                                               {
+                                                       GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Flip" ) );
+                                                       gtk_widget_show( GTK_WIDGET( button ) );
+                                                       gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 3, 4,
+                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                                                         (GtkAttachOptions)( 0 ), 0, 0 );
+                                                       g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchFlipY ), 0 );
+                                                       gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
+                                               }
                                                {
                                                        GtkLabel* label = GTK_LABEL( gtk_label_new( "Rotate Step" ) );
                                                        gtk_widget_show( GTK_WIDGET( label ) );
-                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 4, 5,
-                                                                                         (GtkAttachOptions)( GTK_FILL ),
+                                                       gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 4, 5,
+                                                                                         (GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
@@ -982,6 +1002,13 @@ GtkWindow* PatchInspector::BuildDialog(){
                                        GtkHBox* hbox2 = GTK_HBOX( gtk_hbox_new( TRUE, 5 ) );
                                        gtk_widget_show( GTK_WIDGET( hbox2 ) );
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 );
+                                       {
+                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Auto Cap" ) );
+                                               gtk_widget_show( GTK_WIDGET( button ) );
+                                               gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
+                                               g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 );
+                                               gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
+                                       }
                                        {
                                                GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "CAP" ) );
                                                gtk_widget_show( GTK_WIDGET( button ) );
index d5471e98313b49a89f9735313759c9446043f411..909e3466311f966e23e11e9af66ddea22f221764 100644 (file)
@@ -67,6 +67,32 @@ void Scene_PatchConstructPrefab( scene::Graph& graph, const AABB aabb, const cha
        }
 }
 
+void PatchAutoCapTexture( Patch& patch ) {
+
+       AABB box = patch.localAABB();
+       float x = box.extents.x();
+       float y = box.extents.y();
+       float z = box.extents.z();
+
+       int cap_direction = -1;
+       if ( x < y  && x < z )
+               cap_direction = 0;
+       else if ( y < x  && y < z )
+               cap_direction = 1;
+       else if ( z < x  && z < x )
+               cap_direction = 2;
+
+       if ( cap_direction >= 0 )
+               patch.ProjectTexture(cap_direction);
+       else
+               patch.NaturalTexture();
+}
+
+void Patch_AutoCapTexture(){
+       UndoableCommand command( "patchAutoCapTexture" );
+       Scene_forEachVisibleSelectedPatch( &PatchAutoCapTexture );
+       SceneChangeNotify();
+}
 
 void Patch_makeCaps( Patch& patch, scene::Instance& instance, EPatchCap type, const char* shader ){
        if ( ( type == eCapEndCap || type == eCapIEndCap )
@@ -89,8 +115,10 @@ void Patch_makeCaps( Patch& patch, scene::Instance& instance, EPatchCap type, co
                NodeSmartReference cap( g_patchCreator->createPatch() );
                Node_getTraversable( instance.path().parent() )->insert( cap );
 
-               patch.MakeCap( Node_getPatch( cap ), type, ROW, true );
-               Node_getPatch( cap )->SetShader( shader );
+               Patch* cap_patch = Node_getPatch( cap );
+               patch.MakeCap( cap_patch, type, ROW, true );
+               cap_patch->SetShader( shader );
+               PatchAutoCapTexture(*cap_patch);
 
                scene::Path path( instance.path() );
                path.pop();
@@ -102,8 +130,10 @@ void Patch_makeCaps( Patch& patch, scene::Instance& instance, EPatchCap type, co
                NodeSmartReference cap( g_patchCreator->createPatch() );
                Node_getTraversable( instance.path().parent() )->insert( cap );
 
-               patch.MakeCap( Node_getPatch( cap ), type, ROW, false );
-               Node_getPatch( cap )->SetShader( shader );
+               Patch* cap_patch = Node_getPatch( cap );
+               patch.MakeCap( cap_patch, type, ROW, false );
+               cap_patch->SetShader( shader );
+               PatchAutoCapTexture(*cap_patch);
 
                scene::Path path( instance.path() );
                path.pop();
@@ -585,8 +615,25 @@ void Patch_NaturalTexture(){
        Scene_PatchNaturalTexture_Selected( GlobalSceneGraph() );
 }
 
+void Patch_CapTexture(){
+       UndoableCommand command( "patchCapTexture" );
 
+       Scene_PatchCapTexture_Selected( GlobalSceneGraph() );
+}
 
+void Patch_ResetTexture(){
+       float fx, fy;
+       if ( DoTextureLayout( &fx, &fy ) == eIDOK ) {
+               UndoableCommand command( "patchTileTexture" );
+               Scene_PatchTileTexture_Selected( GlobalSceneGraph(), fx, fy );
+       }
+}
+
+void Patch_FitTexture(){
+       UndoableCommand command( "patchFitTexture" );
+
+       Scene_PatchTileTexture_Selected( GlobalSceneGraph(), 1, 1 );
+}
 
 #include "ifilter.h"
 
@@ -661,10 +708,6 @@ void PatchPreferences_construct(){
 void Patch_registerCommands(){
        GlobalCommands_insert( "InvertCurveTextureX", FreeCaller<Patch_FlipTextureX>(), Accelerator( 'I', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalCommands_insert( "InvertCurveTextureY", FreeCaller<Patch_FlipTextureY>(), Accelerator( 'I', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "IncPatchColumn", FreeCaller<Patch_InsertInsertColumn>(), Accelerator( GDK_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "IncPatchRow", FreeCaller<Patch_InsertInsertRow>(), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
-       GlobalCommands_insert( "DecPatchColumn", FreeCaller<Patch_DeleteLastColumn>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "DecPatchRow", FreeCaller<Patch_DeleteLastRow>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "NaturalizePatch", FreeCaller<Patch_NaturalTexture>(), Accelerator( 'N', (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "PatchCylinder", FreeCaller<Patch_Cylinder>() );
        GlobalCommands_insert( "PatchDenseCylinder", FreeCaller<Patch_DenseCylinder>() );
@@ -680,13 +723,13 @@ void Patch_registerCommands(){
        GlobalCommands_insert( "PatchCone", FreeCaller<Patch_Cone>() );
        GlobalCommands_insert( "PatchSphere", FreeCaller<Patch_Sphere>() );
        GlobalCommands_insert( "SimplePatchMesh", FreeCaller<Patch_Plane>(), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "PatchInsertInsertColumn", FreeCaller<Patch_InsertInsertColumn>() );
+       GlobalCommands_insert( "PatchInsertInsertColumn", FreeCaller<Patch_InsertInsertColumn>(), Accelerator( GDK_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalCommands_insert( "PatchInsertAddColumn", FreeCaller<Patch_InsertAddColumn>() );
-       GlobalCommands_insert( "PatchInsertInsertRow", FreeCaller<Patch_InsertInsertRow>() );
+       GlobalCommands_insert( "PatchInsertInsertRow", FreeCaller<Patch_InsertInsertRow>(), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "PatchInsertAddRow", FreeCaller<Patch_InsertAddRow>() );
        GlobalCommands_insert( "PatchDeleteFirstColumn", FreeCaller<Patch_DeleteFirstColumn>() );
-       GlobalCommands_insert( "PatchDeleteLastColumn", FreeCaller<Patch_DeleteLastColumn>() );
-       GlobalCommands_insert( "PatchDeleteFirstRow", FreeCaller<Patch_DeleteFirstRow>() );
+       GlobalCommands_insert( "PatchDeleteLastColumn", FreeCaller<Patch_DeleteLastColumn>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PatchDeleteFirstRow", FreeCaller<Patch_DeleteFirstRow>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "PatchDeleteLastRow", FreeCaller<Patch_DeleteLastRow>() );
        GlobalCommands_insert( "InvertCurve", FreeCaller<Patch_Invert>(), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "RedisperseRows", FreeCaller<Patch_RedisperseRows>(), Accelerator( 'E', (GdkModifierType)GDK_CONTROL_MASK ) );
@@ -701,7 +744,7 @@ void Patch_registerCommands(){
 }
 
 void Patch_constructToolbar( GtkToolbar* toolbar ){
-       toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "curve_cap.bmp", "CapCurrentCurve" );
+       toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "cap_curve.png", "CapCurrentCurve" );
 }
 
 void Patch_constructMenu( GtkMenu* menu ){
@@ -957,35 +1000,35 @@ EMessageBoxReturn DoCapDlg( ECapDialog* type ){
                                gtk_table_set_col_spacings( table, 5 );
 
                                {
-                                       GtkImage* image = new_local_image( "cap_bevel.bmp" );
+                                       GtkImage* image = new_local_image( "cap_bevel.png" );
                                        gtk_widget_show( GTK_WIDGET( image ) );
                                        gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 0, 1,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
                                }
                                {
-                                       GtkImage* image = new_local_image( "cap_endcap.bmp" );
+                                       GtkImage* image = new_local_image( "cap_endcap.png" );
                                        gtk_widget_show( GTK_WIDGET( image ) );
                                        gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 1, 2,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
                                }
                                {
-                                       GtkImage* image = new_local_image( "cap_ibevel.bmp" );
+                                       GtkImage* image = new_local_image( "cap_ibevel.png" );
                                        gtk_widget_show( GTK_WIDGET( image ) );
                                        gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 2, 3,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
                                }
                                {
-                                       GtkImage* image = new_local_image( "cap_iendcap.bmp" );
+                                       GtkImage* image = new_local_image( "cap_iendcap.png" );
                                        gtk_widget_show( GTK_WIDGET( image ) );
                                        gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 3, 4,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
                                }
                                {
-                                       GtkImage* image = new_local_image( "cap_cylinder.bmp" );
+                                       GtkImage* image = new_local_image( "cap_cylinder.png" );
                                        gtk_widget_show( GTK_WIDGET( image ) );
                                        gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 4, 5,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
index 4666ae73494a585c802afa8568360fa6e3cffeed..47f7f2248e201e26aeb70d7cdb8eabcd3ad406fc 100644 (file)
@@ -51,6 +51,14 @@ void PatchPreferences_construct();
 
 void Patch_registerPreferencesPage();
 
+void Patch_NaturalTexture();
+void Patch_CapTexture();
+void Patch_ResetTexture();
+void Patch_FitTexture();
+void Patch_FlipTextureX();
+void Patch_FlipTextureY();
+void Patch_AutoCapTexture();
+
 class PatchCreator;
 extern PatchCreator* g_patchCreator;
 
index 4246ab428d0eee68eb287baaa080d5dd0e57f37d..5d34645a8e4dccf267213cdaffe6b6687d386b8b 100644 (file)
@@ -900,7 +900,7 @@ static gboolean rotatedlg_cancel( GtkWidget *widget, RotateDialog* rotateDialog
 
 static gboolean rotatedlg_ok( GtkWidget *widget, RotateDialog* rotateDialog ){
        rotatedlg_apply( widget, rotateDialog );
-       rotatedlg_cancel( widget, rotateDialog );
+       gtk_widget_hide( GTK_WIDGET( rotateDialog->window ) );
        return TRUE;
 }
 
@@ -1052,7 +1052,7 @@ static gboolean scaledlg_cancel( GtkWidget *widget, ScaleDialog* scaleDialog ){
 
 static gboolean scaledlg_ok( GtkWidget *widget, ScaleDialog* scaleDialog ){
        scaledlg_apply( widget, scaleDialog );
-       scaledlg_cancel( widget, scaleDialog );
+       gtk_widget_hide( GTK_WIDGET( scaleDialog->window ) );
        return TRUE;
 }
 
index ac02d7fd89136301e56f7afaccf41319eed11cd6..73312a078fba5435b28649a9680e03ea31efe045 100644 (file)
@@ -442,23 +442,19 @@ void SurfaceInspector_FitTexture(){
 }
 
 static void OnBtnPatchdetails( GtkWidget *widget, gpointer data ){
-       Scene_PatchCapTexture_Selected( GlobalSceneGraph() );
+       Patch_CapTexture();
 }
 
 static void OnBtnPatchnatural( GtkWidget *widget, gpointer data ){
-       Scene_PatchNaturalTexture_Selected( GlobalSceneGraph() );
+       Patch_NaturalTexture();
 }
 
 static void OnBtnPatchreset( GtkWidget *widget, gpointer data ){
-       float fx, fy;
-
-       if ( DoTextureLayout( &fx, &fy ) == eIDOK ) {
-               Scene_PatchTileTexture_Selected( GlobalSceneGraph(), fx, fy );
-       }
+       Patch_ResetTexture();
 }
 
 static void OnBtnPatchFit( GtkWidget *widget, gpointer data ){
-       Scene_PatchTileTexture_Selected( GlobalSceneGraph(), 1, 1 );
+       Patch_FitTexture();
 }
 
 static void OnBtnAxial( GtkWidget *widget, gpointer data ){
index 94717d0949bd75a9d9b913c62b72ef40ee42bdc3..33e7e5c257d8ef227a6e13f75fffa9cf2868953a 100644 (file)
@@ -132,8 +132,9 @@ typedef ReferenceCaller1<TextureGroups, const char*, TextureGroups_addDirectory>
 namespace
 {
 bool g_TextureBrowser_shaderlistOnly = false;
-bool g_TextureBrowser_fixedSize = false;
+bool g_TextureBrowser_fixedSize = true;
 bool g_TextureBrowser_filterNotex = false;
+bool g_TextureBrowser_enableAlpha = true;
 }
 
 class DeferredAdjustment
@@ -203,6 +204,9 @@ typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_fixedSize> Texture
 void TextureBrowser_filterNotex( const BoolImportCallback& importer );
 typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterNotex> TextureBrowserFilterNotexExport;
 
+void TextureBrowser_enableAlpha( const BoolImportCallback& importer );
+typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_enableAlpha> TextureBrowserEnableAlphaExport;
+
 class TextureBrowser
 {
 public:
@@ -238,6 +242,7 @@ ToggleItem m_showshaders_item;
 ToggleItem m_showshaderlistonly_item;
 ToggleItem m_fixedsize_item;
 ToggleItem m_filternotex_item;
+ToggleItem m_enablealpha_item;
 
 guint m_sizeHandler;
 guint m_exposeHandler;
@@ -307,6 +312,7 @@ TextureBrowser() :
        m_showshaderlistonly_item( TextureBrowserShowShaderlistOnlyExport() ),
        m_fixedsize_item( TextureBrowserFixedSizeExport() ),
        m_filternotex_item( TextureBrowserFilterNotexExport() ),
+       m_enablealpha_item( TextureBrowserEnableAlphaExport() ),
        m_heightChanged( true ),
        m_originInvalid( true ),
        m_scrollAdjustment( TextureBrowser_scrollChanged, this ),
@@ -320,7 +326,7 @@ TextureBrowser() :
        m_rmbSelected( false ),
        m_searchedTags( false ),
        m_tags( false ),
-       m_uniformTextureSize( 128 ){
+       m_uniformTextureSize( 96 ){
 }
 };
 
@@ -828,6 +834,11 @@ void TextureBrowser_filterNotex( const BoolImportCallback& importer ){
 }
 typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_filterNotex> TextureBrowser_filterNotexExport;
 
+void TextureBrowser_enableAlpha( const BoolImportCallback& importer ){
+       importer( g_TextureBrowser_enableAlpha );
+}
+typedef FreeCaller1<const BoolImportCallback&, TextureBrowser_enableAlpha> TextureBrowser_enableAlphaExport;
+
 void TextureBrowser_SetHideUnused( TextureBrowser& textureBrowser, bool hideUnused ){
        if ( hideUnused ) {
                textureBrowser.m_hideUnused = true;
@@ -1021,7 +1032,13 @@ void Texture_Draw( TextureBrowser& textureBrowser ){
 
        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
        glDisable( GL_DEPTH_TEST );
-       glDisable( GL_BLEND );
+       if ( g_TextureBrowser_enableAlpha ) {
+               glEnable( GL_BLEND );
+               glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+       }
+       else {
+               glDisable( GL_BLEND );
+       }
        glOrtho( 0, textureBrowser.width, originy - textureBrowser.height, originy, -100, 100 );
        glEnable( GL_TEXTURE_2D );
 
@@ -1114,6 +1131,30 @@ void Texture_Draw( TextureBrowser& textureBrowser ){
                                }
                        }
 
+                       // draw checkerboard for transparent textures
+                       if ( g_TextureBrowser_enableAlpha )
+                       {
+                               glDisable( GL_TEXTURE_2D );
+                               glBegin( GL_QUADS );
+                               int font_height = TextureBrowser_fontHeight( textureBrowser );
+                               for ( int i = 0; i < nHeight; i += 8 )
+                                       for ( int j = 0; j < nWidth; j += 8 )
+                                       {
+                                               unsigned char color = (i + j) / 8 % 2 ? 0x66 : 0x99;
+                                               glColor3ub( color, color, color );
+                                               int left = j;
+                                               int right = std::min(j+8, nWidth);
+                                               int top = i;
+                                               int bottom = std::min(i+8, nHeight);
+                                               glVertex2i(x + right, y - nHeight - font_height + top);
+                                               glVertex2i(x + left,  y - nHeight - font_height + top);
+                                               glVertex2i(x + left,  y - nHeight - font_height + bottom);
+                                               glVertex2i(x + right, y - nHeight - font_height + bottom);
+                                       }
+                               glEnd();
+                               glEnable( GL_TEXTURE_2D );
+                       }
+
                        // Draw the texture
                        glBindTexture( GL_TEXTURE_2D, q->texture_number );
                        GlobalOpenGL_debugAssertNoErrors();
@@ -1167,6 +1208,12 @@ void TextureBrowser_setScale( TextureBrowser& textureBrowser, std::size_t scale
        TextureBrowser_queueDraw( textureBrowser );
 }
 
+void TextureBrowser_setUniformSize( TextureBrowser& textureBrowser, std::size_t scale ){
+       textureBrowser.m_uniformTextureSize = scale;
+
+       TextureBrowser_queueDraw( textureBrowser );
+}
+
 
 void TextureBrowser_MouseWheel( TextureBrowser& textureBrowser, bool bUp ){
        int originy = TextureBrowser_getOriginY( textureBrowser );
@@ -1583,7 +1630,9 @@ GtkMenuItem* TextureBrowser_constructViewMenu( GtkMenu* menu ){
                create_menu_item_with_mnemonic( menu, "Show Untagged", "ShowUntagged" );
        }
 
+       menu_separator( menu );
        create_check_menu_item_with_mnemonic( menu, "Fixed Size", "FixedSize" );
+       create_check_menu_item_with_mnemonic( menu, "Transparency", "EnableAlpha" );
 
        if ( string_empty( g_pGameDescription->getKeyValue( "show_wads" ) ) ) {
                menu_separator( menu );
@@ -1591,6 +1640,7 @@ GtkMenuItem* TextureBrowser_constructViewMenu( GtkMenu* menu ){
                gtk_widget_set_sensitive( g_TextureBrowser.m_shader_info_item, FALSE );
        }
 
+
        return textures_menu_item;
 }
 
@@ -1877,11 +1927,11 @@ void TextureBrowser_checkTagFile(){
 
 void TextureBrowser_SetNotex(){
        StringOutputStream name( 256 );
-       name << GlobalRadiant().getAppPath() << "bitmaps/notex.bmp";
+       name << GlobalRadiant().getAppPath() << "bitmaps/notex.png";
        g_notex = name.c_str();
 
        name = NULL;
-       name << GlobalRadiant().getAppPath() << "bitmaps/shadernotex.bmp";
+       name << GlobalRadiant().getAppPath() << "bitmaps/shadernotex.png";
        g_shadernotex = name.c_str();
 }
 
@@ -2310,6 +2360,23 @@ void RefreshShaders(){
        ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", "Loading Shaders" );
        GlobalShaderSystem().refresh();
        UpdateAllWindows();
+       GtkTreeSelection* selection = gtk_tree_view_get_selection((GtkTreeView*)GlobalTextureBrowser().m_treeViewTree);
+       GtkTreeModel* model = NULL;
+       GtkTreeIter iter;
+       if ( gtk_tree_selection_get_selected (selection, &model, &iter) )
+       {
+               gchar dirName[1024];
+
+               gchar* buffer;
+               gtk_tree_model_get( model, &iter, 0, &buffer, -1 );
+               strcpy( dirName, buffer );
+               g_free( buffer );
+               if ( !TextureBrowser_showWads() ) {
+                       strcat( dirName, "/" );
+               }
+               TextureBrowser_ShowDirectory( GlobalTextureBrowser(), dirName );
+               TextureBrowser_queueDraw( GlobalTextureBrowser() );
+       }
 }
 
 void TextureBrowser_ToggleShowShaders(){
@@ -2371,6 +2438,12 @@ void TextureBrowser_FilterNotex(){
        TextureBrowser_activeShadersChanged( GlobalTextureBrowser() );
 }
 
+void TextureBrowser_EnableAlpha(){
+       g_TextureBrowser_enableAlpha ^= 1;
+       GlobalTextureBrowser().m_enablealpha_item.update();
+       TextureBrowser_activeShadersChanged( GlobalTextureBrowser() );
+}
+
 void TextureBrowser_exportTitle( const StringImportCallback& importer ){
        StringOutputStream buffer( 64 );
        buffer << "Textures: ";
@@ -2429,6 +2502,14 @@ void TextureScaleExport( TextureBrowser& textureBrowser, const IntImportCallback
 }
 typedef ReferenceCaller1<TextureBrowser, const IntImportCallback&, TextureScaleExport> TextureScaleExportCaller;
 
+
+void UniformTextureSizeImport( TextureBrowser& textureBrowser, int value ){
+
+       if ( value > 16 )
+               TextureBrowser_setUniformSize( textureBrowser, value );
+}
+typedef ReferenceCaller1<TextureBrowser, int, UniformTextureSizeImport> UniformTextureSizeImportCaller;
+
 void TextureBrowser_constructPreferences( PreferencesPage& page ){
        page.appendCheckBox(
                "", "Texture scrollbar",
@@ -2444,6 +2525,12 @@ void TextureBrowser_constructPreferences( PreferencesPage& page ){
                        IntExportCallback( TextureScaleExportCaller( GlobalTextureBrowser() ) )
                        );
        }
+       page.appendSpinner(
+               "Texture Thumbnail Size",
+               GlobalTextureBrowser().m_uniformTextureSize,
+               GlobalTextureBrowser().m_uniformTextureSize,
+               16, 8192
+       );
        page.appendEntry( "Mousewheel Increment", GlobalTextureBrowser().m_mouseWheelScrollIncrement );
        {
                const char* startup_shaders[] = { "None", TextureBrowser_getComonShadersName() };
@@ -2484,11 +2571,15 @@ void TextureBrowser_Construct(){
        GlobalToggles_insert( "ToggleShowShaderlistOnly", FreeCaller<TextureBrowser_ToggleShowShaderListOnly>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_showshaderlistonly_item ) );
        GlobalToggles_insert( "FixedSize", FreeCaller<TextureBrowser_FixedSize>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_fixedsize_item ) );
        GlobalToggles_insert( "FilterNotex", FreeCaller<TextureBrowser_FilterNotex>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_filternotex_item ) );
+       GlobalToggles_insert( "EnableAlpha", FreeCaller<TextureBrowser_EnableAlpha>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_enablealpha_item ) );
 
        GlobalPreferenceSystem().registerPreference( "TextureScale",
                                                                                                 makeSizeStringImportCallback( TextureBrowserSetScaleCaller( g_TextureBrowser ) ),
                                                                                                 SizeExportStringCaller( g_TextureBrowser.m_textureScale )
                                                                                                 );
+       GlobalPreferenceSystem().registerPreference( "UniformTextureSize",
+                                                                                                makeIntStringImportCallback(UniformTextureSizeImportCaller(g_TextureBrowser)),
+                                                                                                IntExportStringCaller(g_TextureBrowser.m_uniformTextureSize) );
        GlobalPreferenceSystem().registerPreference( "TextureScrollbar",
                                                                                                 makeBoolStringImportCallback( TextureBrowserImportShowScrollbarCaller( g_TextureBrowser ) ),
                                                                                                 BoolExportStringCaller( GlobalTextureBrowser().m_showTextureScrollbar )
@@ -2497,6 +2588,7 @@ void TextureBrowser_Construct(){
        GlobalPreferenceSystem().registerPreference( "ShowShaderlistOnly", BoolImportStringCaller( g_TextureBrowser_shaderlistOnly ), BoolExportStringCaller( g_TextureBrowser_shaderlistOnly ) );
        GlobalPreferenceSystem().registerPreference( "FixedSize", BoolImportStringCaller( g_TextureBrowser_fixedSize ), BoolExportStringCaller( g_TextureBrowser_fixedSize ) );
        GlobalPreferenceSystem().registerPreference( "FilterNotex", BoolImportStringCaller( g_TextureBrowser_filterNotex ), BoolExportStringCaller( g_TextureBrowser_filterNotex ) );
+       GlobalPreferenceSystem().registerPreference( "EnableAlpha", BoolImportStringCaller( g_TextureBrowser_enableAlpha ), BoolExportStringCaller( g_TextureBrowser_enableAlpha ) );
        GlobalPreferenceSystem().registerPreference( "LoadShaders", IntImportStringCaller( reinterpret_cast<int&>( GlobalTextureBrowser().m_startupShaders ) ), IntExportStringCaller( reinterpret_cast<int&>( GlobalTextureBrowser().m_startupShaders ) ) );
        GlobalPreferenceSystem().registerPreference( "WheelMouseInc", SizeImportStringCaller( GlobalTextureBrowser().m_mouseWheelScrollIncrement ), SizeExportStringCaller( GlobalTextureBrowser().m_mouseWheelScrollIncrement ) );
        GlobalPreferenceSystem().registerPreference( "SI_Colors0", Vector3ImportStringCaller( GlobalTextureBrowser().color_textureback ), Vector3ExportStringCaller( GlobalTextureBrowser().color_textureback ) );
diff --git a/setup/data/tools-src/notex.xcf b/setup/data/tools-src/notex.xcf
new file mode 100644 (file)
index 0000000..6aa111a
Binary files /dev/null and b/setup/data/tools-src/notex.xcf differ
diff --git a/setup/data/tools-src/shadernotex.xcf b/setup/data/tools-src/shadernotex.xcf
new file mode 100644 (file)
index 0000000..de43725
Binary files /dev/null and b/setup/data/tools-src/shadernotex.xcf differ
diff --git a/setup/data/tools/bitmaps/black.bmp b/setup/data/tools/bitmaps/black.bmp
deleted file mode 100644 (file)
index 8fc59ba..0000000
Binary files a/setup/data/tools/bitmaps/black.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/black.png b/setup/data/tools/bitmaps/black.png
new file mode 100644 (file)
index 0000000..6d3e454
Binary files /dev/null and b/setup/data/tools/bitmaps/black.png differ
diff --git a/setup/data/tools/bitmaps/brush_flipx.bmp b/setup/data/tools/bitmaps/brush_flipx.bmp
deleted file mode 100644 (file)
index 48ee0db..0000000
Binary files a/setup/data/tools/bitmaps/brush_flipx.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_flipx.png b/setup/data/tools/bitmaps/brush_flipx.png
new file mode 100644 (file)
index 0000000..6207339
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_flipx.png differ
diff --git a/setup/data/tools/bitmaps/brush_flipy.bmp b/setup/data/tools/bitmaps/brush_flipy.bmp
deleted file mode 100644 (file)
index d740877..0000000
Binary files a/setup/data/tools/bitmaps/brush_flipy.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_flipy.png b/setup/data/tools/bitmaps/brush_flipy.png
new file mode 100644 (file)
index 0000000..ce537f3
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_flipy.png differ
diff --git a/setup/data/tools/bitmaps/brush_flipz.bmp b/setup/data/tools/bitmaps/brush_flipz.bmp
deleted file mode 100644 (file)
index 017c33e..0000000
Binary files a/setup/data/tools/bitmaps/brush_flipz.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_flipz.png b/setup/data/tools/bitmaps/brush_flipz.png
new file mode 100644 (file)
index 0000000..d2d0708
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_flipz.png differ
diff --git a/setup/data/tools/bitmaps/brush_rotatex.bmp b/setup/data/tools/bitmaps/brush_rotatex.bmp
deleted file mode 100644 (file)
index c7e5505..0000000
Binary files a/setup/data/tools/bitmaps/brush_rotatex.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_rotatex.png b/setup/data/tools/bitmaps/brush_rotatex.png
new file mode 100644 (file)
index 0000000..37c46fc
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_rotatex.png differ
diff --git a/setup/data/tools/bitmaps/brush_rotatey.bmp b/setup/data/tools/bitmaps/brush_rotatey.bmp
deleted file mode 100644 (file)
index e50e5d6..0000000
Binary files a/setup/data/tools/bitmaps/brush_rotatey.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_rotatey.png b/setup/data/tools/bitmaps/brush_rotatey.png
new file mode 100644 (file)
index 0000000..c3b33e7
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_rotatey.png differ
diff --git a/setup/data/tools/bitmaps/brush_rotatez.bmp b/setup/data/tools/bitmaps/brush_rotatez.bmp
deleted file mode 100644 (file)
index 52ab554..0000000
Binary files a/setup/data/tools/bitmaps/brush_rotatez.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/brush_rotatez.png b/setup/data/tools/bitmaps/brush_rotatez.png
new file mode 100644 (file)
index 0000000..e56f1cb
Binary files /dev/null and b/setup/data/tools/bitmaps/brush_rotatez.png differ
diff --git a/setup/data/tools/bitmaps/cap_bevel.bmp b/setup/data/tools/bitmaps/cap_bevel.bmp
deleted file mode 100644 (file)
index 3bb4186..0000000
Binary files a/setup/data/tools/bitmaps/cap_bevel.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/cap_bevel.png b/setup/data/tools/bitmaps/cap_bevel.png
new file mode 100644 (file)
index 0000000..b39565d
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_bevel.png differ
diff --git a/setup/data/tools/bitmaps/cap_curve.png b/setup/data/tools/bitmaps/cap_curve.png
new file mode 100644 (file)
index 0000000..6ce1c0c
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_curve.png differ
diff --git a/setup/data/tools/bitmaps/cap_cylinder.bmp b/setup/data/tools/bitmaps/cap_cylinder.bmp
deleted file mode 100644 (file)
index 2196926..0000000
Binary files a/setup/data/tools/bitmaps/cap_cylinder.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/cap_cylinder.png b/setup/data/tools/bitmaps/cap_cylinder.png
new file mode 100644 (file)
index 0000000..9688930
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_cylinder.png differ
diff --git a/setup/data/tools/bitmaps/cap_endcap.bmp b/setup/data/tools/bitmaps/cap_endcap.bmp
deleted file mode 100644 (file)
index e6cea65..0000000
Binary files a/setup/data/tools/bitmaps/cap_endcap.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/cap_endcap.png b/setup/data/tools/bitmaps/cap_endcap.png
new file mode 100644 (file)
index 0000000..049b250
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_endcap.png differ
diff --git a/setup/data/tools/bitmaps/cap_ibevel.bmp b/setup/data/tools/bitmaps/cap_ibevel.bmp
deleted file mode 100644 (file)
index b1fa49b..0000000
Binary files a/setup/data/tools/bitmaps/cap_ibevel.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/cap_ibevel.png b/setup/data/tools/bitmaps/cap_ibevel.png
new file mode 100644 (file)
index 0000000..c284b66
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_ibevel.png differ
diff --git a/setup/data/tools/bitmaps/cap_iendcap.bmp b/setup/data/tools/bitmaps/cap_iendcap.bmp
deleted file mode 100644 (file)
index da1f5b6..0000000
Binary files a/setup/data/tools/bitmaps/cap_iendcap.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/cap_iendcap.png b/setup/data/tools/bitmaps/cap_iendcap.png
new file mode 100644 (file)
index 0000000..11a3f16
Binary files /dev/null and b/setup/data/tools/bitmaps/cap_iendcap.png differ
diff --git a/setup/data/tools/bitmaps/console.bmp b/setup/data/tools/bitmaps/console.bmp
deleted file mode 100644 (file)
index 7fe64b0..0000000
Binary files a/setup/data/tools/bitmaps/console.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/console.png b/setup/data/tools/bitmaps/console.png
new file mode 100644 (file)
index 0000000..4004739
Binary files /dev/null and b/setup/data/tools/bitmaps/console.png differ
diff --git a/setup/data/tools/bitmaps/curve_cap.bmp b/setup/data/tools/bitmaps/curve_cap.bmp
deleted file mode 100644 (file)
index 574e761..0000000
Binary files a/setup/data/tools/bitmaps/curve_cap.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/dontselectcurve.bmp b/setup/data/tools/bitmaps/dontselectcurve.bmp
deleted file mode 100644 (file)
index a7b9795..0000000
Binary files a/setup/data/tools/bitmaps/dontselectcurve.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/dontselectcurve.png b/setup/data/tools/bitmaps/dontselectcurve.png
new file mode 100644 (file)
index 0000000..66254df
Binary files /dev/null and b/setup/data/tools/bitmaps/dontselectcurve.png differ
diff --git a/setup/data/tools/bitmaps/dontselectmodel.bmp b/setup/data/tools/bitmaps/dontselectmodel.bmp
deleted file mode 100644 (file)
index e81b118..0000000
Binary files a/setup/data/tools/bitmaps/dontselectmodel.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/dontselectmodel.png b/setup/data/tools/bitmaps/dontselectmodel.png
new file mode 100644 (file)
index 0000000..82c472a
Binary files /dev/null and b/setup/data/tools/bitmaps/dontselectmodel.png differ
diff --git a/setup/data/tools/bitmaps/ellipsis.bmp b/setup/data/tools/bitmaps/ellipsis.bmp
deleted file mode 100644 (file)
index a4360a9..0000000
Binary files a/setup/data/tools/bitmaps/ellipsis.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/ellipsis.png b/setup/data/tools/bitmaps/ellipsis.png
new file mode 100644 (file)
index 0000000..270f7b1
Binary files /dev/null and b/setup/data/tools/bitmaps/ellipsis.png differ
diff --git a/setup/data/tools/bitmaps/entities.bmp b/setup/data/tools/bitmaps/entities.bmp
deleted file mode 100644 (file)
index ce3d812..0000000
Binary files a/setup/data/tools/bitmaps/entities.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/entities.png b/setup/data/tools/bitmaps/entities.png
new file mode 100644 (file)
index 0000000..e6fa2d1
Binary files /dev/null and b/setup/data/tools/bitmaps/entities.png differ
diff --git a/setup/data/tools/bitmaps/file_open.bmp b/setup/data/tools/bitmaps/file_open.bmp
deleted file mode 100644 (file)
index 754f10f..0000000
Binary files a/setup/data/tools/bitmaps/file_open.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/file_open.png b/setup/data/tools/bitmaps/file_open.png
new file mode 100644 (file)
index 0000000..bbfe7cc
Binary files /dev/null and b/setup/data/tools/bitmaps/file_open.png differ
diff --git a/setup/data/tools/bitmaps/file_save.bmp b/setup/data/tools/bitmaps/file_save.bmp
deleted file mode 100644 (file)
index 651afb6..0000000
Binary files a/setup/data/tools/bitmaps/file_save.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/file_save.png b/setup/data/tools/bitmaps/file_save.png
new file mode 100644 (file)
index 0000000..2d5a09f
Binary files /dev/null and b/setup/data/tools/bitmaps/file_save.png differ
diff --git a/setup/data/tools/bitmaps/icon.bmp b/setup/data/tools/bitmaps/icon.bmp
deleted file mode 100644 (file)
index 01aec6e..0000000
Binary files a/setup/data/tools/bitmaps/icon.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/icon.png b/setup/data/tools/bitmaps/icon.png
new file mode 100644 (file)
index 0000000..15fcf02
Binary files /dev/null and b/setup/data/tools/bitmaps/icon.png differ
diff --git a/setup/data/tools/bitmaps/lightinspector.bmp b/setup/data/tools/bitmaps/lightinspector.bmp
deleted file mode 100644 (file)
index 00b00a9..0000000
Binary files a/setup/data/tools/bitmaps/lightinspector.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/lightinspector.png b/setup/data/tools/bitmaps/lightinspector.png
new file mode 100644 (file)
index 0000000..93688b3
Binary files /dev/null and b/setup/data/tools/bitmaps/lightinspector.png differ
diff --git a/setup/data/tools/bitmaps/logo.bmp b/setup/data/tools/bitmaps/logo.bmp
deleted file mode 100644 (file)
index ddbd346..0000000
Binary files a/setup/data/tools/bitmaps/logo.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/logo.png b/setup/data/tools/bitmaps/logo.png
new file mode 100644 (file)
index 0000000..fd5afd4
Binary files /dev/null and b/setup/data/tools/bitmaps/logo.png differ
diff --git a/setup/data/tools/bitmaps/modify_edges.bmp b/setup/data/tools/bitmaps/modify_edges.bmp
deleted file mode 100644 (file)
index 7b048f9..0000000
Binary files a/setup/data/tools/bitmaps/modify_edges.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/modify_edges.png b/setup/data/tools/bitmaps/modify_edges.png
new file mode 100644 (file)
index 0000000..0bb8714
Binary files /dev/null and b/setup/data/tools/bitmaps/modify_edges.png differ
diff --git a/setup/data/tools/bitmaps/modify_faces.bmp b/setup/data/tools/bitmaps/modify_faces.bmp
deleted file mode 100644 (file)
index 03d9f8c..0000000
Binary files a/setup/data/tools/bitmaps/modify_faces.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/modify_faces.png b/setup/data/tools/bitmaps/modify_faces.png
new file mode 100644 (file)
index 0000000..7615c5b
Binary files /dev/null and b/setup/data/tools/bitmaps/modify_faces.png differ
diff --git a/setup/data/tools/bitmaps/modify_vertices.bmp b/setup/data/tools/bitmaps/modify_vertices.bmp
deleted file mode 100644 (file)
index c434732..0000000
Binary files a/setup/data/tools/bitmaps/modify_vertices.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/modify_vertices.png b/setup/data/tools/bitmaps/modify_vertices.png
new file mode 100644 (file)
index 0000000..70aa38a
Binary files /dev/null and b/setup/data/tools/bitmaps/modify_vertices.png differ
diff --git a/setup/data/tools/bitmaps/noFalloff.bmp b/setup/data/tools/bitmaps/noFalloff.bmp
deleted file mode 100644 (file)
index e86d10c..0000000
Binary files a/setup/data/tools/bitmaps/noFalloff.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/noFalloff.png b/setup/data/tools/bitmaps/noFalloff.png
new file mode 100644 (file)
index 0000000..55c6a80
Binary files /dev/null and b/setup/data/tools/bitmaps/noFalloff.png differ
diff --git a/setup/data/tools/bitmaps/notex.bmp b/setup/data/tools/bitmaps/notex.bmp
deleted file mode 100644 (file)
index b06664a..0000000
Binary files a/setup/data/tools/bitmaps/notex.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/notex.png b/setup/data/tools/bitmaps/notex.png
new file mode 100644 (file)
index 0000000..e09df39
Binary files /dev/null and b/setup/data/tools/bitmaps/notex.png differ
diff --git a/setup/data/tools/bitmaps/patch_bend.bmp b/setup/data/tools/bitmaps/patch_bend.bmp
deleted file mode 100644 (file)
index af4fc94..0000000
Binary files a/setup/data/tools/bitmaps/patch_bend.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_bend.png b/setup/data/tools/bitmaps/patch_bend.png
new file mode 100644 (file)
index 0000000..62eb756
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_bend.png differ
diff --git a/setup/data/tools/bitmaps/patch_drilldown.bmp b/setup/data/tools/bitmaps/patch_drilldown.bmp
deleted file mode 100644 (file)
index 01ebcf3..0000000
Binary files a/setup/data/tools/bitmaps/patch_drilldown.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_drilldown.png b/setup/data/tools/bitmaps/patch_drilldown.png
new file mode 100644 (file)
index 0000000..1794a13
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_drilldown.png differ
diff --git a/setup/data/tools/bitmaps/patch_insdel.bmp b/setup/data/tools/bitmaps/patch_insdel.bmp
deleted file mode 100644 (file)
index b60b76b..0000000
Binary files a/setup/data/tools/bitmaps/patch_insdel.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_insdel.png b/setup/data/tools/bitmaps/patch_insdel.png
new file mode 100644 (file)
index 0000000..362285e
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_insdel.png differ
diff --git a/setup/data/tools/bitmaps/patch_showboundingbox.bmp b/setup/data/tools/bitmaps/patch_showboundingbox.bmp
deleted file mode 100644 (file)
index 357cfaf..0000000
Binary files a/setup/data/tools/bitmaps/patch_showboundingbox.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_showboundingbox.png b/setup/data/tools/bitmaps/patch_showboundingbox.png
new file mode 100644 (file)
index 0000000..891f3c7
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_showboundingbox.png differ
diff --git a/setup/data/tools/bitmaps/patch_weld.bmp b/setup/data/tools/bitmaps/patch_weld.bmp
deleted file mode 100644 (file)
index a0c9973..0000000
Binary files a/setup/data/tools/bitmaps/patch_weld.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_weld.png b/setup/data/tools/bitmaps/patch_weld.png
new file mode 100644 (file)
index 0000000..3d53a6b
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_weld.png differ
diff --git a/setup/data/tools/bitmaps/patch_wireframe.bmp b/setup/data/tools/bitmaps/patch_wireframe.bmp
deleted file mode 100644 (file)
index 9804274..0000000
Binary files a/setup/data/tools/bitmaps/patch_wireframe.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/patch_wireframe.png b/setup/data/tools/bitmaps/patch_wireframe.png
new file mode 100644 (file)
index 0000000..78bb81e
Binary files /dev/null and b/setup/data/tools/bitmaps/patch_wireframe.png differ
diff --git a/setup/data/tools/bitmaps/popup_selection.bmp b/setup/data/tools/bitmaps/popup_selection.bmp
deleted file mode 100644 (file)
index 676c4d9..0000000
Binary files a/setup/data/tools/bitmaps/popup_selection.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/popup_selection.png b/setup/data/tools/bitmaps/popup_selection.png
new file mode 100644 (file)
index 0000000..217fa82
Binary files /dev/null and b/setup/data/tools/bitmaps/popup_selection.png differ
diff --git a/setup/data/tools/bitmaps/redo.bmp b/setup/data/tools/bitmaps/redo.bmp
deleted file mode 100644 (file)
index 32a373a..0000000
Binary files a/setup/data/tools/bitmaps/redo.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/redo.png b/setup/data/tools/bitmaps/redo.png
new file mode 100644 (file)
index 0000000..befec6e
Binary files /dev/null and b/setup/data/tools/bitmaps/redo.png differ
diff --git a/setup/data/tools/bitmaps/refresh_models.bmp b/setup/data/tools/bitmaps/refresh_models.bmp
deleted file mode 100644 (file)
index b6507f6..0000000
Binary files a/setup/data/tools/bitmaps/refresh_models.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/refresh_models.png b/setup/data/tools/bitmaps/refresh_models.png
new file mode 100644 (file)
index 0000000..ca77acb
Binary files /dev/null and b/setup/data/tools/bitmaps/refresh_models.png differ
diff --git a/setup/data/tools/bitmaps/scalelockx.bmp b/setup/data/tools/bitmaps/scalelockx.bmp
deleted file mode 100644 (file)
index 61363da..0000000
Binary files a/setup/data/tools/bitmaps/scalelockx.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/scalelockx.png b/setup/data/tools/bitmaps/scalelockx.png
new file mode 100644 (file)
index 0000000..9714120
Binary files /dev/null and b/setup/data/tools/bitmaps/scalelockx.png differ
diff --git a/setup/data/tools/bitmaps/scalelocky.bmp b/setup/data/tools/bitmaps/scalelocky.bmp
deleted file mode 100644 (file)
index 812394d..0000000
Binary files a/setup/data/tools/bitmaps/scalelocky.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/scalelocky.png b/setup/data/tools/bitmaps/scalelocky.png
new file mode 100644 (file)
index 0000000..7836242
Binary files /dev/null and b/setup/data/tools/bitmaps/scalelocky.png differ
diff --git a/setup/data/tools/bitmaps/scalelockz.bmp b/setup/data/tools/bitmaps/scalelockz.bmp
deleted file mode 100644 (file)
index 5692e4a..0000000
Binary files a/setup/data/tools/bitmaps/scalelockz.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/scalelockz.png b/setup/data/tools/bitmaps/scalelockz.png
new file mode 100644 (file)
index 0000000..f967680
Binary files /dev/null and b/setup/data/tools/bitmaps/scalelockz.png differ
diff --git a/setup/data/tools/bitmaps/select_mouseresize.bmp b/setup/data/tools/bitmaps/select_mouseresize.bmp
deleted file mode 100644 (file)
index ca0c9ac..0000000
Binary files a/setup/data/tools/bitmaps/select_mouseresize.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/select_mouseresize.png b/setup/data/tools/bitmaps/select_mouseresize.png
new file mode 100644 (file)
index 0000000..c841f05
Binary files /dev/null and b/setup/data/tools/bitmaps/select_mouseresize.png differ
diff --git a/setup/data/tools/bitmaps/select_mouserotate.bmp b/setup/data/tools/bitmaps/select_mouserotate.bmp
deleted file mode 100644 (file)
index 7f18a56..0000000
Binary files a/setup/data/tools/bitmaps/select_mouserotate.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/select_mouserotate.png b/setup/data/tools/bitmaps/select_mouserotate.png
new file mode 100644 (file)
index 0000000..6174568
Binary files /dev/null and b/setup/data/tools/bitmaps/select_mouserotate.png differ
diff --git a/setup/data/tools/bitmaps/select_mousescale.bmp b/setup/data/tools/bitmaps/select_mousescale.bmp
deleted file mode 100644 (file)
index d8f3902..0000000
Binary files a/setup/data/tools/bitmaps/select_mousescale.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/select_mousescale.png b/setup/data/tools/bitmaps/select_mousescale.png
new file mode 100644 (file)
index 0000000..2ab67b2
Binary files /dev/null and b/setup/data/tools/bitmaps/select_mousescale.png differ
diff --git a/setup/data/tools/bitmaps/select_mousetranslate.bmp b/setup/data/tools/bitmaps/select_mousetranslate.bmp
deleted file mode 100644 (file)
index 04962fd..0000000
Binary files a/setup/data/tools/bitmaps/select_mousetranslate.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/select_mousetranslate.png b/setup/data/tools/bitmaps/select_mousetranslate.png
new file mode 100644 (file)
index 0000000..8d85268
Binary files /dev/null and b/setup/data/tools/bitmaps/select_mousetranslate.png differ
diff --git a/setup/data/tools/bitmaps/selection_csgmerge.bmp b/setup/data/tools/bitmaps/selection_csgmerge.bmp
deleted file mode 100644 (file)
index fb5df4f..0000000
Binary files a/setup/data/tools/bitmaps/selection_csgmerge.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_csgmerge.png b/setup/data/tools/bitmaps/selection_csgmerge.png
new file mode 100644 (file)
index 0000000..eabaecf
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_csgmerge.png differ
diff --git a/setup/data/tools/bitmaps/selection_csgsubtract.bmp b/setup/data/tools/bitmaps/selection_csgsubtract.bmp
deleted file mode 100644 (file)
index 267d374..0000000
Binary files a/setup/data/tools/bitmaps/selection_csgsubtract.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_csgsubtract.png b/setup/data/tools/bitmaps/selection_csgsubtract.png
new file mode 100644 (file)
index 0000000..71d9263
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_csgsubtract.png differ
diff --git a/setup/data/tools/bitmaps/selection_makehollow.bmp b/setup/data/tools/bitmaps/selection_makehollow.bmp
deleted file mode 100644 (file)
index 8c5d60c..0000000
Binary files a/setup/data/tools/bitmaps/selection_makehollow.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_makehollow.png b/setup/data/tools/bitmaps/selection_makehollow.png
new file mode 100644 (file)
index 0000000..44416e8
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_makehollow.png differ
diff --git a/setup/data/tools/bitmaps/selection_selectcompletetall.bmp b/setup/data/tools/bitmaps/selection_selectcompletetall.bmp
deleted file mode 100644 (file)
index 8d2c104..0000000
Binary files a/setup/data/tools/bitmaps/selection_selectcompletetall.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selectcompletetall.png b/setup/data/tools/bitmaps/selection_selectcompletetall.png
new file mode 100644 (file)
index 0000000..3f5813e
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_selectcompletetall.png differ
diff --git a/setup/data/tools/bitmaps/selection_selectcompletetall_old.bmp b/setup/data/tools/bitmaps/selection_selectcompletetall_old.bmp
deleted file mode 100644 (file)
index 1f911e8..0000000
Binary files a/setup/data/tools/bitmaps/selection_selectcompletetall_old.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selectinside.bmp b/setup/data/tools/bitmaps/selection_selectinside.bmp
deleted file mode 100644 (file)
index 12b22af..0000000
Binary files a/setup/data/tools/bitmaps/selection_selectinside.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selectinside.png b/setup/data/tools/bitmaps/selection_selectinside.png
new file mode 100644 (file)
index 0000000..457805a
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_selectinside.png differ
diff --git a/setup/data/tools/bitmaps/selection_selectpartialtall.bmp b/setup/data/tools/bitmaps/selection_selectpartialtall.bmp
deleted file mode 100644 (file)
index d21ddc2..0000000
Binary files a/setup/data/tools/bitmaps/selection_selectpartialtall.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selectpartialtall.png b/setup/data/tools/bitmaps/selection_selectpartialtall.png
new file mode 100644 (file)
index 0000000..e378e47
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_selectpartialtall.png differ
diff --git a/setup/data/tools/bitmaps/selection_selectpartialtall_old.bmp b/setup/data/tools/bitmaps/selection_selectpartialtall_old.bmp
deleted file mode 100644 (file)
index 77b418b..0000000
Binary files a/setup/data/tools/bitmaps/selection_selectpartialtall_old.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selecttouching.bmp b/setup/data/tools/bitmaps/selection_selecttouching.bmp
deleted file mode 100644 (file)
index e6d5c4b..0000000
Binary files a/setup/data/tools/bitmaps/selection_selecttouching.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/selection_selecttouching.png b/setup/data/tools/bitmaps/selection_selecttouching.png
new file mode 100644 (file)
index 0000000..f4cf1c0
Binary files /dev/null and b/setup/data/tools/bitmaps/selection_selecttouching.png differ
diff --git a/setup/data/tools/bitmaps/shadernotex.bmp b/setup/data/tools/bitmaps/shadernotex.bmp
deleted file mode 100644 (file)
index 6be415e..0000000
Binary files a/setup/data/tools/bitmaps/shadernotex.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/shadernotex.png b/setup/data/tools/bitmaps/shadernotex.png
new file mode 100644 (file)
index 0000000..0eab827
Binary files /dev/null and b/setup/data/tools/bitmaps/shadernotex.png differ
diff --git a/setup/data/tools/bitmaps/show_entities.bmp b/setup/data/tools/bitmaps/show_entities.bmp
deleted file mode 100644 (file)
index 9188bee..0000000
Binary files a/setup/data/tools/bitmaps/show_entities.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/show_entities.png b/setup/data/tools/bitmaps/show_entities.png
new file mode 100644 (file)
index 0000000..97bc49b
Binary files /dev/null and b/setup/data/tools/bitmaps/show_entities.png differ
diff --git a/setup/data/tools/bitmaps/splash.bmp b/setup/data/tools/bitmaps/splash.bmp
deleted file mode 100644 (file)
index a484997..0000000
Binary files a/setup/data/tools/bitmaps/splash.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/splash.png b/setup/data/tools/bitmaps/splash.png
new file mode 100644 (file)
index 0000000..af09ccd
Binary files /dev/null and b/setup/data/tools/bitmaps/splash.png differ
diff --git a/setup/data/tools/bitmaps/texture_browser.bmp b/setup/data/tools/bitmaps/texture_browser.bmp
deleted file mode 100644 (file)
index 22f7250..0000000
Binary files a/setup/data/tools/bitmaps/texture_browser.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/texture_browser.png b/setup/data/tools/bitmaps/texture_browser.png
new file mode 100644 (file)
index 0000000..3c145c5
Binary files /dev/null and b/setup/data/tools/bitmaps/texture_browser.png differ
diff --git a/setup/data/tools/bitmaps/texture_lock.bmp b/setup/data/tools/bitmaps/texture_lock.bmp
deleted file mode 100644 (file)
index 0a003bc..0000000
Binary files a/setup/data/tools/bitmaps/texture_lock.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/texture_lock.png b/setup/data/tools/bitmaps/texture_lock.png
new file mode 100644 (file)
index 0000000..2a6c271
Binary files /dev/null and b/setup/data/tools/bitmaps/texture_lock.png differ
diff --git a/setup/data/tools/bitmaps/textures_popup.bmp b/setup/data/tools/bitmaps/textures_popup.bmp
deleted file mode 100644 (file)
index 5333382..0000000
Binary files a/setup/data/tools/bitmaps/textures_popup.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/textures_popup.png b/setup/data/tools/bitmaps/textures_popup.png
new file mode 100644 (file)
index 0000000..b238679
Binary files /dev/null and b/setup/data/tools/bitmaps/textures_popup.png differ
diff --git a/setup/data/tools/bitmaps/undo.bmp b/setup/data/tools/bitmaps/undo.bmp
deleted file mode 100644 (file)
index fd2b839..0000000
Binary files a/setup/data/tools/bitmaps/undo.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/undo.png b/setup/data/tools/bitmaps/undo.png
new file mode 100644 (file)
index 0000000..c0408dd
Binary files /dev/null and b/setup/data/tools/bitmaps/undo.png differ
diff --git a/setup/data/tools/bitmaps/view_cameratoggle.bmp b/setup/data/tools/bitmaps/view_cameratoggle.bmp
deleted file mode 100644 (file)
index 4ec79ed..0000000
Binary files a/setup/data/tools/bitmaps/view_cameratoggle.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_cameratoggle.png b/setup/data/tools/bitmaps/view_cameratoggle.png
new file mode 100644 (file)
index 0000000..375e3de
Binary files /dev/null and b/setup/data/tools/bitmaps/view_cameratoggle.png differ
diff --git a/setup/data/tools/bitmaps/view_cameraupdate.bmp b/setup/data/tools/bitmaps/view_cameraupdate.bmp
deleted file mode 100644 (file)
index dbb1195..0000000
Binary files a/setup/data/tools/bitmaps/view_cameraupdate.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_cameraupdate.png b/setup/data/tools/bitmaps/view_cameraupdate.png
new file mode 100644 (file)
index 0000000..62aa228
Binary files /dev/null and b/setup/data/tools/bitmaps/view_cameraupdate.png differ
diff --git a/setup/data/tools/bitmaps/view_change.bmp b/setup/data/tools/bitmaps/view_change.bmp
deleted file mode 100644 (file)
index 977ee1e..0000000
Binary files a/setup/data/tools/bitmaps/view_change.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_change.png b/setup/data/tools/bitmaps/view_change.png
new file mode 100644 (file)
index 0000000..e72238f
Binary files /dev/null and b/setup/data/tools/bitmaps/view_change.png differ
diff --git a/setup/data/tools/bitmaps/view_clipper.bmp b/setup/data/tools/bitmaps/view_clipper.bmp
deleted file mode 100644 (file)
index 606a209..0000000
Binary files a/setup/data/tools/bitmaps/view_clipper.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_clipper.png b/setup/data/tools/bitmaps/view_clipper.png
new file mode 100644 (file)
index 0000000..b006c0c
Binary files /dev/null and b/setup/data/tools/bitmaps/view_clipper.png differ
diff --git a/setup/data/tools/bitmaps/view_cubicclipping.bmp b/setup/data/tools/bitmaps/view_cubicclipping.bmp
deleted file mode 100644 (file)
index 16f7cb0..0000000
Binary files a/setup/data/tools/bitmaps/view_cubicclipping.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_cubicclipping.png b/setup/data/tools/bitmaps/view_cubicclipping.png
new file mode 100644 (file)
index 0000000..e01508a
Binary files /dev/null and b/setup/data/tools/bitmaps/view_cubicclipping.png differ
diff --git a/setup/data/tools/bitmaps/view_entity.bmp b/setup/data/tools/bitmaps/view_entity.bmp
deleted file mode 100644 (file)
index 851ec2c..0000000
Binary files a/setup/data/tools/bitmaps/view_entity.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/view_entity.png b/setup/data/tools/bitmaps/view_entity.png
new file mode 100644 (file)
index 0000000..4a29d90
Binary files /dev/null and b/setup/data/tools/bitmaps/view_entity.png differ
diff --git a/setup/data/tools/bitmaps/white.bmp b/setup/data/tools/bitmaps/white.bmp
deleted file mode 100644 (file)
index cbf038f..0000000
Binary files a/setup/data/tools/bitmaps/white.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/white.png b/setup/data/tools/bitmaps/white.png
new file mode 100644 (file)
index 0000000..4af01bd
Binary files /dev/null and b/setup/data/tools/bitmaps/white.png differ
diff --git a/setup/data/tools/bitmaps/window1.bmp b/setup/data/tools/bitmaps/window1.bmp
deleted file mode 100644 (file)
index a8913c7..0000000
Binary files a/setup/data/tools/bitmaps/window1.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/window1.png b/setup/data/tools/bitmaps/window1.png
new file mode 100644 (file)
index 0000000..c880b89
Binary files /dev/null and b/setup/data/tools/bitmaps/window1.png differ
diff --git a/setup/data/tools/bitmaps/window2.bmp b/setup/data/tools/bitmaps/window2.bmp
deleted file mode 100644 (file)
index 6db9e56..0000000
Binary files a/setup/data/tools/bitmaps/window2.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/window2.png b/setup/data/tools/bitmaps/window2.png
new file mode 100644 (file)
index 0000000..94e936c
Binary files /dev/null and b/setup/data/tools/bitmaps/window2.png differ
diff --git a/setup/data/tools/bitmaps/window3.bmp b/setup/data/tools/bitmaps/window3.bmp
deleted file mode 100644 (file)
index e81a299..0000000
Binary files a/setup/data/tools/bitmaps/window3.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/window3.png b/setup/data/tools/bitmaps/window3.png
new file mode 100644 (file)
index 0000000..e739968
Binary files /dev/null and b/setup/data/tools/bitmaps/window3.png differ
diff --git a/setup/data/tools/bitmaps/window4.bmp b/setup/data/tools/bitmaps/window4.bmp
deleted file mode 100644 (file)
index d753945..0000000
Binary files a/setup/data/tools/bitmaps/window4.bmp and /dev/null differ
diff --git a/setup/data/tools/bitmaps/window4.png b/setup/data/tools/bitmaps/window4.png
new file mode 100644 (file)
index 0000000..891ca41
Binary files /dev/null and b/setup/data/tools/bitmaps/window4.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.bmp
deleted file mode 100644 (file)
index 5223950..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.png b/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.png
new file mode 100644 (file)
index 0000000..0b99438
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_caulk.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.bmp
deleted file mode 100644 (file)
index 8939d5d..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.png b/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.png
new file mode 100644 (file)
index 0000000..c4de5d1
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_cleanup.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.bmp
deleted file mode 100644 (file)
index 2fcdcba..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.png b/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.png
new file mode 100644 (file)
index 0000000..2210926
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_dropent.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_merge.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_merge.bmp
deleted file mode 100644 (file)
index 2184f7a..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_merge.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_merge.png b/setup/data/tools/plugins/bitmaps/bobtoolz_merge.png
new file mode 100644 (file)
index 0000000..e50d4b1
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_merge.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_poly.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_poly.bmp
deleted file mode 100644 (file)
index e714f3b..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_poly.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_poly.png b/setup/data/tools/plugins/bitmaps/bobtoolz_poly.png
new file mode 100644 (file)
index 0000000..897cbcb
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_poly.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_split.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_split.bmp
deleted file mode 100644 (file)
index 7e1dc72..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_split.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_split.png b/setup/data/tools/plugins/bitmaps/bobtoolz_split.png
new file mode 100644 (file)
index 0000000..5387ec2
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_split.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.bmp
deleted file mode 100644 (file)
index 3d47fdc..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.png b/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.png
new file mode 100644 (file)
index 0000000..271c612
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_splitcol.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.bmp
deleted file mode 100644 (file)
index 03b1ae3..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.png b/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.png
new file mode 100644 (file)
index 0000000..c8d2863
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_splitrow.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.bmp
deleted file mode 100644 (file)
index 66537dc..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.png b/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.png
new file mode 100644 (file)
index 0000000..4a1038a
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_trainpathplot.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.bmp
deleted file mode 100644 (file)
index 5c967ab..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.png b/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.png
new file mode 100644 (file)
index 0000000..c0d8765
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_treeplanter.png differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.bmp b/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.bmp
deleted file mode 100644 (file)
index b72cb2a..0000000
Binary files a/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.png b/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.png
new file mode 100644 (file)
index 0000000..20cbb41
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/bobtoolz_turnedge.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_actorclip.bmp b/setup/data/tools/plugins/bitmaps/ufoai_actorclip.bmp
deleted file mode 100644 (file)
index 4a2887c..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_actorclip.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_actorclip.png b/setup/data/tools/plugins/bitmaps/ufoai_actorclip.png
new file mode 100644 (file)
index 0000000..0412c95
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_actorclip.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level1.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level1.bmp
deleted file mode 100644 (file)
index 80a4b29..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level1.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level1.png b/setup/data/tools/plugins/bitmaps/ufoai_level1.png
new file mode 100644 (file)
index 0000000..d5a3979
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level1.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level2.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level2.bmp
deleted file mode 100644 (file)
index e84e254..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level2.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level2.png b/setup/data/tools/plugins/bitmaps/ufoai_level2.png
new file mode 100644 (file)
index 0000000..7f07a02
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level2.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level3.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level3.bmp
deleted file mode 100644 (file)
index 141c324..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level3.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level3.png b/setup/data/tools/plugins/bitmaps/ufoai_level3.png
new file mode 100644 (file)
index 0000000..7b3f1e3
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level3.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level4.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level4.bmp
deleted file mode 100644 (file)
index 3783a80..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level4.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level4.png b/setup/data/tools/plugins/bitmaps/ufoai_level4.png
new file mode 100644 (file)
index 0000000..6801aae
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level4.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level5.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level5.bmp
deleted file mode 100644 (file)
index 8f62851..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level5.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level5.png b/setup/data/tools/plugins/bitmaps/ufoai_level5.png
new file mode 100644 (file)
index 0000000..48a9294
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level5.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level6.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level6.bmp
deleted file mode 100644 (file)
index 418fdd2..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level6.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level6.png b/setup/data/tools/plugins/bitmaps/ufoai_level6.png
new file mode 100644 (file)
index 0000000..eab3b50
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level6.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level7.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level7.bmp
deleted file mode 100644 (file)
index d82dab6..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level7.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level7.png b/setup/data/tools/plugins/bitmaps/ufoai_level7.png
new file mode 100644 (file)
index 0000000..bfb85a7
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level7.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level8.bmp b/setup/data/tools/plugins/bitmaps/ufoai_level8.bmp
deleted file mode 100644 (file)
index c380953..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_level8.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_level8.png b/setup/data/tools/plugins/bitmaps/ufoai_level8.png
new file mode 100644 (file)
index 0000000..686d8b1
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_level8.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_nodraw.bmp b/setup/data/tools/plugins/bitmaps/ufoai_nodraw.bmp
deleted file mode 100644 (file)
index 3eaa529..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_nodraw.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_nodraw.png b/setup/data/tools/plugins/bitmaps/ufoai_nodraw.png
new file mode 100644 (file)
index 0000000..5dbf903
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_nodraw.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_stepon.bmp b/setup/data/tools/plugins/bitmaps/ufoai_stepon.bmp
deleted file mode 100644 (file)
index b73896f..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_stepon.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_stepon.png b/setup/data/tools/plugins/bitmaps/ufoai_stepon.png
new file mode 100644 (file)
index 0000000..7ad5d5b
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_stepon.png differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.bmp b/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.bmp
deleted file mode 100644 (file)
index 799468b..0000000
Binary files a/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.bmp and /dev/null differ
diff --git a/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.png b/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.png
new file mode 100644 (file)
index 0000000..d1fea27
Binary files /dev/null and b/setup/data/tools/plugins/bitmaps/ufoai_weaponclip.png differ
index c349b498c3b4003cd2bdd2355453527343fb5d93..3a5902924879880f863cb0fed11408bfbeb17ccf 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "inout.h"
 #include "cmdlib.h"
+#include "etclib.h"
 #include "imagelib.h"
 #include "vfs.h"
 
@@ -1232,3 +1233,302 @@ void Load32BitImage( const char *name, unsigned **pixels,  int *width, int *heig
                }
        }
 }
+
+
+/*
+   ============================================================================
+
+   KHRONOS TEXTURE
+
+   ============================================================================
+ */
+
+
+#define KTX_UINT32_LE( buf ) ( ( unsigned int )( (buf)[0] | ( (buf)[1] << 8 ) | ( (buf)[2] << 16 ) | ( (buf)[3] << 24 ) ) )
+#define KTX_UINT32_BE( buf ) ( ( unsigned int )( (buf)[3] | ( (buf)[2] << 8 ) | ( (buf)[1] << 16 ) | ( (buf)[0] << 24 ) ) )
+
+#define KTX_TYPE_UNSIGNED_BYTE                         0x1401
+#define KTX_TYPE_UNSIGNED_SHORT_4_4_4_4                0x8033
+#define KTX_TYPE_UNSIGNED_SHORT_5_5_5_1                0x8034
+#define KTX_TYPE_UNSIGNED_SHORT_5_6_5          0x8363
+
+#define KTX_FORMAT_ALPHA                                       0x1906
+#define KTX_FORMAT_RGB                                         0x1907
+#define KTX_FORMAT_RGBA                                                0x1908
+#define KTX_FORMAT_LUMINANCE                           0x1909
+#define KTX_FORMAT_LUMINANCE_ALPHA                     0x190A
+#define KTX_FORMAT_BGR                                         0x80E0
+#define KTX_FORMAT_BGRA                                                0x80E1
+
+#define KTX_FORMAT_ETC1_RGB8                           0x8D64
+
+static void KTX_DecodeA8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = out[1] = out[2] = 0;
+       out[3] = in[0];
+}
+
+static void KTX_DecodeRGB8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = in[0];
+       out[1] = in[1];
+       out[2] = in[2];
+       out[3] = 255;
+}
+
+static void KTX_DecodeRGBA8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = in[0];
+       out[1] = in[1];
+       out[2] = in[2];
+       out[3] = in[3];
+}
+
+static void KTX_DecodeL8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = out[1] = out[2] = in[0];
+       out[3] = 255;
+}
+
+static void KTX_DecodeLA8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = out[1] = out[2] = in[0];
+       out[3] = in[1];
+}
+
+static void KTX_DecodeBGR8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = in[2];
+       out[1] = in[1];
+       out[2] = in[0];
+       out[3] = 255;
+}
+
+static void KTX_DecodeBGRA8( const byte *in, qboolean bigEndian, byte *out ){
+       out[0] = in[2];
+       out[1] = in[1];
+       out[2] = in[0];
+       out[3] = in[3];
+}
+
+static void KTX_DecodeRGBA4( const byte *in, qboolean bigEndian, byte *out ){
+       unsigned short rgba;
+       int r, g, b, a;
+
+       if ( bigEndian ) {
+               rgba = ( in[0] << 8 ) | in[1];
+       }
+       else {
+               rgba = ( in[1] << 8 ) | in[0];
+       }
+
+       r = ( rgba >> 12 ) & 0xf;
+       g = ( rgba >> 8 ) & 0xf;
+       b = ( rgba >> 4 ) & 0xf;
+       a = rgba & 0xf;
+       out[0] = ( r << 4 ) | r;
+       out[1] = ( g << 4 ) | g;
+       out[2] = ( b << 4 ) | b;
+       out[3] = ( a << 4 ) | a;
+}
+
+static void KTX_DecodeRGBA5( const byte *in, qboolean bigEndian, byte *out ){
+       unsigned short rgba;
+       int r, g, b;
+
+       if ( bigEndian ) {
+               rgba = ( in[0] << 8 ) | in[1];
+       }
+       else {
+               rgba = ( in[1] << 8 ) | in[0];
+       }
+
+       r = ( rgba >> 11 ) & 0x1f;
+       g = ( rgba >> 6 ) & 0x1f;
+       b = ( rgba >> 1 ) & 0x1f;
+       out[0] = ( r << 3 ) | ( r >> 2 );
+       out[1] = ( g << 3 ) | ( g >> 2 );
+       out[2] = ( b << 3 ) | ( b >> 2 );
+       out[3] = ( rgba & 1 ) * 255;
+}
+
+static void KTX_DecodeRGB5( const byte *in, qboolean bigEndian, byte *out ){
+       unsigned short rgba;
+       int r, g, b;
+
+       if ( bigEndian ) {
+               rgba = ( in[0] << 8 ) | in[1];
+       }
+       else {
+               rgba = ( in[1] << 8 ) | in[0];
+       }
+
+       r = ( rgba >> 11 ) & 0x1f;
+       g = ( rgba >> 5 ) & 0x3f;
+       b = rgba & 0x1f;
+       out[0] = ( r << 3 ) | ( r >> 2 );
+       out[1] = ( g << 2 ) | ( g >> 4 );
+       out[2] = ( b << 3 ) | ( b >> 2 );
+       out[3] = 255;
+}
+
+typedef struct
+{
+       unsigned int type;
+       unsigned int format;
+       unsigned int pixelSize;
+       void ( *decode )( const byte *in, qboolean bigEndian, byte *out );
+} KTX_UncompressedFormat_t;
+
+static const KTX_UncompressedFormat_t KTX_UncompressedFormats[] =
+{
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_ALPHA, 1, KTX_DecodeA8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_RGB, 3, KTX_DecodeRGB8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_RGBA, 4, KTX_DecodeRGBA8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_LUMINANCE, 1, KTX_DecodeL8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_LUMINANCE_ALPHA, 2, KTX_DecodeLA8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_BGR, 3, KTX_DecodeBGR8 },
+       { KTX_TYPE_UNSIGNED_BYTE, KTX_FORMAT_BGRA, 4, KTX_DecodeBGRA8 },
+       { KTX_TYPE_UNSIGNED_SHORT_4_4_4_4, KTX_FORMAT_RGBA, 2, KTX_DecodeRGBA4 },
+       { KTX_TYPE_UNSIGNED_SHORT_5_5_5_1, KTX_FORMAT_RGBA, 2, KTX_DecodeRGBA5 },
+       { KTX_TYPE_UNSIGNED_SHORT_5_6_5, KTX_FORMAT_RGB, 2, KTX_DecodeRGB5 },
+       { 0, 0, 0, NULL }
+};
+
+static qboolean KTX_DecodeETC1( const byte* in, size_t inSize, unsigned int width, unsigned int height, byte* out ){
+       unsigned int y, stride = width * 4;
+       byte rgba[64];
+
+       if ( inSize < ( ( ( ( width + 3 ) & ~3 ) * ( ( height + 3 ) & ~3 ) ) >> 1 ) ) {
+               return qfalse;
+       }
+
+       for ( y = 0; y < height; y += 4, out += stride * 4 )
+       {
+               byte *p;
+               unsigned int x, blockrows;
+
+               blockrows = height - y;
+               if ( blockrows > 4 ) {
+                       blockrows = 4;
+               }
+
+               p = out;
+               for ( x = 0; x < width; x += 4, p += 16 )
+               {
+                       unsigned int blockrowsize, blockrow;
+
+                       ETC_DecodeETC1Block( in, rgba, qtrue );
+                       in += 8;
+
+                       blockrowsize = width - x;
+                       if ( blockrowsize > 4 ) {
+                               blockrowsize = 4;
+                       }
+                       blockrowsize *= 4;
+                       for ( blockrow = 0; blockrow < blockrows; blockrow++ )
+                       {
+                               memcpy( p + blockrow * stride, rgba + blockrow * 16, blockrowsize );
+                       }
+               }
+       }
+
+       return qtrue;
+}
+
+#define KTX_HEADER_UINT32( buf ) ( bigEndian ? KTX_UINT32_BE( buf ) : KTX_UINT32_LE( buf ) )
+
+void LoadKTXBufferFirstImage( const byte *buffer, size_t bufSize, byte **pic, int *picWidth, int *picHeight ){
+       unsigned int type, format, width, height, imageOffset;
+       byte *pixels;
+
+       if ( bufSize < 64 ) {
+               Error( "LoadKTX: Image doesn't have a header" );
+       }
+
+       if ( memcmp( buffer, "\xABKTX 11\xBB\r\n\x1A\n", 12 ) ) {
+               Error( "LoadKTX: Image has the wrong identifier" );
+       }
+
+       qboolean bigEndian = ( buffer[4] == 4 );
+
+       type = KTX_HEADER_UINT32( buffer + 16 );
+       if ( type ) {
+               format = KTX_HEADER_UINT32( buffer + 32 );
+       }
+       else {
+               format = KTX_HEADER_UINT32( buffer + 28 );
+       }
+
+       width = KTX_HEADER_UINT32( buffer + 36 );
+       height = KTX_HEADER_UINT32( buffer + 40 );
+       if ( !width ) {
+               Error( "LoadKTX: Image has zero width" );
+       }
+       if ( !height ) {
+               height = 1;
+       }
+       if ( picWidth ) {
+               *picWidth = width;
+       }
+       if ( picHeight ) {
+               *picHeight = height;
+       }
+
+       imageOffset = 64 + KTX_HEADER_UINT32( buffer + 60 ) + 4;
+       if ( bufSize < imageOffset ) {
+               Error( "LoadKTX: No image in the file" );
+       }
+       buffer += imageOffset;
+       bufSize -= imageOffset;
+
+       pixels = safe_malloc( width * height * 4 );
+       *pic = pixels;
+
+       if ( type ) {
+               const KTX_UncompressedFormat_t *ktxFormat = KTX_UncompressedFormats;
+               unsigned int pixelSize;
+               unsigned int inRowLength, inPadding;
+               unsigned int y;
+
+               while ( ktxFormat->type )
+               {
+                       if ( ktxFormat->type == type && ktxFormat->format == format ) {
+                               break;
+                       }
+                       ktxFormat++;
+               }
+               if ( !ktxFormat->type ) {
+                       Error( "LoadKTX: Image has an unsupported pixel type 0x%X or format 0x%X", type, format );
+               }
+
+               pixelSize = ktxFormat->pixelSize;
+               inRowLength = width * pixelSize;
+               inPadding = ( ( inRowLength + 3 ) & ~3 ) - inRowLength;
+
+               if ( bufSize < height * ( inRowLength + inPadding ) ) {
+                       Error( "LoadKTX: Image is truncated" );
+               }
+
+               for ( y = 0; y < height; y++ )
+               {
+                       unsigned int x;
+                       for ( x = 0; x < width; x++, buffer += pixelSize, pixels += 4 )
+                       {
+                               ktxFormat->decode( buffer, bigEndian, pixels );
+                       }
+                       buffer += inPadding;
+               }
+       }
+       else {
+               qboolean decoded = qfalse;
+
+               switch ( format )
+               {
+               case KTX_FORMAT_ETC1_RGB8:
+                       decoded = KTX_DecodeETC1( buffer, bufSize, width, height, pixels );
+                       break;
+               default:
+                       Error( "LoadKTX: Image has an unsupported compressed format format 0x%X", format );
+                       break;
+               }
+
+               if ( !decoded ) {
+                       Error( "LoadKTX: Image is truncated" );
+               }
+       }
+}
index 194ac5b13e2edea15dfb660b37d188d95b969cde..8c00f7ce15891718cc4d61cc6d9c61c88f10a878 100644 (file)
@@ -43,3 +43,5 @@ void WriteTGAGray( const char *filename, byte *data, int width, int height );
 int LoadJPGBuff( void *src_buffer, int src_size, unsigned char **pic, int *width, int *height );
 
 void Load32BitImage( const char *name, unsigned **pixels, int *width, int *height );
+
+void LoadKTXBufferFirstImage( const byte *buffer, size_t bufSize, byte **pic, int *picWidth, int *picHeight );
index 4d44bf36c8743ac9dd5a58f6c661f80a15dcee88..04946dd2f72edfc87566a954fee655d57becd854 100644 (file)
@@ -538,7 +538,7 @@ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
        size_t stacksize;
 
        int start, end;
-       int i = 0, status = 0;
+       int i = 0;
 
        start     = I_FloatTime();
        pacifier  = showpacifier;
@@ -582,7 +582,7 @@ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
                }
                for ( i = 0 ; i < numthreads ; i++ )
                {
-                       if ( pthread_join( work_threads[i], (void **)&status ) != 0 ) {
+                       if ( pthread_join( work_threads[i], NULL ) != 0 ) {
                                Error( "pthread_join failed" );
                        }
                }
index 60062a1705b983c641a27cd0c70f402bb34911c2..c1c737f51b3282b74d827a80fd9fe06110ec7346 100644 (file)
@@ -430,6 +430,16 @@ image_t *ImageLoad( const char *filename ){
                                        }
                                        #endif
                                }
+                               else
+                               {
+                                       /* attempt to load ktx */
+                                       StripExtension( name );
+                                       strcat( name, ".ktx" );
+                                       size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 );
+                                       if ( size > 0 ) {
+                                               LoadKTXBufferFirstImage( buffer, size, &image->pixels, &image->width, &image->height );
+                                       }
+                               }
                        }
                }
        }
index 76591a2ad29391bfd6b54cf43b17b912ace87f9a..8517b0bc6f113618b4489a568e05b29041de70e5 100644 (file)
@@ -1705,6 +1705,364 @@ int ConvertBSPMain( int argc, char **argv ){
 }
 
 
+struct HelpOption
+{
+       const char* name;
+       const char* description;
+};
+
+void HelpOptions(const char* group_name, int indentation, int width, struct HelpOption* options, int count)
+{
+       indentation *= 2;
+       char* indent = malloc(indentation+1);
+       memset(indent, ' ', indentation);
+       indent[indentation] = 0;
+       printf("%s%s:\n", indent, group_name);
+       indentation += 2;
+       indent = realloc(indent, indentation+1);
+       memset(indent, ' ', indentation);
+       indent[indentation] = 0;
+
+       int i;
+       for ( i = 0; i < count; i++ )
+       {
+               int printed = printf("%s%-24s  ", indent, options[i].name);
+               int descsz = strlen(options[i].description);
+               int j = 0;
+               while ( j < descsz && descsz-j > width - printed )
+               {
+                       if ( j != 0 )
+                               printf("%s%26c",indent,' ');
+                       int fragment = width - printed;
+                       while ( fragment > 0 && options[i].description[j+fragment-1] != ' ')
+                                       fragment--;
+                       j += fwrite(options[i].description+j, sizeof(char), fragment, stdout);
+                       putchar('\n');
+                       printed = indentation+26;
+               }
+               if ( j == 0 )
+               {
+                       printf("%s\n",options[i].description+j);
+               }
+               else if ( j < descsz )
+               {
+                       printf("%s%26c%s\n",indent,' ',options[i].description+j);
+               }
+       }
+
+       putchar('\n');
+
+       free(indent);
+}
+
+void HelpBsp()
+{
+       struct HelpOption bsp[] = {
+               {"-bsp <filename.map>", "Switch that enters this stage"},
+               {"-altsplit", "Alternate BSP tree splitting weights (should give more fps)"},
+               {"-celshader <shadername>", "Sets a global cel shader name"},
+               {"-custinfoparms", "Read scripts/custinfoparms.txt"},
+               {"-debuginset", "Push all triangle vertexes towards the triangle center"},
+               {"-debugportals", "Make BSP portals visible in the map"},
+               {"-debugsurfaces", "Color the vertexes according to the index of the surface"},
+               {"-deep", "Use detail brushes in the BSP tree, but at lowest priority (should give more fps)"},
+               {"-de <F>", "Distance epsilon for plane snapping etc."},
+               {"-fakemap", "Write fakemap.map containing all world brushes"},
+               {"-flares", "Turn on support for flares (TEST?)"},
+               {"-flat", "Enable flat shading (good for combining with -celshader)"},
+               {"-fulldetail", "Treat detail brushes as structural ones"},
+               {"-leaktest", "Abort if a leak was found"},
+               {"-meta", "Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)"},
+               {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
+               {"-mi <N>", "Sets the maximum number of indexes per surface"},
+               {"-mv <N>", "Sets the maximum number of vertices of a lightmapped surface"},
+               {"-ne <F>", "Normal epsilon for plane snapping etc."},
+               {"-nocurves", "Turn off support for patches"},
+               {"-nodetail", "Leave out detail brushes"},
+               {"-noflares", "Turn off support for flares"},
+               {"-nofog", "Turn off support for fog volumes"},
+               {"-nohint", "Turn off support for hint brushes"},
+               {"-nosubdivide", "Turn off support for `q3map_tessSize` (breaks water vertex deforms)"},
+               {"-notjunc", "Do not fix T-junctions (causes cracks between triangles, do not use)"},
+               {"-nowater", "Turn off support for water, slime or lava (Stef, this is for you)"},
+               {"-np <A>", "Force all surfaces to be nonplanar with a given shade angle"},
+               {"-onlyents", "Only update entities in the BSP"},
+               {"-patchmeta", "Turn patches into triangle meshes for display"},
+               {"-rename", "Append â€œbspâ€\9d suffix to miscmodel shaders (needed for SoF2)"},
+               {"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
+               {"-skyfix", "Turn sky box into six surfaces to work around ATI problems"},
+               {"-snap <N>", "Snap brush bevel planes to the given number of units"},
+               {"-tempname <filename.map>", "Read the MAP file from the given file name"},
+               {"-texrange <N>", "Limit per-surface texture range to the given number of units, and subdivide surfaces like with `q3map_tessSize` if this is not met"},
+               {"-tmpout", "Write the BSP file to /tmp"},
+               {"-verboseentities", "Enable `-v` only for map entities, not for the world"},
+       };
+       HelpOptions("BSP Stage", 0, 80, bsp, sizeof(bsp)/sizeof(struct HelpOption));
+}
+void HelpVis()
+{
+       struct HelpOption vis[] = {
+               {"-vis <filename.map>", "Switch that enters this stage"},
+               {"-fast", "Very fast and crude vis calculation"},
+               {"-mergeportals", "The less crude half of `-merge`, makes vis sometimes much faster but doesn't hurt fps usually"},
+               {"-merge", "Faster but still okay vis calculation"},
+               {"-nopassage", "Just use PortalFlow vis (usually less fps)"},
+               {"-nosort", "Do not sort the portals before calculating vis (usually slower)"},
+               {"-passageOnly", "Just use PassageFlow vis (usually less fps)"},
+               {"-saveprt", "Keep the PRT file after running vis (so you can run vis again)"},
+               {"-tmpin", "Use /tmp folder for input"},
+               {"-tmpout", "Use /tmp folder for output"},
+       };
+       HelpOptions("VIS Stage", 0, 80, vis, sizeof(vis)/sizeof(struct HelpOption));
+}
+void HelpLight()
+{
+       struct HelpOption light[] = {
+               {"-light <filename.map>", "Switch that enters this stage"},
+               {"-vlight <filename.map>", "Deprecated alias for `-light -fast` ... filename.map"},
+               {"-approx <N>", "Vertex light approximation tolerance (never use in conjunction with deluxemapping)"},
+               {"-areascale <F, `-area` F>", "Scaling factor for area lights (surfacelight)"},
+               {"-border", "Add a red border to lightmaps for debugging"},
+               {"-bouncegrid", "Also compute radiosity on the light grid"},
+               {"-bounceonly", "Only compute radiosity"},
+               {"-bouncescale <F>", "Scaling factor for radiosity"},
+               {"-bounce <N>", "Number of bounces for radiosity"},
+               {"-cheapgrid", "Use `-cheap` style lighting for radiosity"},
+               {"-cheap", "Abort vertex light calculations when white is reached"},
+               {"-compensate <F>", "Lightmap compensate (darkening factor applied after everything else)"},
+               {"-cpma", "CPMA vertex lighting mode"},
+               {"-custinfoparms", "Read scripts/custinfoparms.txt"},
+               {"-dark", "Darken lightmap seams"},
+               {"-debugaxis", "Color the lightmaps according to the lightmap axis"},
+               {"-debugcluster", "Color the lightmaps according to the index of the cluster"},
+               {"-debugdeluxe", "Show deluxemaps on the lightmap"},
+               {"-debugnormals", "Color the lightmaps according to the direction of the surface normal"},
+               {"-debugorigin", "Color the lightmaps according to the origin of the luxels"},
+               {"-debugsurfaces, -debugsurface", "Color the lightmaps according to the index of the surface"},
+               {"-debugunused", "This option does nothing"},
+               {"-debug", "Mark the lightmaps according to the cluster: unmapped clusters get yellow, occluded ones get pink, flooded ones get blue overlay color, otherwise red"},
+               {"-deluxemode 0", "Use modelspace deluxemaps (DarkPlaces)"},
+               {"-deluxemode 1", "Use tangentspace deluxemaps"},
+               {"-deluxe, -deluxemap", "Enable deluxemapping (light direction maps)"},
+               {"-dirtdebug, -debugdirt", "Store the dirtmaps as lightmaps for debugging"},
+               {"-dirtdepth", "Dirtmapping depth"},
+               {"-dirtgain", "Dirtmapping exponent"},
+               {"-dirtmode 0", "Ordered direction dirtmapping"},
+               {"-dirtmode 1", "Randomized direction dirtmapping"},
+               {"-dirtscale", "Dirtmapping scaling factor"},
+               {"-dirty", "Enable dirtmapping"},
+               {"-dump", "Dump radiosity from `-bounce` into numbered MAP file prefabs"},
+               {"-export", "Export lightmaps when compile finished (like `-export` mode)"},
+               {"-exposure <F>", "Lightmap exposure to better support overbright spots"},
+               {"-external", "Force external lightmaps even if at size of internal lightmaps"},
+               {"-extravisnudge", "Broken feature to nudge the luxel origin to a better vis cluster"},
+               {"-extrawide", "Deprecated alias for `-super 2 -filter`"},
+               {"-extra", "Deprecated alias for `-super 2`"},
+               {"-fastbounce", "Use `-fast` style lighting for radiosity"},
+               {"-faster", "Use a faster falloff curve for lighting; also implies `-fast`"},
+               {"-fastgrid", "Use `-fast` style lighting for the light grid"},
+               {"-fast", "Ignore tiny light contributions"},
+               {"-filter", "Lightmap filtering"},
+               {"-floodlight", "Enable floodlight (zero-effort somewhat decent lighting)"},
+               {"-gamma <F>", "Lightmap gamma"},
+               {"-gridambientscale <F>", "Scaling factor for the light grid ambient components only"},
+               {"-gridscale <F>", "Scaling factor for the light grid only"},
+               {"-keeplights", "Keep light entities in the BSP file after compile"},
+               {"-lightmapdir <directory>", "Directory to store external lightmaps (default: same as map name without extension)"},
+               {"-lightmapsize <N>", "Size of lightmaps to generate (must be a power of two)"},
+               {"-lomem", "Low memory but slower lighting mode"},
+               {"-lowquality", "Low quality floodlight (appears to currently break floodlight)"},
+               {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
+               {"-nocollapse", "Do not collapse identical lightmaps"},
+               {"-nodeluxe, -nodeluxemap", "Disable deluxemapping"},
+               {"-nogrid", "Disable grid light calculation (makes all entities fullbright)"},
+               {"-nolightmapsearch", "Do not optimize lightmap packing for GPU memory usage (as doing so costs fps)"},
+               {"-normalmap", "Color the lightmaps according to the direction of the surface normal (TODO is this identical to `-debugnormals`?)"},
+               {"-nostyle, -nostyles", "Disable support for light styles"},
+               {"-nosurf", "Disable tracing against surfaces (only uses BSP nodes then)"},
+               {"-notrace", "Disable shadow occlusion"},
+               {"-novertex", "Disable vertex lighting"},
+               {"-patchshadows", "Cast shadows from patches"},
+               {"-pointscale <F, `-point` F>", "Scaling factor for point lights (light entities)"},
+               {"-q3", "Use nonlinear falloff curve by default (like Q3A)"},
+               {"-samplescale <F>", "Scales all lightmap resolutions"},
+               {"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
+               {"-samples <N>", "Adaptive supersampling quality"},
+               {"-scale <F>", "Scaling factor for all light types"},
+               {"-shadeangle <A>", "Angle for phong shading"},
+               {"-shade", "Enable phong shading at default shade angle"},
+               {"-skyscale <F, `-sky` F>", "Scaling factor for sky and sun light"},
+               {"-smooth", "Deprecated alias for `-samples 2`"},
+               {"-style, -styles", "Enable support for light styles"},
+               {"-sunonly", "Only compute sun light"},
+               {"-super <N, `-supersample` N>", "Ordered grid supersampling quality"},
+               {"-thresh <F>", "Triangle subdivision threshold"},
+               {"-trianglecheck", "Broken check that should ensure luxels apply to the right triangle"},
+               {"-trisoup", "Convert brush faces to triangle soup"},
+               {"-wolf", "Use linear falloff curve by default (like W:ET)"},
+       };
+
+       HelpOptions("Light Stage", 0, 80, light, sizeof(light)/sizeof(struct HelpOption));
+}
+
+void HelpAnalize()
+{
+       struct HelpOption analize[] = {
+               {"-analyze <filename.bsp>", "Switch that enters this mode"},
+               {"-lumpswap", "Swap byte order in the lumps"},
+       };
+
+       HelpOptions("Analyzing BSP-like file structure", 0, 80, analize, sizeof(analize)/sizeof(struct HelpOption));
+}
+void HelpScale()
+{
+       struct HelpOption scale[] = {
+               {"-scale <S filename.bsp>", "Scale uniformly"},
+               {"-scale <SX SY SZ filename.bsp>", "Scale non-uniformly"},
+               {"-scale -tex <S filename.bsp>", "Scale uniformly without texture lock"},
+               {"-scale -tex <SX SY SZ filename.bsp>", "Scale non-uniformly without texture lock"},
+       };
+       HelpOptions("Scaling", 0, 80, scale, sizeof(scale)/sizeof(struct HelpOption));
+}
+void HelpConvert()
+{
+       struct HelpOption convert[] = {
+               {"-convert <filename.bsp>", "Switch that enters this mode"},
+               {"-de <number>", "Distance epsilon for the conversion"},
+               {"-format <converter>", "Select the converter (available: map, ase, or game names)"},
+               {"-ne <F>", "Normal epsilon for the conversion"},
+               {"-shadersasbitmap", "(only for ase) use the shader names as \\*BITMAP key so they work as prefabs"},
+       };
+
+       HelpOptions("Converting & Decompiling", 0, 80, convert, sizeof(convert)/sizeof(struct HelpOption));
+}
+
+void HelpExport()
+{
+       struct HelpOption exportl[] = {
+               {"-export <filename.bsp>", "Copies lightmaps from the BSP to `filename/lightmap_0000.tga` ff"}
+       };
+
+       HelpOptions("Exporting lightmaps", 0, 80, exportl, sizeof(exportl)/sizeof(struct HelpOption));
+}
+
+void HelpFixaas()
+{
+       struct HelpOption fixaas[] = {
+               {"-fixaas <filename.bsp>", "Switch that enters this mode"},
+       };
+
+       HelpOptions("Fixing AAS checksum", 0, 80, fixaas, sizeof(fixaas)/sizeof(struct HelpOption));
+}
+
+void HelpInfo()
+{
+       struct HelpOption info[] = {
+               {"-info <filename.bsp>", "Switch that enters this mode"},
+       };
+
+       HelpOptions("Get info about BSP file", 0, 80, info, sizeof(info)/sizeof(struct HelpOption));
+}
+
+void HelpImport()
+{
+       struct HelpOption import[] = {
+               {"-import <filename.bsp>", "Copies lightmaps from `filename/lightmap_0000.tga` ff into the BSP"},
+       };
+
+       HelpOptions("Importing lightmaps", 0, 80, import, sizeof(import)/sizeof(struct HelpOption));
+}
+
+void HelpMinimap()
+{
+       struct HelpOption minimap[] = {
+               {"-minimap <filename.bsp>", "Creates a minimap of the BSP, by default writes to `../gfx/filename_mini.tga`"},
+               {"-black", "Write the minimap as a black-on-transparency RGBA32 image"},
+               {"-boost <F>", "Sets the contrast boost value (higher values make a brighter image); contrast boost is somewhat similar to gamma, but continuous even at zero"},
+               {"-border <F>", "Sets the amount of border pixels relative to the total image size"},
+               {"-gray", "Write the minimap as a white-on-black GRAY8 image"},
+               {"-keepaspect", "Ensure the aspect ratio is kept (the minimap is then letterboxed to keep aspect)"},
+               {"-minmax <xmin ymin zmin xmax ymax zmax>", "Forces specific map dimensions (note: the minimap actually uses these dimensions, scaled to the target size while keeping aspect with centering, and 1/64 of border appended to all sides)"},
+               {"-nokeepaspect", "Do not ensure the aspect ratio is kept (makes it easier to use the image in your code, but looks bad together with sharpening)"},
+               {"-o <filename.tga>", "Sets the output file name"},
+               {"-random <N>", "Sets the randomized supersampling count (cannot be combined with `-samples`)"},
+               {"-samples <N>", "Sets the ordered supersampling count (cannot be combined with `-random`)"},
+               {"-sharpen <F>", "Sets the sharpening coefficient"},
+               {"-size <N>", "Sets the width and height of the output image"},
+               {"-white", "Write the minimap as a white-on-transparency RGBA32 image"},
+       };
+
+       HelpOptions("MiniMap", 0, 80, minimap, sizeof(minimap)/sizeof(struct HelpOption));
+}
+
+void HelpCommon()
+{
+       struct HelpOption common[] = {
+               {"-connect <address>", "Talk to a NetRadiant instance using a specific XML based protocol"},
+               {"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash"},
+               {"-fs_basepath <path>", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"},
+               {"-fs_game <gamename>", "Sets a different game directory name (default for Q3A: baseq3)"},
+               {"-fs_homebase <dir>", "Specifies where the user home directory name is on Linux (default for Q3A: .q3a)"},
+               {"-game <gamename>", "Load settings for the given game (default: quake3)"},
+               {"-subdivisions <F>", "multiplier for patch subdivisions quality"},
+               {"-threads <N>", "number of threads to use"},
+               {"-v", "Verbose mode"}
+       };
+
+       HelpOptions("Common Options", 0, 80, common, sizeof(common)/sizeof(struct HelpOption));
+
+}
+
+void Help(const char* arg)
+{
+       printf("Usage: q3map2 [stage] [common options...] [stage options...] [stage source file]\n");
+       printf("       q3map2 -help [stage]\n\n");
+
+       HelpCommon();
+
+       struct HelpOption stages[] = {
+               {"-bsp", "BSP Stage"},
+               {"-vis", "VIS Stage"},
+               {"-light", "Light Stage"},
+               {"-analize", "Analyzing BSP-like file structure"},
+               {"-scale", "Scaling"},
+               {"-convert", "Converting & Decompiling"},
+               {"-export", "Exporting lightmaps"},
+               {"-fixaas", "Fixing AAS checksum"},
+               {"-info", "Get info about BSP file"},
+               {"-import", "Importing lightmaps"},
+               {"-minimap", "MiniMap"},
+       };
+       void(*help_funcs[])() = {
+               HelpBsp,
+               HelpVis,
+               HelpLight,
+               HelpAnalize,
+               HelpScale,
+               HelpConvert,
+               HelpExport,
+               HelpFixaas,
+               HelpInfo,
+               HelpImport,
+               HelpMinimap
+       };
+
+       if ( arg && strlen(arg) > 0 )
+       {
+               if ( arg[0] == '-' )
+                       arg++;
+
+               unsigned i;
+               for ( i = 0; i < sizeof(stages)/sizeof(struct HelpOption); i++ )
+                       if ( strcmp(arg, stages[i].name+1) == 0 )
+                       {
+                               help_funcs[i]();
+                               return;
+                       }
+       }
+
+       HelpOptions("Stages", 0, 80, stages, sizeof(stages)/sizeof(struct HelpOption));
+}
 
 /*
    main()
@@ -1731,6 +2089,13 @@ int main( int argc, char **argv ){
        /* read general options first */
        for ( i = 1; i < argc; i++ )
        {
+               /* -help */
+               if ( !strcmp( argv[ i ], "-h" ) || !strcmp( argv[ i ], "--help" )
+                       || !strcmp( argv[ i ], "-help" ) ) {
+                       Help(argv[i+1]);
+                       return 0;
+               }
+
                /* -connect */
                if ( !strcmp( argv[ i ], "-connect" ) ) {
                        argv[ i ] = NULL;