my own uncrustify run
authorRudolf Polzer <divverent@alientrap.org>
Tue, 27 Mar 2012 10:03:21 +0000 (12:03 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 27 Mar 2012 10:03:21 +0000 (12:03 +0200)
1056 files changed:
conftest.cpp
contrib/bkgrnd2d/bkgrnd2d.cpp
contrib/bkgrnd2d/bkgrnd2d.h
contrib/bkgrnd2d/dialog.cpp
contrib/bkgrnd2d/dialog.h
contrib/bkgrnd2d/plugin.cpp
contrib/bkgrnd2d/plugin.h
contrib/bobtoolz/CPortals.h
contrib/bobtoolz/DBobView.cpp
contrib/bobtoolz/DBobView.h
contrib/bobtoolz/DBrush.cpp
contrib/bobtoolz/DBrush.h
contrib/bobtoolz/DEPair.cpp
contrib/bobtoolz/DEPair.h
contrib/bobtoolz/DEntity.cpp
contrib/bobtoolz/DEntity.h
contrib/bobtoolz/DMap.cpp
contrib/bobtoolz/DMap.h
contrib/bobtoolz/DPatch.cpp
contrib/bobtoolz/DPatch.h
contrib/bobtoolz/DPlane.cpp
contrib/bobtoolz/DPlane.h
contrib/bobtoolz/DPoint.cpp
contrib/bobtoolz/DPoint.h
contrib/bobtoolz/DShape.cpp
contrib/bobtoolz/DShape.h
contrib/bobtoolz/DTrainDrawer.cpp
contrib/bobtoolz/DTrainDrawer.h
contrib/bobtoolz/DTreePlanter.cpp
contrib/bobtoolz/DTreePlanter.h
contrib/bobtoolz/DVisDrawer.cpp
contrib/bobtoolz/DVisDrawer.h
contrib/bobtoolz/DWinding.cpp
contrib/bobtoolz/DWinding.h
contrib/bobtoolz/ScriptParser.cpp
contrib/bobtoolz/ScriptParser.h
contrib/bobtoolz/StdAfx.cpp
contrib/bobtoolz/StdAfx.h
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/bobToolz.h
contrib/bobtoolz/bsploader.cpp
contrib/bobtoolz/bsploader.h
contrib/bobtoolz/cportals.cpp
contrib/bobtoolz/ctfToolz-GTK.cpp
contrib/bobtoolz/ctfresource_gtk.h
contrib/bobtoolz/dialogs/AboutDialog.cpp
contrib/bobtoolz/dialogs/AboutDialog.h
contrib/bobtoolz/dialogs/AutoCaulkDialog.cpp
contrib/bobtoolz/dialogs/AutoCaulkDialog.h
contrib/bobtoolz/dialogs/AutoCaulkStartDialog.cpp
contrib/bobtoolz/dialogs/AutoCaulkStartDialog.h
contrib/bobtoolz/dialogs/BrushCheckDialog.h
contrib/bobtoolz/dialogs/DoorDialog.cpp
contrib/bobtoolz/dialogs/DoorDialog.h
contrib/bobtoolz/dialogs/IntersectDialog.cpp
contrib/bobtoolz/dialogs/IntersectDialog.h
contrib/bobtoolz/dialogs/IntersectInfoDialog.cpp
contrib/bobtoolz/dialogs/IntersectInfoDialog.h
contrib/bobtoolz/dialogs/PolygonDialog.cpp
contrib/bobtoolz/dialogs/PolygonDialog.h
contrib/bobtoolz/dialogs/StairDialog.cpp
contrib/bobtoolz/dialogs/StairDialog.h
contrib/bobtoolz/dialogs/TextureResetDialog.cpp
contrib/bobtoolz/dialogs/TextureResetDialog.h
contrib/bobtoolz/dialogs/brushcheckdialog.cpp
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/bobtoolz/dialogs/dialogs-gtk.h
contrib/bobtoolz/dialogs/pathplotterdialog.cpp
contrib/bobtoolz/dialogs/pathplotterdialog.h
contrib/bobtoolz/funchandlers-GTK.cpp
contrib/bobtoolz/funchandlers-ctf-GTK.cpp
contrib/bobtoolz/funchandlers.cpp
contrib/bobtoolz/funchandlers.h
contrib/bobtoolz/lists.cpp
contrib/bobtoolz/lists.h
contrib/bobtoolz/misc.cpp
contrib/bobtoolz/misc.h
contrib/bobtoolz/resource-gtk.h
contrib/bobtoolz/resource.h
contrib/bobtoolz/shapes.cpp
contrib/bobtoolz/shapes.h
contrib/bobtoolz/visfind.cpp
contrib/bobtoolz/visfind.h
contrib/brushexport/callbacks.cpp
contrib/brushexport/callbacks.h
contrib/brushexport/export.cpp
contrib/brushexport/export.h
contrib/brushexport/interface.cpp
contrib/brushexport/plugin.cpp
contrib/brushexport/plugin.h
contrib/brushexport/support.cpp
contrib/brushexport/support.h
contrib/camera/camera.cpp
contrib/camera/camera.h
contrib/camera/dialogs.cpp
contrib/camera/dialogs.h
contrib/camera/dialogs_common.cpp
contrib/camera/funchandlers.cpp
contrib/camera/funchandlers.h
contrib/camera/listener.cpp
contrib/camera/listener.h
contrib/camera/misc.cpp
contrib/camera/misc.h
contrib/camera/renderer.cpp
contrib/camera/renderer.h
contrib/gtkgensurf/bitmap.cpp
contrib/gtkgensurf/dec.cpp
contrib/gtkgensurf/face.cpp
contrib/gtkgensurf/font.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/gtkgensurf/gendlgs.h
contrib/gtkgensurf/genmap.cpp
contrib/gtkgensurf/gensurf.cpp
contrib/gtkgensurf/gensurf.h
contrib/gtkgensurf/heretic.cpp
contrib/gtkgensurf/plugin.cpp
contrib/gtkgensurf/triangle.c
contrib/gtkgensurf/triangle.h
contrib/gtkgensurf/view.cpp
contrib/hydratoolz/plugin.cpp
contrib/hydratoolz/plugin.h
contrib/prtview/AboutDialog.cpp
contrib/prtview/AboutDialog.h
contrib/prtview/ConfigDialog.cpp
contrib/prtview/ConfigDialog.h
contrib/prtview/LoadPortalFileDialog.cpp
contrib/prtview/LoadPortalFileDialog.h
contrib/prtview/portals.cpp
contrib/prtview/portals.h
contrib/prtview/prtview.cpp
contrib/prtview/prtview.h
contrib/shaderplug/shaderplug.cpp
contrib/shaderplug/shaderplug.h
contrib/sunplug/sunplug.cpp
contrib/sunplug/sunplug.h
contrib/ufoaiplug/ufoai.cpp
contrib/ufoaiplug/ufoai.h
contrib/ufoaiplug/ufoai_filters.cpp
contrib/ufoaiplug/ufoai_filters.h
contrib/ufoaiplug/ufoai_gtk.cpp
contrib/ufoaiplug/ufoai_gtk.h
contrib/ufoaiplug/ufoai_level.cpp
contrib/ufoaiplug/ufoai_level.h
include/cullable.cpp
include/cullable.h
include/editable.cpp
include/editable.h
include/iarchive.cpp
include/iarchive.h
include/ibrush.cpp
include/ibrush.h
include/icamera.cpp
include/icamera.h
include/idatastream.cpp
include/idatastream.h
include/ieclass.cpp
include/ieclass.h
include/ientity.cpp
include/ientity.h
include/ifilesystem.cpp
include/ifilesystem.h
include/ifiletypes.cpp
include/ifiletypes.h
include/ifilter.cpp
include/ifilter.h
include/igl.cpp
include/igl.h
include/iglrender.cpp
include/iglrender.h
include/igtkgl.cpp
include/igtkgl.h
include/iimage.cpp
include/iimage.h
include/imap.cpp
include/imap.h
include/imodel.cpp
include/imodel.h
include/ipatch.cpp
include/ipatch.h
include/iplugin.cpp
include/iplugin.h
include/ireference.cpp
include/ireference.h
include/irender.cpp
include/irender.h
include/iscenegraph.cpp
include/iscenegraph.h
include/iscriplib.cpp
include/iscriplib.h
include/iselection.cpp
include/iselection.h
include/ishaders.cpp
include/ishaders.h
include/itexdef.cpp
include/itexdef.h
include/itextstream.cpp
include/itextstream.h
include/itextures.cpp
include/itextures.h
include/itoolbar.cpp
include/itoolbar.h
include/iundo.cpp
include/iundo.h
include/mapfile.cpp
include/mapfile.h
include/modelskin.cpp
include/modelskin.h
include/moduleobserver.cpp
include/moduleobserver.h
include/modulesystem.cpp
include/modulesystem.h
include/nameable.cpp
include/nameable.h
include/namespace.cpp
include/namespace.h
include/preferencesystem.cpp
include/preferencesystem.h
include/qerplugin.cpp
include/qerplugin.h
include/renderable.cpp
include/renderable.h
include/selectable.cpp
include/selectable.h
include/stream_version.h
include/warnings.h
include/windowobserver.cpp
include/windowobserver.h
libs/archivelib.cpp
libs/archivelib.h
libs/bytebool.cpp
libs/bytebool.h
libs/bytestreamutils.cpp
libs/bytestreamutils.h
libs/character.cpp
libs/character.h
libs/cmdlib.h
libs/cmdlib/cmdlib.cpp
libs/container/array.cpp
libs/container/array.h
libs/container/cache.cpp
libs/container/cache.h
libs/container/container.cpp
libs/container/container.h
libs/container/hashfunc.cpp
libs/container/hashfunc.h
libs/container/hashtable.cpp
libs/container/hashtable.h
libs/container/stack.cpp
libs/container/stack.h
libs/convert.cpp
libs/convert.h
libs/ddslib.h
libs/ddslib/ddslib.c
libs/debugging/debugging.cpp
libs/debugging/debugging.h
libs/dragplanes.cpp
libs/dragplanes.h
libs/eclasslib.cpp
libs/eclasslib.h
libs/entitylib.cpp
libs/entitylib.h
libs/entityxml.cpp
libs/entityxml.h
libs/filematch.c
libs/filematch.h
libs/fs_filesystem.cpp
libs/fs_filesystem.h
libs/fs_path.cpp
libs/fs_path.h
libs/generic/arrayrange.cpp
libs/generic/arrayrange.h
libs/generic/bitfield.cpp
libs/generic/bitfield.h
libs/generic/callback.cpp
libs/generic/callback.h
libs/generic/callbackfwd.cpp
libs/generic/callbackfwd.h
libs/generic/constant.cpp
libs/generic/constant.h
libs/generic/enumeration.cpp
libs/generic/enumeration.h
libs/generic/functional.cpp
libs/generic/functional.h
libs/generic/object.cpp
libs/generic/object.h
libs/generic/reference.cpp
libs/generic/reference.h
libs/generic/referencecounted.cpp
libs/generic/referencecounted.h
libs/generic/static.cpp
libs/generic/static.h
libs/generic/vector.cpp
libs/generic/vector.h
libs/gtkutil/accelerator.cpp
libs/gtkutil/accelerator.h
libs/gtkutil/button.cpp
libs/gtkutil/button.h
libs/gtkutil/clipboard.cpp
libs/gtkutil/clipboard.h
libs/gtkutil/closure.cpp
libs/gtkutil/closure.h
libs/gtkutil/container.cpp
libs/gtkutil/container.h
libs/gtkutil/cursor.cpp
libs/gtkutil/cursor.h
libs/gtkutil/dialog.cpp
libs/gtkutil/dialog.h
libs/gtkutil/entry.cpp
libs/gtkutil/entry.h
libs/gtkutil/filechooser.cpp
libs/gtkutil/filechooser.h
libs/gtkutil/frame.cpp
libs/gtkutil/frame.h
libs/gtkutil/glfont.cpp
libs/gtkutil/glfont.h
libs/gtkutil/glwidget.cpp
libs/gtkutil/glwidget.h
libs/gtkutil/idledraw.cpp
libs/gtkutil/idledraw.h
libs/gtkutil/image.cpp
libs/gtkutil/image.h
libs/gtkutil/menu.cpp
libs/gtkutil/menu.h
libs/gtkutil/messagebox.cpp
libs/gtkutil/messagebox.h
libs/gtkutil/nonmodal.cpp
libs/gtkutil/nonmodal.h
libs/gtkutil/paned.cpp
libs/gtkutil/paned.h
libs/gtkutil/pointer.cpp
libs/gtkutil/pointer.h
libs/gtkutil/toolbar.cpp
libs/gtkutil/toolbar.h
libs/gtkutil/widget.cpp
libs/gtkutil/widget.h
libs/gtkutil/window.cpp
libs/gtkutil/window.h
libs/gtkutil/xorrectangle.cpp
libs/gtkutil/xorrectangle.h
libs/imagelib.cpp
libs/imagelib.h
libs/instancelib.cpp
libs/instancelib.h
libs/l_net/l_net.c
libs/l_net/l_net.h
libs/l_net/l_net_berkley.c
libs/l_net/l_net_wins.c
libs/l_net/l_net_wins.h
libs/maplib.cpp
libs/maplib.h
libs/math/aabb.cpp
libs/math/aabb.h
libs/math/curve.cpp
libs/math/curve.h
libs/math/expression.cpp
libs/math/expression.h
libs/math/frustum.cpp
libs/math/frustum.h
libs/math/line.cpp
libs/math/line.h
libs/math/matrix.cpp
libs/math/matrix.h
libs/math/pi.cpp
libs/math/pi.h
libs/math/plane.cpp
libs/math/plane.h
libs/math/quaternion.cpp
libs/math/quaternion.h
libs/math/vector.cpp
libs/math/vector.h
libs/mathlib.h
libs/mathlib/bbox.c
libs/mathlib/line.c
libs/mathlib/m4x4.c
libs/mathlib/mathlib.c
libs/mathlib/ray.c
libs/md5lib.h
libs/md5lib/md5lib.c
libs/memory/allocator.cpp
libs/memory/allocator.h
libs/moduleobservers.cpp
libs/moduleobservers.h
libs/modulesystem/moduleregistry.cpp
libs/modulesystem/moduleregistry.h
libs/modulesystem/modulesmap.cpp
libs/modulesystem/modulesmap.h
libs/modulesystem/singletonmodule.cpp
libs/modulesystem/singletonmodule.h
libs/os/dir.cpp
libs/os/dir.h
libs/os/file.cpp
libs/os/file.h
libs/os/path.cpp
libs/os/path.h
libs/picomodel.h
libs/picomodel/lwo/clip.c
libs/picomodel/lwo/envelope.c
libs/picomodel/lwo/list.c
libs/picomodel/lwo/lwio.c
libs/picomodel/lwo/lwo2.c
libs/picomodel/lwo/lwo2.h
libs/picomodel/lwo/lwob.c
libs/picomodel/lwo/pntspols.c
libs/picomodel/lwo/surface.c
libs/picomodel/lwo/vecmath.c
libs/picomodel/lwo/vmap.c
libs/picomodel/picointernal.c
libs/picomodel/picointernal.h
libs/picomodel/picomodel.c
libs/picomodel/picomodules.c
libs/picomodel/pm_3ds.c
libs/picomodel/pm_ase.c
libs/picomodel/pm_fm.c
libs/picomodel/pm_fm.h
libs/picomodel/pm_lwo.c
libs/picomodel/pm_md2.c
libs/picomodel/pm_md3.c
libs/picomodel/pm_mdc.c
libs/picomodel/pm_ms3d.c
libs/picomodel/pm_obj.c
libs/picomodel/pm_terrain.c
libs/pivot.cpp
libs/pivot.h
libs/profile/file.cpp
libs/profile/file.h
libs/profile/profile.cpp
libs/profile/profile.h
libs/render.cpp
libs/render.h
libs/scenelib.cpp
libs/scenelib.h
libs/script/scripttokeniser.cpp
libs/script/scripttokeniser.h
libs/script/scripttokenwriter.cpp
libs/script/scripttokenwriter.h
libs/selectionlib.cpp
libs/selectionlib.h
libs/shaderlib.cpp
libs/shaderlib.h
libs/signal/isignal.cpp
libs/signal/isignal.h
libs/signal/signal.cpp
libs/signal/signal.h
libs/signal/signalfwd.cpp
libs/signal/signalfwd.h
libs/splines/math_angles.cpp
libs/splines/math_angles.h
libs/splines/math_matrix.cpp
libs/splines/math_matrix.h
libs/splines/math_quaternion.cpp
libs/splines/math_quaternion.h
libs/splines/math_vector.cpp
libs/splines/math_vector.h
libs/splines/q_parse.cpp
libs/splines/q_shared.cpp
libs/splines/q_shared.h
libs/splines/splines.cpp
libs/splines/splines.h
libs/splines/util_list.h
libs/splines/util_str.cpp
libs/splines/util_str.h
libs/str.cpp
libs/str.h
libs/stream/filestream.cpp
libs/stream/filestream.h
libs/stream/memstream.cpp
libs/stream/memstream.h
libs/stream/stringstream.cpp
libs/stream/stringstream.h
libs/stream/textfilestream.cpp
libs/stream/textfilestream.h
libs/stream/textstream.cpp
libs/stream/textstream.h
libs/string/pooledstring.cpp
libs/string/pooledstring.h
libs/string/string.cpp
libs/string/string.h
libs/string/stringfwd.cpp
libs/string/stringfwd.h
libs/stringio.cpp
libs/stringio.h
libs/texturelib.cpp
libs/texturelib.h
libs/transformlib.cpp
libs/transformlib.h
libs/traverselib.cpp
libs/traverselib.h
libs/typesystem.cpp
libs/typesystem.h
libs/undolib.cpp
libs/undolib.h
libs/uniquenames.cpp
libs/uniquenames.h
libs/versionlib.cpp
libs/versionlib.h
libs/xml/ixml.cpp
libs/xml/ixml.h
libs/xml/xmlelement.cpp
libs/xml/xmlelement.h
libs/xml/xmlparser.cpp
libs/xml/xmlparser.h
libs/xml/xmltextags.cpp
libs/xml/xmltextags.h
libs/xml/xmlwriter.cpp
libs/xml/xmlwriter.h
plugins/archivepak/archive.cpp
plugins/archivepak/archive.h
plugins/archivepak/pak.cpp
plugins/archivepak/pak.h
plugins/archivepak/plugin.cpp
plugins/archivepak/plugin.h
plugins/archivewad/archive.cpp
plugins/archivewad/archive.h
plugins/archivewad/plugin.cpp
plugins/archivewad/plugin.h
plugins/archivewad/wad.cpp
plugins/archivewad/wad.h
plugins/archivezip/archive.cpp
plugins/archivezip/archive.h
plugins/archivezip/pkzip.cpp
plugins/archivezip/pkzip.h
plugins/archivezip/plugin.cpp
plugins/archivezip/plugin.h
plugins/archivezip/zlibstream.cpp
plugins/archivezip/zlibstream.h
plugins/entity/angle.cpp
plugins/entity/angle.h
plugins/entity/angles.cpp
plugins/entity/angles.h
plugins/entity/colour.cpp
plugins/entity/colour.h
plugins/entity/curve.cpp
plugins/entity/curve.h
plugins/entity/doom3group.cpp
plugins/entity/doom3group.h
plugins/entity/eclassmodel.cpp
plugins/entity/eclassmodel.h
plugins/entity/entity.cpp
plugins/entity/entity.h
plugins/entity/filters.cpp
plugins/entity/filters.h
plugins/entity/generic.cpp
plugins/entity/generic.h
plugins/entity/group.cpp
plugins/entity/group.h
plugins/entity/keyobservers.cpp
plugins/entity/keyobservers.h
plugins/entity/light.cpp
plugins/entity/light.h
plugins/entity/miscmodel.cpp
plugins/entity/miscmodel.h
plugins/entity/model.cpp
plugins/entity/model.h
plugins/entity/modelskinkey.cpp
plugins/entity/modelskinkey.h
plugins/entity/namedentity.cpp
plugins/entity/namedentity.h
plugins/entity/namekeys.cpp
plugins/entity/namekeys.h
plugins/entity/origin.cpp
plugins/entity/origin.h
plugins/entity/plugin.cpp
plugins/entity/plugin.h
plugins/entity/rotation.cpp
plugins/entity/rotation.h
plugins/entity/scale.cpp
plugins/entity/scale.h
plugins/entity/skincache.cpp
plugins/entity/skincache.h
plugins/entity/targetable.cpp
plugins/entity/targetable.h
plugins/image/bmp.cpp
plugins/image/bmp.h
plugins/image/dds.cpp
plugins/image/dds.h
plugins/image/image.cpp
plugins/image/image.h
plugins/image/jpeg.cpp
plugins/image/jpeg.h
plugins/image/pcx.cpp
plugins/image/pcx.h
plugins/image/tga.cpp
plugins/image/tga.h
plugins/imagehl/hlw.cpp
plugins/imagehl/hlw.h
plugins/imagehl/imagehl.cpp
plugins/imagehl/imagehl.h
plugins/imagehl/mip.cpp
plugins/imagehl/mip.h
plugins/imagehl/sprite.cpp
plugins/imagehl/sprite.h
plugins/imagepng/plugin.cpp
plugins/imagepng/plugin.h
plugins/imageq2/imageq2.cpp
plugins/imageq2/imageq2.h
plugins/imageq2/wal.cpp
plugins/imageq2/wal.h
plugins/imageq2/wal32.cpp
plugins/imageq2/wal32.h
plugins/mapq3/parse.cpp
plugins/mapq3/parse.h
plugins/mapq3/plugin.cpp
plugins/mapq3/plugin.h
plugins/mapq3/write.cpp
plugins/mapq3/write.h
plugins/mapxml/plugin.cpp
plugins/mapxml/plugin.h
plugins/mapxml/xmlparse.cpp
plugins/mapxml/xmlparse.h
plugins/mapxml/xmlwrite.cpp
plugins/mapxml/xmlwrite.h
plugins/md3model/ident.h
plugins/md3model/md2.cpp
plugins/md3model/md2.h
plugins/md3model/md3.cpp
plugins/md3model/md3.h
plugins/md3model/md3normals.cpp
plugins/md3model/md3normals.h
plugins/md3model/md5.cpp
plugins/md3model/md5.h
plugins/md3model/mdc.cpp
plugins/md3model/mdc.h
plugins/md3model/mdl.cpp
plugins/md3model/mdl.h
plugins/md3model/mdlformat.cpp
plugins/md3model/mdlformat.h
plugins/md3model/mdlimage.cpp
plugins/md3model/mdlimage.h
plugins/md3model/mdlnormals.cpp
plugins/md3model/mdlnormals.h
plugins/md3model/model.cpp
plugins/md3model/model.h
plugins/md3model/plugin.cpp
plugins/md3model/plugin.h
plugins/model/model.cpp
plugins/model/model.h
plugins/model/plugin.cpp
plugins/model/plugin.h
plugins/sample/sample.cpp
plugins/sample/sample.h
plugins/shaders/plugin.cpp
plugins/shaders/plugin.h
plugins/shaders/shaders.cpp
plugins/shaders/shaders.h
plugins/spritemodel/plugin.cpp
plugins/spritemodel/plugin.h
plugins/spritemodel/spritemodel.cpp
plugins/spritemodel/spritemodel.h
plugins/textool/2DView.cpp
plugins/textool/2DView.h
plugins/textool/ControlPointsManager.cpp
plugins/textool/ControlPointsManager.h
plugins/textool/StdAfx.cpp
plugins/textool/StdAfx.h
plugins/textool/TexTool.cpp
plugins/textool/resource.h
plugins/vfspk3/archive.cpp
plugins/vfspk3/archive.h
plugins/vfspk3/vfs.cpp
plugins/vfspk3/vfs.h
plugins/vfspk3/vfspk3.cpp
plugins/vfspk3/vfspk3.h
radiant/autosave.cpp
radiant/autosave.h
radiant/brush.cpp
radiant/brush.h
radiant/brush_primit.cpp
radiant/brush_primit.h
radiant/brushmanip.cpp
radiant/brushmanip.h
radiant/brushmodule.cpp
radiant/brushmodule.h
radiant/brushnode.cpp
radiant/brushnode.h
radiant/brushtokens.cpp
radiant/brushtokens.h
radiant/brushxml.cpp
radiant/brushxml.h
radiant/build.cpp
radiant/build.h
radiant/camwindow.cpp
radiant/camwindow.h
radiant/clippertool.cpp
radiant/clippertool.h
radiant/commands.cpp
radiant/commands.h
radiant/console.cpp
radiant/console.h
radiant/csg.cpp
radiant/csg.h
radiant/dialog.cpp
radiant/dialog.h
radiant/eclass.cpp
radiant/eclass.h
radiant/eclass_def.cpp
radiant/eclass_def.h
radiant/eclass_doom3.cpp
radiant/eclass_doom3.h
radiant/eclass_fgd.cpp
radiant/eclass_fgd.h
radiant/eclass_xml.cpp
radiant/eclass_xml.h
radiant/entity.cpp
radiant/entity.h
radiant/entityinspector.cpp
radiant/entityinspector.h
radiant/entitylist.cpp
radiant/entitylist.h
radiant/environment.cpp
radiant/environment.h
radiant/error.cpp
radiant/error.h
radiant/feedback.cpp
radiant/feedback.h
radiant/filetypes.cpp
radiant/filetypes.h
radiant/filters.cpp
radiant/filters.h
radiant/findtexturedialog.cpp
radiant/findtexturedialog.h
radiant/glwidget.cpp
radiant/glwidget.h
radiant/grid.cpp
radiant/grid.h
radiant/groupdialog.cpp
radiant/groupdialog.h
radiant/gtkdlgs.cpp
radiant/gtkdlgs.h
radiant/gtkmisc.cpp
radiant/gtkmisc.h
radiant/help.cpp
radiant/help.h
radiant/image.cpp
radiant/image.h
radiant/main.cpp
radiant/main.h
radiant/mainframe.cpp
radiant/mainframe.h
radiant/map.cpp
radiant/map.h
radiant/mru.cpp
radiant/mru.h
radiant/multimon.cpp
radiant/multimon.h
radiant/nullmodel.cpp
radiant/nullmodel.h
radiant/parse.cpp
radiant/parse.h
radiant/patch.cpp
radiant/patch.h
radiant/patchdialog.cpp
radiant/patchdialog.h
radiant/patchmanip.cpp
radiant/patchmanip.h
radiant/patchmodule.cpp
radiant/patchmodule.h
radiant/plugin.cpp
radiant/plugin.h
radiant/pluginapi.cpp
radiant/pluginapi.h
radiant/pluginmanager.cpp
radiant/pluginmanager.h
radiant/pluginmenu.cpp
radiant/pluginmenu.h
radiant/plugintoolbar.cpp
radiant/plugintoolbar.h
radiant/points.cpp
radiant/points.h
radiant/preferencedictionary.cpp
radiant/preferencedictionary.h
radiant/preferences.cpp
radiant/preferences.h
radiant/qe3.cpp
radiant/qe3.h
radiant/qgl.cpp
radiant/qgl.h
radiant/referencecache.cpp
radiant/referencecache.h
radiant/renderer.cpp
radiant/renderer.h
radiant/renderstate.cpp
radiant/renderstate.h
radiant/resource.h
radiant/scenegraph.cpp
radiant/scenegraph.h
radiant/select.cpp
radiant/select.h
radiant/selection.cpp
radiant/selection.h
radiant/server.cpp
radiant/server.h
radiant/shaders.cpp
radiant/shaders.h
radiant/sockets.cpp
radiant/sockets.h
radiant/stacktrace.cpp
radiant/stacktrace.h
radiant/surfacedialog.cpp
radiant/surfacedialog.h
radiant/texmanip.cpp
radiant/texmanip.h
radiant/textureentry.cpp
radiant/textureentry.h
radiant/textures.cpp
radiant/textures.h
radiant/texwindow.cpp
radiant/texwindow.h
radiant/timer.cpp
radiant/timer.h
radiant/treemodel.cpp
radiant/treemodel.h
radiant/undo.cpp
radiant/undo.h
radiant/url.cpp
radiant/url.h
radiant/view.cpp
radiant/view.h
radiant/watchbsp.cpp
radiant/watchbsp.h
radiant/winding.cpp
radiant/winding.h
radiant/windowobservers.cpp
radiant/windowobservers.h
radiant/xmlstuff.cpp
radiant/xmlstuff.h
radiant/xywindow.cpp
radiant/xywindow.h
tools/quake2/common/bspfile.c
tools/quake2/common/bspfile.h
tools/quake2/common/cmdlib.c
tools/quake2/common/cmdlib.h
tools/quake2/common/inout.c
tools/quake2/common/inout.h
tools/quake2/common/l3dslib.c
tools/quake2/common/l3dslib.h
tools/quake2/common/lbmlib.c
tools/quake2/common/lbmlib.h
tools/quake2/common/mathlib.c
tools/quake2/common/mathlib.h
tools/quake2/common/md4.c
tools/quake2/common/md4.h
tools/quake2/common/path_init.c
tools/quake2/common/polylib.c
tools/quake2/common/polylib.h
tools/quake2/common/q2_threads.h
tools/quake2/common/qfiles.h
tools/quake2/common/scriplib.c
tools/quake2/common/scriplib.h
tools/quake2/common/threads.c
tools/quake2/common/trilib.c
tools/quake2/common/trilib.h
tools/quake2/q2map/brushbsp.c
tools/quake2/q2map/csg.c
tools/quake2/q2map/faces.c
tools/quake2/q2map/flow.c
tools/quake2/q2map/gldraw.c
tools/quake2/q2map/glfile.c
tools/quake2/q2map/leakfile.c
tools/quake2/q2map/lightmap.c
tools/quake2/q2map/main.c
tools/quake2/q2map/map.c
tools/quake2/q2map/nodraw.c
tools/quake2/q2map/patches.c
tools/quake2/q2map/portals.c
tools/quake2/q2map/prtfile.c
tools/quake2/q2map/q2map.h
tools/quake2/q2map/qbsp.c
tools/quake2/q2map/qbsp.h
tools/quake2/q2map/qrad.c
tools/quake2/q2map/qrad.h
tools/quake2/q2map/qvis.c
tools/quake2/q2map/qvis.h
tools/quake2/q2map/textures.c
tools/quake2/q2map/trace.c
tools/quake2/q2map/tree.c
tools/quake2/q2map/writebsp.c
tools/quake2/qdata/anorms.h
tools/quake2/qdata/images.c
tools/quake2/qdata/models.c
tools/quake2/qdata/qdata.c
tools/quake2/qdata/qdata.h
tools/quake2/qdata/sprites.c
tools/quake2/qdata/tables.c
tools/quake2/qdata/video.c
tools/quake2/qdata_heretic2/adpcm.h
tools/quake2/qdata_heretic2/animcomp.c
tools/quake2/qdata_heretic2/animcomp.h
tools/quake2/qdata_heretic2/anorms.h
tools/quake2/qdata_heretic2/book.c
tools/quake2/qdata_heretic2/common/bspfile.c
tools/quake2/qdata_heretic2/common/bspfile.h
tools/quake2/qdata_heretic2/common/cmdlib.c
tools/quake2/qdata_heretic2/common/cmdlib.h
tools/quake2/qdata_heretic2/common/her2_threads.h
tools/quake2/qdata_heretic2/common/inout.c
tools/quake2/qdata_heretic2/common/inout.h
tools/quake2/qdata_heretic2/common/l3dslib.c
tools/quake2/qdata_heretic2/common/l3dslib.h
tools/quake2/qdata_heretic2/common/lbmlib.c
tools/quake2/qdata_heretic2/common/lbmlib.h
tools/quake2/qdata_heretic2/common/mathlib.c
tools/quake2/qdata_heretic2/common/mathlib.h
tools/quake2/qdata_heretic2/common/md4.c
tools/quake2/qdata_heretic2/common/md4.h
tools/quake2/qdata_heretic2/common/path_init.c
tools/quake2/qdata_heretic2/common/polylib.c
tools/quake2/qdata_heretic2/common/polylib.h
tools/quake2/qdata_heretic2/common/qfiles.c
tools/quake2/qdata_heretic2/common/qfiles.h
tools/quake2/qdata_heretic2/common/scriplib.c
tools/quake2/qdata_heretic2/common/scriplib.h
tools/quake2/qdata_heretic2/common/threads.c
tools/quake2/qdata_heretic2/common/token.c
tools/quake2/qdata_heretic2/common/token.h
tools/quake2/qdata_heretic2/common/trilib.c
tools/quake2/qdata_heretic2/common/trilib.h
tools/quake2/qdata_heretic2/fmodels.c
tools/quake2/qdata_heretic2/images.c
tools/quake2/qdata_heretic2/jointed.c
tools/quake2/qdata_heretic2/jointed.h
tools/quake2/qdata_heretic2/joints.h
tools/quake2/qdata_heretic2/models.c
tools/quake2/qdata_heretic2/pics.c
tools/quake2/qdata_heretic2/qcommon/angles.h
tools/quake2/qdata_heretic2/qcommon/arrayedlist.h
tools/quake2/qdata_heretic2/qcommon/flex.h
tools/quake2/qdata_heretic2/qcommon/fmodel.h
tools/quake2/qdata_heretic2/qcommon/h2common.h
tools/quake2/qdata_heretic2/qcommon/placement.h
tools/quake2/qdata_heretic2/qcommon/q_typedef.h
tools/quake2/qdata_heretic2/qcommon/qfiles.h
tools/quake2/qdata_heretic2/qcommon/reference.c
tools/quake2/qdata_heretic2/qcommon/reference.h
tools/quake2/qdata_heretic2/qcommon/resourcemanager.c
tools/quake2/qdata_heretic2/qcommon/resourcemanager.h
tools/quake2/qdata_heretic2/qcommon/skeletons.c
tools/quake2/qdata_heretic2/qcommon/skeletons.h
tools/quake2/qdata_heretic2/qd_fmodel.h
tools/quake2/qdata_heretic2/qd_skeletons.c
tools/quake2/qdata_heretic2/qd_skeletons.h
tools/quake2/qdata_heretic2/qdata.c
tools/quake2/qdata_heretic2/qdata.h
tools/quake2/qdata_heretic2/resource.h
tools/quake2/qdata_heretic2/sprites.c
tools/quake2/qdata_heretic2/svdcmp.c
tools/quake2/qdata_heretic2/tables.c
tools/quake2/qdata_heretic2/tmix.c
tools/quake2/qdata_heretic2/video.c
tools/quake3/common/aselib.c
tools/quake3/common/aselib.h
tools/quake3/common/bspfile.c
tools/quake3/common/bspfile.h
tools/quake3/common/cmdlib.c
tools/quake3/common/cmdlib.h
tools/quake3/common/imagelib.c
tools/quake3/common/imagelib.h
tools/quake3/common/inout.c
tools/quake3/common/inout.h
tools/quake3/common/jpeg.c
tools/quake3/common/l3dslib.c
tools/quake3/common/l3dslib.h
tools/quake3/common/md4.c
tools/quake3/common/md4.h
tools/quake3/common/mutex.c
tools/quake3/common/mutex.h
tools/quake3/common/polylib.c
tools/quake3/common/polylib.h
tools/quake3/common/polyset.h
tools/quake3/common/qfiles.h
tools/quake3/common/qthreads.h
tools/quake3/common/scriplib.c
tools/quake3/common/scriplib.h
tools/quake3/common/surfaceflags.h
tools/quake3/common/threads.c
tools/quake3/common/trilib.c
tools/quake3/common/trilib.h
tools/quake3/common/unzip.c
tools/quake3/common/unzip.h
tools/quake3/common/vfs.c
tools/quake3/common/vfs.h
tools/quake3/q3data/3dslib.c
tools/quake3/q3data/3dslib.h
tools/quake3/q3data/compress.c
tools/quake3/q3data/images.c
tools/quake3/q3data/md3lib.c
tools/quake3/q3data/md3lib.h
tools/quake3/q3data/models.c
tools/quake3/q3data/oldstuff.c
tools/quake3/q3data/p3dlib.c
tools/quake3/q3data/p3dlib.h
tools/quake3/q3data/polyset.c
tools/quake3/q3data/q3data.c
tools/quake3/q3data/q3data.h
tools/quake3/q3data/stripper.c
tools/quake3/q3data/video.c
tools/quake3/q3map2/brush.c
tools/quake3/q3map2/brush_primit.c
tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/bspfile_ibsp.c
tools/quake3/q3map2/bspfile_rbsp.c
tools/quake3/q3map2/convert_ase.c
tools/quake3/q3map2/convert_map.c
tools/quake3/q3map2/convert_obj.c
tools/quake3/q3map2/decals.c
tools/quake3/q3map2/facebsp.c
tools/quake3/q3map2/fog.c
tools/quake3/q3map2/game__null.h
tools/quake3/q3map2/game_darkplaces.h
tools/quake3/q3map2/game_dq.h
tools/quake3/q3map2/game_ef.h
tools/quake3/q3map2/game_etut.h
tools/quake3/q3map2/game_ja.h
tools/quake3/q3map2/game_jk2.h
tools/quake3/q3map2/game_nexuiz.h
tools/quake3/q3map2/game_prophecy.h
tools/quake3/q3map2/game_qfusion.h
tools/quake3/q3map2/game_quake3.h
tools/quake3/q3map2/game_quakelive.h
tools/quake3/q3map2/game_reaction.h
tools/quake3/q3map2/game_sof2.h
tools/quake3/q3map2/game_t.h
tools/quake3/q3map2/game_tenebrae.h
tools/quake3/q3map2/game_tremulous.h
tools/quake3/q3map2/game_wolf.h
tools/quake3/q3map2/game_wolfet.h
tools/quake3/q3map2/game_xonotic.h
tools/quake3/q3map2/image.c
tools/quake3/q3map2/leakfile.c
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_bounce.c
tools/quake3/q3map2/light_shadows.c
tools/quake3/q3map2/light_trace.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/lightmaps.c
tools/quake3/q3map2/lightmaps_ydnar.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/map.c
tools/quake3/q3map2/mesh.c
tools/quake3/q3map2/model.c
tools/quake3/q3map2/patch.c
tools/quake3/q3map2/path_init.c
tools/quake3/q3map2/portals.c
tools/quake3/q3map2/prtfile.c
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/shaders.c
tools/quake3/q3map2/surface.c
tools/quake3/q3map2/surface_extra.c
tools/quake3/q3map2/surface_foliage.c
tools/quake3/q3map2/surface_fur.c
tools/quake3/q3map2/surface_meta.c
tools/quake3/q3map2/tjunction.c
tools/quake3/q3map2/tree.c
tools/quake3/q3map2/vis.c
tools/quake3/q3map2/visflow.c
tools/quake3/q3map2/writebsp.c

index 7652935..10b7a62 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdio.h> /* jpeglib.h needs it */
 #include CONFTEST_HEADER
-int main()
-{
+int main(){
        (void) CONFTEST_SYMBOL;
        return 0;
 }
index 36cf45e..b115952 100644 (file)
@@ -1,22 +1,22 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // bkgrnd2d Plugin
@@ -30,25 +30,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 CBackgroundRender render;
 
-CBackgroundImage backgroundXY(XY),backgroundXZ(XZ),backgroundYZ(YZ);
+CBackgroundImage backgroundXY( XY ),backgroundXZ( XZ ),backgroundYZ( YZ );
 
-CBackgroundRender::CBackgroundRender()
-{
+CBackgroundRender::CBackgroundRender(){
        refCount = 1;
 }
 
-CBackgroundRender::~CBackgroundRender()
-{
+CBackgroundRender::~CBackgroundRender(){
 }
 
-void CBackgroundRender::Register()
-{
+void CBackgroundRender::Register(){
        g_QglTable.m_pfnHookGL2DWindow( this );
 }
 
-void CBackgroundRender::Draw2D( VIEWTYPE vt )
-{
-       switch(vt)
+void CBackgroundRender::Draw2D( VIEWTYPE vt ){
+       switch ( vt )
        {
        case XY:
                backgroundXY.Render();
@@ -63,8 +59,7 @@ void CBackgroundRender::Draw2D( VIEWTYPE vt )
 }
 
 
-CBackgroundImage::CBackgroundImage(VIEWTYPE vt)
-{
+CBackgroundImage::CBackgroundImage( VIEWTYPE vt ){
        m_tex = NULL;
        m_alpha = 0.5;
 
@@ -76,159 +71,154 @@ CBackgroundImage::CBackgroundImage(VIEWTYPE vt)
 
        m_vt = vt;
 
-       switch(m_vt)
+       switch ( m_vt )
        {
-               case XY:
-                       m_ix = 0;
-                       m_iy = 1;
-                       break;
-               case XZ:
-                       m_ix = 0;
-                       m_iy = 2;
-                       break;
-               case YZ:
-                       m_ix = 1;
-                       m_iy = 2;
-                       break;
+       case XY:
+               m_ix = 0;
+               m_iy = 1;
+               break;
+       case XZ:
+               m_ix = 0;
+               m_iy = 2;
+               break;
+       case YZ:
+               m_ix = 1;
+               m_iy = 2;
+               break;
        }
 }
 
 /*
- * should cleanup, but I don't think we can be sure it happens before our 
+ * should cleanup, but I don't think we can be sure it happens before our
  * interfaces are gone
-CBackgroundImage::~CBackgroundImage()
-{
-}
-*/
-
-void CBackgroundImage::Cleanup()
-{
-       if(m_tex) {
-               g_QglTable.m_pfn_qglDeleteTextures(1,&m_tex->texture_number);
-               g_free(m_tex);
+   CBackgroundImage::~CBackgroundImage()
+   {
+   }
+ */
+
+void CBackgroundImage::Cleanup(){
+       if ( m_tex ) {
+               g_QglTable.m_pfn_qglDeleteTextures( 1,&m_tex->texture_number );
+               g_free( m_tex );
                m_tex = NULL;
        }
 }
 
-void CBackgroundImage::Render()
-{
-       if (!m_bActive || !Valid())
+void CBackgroundImage::Render(){
+       if ( !m_bActive || !Valid() ) {
                return;
-       g_QglTable.m_pfn_qglPushAttrib(GL_ALL_ATTRIB_BITS);
+       }
+       g_QglTable.m_pfn_qglPushAttrib( GL_ALL_ATTRIB_BITS );
 
-       g_QglTable.m_pfn_qglEnable(GL_TEXTURE_2D);
-       g_QglTable.m_pfn_qglEnable(GL_BLEND);
-       g_QglTable.m_pfn_qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-       g_QglTable.m_pfn_qglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-       g_QglTable.m_pfn_qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-       g_QglTable.m_pfn_qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+       g_QglTable.m_pfn_qglEnable( GL_TEXTURE_2D );
+       g_QglTable.m_pfn_qglEnable( GL_BLEND );
+       g_QglTable.m_pfn_qglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+       g_QglTable.m_pfn_qglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
+       g_QglTable.m_pfn_qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
+       g_QglTable.m_pfn_qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
 
-       g_QglTable.m_pfn_qglPolygonMode(GL_FRONT,GL_FILL);
+       g_QglTable.m_pfn_qglPolygonMode( GL_FRONT,GL_FILL );
        // TODO, just so we can tell if we end up going the wrong way
        // g_QglTable.m_pfn_qglPolygonMode(GL_BACK,GL_LINE);
        // TODO any other state we should not assume ?
 
-       g_QglTable.m_pfn_qglBindTexture(GL_TEXTURE_2D, m_tex->texture_number);
-       g_QglTable.m_pfn_qglBegin(GL_QUADS);
+       g_QglTable.m_pfn_qglBindTexture( GL_TEXTURE_2D, m_tex->texture_number );
+       g_QglTable.m_pfn_qglBegin( GL_QUADS );
 
-       g_QglTable.m_pfn_qglColor4f(1.0,1.0,1.0,m_alpha);
-       g_QglTable.m_pfn_qglTexCoord2f(0.0,1.0);
-       g_QglTable.m_pfn_qglVertex2f(m_xmin,m_ymin);
+       g_QglTable.m_pfn_qglColor4f( 1.0,1.0,1.0,m_alpha );
+       g_QglTable.m_pfn_qglTexCoord2f( 0.0,1.0 );
+       g_QglTable.m_pfn_qglVertex2f( m_xmin,m_ymin );
 
-       g_QglTable.m_pfn_qglTexCoord2f(1.0,1.0);
-       g_QglTable.m_pfn_qglVertex2f(m_xmax,m_ymin);
+       g_QglTable.m_pfn_qglTexCoord2f( 1.0,1.0 );
+       g_QglTable.m_pfn_qglVertex2f( m_xmax,m_ymin );
 
-       g_QglTable.m_pfn_qglTexCoord2f(1.0,0.0);
-       g_QglTable.m_pfn_qglVertex2f(m_xmax,m_ymax);
+       g_QglTable.m_pfn_qglTexCoord2f( 1.0,0.0 );
+       g_QglTable.m_pfn_qglVertex2f( m_xmax,m_ymax );
 
-       g_QglTable.m_pfn_qglTexCoord2f(0.0,0.0);
-       g_QglTable.m_pfn_qglVertex2f(m_xmin,m_ymax);
+       g_QglTable.m_pfn_qglTexCoord2f( 0.0,0.0 );
+       g_QglTable.m_pfn_qglVertex2f( m_xmin,m_ymax );
 
        g_QglTable.m_pfn_qglEnd();
-       g_QglTable.m_pfn_qglBindTexture(GL_TEXTURE_2D, 0);
+       g_QglTable.m_pfn_qglBindTexture( GL_TEXTURE_2D, 0 );
 
        g_QglTable.m_pfn_qglPopAttrib();
 }
 
-bool CBackgroundImage::Load(const char *filename)
-{
+bool CBackgroundImage::Load( const char *filename ){
        qtexture_t *newtex;
-       
+
        unsigned char *image = NULL; // gets allocated with what ? g_malloc
        int width = 0, height = 0;
 
-       g_FuncTable.m_pfnLoadImage(filename,&image,&width,&height);
+       g_FuncTable.m_pfnLoadImage( filename,&image,&width,&height );
 
-       if(!image) {
-               Syn_Printf(MSG_WARN "load %s failed\n",filename);
+       if ( !image ) {
+               Syn_Printf( MSG_WARN "load %s failed\n",filename );
                return false;
        }
 
 // just in case we want to build for an old version
 // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=900
 #ifdef BKGRND2D_JPG_WORKAROUND
-       if ( strlen(filename) > 4 && !strcmp(".jpg",filename + strlen(filename) - 4)) {
-               Syn_Printf(MSG_PREFIX ".jpg workaround, clearing alpha channel\n");
-               int size = width*height*4;
+       if ( strlen( filename ) > 4 && !strcmp( ".jpg",filename + strlen( filename ) - 4 ) ) {
+               Syn_Printf( MSG_PREFIX ".jpg workaround, clearing alpha channel\n" );
+               int size = width * height * 4;
                int i;
-               for (i = 3; i < size; i+=4) {
+               for ( i = 3; i < size; i += 4 ) {
                        image[i] = 255;
                }
        }
 #endif
-       
+
        //TODO bug for stored texture size
        //TODO whose gl context are we in, anyway ?
-       newtex = g_FuncTable.m_pfnLoadTextureRGBA(image,width,height);
+       newtex = g_FuncTable.m_pfnLoadTextureRGBA( image,width,height );
 
-       g_free(image);
+       g_free( image );
 
-       if(!newtex) {
-               Syn_Printf(MSG_WARN "image to texture failed\n");
+       if ( !newtex ) {
+               Syn_Printf( MSG_WARN "image to texture failed\n" );
                return false;
        }
 
        Cleanup();
        m_tex = newtex;
 
-       g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+       g_FuncTable.m_pfnSysUpdateWindows( W_XY );
 
        return true;
 }
 
-bool CBackgroundImage::SetExtentsMM()
-{
+bool CBackgroundImage::SetExtentsMM(){
        entity_s *worldentity;
        const char *val;
        int xmin = 0, ymin = 0, xmax = 0, ymax = 0;
 
-       worldentity = (entity_s *)g_FuncTable.m_pfnGetEntityHandle(0);
-       if(!worldentity) {
-               Syn_Printf(MSG_WARN "SetExtentsMM worldspawn not found\n");
+       worldentity = (entity_s *)g_FuncTable.m_pfnGetEntityHandle( 0 );
+       if ( !worldentity ) {
+               Syn_Printf( MSG_WARN "SetExtentsMM worldspawn not found\n" );
                return false;
        }
        //TODO val is not NULL even if key does not exist
-       val = g_EntityTable.m_pfnValueForKey(worldentity,"mapcoordsmins");
-       if(!val || !val[0]) {
-               Syn_Printf(MSG_WARN "SetExtentsMM mapcoordsmins not found\n");
+       val = g_EntityTable.m_pfnValueForKey( worldentity,"mapcoordsmins" );
+       if ( !val || !val[0] ) {
+               Syn_Printf( MSG_WARN "SetExtentsMM mapcoordsmins not found\n" );
                return false;
        }
 // we could be more robust
 // note contortions due to splashs strange idea of min and max
-       if(sscanf(val, "%d %d",&xmin,&ymax) != 2)
-       {
-               Syn_Printf(MSG_WARN "SetExtentsMM mapcoordsmins malformed\n");
+       if ( sscanf( val, "%d %d",&xmin,&ymax ) != 2 ) {
+               Syn_Printf( MSG_WARN "SetExtentsMM mapcoordsmins malformed\n" );
                return false;
        }
 
-       val = g_EntityTable.m_pfnValueForKey(worldentity,"mapcoordsmaxs");
-       if(!val || !val[0]) {
-               Syn_Printf(MSG_WARN "SetExtentsMM mapcoordsmaxs not found\n");
+       val = g_EntityTable.m_pfnValueForKey( worldentity,"mapcoordsmaxs" );
+       if ( !val || !val[0] ) {
+               Syn_Printf( MSG_WARN "SetExtentsMM mapcoordsmaxs not found\n" );
                return false;
        }
-       if(sscanf(val, "%d %d",&xmax,&ymin) != 2)
-       {
-               Syn_Printf(MSG_WARN "SetExtentsMM mapcoordsmaxs malformed\n");
+       if ( sscanf( val, "%d %d",&xmax,&ymin ) != 2 ) {
+               Syn_Printf( MSG_WARN "SetExtentsMM mapcoordsmaxs malformed\n" );
                return false;
        }
        //might do sanity check before we commit
@@ -237,72 +227,74 @@ bool CBackgroundImage::SetExtentsMM()
        m_xmax = (float)xmax;
        m_ymax = (float)ymax;
 
-       g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+       g_FuncTable.m_pfnSysUpdateWindows( W_XY );
        return true;
 }
 
 // TODO, this should just be exported from core
 // ripped directly from radiant/select.cpp:Select_GetBounds
 //
-static bool get_selection_bounds (vec3_t mins, vec3_t maxs)
-{
-       brush_t *b;
-       int             i;
+static bool get_selection_bounds( vec3_t mins, vec3_t maxs ){
+       brush_t *b;
+       int i;
        brush_t *selected_brushes = g_DataTable.m_pfnSelectedBrushes();
        //TODO should never happen
-       if(!selected_brushes) {
-         Sys_Printf (MSG_PREFIX "selected_brushes = NULL\n"); 
-         return false;
+       if ( !selected_brushes ) {
+               Sys_Printf( MSG_PREFIX "selected_brushes = NULL\n" );
+               return false;
        }
        // this should mean no selection
-       if(selected_brushes == selected_brushes->next) {
-         Sys_Printf (MSG_PREFIX "nothing selected\n"); 
+       if ( selected_brushes == selected_brushes->next ) {
+               Sys_Printf( MSG_PREFIX "nothing selected\n" );
 
-         return false;
+               return false;
        }
 
-       for (i=0 ; i<3 ; i++)
+       for ( i = 0 ; i < 3 ; i++ )
        {
                mins[i] = 99999;
                maxs[i] = -99999;
        }
 
-       for (b=selected_brushes->next ; b != selected_brushes ; b=b->next)
+       for ( b = selected_brushes->next ; b != selected_brushes ; b = b->next )
        {
-               if (b->owner->eclass->fixedsize)
-               {
-                       for (i=0 ; i<3 ; i++)
+               if ( b->owner->eclass->fixedsize ) {
+                       for ( i = 0 ; i < 3 ; i++ )
                        {
-                               if (b->owner->origin[i] < mins[i])
+                               if ( b->owner->origin[i] < mins[i] ) {
                                        mins[i] = b->owner->origin[i];
-                               if (b->owner->origin[i] > maxs[i])
+                               }
+                               if ( b->owner->origin[i] > maxs[i] ) {
                                        maxs[i] = b->owner->origin[i];
+                               }
                        }
                }
                else
                {
-                       for (i=0 ; i<3 ; i++)
+                       for ( i = 0 ; i < 3 ; i++ )
                        {
-                               if (b->mins[i] < mins[i])
+                               if ( b->mins[i] < mins[i] ) {
                                        mins[i] = b->mins[i];
-                               if (b->maxs[i] > maxs[i])
+                               }
+                               if ( b->maxs[i] > maxs[i] ) {
                                        maxs[i] = b->maxs[i];
+                               }
                        }
                }
        }
-  return true;
+       return true;
 }
 
-bool CBackgroundImage::SetExtentsSel()
-{
+bool CBackgroundImage::SetExtentsSel(){
        vec3_t mins,maxs;
 
-       if(!get_selection_bounds(mins,maxs)) 
+       if ( !get_selection_bounds( mins,maxs ) ) {
                return false;
+       }
 
-       if(((int)mins[m_ix] == (int)maxs[m_ix]) ||
-     ((int)mins[m_iy] == (int)maxs[m_iy])) {
-               Syn_Printf(MSG_PREFIX "tiny selection\n");
+       if ( ( (int)mins[m_ix] == (int)maxs[m_ix] ) ||
+                ( (int)mins[m_iy] == (int)maxs[m_iy] ) ) {
+               Syn_Printf( MSG_PREFIX "tiny selection\n" );
                return false;
        }
 
@@ -311,8 +303,7 @@ bool CBackgroundImage::SetExtentsSel()
        m_xmax = maxs[m_ix];
        m_ymax = maxs[m_iy];
 
-       g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+       g_FuncTable.m_pfnSysUpdateWindows( W_XY );
 
-  return true;
+       return true;
 }
-
index 3874cb1..41ee271 100644 (file)
@@ -1,22 +1,22 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // bkgrnd2d Plugin
@@ -30,53 +30,56 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 class CBackgroundImage {
 private:
-       qtexture_t *m_tex;
-  VIEWTYPE m_vt;
-  
+qtexture_t *m_tex;
+VIEWTYPE m_vt;
+
 // which components of a vec3_t correspond to x and y in the image
-  unsigned m_ix,m_iy;
+unsigned m_ix,m_iy;
 
 public:
-       CBackgroundImage(VIEWTYPE vt);
+CBackgroundImage( VIEWTYPE vt );
 //  ~CBackgroundImage();
 
-       float m_alpha; // vertex alpha
-       bool m_bActive;
-       
+float m_alpha;     // vertex alpha
+bool m_bActive;
+
 // x and y axis are in relation to the screen, not world, making rendering
-// the same for each view type. Whoever sets them is responsible for 
+// the same for each view type. Whoever sets them is responsible for
 // shuffling.
 // units are world units.
 // TODO should be private
-       float m_xmin,m_ymin,m_xmax,m_ymax;
+float m_xmin,m_ymin,m_xmax,m_ymax;
 
 // load file, create new tex, cleanup old tex, set new tex
-       bool Load(const char *filename); 
-       void Cleanup(); // free texture, free tex, set make tex NULL
-       bool SetExtentsMM(); // set extents by ET mapcoordsmaxs/mapcoordsmins
-       bool SetExtentsSel(); // set extents by selection
-       void Render();
-       bool Valid() { return (m_tex && (m_xmin != m_xmax) && (m_ymin != m_ymax)); }
+bool Load( const char *filename );
+void Cleanup();     // free texture, free tex, set make tex NULL
+bool SetExtentsMM();     // set extents by ET mapcoordsmaxs/mapcoordsmins
+bool SetExtentsSel();     // set extents by selection
+void Render();
+bool Valid() { return ( m_tex && ( m_xmin != m_xmax ) && ( m_ymin != m_ymax ) ); }
 };
 
 class CBackgroundRender : public IGL2DWindow {
 public:
 
-  CBackgroundRender();
-  virtual ~CBackgroundRender();
+CBackgroundRender();
+virtual ~CBackgroundRender();
 
 protected:
-       int refCount;
+int refCount;
 
 public:
 
-  // IGL2DWindow IGL3DWindow interface
-       void IncRef() { refCount++; }
-       void DecRef() { refCount--; if (refCount <= 0) delete this; }
-       void Draw2D( VIEWTYPE vt );
-       void Register();
+// IGL2DWindow IGL3DWindow interface
+void IncRef() { refCount++; }
+void DecRef() {
+       refCount--; if ( refCount <= 0 ) {
+               delete this;
+       }
+}
+void Draw2D( VIEWTYPE vt );
+void Register();
 };
 
 extern CBackgroundImage backgroundXY,backgroundXZ,backgroundYZ;
 extern CBackgroundRender render;
-
index 8d9a845..6d63bc3 100644 (file)
@@ -1,22 +1,22 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // bkgrnd2d Plugin dialog
@@ -41,142 +41,137 @@ static GtkTooltips *pTooltips;
 class CBackgroundDialogPage
 {
 private:
-       GtkWidget *m_pWidget;
-       GtkWidget *m_pTabLabel;
-       GtkWidget *m_pFileLabel;
-       GtkWidget *m_pPosLabel;
-       VIEWTYPE m_vt;
-       bool m_bValidFile;
+GtkWidget *m_pWidget;
+GtkWidget *m_pTabLabel;
+GtkWidget *m_pFileLabel;
+GtkWidget *m_pPosLabel;
+VIEWTYPE m_vt;
+bool m_bValidFile;
 
 public:
-       CBackgroundImage *m_pImage;
-       CBackgroundDialogPage( VIEWTYPE vt );
-       void Append(GtkWidget *notebook);
-       void Browse();
-       void Reload();
-       void SetPosLabel();
+CBackgroundImage *m_pImage;
+CBackgroundDialogPage( VIEWTYPE vt );
+void Append( GtkWidget *notebook );
+void Browse();
+void Reload();
+void SetPosLabel();
 //  ~BackgroundDialogPage();
 };
 
 
 // dialog page callbacks
-static void browse_callback( GtkWidget *widget, gpointer data )
-{
-       ((CBackgroundDialogPage *)data)->Browse();
+static void browse_callback( GtkWidget *widget, gpointer data ){
+       ( (CBackgroundDialogPage *)data )->Browse();
 }
 
-static void reload_callback( GtkWidget *widget, gpointer data )
-{
-       ((CBackgroundDialogPage *)data)->Reload();
+static void reload_callback( GtkWidget *widget, gpointer data ){
+       ( (CBackgroundDialogPage *)data )->Reload();
 }
 
-static void size_sel_callback( GtkWidget *widget, gpointer data )
-{
+static void size_sel_callback( GtkWidget *widget, gpointer data ){
        CBackgroundDialogPage *pPage = (CBackgroundDialogPage *)data;
-       if (pPage->m_pImage->SetExtentsSel())
+       if ( pPage->m_pImage->SetExtentsSel() ) {
                pPage->SetPosLabel();
+       }
 }
 
-static void size_mm_callback( GtkWidget *widget, gpointer data )
-{
+static void size_mm_callback( GtkWidget *widget, gpointer data ){
        CBackgroundDialogPage *pPage = (CBackgroundDialogPage *)data;
-       if(pPage->m_pImage->SetExtentsMM())
+       if ( pPage->m_pImage->SetExtentsMM() ) {
                pPage->SetPosLabel();
+       }
 }
 
-static void alpha_adjust_callback( GtkWidget *widget, gpointer data )
-{
+static void alpha_adjust_callback( GtkWidget *widget, gpointer data ){
        CBackgroundDialogPage *pPage = (CBackgroundDialogPage *)data;
-       pPage->m_pImage->m_alpha = (float)gtk_range_get_value (GTK_RANGE(widget));
-       g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+       pPage->m_pImage->m_alpha = (float)gtk_range_get_value( GTK_RANGE( widget ) );
+       g_FuncTable.m_pfnSysUpdateWindows( W_XY );
 }
 
-void CBackgroundDialogPage::Reload()
-{
-       if(m_bValidFile)
-               m_pImage->Load(gtk_label_get_text(GTK_LABEL(m_pFileLabel)));
+void CBackgroundDialogPage::Reload(){
+       if ( m_bValidFile ) {
+               m_pImage->Load( gtk_label_get_text( GTK_LABEL( m_pFileLabel ) ) );
+       }
 }
 
-void CBackgroundDialogPage::Browse()
-{
+void CBackgroundDialogPage::Browse(){
        char browsedir[PATH_MAX];
        const char *ct;
        const char *newfile;
        char *t;
-       
+
        //TODO GetMapName saves the map. eeep!
        //also with no map, returns unnamed.map, otherwise returns full path
 //     Syn_Printf(MSG_PREFIX "GetMapName() %s\n",
 //                             g_FuncTable.m_pfnGetMapName());
-       
-       ct = g_FuncTable.m_pfnReadProjectKey("basepath");
+
+       ct = g_FuncTable.m_pfnReadProjectKey( "basepath" );
        // TODO shouldn't need this stuff
-       if(!ct || !strlen(ct)) {
-               Syn_Printf(MSG_PREFIX "basepath = NULL or empty\n");
+       if ( !ct || !strlen( ct ) ) {
+               Syn_Printf( MSG_PREFIX "basepath = NULL or empty\n" );
                return;
        }
-       Syn_Printf(MSG_PREFIX "basepath: %s\n",ct);
-       if(strlen(ct) >= PATH_MAX) {
-               Syn_Printf(MSG_PREFIX "base game dir too long\n");
+       Syn_Printf( MSG_PREFIX "basepath: %s\n",ct );
+       if ( strlen( ct ) >= PATH_MAX ) {
+               Syn_Printf( MSG_PREFIX "base game dir too long\n" );
                return;
        }
 
-       strcpy(browsedir,ct);
-       // make sure we have a trailing / 
-       if(browsedir[strlen(browsedir) - 1] != '/')
-               strcat(browsedir,"/");
+       strcpy( browsedir,ct );
+       // make sure we have a trailing /
+       if ( browsedir[strlen( browsedir ) - 1] != '/' ) {
+               strcat( browsedir,"/" );
+       }
 
        //if we dont have a file yet, don't try to use it for default dir
-       if(m_bValidFile) {
-       // filename should always be a nice clean unix style relative path
-               ct = gtk_label_get_text(GTK_LABEL(m_pFileLabel));
-               strcat(browsedir,ct);
-               Syn_Printf(MSG_PREFIX "full path: %s\n",browsedir);
+       if ( m_bValidFile ) {
+               // filename should always be a nice clean unix style relative path
+               ct = gtk_label_get_text( GTK_LABEL( m_pFileLabel ) );
+               strcat( browsedir,ct );
+               Syn_Printf( MSG_PREFIX "full path: %s\n",browsedir );
 
                // lop off the file part
-               t = browsedir + strlen(browsedir) - 1;
-               while (t != browsedir && *t != '/') 
+               t = browsedir + strlen( browsedir ) - 1;
+               while ( t != browsedir && *t != '/' )
                        t--;
                *t = 0;
        }
-       Syn_Printf(MSG_PREFIX "browse directory %s\n",browsedir);
-       
+       Syn_Printf( MSG_PREFIX "browse directory %s\n",browsedir );
+
 //does NOT need freeing contrary to include/qerplugin.h comments
 //TODO bug/patch for comments
 //TODO patern gets fucked up sometimes if empty
 //http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=915
-       newfile = g_FuncTable.m_pfnFileDialog(pDialogWnd,TRUE,
-                                                                 "Load Background Image",browsedir,FILETYPE_KEY);
-       if(!newfile) {
-               Syn_Printf(MSG_PREFIX "newfile = NULL\n");
+       newfile = g_FuncTable.m_pfnFileDialog( pDialogWnd,TRUE,
+                                                                                  "Load Background Image",browsedir,FILETYPE_KEY );
+       if ( !newfile ) {
+               Syn_Printf( MSG_PREFIX "newfile = NULL\n" );
                return;
        }
-       Syn_Printf(MSG_PREFIX "newfile: %s\n",newfile);
-       newfile = g_FileSystemTable.m_pfnExtractRelativePath(newfile);
+       Syn_Printf( MSG_PREFIX "newfile: %s\n",newfile );
+       newfile = g_FileSystemTable.m_pfnExtractRelativePath( newfile );
 
-       if(!newfile) {
-               Syn_Printf(MSG_PREFIX "newfile = NULL\n");
+       if ( !newfile ) {
+               Syn_Printf( MSG_PREFIX "newfile = NULL\n" );
                return;
        }
-       Syn_Printf(MSG_PREFIX "newfile: %s\n",newfile);
+       Syn_Printf( MSG_PREFIX "newfile: %s\n",newfile );
 
-       if(m_pImage->Load(newfile)) {
+       if ( m_pImage->Load( newfile ) ) {
                m_bValidFile = true;
-               gtk_label_set_text(GTK_LABEL(m_pFileLabel),newfile);
+               gtk_label_set_text( GTK_LABEL( m_pFileLabel ),newfile );
        }
 }
 
-void CBackgroundDialogPage::SetPosLabel()
-{
+void CBackgroundDialogPage::SetPosLabel(){
        char s[64];
        // TODO no snprintf ?
-       sprintf(s, "Size/Position (%d,%d) (%d,%d)",(int)(m_pImage->m_xmin),
-                       (int)(m_pImage->m_ymin),(int)(m_pImage->m_xmax),(int)(m_pImage->m_ymax));
-       gtk_label_set_text(GTK_LABEL(m_pPosLabel),s);
+       sprintf( s, "Size/Position (%d,%d) (%d,%d)",(int)( m_pImage->m_xmin ),
+                        (int)( m_pImage->m_ymin ),(int)( m_pImage->m_xmax ),(int)( m_pImage->m_ymax ) );
+       gtk_label_set_text( GTK_LABEL( m_pPosLabel ),s );
 }
 
-CBackgroundDialogPage::CBackgroundDialogPage(VIEWTYPE vt )
-{
+CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){
        GtkWidget *frame;
        GtkWidget *hbox;
        GtkWidget *w;
@@ -185,180 +180,174 @@ CBackgroundDialogPage::CBackgroundDialogPage(VIEWTYPE vt )
 
        m_bValidFile = false;
 
-       switch(m_vt)
+       switch ( m_vt )
        {
-               case XY:
-                       m_pTabLabel = gtk_label_new("X/Y");
-                       m_pImage = &backgroundXY;
-                       break;
-               case XZ:
-                       m_pTabLabel = gtk_label_new("X/Z");
-                       m_pImage = &backgroundXZ;
-                       break;
-               case YZ:
-                       m_pTabLabel = gtk_label_new("Y/Z");
-                       m_pImage = &backgroundYZ;
-                       break;
+       case XY:
+               m_pTabLabel = gtk_label_new( "X/Y" );
+               m_pImage = &backgroundXY;
+               break;
+       case XZ:
+               m_pTabLabel = gtk_label_new( "X/Z" );
+               m_pImage = &backgroundXZ;
+               break;
+       case YZ:
+               m_pTabLabel = gtk_label_new( "Y/Z" );
+               m_pImage = &backgroundYZ;
+               break;
        }
 // A vbox to hold everything
-       m_pWidget = gtk_vbox_new(FALSE,0); 
+       m_pWidget = gtk_vbox_new( FALSE,0 );
 // Frame for file row
-       frame = gtk_frame_new("File");
-       gtk_box_pack_start (GTK_BOX (m_pWidget),frame, FALSE, FALSE, 2);
+       frame = gtk_frame_new( "File" );
+       gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 );
 
 // hbox for first row
-       hbox = gtk_hbox_new(FALSE,5);
-       gtk_container_set_border_width(GTK_CONTAINER (hbox),4);
-       gtk_container_add (GTK_CONTAINER (frame), hbox);
+       hbox = gtk_hbox_new( FALSE,5 );
+       gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
+       gtk_container_add( GTK_CONTAINER( frame ), hbox );
 
 // label to display filename
-       m_pFileLabel  = gtk_label_new(NO_FILE_MSG);
-       gtk_label_set_selectable(GTK_LABEL(m_pFileLabel),TRUE);
+       m_pFileLabel  = gtk_label_new( NO_FILE_MSG );
+       gtk_label_set_selectable( GTK_LABEL( m_pFileLabel ),TRUE );
 //TODO set min size ? done with spaces right now
-       gtk_box_pack_start (GTK_BOX (hbox),m_pFileLabel, TRUE, TRUE, 5);
-
-  gtk_widget_show (m_pFileLabel);
-
-       w = gtk_button_new_with_label ("Browse...");
-       g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (browse_callback),
-                                                              (gpointer)this);
-       gtk_box_pack_start (GTK_BOX (hbox),w, FALSE, FALSE, 5);
-       gtk_tooltips_set_tip (pTooltips, w, "Select a file", NULL);
-  gtk_widget_show (w);
-       
-       w = gtk_button_new_with_label ("Reload");
-       g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (reload_callback),
-                                                              (gpointer)this);
+       gtk_box_pack_start( GTK_BOX( hbox ),m_pFileLabel, TRUE, TRUE, 5 );
+
+       gtk_widget_show( m_pFileLabel );
+
+       w = gtk_button_new_with_label( "Browse..." );
+       g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( browse_callback ),
+                                         ( gpointer ) this );
+       gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+       gtk_tooltips_set_tip( pTooltips, w, "Select a file", NULL );
+       gtk_widget_show( w );
+
+       w = gtk_button_new_with_label( "Reload" );
+       g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( reload_callback ),
+                                         ( gpointer ) this );
        // TODO disable until we have file
        // gtk_widget_set_sensitive(w,FALSE);
-       gtk_tooltips_set_tip (pTooltips, w, "Reload current file", NULL);
-       gtk_box_pack_start (GTK_BOX (hbox),w, FALSE, FALSE, 5);
-  gtk_widget_show (w);
+       gtk_tooltips_set_tip( pTooltips, w, "Reload current file", NULL );
+       gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+       gtk_widget_show( w );
 
-       gtk_widget_show (hbox);
-       gtk_widget_show (frame);
+       gtk_widget_show( hbox );
+       gtk_widget_show( frame );
 
 // second row (rendering options)
-       frame = gtk_frame_new("Rendering");
-       gtk_box_pack_start (GTK_BOX (m_pWidget),frame, FALSE, FALSE, 2);
-
-       hbox = gtk_hbox_new(FALSE,5);
-       gtk_container_set_border_width(GTK_CONTAINER (hbox),4);
-       gtk_container_add (GTK_CONTAINER (frame), hbox);
-
-       w = gtk_label_new("Vertex alpha:");
-       gtk_box_pack_start (GTK_BOX (hbox),w, FALSE, FALSE, 5);
-  gtk_widget_show (w);
-
-       w = gtk_hscale_new_with_range(0.0,1.0,0.01);
-       gtk_range_set_value(GTK_RANGE(w),0.5);
-       gtk_scale_set_value_pos(GTK_SCALE(w),GTK_POS_LEFT);
-       g_signal_connect (G_OBJECT (w), "value-changed",
-                          G_CALLBACK (alpha_adjust_callback), (gpointer)this);
-       gtk_box_pack_start (GTK_BOX (hbox),w, TRUE, TRUE, 5);
-       gtk_tooltips_set_tip (pTooltips, w, "Set image transparancy", NULL);
-  gtk_widget_show (w);
-
-       gtk_widget_show (hbox);
-       gtk_widget_show (frame);
+       frame = gtk_frame_new( "Rendering" );
+       gtk_box_pack_start( GTK_BOX( m_pWidget ),frame, FALSE, FALSE, 2 );
+
+       hbox = gtk_hbox_new( FALSE,5 );
+       gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
+       gtk_container_add( GTK_CONTAINER( frame ), hbox );
+
+       w = gtk_label_new( "Vertex alpha:" );
+       gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
+       gtk_widget_show( w );
+
+       w = gtk_hscale_new_with_range( 0.0,1.0,0.01 );
+       gtk_range_set_value( GTK_RANGE( w ),0.5 );
+       gtk_scale_set_value_pos( GTK_SCALE( w ),GTK_POS_LEFT );
+       g_signal_connect( G_OBJECT( w ), "value-changed",
+                                         G_CALLBACK( alpha_adjust_callback ), ( gpointer ) this );
+       gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, TRUE, 5 );
+       gtk_tooltips_set_tip( pTooltips, w, "Set image transparancy", NULL );
+       gtk_widget_show( w );
+
+       gtk_widget_show( hbox );
+       gtk_widget_show( frame );
 // Third row (size and position)
-       frame = gtk_frame_new("Size/Position (undefined)");
-       m_pPosLabel = gtk_frame_get_label_widget (GTK_FRAME(frame));
-       gtk_box_pack_start ( GTK_BOX (m_pWidget), frame, FALSE, FALSE, 2);
-
-       hbox = gtk_hbox_new(FALSE,5);
-       gtk_container_add (GTK_CONTAINER (frame), hbox);
-       gtk_container_set_border_width(GTK_CONTAINER (hbox),4);
-
-       w = gtk_button_new_with_label ("from selection");
-       gtk_box_pack_start (GTK_BOX (hbox),w, TRUE, FALSE, 5);
-       g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (size_sel_callback),
-                                                                (gpointer)this);
-       gtk_tooltips_set_tip (pTooltips, w, "Set the size of the image to the bounding rectangle of all selected brushes and entities", NULL);
-  gtk_widget_show (w);
-
-       if(m_vt == XY) {
-               w = gtk_button_new_with_label ("from map mins/maxs");
-               gtk_box_pack_start ( GTK_BOX (hbox),w, TRUE, FALSE, 2);
-               g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (size_mm_callback),
-                                                                (gpointer)this);
-               gtk_tooltips_set_tip (pTooltips, w, "Set the size of the image using the mapcoordsmins and mapcoordsmaxs keys of the worldspawn entity", NULL);
-               gtk_widget_show (w);
+       frame = gtk_frame_new( "Size/Position (undefined)" );
+       m_pPosLabel = gtk_frame_get_label_widget( GTK_FRAME( frame ) );
+       gtk_box_pack_start( GTK_BOX( m_pWidget ), frame, FALSE, FALSE, 2 );
+
+       hbox = gtk_hbox_new( FALSE,5 );
+       gtk_container_add( GTK_CONTAINER( frame ), hbox );
+       gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
+
+       w = gtk_button_new_with_label( "from selection" );
+       gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 5 );
+       g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( size_sel_callback ),
+                                         ( gpointer ) this );
+       gtk_tooltips_set_tip( pTooltips, w, "Set the size of the image to the bounding rectangle of all selected brushes and entities", NULL );
+       gtk_widget_show( w );
+
+       if ( m_vt == XY ) {
+               w = gtk_button_new_with_label( "from map mins/maxs" );
+               gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 2 );
+               g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( size_mm_callback ),
+                                                 ( gpointer ) this );
+               gtk_tooltips_set_tip( pTooltips, w, "Set the size of the image using the mapcoordsmins and mapcoordsmaxs keys of the worldspawn entity", NULL );
+               gtk_widget_show( w );
        }
 
-       gtk_widget_show (hbox);
-       gtk_widget_show (frame);
+       gtk_widget_show( hbox );
+       gtk_widget_show( frame );
 
-  gtk_widget_show ( m_pWidget );
+       gtk_widget_show( m_pWidget );
 }
 
-void CBackgroundDialogPage::Append(GtkWidget *notebook)
-{
-       gtk_notebook_append_page( GTK_NOTEBOOK(notebook), m_pWidget, m_pTabLabel);
+void CBackgroundDialogPage::Append( GtkWidget *notebook ){
+       gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), m_pWidget, m_pTabLabel );
 }
 
 // dialog global callbacks
 /*
-static gint expose_callback( GtkWidget *widget, gpointer data )
-{
-       return FALSE;
-}
-*/
-
-static void response_callback( GtkWidget *widget, gint response, gpointer data )
-{
-       if( response == GTK_RESPONSE_CLOSE )
-               gtk_widget_hide( pDialogWnd );
+   static gint expose_callback( GtkWidget *widget, gpointer data )
+   {
+    return FALSE;
+   }
+ */
+
+static void response_callback( GtkWidget *widget, gint response, gpointer data ){
+       if ( response == GTK_RESPONSE_CLOSE ) {
+               gtk_widget_hide( pDialogWnd );
+       }
 }
 
-static gint close_callback( GtkWidget *widget, gpointer data )
-{
-       gtk_widget_hide( pDialogWnd );
+static gint close_callback( GtkWidget *widget, gpointer data ){
+       gtk_widget_hide( pDialogWnd );
        return TRUE;
 }
 
-void InitBackgroundDialog()
-{
+void InitBackgroundDialog(){
        CBackgroundDialogPage *pPage;
 
-       pDialogWnd = gtk_dialog_new_with_buttons ("Background Images",
-                              GTK_WINDOW(g_pMainWidget),
-                              (GtkDialogFlags)(GTK_DIALOG_DESTROY_WITH_PARENT),
-        // TODO dialog with no buttons
-        //                                                                               GTK_STOCK_CLOSE,
-        //                                                                               GTK_RESPONSE_CLOSE,
-                              NULL);
-       gtk_signal_connect( GTK_OBJECT (pDialogWnd), "delete_event",
-                                    GTK_SIGNAL_FUNC( close_callback ), NULL );
-       gtk_signal_connect( GTK_OBJECT (pDialogWnd), "response",
-                                  GTK_SIGNAL_FUNC( response_callback ), NULL );
-//     gtk_signal_connect( GTK_OBJECT (pDialogWnd), "expose_event", GTK_SIGNAL_FUNC( ci_expose ), NULL );
+       pDialogWnd = gtk_dialog_new_with_buttons"Background Images",
+                                                                                         GTK_WINDOW( g_pMainWidget ),
+                                                                                         (GtkDialogFlags)( GTK_DIALOG_DESTROY_WITH_PARENT ),
+                                                 // TODO dialog with no buttons
+                                                 //                                                                              GTK_STOCK_CLOSE,
+                                                 //                                                                              GTK_RESPONSE_CLOSE,
+                                                                                         NULL );
+       gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "delete_event",
+                                               GTK_SIGNAL_FUNC( close_callback ), NULL );
+       gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "response",
+                                               GTK_SIGNAL_FUNC( response_callback ), NULL );
+//  gtk_signal_connect( GTK_OBJECT (pDialogWnd), "expose_event", GTK_SIGNAL_FUNC( ci_expose ), NULL );
 
        pTooltips = gtk_tooltips_new();
 
        pNotebook = gtk_notebook_new();
-       pPage = new CBackgroundDialogPage(XY);
-       pPage->Append(pNotebook);
-       pPage = new CBackgroundDialogPage(XZ);
-       pPage->Append(pNotebook);
-       pPage = new CBackgroundDialogPage(YZ);
-       pPage->Append(pNotebook);
+       pPage = new CBackgroundDialogPage( XY );
+       pPage->Append( pNotebook );
+       pPage = new CBackgroundDialogPage( XZ );
+       pPage->Append( pNotebook );
+       pPage = new CBackgroundDialogPage( YZ );
+       pPage->Append( pNotebook );
+
+       gtk_box_pack_start( GTK_BOX( GTK_DIALOG( pDialogWnd )->vbox ), pNotebook, TRUE, TRUE, 0 );
 
-       gtk_box_pack_start (GTK_BOX (GTK_DIALOG(pDialogWnd)->vbox), pNotebook, TRUE, TRUE, 0);
+       gtk_widget_show( pNotebook );
 
-  gtk_widget_show ( pNotebook );
-       
        gtk_widget_realize( pDialogWnd );
 }
 
-void ShowBackgroundDialog()
-{
-       gtk_window_present( GTK_WINDOW(pDialogWnd) );
+void ShowBackgroundDialog(){
+       gtk_window_present( GTK_WINDOW( pDialogWnd ) );
 }
 
-void ShowBackgroundDialogPG(int page)
-{
-       gtk_notebook_set_current_page(GTK_NOTEBOOK(pNotebook),page);
+void ShowBackgroundDialogPG( int page ){
+       gtk_notebook_set_current_page( GTK_NOTEBOOK( pNotebook ),page );
        ShowBackgroundDialog();
 }
-
index 03af207..29a511d 100644 (file)
@@ -1,22 +1,22 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // bkgrnd2d Plugin dialog box
@@ -30,6 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 void InitBackgroundDialog();
 void ShowBackgroundDialog();
-void ShowBackgroundDialogPG(int page);
+void ShowBackgroundDialogPG( int page );
 
 #endif // _BKGRND2D_DIALOG_H_
index a37882c..4470571 100644 (file)
@@ -1,44 +1,44 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // 2d background Plugin
 //
 // Code by reyalP aka Reed Mideke
 //
-// Based on 
+// Based on
 //
 
 /*
     Overview
     ========
-       This little plugin allows you to display an image in the background of the
-       gtkradiant XY window.
+    This little plugin allows you to display an image in the background of the
+    gtkradiant XY window.
 
     Version History
     ===============
 
     v0.1
       - Initial version.
-       v0.2
-         - three views, dialog box, toolbar
+    v0.2
+      - three views, dialog box, toolbar
     v0.25
       - tooltips, follow gtkradiant coding conventions
 
@@ -50,14 +50,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     How ?
     -----
      - textures 'n widgets 'n stuff.
-*/
+ */
 
 //#include "plugin.h"
 //TODO we just poke the objects directly
 #include "bkgrnd2d.h"
 #include "dialog.h"
 
-#define CMD_SEP "-" 
+#define CMD_SEP "-"
 #define CMD_CONFIG "Configure..."
 #define CMD_ABOUT "About..."
 // =============================================================================
@@ -79,13 +79,13 @@ void *g_pMainWidget;
 static const char *PLUGIN_NAME = "2d window background plugin";
 
 //backwards for some reason
-static const char *PLUGIN_COMMANDS = CMD_ABOUT ";" 
-                                     CMD_SEP ";"
-                                                                                        CMD_CONFIG
-                                     ;
+static const char *PLUGIN_COMMANDS = CMD_ABOUT ";"
+                                                                        CMD_SEP ";"
+                                                                        CMD_CONFIG
+;
 
 static const char *PLUGIN_ABOUT = "2d window background v0.25\n\n"
-                                  "By reyalP (hellsownpuppy@yahoo.com)";
+                                                                 "By reyalP (hellsownpuppy@yahoo.com)";
 
 
 
@@ -100,37 +100,37 @@ struct toolbar_button_info_s
        const char *image;
        const char *text;
        const char *tip;
-       void (*func)();
+       void ( *func )();
        IToolbarButton::EType type;
 };
 
-struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] = 
+struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
 {
        {
                "bkgrnd2d_xy_toggle.bmp",
                "xy background",
-    "Toggle xy background image",
+               "Toggle xy background image",
                DoBkgrndToggleXY,
                IToolbarButton::eToggleButton
        },
        {
                "bkgrnd2d_xz_toggle.bmp",
                "xz background",
-    "Toggle xz background image",
+               "Toggle xz background image",
                DoBkgrndToggleXZ,
                IToolbarButton::eToggleButton
        },
        {
                "bkgrnd2d_yz_toggle.bmp",
                "yz background",
-    "Toggle yz background image",
+               "Toggle yz background image",
                DoBkgrndToggleYZ,
                IToolbarButton::eToggleButton
        },
        {
                "bkgrnd2d_conf.bmp",
                "Configure",
-    "Configure background images",
+               "Configure background images",
                ShowBackgroundDialog,
                IToolbarButton::eButton
        },
@@ -139,112 +139,104 @@ struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
 class Bkgrnd2dButton : public IToolbarButton
 {
 public:
-  const toolbar_button_info_s *bi;
-  virtual const char* getImage() const
-  {
-    return bi->image;
-  }
-  virtual const char* getText() const
-  {
-    return bi->text;
-  }
-  virtual const char* getTooltip() const
-  {
-    return bi->tip;
-  }
-  virtual void activate() const
-  {
-    bi->func();
-    return ;
-  }
-  virtual EType getType() const
-  {
-    return bi->type;
-  }
+const toolbar_button_info_s *bi;
+virtual const char* getImage() const {
+       return bi->image;
+}
+virtual const char* getText() const {
+       return bi->text;
+}
+virtual const char* getTooltip() const {
+       return bi->tip;
+}
+virtual void activate() const {
+       bi->func();
+       return ;
+}
+virtual EType getType() const {
+       return bi->type;
+}
 };
 
 Bkgrnd2dButton g_bkgrnd2dbuttons[NUM_TOOLBAR_BUTTONS];
 
-unsigned int ToolbarButtonCount()
-{
-  return NUM_TOOLBAR_BUTTONS;
+unsigned int ToolbarButtonCount(){
+       return NUM_TOOLBAR_BUTTONS;
 }
 
-const IToolbarButton* GetToolbarButton(unsigned int index)
-{
-  g_bkgrnd2dbuttons[index].bi = &toolbar_buttons[index];
-  return &g_bkgrnd2dbuttons[index];
+const IToolbarButton* GetToolbarButton( unsigned int index ){
+       g_bkgrnd2dbuttons[index].bi = &toolbar_buttons[index];
+       return &g_bkgrnd2dbuttons[index];
 }
 
-extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget)
-{
-  g_pMainWidget = pMainWidget;
+extern "C" const char* QERPlug_Init( void *hApp, void* pMainWidget ){
+       g_pMainWidget = pMainWidget;
 
-  InitBackgroundDialog();
-  render.Register();
+       InitBackgroundDialog();
+       render.Register();
 
 //TODO is it right ? is it wrong ? it works
 //TODO figure out supported image types
-  GetFileTypeRegistry()->addType(FILETYPE_KEY, filetype_t("all files", "*.*"));
-  GetFileTypeRegistry()->addType(FILETYPE_KEY, filetype_t("jpeg files", "*.jpg"));
-  GetFileTypeRegistry()->addType(FILETYPE_KEY, filetype_t("targa files", "*.tga"));
-  return (char *) PLUGIN_NAME;
+       GetFileTypeRegistry()->addType( FILETYPE_KEY, filetype_t( "all files", "*.*" ) );
+       GetFileTypeRegistry()->addType( FILETYPE_KEY, filetype_t( "jpeg files", "*.jpg" ) );
+       GetFileTypeRegistry()->addType( FILETYPE_KEY, filetype_t( "targa files", "*.tga" ) );
+       return (char *) PLUGIN_NAME;
 }
 
-extern "C" const char* QERPlug_GetName ()
-{
-  return (char *) PLUGIN_NAME;
+extern "C" const char* QERPlug_GetName(){
+       return (char *) PLUGIN_NAME;
 }
 
-extern "C" const char* QERPlug_GetCommandList ()
-{
-  return (char *) PLUGIN_COMMANDS;
+extern "C" const char* QERPlug_GetCommandList(){
+       return (char *) PLUGIN_COMMANDS;
 }
 
-extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrush)
-{
-  Sys_Printf (MSG_PREFIX "Command \"%s\"\n",p); 
-  if(!strcmp(p, CMD_ABOUT)) {
-       g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
-  } 
-  else if(!strcmp(p,CMD_CONFIG)) {
-       ShowBackgroundDialog();
-  }
+extern "C" void QERPlug_Dispatch( const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrush ){
+       Sys_Printf( MSG_PREFIX "Command \"%s\"\n",p );
+       if ( !strcmp( p, CMD_ABOUT ) ) {
+               g_FuncTable.m_pfnMessageBox( NULL, PLUGIN_ABOUT, "About", MB_OK, NULL );
+       }
+       else if ( !strcmp( p,CMD_CONFIG ) ) {
+               ShowBackgroundDialog();
+       }
 }
 
 //TODO these three suck
-void DoBkgrndToggleXY()
-{
-  Sys_Printf (MSG_PREFIX "DoBkgrndToggleXY\n"); 
-  // always toggle, since the buttons do
-  backgroundXY.m_bActive = (backgroundXY.m_bActive) ? false:true;
-  // if we don't have image or extents, and we activated,
-  // bring up the dialog with the corresponding page
-  // would be better to hide or grey out button, but we can't
-  if(backgroundXY.m_bActive && !backgroundXY.Valid())
-         ShowBackgroundDialogPG(0);
-  else
-         g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+void DoBkgrndToggleXY(){
+       Sys_Printf( MSG_PREFIX "DoBkgrndToggleXY\n" );
+       // always toggle, since the buttons do
+       backgroundXY.m_bActive = ( backgroundXY.m_bActive ) ? false : true;
+       // if we don't have image or extents, and we activated,
+       // bring up the dialog with the corresponding page
+       // would be better to hide or grey out button, but we can't
+       if ( backgroundXY.m_bActive && !backgroundXY.Valid() ) {
+               ShowBackgroundDialogPG( 0 );
+       }
+       else{
+               g_FuncTable.m_pfnSysUpdateWindows( W_XY );
+       }
 }
 
-void DoBkgrndToggleXZ()
-{
-  Sys_Printf (MSG_PREFIX "DoBkgrndToggleXZ\n"); 
-  backgroundXZ.m_bActive = (backgroundXZ.m_bActive) ? false:true;
-  if(backgroundXZ.m_bActive && !backgroundXZ.Valid())
-         ShowBackgroundDialogPG(1);
-  else
-         g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+void DoBkgrndToggleXZ(){
+       Sys_Printf( MSG_PREFIX "DoBkgrndToggleXZ\n" );
+       backgroundXZ.m_bActive = ( backgroundXZ.m_bActive ) ? false : true;
+       if ( backgroundXZ.m_bActive && !backgroundXZ.Valid() ) {
+               ShowBackgroundDialogPG( 1 );
+       }
+       else{
+               g_FuncTable.m_pfnSysUpdateWindows( W_XY );
+       }
 }
 
-void DoBkgrndToggleYZ()
-{
-  Sys_Printf (MSG_PREFIX "DoBkgrndToggleYZ\n"); 
-  backgroundYZ.m_bActive = (backgroundYZ.m_bActive) ? false:true;
-  if(backgroundYZ.m_bActive && !backgroundYZ.Valid())
-         ShowBackgroundDialogPG(2);
-  else
-         g_FuncTable.m_pfnSysUpdateWindows(W_XY);
+void DoBkgrndToggleYZ(){
+       Sys_Printf( MSG_PREFIX "DoBkgrndToggleYZ\n" );
+       backgroundYZ.m_bActive = ( backgroundYZ.m_bActive ) ? false : true;
+       if ( backgroundYZ.m_bActive && !backgroundYZ.Valid() ) {
+               ShowBackgroundDialogPG( 2 );
+       }
+       else{
+               g_FuncTable.m_pfnSysUpdateWindows( W_XY );
+       }
 }
 
 // =============================================================================
@@ -252,68 +244,60 @@ void DoBkgrndToggleYZ()
 
 CSynapseServer* g_pSynapseServer = NULL;
 CSynapseClientBkgrnd2d g_SynapseClient;
-    
-extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer)
-{
-  if (strcmp(version, SYNAPSE_VERSION))
-  {
-    Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);
-    return NULL;
-  }
-  g_pSynapseServer = pServer;
-  g_pSynapseServer->IncRef();
-  Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf());
-
-  g_SynapseClient.AddAPI(TOOLBAR_MAJOR, BKGRND2D_MINOR, sizeof(_QERPlugToolbarTable));
-  g_SynapseClient.AddAPI(PLUGIN_MAJOR, BKGRND2D_MINOR, sizeof( _QERPluginTable ) );
-
-  g_SynapseClient.AddAPI( RADIANT_MAJOR, NULL, sizeof( g_FuncTable ), SYN_REQUIRE, &g_FuncTable );
-  g_SynapseClient.AddAPI( QGL_MAJOR, NULL, sizeof( g_QglTable ), SYN_REQUIRE, &g_QglTable );
+
+extern "C" CSynapseClient * SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ){
+       if ( strcmp( version, SYNAPSE_VERSION ) ) {
+               Syn_Printf( "ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version );
+               return NULL;
+       }
+       g_pSynapseServer = pServer;
+       g_pSynapseServer->IncRef();
+       Set_Syn_Printf( g_pSynapseServer->Get_Syn_Printf() );
+
+       g_SynapseClient.AddAPI( TOOLBAR_MAJOR, BKGRND2D_MINOR, sizeof( _QERPlugToolbarTable ) );
+       g_SynapseClient.AddAPI( PLUGIN_MAJOR, BKGRND2D_MINOR, sizeof( _QERPluginTable ) );
+
+       g_SynapseClient.AddAPI( RADIANT_MAJOR, NULL, sizeof( g_FuncTable ), SYN_REQUIRE, &g_FuncTable );
+       g_SynapseClient.AddAPI( QGL_MAJOR, NULL, sizeof( g_QglTable ), SYN_REQUIRE, &g_QglTable );
 // TODO is this the right way to ask for 'whichever VFS we have loaded' ? Seems to work
 // for misc filename functions
-  g_SynapseClient.AddAPI( VFS_MAJOR, "*", sizeof( g_FileSystemTable ), SYN_REQUIRE, &g_FileSystemTable );
+       g_SynapseClient.AddAPI( VFS_MAJOR, "*", sizeof( g_FileSystemTable ), SYN_REQUIRE, &g_FileSystemTable );
 // get worldspawn
-  g_SynapseClient.AddAPI( ENTITY_MAJOR, NULL, sizeof( g_EntityTable ), SYN_REQUIRE, &g_EntityTable );
+       g_SynapseClient.AddAPI( ENTITY_MAJOR, NULL, sizeof( g_EntityTable ), SYN_REQUIRE, &g_EntityTable );
 // selected brushes
-  g_SynapseClient.AddAPI( DATA_MAJOR, NULL, sizeof( g_DataTable ), SYN_REQUIRE, &g_DataTable );
+       g_SynapseClient.AddAPI( DATA_MAJOR, NULL, sizeof( g_DataTable ), SYN_REQUIRE, &g_DataTable );
 
-  return &g_SynapseClient;
+       return &g_SynapseClient;
 }
 
-bool CSynapseClientBkgrnd2d::RequestAPI(APIDescriptor_t *pAPI)
-{
-  if (!strcmp(pAPI->major_name, PLUGIN_MAJOR))
-  {
-    _QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable);
-
-    pTable->m_pfnQERPlug_Init = QERPlug_Init;
-    pTable->m_pfnQERPlug_GetName = QERPlug_GetName;
-    pTable->m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList;
-    pTable->m_pfnQERPlug_Dispatch = QERPlug_Dispatch;
-    return true;
-  }
-  if (!strcmp(pAPI->major_name, TOOLBAR_MAJOR))
-  {
-    _QERPlugToolbarTable* pTable= static_cast<_QERPlugToolbarTable*>(pAPI->mpTable);
-
-    pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount;
-    pTable->m_pfnGetToolbarButton = &GetToolbarButton;
-    return true;
-  }
-
-  Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo());
-  return false;
+bool CSynapseClientBkgrnd2d::RequestAPI( APIDescriptor_t *pAPI ){
+       if ( !strcmp( pAPI->major_name, PLUGIN_MAJOR ) ) {
+               _QERPluginTable* pTable = static_cast<_QERPluginTable*>( pAPI->mpTable );
+
+               pTable->m_pfnQERPlug_Init = QERPlug_Init;
+               pTable->m_pfnQERPlug_GetName = QERPlug_GetName;
+               pTable->m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList;
+               pTable->m_pfnQERPlug_Dispatch = QERPlug_Dispatch;
+               return true;
+       }
+       if ( !strcmp( pAPI->major_name, TOOLBAR_MAJOR ) ) {
+               _QERPlugToolbarTable* pTable = static_cast<_QERPlugToolbarTable*>( pAPI->mpTable );
+
+               pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount;
+               pTable->m_pfnGetToolbarButton = &GetToolbarButton;
+               return true;
+       }
+
+       Syn_Printf( "ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo() );
+       return false;
 }
 
 #include "version.h"
 
-const char* CSynapseClientBkgrnd2d::GetInfo()
-{
-  return "2d Background plugin built " __DATE__ " " RADIANT_VERSION;
+const char* CSynapseClientBkgrnd2d::GetInfo(){
+       return "2d Background plugin built " __DATE__ " " RADIANT_VERSION;
 }
 
-const char* CSynapseClientBkgrnd2d::GetName()
-{
-  return "bkgrnd2d";
+const char* CSynapseClientBkgrnd2d::GetName(){
+       return "bkgrnd2d";
 }
-
index 30b0ca7..13ca737 100644 (file)
@@ -1,22 +1,22 @@
 /*
-Copyright (C) 2003 Reed Mideke.
+   Copyright (C) 2003 Reed Mideke.
 
-This file is part of GtkRadiant.
+   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 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.
+   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
-*/
+   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
+ */
 
 //
 // bkgrnd2d Plugin
@@ -30,9 +30,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define _PLUGIN_H_
 
 /*!
-\todo need general notice about lib purpose etc.
-and the external dependencies (such as GLib, STL, mathlib etc.)
-*/
+   \todo need general notice about lib purpose etc.
+   and the external dependencies (such as GLib, STL, mathlib etc.)
+ */
 
 #include <stdio.h>
 // for CPtrArray for idata.h
@@ -63,13 +63,13 @@ extern CSynapseServer* g_pSynapseServer;
 class CSynapseClientBkgrnd2d : public CSynapseClient
 {
 public:
-  // CSynapseClient API
-  bool RequestAPI(APIDescriptor_t *pAPI);
-  const char* GetInfo();
-  const char* GetName();
+// CSynapseClient API
+bool RequestAPI( APIDescriptor_t *pAPI );
+const char* GetInfo();
+const char* GetName();
 
-  CSynapseClientBkgrnd2d() { }
-  virtual ~CSynapseClientBkgrnd2d() { }
+CSynapseClientBkgrnd2d() { }
+virtual ~CSynapseClientBkgrnd2d() { }
 };
 #define MSG_PREFIX "bkgrnd2d: "
 #define MSG_WARN "bkgrnd2d WARNING: "
index 71f399b..fc55553 100644 (file)
@@ -1,47 +1,47 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library 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
-Lesser General Public License for more details.
+   This library 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
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 class CBspPoint {
 public:
-       float p[3];
+float p[3];
 };
 
 class CBspPortal {
 public:
-       CBspPortal();
-       ~CBspPortal();
+CBspPortal();
+~CBspPortal();
 
-       unsigned point_count;
-       CBspPoint *point;
-       bool Build(char *def, unsigned int pointCnt, bool bInverse);
+unsigned point_count;
+CBspPoint *point;
+bool Build( char *def, unsigned int pointCnt, bool bInverse );
 };
 
 
 class CBspNode {
 public:
-       CBspPortal *portal;
-       unsigned int portal_count;
+CBspPortal *portal;
+unsigned int portal_count;
 
-       bool AddPortal(char* def, unsigned int pointCnt, bool bInverse);
-       unsigned int portal_next;
-       CBspNode();
-       ~CBspNode();
+bool AddPortal( char* def, unsigned int pointCnt, bool bInverse );
+unsigned int portal_next;
+CBspNode();
+~CBspNode();
 };
 
 
@@ -50,14 +50,14 @@ public:
 class CPortals {
 public:
 
-       CPortals();
-       ~CPortals();
+CPortals();
+~CPortals();
 
-       void Load(); // use filename in fn
-       void Purge();
+void Load();     // use filename in fn
+void Purge();
 
-       char fn[NAME_MAX];
-       CBspNode *node;
+char fn[NAME_MAX];
+CBspNode *node;
 
-       unsigned int node_count;
+unsigned int node_count;
 };
index aef7608..55dd8e4 100644 (file)
@@ -1,21 +1,21 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library 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
-Lesser General Public License for more details.
+   This library 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
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 // BobView.cpp: implementation of the DBobView class.
 //
@@ -41,25 +41,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-DBobView::DBobView()
-{
+DBobView::DBobView(){
        nPathCount = 0;
-       
+
        path = NULL;
 
        boundingShow = BOUNDS_APEX;
 
-  constructShaders();
-  GlobalShaderCache().attachRenderable(*this);
+       constructShaders();
+       GlobalShaderCache().attachRenderable( *this );
 }
 
-DBobView::~DBobView()
-{
-  GlobalShaderCache().detachRenderable(*this);
-  destroyShaders();
+DBobView::~DBobView(){
+       GlobalShaderCache().detachRenderable( *this );
+       destroyShaders();
 
-  if(path)
+       if ( path ) {
                delete[] path;
+       }
 
        g_PathView = NULL;
 }
@@ -68,12 +67,11 @@ DBobView::~DBobView()
 // Implementation
 //////////////////////////////////////////////////////////////////////
 
-void DBobView::render(RenderStateFlags state) const
-{
-       glBegin(GL_LINE_STRIP);
+void DBobView::render( RenderStateFlags state ) const {
+       glBegin( GL_LINE_STRIP );
 
-       for(int i = 0; i < nPathCount; i++)
-               glVertex3fv(path[i]);
+       for ( int i = 0; i < nPathCount; i++ )
+               glVertex3fv( path[i] );
 
        glEnd();
 }
@@ -81,107 +79,101 @@ void DBobView::render(RenderStateFlags state) const
 const char* DBobView_state_line = "$bobtoolz/bobview/line";
 const char* DBobView_state_box = "$bobtoolz/bobview/box";
 
-void DBobView::constructShaders()
-{
-  OpenGLState state;
-  GlobalOpenGLStateLibrary().getDefaultState(state);
-  state.m_state = RENDER_COLOURWRITE|RENDER_DEPTHWRITE|RENDER_BLEND|RENDER_LINESMOOTH;
-  state.m_sort = OpenGLState::eSortOpaque;
-  state.m_linewidth = 1;
-  state.m_colour[0] = 1;
-  state.m_colour[1] = 0;
-  state.m_colour[2] = 0;
-  state.m_colour[3] = 1;
-  GlobalOpenGLStateLibrary().insert(DBobView_state_line, state);
-
-  state.m_colour[0] = 0.25f;
-  state.m_colour[1] = 0.75f;
-  state.m_colour[2] = 0.75f;
-  state.m_colour[3] = 1;
-  GlobalOpenGLStateLibrary().insert(DBobView_state_box, state);
-
-  m_shader_line = GlobalShaderCache().capture(DBobView_state_line);
-  m_shader_box = GlobalShaderCache().capture(DBobView_state_box);
+void DBobView::constructShaders(){
+       OpenGLState state;
+       GlobalOpenGLStateLibrary().getDefaultState( state );
+       state.m_state = RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_BLEND | RENDER_LINESMOOTH;
+       state.m_sort = OpenGLState::eSortOpaque;
+       state.m_linewidth = 1;
+       state.m_colour[0] = 1;
+       state.m_colour[1] = 0;
+       state.m_colour[2] = 0;
+       state.m_colour[3] = 1;
+       GlobalOpenGLStateLibrary().insert( DBobView_state_line, state );
+
+       state.m_colour[0] = 0.25f;
+       state.m_colour[1] = 0.75f;
+       state.m_colour[2] = 0.75f;
+       state.m_colour[3] = 1;
+       GlobalOpenGLStateLibrary().insert( DBobView_state_box, state );
+
+       m_shader_line = GlobalShaderCache().capture( DBobView_state_line );
+       m_shader_box = GlobalShaderCache().capture( DBobView_state_box );
 }
 
-void DBobView::destroyShaders()
-{
-  GlobalOpenGLStateLibrary().erase(DBobView_state_line);
-  GlobalOpenGLStateLibrary().erase(DBobView_state_box);
-  GlobalShaderCache().release(DBobView_state_line);
-  GlobalShaderCache().release(DBobView_state_box);
+void DBobView::destroyShaders(){
+       GlobalOpenGLStateLibrary().erase( DBobView_state_line );
+       GlobalOpenGLStateLibrary().erase( DBobView_state_box );
+       GlobalShaderCache().release( DBobView_state_line );
+       GlobalShaderCache().release( DBobView_state_box );
 }
 
-Matrix4 g_transform_box1 = matrix4_translation_for_vec3(Vector3(16.0f, 16.0f, 28.0f));
-Matrix4 g_transform_box2 = matrix4_translation_for_vec3(Vector3(-16.0f, 16.0f, 28.0f));
-Matrix4 g_transform_box3 = matrix4_translation_for_vec3(Vector3(16.0f, -16.0f, -28.0f));
-Matrix4 g_transform_box4 = matrix4_translation_for_vec3(Vector3(-16.0f, -16.0f, -28.0f));
+Matrix4 g_transform_box1 = matrix4_translation_for_vec3( Vector3( 16.0f, 16.0f, 28.0f ) );
+Matrix4 g_transform_box2 = matrix4_translation_for_vec3( Vector3( -16.0f, 16.0f, 28.0f ) );
+Matrix4 g_transform_box3 = matrix4_translation_for_vec3( Vector3( 16.0f, -16.0f, -28.0f ) );
+Matrix4 g_transform_box4 = matrix4_translation_for_vec3( Vector3( -16.0f, -16.0f, -28.0f ) );
 
-void DBobView::renderSolid(Renderer& renderer, const VolumeTest& volume) const
-{
-       if(!path)
+void DBobView::renderSolid( Renderer& renderer, const VolumeTest& volume ) const {
+       if ( !path ) {
                return;
+       }
 
-  renderer.SetState(m_shader_line, Renderer::eWireframeOnly);
-  renderer.SetState(m_shader_line, Renderer::eFullMaterials);
-  renderer.addRenderable(*this, g_matrix4_identity);
-
-       if(m_bShowExtra)
-       {
-    renderer.SetState(m_shader_box, Renderer::eWireframeOnly);
-    renderer.SetState(m_shader_box, Renderer::eFullMaterials);
-    renderer.addRenderable(*this, g_transform_box1);
-    renderer.addRenderable(*this, g_transform_box2);
-    renderer.addRenderable(*this, g_transform_box3);
-    renderer.addRenderable(*this, g_transform_box4);
-  }
+       renderer.SetState( m_shader_line, Renderer::eWireframeOnly );
+       renderer.SetState( m_shader_line, Renderer::eFullMaterials );
+       renderer.addRenderable( *this, g_matrix4_identity );
+
+       if ( m_bShowExtra ) {
+               renderer.SetState( m_shader_box, Renderer::eWireframeOnly );
+               renderer.SetState( m_shader_box, Renderer::eFullMaterials );
+               renderer.addRenderable( *this, g_transform_box1 );
+               renderer.addRenderable( *this, g_transform_box2 );
+               renderer.addRenderable( *this, g_transform_box3 );
+               renderer.addRenderable( *this, g_transform_box4 );
+       }
 }
-void DBobView::renderWireframe(Renderer& renderer, const VolumeTest& volume) const
-{
-  renderSolid(renderer, volume);
+void DBobView::renderWireframe( Renderer& renderer, const VolumeTest& volume ) const {
+       renderSolid( renderer, volume );
 }
 
-void DBobView::SetPath(vec3_t *pPath)
-{
-       if(path)
+void DBobView::SetPath( vec3_t *pPath ){
+       if ( path ) {
                delete[] path;
+       }
 
        path = pPath;
 }
 
 #define LOCAL_GRAVITY -800.0f
 
-bool DBobView::CalculateTrajectory(vec3_t start, vec3_t apex, float multiplier, int points, float varGravity)
-{
-       if(apex[2] <= start[2])
-       {
-               SetPath(NULL);
+bool DBobView::CalculateTrajectory( vec3_t start, vec3_t apex, float multiplier, int points, float varGravity ){
+       if ( apex[2] <= start[2] ) {
+               SetPath( NULL );
                return false;
        }
        // ----think q3a actually would allow these
        //scrub that, coz the plugin wont :]
 
        vec3_t dist, speed;
-       VectorSubtract(apex, start, dist);
+       VectorSubtract( apex, start, dist );
 
-       vec_t speed_z = (float)sqrt(-2*LOCAL_GRAVITY*dist[2]);
-       float flight_time = -speed_z/LOCAL_GRAVITY;
+       vec_t speed_z = (float)sqrt( -2 * LOCAL_GRAVITY * dist[2] );
+       float flight_time = -speed_z / LOCAL_GRAVITY;
 
 
-       VectorScale(dist, 1/flight_time, speed);
+       VectorScale( dist, 1 / flight_time, speed );
        speed[2] = speed_z;
 
 //     Sys_Printf("Speed: (%.4f %.4f %.4f)\n", speed[0], speed[1], speed[2]);
 
        vec3_t* pPath = new vec3_t[points];
 
-       float interval = multiplier*flight_time/points;
-       for(int i = 0; i < points; i++)
+       float interval = multiplier * flight_time / points;
+       for ( int i = 0; i < points; i++ )
        {
-               float ltime = interval*i;
+               float ltime = interval * i;
 
-               VectorScale(speed, ltime, pPath[i]);
-               VectorAdd(pPath[i], start, pPath[i]);
+               VectorScale( speed, ltime, pPath[i] );
+               VectorAdd( pPath[i], start, pPath[i] );
 
                // could do this all with vectors
                // vGrav = {0, 0, -800.0f}
@@ -190,92 +182,86 @@ bool DBobView::CalculateTrajectory(vec3_t start, vec3_t apex, float multiplier,
                // _VectorAdd(pPath[i], start, pPath[i])
                // _VectorAdd(pPath[i], vAdd, pPath[i])
 
-               pPath[i][2] = start[2] + (speed_z*ltime) + (varGravity*0.5f*ltime*ltime);
+               pPath[i][2] = start[2] + ( speed_z * ltime ) + ( varGravity * 0.5f * ltime * ltime );
        }
 
-       SetPath(pPath);
+       SetPath( pPath );
        return true;
 }
 
-void DBobView::Begin(const char* trigger, const char *target, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra)
-{
-       strcpy(entTrigger, trigger);
-       strcpy(entTarget, target);
+void DBobView::Begin( const char* trigger, const char *target, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra ){
+       strcpy( entTrigger, trigger );
+       strcpy( entTarget, target );
 
        fMultiplier = multiplier;
        fVarGravity = varGravity;
        nPathCount = points;
        m_bShowExtra = bShowExtra;
 
-       if(!UpdatePath())
-       {
+       if ( !UpdatePath() ) {
                globalErrorStream() << "Initialization Failure in DBobView::Begin";
                delete this;
        }
        globalOutputStream() << "Initialization of Path Plotter succeeded.";
 }
 
-bool DBobView::UpdatePath()
-{
+bool DBobView::UpdatePath(){
        vec3_t start, apex;
 
-       if(GetEntityCentre(entTrigger, start))
-       {
-               if(GetEntityCentre(entTarget, apex))
-               {
-                       CalculateTrajectory(start, apex, fMultiplier, nPathCount, fVarGravity);
+       if ( GetEntityCentre( entTrigger, start ) ) {
+               if ( GetEntityCentre( entTarget, apex ) ) {
+                       CalculateTrajectory( start, apex, fMultiplier, nPathCount, fVarGravity );
                        return true;
                }
        }
        return false;
 }
 
-void DBobView_setEntity(Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra)
-{
+void DBobView_setEntity( Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra ){
        DEntity trigger;
-       trigger.LoadEPairList(&entity);
+       trigger.LoadEPairList( &entity );
 
-       DEPair* trigger_ep = trigger.FindEPairByKey("targetname");
+       DEPair* trigger_ep = trigger.FindEPairByKey( "targetname" );
 
-       if(trigger_ep)
-       {
-               if(!strcmp(trigger.m_Classname, "trigger_push"))
-               {
-                       DEPair* target_ep = trigger.FindEPairByKey("target");
-                       if(target_ep)
-                       {
-                               const scene::Path* entTarget = FindEntityFromTargetname(target_ep->value);
-                               if(entTarget)
-                               {
-                                       if(g_PathView)
+       if ( trigger_ep ) {
+               if ( !strcmp( trigger.m_Classname, "trigger_push" ) ) {
+                       DEPair* target_ep = trigger.FindEPairByKey( "target" );
+                       if ( target_ep ) {
+                               const scene::Path* entTarget = FindEntityFromTargetname( target_ep->value );
+                               if ( entTarget ) {
+                                       if ( g_PathView ) {
                                                delete g_PathView;
+                                       }
                                        g_PathView = new DBobView;
 
-                                       Entity* target = Node_getEntity(entTarget->top());
-                                       if(target != 0)
-                                       {
-                                               if(!bNoUpdate)
-                                               {
+                                       Entity* target = Node_getEntity( entTarget->top() );
+                                       if ( target != 0 ) {
+                                               if ( !bNoUpdate ) {
                                                        g_PathView->trigger = &entity;
-                                                       entity.attach(*g_PathView);
+                                                       entity.attach( *g_PathView );
                                                        g_PathView->target = target;
-                                                       target->attach(*g_PathView);
+                                                       target->attach( *g_PathView );
                                                }
-                                         g_PathView->Begin(trigger_ep->value, target_ep->value, multiplier, points, varGravity, bNoUpdate, bShowExtra);
+                                               g_PathView->Begin( trigger_ep->value, target_ep->value, multiplier, points, varGravity, bNoUpdate, bShowExtra );
                                        }
-                                       else
+                                       else{
                                                globalErrorStream() << "bobToolz PathPlotter: trigger_push ARGH\n";
+                                       }
                                }
-                               else
+                               else{
                                        globalErrorStream() << "bobToolz PathPlotter: trigger_push target could not be found..\n";
+                               }
                        }
-                       else
+                       else{
                                globalErrorStream() << "bobToolz PathPlotter: trigger_push has no target..\n";
+                       }
                }
-               else
+               else{
                        globalErrorStream() << "bobToolz PathPlotter: You must select a 'trigger_push' entity..\n";
-       }       
-       else
+               }
+       }
+       else{
                globalErrorStream() << "bobToolz PathPlotter: Entity must have a targetname.\n";
+       }
        return;
 }
\ No newline at end of file
index 6869e6b..05c8ad2 100644 (file)
@@ -1,27 +1,27 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library 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
-Lesser General Public License for more details.
+   This library 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
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 // DBobView.h: interface for the DBobView class.
 //
 //////////////////////////////////////////////////////////////////////
 
-#if !defined(AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_)
+#if !defined( AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ )
 #define AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_
 
 #include "ientity.h"
@@ -32,8 +32,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 class DListener;
 class Shader;
 
-#define BOUNDS_ALL     0
-#define BOUNDS_APEX    1
+#define BOUNDS_ALL  0
+#define BOUNDS_APEX 1
 
 #if _MSC_VER > 1000
 #pragma once
@@ -41,66 +41,61 @@ class Shader;
 
 class DBobView : public Renderable, public OpenGLRenderable, public Entity::Observer
 {
-  Shader* m_shader_line;
-  Shader* m_shader_box;
+Shader* m_shader_line;
+Shader* m_shader_box;
 public:
-       DBobView();
-       virtual ~DBobView();
+DBobView();
+virtual ~DBobView();
 
 protected:
-       vec3_t* path;
+vec3_t* path;
 public:
-       bool m_bShowExtra;
-       int boundingShow;
-       DListener* eyes;
-       float fVarGravity;
-       float fMultiplier;
-       int nPathCount;
-
-  Entity* trigger;
-  Entity* target;
-
-       bool UpdatePath();
-       char entTarget[256];
-       char entTrigger[256];
-       void Begin(const char*, const char*, float, int, float, bool, bool);
-       bool CalculateTrajectory(vec3_t, vec3_t, float, int, float);
-
-       void SetPath(vec3_t* pPath);
-
-  void render(RenderStateFlags state) const;
-  void renderSolid(Renderer& renderer, const VolumeTest& volume) const;
-  void renderWireframe(Renderer& renderer, const VolumeTest& volume) const;
-
-  void constructShaders();
-       void destroyShaders();
-
-  void valueChanged(const char* value)
-  {
-    UpdatePath();
-  }
-  typedef MemberCaller1<DBobView, const char*, &DBobView::valueChanged> ValueChangedCaller;
-  void insert(const char* key, EntityKeyValue& value)
-  {
-    value.attach(ValueChangedCaller(*this));
-  }
-  void erase(const char* key, EntityKeyValue& value)
-  {
-    value.detach(ValueChangedCaller(*this));
-  }
-  void clear()
-  {
-    if(trigger != 0)
-    {
-      trigger->detach(*this);
-      target->detach(*this);
-      trigger = 0;
-      target = 0;
-    }
-  }
+bool m_bShowExtra;
+int boundingShow;
+DListener* eyes;
+float fVarGravity;
+float fMultiplier;
+int nPathCount;
+
+Entity* trigger;
+Entity* target;
+
+bool UpdatePath();
+char entTarget[256];
+char entTrigger[256];
+void Begin( const char*, const char*, float, int, float, bool, bool );
+bool CalculateTrajectory( vec3_t, vec3_t, float, int, float );
+
+void SetPath( vec3_t* pPath );
+
+void render( RenderStateFlags state ) const;
+void renderSolid( Renderer& renderer, const VolumeTest& volume ) const;
+void renderWireframe( Renderer& renderer, const VolumeTest& volume ) const;
+
+void constructShaders();
+void destroyShaders();
+
+void valueChanged( const char* value ){
+       UpdatePath();
+}
+typedef MemberCaller1<DBobView, const char*, &DBobView::valueChanged> ValueChangedCaller;
+void insert( const char* key, EntityKeyValue& value ){
+       value.attach( ValueChangedCaller( *this ) );
+}
+void erase( const char* key, EntityKeyValue& value ){
+       value.detach( ValueChangedCaller( *this ) );
+}
+void clear(){
+       if ( trigger != 0 ) {
+               trigger->detach( *this );
+               target->detach( *this );
+               trigger = 0;
+               target = 0;
+       }
+}
 };
 
 class Entity;
-void DBobView_setEntity(Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra);
+void DBobView_setEntity( Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra );
 
 #endif // !defined(AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_)
index 96c884d..7c24cd0 100644 (file)
@@ -1,21 +1,21 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library 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
-Lesser General Public License for more details.
+   This library 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
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 // DBrush.cpp: implementation of the DBrush class.
 //
@@ -51,16 +51,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-DBrush::DBrush(int ID)
-{
+DBrush::DBrush( int ID ){
        m_nBrushID = ID;
        bBoundsBuilt = false;
        QER_entity = NULL;
        QER_brush = NULL;
 }
 
-DBrush::~DBrush()
-{
+DBrush::~DBrush(){
        ClearFaces();
        ClearPoints();
 }
@@ -69,55 +67,52 @@ DBrush::~DBrush()
 // Implementation
 //////////////////////////////////////////////////////////////////////
 
-DPlane* DBrush::AddFace(const vec3_t va, const vec3_t vb, const vec3_t vc, const _QERFaceData* texData)
-{
+DPlane* DBrush::AddFace( const vec3_t va, const vec3_t vb, const vec3_t vc, const _QERFaceData* texData ){
 #ifdef _DEBUG
 //     Sys_Printf("(%f %f %f) (%f %f %f) (%f %f %f)\n", va[0], va[1], va[2], vb[0], vb[1], vb[2], vc[0], vc[1], vc[2]);
 #endif
        bBoundsBuilt = false;
-       DPlane* newFace = new DPlane(va, vb, vc, texData);
-       faceList.push_back(newFace);
-       
+       DPlane* newFace = new DPlane( va, vb, vc, texData );
+       faceList.push_back( newFace );
+
        return newFace;
 }
 
-int DBrush::BuildPoints()
-{
+int DBrush::BuildPoints(){
        ClearPoints();
-       
-       if(faceList.size() <= 3)        // if less than 3 faces, there can be no points
-               return 0;                                       // with only 3 faces u can't have a bounded soild
 
-       for(std::list<DPlane *>::const_iterator p1=faceList.begin(); p1!=faceList.end(); p1++)
+       if ( faceList.size() <= 3 ) {  // if less than 3 faces, there can be no points
+               return 0;                   // with only 3 faces u can't have a bounded soild
+
+       }
+       for ( std::list<DPlane *>::const_iterator p1 = faceList.begin(); p1 != faceList.end(); p1++ )
        {
-               std::list<DPlane *>::const_iterator p2=p1;
-               for(p2++; p2!=faceList.end(); p2++)
+               std::list<DPlane *>::const_iterator p2 = p1;
+               for ( p2++; p2 != faceList.end(); p2++ )
                {
-                       std::list<DPlane *>::const_iterator p3=p2;
-                       for(p3++; p3!=faceList.end(); p3++)
+                       std::list<DPlane *>::const_iterator p3 = p2;
+                       for ( p3++; p3 != faceList.end(); p3++ )
                        {
                                vec3_t pnt;
-                               if((*p1)->PlaneIntersection(*p2, *p3, pnt))
-                               {
-                                       int pos = PointPosition(pnt);
+                       &n