+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.toolchain.llvm.clang.macosx.base.835953277">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.llvm.clang.macosx.base.835953277" moduleId="org.eclipse.cdt.core.settings" name="Default">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.llvm.clang.macosx.base.835953277" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="cdt.managedbuild.toolchain.llvm.clang.macosx.base.835953277.2072262777" name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.llvm.clang.macosx.base.1440061656" name="LLVM with Clang (MacOSX)" superClass="cdt.managedbuild.toolchain.llvm.clang.macosx.base">
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.llvm.macosx.platform.base.220063451" isAbstract="true" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.llvm.macosx.platform.base"/>
- <builder buildPath="${workspace_loc:/NetRadiant}/Default" id="cdt.managedbuild.target.llvm.builder.base.1826435543" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="CDT Internal Builder" superClass="cdt.managedbuild.target.llvm.builder.base"/>
- <tool id="cdt.managedbuild.tool.llvm.assembler.base.1540137577" name="LLVM assembler" superClass="cdt.managedbuild.tool.llvm.assembler.base"/>
- <tool id="cdt.managedbuild.tool.llvm.archiver.base.726448752" name="LLVM archiver" superClass="cdt.managedbuild.tool.llvm.archiver.base"/>
- <tool id="cdt.managedbuild.tool.llvm.c.compiler.base.423406515" name="LLVM Clang" superClass="cdt.managedbuild.tool.llvm.c.compiler.base">
- <option id="llvm.c_cpp.compiler.option.include.paths.1177478676" name="Include paths (-I)" superClass="llvm.c_cpp.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="/opt/local/include"/>
- <listOptionValue builtIn="false" value="/opt/local/include/glib-2.0"/>
- <listOptionValue builtIn="false" value="/opt/local/include/gtk-2.0"/>
- </option>
- <inputType id="cdt.managedbuild.tool.llvm.c.compiler.input.1702833029" superClass="cdt.managedbuild.tool.llvm.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.llvm.cpp.compiler.base.1130692273" name="LLVM Clang++" superClass="cdt.managedbuild.tool.llvm.cpp.compiler.base">
- <option id="llvm.c_cpp.compiler.option.include.paths.1703680230" name="Include paths (-I)" superClass="llvm.c_cpp.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="/opt/local/include"/>
- <listOptionValue builtIn="false" value="/opt/local/include/gtk-2.0"/>
- <listOptionValue builtIn="false" value="/opt/local/include/glib-2.0"/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/NetRadiant/plugins}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/NetRadiant/include}""/>
- <listOptionValue builtIn="false" value=""${workspace_loc:/NetRadiant/radiant}""/>
- </option>
- <inputType id="cdt.managedbuild.tool.llvm.cpp.compiler.input.1553525897" superClass="cdt.managedbuild.tool.llvm.cpp.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.llvm.c.linker.base.391098519" name="LLVM Clang C linker" superClass="cdt.managedbuild.tool.llvm.c.linker.base"/>
- <tool id="cdt.managedbuild.tool.llvm.cpp.linker.base.2079349783" name="LLVM Clang C++ linker" superClass="cdt.managedbuild.tool.llvm.cpp.linker.base">
- <inputType id="cdt.managedbuild.tool.llvm.c.linker.input.1496404439" superClass="cdt.managedbuild.tool.llvm.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="NetRadiant.null.969150560" name="NetRadiant"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Default">
- <resource resourceType="PROJECT" workspacePath="/NetRadiant"/>
- </configuration>
- </storageModule>
-</cproject>
*.[oda]
+build/
.settings
games
install
-games
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>NetRadiant</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
-</projectDescription>
project(NetRadiant C CXX)
+# Enable Debug by default, can be changed with -DCMAKE_BUILD_TYPE=Release
+if (NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Debug)
+endif ()
+
+#-----------------------------------------------------------------------
+# Version
+#-----------------------------------------------------------------------
+
#CMake 3.0+ would allow this in project()
set(NetRadiant_VERSION_MAJOR 1)
set(NetRadiant_VERSION_MINOR 5)
set(Q3MAP_VERSION 2.5.17n)
set(Q3MAP_STREAM_VERSION 1)
-set(RADIANT_VERSION_STRING "${NetRadiant_VERSION}n${GIT_VERSION}")
-execute_process(COMMAND git rev-parse --short HEAD
- OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if(GIT_VERSION)
+find_package(Git REQUIRED)
+execute_process(
+ COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+set(RADIANT_VERSION_STRING "${NetRadiant_VERSION}n")
+if (GIT_VERSION)
set(RADIANT_VERSION_STRING "${RADIANT_VERSION_STRING}-git-${GIT_VERSION}")
set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}")
- add_custom_target(version_git ALL
- COMMAND [ "`git rev-parse --short HEAD`" != "${GIT_VERSION}" ] && ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
- VERBATIM
- )
-endif()
+endif ()
-if(CMAKE_EXECUTABLE_SUFFIX)
- set(RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
-else()
- execute_process(COMMAND uname -m
- OUTPUT_VARIABLE RADIANT_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
+configure_file("${CMAKE_SOURCE_DIR}/include/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
set(RADIANT_ABOUTMSG "Custom build" CACHE STRING "About message")
message(STATUS "Building ${PROJECT_NAME} ${RADIANT_VERSION_STRING} ${RADIANT_ABOUTMSG}")
+#-----------------------------------------------------------------------
+# Language standard
+#-----------------------------------------------------------------------
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX)
- if(STD_CXX)
+ if (STD_CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}")
- else()
+ else ()
message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better")
- endif()
-else()
+ endif ()
+else ()
message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}, make sure it supports C++${CMAKE_CXX_STANDARD}")
-endif()
-
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
+endif ()
-# Enable Debug by default, can be changed with -D CMAKE_BUILD_TYPE=Release
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug)
-endif()
-if(CMAKE_BUILD_TYPE MATCHES Debug)
- add_definitions(-D_DEBUG=1)
-endif()
+#-----------------------------------------------------------------------
+# Defs
+#-----------------------------------------------------------------------
-find_package(OpenGL REQUIRED)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
-add_definitions(-DRADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}")
+if (CMAKE_BUILD_TYPE MATCHES Debug)
+ add_definitions(-D_DEBUG=1)
+endif ()
add_definitions(
-DGTK_DISABLE_SINGLE_INCLUDES
-DGTK_DISABLE_DEPRECATED
)
-if(NOT WIN32)
+if (NOT WIN32)
add_definitions(
- -DPOSIX=1
- -DXWINDOWS=1
+ -DPOSIX=1
+ -DXWINDOWS=1
)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
-else()
+else ()
add_definitions(
- -D_WIN32
+ -D_WIN32
)
-endif()
+endif ()
-configure_file("${CMAKE_SOURCE_DIR}/include/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
-set(INCLUDELIST
- include/aboutmsg.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/version.h
- include/warnings.h
- include/windowobserver.cpp
- include/windowobserver.h
-)
+#-----------------------------------------------------------------------
+# Libraries
+#-----------------------------------------------------------------------
add_subdirectory(libs)
+set(INCLUDELIST
+ include/aboutmsg.h
+ include/cullable.h
+ include/editable.h
+ include/iarchive.h
+ include/ibrush.h
+ include/icamera.h
+ include/idatastream.h
+ include/ieclass.h
+ include/ientity.h
+ include/ifilesystem.h
+ include/ifiletypes.h
+ include/ifilter.h
+ include/igl.h
+ include/iglrender.h
+ include/igtkgl.h
+ include/iimage.h
+ include/imap.h
+ include/imodel.h
+ include/ipatch.h
+ include/iplugin.h
+ include/ireference.h
+ include/irender.h
+ include/iscenegraph.h
+ include/iscriplib.h
+ include/iselection.h
+ include/ishaders.h
+ include/itexdef.h
+ include/itextstream.h
+ include/itextures.h
+ include/itoolbar.h
+ include/iundo.h
+ include/mapfile.h
+ include/modelskin.h
+ include/moduleobserver.h
+ include/modulesystem.h
+ include/nameable.h
+ include/namespace.h
+ include/preferencesystem.cpp
+ include/preferencesystem.h
+ include/qerplugin.h
+ include/renderable.h
+ include/selectable.h
+ include/stream_version.h
+ include/version.h
+ include/warnings.h
+ include/windowobserver.h
+ )
+add_library(includes ${INCLUDELIST})
+
+#-----------------------------------------------------------------------
+# Plugins
+#-----------------------------------------------------------------------
+
add_subdirectory(contrib)
+
+#-----------------------------------------------------------------------
+# Modules
+#-----------------------------------------------------------------------
+
add_subdirectory(plugins)
+#-----------------------------------------------------------------------
+# Radiant
+#-----------------------------------------------------------------------
+
add_subdirectory(radiant build)
+if (CMAKE_EXECUTABLE_SUFFIX)
+ set(RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
+else ()
+ execute_process(
+ COMMAND uname -m
+ OUTPUT_VARIABLE RADIANT_EXECUTABLE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+endif ()
+set_target_properties(radiant PROPERTIES
+ COMPILE_DEFINITIONS RADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}"
+ )
+
+#-----------------------------------------------------------------------
+# Tools
+#-----------------------------------------------------------------------
+
add_subdirectory(tools)
-if(NOT (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR))
+if (NOT (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR))
# Copy data files from sources to the build directory
message(STATUS "Copying data files")
file(GLOB DATA_FILES "${CMAKE_SOURCE_DIR}/setup/data/tools/*")
file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}")
file(GLOB DATA_FILES "${CMAKE_SOURCE_DIR}/docs/*")
file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}/docs")
-endif()
+endif ()
+
+#-----------------------------------------------------------------------
+# Game packs
+#-----------------------------------------------------------------------
option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
add_custom_target(game_packs
- COMMAND ${CMAKE_COMMAND} -E make_directory games
- COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/install-gamepacks.sh" "${CMAKE_BINARY_DIR}"
- COMMENT "Downloading game packs"
-)
+ COMMAND ${CMAKE_COMMAND} -E make_directory games
+ COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/install-gamepacks.sh" "${CMAKE_BINARY_DIR}"
+ COMMENT "Downloading game packs"
+ )
add_custom_command(OUTPUT games
- COMMAND make game_packs
- DEPENDS download-gamepacks.sh install-gamepacks.sh install-gamepack.sh
-)
-if(DOWNLOAD_GAMEPACKS)
+ COMMAND make game_packs
+ DEPENDS download-gamepacks.sh install-gamepacks.sh install-gamepack.sh
+ )
+if (DOWNLOAD_GAMEPACKS)
add_custom_target(game_packs_all ALL DEPENDS games)
-endif()
+endif ()
+++ /dev/null
-# Included Doxygen Config file
-#---------------------------------------------------------------------------
-# Project name & version number
-#---------------------------------------------------------------------------
-PROJECT_NAME =
-PROJECT_NUMBER =
-
-#---------------------------------------------------------------------------
-# Where to put the output
-# Note: The images dir should be next to the created html dir within the
-# output dir.
-# eg;
-# [Current Dir]
-# L__[OUTPUT_DIRECTORY]
-# L__[html]
-# L__[images]
-#---------------------------------------------------------------------------
-OUTPUT_DIRECTORY = ../GtkRadiant-doxygen
-
-#---------------------------------------------------------------------------
-# Where to read the sources
-# you can add more than one source...
-# INPUT = radiant/ \
-# tools/quake3/q3map \
-# tools/quake3/q3data
-#
-# Recursive is set on, so setting it to ./ (current dir) would read source
-# files recursively from the current dir down. (which would take a while)
-#
-# eg: To document just include, if the current directory is ../GtkRadiant/
-# then...
-#---------------------------------------------------------------------------
-INPUT = radiant/
-
-#---------------------------------------------------------------------------
-# Misc settings
-# TAB_SIZE - sets the indenting for the inline source and the source
-# browser
-# INCLUDE_PATH - will include documentation for included files from other
-# packages. You can specify more than one path the same as
-# shown in the INPUT example Leave it blank if you don't want
-# this.
-# PERL_PATH - path to the perl executable
-#
-#---------------------------------------------------------------------------
-PERL_PATH = /usr/bin/perl
-
+++ /dev/null
-MAKEFILE_CONF ?= Makefile.conf
--include $(MAKEFILE_CONF)
-
-## CONFIGURATION SETTINGS
-# user customizable stuf
-# you may override this in Makefile.conf or the environment
-BUILD ?= debug
-# or: release, or: extradebug, or: profile
-OS ?= $(shell uname)
-# or: Linux, Win32, Darwin
-LDFLAGS ?=
-CFLAGS ?=
-CXXFLAGS ?=
-CPPFLAGS ?=
-LIBS ?=
-RADIANT_ABOUTMSG ?= Custom build
-
-# warning: this directory may NOT contain any files other than the ones written by this Makefile!
-# NEVER SET THIS TO A SYSTEM WIDE "bin" DIRECTORY!
-INSTALLDIR ?= install
-
-CC ?= gcc
-CXX ?= g++
-RANLIB ?= ranlib
-AR ?= ar
-LDD ?= ldd # nothing on Win32
-OTOOL ?= # only used on OS X
-WINDRES ?= windres # only used on Win32
-
-PKGCONFIG ?= pkg-config
-PKG_CONFIG_PATH ?=
-
-SH ?= $(SHELL)
-ECHO ?= echo
-ECHO_NOLF ?= echo -n
-CAT ?= cat
-MKDIR ?= mkdir -p
-CP ?= cp
-CP_R ?= $(CP) -r
-LN ?= ln
-LN_SNF ?= $(LN) -snf
-RM ?= rm
-RM_R ?= $(RM) -r
-TEE_STDERR ?= | tee /dev/stderr
-TR ?= tr
-FIND ?= find
-DIFF ?= diff
-SED ?= sed
-GIT ?= git
-SVN ?= svn
-WGET ?= wget
-MV ?= mv
-UNZIPPER ?= unzip
-
-FD_TO_DEVNULL ?= >/dev/null
-STDOUT_TO_DEVNULL ?= 1$(FD_TO_DEVNULL)
-STDERR_TO_DEVNULL ?= 2$(FD_TO_DEVNULL)
-STDERR_TO_STDOUT ?= 2>&1
-TO_DEVNULL ?= $(STDOUT_TO_DEVNULL) $(STDERR_TO_STDOUT)
-
-CPPFLAGS_GLIB ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --cflags $(STDERR_TO_DEVNULL))
-LIBS_GLIB ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_XML ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --cflags $(STDERR_TO_DEVNULL))
-LIBS_XML ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_PNG ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --cflags $(STDERR_TO_DEVNULL))
-LIBS_PNG ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_GTK ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --cflags $(STDERR_TO_DEVNULL))
-LIBS_GTK ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_PANGOFT2 ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) pangoft2 --cflags $(STDERR_TO_DEVNULL))
-LIBS_PANGOFT2 ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) pangoft2 --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) pangoft2 --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_GTKGLEXT ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --cflags $(STDERR_TO_DEVNULL))
-LIBS_GTKGLEXT ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
- $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-l $(STDERR_TO_DEVNULL))
-CPPFLAGS_GL ?=
-LIBS_GL ?= -lGL # -lopengl32 on Win32
-CPPFLAGS_DL ?=
-LIBS_DL ?= -ldl # nothing on Win32
-CPPFLAGS_ZLIB ?=
-LIBS_ZLIB ?= -lz
-CPPFLAGS_JPEG ?=
-LIBS_JPEG ?= -ljpeg
-DEPEND_ON_MAKEFILE ?= yes
-DOWNLOAD_GAMEPACKS ?= yes
-# set to no to disable gamepack, set to all to even download undistributable gamepacks
-
-# Support CHECK_DEPENDENCIES with DOWNLOAD_GAMEPACKS semantics
-ifneq ($(CHECK_DEPENDENCIES),)
-DEPENDENCIES_CHECK = $(patsubst yes,quiet,$(patsubst no,off,$(CHECK_DEPENDENCIES)))
-else
-DEPENDENCIES_CHECK ?= quiet
-# or: off, verbose
-endif
-
-# these are used on Win32 only
-GTKDIR ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --variable=prefix $(STDERR_TO_DEVNULL))
-WHICHDLL ?= which
-DLLINSTALL ?= install-dlls.sh
-
-# alias mingw32 OSes
-ifeq ($(OS),MINGW32_NT-6.0)
- OS = Win32
-endif
-ifeq ($(OS),Windows_NT)
- OS = Win32
-endif
-
-CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing
-CPPFLAGS_COMMON =
-LDFLAGS_COMMON =
-LIBS_COMMON =
-CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti -std=c++11
-
-ifeq ($(BUILD),debug)
-ifeq ($(findstring $(CFLAGS),-g),)
- CFLAGS_COMMON += -g
- # only add -g if no -g flag is in $(CFLAGS)
-endif
-ifeq ($(findstring $(CFLAGS),-O0),)
- CFLAGS_COMMON += -O0
- # only add -O if no -O flag is in $(CFLAGS)
-endif
- CPPFLAGS_COMMON +=
- LDFLAGS_COMMON +=
-else
-
-ifeq ($(BUILD),extradebug)
-ifeq ($(findstring $(CFLAGS),-g),)
- CFLAGS_COMMON += -g3
- # only add -g3 if no -g flag is in $(CFLAGS)
-endif
- CPPFLAGS_COMMON += -D_DEBUG
- LDFLAGS_COMMON +=
-else
-
-ifeq ($(BUILD),profile)
-ifeq ($(findstring $(CFLAGS),-g),)
- CFLAGS_COMMON += -g
- # only add -g if no -g flag is in $(CFLAGS)
-endif
-ifeq ($(findstring $(CFLAGS),-O0),)
- CFLAGS_COMMON += -O0
- # only add -O if no -O flag is in $(CFLAGS)
-endif
- CFLAGS_COMMON += -pg
- CPPFLAGS_COMMON +=
- LDFLAGS_COMMON += -pg
-else
-
-ifeq ($(BUILD),release)
-ifeq ($(findstring $(CFLAGS),-O),)
- CFLAGS_COMMON += -O3
- # only add -O3 if no -O flag is in $(CFLAGS)
-endif
- CPPFLAGS_COMMON +=
- LDFLAGS_COMMON += -s
-else
-
-ifeq ($(BUILD),native)
-ifeq ($(findstring $(CFLAGS),-O),)
- CFLAGS_COMMON += -O3
- # only add -O3 if no -O flag is in $(CFLAGS)
-endif
- CFLAGS_COMMON += -march=native -mcpu=native
- CPPFLAGS_COMMON +=
- LDFLAGS_COMMON += -s
-else
-
-$(error Unsupported build type: $(BUILD))
-endif
-endif
-endif
-endif
-endif
-
-INSTALLDIR_BASE := $(INSTALLDIR)
-
-MAKE_EXE_SYMLINK = false
-
-ifeq ($(OS),Linux)
- CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
- CFLAGS_COMMON += -fPIC
- LDFLAGS_DLL = -fPIC -ldl
- LIBS_COMMON = -lpthread
- EXE ?= $(shell uname -m)
- MAKE_EXE_SYMLINK = true
- A = a
- DLL = so
- MWINDOWS =
-else
-
-ifeq ($(OS),Win32)
- CPPFLAGS_COMMON += -DWIN32 -D_WIN32 -D_inline=inline
- CFLAGS_COMMON += -mms-bitfields
- LDFLAGS_DLL = -Wl,--add-stdcall-alias
- LIBS_COMMON = -lws2_32 -luser32 -lgdi32 -lole32
- EXE ?= exe
- A = a
- DLL = dll
- MWINDOWS = -mwindows
-
- # workaround: we have no "ldd" for Win32, so...
- LDD =
- # workaround: OpenGL library for Win32 is called opengl32.dll
- LIBS_GL = -lopengl32
- # workaround: no -ldl on Win32
- LIBS_DL =
-else
-
-ifeq ($(OS),Darwin)
- CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
- CFLAGS_COMMON += -fPIC
- CXXFLAGS_COMMON += -fno-exceptions -fno-rtti
- MACLIBDIR ?= /opt/local/lib
- CPPFLAGS_COMMON += -I$(MACLIBDIR)/../include -I/usr/X11R6/include
- LDFLAGS_COMMON += -L$(MACLIBDIR) -L/usr/X11R6/lib
- LDFLAGS_DLL += -dynamiclib -ldl
- EXE ?= $(shell uname -m)
- MAKE_EXE_SYMLINK = true
- A = a
- DLL = dylib
- MWINDOWS =
- # workaround for weird prints
- ECHO_NOLF = /bin/echo -n
-
- # workaround: http://developer.apple.com/qa/qa2007/qa1567.html
- LIBS_GL += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
- LIBS_GTKGLEXT += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
- # workaround: we have no "ldd" for OS X, so...
- LDD =
- OTOOL = otool
-else
-
-$(error Unsupported build OS: $(OS))
-endif
-endif
-endif
-
-# VERSION!
-RADIANT_VERSION_NUMBER = 1.5.0
-RADIANT_VERSION = $(RADIANT_VERSION_NUMBER)n
-RADIANT_MAJOR_VERSION = 5
-RADIANT_MINOR_VERSION = 0
-Q3MAP_VERSION = 2.5.17n
-
-# Executable extension
-RADIANT_EXECUTABLE := $(EXE)
-
-GIT_VERSION := $(shell $(GIT) rev-parse --short HEAD $(STDERR_TO_DEVNULL))
-ifneq ($(GIT_VERSION),)
- RADIANT_VERSION := $(RADIANT_VERSION)-git-$(GIT_VERSION)
- Q3MAP_VERSION := $(Q3MAP_VERSION)-git-$(GIT_VERSION)
-endif
-
-CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\"" -DRADIANT_EXECUTABLE="\"$(RADIANT_EXECUTABLE)\""
-
-.PHONY: all
-all: \
- dependencies-check \
- binaries \
- install-data \
- install-dll \
-
-.PHONY: dependencies-check
-ifeq ($(findstring $(DEPENDENCIES_CHECK),off),off)
-dependencies-check:
- @$(ECHO) dependencies checking disabled, good luck...
-else
-dependencies-check:
- @$(ECHO)
- @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; exec 3>&2; else exec 3$(FD_TO_DEVNULL); fi; \
- failed=0; \
- checkbinary() \
- { \
- $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
- $$2 --help >&3 $(STDERR_TO_STDOUT); \
- if [ $$? != 127 ]; then \
- $(ECHO) "found."; \
- else \
- $(ECHO) "not found, please install it or set PATH right!"; \
- $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
- $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
- failed=1; \
- fi; \
- }; \
- $(ECHO) checking that the build tools exist; \
- checkbinary "bash (or another shell)" "$(SH)"; \
- checkbinary coreutils "$(ECHO)"; \
- checkbinary coreutils "$(ECHO_NOLF)"; \
- checkbinary coreutils "$(CAT)"; \
- checkbinary coreutils "$(MKDIR)"; \
- checkbinary coreutils "$(CP)"; \
- checkbinary coreutils "$(CP_R)"; \
- checkbinary coreutils "$(RM)"; \
- checkbinary coreutils "$(RM_R)"; \
- checkbinary coreutils "$(MV)"; \
- checkbinary coreutils "$(ECHO) test $(TEE_STDERR)"; \
- checkbinary sed "$(SED)"; \
- checkbinary findutils "$(FIND)"; \
- checkbinary diff "$(DIFF)"; \
- checkbinary gcc "$(CC)"; \
- checkbinary g++ "$(CXX)"; \
- checkbinary binutils "$(RANLIB)"; \
- checkbinary binutils "$(AR)"; \
- checkbinary pkg-config "$(PKGCONFIG)"; \
- checkbinary unzip "$(UNZIPPER)"; \
- checkbinary git-core "$(GIT)"; \
- checkbinary subversion "$(SVN)"; \
- checkbinary wget "$(WGET)"; \
- [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
- [ -n "$(LDD)" ] && checkbinary libc6 "$(LDD)"; \
- [ -n "$(OTOOL)" ] && checkbinary xcode "$(OTOOL)"; \
- [ "$$failed" = "0" ] && $(ECHO) All required tools have been found!
- @$(ECHO)
- @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; exec 3>&2; else exec 3$(FD_TO_DEVNULL); fi; \
- failed=0; \
- checkheader() \
- { \
- $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
- if \
- $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o >&3 $(STDERR_TO_STDOUT); \
- then \
- if \
- $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest >&3 $(STDERR_TO_STDOUT); \
- then \
- $(RM) conftest conftest.o conftest.d; \
- $(ECHO) "found and links."; \
- else \
- $(RM) conftest.o conftest.d; \
- $(ECHO) "found but does not link, please install it or set PKG_CONFIG_PATH right!"; \
- $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
- $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
- failed=1; \
- fi; \
- else \
- $(RM) conftest conftest.o conftest.d; \
- $(ECHO) "not found, please install it or set PKG_CONFIG_PATH right!"; \
- $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
- $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
- failed=1; \
- fi; \
- }; \
- $(ECHO) checking that the dependencies exist; \
- checkheader libjpeg8-dev jpeglib.h jpeg_set_defaults "$(CPPFLAGS_JPEG)" "$(LIBS_JPEG)"; \
- checkheader libglib2.0-dev glib.h g_path_is_absolute "$(CPPFLAGS_GLIB)" "$(LIBS_GLIB)"; \
- checkheader libxml2-dev libxml/xpath.h xmlXPathInit "$(CPPFLAGS_XML)" "$(LIBS_XML)"; \
- checkheader libpng12-dev png.h png_create_read_struct "$(CPPFLAGS_PNG)" "$(LIBS_PNG)"; \
- checkheader "mesa-common-dev (or another OpenGL library)" GL/gl.h glClear "$(CPPFLAGS_GL)" "$(LIBS_GL)"; \
- checkheader libgtk2.0-dev gtk/gtkdialog.h gtk_dialog_run "$(CPPFLAGS_GTK)" "$(LIBS_GTK)"; \
- checkheader libpango1.0-dev pango/pangoft2.h pango_ft2_font_map_new "$(CPPFLAGS_PANGOFT2)" "$(LIBS_PANGOFT2)"; \
- checkheader libgtkglext1-dev gtk/gtkglwidget.h gtk_widget_get_gl_context "$(CPPFLAGS_GTKGLEXT)" "$(LIBS_GTKGLEXT)"; \
- [ "$(OS)" != "Win32" ] && checkheader libc6-dev dlfcn.h dlopen "$(CPPFLAGS_DL)" "$(LIBS_DL)"; \
- checkheader zlib1g-dev zlib.h zlibVersion "$(CPPFLAGS_ZLIB)" "$(LIBS_ZLIB)"; \
- [ "$$failed" = "0" ] && $(ECHO) All required libraries have been found!
- @$(ECHO)
-endif
-
-.PHONY: binaries
-binaries: \
- binaries-tools \
- binaries-radiant \
-
-.PHONY: binaries-radiant-all
-binaries-radiant: \
- binaries-radiant-modules \
- binaries-radiant-plugins \
- binaries-radiant-core \
-
-.PHONY: binaries-radiant-modules
-binaries-radiant-modules: \
- $(INSTALLDIR)/modules/archivepak.$(DLL) \
- $(INSTALLDIR)/modules/archivewad.$(DLL) \
- $(INSTALLDIR)/modules/archivezip.$(DLL) \
- $(INSTALLDIR)/modules/entity.$(DLL) \
- $(INSTALLDIR)/modules/image.$(DLL) \
- $(INSTALLDIR)/modules/imagehl.$(DLL) \
- $(INSTALLDIR)/modules/imagepng.$(DLL) \
- $(INSTALLDIR)/modules/imageq2.$(DLL) \
- $(INSTALLDIR)/modules/mapq3.$(DLL) \
- $(INSTALLDIR)/modules/mapxml.$(DLL) \
- $(INSTALLDIR)/modules/md3model.$(DLL) \
- $(INSTALLDIR)/modules/model.$(DLL) \
- $(INSTALLDIR)/modules/shaders.$(DLL) \
- $(INSTALLDIR)/modules/vfspk3.$(DLL) \
-
-.PHONY: binaries-radiant-plugins
-binaries-radiant-plugins: \
- $(INSTALLDIR)/plugins/bobtoolz.$(DLL) \
- $(INSTALLDIR)/plugins/brushexport.$(DLL) \
- $(INSTALLDIR)/plugins/prtview.$(DLL) \
- $(INSTALLDIR)/plugins/shaderplug.$(DLL) \
- $(INSTALLDIR)/plugins/sunplug.$(DLL) \
- $(INSTALLDIR)/plugins/ufoaiplug.$(DLL) \
-
-.PHONY: binaries-radiant
-binaries-radiant-core: \
- $(INSTALLDIR)/radiant.$(EXE) \
- $(INSTALLDIR)/radiant \
-
-.PHONY: binaries-tools
-binaries-tools: \
- binaries-tools-quake2 \
- binaries-tools-quake3 \
-
-.PHONY: binaries-tools-quake2
-binaries-tools-quake2: \
- binaries-q2map \
- binaries-qdata3 \
- binaries-h2data \
-
-.PHONY: binaries-q2map
-binaries-q2map: \
- $(INSTALLDIR)/q2map.$(EXE) \
- $(INSTALLDIR)/q2map \
-
-.PHONY: binaries-qdata3
-binaries-qdata3: \
- $(INSTALLDIR)/qdata3.$(EXE) \
- $(INSTALLDIR)/qdata3 \
-
-.PHONY: binaries-h2data
-binaries-h2data: \
- $(INSTALLDIR)/heretic2/h2data.$(EXE) \
- $(INSTALLDIR)/heretic2/h2data \
-
-.PHONY: binaries-tools-quake3
-binaries-tools-quake3: \
- binaries-q3data \
- binaries-q3map2 \
-
-.PHONY: binaries-q3data
-binaries-q3data: \
- $(INSTALLDIR)/q3data.$(EXE) \
- $(INSTALLDIR)/q3data \
-
-.PHONY: binaries-q3map2
-binaries-q3map2: \
- $(INSTALLDIR)/q3map2.$(EXE) \
- $(INSTALLDIR)/q3map2 \
-
-
-.PHONY: clean
-clean:
- $(RM_R) $(INSTALLDIR_BASE)/
- $(FIND) . \( -name \*.o -o -name \*.d -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
- $(RM) icons/*.rc
-
-%.$(EXE):
- file=$@; $(MKDIR) $${file%/*}
- $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@
- [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
-
-$(INSTALLDIR)/%: $(INSTALLDIR)/%.$(EXE)
- if $(MAKE_EXE_SYMLINK); then o=$<; $(LN_SNF) $${o##*/} $@; else true; fi
-
-%.$(A):
- $(AR) rc $@ $^
- $(RANLIB) $@
-
-%.$(DLL):
- file=$@; $(MKDIR) $${file%/*}
- $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LDFLAGS_DLL) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -shared -o $@
- [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
-
-%.rc: %.ico
- $(ECHO) '1 ICON "$<"' > $@
-
-ifeq ($(OS),Win32)
-%.o: %.rc
- $(WINDRES) $< $@
-endif
-
-%.o: %.cpp $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),) | dependencies-check
- $(CXX) $< $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(CPPFLAGS_COMMON) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@
-
-%.o: %.c $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),) | dependencies-check
- $(CC) $< $(CFLAGS) $(CFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(CPPFLAGS_COMMON) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@
-
-
-$(INSTALLDIR)/q3map2.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_PNG) $(LIBS_JPEG) $(LIBS_ZLIB)
-$(INSTALLDIR)/q3map2.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_PNG) $(CPPFLAGS_JPEG) -Itools/quake3/common -Ilibs -Iinclude
-$(INSTALLDIR)/q3map2.$(EXE): \
- tools/quake3/common/cmdlib.o \
- tools/quake3/common/imagelib.o \
- tools/quake3/common/inout.o \
- tools/quake3/common/jpeg.o \
- tools/quake3/common/md4.o \
- tools/quake3/common/mutex.o \
- tools/quake3/common/polylib.o \
- tools/quake3/common/scriplib.o \
- tools/quake3/common/threads.o \
- tools/quake3/common/unzip.o \
- tools/quake3/common/vfs.o \
- tools/quake3/q3map2/brush.o \
- tools/quake3/q3map2/brush_primit.o \
- tools/quake3/q3map2/bspfile_abstract.o \
- tools/quake3/q3map2/bspfile_ibsp.o \
- tools/quake3/q3map2/bspfile_rbsp.o \
- tools/quake3/q3map2/bsp.o \
- tools/quake3/q3map2/convert_ase.o \
- tools/quake3/q3map2/convert_obj.o \
- tools/quake3/q3map2/convert_map.o \
- tools/quake3/q3map2/decals.o \
- tools/quake3/q3map2/facebsp.o \
- tools/quake3/q3map2/fog.o \
- tools/quake3/q3map2/image.o \
- tools/quake3/q3map2/leakfile.o \
- tools/quake3/q3map2/light_bounce.o \
- tools/quake3/q3map2/lightmaps_ydnar.o \
- tools/quake3/q3map2/light.o \
- tools/quake3/q3map2/light_trace.o \
- tools/quake3/q3map2/light_ydnar.o \
- tools/quake3/q3map2/main.o \
- tools/quake3/q3map2/map.o \
- tools/quake3/q3map2/mesh.o \
- tools/quake3/q3map2/model.o \
- tools/quake3/q3map2/patch.o \
- tools/quake3/q3map2/path_init.o \
- tools/quake3/q3map2/portals.o \
- tools/quake3/q3map2/prtfile.o \
- tools/quake3/q3map2/shaders.o \
- tools/quake3/q3map2/surface_extra.o \
- tools/quake3/q3map2/surface_foliage.o \
- tools/quake3/q3map2/surface_fur.o \
- tools/quake3/q3map2/surface_meta.o \
- tools/quake3/q3map2/surface.o \
- tools/quake3/q3map2/tjunction.o \
- tools/quake3/q3map2/tree.o \
- tools/quake3/q3map2/visflow.o \
- tools/quake3/q3map2/vis.o \
- tools/quake3/q3map2/writebsp.o \
- libddslib.$(A) \
- libetclib.$(A) \
- libfilematch.$(A) \
- libl_net.$(A) \
- libmathlib.$(A) \
- libpicomodel.$(A) \
- $(if $(findstring $(OS),Win32),icons/q3map2.o,) \
-
-libmathlib.$(A): CPPFLAGS_EXTRA := -Ilibs
-libmathlib.$(A): \
- libs/mathlib/bbox.o \
- libs/mathlib/line.o \
- libs/mathlib/m4x4.o \
- libs/mathlib/mathlib.o \
- libs/mathlib/ray.o \
-
-libl_net.$(A): CPPFLAGS_EXTRA := -Ilibs
-libl_net.$(A): \
- libs/l_net/l_net.o \
- $(if $(findstring $(OS),Win32),libs/l_net/l_net_wins.o,libs/l_net/l_net_berkley.o) \
-
-libpicomodel.$(A): CPPFLAGS_EXTRA := -Ilibs
-libpicomodel.$(A): \
- libs/picomodel/lwo/clip.o \
- libs/picomodel/lwo/envelope.o \
- libs/picomodel/lwo/list.o \
- libs/picomodel/lwo/lwio.o \
- libs/picomodel/lwo/lwo2.o \
- libs/picomodel/lwo/lwob.o \
- libs/picomodel/lwo/pntspols.o \
- libs/picomodel/lwo/surface.o \
- libs/picomodel/lwo/vecmath.o \
- libs/picomodel/lwo/vmap.o \
- libs/picomodel/picointernal.o \
- libs/picomodel/picomodel.o \
- libs/picomodel/picomodules.o \
- libs/picomodel/pm_3ds.o \
- libs/picomodel/pm_ase.o \
- libs/picomodel/pm_fm.o \
- libs/picomodel/pm_lwo.o \
- libs/picomodel/pm_md2.o \
- libs/picomodel/pm_md3.o \
- libs/picomodel/pm_mdc.o \
- libs/picomodel/pm_ms3d.o \
- libs/picomodel/pm_obj.o \
- libs/picomodel/pm_terrain.o \
-
-libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
-libddslib.$(A): \
- libs/ddslib/ddslib.o \
-
-libetclib.$(A): CPPFLAGS_EXTRA := -Ilibs
-libetclib.$(A): \
- libs/etclib.o \
-
-$(INSTALLDIR)/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_ZLIB)
-$(INSTALLDIR)/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_ZLIB) -Itools/quake3/common -Ilibs -Iinclude
-$(INSTALLDIR)/q3data.$(EXE): \
- tools/quake3/common/aselib.o \
- tools/quake3/common/bspfile.o \
- tools/quake3/common/cmdlib.o \
- tools/quake3/common/imagelib.o \
- tools/quake3/common/inout.o \
- tools/quake3/common/md4.o \
- tools/quake3/common/scriplib.o \
- tools/quake3/common/trilib.o \
- tools/quake3/common/unzip.o \
- tools/quake3/common/vfs.o \
- tools/quake3/q3data/3dslib.o \
- tools/quake3/q3data/compress.o \
- tools/quake3/q3data/images.o \
- tools/quake3/q3data/md3lib.o \
- tools/quake3/q3data/models.o \
- tools/quake3/q3data/p3dlib.o \
- tools/quake3/q3data/polyset.o \
- tools/quake3/q3data/q3data.o \
- tools/quake3/q3data/stripper.o \
- tools/quake3/q3data/video.o \
- libfilematch.$(A) \
- libetclib.$(A) \
- libl_net.$(A) \
- libmathlib.$(A) \
- $(if $(findstring $(OS),Win32),icons/q3data.o,) \
-
-$(INSTALLDIR)/radiant.$(EXE): LDFLAGS_EXTRA := $(MWINDOWS)
-$(INSTALLDIR)/radiant.$(EXE): LIBS_EXTRA := $(LIBS_GL) $(LIBS_DL) $(LIBS_XML) $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_GTKGLEXT) $(LIBS_ZLIB) $(LIBS_PANGOFT2)
-$(INSTALLDIR)/radiant.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_GL) $(CPPFLAGS_DL) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) $(CPPFLAGS_PANGOFT2) -Ilibs -Iinclude
-$(INSTALLDIR)/radiant.$(EXE): \
- radiant/autosave.o \
- radiant/brushmanip.o \
- radiant/brushmodule.o \
- radiant/brushnode.o \
- radiant/brush.o \
- radiant/brush_primit.o \
- radiant/brushtokens.o \
- radiant/brushxml.o \
- radiant/build.o \
- radiant/camwindow.o \
- radiant/clippertool.o \
- radiant/commands.o \
- radiant/console.o \
- radiant/csg.o \
- radiant/dialog.o \
- radiant/eclass_def.o \
- radiant/eclass_doom3.o \
- radiant/eclass_fgd.o \
- radiant/eclass.o \
- radiant/eclass_xml.o \
- radiant/entityinspector.o \
- radiant/entitylist.o \
- radiant/entity.o \
- radiant/environment.o \
- radiant/error.o \
- radiant/feedback.o \
- radiant/filetypes.o \
- radiant/filters.o \
- radiant/findtexturedialog.o \
- radiant/glwidget.o \
- radiant/grid.o \
- radiant/groupdialog.o \
- radiant/gtkdlgs.o \
- radiant/gtkmisc.o \
- radiant/help.o \
- radiant/image.o \
- radiant/mainframe.o \
- radiant/main.o \
- radiant/map.o \
- radiant/multimon.o \
- radiant/mru.o \
- radiant/nullmodel.o \
- radiant/parse.o \
- radiant/patchdialog.o \
- radiant/patchmanip.o \
- radiant/patchmodule.o \
- radiant/patch.o \
- radiant/pluginapi.o \
- radiant/pluginmanager.o \
- radiant/pluginmenu.o \
- radiant/plugin.o \
- radiant/plugintoolbar.o \
- radiant/points.o \
- radiant/preferencedictionary.o \
- radiant/preferences.o \
- radiant/qe3.o \
- radiant/qgl.o \
- radiant/referencecache.o \
- radiant/renderer.o \
- radiant/renderstate.o \
- radiant/scenegraph.o \
- radiant/selection.o \
- radiant/select.o \
- radiant/server.o \
- radiant/shaders.o \
- radiant/sockets.o \
- radiant/stacktrace.o \
- radiant/surfacedialog.o \
- radiant/texmanip.o \
- radiant/textures.o \
- radiant/texwindow.o \
- radiant/timer.o \
- radiant/treemodel.o \
- radiant/undo.o \
- radiant/url.o \
- radiant/view.o \
- radiant/watchbsp.o \
- radiant/winding.o \
- radiant/windowobservers.o \
- radiant/xmlstuff.o \
- radiant/xywindow.o \
- libcmdlib.$(A) \
- libgtkutil.$(A) \
- libl_net.$(A) \
- libmathlib.$(A) \
- libprofile.$(A) \
- libxmllib.$(A) \
- $(if $(findstring $(OS),Win32),icons/radiant.o,) \
-
-libfilematch.$(A): CPPFLAGS_EXTRA := -Ilibs
-libfilematch.$(A): \
- libs/filematch.o \
-
-libcmdlib.$(A): CPPFLAGS_EXTRA := -Ilibs
-libcmdlib.$(A): \
- libs/cmdlib/cmdlib.o \
-
-libprofile.$(A): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-libprofile.$(A): \
- libs/profile/file.o \
- libs/profile/profile.o \
-
-libgtkutil.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) $(CPPFLAGS_PANGOFT2) -Ilibs -Iinclude
-libgtkutil.$(A): \
- libs/gtkutil/accelerator.o \
- libs/gtkutil/button.o \
- libs/gtkutil/clipboard.o \
- libs/gtkutil/closure.o \
- libs/gtkutil/container.o \
- libs/gtkutil/cursor.o \
- libs/gtkutil/dialog.o \
- libs/gtkutil/entry.o \
- libs/gtkutil/filechooser.o \
- libs/gtkutil/frame.o \
- libs/gtkutil/glfont.o \
- libs/gtkutil/glwidget.o \
- libs/gtkutil/idledraw.o \
- libs/gtkutil/image.o \
- libs/gtkutil/menu.o \
- libs/gtkutil/messagebox.o \
- libs/gtkutil/nonmodal.o \
- libs/gtkutil/paned.o \
- libs/gtkutil/pointer.o \
- libs/gtkutil/toolbar.o \
- libs/gtkutil/widget.o \
- libs/gtkutil/window.o \
- libs/gtkutil/xorrectangle.o \
-
-libxmllib.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
-libxmllib.$(A): \
- libs/xml/ixml.o \
- libs/xml/xmlelement.o \
- libs/xml/xmlparser.o \
- libs/xml/xmltextags.o \
- libs/xml/xmlwriter.o \
-
-$(INSTALLDIR)/modules/archivezip.$(DLL): LIBS_EXTRA := $(LIBS_ZLIB)
-$(INSTALLDIR)/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_ZLIB) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/archivezip.$(DLL): \
- plugins/archivezip/archive.o \
- plugins/archivezip/pkzip.o \
- plugins/archivezip/plugin.o \
- plugins/archivezip/zlibstream.o \
-
-$(INSTALLDIR)/modules/archivewad.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/archivewad.$(DLL): \
- plugins/archivewad/archive.o \
- plugins/archivewad/plugin.o \
- plugins/archivewad/wad.o \
-
-$(INSTALLDIR)/modules/archivepak.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/archivepak.$(DLL): \
- plugins/archivepak/archive.o \
- plugins/archivepak/pak.o \
- plugins/archivepak/plugin.o \
-
-$(INSTALLDIR)/modules/entity.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/entity.$(DLL): \
- plugins/entity/angle.o \
- plugins/entity/angles.o \
- plugins/entity/colour.o \
- plugins/entity/doom3group.o \
- plugins/entity/eclassmodel.o \
- plugins/entity/entity.o \
- plugins/entity/filters.o \
- plugins/entity/generic.o \
- plugins/entity/group.o \
- plugins/entity/light.o \
- plugins/entity/miscmodel.o \
- plugins/entity/model.o \
- plugins/entity/modelskinkey.o \
- plugins/entity/namedentity.o \
- plugins/entity/origin.o \
- plugins/entity/plugin.o \
- plugins/entity/rotation.o \
- plugins/entity/scale.o \
- plugins/entity/skincache.o \
- plugins/entity/targetable.o \
-
-$(INSTALLDIR)/modules/image.$(DLL): LIBS_EXTRA := $(LIBS_JPEG)
-$(INSTALLDIR)/modules/image.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_JPEG) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/image.$(DLL): \
- plugins/image/bmp.o \
- plugins/image/dds.o \
- plugins/image/image.o \
- plugins/image/jpeg.o \
- plugins/image/ktx.o \
- plugins/image/pcx.o \
- plugins/image/tga.o \
- libddslib.$(A) \
- libetclib.$(A) \
-
-$(INSTALLDIR)/modules/imageq2.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/imageq2.$(DLL): \
- plugins/imageq2/imageq2.o \
- plugins/imageq2/wal32.o \
- plugins/imageq2/wal.o \
-
-$(INSTALLDIR)/modules/imagehl.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/imagehl.$(DLL): \
- plugins/imagehl/hlw.o \
- plugins/imagehl/imagehl.o \
- plugins/imagehl/mip.o \
- plugins/imagehl/sprite.o \
-
-$(INSTALLDIR)/modules/imagepng.$(DLL): LIBS_EXTRA := $(LIBS_PNG)
-$(INSTALLDIR)/modules/imagepng.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_PNG) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/imagepng.$(DLL): \
- plugins/imagepng/plugin.o \
-
-$(INSTALLDIR)/modules/mapq3.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/mapq3.$(DLL): \
- plugins/mapq3/parse.o \
- plugins/mapq3/plugin.o \
- plugins/mapq3/write.o \
-
-$(INSTALLDIR)/modules/mapxml.$(DLL): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB)
-$(INSTALLDIR)/modules/mapxml.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/mapxml.$(DLL): \
- plugins/mapxml/plugin.o \
- plugins/mapxml/xmlparse.o \
- plugins/mapxml/xmlwrite.o \
-
-$(INSTALLDIR)/modules/md3model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/md3model.$(DLL): \
- plugins/md3model/md2.o \
- plugins/md3model/md3.o \
- plugins/md3model/md5.o \
- plugins/md3model/mdc.o \
- plugins/md3model/mdlimage.o \
- plugins/md3model/mdl.o \
- plugins/md3model/plugin.o \
-
-$(INSTALLDIR)/modules/model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
-$(INSTALLDIR)/modules/model.$(DLL): \
- plugins/model/model.o \
- plugins/model/plugin.o \
- libpicomodel.$(A) \
-
-$(INSTALLDIR)/modules/shaders.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
-$(INSTALLDIR)/modules/shaders.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/shaders.$(DLL): \
- plugins/shaders/plugin.o \
- plugins/shaders/shaders.o \
-
-$(INSTALLDIR)/modules/vfspk3.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
-$(INSTALLDIR)/modules/vfspk3.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
-$(INSTALLDIR)/modules/vfspk3.$(DLL): \
- plugins/vfspk3/archive.o \
- plugins/vfspk3/vfs.o \
- plugins/vfspk3/vfspk3.o \
- libfilematch.$(A) \
-
-$(INSTALLDIR)/plugins/bobtoolz.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/bobtoolz.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/bobtoolz.$(DLL): \
- contrib/bobtoolz/bobToolz-GTK.o \
- contrib/bobtoolz/bsploader.o \
- contrib/bobtoolz/cportals.o \
- contrib/bobtoolz/DBobView.o \
- contrib/bobtoolz/DBrush.o \
- contrib/bobtoolz/DEntity.o \
- contrib/bobtoolz/DEPair.o \
- contrib/bobtoolz/dialogs/dialogs-gtk.o \
- contrib/bobtoolz/DMap.o \
- contrib/bobtoolz/DPatch.o \
- contrib/bobtoolz/DPlane.o \
- contrib/bobtoolz/DPoint.o \
- contrib/bobtoolz/DShape.o \
- contrib/bobtoolz/DTrainDrawer.o \
- contrib/bobtoolz/DTreePlanter.o \
- contrib/bobtoolz/DVisDrawer.o \
- contrib/bobtoolz/DWinding.o \
- contrib/bobtoolz/funchandlers-GTK.o \
- contrib/bobtoolz/lists.o \
- contrib/bobtoolz/misc.o \
- contrib/bobtoolz/ScriptParser.o \
- contrib/bobtoolz/shapes.o \
- contrib/bobtoolz/visfind.o \
- libcmdlib.$(A) \
- libmathlib.$(A) \
- libprofile.$(A) \
-
-$(INSTALLDIR)/plugins/brushexport.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/brushexport.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/brushexport.$(DLL): \
- contrib/brushexport/callbacks.o \
- contrib/brushexport/export.o \
- contrib/brushexport/interface.o \
- contrib/brushexport/plugin.o \
- contrib/brushexport/support.o \
-
-$(INSTALLDIR)/plugins/prtview.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/prtview.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/prtview.$(DLL): \
- contrib/prtview/AboutDialog.o \
- contrib/prtview/ConfigDialog.o \
- contrib/prtview/LoadPortalFileDialog.o \
- contrib/prtview/portals.o \
- contrib/prtview/prtview.o \
- libprofile.$(A) \
-
-$(INSTALLDIR)/plugins/shaderplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_XML)
-$(INSTALLDIR)/plugins/shaderplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_XML) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/shaderplug.$(DLL): \
- contrib/shaderplug/shaderplug.o \
- libxmllib.$(A) \
-
-$(INSTALLDIR)/plugins/sunplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/sunplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/sunplug.$(DLL): \
- contrib/sunplug/sunplug.o \
-
-$(INSTALLDIR)/qdata3.$(EXE): LIBS_EXTRA := $(LIBS_XML)
-$(INSTALLDIR)/qdata3.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
-$(INSTALLDIR)/qdata3.$(EXE): \
- tools/quake2/common/bspfile.o \
- tools/quake2/common/cmdlib.o \
- tools/quake2/common/inout.o \
- tools/quake2/common/l3dslib.o \
- tools/quake2/common/lbmlib.o \
- tools/quake2/common/mathlib.o \
- tools/quake2/common/md4.o \
- tools/quake2/common/path_init.o \
- tools/quake2/common/polylib.o \
- tools/quake2/common/scriplib.o \
- tools/quake2/common/threads.o \
- tools/quake2/common/trilib.o \
- tools/quake2/qdata/images.o \
- tools/quake2/qdata/models.o \
- tools/quake2/qdata/qdata.o \
- tools/quake2/qdata/sprites.o \
- tools/quake2/qdata/tables.o \
- tools/quake2/qdata/video.o \
- libl_net.$(A) \
- $(if $(findstring $(OS),Win32),icons/qdata3.o,) \
-
-$(INSTALLDIR)/q2map.$(EXE): LIBS_EXTRA := $(LIBS_XML)
-$(INSTALLDIR)/q2map.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
-$(INSTALLDIR)/q2map.$(EXE): \
- tools/quake2/common/bspfile.o \
- tools/quake2/common/cmdlib.o \
- tools/quake2/common/inout.o \
- tools/quake2/common/l3dslib.o \
- tools/quake2/common/lbmlib.o \
- tools/quake2/common/mathlib.o \
- tools/quake2/common/md4.o \
- tools/quake2/common/path_init.o \
- tools/quake2/common/polylib.o \
- tools/quake2/common/scriplib.o \
- tools/quake2/common/threads.o \
- tools/quake2/common/trilib.o \
- tools/quake2/q2map/brushbsp.o \
- tools/quake2/q2map/csg.o \
- tools/quake2/q2map/faces.o \
- tools/quake2/q2map/flow.o \
- tools/quake2/q2map/glfile.o \
- tools/quake2/q2map/leakfile.o \
- tools/quake2/q2map/lightmap.o \
- tools/quake2/q2map/main.o \
- tools/quake2/q2map/map.o \
- tools/quake2/q2map/nodraw.o \
- tools/quake2/q2map/patches.o \
- tools/quake2/q2map/portals.o \
- tools/quake2/q2map/prtfile.o \
- tools/quake2/q2map/qbsp.o \
- tools/quake2/q2map/qrad.o \
- tools/quake2/q2map/qvis.o \
- tools/quake2/q2map/textures.o \
- tools/quake2/q2map/trace.o \
- tools/quake2/q2map/tree.o \
- tools/quake2/q2map/writebsp.o \
- libl_net.$(A) \
- $(if $(findstring $(OS),Win32),icons/q2map.o,) \
-
-$(INSTALLDIR)/plugins/ufoaiplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/ufoaiplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/ufoaiplug.$(DLL): \
- contrib/ufoaiplug/ufoai_filters.o \
- contrib/ufoaiplug/ufoai_gtk.o \
- contrib/ufoaiplug/ufoai_level.o \
- contrib/ufoaiplug/ufoai.o \
-
-$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
-$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
-$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): \
- contrib/bkgrnd2d/bkgrnd2d.o \
- contrib/bkgrnd2d/dialog.o \
- contrib/bkgrnd2d/plugin.o \
-
-$(INSTALLDIR)/heretic2/h2data.$(EXE): LIBS_EXTRA := $(LIBS_XML)
-$(INSTALLDIR)/heretic2/h2data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/qdata_heretic2/common -Itools/quake2/qdata_heretic2/qcommon -Itools/quake2/qdata_heretic2 -Itools/quake2/common -Ilibs -Iinclude
-$(INSTALLDIR)/heretic2/h2data.$(EXE): \
- tools/quake2/qdata_heretic2/common/bspfile.o \
- tools/quake2/qdata_heretic2/common/cmdlib.o \
- tools/quake2/qdata_heretic2/common/inout.o \
- tools/quake2/qdata_heretic2/common/l3dslib.o \
- tools/quake2/qdata_heretic2/common/lbmlib.o \
- tools/quake2/qdata_heretic2/common/mathlib.o \
- tools/quake2/qdata_heretic2/common/md4.o \
- tools/quake2/qdata_heretic2/common/path_init.o \
- tools/quake2/qdata_heretic2/common/qfiles.o \
- tools/quake2/qdata_heretic2/common/scriplib.o \
- tools/quake2/qdata_heretic2/common/threads.o \
- tools/quake2/qdata_heretic2/common/token.o \
- tools/quake2/qdata_heretic2/common/trilib.o \
- tools/quake2/qdata_heretic2/qcommon/reference.o \
- tools/quake2/qdata_heretic2/qcommon/resourcemanager.o \
- tools/quake2/qdata_heretic2/qcommon/skeletons.o \
- tools/quake2/qdata_heretic2/animcomp.o \
- tools/quake2/qdata_heretic2/book.o \
- tools/quake2/qdata_heretic2/fmodels.o \
- tools/quake2/qdata_heretic2/images.o \
- tools/quake2/qdata_heretic2/jointed.o \
- tools/quake2/qdata_heretic2/models.o \
- tools/quake2/qdata_heretic2/pics.o \
- tools/quake2/qdata_heretic2/qdata.o \
- tools/quake2/qdata_heretic2/qd_skeletons.o \
- tools/quake2/qdata_heretic2/sprites.o \
- tools/quake2/qdata_heretic2/svdcmp.o \
- tools/quake2/qdata_heretic2/tables.o \
- tools/quake2/qdata_heretic2/tmix.o \
- tools/quake2/qdata_heretic2/video.o \
- libl_net.$(A) \
- $(if $(findstring $(OS),Win32),icons/h2data.o,) \
-
-.PHONY: install-data
-install-data: binaries
- $(MKDIR) $(INSTALLDIR)/games
- $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune
- DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)"
- $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR
- $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR
- $(CP_R) setup/data/tools/* $(INSTALLDIR)/
- $(MKDIR) $(INSTALLDIR)/docs
- $(CP_R) docs/* $(INSTALLDIR)/docs/
- $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune
-
-.PHONY: install-dll
-ifeq ($(OS),Win32)
-install-dll: binaries
- MKDIR="$(MKDIR)" CP="$(CP)" CAT="$(CAT)" GTKDIR="$(GTKDIR)" WHICHDLL="$(WHICHDLL)" INSTALLDIR="$(INSTALLDIR)" $(SH) $(DLLINSTALL)
-else
-install-dll: binaries
- @$(ECHO) No DLL inclusion implemented for this target.
-endif
-
-# release building... NOT for general users
-# these may use tools not in the list that is checked by the build system
-release-src: BUILD_DATE := $(shell date +%Y%m%d)
-release-src: INSTALLDIR := netradiant-$(RADIANT_VERSION_NUMBER)-$(BUILD_DATE)
-release-src:
- $(GIT) archive --format=tar --prefix=$(INSTALLDIR)/ HEAD | bzip2 > ../$(INSTALLDIR).tar.bz2
-
-release-win32: BUILD_DATE := $(shell date +%Y%m%d)
-release-win32: INSTALLDIR := netradiant-$(RADIANT_VERSION_NUMBER)-$(BUILD_DATE)
-release-win32:
- $(MAKE) all INSTALLDIR=$(INSTALLDIR) MAKEFILE_CONF=cross-Makefile.conf RADIANT_ABOUTMSG="Official release build" BUILD=release
- 7za a -sfx../../../../../../../../../../$(HOME)/7z.sfx ../$(INSTALLDIR)-win32-7z.exe $(INSTALLDIR)/
- chmod 644 ../$(INSTALLDIR)-win32-7z.exe # 7zip is evil
- $(MAKE) clean INSTALLDIR=$(INSTALLDIR) MAKEFILE_CONF=cross-Makefile.conf RADIANT_ABOUTMSG="Official release build" BUILD=release
-
-release-all:
- $(GIT) clean -xdf
- $(MAKE) release-src
- $(MAKE) release-win32
-
-# load dependency files
--include $(shell find . -name \*.d)
+++ /dev/null
-# empty Makefile.conf template
-
-## OS X:
-# BUILD=debug
-# RADIANT_ABOUTMSG=Custom build
-# EXE=ub
-
-## Fink
-## (-arch ppc can combined with -arch 386, I read somewhere. However does work fine like this on OSX 10.6)
-# LDFLAGS=-arch i386
-# CFLAGS=-arch i386
-# TARGET_ARCH=-arch i386
-# MACLIBDIR=/sw/lib
-
-## On some versions of OSX you may get compile errors regarding glTexImage1D, uncomment this to fix it
-#MACVERSION ?= 16
-#CPPFLAGS_COMMON += -DMACVERSION="$(MACVERSION)"
+++ /dev/null
-#include <stdio.h> /* jpeglib.h needs it */
-#include CONFTEST_HEADER
-int main(){
- (void) CONFTEST_SYMBOL;
- return 0;
-}
include_directories("${CMAKE_SOURCE_DIR}/libs")
include_directories("${CMAKE_SOURCE_DIR}/include")
-find_package(GTK2 REQUIRED)
-include_directories(${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
-
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
add_custom_target(plugins)
radiant_plugin(bobtoolz
-# dialogs/AboutDialog.cpp
-# dialogs/AboutDialog.h
-# dialogs/AutoCaulkDialog.cpp
-# dialogs/AutoCaulkDialog.h
-# dialogs/AutoCaulkStartDialog.cpp
-# dialogs/AutoCaulkStartDialog.h
-# dialogs/BrushCheckDialog.h
-# dialogs/DoorDialog.cpp
-# dialogs/DoorDialog.h
-# dialogs/IntersectDialog.cpp
-# dialogs/IntersectDialog.h
-# dialogs/IntersectInfoDialog.cpp
-# dialogs/IntersectInfoDialog.h
-# dialogs/PolygonDialog.cpp
-# dialogs/PolygonDialog.h
-# dialogs/StairDialog.cpp
-# dialogs/StairDialog.h
-# dialogs/TextureResetDialog.cpp
-# dialogs/TextureResetDialog.h
-# dialogs/brushcheckdialog.cpp
- dialogs/dialogs-gtk.cpp
- dialogs/dialogs-gtk.h
-# dialogs/pathplotterdialog.cpp
-# dialogs/pathplotterdialog.h
- CPortals.h
- DBobView.cpp
- DBobView.h
- DBrush.cpp
- DBrush.h
- DEPair.cpp
- DEPair.h
- DEntity.cpp
- DEntity.h
- DMap.cpp
- DMap.h
- DPatch.cpp
- DPatch.h
- DPlane.cpp
- DPlane.h
- DPoint.cpp
- DPoint.h
- DShape.cpp
- DShape.h
- DTrainDrawer.cpp
- DTrainDrawer.h
- DTreePlanter.cpp
- DTreePlanter.h
- DVisDrawer.cpp
- DVisDrawer.h
- DWinding.cpp
- DWinding.h
- ScriptParser.cpp
- ScriptParser.h
-# StdAfx.cpp
-# StdAfx.h
- bobToolz-GTK.cpp
- bobToolz.h
- bsploader.cpp
- bsploader.h
- cportals.cpp
-# ctfToolz-GTK.cpp
-# ctfresource_gtk.h
- funchandlers-GTK.cpp
-# funchandlers-ctf-GTK.cpp
-# funchandlers.cpp
- funchandlers.h
- lists.cpp
- lists.h
- misc.cpp
- misc.h
-# resource-gtk.h
-# resource.h
- shapes.cpp
- shapes.h
- visfind.cpp
- visfind.h
-)
+ # dialogs/AboutDialog.cpp dialogs/AboutDialog.h
+ # dialogs/AutoCaulkDialog.cpp dialogs/AutoCaulkDialog.h
+ # dialogs/AutoCaulkStartDialog.cpp dialogs/AutoCaulkStartDialog.h
+ # dialogs/BrushCheckDialog.cpp dialogs/BrushCheckDialog.h
+ dialogs/dialogs-gtk.cpp dialogs/dialogs-gtk.h
+ # dialogs/DoorDialog.cpp dialogs/DoorDialog.h
+ # dialogs/IntersectDialog.cpp dialogs/IntersectDialog.h
+ # dialogs/IntersectInfoDialog.cpp dialogs/IntersectInfoDialog.h
+ # dialogs/pathplotterdialog.cpp dialogs/pathplotterdialog.h
+ # dialogs/PolygonDialog.cpp dialogs/PolygonDialog.h
+ # dialogs/StairDialog.cpp dialogs/StairDialog.h
+ # dialogs/TextureResetDialog.cpp dialogs/TextureResetDialog.h
+ CPortals.cpp CPortals.h
+ DBobView.cpp DBobView.h
+ DBrush.cpp DBrush.h
+ DEPair.cpp DEPair.h
+ DEntity.cpp DEntity.h
+ DMap.cpp DMap.h
+ DPatch.cpp DPatch.h
+ DPlane.cpp DPlane.h
+ DPoint.cpp DPoint.h
+ DShape.cpp DShape.h
+ DTrainDrawer.cpp DTrainDrawer.h
+ DTreePlanter.cpp DTreePlanter.h
+ DVisDrawer.cpp DVisDrawer.h
+ DWinding.cpp DWinding.h
+ ScriptParser.cpp ScriptParser.h
+ bobToolz-GTK.cpp bobToolz.h
+ bsploader.cpp bsploader.h
+ # ctfToolz-GTK.cpp
+ # ctfresource_gtk.h
+ funchandlers-GTK.cpp
+ # funchandlers-ctf-GTK.cpp
+ # funchandlers.cpp funchandlers.h
+ lists.cpp lists.h
+ misc.cpp misc.h
+ # resource.h
+ # resource-gtk.h
+ shapes.cpp shapes.h
+ visfind.cpp visfind.h
+ )
-target_link_libraries(bobtoolz cmdlib mathlib profile ${GLIB_LIBRARIES} ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(bobtoolz PRIVATE ${GTK2_INCLUDE_DIRS})
+
+target_link_libraries(bobtoolz mathlib)
--- /dev/null
+/*
+ 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 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
+ */
+
+#include "CPortals.h"
+
+#include <string.h>
+#include <math.h>
+
+#include "misc.h"
+
+#define LINE_BUF 1000
+#define MSG_PREFIX "bobToolz plugin: "
+
+// these classes are far less of a mess than my code was,
+// thanq to G.DeWan 4 the prtview source on which it was based
+
+CBspPortal::CBspPortal(){
+ memset( this, 0, sizeof( CBspPortal ) );
+}
+
+CBspPortal::~CBspPortal(){
+ delete[] point;
+}
+
+void ClampFloat( float* p ){
+ double i;
+ double frac = modf( *p, &i );
+
+ if ( !frac ) {
+ return;
+ }
+
+ if ( fabs( *p - ceil( *p ) ) < MAX_ROUND_ERROR ) {
+ *p = static_cast<float>( ceil( *p ) );
+ }
+
+ if ( fabs( *p - floor( *p ) ) < MAX_ROUND_ERROR ) {
+ *p = static_cast<float>( floor( *p ) );
+ }
+}
+
+bool CBspPortal::Build( char *def, unsigned int pointCnt, bool bInverse ){
+ char *c = def;
+ unsigned int n;
+
+ point_count = pointCnt;
+
+ if ( point_count < 3 ) {
+ return false;
+ }
+
+ point = new CBspPoint[point_count];
+
+ for ( n = 0; n < point_count; n++ )
+ {
+ for (; *c != 0 && *c != '('; c++ ) ;
+
+ if ( *c == 0 ) {
+ return false;
+ }
+
+ c++;
+
+ int x;
+ if ( bInverse ) {
+ x = point_count - n - 1;
+ }
+ else{
+ x = n;
+ }
+
+ sscanf( c, "%f %f %f", &point[x].p[0], &point[x].p[1], &point[x].p[2] );
+
+ ClampFloat( &point[x].p[0] );
+ ClampFloat( &point[x].p[1] );
+ ClampFloat( &point[x].p[2] );
+ }
+
+ return true;
+}
+
+CPortals::CPortals(){
+ memset( this, 0, sizeof( CPortals ) );
+}
+
+CPortals::~CPortals(){
+ Purge();
+}
+
+void CPortals::Purge(){
+ if ( node ) {
+ delete[] node;
+ }
+ node = NULL;
+ node_count = 0;
+}
+
+void CPortals::Load(){
+ char buf[LINE_BUF + 1];
+
+ memset( buf, 0, LINE_BUF + 1 );
+
+ Purge();
+
+ globalOutputStream() << MSG_PREFIX "Loading portal file " << fn << ".\n";
+
+ FILE *in;
+
+ in = fopen( fn, "rt" );
+
+ if ( in == NULL ) {
+ globalOutputStream() << " ERROR - could not open file.\n";
+
+ return;
+ }
+
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ if ( strncmp( "PRT1", buf, 4 ) != 0 ) {
+ fclose( in );
+
+ globalOutputStream() << " ERROR - File header indicates wrong file type (should be \"PRT1\").\n";
+
+ return;
+ }
+
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ sscanf( buf, "%u", &node_count );
+
+ if ( node_count > 0xFFFF ) {
+ fclose( in );
+
+ node_count = 0;
+
+ globalOutputStream() << " ERROR - Extreme number of nodes, aborting.\n";
+
+ return;
+ }
+
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ node_count = 0;
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ unsigned int p_count;
+ sscanf( buf, "%u", &p_count );
+
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ node_count = 0;
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ unsigned int p_count2;
+ sscanf( buf, "%u", &p_count2 );
+
+ node = new CBspNode[node_count];
+
+ unsigned int i;
+ for ( i = 0; i < p_count; i++ )
+ {
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ node_count = 0;
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ unsigned int dummy, node1, node2;
+ sscanf( buf, "%u %u %u", &dummy, &node1, &node2 );
+
+ node[node1].portal_count++;
+ node[node2].portal_count++;
+ }
+
+ for ( i = 0; i < p_count2; i++ )
+ {
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ node_count = 0;
+
+ globalOutputStream() << " ERROR - File ended prematurely.\n";
+
+ return;
+ }
+
+ unsigned int dummy, node1;
+ sscanf( buf, "%u %u", &dummy, &node1 );
+
+ node[node1].portal_count++;
+ }
+
+ for ( i = 0; i < node_count; i++ )
+ node[i].portal = new CBspPortal[node[i].portal_count];
+
+ fclose( in );
+
+ in = fopen( fn, "rt" );
+
+ fgets( buf, LINE_BUF, in );
+ fgets( buf, LINE_BUF, in );
+ fgets( buf, LINE_BUF, in );
+ fgets( buf, LINE_BUF, in );
+
+ unsigned int n;
+ for ( n = 0; n < p_count; n++ )
+ {
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ Purge();
+
+ globalOutputStream() << " ERROR - Could not find information for portal number " << n + 1 << " of " << p_count << ".\n";
+
+ return;
+ }
+
+ unsigned int pCount, node1, node2;
+ sscanf( buf, "%u %u %u", &pCount, &node1, &node2 );
+
+ if ( !node[node1].AddPortal( buf, pCount, false ) ) {
+ fclose( in );
+
+ Purge();
+
+ globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
+
+ return;
+ }
+
+ if ( !node[node2].AddPortal( buf, pCount, true ) ) {
+ fclose( in );
+
+ Purge();
+
+ globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
+
+ return;
+ }
+ }
+
+ for ( n = 0; n < p_count2; n++ )
+ {
+ if ( !fgets( buf, LINE_BUF, in ) ) {
+ fclose( in );
+
+ Purge();
+
+ globalOutputStream() << " ERROR - Could not find information for portal number " << n + 1 << " of " << p_count << ".\n";
+
+ return;
+ }
+
+ unsigned int pCount, node1;
+ sscanf( buf, "%u %u", &pCount, &node1 );
+
+ if ( !node[node1].AddPortal( buf, pCount, false ) ) {
+ fclose( in );
+
+ Purge();
+
+ globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
+
+ return;
+ }
+ }
+
+ fclose( in );
+}
+
+CBspNode::CBspNode(){
+ portal = NULL;
+ portal_count = 0;
+ portal_next = 0;
+}
+
+CBspNode::~CBspNode(){
+ if ( portal != NULL ) {
+ delete[] portal;
+ }
+}
+
+bool CBspNode::AddPortal( char *def, unsigned int pointCnt, bool bInverse ){
+ return portal[portal_next++].Build( def, pointCnt, bInverse );
+}
#include "ientity.h"
#include "irender.h"
#include "renderable.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class DListener;
class Shader;
#include <stdio.h>
#include <list>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "str.h"
class DPlane;
#include <list>
#include "str.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class DEPair;
class DBrush;
#include <list>
#include "ibrush.h"
#include "string/string.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class Brush;
class DPoint;
#pragma once
#endif // _MSC_VER > 1000
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class DPoint
{
#endif // _MSC_VER > 1000
#include <cstdlib>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "DMap.h"
class DBrush;
class DEntity;
#endif // _MSC_VER > 1000
#include <list>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "irender.h"
#include "renderable.h"
#include "DEntity.h"
#include "ScriptParser.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "misc.h"
#define MAX_QPATH 64
#pragma once
#endif // _MSC_VER > 1000
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class DPlane;
+++ /dev/null
-/*
- 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 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
- */
-
-// stdafx.cpp : source file that includes just the standard includes
-// plugin.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "StdAfx.h"
+++ /dev/null
-/*
- 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 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
- */
-
-#ifndef __STDAFX_BOBTOOLZ__
-#define __STDAFX_BOBTOOLZ__
-
-
-
-#endif
#include "str.h"
#include "qerplugin.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "string/string.h"
#include "itoolbar.h"
#include "DTreePlanter.h"
#include "dialogs/dialogs-gtk.h"
-#include "../../libs/cmdlib.h"
+#include "cmdlib/cmdlib.h"
void BobToolz_construct(){
}
#include "bsploader.h"
#include "dialogs/dialogs-gtk.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
int numnodes;
int numplanes;
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#define LUMP_ENTITIES 0
#define LUMP_SHADERS 1
+++ /dev/null
-/*
- 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 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
- */
-
-#include "CPortals.h"
-
-#include <string.h>
-#include <math.h>
-
-#include "misc.h"
-
-#define LINE_BUF 1000
-#define MSG_PREFIX "bobToolz plugin: "
-
-// these classes are far less of a mess than my code was,
-// thanq to G.DeWan 4 the prtview source on which it was based
-
-CBspPortal::CBspPortal(){
- memset( this, 0, sizeof( CBspPortal ) );
-}
-
-CBspPortal::~CBspPortal(){
- delete[] point;
-}
-
-void ClampFloat( float* p ){
- double i;
- double frac = modf( *p, &i );
-
- if ( !frac ) {
- return;
- }
-
- if ( fabs( *p - ceil( *p ) ) < MAX_ROUND_ERROR ) {
- *p = static_cast<float>( ceil( *p ) );
- }
-
- if ( fabs( *p - floor( *p ) ) < MAX_ROUND_ERROR ) {
- *p = static_cast<float>( floor( *p ) );
- }
-}
-
-bool CBspPortal::Build( char *def, unsigned int pointCnt, bool bInverse ){
- char *c = def;
- unsigned int n;
-
- point_count = pointCnt;
-
- if ( point_count < 3 ) {
- return false;
- }
-
- point = new CBspPoint[point_count];
-
- for ( n = 0; n < point_count; n++ )
- {
- for (; *c != 0 && *c != '('; c++ ) ;
-
- if ( *c == 0 ) {
- return false;
- }
-
- c++;
-
- int x;
- if ( bInverse ) {
- x = point_count - n - 1;
- }
- else{
- x = n;
- }
-
- sscanf( c, "%f %f %f", &point[x].p[0], &point[x].p[1], &point[x].p[2] );
-
- ClampFloat( &point[x].p[0] );
- ClampFloat( &point[x].p[1] );
- ClampFloat( &point[x].p[2] );
- }
-
- return true;
-}
-
-CPortals::CPortals(){
- memset( this, 0, sizeof( CPortals ) );
-}
-
-CPortals::~CPortals(){
- Purge();
-}
-
-void CPortals::Purge(){
- if ( node ) {
- delete[] node;
- }
- node = NULL;
- node_count = 0;
-}
-
-void CPortals::Load(){
- char buf[LINE_BUF + 1];
-
- memset( buf, 0, LINE_BUF + 1 );
-
- Purge();
-
- globalOutputStream() << MSG_PREFIX "Loading portal file " << fn << ".\n";
-
- FILE *in;
-
- in = fopen( fn, "rt" );
-
- if ( in == NULL ) {
- globalOutputStream() << " ERROR - could not open file.\n";
-
- return;
- }
-
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- if ( strncmp( "PRT1", buf, 4 ) != 0 ) {
- fclose( in );
-
- globalOutputStream() << " ERROR - File header indicates wrong file type (should be \"PRT1\").\n";
-
- return;
- }
-
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- sscanf( buf, "%u", &node_count );
-
- if ( node_count > 0xFFFF ) {
- fclose( in );
-
- node_count = 0;
-
- globalOutputStream() << " ERROR - Extreme number of nodes, aborting.\n";
-
- return;
- }
-
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- node_count = 0;
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- unsigned int p_count;
- sscanf( buf, "%u", &p_count );
-
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- node_count = 0;
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- unsigned int p_count2;
- sscanf( buf, "%u", &p_count2 );
-
- node = new CBspNode[node_count];
-
- unsigned int i;
- for ( i = 0; i < p_count; i++ )
- {
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- node_count = 0;
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- unsigned int dummy, node1, node2;
- sscanf( buf, "%u %u %u", &dummy, &node1, &node2 );
-
- node[node1].portal_count++;
- node[node2].portal_count++;
- }
-
- for ( i = 0; i < p_count2; i++ )
- {
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- node_count = 0;
-
- globalOutputStream() << " ERROR - File ended prematurely.\n";
-
- return;
- }
-
- unsigned int dummy, node1;
- sscanf( buf, "%u %u", &dummy, &node1 );
-
- node[node1].portal_count++;
- }
-
- for ( i = 0; i < node_count; i++ )
- node[i].portal = new CBspPortal[node[i].portal_count];
-
- fclose( in );
-
- in = fopen( fn, "rt" );
-
- fgets( buf, LINE_BUF, in );
- fgets( buf, LINE_BUF, in );
- fgets( buf, LINE_BUF, in );
- fgets( buf, LINE_BUF, in );
-
- unsigned int n;
- for ( n = 0; n < p_count; n++ )
- {
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- Purge();
-
- globalOutputStream() << " ERROR - Could not find information for portal number " << n + 1 << " of " << p_count << ".\n";
-
- return;
- }
-
- unsigned int pCount, node1, node2;
- sscanf( buf, "%u %u %u", &pCount, &node1, &node2 );
-
- if ( !node[node1].AddPortal( buf, pCount, false ) ) {
- fclose( in );
-
- Purge();
-
- globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
-
- return;
- }
-
- if ( !node[node2].AddPortal( buf, pCount, true ) ) {
- fclose( in );
-
- Purge();
-
- globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
-
- return;
- }
- }
-
- for ( n = 0; n < p_count2; n++ )
- {
- if ( !fgets( buf, LINE_BUF, in ) ) {
- fclose( in );
-
- Purge();
-
- globalOutputStream() << " ERROR - Could not find information for portal number " << n + 1 << " of " << p_count << ".\n";
-
- return;
- }
-
- unsigned int pCount, node1;
- sscanf( buf, "%u %u", &pCount, &node1 );
-
- if ( !node[node1].AddPortal( buf, pCount, false ) ) {
- fclose( in );
-
- Purge();
-
- globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << p_count << " is not formatted correctly.\n";
-
- return;
- }
- }
-
- fclose( in );
-}
-
-CBspNode::CBspNode(){
- portal = NULL;
- portal_count = 0;
- portal_next = 0;
-}
-
-CBspNode::~CBspNode(){
- if ( portal != NULL ) {
- delete[] portal;
- }
-}
-
-bool CBspNode::AddPortal( char *def, unsigned int pointCnt, bool bInverse ){
- return portal[portal_next++].Build( def, pointCnt, bInverse );
-}
--- /dev/null
+/*
+ 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 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
+ */
+
+// BrushCheckDialog.cpp : implementation file
+//
+
+#include "../StdAfx.h"
+#include "../bobtoolz.h"
+#include "BrushCheckDialog.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CBrushCheckDialog dialog
+
+
+CBrushCheckDialog::CBrushCheckDialog( CWnd* pParent /*=NULL*/ )
+ : CDialog( CBrushCheckDialog::IDD, pParent ){
+ //{{AFX_DATA_INIT(CBrushCheckDialog)
+ //}}AFX_DATA_INIT
+}
+
+
+void CBrushCheckDialog::DoDataExchange( CDataExchange* pDX ){
+ CDialog::DoDataExchange( pDX );
+ //{{AFX_DATA_MAP(CBrushCheckDialog)
+ DDX_Control( pDX, IDC_PROGRESS1, m_prog1 );
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP( CBrushCheckDialog, CDialog )
+//{{AFX_MSG_MAP(CBrushCheckDialog)
+// NOTE: the ClassWizard will add message map macros here
+//}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CBrushCheckDialog message handlers
+++ /dev/null
-/*
- 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 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
- */
-
-// BrushCheckDialog.cpp : implementation file
-//
-
-#include "../StdAfx.h"
-#include "../bobtoolz.h"
-#include "BrushCheckDialog.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// CBrushCheckDialog dialog
-
-
-CBrushCheckDialog::CBrushCheckDialog( CWnd* pParent /*=NULL*/ )
- : CDialog( CBrushCheckDialog::IDD, pParent ){
- //{{AFX_DATA_INIT(CBrushCheckDialog)
- //}}AFX_DATA_INIT
-}
-
-
-void CBrushCheckDialog::DoDataExchange( CDataExchange* pDX ){
- CDialog::DoDataExchange( pDX );
- //{{AFX_DATA_MAP(CBrushCheckDialog)
- DDX_Control( pDX, IDC_PROGRESS1, m_prog1 );
- //}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP( CBrushCheckDialog, CDialog )
-//{{AFX_MSG_MAP(CBrushCheckDialog)
-// NOTE: the ClassWizard will add message map macros here
-//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CBrushCheckDialog message handlers
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "StdAfx.h"
-
#include "dialogs/dialogs-gtk.h"
#include "DEntity.h"
#include "funchandlers.h"
// for ctf texture changer
-list<Str> clrList_Blue;
-list<Str> clrList_Red;
+std::list<Str> clrList_Blue;
+std::list<Str> clrList_Red;
BOOL clrLst1Loaded = FALSE;
BOOL clrLst2Loaded = FALSE;
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "StdAfx.h"
-
#include "funchandlers.h"
-#include "IntersectDialog.h"
-#include "PolygonDialog.h"
-#include "StairDialog.h"
-#include "DoorDialog.h"
-#include "IntersectInfoDialog.h"
-#include "BrushCheckDialog.h"
-#include "AutoCaulkDialog.h"
-#include "AutoCaulkStartDialog.h"
-#include "TextureResetDialog.h"
-#include "pathplotterdialog.h"
+#include "dialogs/IntersectDialog.h"
+#include "dialogs/PolygonDialog.h"
+#include "dialogs/StairDialog.h"
+#include "dialogs/DoorDialog.h"
+#include "dialogs/IntersectInfoDialog.h"
+#include "dialogs/BrushCheckDialog.h"
+#include "dialogs/AutoCaulkDialog.h"
+#include "dialogs/AutoCaulkStartDialog.h"
+#include "dialogs/TextureResetDialog.h"
+#include "dialogs/pathplotterdialog.h"
#include "DEntity.h"
#include "shapes.h"
#if !defined( INCLUDED_MISC_H )
#define INCLUDED_MISC_H
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include <list>
#include "str.h"
#include "iscenegraph.h"
class Node;
}
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
// generic (detail added 12/01/01, for AC+)
void AddFaceWithTexture( scene::Node& brush, vec3_t va, vec3_t vb, vec3_t vc, const char* texture, bool detail );
#include <list>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
class DWinding;
-
radiant_plugin(brushexport
- callbacks.cpp
- callbacks.h
- export.cpp
- export.h
- interface.cpp
- plugin.cpp
- plugin.h
- support.cpp
- support.h
-)
+ callbacks.cpp callbacks.h
+ export.cpp export.h
+ interface.cpp
+ plugin.cpp plugin.h
+ support.cpp support.h
+ )
-target_link_libraries(brushexport ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(brushexport PRIVATE ${GTK2_INCLUDE_DIRS})
typedef unsigned char byte;
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include <string.h>
#include "qertypes.h"
#include <stdio.h>
#include "qertypes.h"
#include <stdio.h>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "iscenegraph.h"
#define USE_QERTABLE_DEFINE
#include "qerplugin.h"
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include <string.h>
#include "qertypes.h"
#include <stdio.h>
-
radiant_plugin(prtview
- AboutDialog.cpp
- AboutDialog.h
- ConfigDialog.cpp
- ConfigDialog.h
- LoadPortalFileDialog.cpp
- LoadPortalFileDialog.h
- portals.cpp
- portals.h
- prtview.cpp
- prtview.h
-)
+ AboutDialog.cpp AboutDialog.h
+ ConfigDialog.cpp ConfigDialog.h
+ LoadPortalFileDialog.cpp LoadPortalFileDialog.h
+ portals.cpp portals.h
+ prtview.cpp prtview.h
+ )
-target_link_libraries(prtview profile ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(prtview PRIVATE ${GTK2_INCLUDE_DIRS})
-
radiant_plugin(shaderplug
- shaderplug.cpp
- shaderplug.h
-)
+ shaderplug.cpp shaderplug.h
+ )
+
+find_package(LibXml2 REQUIRED)
+target_include_directories(shaderplug PRIVATE ${LIBXML2_INCLUDE_DIR})
-target_link_libraries(shaderplug xmllib ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(shaderplug PRIVATE ${GTK2_INCLUDE_DIRS})
radiant_plugin(sunplug
- sunplug.cpp
- sunplug.h
-)
+ sunplug.cpp sunplug.h
+ )
-target_link_libraries(sunplug ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(sunplug PRIVATE ${GTK2_INCLUDE_DIRS})
-
radiant_plugin(ufoaiplug
- ufoai.cpp
- ufoai.h
- ufoai_filters.cpp
- ufoai_filters.h
- ufoai_gtk.cpp
- ufoai_gtk.h
- ufoai_level.cpp
- ufoai_level.h
-)
+ ufoai.cpp ufoai.h
+ ufoai_filters.cpp ufoai_filters.h
+ ufoai_gtk.cpp ufoai_gtk.h
+ ufoai_level.cpp ufoai_level.h
+ )
-target_link_libraries(ufoaiplug ${GTK2_LIBRARIES})
+find_package(GTK2 REQUIRED)
+target_include_directories(ufoaiplug PRIVATE ${GTK2_INCLUDE_DIRS})
+++ /dev/null
-# Usage:
-# copy this file to Makefile.conf
-# edit the paths in here
-
-# how to call the mingw tools
-MINGW_EXEC_PREFIX = i486-mingw32-
-
-# use mingw32
-include mingw-Makefile.inc
-include mingw-radiantdeps-Makefile.inc
+++ /dev/null
-# Copyright (C) 2001-2006 William Joseph.
-# For a list of contributors, see the accompanying CONTRIBUTORS file.
-#
-# This file is part of GtkRadiant.
-#
-# GtkRadiant is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# GtkRadiant is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GtkRadiant; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-import os
-import sys
-
-def svnAddText(filename):
- os.system("svn add " + filename);
- os.system("svn ps svn:eol-style native " + filename);
-
-def createCPPTemplate(filename, name):
- file = open(filename, "wt")
- file.write("\n")
- file.write("#include \"" + name + ".h\"\n")
- file.write("\n")
- file.close()
-
-if __name__ == "__main__":
- name = sys.argv[1]
- location = sys.argv[2]
- filename = os.path.join(location, name + ".cpp")
- createCPPTemplate(filename, name)
- svnAddText(filename)
+++ /dev/null
-# Copyright (C) 2001-2006 William Joseph.
-# For a list of contributors, see the accompanying CONTRIBUTORS file.
-#
-# This file is part of GtkRadiant.
-#
-# GtkRadiant is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# GtkRadiant is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GtkRadiant; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-import os
-import sys
-
-def svnAddText(filename):
- os.system("svn add " + filename);
- os.system("svn ps svn:eol-style native " + filename);
-
-def createHeaderTemplate(filename, name):
- file = open(filename, "wt")
- file.write("\n")
- file.write("#if !defined(_INCLUDED_" + name.upper() + "_H_)\n")
- file.write("#define _INCLUDED_" + name.upper() + "_H_\n")
- file.write("\n")
- file.write("#endif\n")
-
-if __name__ == "__main__":
- name = sys.argv[1]
- location = sys.argv[2]
- filename = os.path.join(location, name + ".h")
- createHeaderTemplate(filename, name)
- svnAddText(filename)
+++ /dev/null
-# Copyright (C) 2001-2006 William Joseph.
-# For a list of contributors, see the accompanying CONTRIBUTORS file.
-#
-# This file is part of GtkRadiant.
-#
-# GtkRadiant is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# GtkRadiant is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GtkRadiant; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-import os
-import sys
-
-def svnAddText(filename):
- os.system("svn add " + filename);
- os.system("svn ps svn:eol-style native " + filename);
-
-def createHeaderTemplate(filename, name):
- file = open(filename, "wt")
- file.write("\n")
- file.write("#if !defined(INCLUDED_" + name.upper() + "_H)\n")
- file.write("#define INCLUDED_" + name.upper() + "_H\n")
- file.write("\n")
- file.write("#endif\n")
-
-def createCPPTemplate(filename, name):
- file = open(filename, "wt")
- file.write("\n")
- file.write("#include \"" + name + ".h\"\n")
- file.write("\n")
- file.close()
-
-if __name__ == "__main__":
- if not len(sys.argv) == 2:
- print "usage: " + sys.argv[0] + " <module-path>"
-
- path = sys.argv[1]
- name = os.path.split(path)[1];
-
- h = os.path.normpath(path + ".h")
- print "writing " + h;
- createHeaderTemplate(h, name)
- svnAddText(h)
-
- cpp = os.path.normpath(path + ".cpp")
- print "writing " + cpp;
- createCPPTemplate(cpp, name)
- svnAddText(cpp)
-
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "cullable.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "editable.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iarchive.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ibrush.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "icamera.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "idatastream.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ieclass.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ientity.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ifilesystem.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ifiletypes.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ifilter.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "igl.h"
+++ /dev/null
-
-#include "iglrender.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "igtkgl.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iimage.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "imap.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "imodel.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ipatch.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iplugin.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ireference.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "irender.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iscenegraph.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iscriplib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iselection.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ishaders.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "itexdef.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "itextstream.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "itextures.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "itoolbar.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "iundo.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "mapfile.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "modelskin.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "moduleobserver.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "modulesystem.h"
}
void initialise( const char* name ){
- m_module = globalModuleServer().findModule( typename Type::Name(), typename Type::Version(), name );
- if ( m_module == 0 ) {
+ const char *type = typename Type::Name();
+ int version = typename Type::Version();
+ m_module = globalModuleServer().findModule( type, version, name );
+ if ( !m_module ) {
globalModuleServer().setError( true );
- globalErrorStream() << "SingletonModuleRef::initialise: type=" << makeQuoted( typename Type::Name() ) << " version=" << makeQuoted( typename Type::Version() ) << " name=" << makeQuoted( name ) << " - not found\n";
+ globalErrorStream() << "SingletonModuleRef::initialise: type=" << makeQuoted( type ) << " version=" << makeQuoted( version ) << " name=" << makeQuoted( name ) << " - not found\n";
}
}
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "nameable.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "namespace.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "qerplugin.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "renderable.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "selectable.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "windowobserver.h"
+++ /dev/null
-#!/bin/sh
-set -x
-
-DLL_PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin
-
-cd install
-
-STARTDIR=`pwd`
-
-COPYDEPS()
-{
- FILE=$1
- if [ -e "$FILE" ] ;then
- DEPS=`objdump -p "$FILE" 2>/dev/null |grep -i "DLL Name"|sort |uniq|cut -d\ -f3 |egrep -vi '(GDI32.dll|KERNEL32.dll|USER32.dll|msvcrt.dll|MSIMG32.DLL|ole32.dll|OPENGL32.DLL|SHELL32.DLL|WS2_32.dll)' || true`
-
- for DEP in $DEPS; do
- basename -a "$STARTDIR"/*.dll | grep -v "*.dll"|sort > "$STARTDIR"/.HAVES
- if ! cat "$STARTDIR"/.HAVES | grep "$DEP" >/dev/null ;then
- cp -v "$DLL_PATH"/"$DEP" "$STARTDIR" 2>/dev/null
- COPYDEPS "$DLL_PATH"/"$DEP"
- fi
- rm -f "$STARTDIR"/.HAVES
- done
- fi
-}
-
-for i in *.exe;do
- COPYDEPS "$i";
-done
-
+++ /dev/null
-#!/bin/sh
-
-set -ex
-
-: ${WHICHDLL:=which}
-: ${GTKDIR:=/gtk}
-: ${CP:=cp}
-: ${CAT:=cat}
-: ${MKDIR:=mkdir -p}
-: ${INSTALLDIR:=.}
-
-for DLL in \
- freetype6.dll \
- intl.dll \
- libatk-1.0-0.dll \
- libcairo-2.dll \
- libexpat-1.dll \
- libfontconfig-1.dll \
- libgdkglext-win32-1.0-0.dll \
- libgdk_pixbuf-2.0-0.dll \
- libgdk-win32-2.0-0.dll \
- libgio-2.0-0.dll \
- libglib-2.0-0.dll \
- libgmodule-2.0-0.dll \
- libgobject-2.0-0.dll \
- libgthread-2.0-0.dll \
- libgtkglext-win32-1.0-0.dll \
- libgtk-win32-2.0-0.dll \
- libjpeg-8.dll \
- libpango-1.0-0.dll \
- libpangocairo-1.0-0.dll \
- libpangoft2-1.0-0.dll \
- libpangowin32-1.0-0.dll \
- libpng14-14.dll \
- libxml2-2.dll \
- zlib1.dll \
- libgcc_s_sjlj-1.dll \
- libstdc++-6.dll \
-; do
- $CP "`$WHICHDLL $DLL`" $INSTALLDIR/
-done
-
-$MKDIR $INSTALLDIR/etc/fonts
-$CAT > $INSTALLDIR/etc/fonts/fonts.conf <<EOF
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<!-- /etc/fonts/fonts.conf file to configure system font access -->
-<fontconfig>
-
-<!--
- DO NOT EDIT THIS FILE.
- IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
- LOCAL CHANGES BELONG IN 'local.conf'.
-
- The intent of this standard configuration file is to be adequate for
- most environments. If you have a reasonably normal environment and
- have found problems with this configuration, they are probably
- things that others will also want fixed. Please submit any
- problems to the fontconfig bugzilla system located at fontconfig.org
-
- Note that the normal 'make install' procedure for fontconfig is to
- replace any existing fonts.conf file with the new version. Place
- any local customizations in local.conf which this file references.
-
- Keith Packard
--->
-
-<!-- Font directory list -->
-
- <dir>WINDOWSFONTDIR</dir>
-
- <dir>~/.fonts</dir>
-
-<!--
- Accept deprecated 'mono' alias, replacing it with 'monospace'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>mono</string>
- </test>
- <edit name="family" mode="assign">
- <string>monospace</string>
- </edit>
- </match>
-
-<!--
- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-<!--
- Accept deprecated 'sans' alias, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-<!--
- Load local system customization file
--->
- <include ignore_missing="yes">conf.d</include>
-
-<!-- Font cache directory list -->
-
- <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>
- <cachedir>~/.fontconfig</cachedir>
-
- <config>
-<!--
- These are the default Unicode chars that are expected to be blank
- in fonts. All other blank chars are assumed to be broken and
- won't appear in the resulting charsets
- -->
- <blank>
- <int>0x0020</int> <!-- SPACE -->
- <int>0x00A0</int> <!-- NO-BREAK SPACE -->
- <int>0x00AD</int> <!-- SOFT HYPHEN -->
- <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
- <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
- <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
- <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
- <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
- <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
- <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
- <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
- <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
- <int>0x1680</int> <!-- OGHAM SPACE MARK -->
- <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
- <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
- <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
- <int>0x2000</int> <!-- EN QUAD -->
- <int>0x2001</int> <!-- EM QUAD -->
- <int>0x2002</int> <!-- EN SPACE -->
- <int>0x2003</int> <!-- EM SPACE -->
- <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
- <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
- <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
- <int>0x2007</int> <!-- FIGURE SPACE -->
- <int>0x2008</int> <!-- PUNCTUATION SPACE -->
- <int>0x2009</int> <!-- THIN SPACE -->
- <int>0x200A</int> <!-- HAIR SPACE -->
- <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
- <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
- <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
- <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
- <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
- <int>0x2028</int> <!-- LINE SEPARATOR -->
- <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
- <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
- <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
- <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
- <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
- <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
- <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
- <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
- <int>0x2060</int> <!-- WORD JOINER -->
- <int>0x2061</int> <!-- FUNCTION APPLICATION -->
- <int>0x2062</int> <!-- INVISIBLE TIMES -->
- <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
- <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
- <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
- <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
- <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
- <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
- <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
- <int>0x2800</int> <!-- BRAILLE PATTERN BLANK -->
- <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
- <int>0x3164</int> <!-- HANGUL FILLER -->
- <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
- <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
- <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
- <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
- <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
- </blank>
-<!--
- Rescan configuration every 30 seconds when FcFontSetList is called
- -->
- <rescan>
- <int>30</int>
- </rescan>
- </config>
-
-</fontconfig>
-EOF
+++ /dev/null
-#!/bin/sh
-
-set -ex
-
-: ${OTOOL:=otool}
-: ${CP:=cp}
-: ${INSTALLDIR:=.}
-: ${EXE:=ppc}
-: ${MACLIBDIR:=/sw/lib}
-: ${CAT:=cat}
-
-
-finkgetdeps()
-{
- otool -L "$1" | grep "$MACLIBDIR" | while read -r LIB STUFF; do
- [ -z "${LIB##*:}" ] && continue # first line
- [ -f "$INSTALLDIR/${LIB##*/}" ] && continue
- cp -vL "$LIB" "$INSTALLDIR"
- finkgetdeps "$LIB"
- done
-}
-
-
-finkgetdeps "$INSTALLDIR/radiant.$EXE"
-echo Warning: this only works if only ONE version of gtk-2.0 and pango is installed
-
-getlib()
-{
- LAST=
- for LIB in "$@"; do
- [ -f "$LIB" ] || continue
- LAST=$LIB
- done
- cp -L "$LAST" "$INSTALLDIR"
- finkgetdeps "$LAST"
-}
-
-getlib "$MACLIBDIR"/gtk-2.0/*/loaders/libpixbufloader-bmp.so "$MACLIBDIR"/gdk-pixbuf-2.0/*/loaders/libpixbufloader-bmp.so
-getlib "$MACLIBDIR"/pango/*/modules/pango-basic-fc.so
-getlib "$MACLIBDIR"/pango/*/modules/pango-basic-x.so
-
-#cp -L "$MACLIBDIR"/../etc/fonts/fonts.conf "$INSTALLDIR"
-#cp -L "$MACLIBDIR"/../etc/fonts/fonts.dtd "$INSTALLDIR"
-#cp -L "$MACLIBDIR"/../etc/gtk-2.0/gdk-pixbuf.loaders "$INSTALLDIR"
-#cp -L "$MACLIBDIR"/../etc/pango/pangorc "$INSTALLDIR"
-
-$CAT > "$INSTALLDIR/../netradiant.sh" <<EOF
-#!/bin/sh
-
-MY_DIRECTORY="\${0%/*}" # cut off the script name
-MY_DIRECTORY="\${MY_DIRECTORY%/*}" # cut off MacOS
-MY_DIRECTORY="\${MY_DIRECTORY%/*}" # cut off Contents
-
-export DYLD_LIBRARY_PATH="\$MY_DIRECTORY/Contents/MacOS/install"
-export PANGO_RC_FILE="\$MY_DIRECTORY/Contents/MacOS/install/pangorc"
-export GDK_PIXBUF_MODULE_FILE="\$MY_DIRECTORY/Contents/MacOS/install/gdk-pixbuf.loaders"
-export FONTCONFIG_FILE="\$MY_DIRECTORY/Contents/MacOS/install/fonts.conf"
-
-cd "\$MY_DIRECTORY/Contents/MacOS/install"
-if [ -x /usr/bin/open-x11 ]; then
- env LC_ALL="en_US.UTF-8" /usr/bin/open-x11 ./radiant.$EXE "$@" &
-else
- env LC_ALL="en_US.UTF-8" ./radiant.$EXE "$@" &
-fi
-EOF
-
-chmod 755 "$INSTALLDIR/../netradiant.sh"
-
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories("${CMAKE_SOURCE_DIR}/include")
-find_package(GTK2 REQUIRED)
-include_directories(${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
-find_package(GtkGLExt REQUIRED)
-include_directories(${GTKGL_INCLUDE_DIRS})
-
add_subdirectory(cmdlib)
add_subdirectory(container)
add_subdirectory(ddslib)
add_subdirectory(debugging)
+add_subdirectory(etclib)
+add_subdirectory(filematch)
add_subdirectory(generic)
add_subdirectory(gtkutil)
add_subdirectory(l_net)
-#add_subdirectory(math)
+add_subdirectory(math)
add_subdirectory(mathlib)
add_subdirectory(md5lib)
add_subdirectory(memory)
add_subdirectory(uilib)
add_subdirectory(xml)
-add_library(etclib
- etclib.c
- etclib.h
-)
-
-add_library(filematch
- filematch.c
- filematch.h
-)
-
add_library(libs
- archivelib.cpp
- archivelib.h
- bytebool.cpp
- bytebool.h
- bytestreamutils.cpp
- character.cpp
- character.h
- cmdlib.h
- convert.cpp
- convert.h
- ddslib.h
- dragplanes.cpp
- dragplanes.h
- eclasslib.cpp
- eclasslib.h
- entitylib.cpp
- entitylib.h
- entityxml.cpp
- entityxml.h
- filematch.c
- filematch.h
- fs_filesystem.cpp
- fs_filesystem.h
- fs_path.cpp
- fs_path.h
- imagelib.cpp
- imagelib.h
- instancelib.cpp
- instancelib.h
- maplib.cpp
- maplib.h
- mathlib.h
- md5lib.h
- moduleobservers.cpp
- moduleobservers.h
- picomodel.h
- pivot.cpp
- pivot.h
- render.cpp
- render.h
- scenelib.cpp
- scenelib.h
- selectionlib.cpp
- selectionlib.h
- shaderlib.cpp
- shaderlib.h
- str.cpp
- str.h
- stringio.cpp
- stringio.h
- texturelib.cpp
- texturelib.h
- transformlib.cpp
- transformlib.h
- traverselib.cpp
- traverselib.h
- typesystem.cpp
- typesystem.h
- undolib.cpp
- undolib.h
- uniquenames.cpp
- uniquenames.h
- versionlib.cpp
- versionlib.h
- bytestreamutils.h
- etclib.c
- etclib.h
-)
+ archivelib.h
+ bytebool.h
+ bytestreamutils.h
+ character.h
+ convert.h
+ dragplanes.h
+ eclasslib.h
+ entitylib.h
+ entityxml.h
+ fs_filesystem.h
+ fs_path.h
+ imagelib.h
+ instancelib.h
+ maplib.h
+ moduleobservers.h
+ picomodel/picomodel.h
+ pivot.h
+ render.h
+ scenelib.h
+ selectionlib.h
+ shaderlib.h
+ str.h
+ stringio.h
+ texturelib.h
+ transformlib.h
+ traverselib.h
+ typesystem.h
+ undolib.h
+ uniquenames.h
+ versionlib.h
+ )
+set_target_properties(libs PROPERTIES LINKER_LANGUAGE CXX)
+
+find_package(GLIB REQUIRED)
+target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS})
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "archivelib.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "bytebool.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "bytestreamutils.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "character.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//
-// start of shared cmdlib stuff
-//
-
-#ifndef __CMDLIB__
-#define __CMDLIB__
-
-#include <time.h>
-
-
-// TTimo started adding portability code:
-// return true if spawning was successful, false otherwise
-// on win32 we have a bCreateConsole flag to create a new console or run inside the current one
-//boolean Q_Exec(const char* pCmd, boolean bCreateConsole);
-// execute a system command:
-// cmd: the command to run
-// cmdline: the command line
-// NOTE TTimo following are win32 specific:
-// execdir: the directory to execute in
-// bCreateConsole: spawn a new console or not
-// return values;
-// if the spawn was fine
-// TODO TTimo add functionality to track the process until it dies
-
-bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole, bool waitfor );
-
-// some easy portability crap
-
-
-#define access_owner_read 0400
-#define access_owner_write 0200
-#define access_owner_execute 0100
-#define access_owner_rw_ 0600
-#define access_owner_r_x 0500
-#define access_owner__wx 0300
-#define access_owner_rwx 0700
-
-#define access_group_read 0040
-#define access_group_write 0020
-#define access_group_execute 0010
-#define access_group_rw_ 0060
-#define access_group_r_x 0050
-#define access_group__wx 0030
-#define access_group_rwx 0070
-
-#define access_others_read 0004
-#define access_others_write 0002
-#define access_others_execute 0001
-#define access_others_rw_ 0006
-#define access_others_r_x 0005
-#define access_others__wx 0003
-#define access_others_rwx 0007
-
-
-#define access_rwxrwxr_x ( access_owner_rwx | access_group_rwx | access_others_r_x )
-#define access_rwxrwxrwx ( access_owner_rwx | access_group_rwx | access_others_rwx )
-
-// Q_mkdir
-// returns true if succeeded in creating directory
-#ifdef WIN32
-#include <direct.h>
-inline bool Q_mkdir( const char* name ){
- return _mkdir( name ) != -1;
-}
-#else
-#include <sys/stat.h>
-inline bool Q_mkdir( const char* name ){
- return mkdir( name, access_rwxrwxr_x ) != -1;
-}
-#endif
-
-
-inline double Sys_DoubleTime( void ){
- return clock() / 1000.0;
-}
-
-
-
-#endif
+++ /dev/null
-*.dsp -m 'COPY' -k 'b'
-*.dsw -m 'COPY' -k 'b'
-*.scc -m 'COPY' -k 'b'
add_library(cmdlib
- cmdlib.cpp
-)
+ cmdlib.cpp cmdlib.h
+ )
// start of shared cmdlib stuff
//
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include <string.h>
#include <stdio.h>
--- /dev/null
+/*
+ Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+ For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+ This file is part of GtkRadiant.
+
+ GtkRadiant is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GtkRadiant is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GtkRadiant; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+//
+// start of shared cmdlib stuff
+//
+
+#ifndef __CMDLIB__
+#define __CMDLIB__
+
+#include <time.h>
+
+
+// TTimo started adding portability code:
+// return true if spawning was successful, false otherwise
+// on win32 we have a bCreateConsole flag to create a new console or run inside the current one
+//boolean Q_Exec(const char* pCmd, boolean bCreateConsole);
+// execute a system command:
+// cmd: the command to run
+// cmdline: the command line
+// NOTE TTimo following are win32 specific:
+// execdir: the directory to execute in
+// bCreateConsole: spawn a new console or not
+// return values;
+// if the spawn was fine
+// TODO TTimo add functionality to track the process until it dies
+
+bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole, bool waitfor );
+
+// some easy portability crap
+
+
+#define access_owner_read 0400
+#define access_owner_write 0200
+#define access_owner_execute 0100
+#define access_owner_rw_ 0600
+#define access_owner_r_x 0500
+#define access_owner__wx 0300
+#define access_owner_rwx 0700
+
+#define access_group_read 0040
+#define access_group_write 0020
+#define access_group_execute 0010
+#define access_group_rw_ 0060
+#define access_group_r_x 0050
+#define access_group__wx 0030
+#define access_group_rwx 0070
+
+#define access_others_read 0004
+#define access_others_write 0002
+#define access_others_execute 0001
+#define access_others_rw_ 0006
+#define access_others_r_x 0005
+#define access_others__wx 0003
+#define access_others_rwx 0007
+
+
+#define access_rwxrwxr_x ( access_owner_rwx | access_group_rwx | access_others_r_x )
+#define access_rwxrwxrwx ( access_owner_rwx | access_group_rwx | access_others_rwx )
+
+// Q_mkdir
+// returns true if succeeded in creating directory
+#ifdef WIN32
+#include <direct.h>
+inline bool Q_mkdir( const char* name ){
+ return _mkdir( name ) != -1;
+}
+#else
+#include <sys/stat.h>
+inline bool Q_mkdir( const char* name ){
+ return mkdir( name, access_rwxrwxr_x ) != -1;
+}
+#endif
+
+
+inline double Sys_DoubleTime( void ){
+ return clock() / 1000.0;
+}
+
+
+
+#endif
add_library(container
- array.cpp
- array.h
- cache.cpp
- cache.h
- container.cpp
- container.h
- hashfunc.cpp
- hashfunc.h
- hashtable.cpp
- hashtable.h
- stack.cpp
- stack.h
-)
+ array.cpp array.h
+ cache.h
+ container.h
+ hashfunc.h
+ hashtable.cpp hashtable.h
+ stack.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "cache.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "container.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "hashfunc.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stack.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "convert.h"
+++ /dev/null
-/* -----------------------------------------------------------------------------
-
- DDS Library
-
- Based on code from Nvidia's DDS example:
- http://www.nvidia.com/object/dxtc_decompression_code.html
-
- Copyright (c) 2003 Randy Reddig
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this list
- of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
- Neither the names of the copyright holders nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- ----------------------------------------------------------------------------- */
-
-
-
-/* marker */
-#ifndef DDSLIB_H
-#define DDSLIB_H
-
-
-
-/* dependencies */
-#include <stdio.h>
-#include <memory.h>
-
-
-
-/* c++ marker */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-
-/* dds definition */
-typedef enum
-{
- DDS_PF_ARGB8888,
- DDS_PF_DXT1,
- DDS_PF_DXT2,
- DDS_PF_DXT3,
- DDS_PF_DXT4,
- DDS_PF_DXT5,
- DDS_PF_UNKNOWN
-}
-ddsPF_t;
-
-
-/* 16bpp stuff */
-#define DDS_LOW_5 0x001F;
-#define DDS_MID_6 0x07E0;
-#define DDS_HIGH_5 0xF800;
-#define DDS_MID_555 0x03E0;
-#define DDS_HI_555 0x7C00;
-
-
-/* structures */
-typedef struct ddsColorKey_s
-{
- unsigned int colorSpaceLowValue;
- unsigned int colorSpaceHighValue;
-}
-ddsColorKey_t;
-
-
-typedef struct ddsCaps_s
-{
- unsigned int caps1;
- unsigned int caps2;
- unsigned int caps3;
- unsigned int caps4;
-}
-ddsCaps_t;
-
-
-typedef struct ddsMultiSampleCaps_s
-{
- unsigned short flipMSTypes;
- unsigned short bltMSTypes;
-}
-ddsMultiSampleCaps_t;
-
-
-typedef struct ddsPixelFormat_s
-{
- unsigned int size;
- unsigned int flags;
- unsigned int fourCC;
- union
- {
- unsigned int rgbBitCount;
- unsigned int yuvBitCount;
- unsigned int zBufferBitDepth;
- unsigned int alphaBitDepth;
- unsigned int luminanceBitCount;
- unsigned int bumpBitCount;
- unsigned int privateFormatBitCount;
- };
- union
- {
- unsigned int rBitMask;
- unsigned int yBitMask;
- unsigned int stencilBitDepth;
- unsigned int luminanceBitMask;
- unsigned int bumpDuBitMask;
- unsigned int operations;
- };
- union
- {
- unsigned int gBitMask;
- unsigned int uBitMask;
- unsigned int zBitMask;
- unsigned int bumpDvBitMask;
- ddsMultiSampleCaps_t multiSampleCaps;
- };
- union
- {
- unsigned int bBitMask;
- unsigned int vBitMask;
- unsigned int stencilBitMask;
- unsigned int bumpLuminanceBitMask;
- };
- union
- {
- unsigned int rgbAlphaBitMask;
- unsigned int yuvAlphaBitMask;
- unsigned int luminanceAlphaBitMask;
- unsigned int rgbZBitMask;
- unsigned int yuvZBitMask;
- };
-}
-ddsPixelFormat_t;
-
-
-typedef struct ddsBuffer_s
-{
- /* magic: 'dds ' */
- char magic[ 4 ];
-
- /* directdraw surface */
- unsigned int size;
- unsigned int flags;
- unsigned int height;
- unsigned int width;
- union
- {
- int pitch;
- unsigned int linearSize;
- };
- unsigned int backBufferCount;
- union
- {
- unsigned int mipMapCount;
- unsigned int refreshRate;
- unsigned int srcVBHandle;
- };
- unsigned int alphaBitDepth;
- unsigned int reserved;
- void *surface;
- union
- {
- ddsColorKey_t ckDestOverlay;
- unsigned int emptyFaceColor;
- };
- ddsColorKey_t ckDestBlt;
- ddsColorKey_t ckSrcOverlay;
- ddsColorKey_t ckSrcBlt;
- union
- {
- ddsPixelFormat_t pixelFormat;
- unsigned int fvf;
- };
- ddsCaps_t ddsCaps;
- unsigned int textureStage;
-
- /* data (Varying size) */
- unsigned char data[ 4 ];
-}
-ddsBuffer_t;
-
-
-typedef struct ddsColorBlock_s
-{
- unsigned short colors[ 2 ];
- unsigned char row[ 4 ];
-}
-ddsColorBlock_t;
-
-
-typedef struct ddsAlphaBlockExplicit_s
-{
- unsigned short row[ 4 ];
-}
-ddsAlphaBlockExplicit_t;
-
-
-typedef struct ddsAlphaBlock3BitLinear_s
-{
- unsigned char alpha0;
- unsigned char alpha1;
- unsigned char stuff[ 6 ];
-}
-ddsAlphaBlock3BitLinear_t;
-
-
-typedef struct ddsColor_s
-{
- unsigned char r, g, b, a;
-}
-ddsColor_t;
-
-
-
-/* public functions */
-int DDSGetInfo( ddsBuffer_t *dds, int *width, int *height, ddsPF_t *pf );
-int DDSDecompress( ddsBuffer_t *dds, unsigned char *pixels );
-
-
-
-/* end marker */
-#ifdef __cplusplus
-}
-#endif
-
-#endif
add_library(ddslib
- ddslib.c
-)
+ ddslib.c ddslib.h
+ )
--- /dev/null
+/* -----------------------------------------------------------------------------
+
+ DDS Library
+
+ Based on code from Nvidia's DDS example:
+ http://www.nvidia.com/object/dxtc_decompression_code.html
+
+ Copyright (c) 2003 Randy Reddig
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+ Neither the names of the copyright holders nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ----------------------------------------------------------------------------- */
+
+
+
+/* marker */
+#ifndef DDSLIB_H
+#define DDSLIB_H
+
+
+
+/* dependencies */
+#include <stdio.h>
+#include <memory.h>
+
+
+
+/* c++ marker */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+
+/* dds definition */
+typedef enum
+{
+ DDS_PF_ARGB8888,
+ DDS_PF_DXT1,
+ DDS_PF_DXT2,
+ DDS_PF_DXT3,
+ DDS_PF_DXT4,
+ DDS_PF_DXT5,
+ DDS_PF_UNKNOWN
+}
+ddsPF_t;
+
+
+/* 16bpp stuff */
+#define DDS_LOW_5 0x001F;
+#define DDS_MID_6 0x07E0;
+#define DDS_HIGH_5 0xF800;
+#define DDS_MID_555 0x03E0;
+#define DDS_HI_555 0x7C00;
+
+
+/* structures */
+typedef struct ddsColorKey_s
+{
+ unsigned int colorSpaceLowValue;
+ unsigned int colorSpaceHighValue;
+}
+ddsColorKey_t;
+
+
+typedef struct ddsCaps_s
+{
+ unsigned int caps1;
+ unsigned int caps2;
+ unsigned int caps3;
+ unsigned int caps4;
+}
+ddsCaps_t;
+
+
+typedef struct ddsMultiSampleCaps_s
+{
+ unsigned short flipMSTypes;
+ unsigned short bltMSTypes;
+}
+ddsMultiSampleCaps_t;
+
+
+typedef struct ddsPixelFormat_s
+{
+ unsigned int size;
+ unsigned int flags;
+ unsigned int fourCC;
+ union
+ {
+ unsigned int rgbBitCount;
+ unsigned int yuvBitCount;
+ unsigned int zBufferBitDepth;
+ unsigned int alphaBitDepth;
+ unsigned int luminanceBitCount;
+ unsigned int bumpBitCount;
+ unsigned int privateFormatBitCount;
+ };
+ union
+ {
+ unsigned int rBitMask;
+ unsigned int yBitMask;
+ unsigned int stencilBitDepth;
+ unsigned int luminanceBitMask;
+ unsigned int bumpDuBitMask;
+ unsigned int operations;
+ };
+ union
+ {
+ unsigned int gBitMask;
+ unsigned int uBitMask;
+ unsigned int zBitMask;
+ unsigned int bumpDvBitMask;
+ ddsMultiSampleCaps_t multiSampleCaps;
+ };
+ union
+ {
+ unsigned int bBitMask;
+ unsigned int vBitMask;
+ unsigned int stencilBitMask;
+ unsigned int bumpLuminanceBitMask;
+ };
+ union
+ {
+ unsigned int rgbAlphaBitMask;
+ unsigned int yuvAlphaBitMask;
+ unsigned int luminanceAlphaBitMask;
+ unsigned int rgbZBitMask;
+ unsigned int yuvZBitMask;
+ };
+}
+ddsPixelFormat_t;
+
+
+typedef struct ddsBuffer_s
+{
+ /* magic: 'dds ' */
+ char magic[ 4 ];
+
+ /* directdraw surface */
+ unsigned int size;
+ unsigned int flags;
+ unsigned int height;
+ unsigned int width;
+ union
+ {
+ int pitch;
+ unsigned int linearSize;
+ };
+ unsigned int backBufferCount;
+ union
+ {
+ unsigned int mipMapCount;
+ unsigned int refreshRate;
+ unsigned int srcVBHandle;
+ };
+ unsigned int alphaBitDepth;
+ unsigned int reserved;
+ void *surface;
+ union
+ {
+ ddsColorKey_t ckDestOverlay;
+ unsigned int emptyFaceColor;
+ };
+ ddsColorKey_t ckDestBlt;
+ ddsColorKey_t ckSrcOverlay;
+ ddsColorKey_t ckSrcBlt;
+ union
+ {
+ ddsPixelFormat_t pixelFormat;
+ unsigned int fvf;
+ };
+ ddsCaps_t ddsCaps;
+ unsigned int textureStage;
+
+ /* data (Varying size) */
+ unsigned char data[ 4 ];
+}
+ddsBuffer_t;
+
+
+typedef struct ddsColorBlock_s
+{
+ unsigned short colors[ 2 ];
+ unsigned char row[ 4 ];
+}
+ddsColorBlock_t;
+
+
+typedef struct ddsAlphaBlockExplicit_s
+{
+ unsigned short row[ 4 ];
+}
+ddsAlphaBlockExplicit_t;
+
+
+typedef struct ddsAlphaBlock3BitLinear_s
+{
+ unsigned char alpha0;
+ unsigned char alpha1;
+ unsigned char stuff[ 6 ];
+}
+ddsAlphaBlock3BitLinear_t;
+
+
+typedef struct ddsColor_s
+{
+ unsigned char r, g, b, a;
+}
+ddsColor_t;
+
+
+
+/* public functions */
+int DDSGetInfo( ddsBuffer_t *dds, int *width, int *height, ddsPF_t *pf );
+int DDSDecompress( ddsBuffer_t *dds, unsigned char *pixels );
+
+
+
+/* end marker */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
add_library(debugging
- debugging.cpp
- debugging.h
-)
+ debugging.cpp debugging.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "dragplanes.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "eclasslib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "entitylib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "entityxml.h"
+++ /dev/null
-// Copyright 2009 Google Inc.
-//
-// Based on the code from Android ETC1Util.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "etclib.h"
-
-static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){
- int baseX = 0, baseY = 0;
- const int modifierTable[] = {
- 2, 8, -2, -8,
- 5, 17, -5, -17,
- 9, 29, -9, -29,
- 13, 42, -13, -42,
- 18, 60, -18, -60,
- 24, 80, -24, -80,
- 33, 106, -33, -106,
- 47, 183, -47, -183
- };
- const int *table = modifierTable + tableIndex * 4;
- int i;
-
- if ( second ) {
- if ( flipped ) {
- baseY = 2;
- }
- else {
- baseX = 2;
- }
- }
-
- for ( i = 0; i < 8; i++ )
- {
- int x, y, k, delta;
- int qr, qg, qb;
- byte *q;
-
- if ( flipped ) {
- x = baseX + ( i >> 1 );
- y = baseY + ( i & 1 );
- }
- else {
- x = baseX + ( i >> 2 );
- y = baseY + ( i & 3 );
- }
- k = y + ( x * 4 );
- delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )];
-
- qr = r + delta;
- qg = g + delta;
- qb = b + delta;
- if ( outRGBA ) {
- q = out + 4 * ( x + 4 * y );
- }
- else {
- q = out + 3 * ( x + 4 * y );
- }
- *( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 );
- *( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 );
- *( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 );
- if ( outRGBA ) {
- *( q++ ) = 255;
- }
- }
-}
-
-void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){
- unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3];
- unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7];
- int r1, r2, g1, g2, b1, b2;
- qboolean flipped = ( ( high & 1 ) != 0 );
-
- if ( high & 2 ) {
- int rBase, gBase, bBase;
- const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 };
-
- rBase = ( high >> 27 ) & 31;
- r1 = ( rBase << 3 ) | ( rBase >> 2 );
- rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31;
- r2 = ( rBase << 3 ) | ( rBase >> 2 );
-
- gBase = ( high >> 19 ) & 31;
- g1 = ( gBase << 3 ) | ( gBase >> 2 );
- gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31;
- g2 = ( gBase << 3 ) | ( gBase >> 2 );
-
- bBase = ( high >> 11 ) & 31;
- b1 = ( bBase << 3 ) | ( bBase >> 2 );
- bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31;
- b2 = ( bBase << 3 ) | ( bBase >> 2 );
- }
- else {
- r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf );
- r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf );
- g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf );
- g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf );
- b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf );
- b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf );
- }
-
- ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped );
- ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped );
-}
+++ /dev/null
-// Copyright 2009 Google Inc.
-//
-// Based on the code from Android ETC1Util.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef INCLUDED_ETCLIB_H
-#define INCLUDED_ETCLIB_H
-
-#include "bytebool.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
--- /dev/null
+add_library(etclib
+ etclib.c etclib.h
+ )
--- /dev/null
+// Copyright 2009 Google Inc.
+//
+// Based on the code from Android ETC1Util.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "etclib.h"
+
+static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){
+ int baseX = 0, baseY = 0;
+ const int modifierTable[] = {
+ 2, 8, -2, -8,
+ 5, 17, -5, -17,
+ 9, 29, -9, -29,
+ 13, 42, -13, -42,
+ 18, 60, -18, -60,
+ 24, 80, -24, -80,
+ 33, 106, -33, -106,
+ 47, 183, -47, -183
+ };
+ const int *table = modifierTable + tableIndex * 4;
+ int i;
+
+ if ( second ) {
+ if ( flipped ) {
+ baseY = 2;
+ }
+ else {
+ baseX = 2;
+ }
+ }
+
+ for ( i = 0; i < 8; i++ )
+ {
+ int x, y, k, delta;
+ int qr, qg, qb;
+ byte *q;
+
+ if ( flipped ) {
+ x = baseX + ( i >> 1 );
+ y = baseY + ( i & 1 );
+ }
+ else {
+ x = baseX + ( i >> 2 );
+ y = baseY + ( i & 3 );
+ }
+ k = y + ( x * 4 );
+ delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )];
+
+ qr = r + delta;
+ qg = g + delta;
+ qb = b + delta;
+ if ( outRGBA ) {
+ q = out + 4 * ( x + 4 * y );
+ }
+ else {
+ q = out + 3 * ( x + 4 * y );
+ }
+ *( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 );
+ *( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 );
+ *( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 );
+ if ( outRGBA ) {
+ *( q++ ) = 255;
+ }
+ }
+}
+
+void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){
+ unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3];
+ unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7];
+ int r1, r2, g1, g2, b1, b2;
+ qboolean flipped = ( ( high & 1 ) != 0 );
+
+ if ( high & 2 ) {
+ int rBase, gBase, bBase;
+ const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 };
+
+ rBase = ( high >> 27 ) & 31;
+ r1 = ( rBase << 3 ) | ( rBase >> 2 );
+ rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31;
+ r2 = ( rBase << 3 ) | ( rBase >> 2 );
+
+ gBase = ( high >> 19 ) & 31;
+ g1 = ( gBase << 3 ) | ( gBase >> 2 );
+ gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31;
+ g2 = ( gBase << 3 ) | ( gBase >> 2 );
+
+ bBase = ( high >> 11 ) & 31;
+ b1 = ( bBase << 3 ) | ( bBase >> 2 );
+ bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31;
+ b2 = ( bBase << 3 ) | ( bBase >> 2 );
+ }
+ else {
+ r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf );
+ r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf );
+ g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf );
+ g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf );
+ b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf );
+ b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf );
+ }
+
+ ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped );
+ ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped );
+}
--- /dev/null
+// Copyright 2009 Google Inc.
+//
+// Based on the code from Android ETC1Util.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef INCLUDED_ETCLIB_H
+#define INCLUDED_ETCLIB_H
+
+#include "bytebool.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+++ /dev/null
-#include <string.h>
-#include "filematch.h"
-
-// LordHavoc: some portable directory listing code I wrote for lmp2pcx, now used in darkplaces to load id1/*.pak and such...
-
-int matchpattern( const char *in, const char *pattern, int caseinsensitive ){
- return matchpattern_with_separator( in, pattern, caseinsensitive, "/\\:", 0 );
-}
-
-// wildcard_least_one: if true * matches 1 or more characters
-// if false * matches 0 or more characters
-int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one ){
- int c1, c2;
- while ( *pattern )
- {
- switch ( *pattern )
- {
- case 0:
- return 1; // end of pattern
- case '?': // match any single character
- if ( *in == 0 || strchr( separators, *in ) ) {
- return 0; // no match
- }
- in++;
- pattern++;
- break;
- case '*': // match anything until following string
- if ( wildcard_least_one ) {
- if ( *in == 0 || strchr( separators, *in ) ) {
- return 0; // no match
- }
- in++;
- }
- pattern++;
- while ( *in )
- {
- if ( strchr( separators, *in ) ) {
- break;
- }
- // see if pattern matches at this offset
- if ( matchpattern_with_separator( in, pattern, caseinsensitive, separators, wildcard_least_one ) ) {
- return 1;
- }
- // nope, advance to next offset
- in++;
- }
- break;
- default:
- if ( *in != *pattern ) {
- if ( !caseinsensitive ) {
- return 0; // no match
- }
- c1 = *in;
- if ( c1 >= 'A' && c1 <= 'Z' ) {
- c1 += 'a' - 'A';
- }
- c2 = *pattern;
- if ( c2 >= 'A' && c2 <= 'Z' ) {
- c2 += 'a' - 'A';
- }
- if ( c1 != c2 ) {
- return 0; // no match
- }
- }
- in++;
- pattern++;
- break;
- }
- }
- if ( *in ) {
- return 0; // reached end of pattern but not end of input
- }
- return 1; // success
-}
+++ /dev/null
-#if !defined( INCLUDED_FILEMATCH_H )
-#define INCLUDED_FILEMATCH_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int matchpattern( const char *in, const char *pattern, int caseinsensitive );
-int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
--- /dev/null
+add_library(filematch
+ filematch.c filematch.h
+ )
--- /dev/null
+#include <string.h>
+#include "filematch.h"
+
+// LordHavoc: some portable directory listing code I wrote for lmp2pcx, now used in darkplaces to load id1/*.pak and such...
+
+int matchpattern( const char *in, const char *pattern, int caseinsensitive ){
+ return matchpattern_with_separator( in, pattern, caseinsensitive, "/\\:", 0 );
+}
+
+// wildcard_least_one: if true * matches 1 or more characters
+// if false * matches 0 or more characters
+int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one ){
+ int c1, c2;
+ while ( *pattern )
+ {
+ switch ( *pattern )
+ {
+ case 0:
+ return 1; // end of pattern
+ case '?': // match any single character
+ if ( *in == 0 || strchr( separators, *in ) ) {
+ return 0; // no match
+ }
+ in++;
+ pattern++;
+ break;
+ case '*': // match anything until following string
+ if ( wildcard_least_one ) {
+ if ( *in == 0 || strchr( separators, *in ) ) {
+ return 0; // no match
+ }
+ in++;
+ }
+ pattern++;
+ while ( *in )
+ {
+ if ( strchr( separators, *in ) ) {
+ break;
+ }
+ // see if pattern matches at this offset
+ if ( matchpattern_with_separator( in, pattern, caseinsensitive, separators, wildcard_least_one ) ) {
+ return 1;
+ }
+ // nope, advance to next offset
+ in++;
+ }
+ break;
+ default:
+ if ( *in != *pattern ) {
+ if ( !caseinsensitive ) {
+ return 0; // no match
+ }
+ c1 = *in;
+ if ( c1 >= 'A' && c1 <= 'Z' ) {
+ c1 += 'a' - 'A';
+ }
+ c2 = *pattern;
+ if ( c2 >= 'A' && c2 <= 'Z' ) {
+ c2 += 'a' - 'A';
+ }
+ if ( c1 != c2 ) {
+ return 0; // no match
+ }
+ }
+ in++;
+ pattern++;
+ break;
+ }
+ }
+ if ( *in ) {
+ return 0; // reached end of pattern but not end of input
+ }
+ return 1; // success
+}
--- /dev/null
+#if !defined( INCLUDED_FILEMATCH_H )
+#define INCLUDED_FILEMATCH_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int matchpattern( const char *in, const char *pattern, int caseinsensitive );
+int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "fs_filesystem.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "fs_path.h"
add_library(generic
- arrayrange.cpp
- arrayrange.h
- bitfield.cpp
- bitfield.h
- callback.cpp
- callback.h
- callbackfwd.cpp
- callbackfwd.h
- constant.cpp
- constant.h
- enumeration.cpp
- enumeration.h
- functional.cpp
- functional.h
- object.cpp
- object.h
- reference.cpp
- reference.h
- referencecounted.cpp
- referencecounted.h
- static.cpp
- static.h
- vector.cpp
- vector.h
-)
+ arrayrange.h
+ bitfield.h
+ callback.cpp callback.h
+ callbackfwd.h
+ constant.cpp constant.h
+ enumeration.h
+ functional.h
+ object.cpp object.h
+ reference.h
+ referencecounted.h
+ static.cpp static.h
+ vector.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "arrayrange.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "bitfield.h"
+++ /dev/null
-
-#include "callbackfwd.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "enumeration.h"
+++ /dev/null
-
-#include "functional.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "reference.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "referencecounted.h"
+++ /dev/null
-
-#include "vector.h"
add_library(gtkutil
- accelerator.cpp
- accelerator.h
- button.cpp
- button.h
- clipboard.cpp
- clipboard.h
- closure.cpp
- closure.h
- container.cpp
- container.h
- cursor.cpp
- cursor.h
- dialog.cpp
- dialog.h
- entry.cpp
- entry.h
- filechooser.cpp
- filechooser.h
- frame.cpp
- frame.h
- glfont.cpp
- glfont.h
- glwidget.cpp
- glwidget.h
- idledraw.cpp
- idledraw.h
- image.cpp
- image.h
- menu.cpp
- menu.h
- messagebox.cpp
- messagebox.h
- nonmodal.cpp
- nonmodal.h
- paned.cpp
- paned.h
- pointer.cpp
- pointer.h
- toolbar.cpp
- toolbar.h
- widget.cpp
- widget.h
- window.cpp
- window.h
- xorrectangle.cpp
- xorrectangle.h
-)
-target_link_libraries(gtkutil ${GTK2_PANGOFT2_LIBRARY})
+ accelerator.cpp accelerator.h
+ button.cpp button.h
+ clipboard.cpp clipboard.h
+ closure.h
+ container.h
+ cursor.cpp cursor.h
+ dialog.cpp dialog.h
+ entry.h
+ filechooser.cpp filechooser.h
+ frame.cpp frame.h
+ glfont.cpp glfont.h
+ glwidget.cpp glwidget.h
+ idledraw.h
+ image.cpp image.h
+ menu.cpp menu.h
+ messagebox.cpp messagebox.h
+ nonmodal.h
+ paned.cpp paned.h
+ pointer.h
+ toolbar.cpp toolbar.h
+ widget.h
+ window.cpp window.h
+ xorrectangle.h
+ )
+
+find_package(GTK2 REQUIRED)
+target_include_directories(gtkutil PRIVATE ${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
+
+find_package(GtkGLExt REQUIRED)
+target_include_directories(gtkutil PRIVATE ${GTKGL_INCLUDE_DIRS})
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "closure.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "container.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "entry.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "idledraw.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "nonmodal.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pointer.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "widget.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "xorrectangle.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "imagelib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "instancelib.h"
set(L_NETLIST
- l_net.c
- l_net.h
-)
-if(WIN32)
- set(L_NETLIST ${L_NETLIST} l_net_wins.c l_net_wins.h)
-else()
- set(L_NETLIST ${L_NETLIST} l_net_berkley.c)
-endif()
+ l_net.c l_net.h
+ )
+if (WIN32)
+ list(APPEND L_NETLIST l_net_wins.c l_net_wins.h)
+else ()
+ list(APPEND L_NETLIST l_net_berkley.c)
+endif ()
+
add_library(l_net ${L_NETLIST})
-if(WIN32)
+
+if (WIN32)
target_link_libraries(l_net ws2_32)
-endif()
+endif ()
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "maplib.h"
add_library(math
- aabb.cpp
- aabb.h
- curve.cpp
- curve.h
- expression.cpp
- expression.h
- frustum.cpp
- frustum.h
- line.cpp
- line.h
- matrix.cpp
- matrix.h
- pi.cpp
- pi.h
- plane.cpp
- plane.h
- quaternion.cpp
- quaternion.h
- vector.cpp
- vector.h
-)
+ aabb.h
+ curve.h
+# expression.cpp expression.h
+ frustum.h
+ line.h
+ matrix.h
+ pi.h
+ plane.h
+ quaternion.h
+ vector.h
+ )
+set_target_properties(math PROPERTIES LINKER_LANGUAGE CXX)
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "aabb.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "curve.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "frustum.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "line.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "matrix.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pi.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "plane.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "quaternion.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "vector.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MATHLIB__
-#define __MATHLIB__
-
-// mathlib.h
-#include <math.h>
-#include <float.h>
-
-#ifdef __cplusplus
-
-// start declarations of functions defined in C library.
-extern "C"
-{
-
-#endif
-
-#include "bytebool.h"
-
-typedef float vec_t;
-typedef vec_t vec3_t[3];
-typedef vec_t vec5_t[5];
-typedef vec_t vec4_t[4];
-
-// Smallest positive value for vec_t such that 1.0 + VEC_SMALLEST_EPSILON_AROUND_ONE != 1.0.
-// In the case of 32 bit floats (which is almost certainly the case), it's 0.00000011921.
-// Don't forget that your epsilons should depend on the possible range of values,
-// because for example adding VEC_SMALLEST_EPSILON_AROUND_ONE to 1024.0 will have no effect.
-#define VEC_SMALLEST_EPSILON_AROUND_ONE FLT_EPSILON
-
-#define SIDE_FRONT 0
-#define SIDE_ON 2
-#define SIDE_BACK 1
-#define SIDE_CROSS -2
-
-// plane types are used to speed some tests
-// 0-2 are axial planes
-#define PLANE_X 0
-#define PLANE_Y 1
-#define PLANE_Z 2
-#define PLANE_NON_AXIAL 3
-
-#define Q_PI 3.14159265358979323846f
-
-extern const vec3_t vec3_origin;
-
-extern const vec3_t g_vec3_axis_x;
-extern const vec3_t g_vec3_axis_y;
-extern const vec3_t g_vec3_axis_z;
-
-#define EQUAL_EPSILON 0.001
-
-#define DotProduct( x,y ) ( ( x )[0] * ( y )[0] + ( x )[1] * ( y )[1] + ( x )[2] * ( y )[2] )
-#define VectorSubtract( a,b,c ) ( ( c )[0] = ( a )[0] - ( b )[0],( c )[1] = ( a )[1] - ( b )[1],( c )[2] = ( a )[2] - ( b )[2] )
-#define VectorAdd( a,b,c ) ( ( c )[0] = ( a )[0] + ( b )[0],( c )[1] = ( a )[1] + ( b )[1],( c )[2] = ( a )[2] + ( b )[2] )
-#define VectorIncrement( a,b ) ( ( b )[0] += ( a )[0],( b )[1] += ( a )[1],( b )[2] += ( a )[2] )
-#define VectorCopy( a,b ) ( ( b )[0] = ( a )[0],( b )[1] = ( a )[1],( b )[2] = ( a )[2] )
-#define VectorSet( v, a, b, c ) ( ( v )[0] = ( a ),( v )[1] = ( b ),( v )[2] = ( c ) )
-#define VectorScale( a,b,c ) ( ( c )[0] = ( b ) * ( a )[0],( c )[1] = ( b ) * ( a )[1],( c )[2] = ( b ) * ( a )[2] )
-#define VectorMid( a,b,c ) ( ( c )[0] = ( ( a )[0] + ( b )[0] ) * 0.5f,( c )[1] = ( ( a )[1] + ( b )[1] ) * 0.5f,( c )[2] = ( ( a )[2] + ( b )[2] ) * 0.5f )
-#define VectorNegate( a,b ) ( ( b )[0] = -( a )[0],( b )[1] = -( a )[1],( b )[2] = -( a )[2] )
-#define CrossProduct( a,b,c ) ( ( c )[0] = ( a )[1] * ( b )[2] - ( a )[2] * ( b )[1],( c )[1] = ( a )[2] * ( b )[0] - ( a )[0] * ( b )[2],( c )[2] = ( a )[0] * ( b )[1] - ( a )[1] * ( b )[0] )
-#define VectorClear( x ) ( ( x )[0] = ( x )[1] = ( x )[2] = 0 )
-
-#define FLOAT_SNAP( f,snap ) ( (float)( floor( ( f ) / ( snap ) + 0.5 ) * ( snap ) ) )
-#define FLOAT_TO_INTEGER( f ) ( (float)( floor( ( f ) + 0.5 ) ) )
-
-#define RGBTOGRAY( x ) ( (float)( ( x )[0] ) * 0.2989f + (float)( ( x )[1] ) * 0.5870f + (float)( ( x )[2] ) * 0.1140f )
-
-#define Q_rint( in ) ( (vec_t)floor( in + 0.5 ) )
-
-qboolean VectorCompare( const vec3_t v1, const vec3_t v2 );
-
-qboolean VectorIsOnAxis( vec3_t v );
-qboolean VectorIsOnAxialPlane( vec3_t v );
-
-vec_t VectorLength( const vec3_t v );
-
-void VectorMA( const vec3_t va, vec_t scale, const vec3_t vb, vec3_t vc );
-
-void _CrossProduct( vec3_t v1, vec3_t v2, vec3_t cross );
-// I need this define in order to test some of the regression tests from time to time.
-// This define affect the precision of VectorNormalize() function only.
-#define MATHLIB_VECTOR_NORMALIZE_PRECISION_FIX 1
-vec_t VectorNormalize( const vec3_t in, vec3_t out );
-vec_t ColorNormalize( const vec3_t in, vec3_t out );
-void VectorInverse( vec3_t v );
-void VectorPolar( vec3_t v, float radius, float theta, float phi );
-
-// default snapping, to 1
-void VectorSnap( vec3_t v );
-
-// integer snapping
-void VectorISnap( vec3_t point, int snap );
-
-// Gef: added snap to float for sub-integer grid sizes
-// TTimo: we still use the int version of VectorSnap when possible
-// to avoid potential rounding issues
-// TTimo: renaming to VectorFSnap for C implementation
-void VectorFSnap( vec3_t point, float snap );
-
-// NOTE: added these from Ritual's Q3Radiant
-void ClearBounds( vec3_t mins, vec3_t maxs );
-void AddPointToBounds( vec3_t v, vec3_t mins, vec3_t maxs );
-
-
-#define PITCH 0 // up / down
-#define YAW 1 // left / right
-#define ROLL 2 // fall over
-
-void AngleVectors( vec3_t angles, vec3_t forward, vec3_t right, vec3_t up );
-void VectorToAngles( vec3_t vec, vec3_t angles );
-
-#define ZERO_EPSILON 1.0E-6
-#define RAD2DEGMULT 57.29577951308232f
-#define DEG2RADMULT 0.01745329251994329f
-#define RAD2DEG( a ) ( ( a ) * RAD2DEGMULT )
-#define DEG2RAD( a ) ( ( a ) * DEG2RADMULT )
-
-void VectorRotate( vec3_t vIn, vec3_t vRotation, vec3_t out );
-void VectorRotateOrigin( vec3_t vIn, vec3_t vRotation, vec3_t vOrigin, vec3_t out );
-
-// some function merged from tools mathlib code
-
-qboolean PlaneFromPoints( vec4_t plane, const vec3_t a, const vec3_t b, const vec3_t c );
-void NormalToLatLong( const vec3_t normal, byte bytes[2] );
-int PlaneTypeForNormal( vec3_t normal );
-void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees );
-
-
-/*!
- \todo
- FIXME test calls such as intersect tests should be named test_
- */
-
-typedef vec_t m3x3_t[9];
-/*!NOTE
- m4x4 looks like this..
-
- x y z
- x axis ( 0 1 2)
- y axis ( 4 5 6)
- z axis ( 8 9 10)
- translation (12 13 14)
- scale ( 0 5 10)
- */
-typedef vec_t m4x4_t[16];
-
-#define M4X4_INDEX( m,row,col ) ( m[( col << 2 ) + row] )
-
-typedef enum { eXYZ, eYZX, eZXY, eXZY, eYXZ, eZYX } eulerOrder_t;
-
-#define CLIP_PASS 0x00 // 000000
-#define CLIP_LT_X 0x01 // 000001
-#define CLIP_GT_X 0x02 // 000010
-#define CLIP_LT_Y 0x04 // 000100
-#define CLIP_GT_Y 0x08 // 001000
-#define CLIP_LT_Z 0x10 // 010000
-#define CLIP_GT_Z 0x20 // 100000
-#define CLIP_FAIL 0x3F // 111111
-typedef unsigned char clipmask_t;
-
-extern const m4x4_t g_m4x4_identity;
-
-#define M4X4_COPY( dst,src ) ( \
- ( dst )[0] = ( src )[0], \
- ( dst )[1] = ( src )[1], \
- ( dst )[2] = ( src )[2], \
- ( dst )[3] = ( src )[3], \
- ( dst )[4] = ( src )[4], \
- ( dst )[5] = ( src )[5], \
- ( dst )[6] = ( src )[6], \
- ( dst )[7] = ( src )[7], \
- ( dst )[8] = ( src )[8], \
- ( dst )[9] = ( src )[9], \
- ( dst )[10] = ( src )[10], \
- ( dst )[11] = ( src )[11], \
- ( dst )[12] = ( src )[12], \
- ( dst )[13] = ( src )[13], \
- ( dst )[14] = ( src )[14], \
- ( dst )[15] = ( src )[15] )
-
-typedef enum
-{
- eRightHanded = 0,
- eLeftHanded = 1,
-}
-m4x4Handedness_t;
-
-m4x4Handedness_t m4x4_handedness( const m4x4_t matrix );
-
-/*! assign other m4x4 to this m4x4 */
-void m4x4_assign( m4x4_t matrix, const m4x4_t other );
-
-// constructors
-/*! create m4x4 as identity matrix */
-void m4x4_identity( m4x4_t matrix );
-/*! create m4x4 as a translation matrix, for a translation vec3 */
-void m4x4_translation_for_vec3( m4x4_t matrix, const vec3_t translation );
-/*! create m4x4 as a rotation matrix, for an euler angles (degrees) vec3 */
-void m4x4_rotation_for_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order );
-/*! create m4x4 as a scaling matrix, for a scale vec3 */
-void m4x4_scale_for_vec3( m4x4_t matrix, const vec3_t scale );
-/*! create m4x4 as a rotation matrix, for a quaternion vec4 */
-void m4x4_rotation_for_quat( m4x4_t matrix, const vec4_t rotation );
-/*! create m4x4 as a rotation matrix, for an axis vec3 and an angle (radians) */
-void m4x4_rotation_for_axisangle( m4x4_t matrix, const vec3_t axis, double angle );
-/*! generate a perspective matrix by specifying the view frustum */
-void m4x4_frustum( m4x4_t matrix, vec_t left, vec_t right, vec_t bottom, vec_t top, vec_t nearval, vec_t farval );
-
-// a valid m4x4 to access is always first argument
-/*! extract translation vec3 from matrix */
-void m4x4_get_translation_vec3( const m4x4_t matrix, vec3_t translation );
-/*! extract euler rotation angles from a rotation-only matrix */
-void m4x4_get_rotation_vec3( const m4x4_t matrix, vec3_t euler, eulerOrder_t order );
-/*! extract scale vec3 from matrix */
-void m4x4_get_scale_vec3( const m4x4_t matrix, vec3_t scale );
-/*! extract translation/euler/scale from an orthogonal matrix. NOTE: requires right-handed axis-base */
-void m4x4_get_transform_vec3( const m4x4_t matrix, vec3_t translation, vec3_t euler, eulerOrder_t order, vec3_t scale );
-
-// a valid m4x4 to be modified is always first argument
-/*! translate m4x4 by a translation vec3 */
-void m4x4_translate_by_vec3( m4x4_t matrix, const vec3_t translation );
-/*! rotate m4x4 by a euler (degrees) vec3 */
-void m4x4_rotate_by_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order );
-/*! scale m4x4 by a scaling vec3 */
-void m4x4_scale_by_vec3( m4x4_t matrix, const vec3_t scale );
-/*! rotate m4x4 by a quaternion vec4 */
-void m4x4_rotate_by_quat( m4x4_t matrix, const vec4_t rotation );
-/*! rotate m4x4 by an axis vec3 and an angle (radians) */
-void m4x4_rotate_by_axisangle( m4x4_t matrix, const vec3_t axis, double angle );
-/*! transform m4x4 by translation/eulerZYX/scaling vec3 (transform = scale * eulerZ * eulerY * eulerX * translation) */
-void m4x4_transform_by_vec3( m4x4_t matrix, const vec3_t translation, const vec3_t euler, eulerOrder_t order, const vec3_t scale );
-/*! rotate m4x4 around a pivot point by eulerZYX vec3 */
-void m4x4_pivoted_rotate_by_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order, const vec3_t pivotpoint );
-/*! scale m4x4 around a pivot point by scaling vec3 */
-void m4x4_pivoted_scale_by_vec3( m4x4_t matrix, const vec3_t scale, const vec3_t pivotpoint );
-/*! transform m4x4 around a pivot point by translation/eulerZYX/scaling vec3 */
-void m4x4_pivoted_transform_by_vec3( m4x4_t matrix, const vec3_t translation, const vec3_t euler, eulerOrder_t order, const vec3_t scale, const vec3_t pivotpoint );
-/*! transform m4x4 around a pivot point by translation/rotation/scaling vec3 */
-void m4x4_pivoted_transform_by_rotation( m4x4_t matrix, const vec3_t translation, const m4x4_t rotation, const vec3_t scale, const vec3_t pivotpoint );
-/*! rotate m4x4 around a pivot point by quaternion vec4 */
-void m4x4_pivoted_rotate_by_quat( m4x4_t matrix, const vec4_t quat, const vec3_t pivotpoint );
-/*! rotate m4x4 around a pivot point by axis vec3 and angle (radians) */
-void m4x4_pivoted_rotate_by_axisangle( m4x4_t matrix, const vec3_t axis, double angle, const vec3_t pivotpoint );
-
-/*! postmultiply m4x4 by another m4x4 */
-void m4x4_multiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
-/*! premultiply m4x4 by another m4x4 */
-void m4x4_premultiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
-/*! postmultiply orthogonal m4x4 by another orthogonal m4x4 */
-void m4x4_orthogonal_multiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
-/*! premultiply orthogonal m4x4 by another orthogonal m4x4 */
-void m4x4_orthogonal_premultiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
-
-/*! multiply a point (x,y,z,1) by matrix */
-void m4x4_transform_point( const m4x4_t matrix, vec3_t point );
-/*! multiply a normal (x,y,z,0) by matrix */
-void m4x4_transform_normal( const m4x4_t matrix, vec3_t normal );
-/*! multiply a vec4 (x,y,z,w) by matrix */
-void m4x4_transform_vec4( const m4x4_t matrix, vec4_t vector );
-
-/*! multiply a point (x,y,z,1) by matrix */
-void m4x4_transform_point( const m4x4_t matrix, vec3_t point );
-/*! multiply a normal (x,y,z,0) by matrix */
-void m4x4_transform_normal( const m4x4_t matrix, vec3_t normal );
-
-/*! transpose a m4x4 */
-void m4x4_transpose( m4x4_t matrix );
-/*! invert an orthogonal 4x3 subset of a 4x4 matrix */
-int m4x4_orthogonal_invert( m4x4_t matrix );
-/*! m4_det */
-float m4_det( m4x4_t mr );
-/*! invert any m4x4 using Kramer's rule.. return 1 if matrix is singular, else return 0 */
-int m4x4_invert( m4x4_t matrix );
-
-/*! clip a point (x,y,z,1) by canonical matrix */
-clipmask_t m4x4_clip_point( const m4x4_t matrix, const vec3_t point, vec4_t clipped );
-/*! device-space polygon for clipped triangle */
-unsigned int m4x4_clip_triangle( const m4x4_t matrix, const vec3_t p0, const vec3_t p1, const vec3_t p2, vec4_t clipped[9] );
-/*! device-space line for clipped line */
-unsigned int m4x4_clip_line( const m4x4_t matrix, const vec3_t p0, const vec3_t p1, vec4_t clipped[2] );
-
-
-//! quaternion identity
-void quat_identity( vec4_t quat );
-//! quaternion from two unit vectors
-void quat_for_unit_vectors( vec4_t quat, const vec3_t from, const vec3_t to );
-//! quaternion from axis and angle (radians)
-void quat_for_axisangle( vec4_t quat, const vec3_t axis, double angle );
-//! concatenates two rotations.. equivalent to m4x4_multiply_by_m4x4 .. postmultiply.. the right-hand side is the first rotation performed
-void quat_multiply_by_quat( vec4_t quat, const vec4_t other );
-//! negate a quaternion
-void quat_conjugate( vec4_t quat );
-//! normalise a quaternion
-void quat_normalise( vec4_t quat );
-
-
-
-/*!
- \todo object/ray intersection functions should maybe return a point rather than a distance?
- */
-
-/*!
- aabb_t - "axis-aligned" bounding box...
- origin: centre of bounding box...
- extents: +/- extents of box from origin...
- */
-typedef struct aabb_s
-{
- vec3_t origin;
- vec3_t extents;
-} aabb_t;
-
-extern const aabb_t g_aabb_null;
-
-/*!
- bbox_t - oriented bounding box...
- aabb: axis-aligned bounding box...
- axes: orientation axes...
- */
-typedef struct bbox_s
-{
- aabb_t aabb;
- vec3_t axes[3];
- vec_t radius;
-} bbox_t;
-
-/*!
- ray_t - origin point and direction unit-vector
- */
-typedef struct ray_s
-{
- vec3_t origin;
- vec3_t direction;
-} ray_t;
-
-/*!
- line_t - centre point and displacement of end point from centre
- */
-typedef struct line_s
-{
- vec3_t origin;
- vec3_t extents;
-} line_t;
-
-
-/*! Generate line from start/end points. */
-void line_construct_for_vec3( line_t* line, const vec3_t start, const vec3_t end );
-/*! Return 2 if line is behind plane, else return 1 if line intersects plane, else return 0. */
-int line_test_plane( const line_t* line, const vec4_t plane );
-
-/*! Generate AABB from min/max. */
-void aabb_construct_for_vec3( aabb_t* aabb, const vec3_t min, const vec3_t max );
-/*! Initialise AABB to negative size. */
-void aabb_clear( aabb_t* aabb );
-
-/*! Extend AABB to include point. */
-void aabb_extend_by_point( aabb_t* aabb, const vec3_t point );
-/*! Extend AABB to include aabb_src. */
-void aabb_extend_by_aabb( aabb_t* aabb, const aabb_t* aabb_src );
-/*! Extend AABB by +/- extension vector. */
-void aabb_extend_by_vec3( aabb_t* aabb, vec3_t extension );
-
-/*! Return 2 if point is inside, else 1 if point is on surface, else 0. */
-int aabb_test_point( const aabb_t* aabb, const vec3_t point );
-/*! Return 2 if aabb_src intersects, else 1 if aabb_src touches exactly, else 0. */
-int aabb_test_aabb( const aabb_t* aabb, const aabb_t* aabb_src );
-/*! Return 2 if aabb is behind plane, else 1 if aabb intersects plane, else 0. */
-int aabb_test_plane( const aabb_t* aabb, const float* plane );
-/*! Return 1 if aabb intersects ray, else 0... dist = closest intersection. */
-int aabb_intersect_ray( const aabb_t* aabb, const ray_t* ray, vec3_t intersection );
-/*! Return 1 if aabb intersects ray, else 0. Faster, but does not provide point of intersection */
-int aabb_test_ray( const aabb_t* aabb, const ray_t* ray );
-
-/*! Return 2 if oriented aabb is behind plane, else 1 if aabb intersects plane, else 0. */
-int aabb_oriented_intersect_plane( const aabb_t* aabb, const m4x4_t transform, const vec_t* plane );
-
-/*! Calculate the corners of the aabb. */
-void aabb_corners( const aabb_t * aabb, vec3_t corners[8] );
-
-/*! (deprecated) Generate AABB from oriented bounding box. */
-void aabb_for_bbox( aabb_t* aabb, const bbox_t* bbox );
-/*! (deprecated) Generate AABB from 2-dimensions of min/max, specified by axis. */
-void aabb_for_area( aabb_t* aabb, vec3_t area_tl, vec3_t area_br, int axis );
-/*! Generate AABB to contain src* transform. NOTE: transform must be orthogonal */
-void aabb_for_transformed_aabb( aabb_t* dst, const aabb_t* src, const m4x4_t transform );
-
-/*! Update bounding-sphere radius. */
-void bbox_update_radius( bbox_t* bbox );
-/*! Generate oriented bounding box from AABB and transformation matrix. */
-/*!\todo Remove need to specify eulerZYX/scale. */
-void bbox_for_oriented_aabb( bbox_t* bbox, const aabb_t* aabb,
- const m4x4_t matrix, const vec3_t eulerZYX, const vec3_t scale );
-/*! Return 2 if bbox is behind plane, else return 1 if bbox intersects plane, else return 0. */
-int bbox_intersect_plane( const bbox_t* bbox, const vec_t* plane );
-
-
-/*! Generate a ray from an origin point and a direction unit-vector */
-void ray_construct_for_vec3( ray_t* ray, const vec3_t origin, const vec3_t direction );
-
-/*! Transform a ray */
-void ray_transform( ray_t* ray, const m4x4_t matrix );
-
-/*! distance from ray origin in ray direction to point. FLT_MAX if no intersection. */
-vec_t ray_intersect_point( const ray_t* ray, const vec3_t point, vec_t epsilon, vec_t divergence );
-/*! distance from ray origin in ray direction to triangle. FLT_MAX if no intersection. */
-vec_t ray_intersect_triangle( const ray_t* ray, qboolean bCullBack, const vec3_t vert0, const vec3_t vert1, const vec3_t vert2 );
-/*! distance from ray origin in ray direction to plane. */
-vec_t ray_intersect_plane( const ray_t* ray, const vec3_t normal, vec_t dist );
-
-
-int plane_intersect_planes( const vec4_t plane1, const vec4_t plane2, const vec4_t plane3, vec3_t intersection );
-
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Below is double-precision math stuff. This was initially needed by the new
-// "base winding" code in q3map2 brush processing in order to fix the famous
-// "disappearing triangles" issue. These definitions can be used wherever extra
-// precision is needed.
-////////////////////////////////////////////////////////////////////////////////
-
-typedef double vec_accu_t;
-typedef vec_accu_t vec3_accu_t[3];
-
-// Smallest positive value for vec_accu_t such that 1.0 + VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE != 1.0.
-// In the case of 64 bit doubles (which is almost certainly the case), it's 0.00000000000000022204.
-// Don't forget that your epsilons should depend on the possible range of values,
-// because for example adding VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE to 1024.0 will have no effect.
-#define VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE DBL_EPSILON
-
-vec_accu_t VectorLengthAccu( const vec3_accu_t v );
-
-// I have a feeling it may be safer to break these #define functions out into actual functions
-// in order to avoid accidental loss of precision. For example, say you call
-// VectorScaleAccu(vec3_t, vec_t, vec3_accu_t). The scale would take place in 32 bit land
-// and the result would be cast to 64 bit, which would cause total loss of precision when
-// scaling by a large factor.
-//#define DotProductAccu(x, y) ((x)[0] * (y)[0] + (x)[1] * (y)[1] + (x)[2] * (y)[2])
-//#define VectorSubtractAccu(a, b, c) ((c)[0] = (a)[0] - (b)[0], (c)[1] = (a)[1] - (b)[1], (c)[2] = (a)[2] - (b)[2])
-//#define VectorAddAccu(a, b, c) ((c)[0] = (a)[0] + (b)[0], (c)[1] = (a)[1] + (b)[1], (c)[2] = (a)[2] + (b)[2])
-//#define VectorCopyAccu(a, b) ((b)[0] = (a)[0], (b)[1] = (a)[1], (b)[2] = (a)[2])
-//#define VectorScaleAccu(a, b, c) ((c)[0] = (b) * (a)[0], (c)[1] = (b) * (a)[1], (c)[2] = (b) * (a)[2])
-//#define CrossProductAccu(a, b, c) ((c)[0] = (a)[1] * (b)[2] - (a)[2] * (b)[1], (c)[1] = (a)[2] * (b)[0] - (a)[0] * (b)[2], (c)[2] = (a)[0] * (b)[1] - (a)[1] * (b)[0])
-//#define Q_rintAccu(in) ((vec_accu_t) floor(in + 0.5))
-
-vec_accu_t DotProductAccu( const vec3_accu_t a, const vec3_accu_t b );
-void VectorSubtractAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
-void VectorAddAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
-void VectorCopyAccu( const vec3_accu_t in, vec3_accu_t out );
-void VectorScaleAccu( const vec3_accu_t in, vec_accu_t scaleFactor, vec3_accu_t out );
-void CrossProductAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
-vec_accu_t Q_rintAccu( vec_accu_t val );
-
-void VectorCopyAccuToRegular( const vec3_accu_t in, vec3_t out );
-void VectorCopyRegularToAccu( const vec3_t in, vec3_accu_t out );
-vec_accu_t VectorNormalizeAccu( const vec3_accu_t in, vec3_accu_t out );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MATHLIB__ */
add_library(mathlib
- bbox.c
- line.c
- m4x4.c
- mathlib.c
- ray.c
-)
+ bbox.c
+ line.c
+ m4x4.c
+ mathlib.c mathlib.h
+ ray.c
+ )
#include <float.h>
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
const aabb_t g_aabb_null = {
{ 0, 0, 0, },
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
void line_construct_for_vec3( line_t *line, const vec3_t start, const vec3_t end ){
VectorMid( start, end, line->origin );
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
const m4x4_t g_m4x4_identity = {
1, 0, 0, 0,
*/
// mathlib.c -- math primitives
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
// we use memcpy and memset
#include <memory.h>
--- /dev/null
+/*
+ Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+ For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+ This file is part of GtkRadiant.
+
+ GtkRadiant is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GtkRadiant is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GtkRadiant; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __MATHLIB__
+#define __MATHLIB__
+
+// mathlib.h
+#include <math.h>
+#include <float.h>
+
+#ifdef __cplusplus
+
+// start declarations of functions defined in C library.
+extern "C"
+{
+
+#endif
+
+#include "bytebool.h"
+
+typedef float vec_t;
+typedef vec_t vec3_t[3];
+typedef vec_t vec5_t[5];
+typedef vec_t vec4_t[4];
+
+// Smallest positive value for vec_t such that 1.0 + VEC_SMALLEST_EPSILON_AROUND_ONE != 1.0.
+// In the case of 32 bit floats (which is almost certainly the case), it's 0.00000011921.
+// Don't forget that your epsilons should depend on the possible range of values,
+// because for example adding VEC_SMALLEST_EPSILON_AROUND_ONE to 1024.0 will have no effect.
+#define VEC_SMALLEST_EPSILON_AROUND_ONE FLT_EPSILON
+
+#define SIDE_FRONT 0
+#define SIDE_ON 2
+#define SIDE_BACK 1
+#define SIDE_CROSS -2
+
+// plane types are used to speed some tests
+// 0-2 are axial planes
+#define PLANE_X 0
+#define PLANE_Y 1
+#define PLANE_Z 2
+#define PLANE_NON_AXIAL 3
+
+#define Q_PI 3.14159265358979323846f
+
+extern const vec3_t vec3_origin;
+
+extern const vec3_t g_vec3_axis_x;
+extern const vec3_t g_vec3_axis_y;
+extern const vec3_t g_vec3_axis_z;
+
+#define EQUAL_EPSILON 0.001
+
+#define DotProduct( x,y ) ( ( x )[0] * ( y )[0] + ( x )[1] * ( y )[1] + ( x )[2] * ( y )[2] )
+#define VectorSubtract( a,b,c ) ( ( c )[0] = ( a )[0] - ( b )[0],( c )[1] = ( a )[1] - ( b )[1],( c )[2] = ( a )[2] - ( b )[2] )
+#define VectorAdd( a,b,c ) ( ( c )[0] = ( a )[0] + ( b )[0],( c )[1] = ( a )[1] + ( b )[1],( c )[2] = ( a )[2] + ( b )[2] )
+#define VectorIncrement( a,b ) ( ( b )[0] += ( a )[0],( b )[1] += ( a )[1],( b )[2] += ( a )[2] )
+#define VectorCopy( a,b ) ( ( b )[0] = ( a )[0],( b )[1] = ( a )[1],( b )[2] = ( a )[2] )
+#define VectorSet( v, a, b, c ) ( ( v )[0] = ( a ),( v )[1] = ( b ),( v )[2] = ( c ) )
+#define VectorScale( a,b,c ) ( ( c )[0] = ( b ) * ( a )[0],( c )[1] = ( b ) * ( a )[1],( c )[2] = ( b ) * ( a )[2] )
+#define VectorMid( a,b,c ) ( ( c )[0] = ( ( a )[0] + ( b )[0] ) * 0.5f,( c )[1] = ( ( a )[1] + ( b )[1] ) * 0.5f,( c )[2] = ( ( a )[2] + ( b )[2] ) * 0.5f )
+#define VectorNegate( a,b ) ( ( b )[0] = -( a )[0],( b )[1] = -( a )[1],( b )[2] = -( a )[2] )
+#define CrossProduct( a,b,c ) ( ( c )[0] = ( a )[1] * ( b )[2] - ( a )[2] * ( b )[1],( c )[1] = ( a )[2] * ( b )[0] - ( a )[0] * ( b )[2],( c )[2] = ( a )[0] * ( b )[1] - ( a )[1] * ( b )[0] )
+#define VectorClear( x ) ( ( x )[0] = ( x )[1] = ( x )[2] = 0 )
+
+#define FLOAT_SNAP( f,snap ) ( (float)( floor( ( f ) / ( snap ) + 0.5 ) * ( snap ) ) )
+#define FLOAT_TO_INTEGER( f ) ( (float)( floor( ( f ) + 0.5 ) ) )
+
+#define RGBTOGRAY( x ) ( (float)( ( x )[0] ) * 0.2989f + (float)( ( x )[1] ) * 0.5870f + (float)( ( x )[2] ) * 0.1140f )
+
+#define Q_rint( in ) ( (vec_t)floor( in + 0.5 ) )
+
+qboolean VectorCompare( const vec3_t v1, const vec3_t v2 );
+
+qboolean VectorIsOnAxis( vec3_t v );
+qboolean VectorIsOnAxialPlane( vec3_t v );
+
+vec_t VectorLength( const vec3_t v );
+
+void VectorMA( const vec3_t va, vec_t scale, const vec3_t vb, vec3_t vc );
+
+void _CrossProduct( vec3_t v1, vec3_t v2, vec3_t cross );
+// I need this define in order to test some of the regression tests from time to time.
+// This define affect the precision of VectorNormalize() function only.
+#define MATHLIB_VECTOR_NORMALIZE_PRECISION_FIX 1
+vec_t VectorNormalize( const vec3_t in, vec3_t out );
+vec_t ColorNormalize( const vec3_t in, vec3_t out );
+void VectorInverse( vec3_t v );
+void VectorPolar( vec3_t v, float radius, float theta, float phi );
+
+// default snapping, to 1
+void VectorSnap( vec3_t v );
+
+// integer snapping
+void VectorISnap( vec3_t point, int snap );
+
+// Gef: added snap to float for sub-integer grid sizes
+// TTimo: we still use the int version of VectorSnap when possible
+// to avoid potential rounding issues
+// TTimo: renaming to VectorFSnap for C implementation
+void VectorFSnap( vec3_t point, float snap );
+
+// NOTE: added these from Ritual's Q3Radiant
+void ClearBounds( vec3_t mins, vec3_t maxs );
+void AddPointToBounds( vec3_t v, vec3_t mins, vec3_t maxs );
+
+
+#define PITCH 0 // up / down
+#define YAW 1 // left / right
+#define ROLL 2 // fall over
+
+void AngleVectors( vec3_t angles, vec3_t forward, vec3_t right, vec3_t up );
+void VectorToAngles( vec3_t vec, vec3_t angles );
+
+#define ZERO_EPSILON 1.0E-6
+#define RAD2DEGMULT 57.29577951308232f
+#define DEG2RADMULT 0.01745329251994329f
+#define RAD2DEG( a ) ( ( a ) * RAD2DEGMULT )
+#define DEG2RAD( a ) ( ( a ) * DEG2RADMULT )
+
+void VectorRotate( vec3_t vIn, vec3_t vRotation, vec3_t out );
+void VectorRotateOrigin( vec3_t vIn, vec3_t vRotation, vec3_t vOrigin, vec3_t out );
+
+// some function merged from tools mathlib code
+
+qboolean PlaneFromPoints( vec4_t plane, const vec3_t a, const vec3_t b, const vec3_t c );
+void NormalToLatLong( const vec3_t normal, byte bytes[2] );
+int PlaneTypeForNormal( vec3_t normal );
+void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees );
+
+
+/*!
+ \todo
+ FIXME test calls such as intersect tests should be named test_
+ */
+
+typedef vec_t m3x3_t[9];
+/*!NOTE
+ m4x4 looks like this..
+
+ x y z
+ x axis ( 0 1 2)
+ y axis ( 4 5 6)
+ z axis ( 8 9 10)
+ translation (12 13 14)
+ scale ( 0 5 10)
+ */
+typedef vec_t m4x4_t[16];
+
+#define M4X4_INDEX( m,row,col ) ( m[( col << 2 ) + row] )
+
+typedef enum { eXYZ, eYZX, eZXY, eXZY, eYXZ, eZYX } eulerOrder_t;
+
+#define CLIP_PASS 0x00 // 000000
+#define CLIP_LT_X 0x01 // 000001
+#define CLIP_GT_X 0x02 // 000010
+#define CLIP_LT_Y 0x04 // 000100
+#define CLIP_GT_Y 0x08 // 001000
+#define CLIP_LT_Z 0x10 // 010000
+#define CLIP_GT_Z 0x20 // 100000
+#define CLIP_FAIL 0x3F // 111111
+typedef unsigned char clipmask_t;
+
+extern const m4x4_t g_m4x4_identity;
+
+#define M4X4_COPY( dst,src ) ( \
+ ( dst )[0] = ( src )[0], \
+ ( dst )[1] = ( src )[1], \
+ ( dst )[2] = ( src )[2], \
+ ( dst )[3] = ( src )[3], \
+ ( dst )[4] = ( src )[4], \
+ ( dst )[5] = ( src )[5], \
+ ( dst )[6] = ( src )[6], \
+ ( dst )[7] = ( src )[7], \
+ ( dst )[8] = ( src )[8], \
+ ( dst )[9] = ( src )[9], \
+ ( dst )[10] = ( src )[10], \
+ ( dst )[11] = ( src )[11], \
+ ( dst )[12] = ( src )[12], \
+ ( dst )[13] = ( src )[13], \
+ ( dst )[14] = ( src )[14], \
+ ( dst )[15] = ( src )[15] )
+
+typedef enum
+{
+ eRightHanded = 0,
+ eLeftHanded = 1,
+}
+m4x4Handedness_t;
+
+m4x4Handedness_t m4x4_handedness( const m4x4_t matrix );
+
+/*! assign other m4x4 to this m4x4 */
+void m4x4_assign( m4x4_t matrix, const m4x4_t other );
+
+// constructors
+/*! create m4x4 as identity matrix */
+void m4x4_identity( m4x4_t matrix );
+/*! create m4x4 as a translation matrix, for a translation vec3 */
+void m4x4_translation_for_vec3( m4x4_t matrix, const vec3_t translation );
+/*! create m4x4 as a rotation matrix, for an euler angles (degrees) vec3 */
+void m4x4_rotation_for_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order );
+/*! create m4x4 as a scaling matrix, for a scale vec3 */
+void m4x4_scale_for_vec3( m4x4_t matrix, const vec3_t scale );
+/*! create m4x4 as a rotation matrix, for a quaternion vec4 */
+void m4x4_rotation_for_quat( m4x4_t matrix, const vec4_t rotation );
+/*! create m4x4 as a rotation matrix, for an axis vec3 and an angle (radians) */
+void m4x4_rotation_for_axisangle( m4x4_t matrix, const vec3_t axis, double angle );
+/*! generate a perspective matrix by specifying the view frustum */
+void m4x4_frustum( m4x4_t matrix, vec_t left, vec_t right, vec_t bottom, vec_t top, vec_t nearval, vec_t farval );
+
+// a valid m4x4 to access is always first argument
+/*! extract translation vec3 from matrix */
+void m4x4_get_translation_vec3( const m4x4_t matrix, vec3_t translation );
+/*! extract euler rotation angles from a rotation-only matrix */
+void m4x4_get_rotation_vec3( const m4x4_t matrix, vec3_t euler, eulerOrder_t order );
+/*! extract scale vec3 from matrix */
+void m4x4_get_scale_vec3( const m4x4_t matrix, vec3_t scale );
+/*! extract translation/euler/scale from an orthogonal matrix. NOTE: requires right-handed axis-base */
+void m4x4_get_transform_vec3( const m4x4_t matrix, vec3_t translation, vec3_t euler, eulerOrder_t order, vec3_t scale );
+
+// a valid m4x4 to be modified is always first argument
+/*! translate m4x4 by a translation vec3 */
+void m4x4_translate_by_vec3( m4x4_t matrix, const vec3_t translation );
+/*! rotate m4x4 by a euler (degrees) vec3 */
+void m4x4_rotate_by_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order );
+/*! scale m4x4 by a scaling vec3 */
+void m4x4_scale_by_vec3( m4x4_t matrix, const vec3_t scale );
+/*! rotate m4x4 by a quaternion vec4 */
+void m4x4_rotate_by_quat( m4x4_t matrix, const vec4_t rotation );
+/*! rotate m4x4 by an axis vec3 and an angle (radians) */
+void m4x4_rotate_by_axisangle( m4x4_t matrix, const vec3_t axis, double angle );
+/*! transform m4x4 by translation/eulerZYX/scaling vec3 (transform = scale * eulerZ * eulerY * eulerX * translation) */
+void m4x4_transform_by_vec3( m4x4_t matrix, const vec3_t translation, const vec3_t euler, eulerOrder_t order, const vec3_t scale );
+/*! rotate m4x4 around a pivot point by eulerZYX vec3 */
+void m4x4_pivoted_rotate_by_vec3( m4x4_t matrix, const vec3_t euler, eulerOrder_t order, const vec3_t pivotpoint );
+/*! scale m4x4 around a pivot point by scaling vec3 */
+void m4x4_pivoted_scale_by_vec3( m4x4_t matrix, const vec3_t scale, const vec3_t pivotpoint );
+/*! transform m4x4 around a pivot point by translation/eulerZYX/scaling vec3 */
+void m4x4_pivoted_transform_by_vec3( m4x4_t matrix, const vec3_t translation, const vec3_t euler, eulerOrder_t order, const vec3_t scale, const vec3_t pivotpoint );
+/*! transform m4x4 around a pivot point by translation/rotation/scaling vec3 */
+void m4x4_pivoted_transform_by_rotation( m4x4_t matrix, const vec3_t translation, const m4x4_t rotation, const vec3_t scale, const vec3_t pivotpoint );
+/*! rotate m4x4 around a pivot point by quaternion vec4 */
+void m4x4_pivoted_rotate_by_quat( m4x4_t matrix, const vec4_t quat, const vec3_t pivotpoint );
+/*! rotate m4x4 around a pivot point by axis vec3 and angle (radians) */
+void m4x4_pivoted_rotate_by_axisangle( m4x4_t matrix, const vec3_t axis, double angle, const vec3_t pivotpoint );
+
+/*! postmultiply m4x4 by another m4x4 */
+void m4x4_multiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
+/*! premultiply m4x4 by another m4x4 */
+void m4x4_premultiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
+/*! postmultiply orthogonal m4x4 by another orthogonal m4x4 */
+void m4x4_orthogonal_multiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
+/*! premultiply orthogonal m4x4 by another orthogonal m4x4 */
+void m4x4_orthogonal_premultiply_by_m4x4( m4x4_t matrix, const m4x4_t matrix_src );
+
+/*! multiply a point (x,y,z,1) by matrix */
+void m4x4_transform_point( const m4x4_t matrix, vec3_t point );
+/*! multiply a normal (x,y,z,0) by matrix */
+void m4x4_transform_normal( const m4x4_t matrix, vec3_t normal );
+/*! multiply a vec4 (x,y,z,w) by matrix */
+void m4x4_transform_vec4( const m4x4_t matrix, vec4_t vector );
+
+/*! multiply a point (x,y,z,1) by matrix */
+void m4x4_transform_point( const m4x4_t matrix, vec3_t point );
+/*! multiply a normal (x,y,z,0) by matrix */
+void m4x4_transform_normal( const m4x4_t matrix, vec3_t normal );
+
+/*! transpose a m4x4 */
+void m4x4_transpose( m4x4_t matrix );
+/*! invert an orthogonal 4x3 subset of a 4x4 matrix */
+int m4x4_orthogonal_invert( m4x4_t matrix );
+/*! m4_det */
+float m4_det( m4x4_t mr );
+/*! invert any m4x4 using Kramer's rule.. return 1 if matrix is singular, else return 0 */
+int m4x4_invert( m4x4_t matrix );
+
+/*! clip a point (x,y,z,1) by canonical matrix */
+clipmask_t m4x4_clip_point( const m4x4_t matrix, const vec3_t point, vec4_t clipped );
+/*! device-space polygon for clipped triangle */
+unsigned int m4x4_clip_triangle( const m4x4_t matrix, const vec3_t p0, const vec3_t p1, const vec3_t p2, vec4_t clipped[9] );
+/*! device-space line for clipped line */
+unsigned int m4x4_clip_line( const m4x4_t matrix, const vec3_t p0, const vec3_t p1, vec4_t clipped[2] );
+
+
+//! quaternion identity
+void quat_identity( vec4_t quat );
+//! quaternion from two unit vectors
+void quat_for_unit_vectors( vec4_t quat, const vec3_t from, const vec3_t to );
+//! quaternion from axis and angle (radians)
+void quat_for_axisangle( vec4_t quat, const vec3_t axis, double angle );
+//! concatenates two rotations.. equivalent to m4x4_multiply_by_m4x4 .. postmultiply.. the right-hand side is the first rotation performed
+void quat_multiply_by_quat( vec4_t quat, const vec4_t other );
+//! negate a quaternion
+void quat_conjugate( vec4_t quat );
+//! normalise a quaternion
+void quat_normalise( vec4_t quat );
+
+
+
+/*!
+ \todo object/ray intersection functions should maybe return a point rather than a distance?
+ */
+
+/*!
+ aabb_t - "axis-aligned" bounding box...
+ origin: centre of bounding box...
+ extents: +/- extents of box from origin...
+ */
+typedef struct aabb_s
+{
+ vec3_t origin;
+ vec3_t extents;
+} aabb_t;
+
+extern const aabb_t g_aabb_null;
+
+/*!
+ bbox_t - oriented bounding box...
+ aabb: axis-aligned bounding box...
+ axes: orientation axes...
+ */
+typedef struct bbox_s
+{
+ aabb_t aabb;
+ vec3_t axes[3];
+ vec_t radius;
+} bbox_t;
+
+/*!
+ ray_t - origin point and direction unit-vector
+ */
+typedef struct ray_s
+{
+ vec3_t origin;
+ vec3_t direction;
+} ray_t;
+
+/*!
+ line_t - centre point and displacement of end point from centre
+ */
+typedef struct line_s
+{
+ vec3_t origin;
+ vec3_t extents;
+} line_t;
+
+
+/*! Generate line from start/end points. */
+void line_construct_for_vec3( line_t* line, const vec3_t start, const vec3_t end );
+/*! Return 2 if line is behind plane, else return 1 if line intersects plane, else return 0. */
+int line_test_plane( const line_t* line, const vec4_t plane );
+
+/*! Generate AABB from min/max. */
+void aabb_construct_for_vec3( aabb_t* aabb, const vec3_t min, const vec3_t max );
+/*! Initialise AABB to negative size. */
+void aabb_clear( aabb_t* aabb );
+
+/*! Extend AABB to include point. */
+void aabb_extend_by_point( aabb_t* aabb, const vec3_t point );
+/*! Extend AABB to include aabb_src. */
+void aabb_extend_by_aabb( aabb_t* aabb, const aabb_t* aabb_src );
+/*! Extend AABB by +/- extension vector. */
+void aabb_extend_by_vec3( aabb_t* aabb, vec3_t extension );
+
+/*! Return 2 if point is inside, else 1 if point is on surface, else 0. */
+int aabb_test_point( const aabb_t* aabb, const vec3_t point );
+/*! Return 2 if aabb_src intersects, else 1 if aabb_src touches exactly, else 0. */
+int aabb_test_aabb( const aabb_t* aabb, const aabb_t* aabb_src );
+/*! Return 2 if aabb is behind plane, else 1 if aabb intersects plane, else 0. */
+int aabb_test_plane( const aabb_t* aabb, const float* plane );
+/*! Return 1 if aabb intersects ray, else 0... dist = closest intersection. */
+int aabb_intersect_ray( const aabb_t* aabb, const ray_t* ray, vec3_t intersection );
+/*! Return 1 if aabb intersects ray, else 0. Faster, but does not provide point of intersection */
+int aabb_test_ray( const aabb_t* aabb, const ray_t* ray );
+
+/*! Return 2 if oriented aabb is behind plane, else 1 if aabb intersects plane, else 0. */
+int aabb_oriented_intersect_plane( const aabb_t* aabb, const m4x4_t transform, const vec_t* plane );
+
+/*! Calculate the corners of the aabb. */
+void aabb_corners( const aabb_t * aabb, vec3_t corners[8] );
+
+/*! (deprecated) Generate AABB from oriented bounding box. */
+void aabb_for_bbox( aabb_t* aabb, const bbox_t* bbox );
+/*! (deprecated) Generate AABB from 2-dimensions of min/max, specified by axis. */
+void aabb_for_area( aabb_t* aabb, vec3_t area_tl, vec3_t area_br, int axis );
+/*! Generate AABB to contain src* transform. NOTE: transform must be orthogonal */
+void aabb_for_transformed_aabb( aabb_t* dst, const aabb_t* src, const m4x4_t transform );
+
+/*! Update bounding-sphere radius. */
+void bbox_update_radius( bbox_t* bbox );
+/*! Generate oriented bounding box from AABB and transformation matrix. */
+/*!\todo Remove need to specify eulerZYX/scale. */
+void bbox_for_oriented_aabb( bbox_t* bbox, const aabb_t* aabb,
+ const m4x4_t matrix, const vec3_t eulerZYX, const vec3_t scale );
+/*! Return 2 if bbox is behind plane, else return 1 if bbox intersects plane, else return 0. */
+int bbox_intersect_plane( const bbox_t* bbox, const vec_t* plane );
+
+
+/*! Generate a ray from an origin point and a direction unit-vector */
+void ray_construct_for_vec3( ray_t* ray, const vec3_t origin, const vec3_t direction );
+
+/*! Transform a ray */
+void ray_transform( ray_t* ray, const m4x4_t matrix );
+
+/*! distance from ray origin in ray direction to point. FLT_MAX if no intersection. */
+vec_t ray_intersect_point( const ray_t* ray, const vec3_t point, vec_t epsilon, vec_t divergence );
+/*! distance from ray origin in ray direction to triangle. FLT_MAX if no intersection. */
+vec_t ray_intersect_triangle( const ray_t* ray, qboolean bCullBack, const vec3_t vert0, const vec3_t vert1, const vec3_t vert2 );
+/*! distance from ray origin in ray direction to plane. */
+vec_t ray_intersect_plane( const ray_t* ray, const vec3_t normal, vec_t dist );
+
+
+int plane_intersect_planes( const vec4_t plane1, const vec4_t plane2, const vec4_t plane3, vec3_t intersection );
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Below is double-precision math stuff. This was initially needed by the new
+// "base winding" code in q3map2 brush processing in order to fix the famous
+// "disappearing triangles" issue. These definitions can be used wherever extra
+// precision is needed.
+////////////////////////////////////////////////////////////////////////////////
+
+typedef double vec_accu_t;
+typedef vec_accu_t vec3_accu_t[3];
+
+// Smallest positive value for vec_accu_t such that 1.0 + VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE != 1.0.
+// In the case of 64 bit doubles (which is almost certainly the case), it's 0.00000000000000022204.
+// Don't forget that your epsilons should depend on the possible range of values,
+// because for example adding VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE to 1024.0 will have no effect.
+#define VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE DBL_EPSILON
+
+vec_accu_t VectorLengthAccu( const vec3_accu_t v );
+
+// I have a feeling it may be safer to break these #define functions out into actual functions
+// in order to avoid accidental loss of precision. For example, say you call
+// VectorScaleAccu(vec3_t, vec_t, vec3_accu_t). The scale would take place in 32 bit land
+// and the result would be cast to 64 bit, which would cause total loss of precision when
+// scaling by a large factor.
+//#define DotProductAccu(x, y) ((x)[0] * (y)[0] + (x)[1] * (y)[1] + (x)[2] * (y)[2])
+//#define VectorSubtractAccu(a, b, c) ((c)[0] = (a)[0] - (b)[0], (c)[1] = (a)[1] - (b)[1], (c)[2] = (a)[2] - (b)[2])
+//#define VectorAddAccu(a, b, c) ((c)[0] = (a)[0] + (b)[0], (c)[1] = (a)[1] + (b)[1], (c)[2] = (a)[2] + (b)[2])
+//#define VectorCopyAccu(a, b) ((b)[0] = (a)[0], (b)[1] = (a)[1], (b)[2] = (a)[2])
+//#define VectorScaleAccu(a, b, c) ((c)[0] = (b) * (a)[0], (c)[1] = (b) * (a)[1], (c)[2] = (b) * (a)[2])
+//#define CrossProductAccu(a, b, c) ((c)[0] = (a)[1] * (b)[2] - (a)[2] * (b)[1], (c)[1] = (a)[2] * (b)[0] - (a)[0] * (b)[2], (c)[2] = (a)[0] * (b)[1] - (a)[1] * (b)[0])
+//#define Q_rintAccu(in) ((vec_accu_t) floor(in + 0.5))
+
+vec_accu_t DotProductAccu( const vec3_accu_t a, const vec3_accu_t b );
+void VectorSubtractAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
+void VectorAddAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
+void VectorCopyAccu( const vec3_accu_t in, vec3_accu_t out );
+void VectorScaleAccu( const vec3_accu_t in, vec_accu_t scaleFactor, vec3_accu_t out );
+void CrossProductAccu( const vec3_accu_t a, const vec3_accu_t b, vec3_accu_t out );
+vec_accu_t Q_rintAccu( vec_accu_t val );
+
+void VectorCopyAccuToRegular( const vec3_accu_t in, vec3_t out );
+void VectorCopyRegularToAccu( const vec3_t in, vec3_accu_t out );
+vec_accu_t VectorNormalizeAccu( const vec3_accu_t in, vec3_accu_t out );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MATHLIB__ */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include <float.h>
vec3_t identity = { 0,0,0 };
+++ /dev/null
-/*
- Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- L. Peter Deutsch
- ghost@aladdin.com
-
- */
-/* $Id: md5lib.h,v 1.1.2.1 2003/07/19 23:25:50 spog Exp $ */
-/*
- Independent implementation of MD5 (RFC 1321).
-
- This code implements the MD5 Algorithm defined in RFC 1321, whose
- text is available at
- http://www.ietf.org/rfc/rfc1321.txt
- The code is derived from the text of the RFC, including the test suite
- (section A.5) but excluding the rest of Appendix A. It does not include
- any code or documentation that is identified in the RFC as being
- copyrighted.
-
- The original and principal author of md5.h is L. Peter Deutsch
- <ghost@aladdin.com>. Other authors are noted in the change history
- that follows (in reverse chronological order):
-
- 2002-04-13 lpd Removed support for non-ANSI compilers; removed
- references to Ghostscript; clarified derivation from RFC 1321;
- now handles byte order either statically or dynamically.
- 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
- 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
- added conditionalization for C++ compilation from Martin
- Purschke <purschke@bnl.gov>.
- 1999-05-03 lpd Original version.
- */
-
-#ifndef md5_INCLUDED
-# define md5_INCLUDED
-
-/*
- * This package supports both compile-time and run-time determination of CPU
- * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
- * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
- * defined as non-zero, the code will be compiled to run only on big-endian
- * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
- * run on either big- or little-endian CPUs, but will run slightly less
- * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
- */
-
-typedef unsigned char md5_byte_t; /* 8-bit byte */
-typedef unsigned int md5_word_t; /* 32-bit word */
-
-/* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
- md5_word_t count[2]; /* message length in bits, lsw first */
- md5_word_t abcd[4]; /* digest buffer */
- md5_byte_t buf[64]; /* accumulate block */
-} md5_state_t;
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Initialize the algorithm. */
-void md5_init( md5_state_t *pms );
-
-/* Append a string to the message. */
-void md5_append( md5_state_t *pms, const md5_byte_t *data, int nbytes );
-
-/* Finish the message and return the digest. */
-void md5_finish( md5_state_t * pms, md5_byte_t digest[16] );
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
-
-#endif /* md5_INCLUDED */
add_library(md5lib
- md5lib.c
-)
+ md5lib.c md5lib.h
+ )
--- /dev/null
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: md5lib.h,v 1.1.2.1 2003/07/19 23:25:50 spog Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+#ifndef md5_INCLUDED
+# define md5_INCLUDED
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char md5_byte_t; /* 8-bit byte */
+typedef unsigned int md5_word_t; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct md5_state_s {
+ md5_word_t count[2]; /* message length in bits, lsw first */
+ md5_word_t abcd[4]; /* digest buffer */
+ md5_byte_t buf[64]; /* accumulate block */
+} md5_state_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Initialize the algorithm. */
+void md5_init( md5_state_t *pms );
+
+/* Append a string to the message. */
+void md5_append( md5_state_t *pms, const md5_byte_t *data, int nbytes );
+
+/* Finish the message and return the digest. */
+void md5_finish( md5_state_t * pms, md5_byte_t digest[16] );
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
add_library(memory
- allocator.cpp
- allocator.h
-)
+ allocator.cpp allocator.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "moduleobservers.h"
add_library(modulesystem
- moduleregistry.cpp
- moduleregistry.h
- modulesmap.cpp
- modulesmap.h
- singletonmodule.cpp
- singletonmodule.h
-)
+ moduleregistry.h
+ modulesmap.h
+ singletonmodule.cpp singletonmodule.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "moduleregistry.h"
virtual void selfRegister() = 0;
};
-class ModuleRegistryList
-{
-typedef std::list<ModuleRegisterable*> RegisterableModules;
-RegisterableModules m_modules;
+class ModuleRegistryList {
+ std::list<ModuleRegisterable *> m_modules;
public:
-void addModule( ModuleRegisterable& module ){
- m_modules.push_back( &module );
-}
-void registerModules() const {
- for ( RegisterableModules::const_iterator i = m_modules.begin(); i != m_modules.end(); ++i )
+ void addModule(ModuleRegisterable &module)
{
- ( *i )->selfRegister();
+ m_modules.push_back(&module);
+ }
+
+ void registerModules() const
+ {
+ for (auto it : m_modules) {
+ it->selfRegister();
+ }
}
-}
};
-typedef SmartStatic<ModuleRegistryList> StaticModuleRegistryList;
+using StaticModuleRegistryList = SmartStatic<ModuleRegistryList>;
class StaticRegisterModule : public StaticModuleRegistryList
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "modulesmap.h"
ASSERT_MESSAGE( m_refcount == 0, "module still referenced at shutdown" );
}
-void selfRegister(){
- globalModuleServer().registerModule( typename Type::Name(), typename Type::Version(), APIConstructor::getName(), *this );
-}
+ void selfRegister()
+ {
+ const char *type = typename Type::Name();
+ int version = typename Type::Version();
+ const char *name = APIConstructor::getName();
+ globalModuleServer().registerModule(type, version, name, *this);
+ }
Dependencies& getDependencies(){
return *m_dependencies;
add_library(os
- dir.cpp
- dir.h
- file.cpp
- file.h
- path.cpp
- path.h
-)
+ dir.h
+ file.h
+ path.h
+ )
+set_target_properties(os PROPERTIES LINKER_LANGUAGE CXX)
+
+find_package(GLIB REQUIRED)
+target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS})
+
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "dir.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "file.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "path.h"
+++ /dev/null
-/* -----------------------------------------------------------------------------
-
- PicoModel Library
-
- Copyright (c) 2002, Randy Reddig & seaw0lf
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this list
- of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
- Neither the names of the copyright holders nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- ----------------------------------------------------------------------------- */
-
-
-
-/* marker */
-#ifndef PICOMODEL_H
-#define PICOMODEL_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <stddef.h>
-
-
-
-/* version */
-#define PICOMODEL_VERSION "0.8.20"
-
-
-/* constants */
-#define PICO_GROW_SHADERS 16
-#define PICO_GROW_SURFACES 16
-#define PICO_GROW_VERTEXES 1024
-#define PICO_GROW_INDEXES 1024
-#define PICO_GROW_ARRAYS 8
-#define PICO_GROW_FACES 256
-#define PICO_MAX_SPECIAL 8
-#define PICO_MAX_DEFAULT_EXTS 4 /* max default extensions per module */
-
-
-/* types */
-typedef unsigned char picoByte_t;
-typedef float picoVec_t;
-typedef float picoVec2_t[ 2 ];
-typedef float picoVec3_t[ 3 ];
-typedef float picoVec4_t[ 4 ];
-typedef picoByte_t picoColor_t[ 4 ];
-typedef int picoIndex_t;
-
-typedef enum
-{
- PICO_BAD,
- PICO_TRIANGLES,
- PICO_PATCH
-}
-picoSurfaceType_t;
-
-typedef enum
-{
- PICO_NORMAL,
- PICO_VERBOSE,
- PICO_WARNING,
- PICO_ERROR,
- PICO_FATAL
-}
-picoPrintLevel_t;
-
-typedef struct picoSurface_s picoSurface_t;
-typedef struct picoShader_s picoShader_t;
-typedef struct picoModel_s picoModel_t;
-typedef struct picoModule_s picoModule_t;
-
-struct picoSurface_s
-{
- void *data;
-
- picoModel_t *model; /* owner model */
-
- picoSurfaceType_t type;
- char *name; /* sea: surface name */
- picoShader_t *shader; /* ydnar: changed to ptr */
-
- int numVertexes, maxVertexes;
- picoVec3_t *xyz;
- picoVec3_t *normal;
- picoIndex_t *smoothingGroup;
-
- int numSTArrays, maxSTArrays;
- picoVec2_t **st;
-
- int numColorArrays, maxColorArrays;
- picoColor_t **color;
-
- int numIndexes, maxIndexes;
- picoIndex_t *index;
-
- int numFaceNormals, maxFaceNormals;
- picoVec3_t *faceNormal;
-
- int special[ PICO_MAX_SPECIAL ];
-};
-
-
-/* seaw0lf */
-struct picoShader_s
-{
- picoModel_t *model; /* owner model */
-
- char *name; /* shader name */
- char *mapName; /* shader file name (name of diffuse texturemap) */
- picoColor_t ambientColor; /* ambient color of mesh (rgba) */
- picoColor_t diffuseColor; /* diffuse color of mesh (rgba) */
- picoColor_t specularColor; /* specular color of mesh (rgba) */
- float transparency; /* transparency (0..1; 1 = 100% transparent) */
- float shininess; /* shininess (0..128; 128 = 100% shiny) */
-};
-
-struct picoModel_s
-{
- void *data;
- char *name; /* model name */
- char *fileName; /* sea: model file name */
- int frameNum; /* sea: renamed to frameNum */
- int numFrames; /* sea: number of frames */
- picoVec3_t mins;
- picoVec3_t maxs;
-
- int numShaders, maxShaders;
- picoShader_t **shader;
-
- int numSurfaces, maxSurfaces;
- picoSurface_t **surface;
-
- const picoModule_t *module; /* sea */
-};
-
-
-/* seaw0lf */
-/* return codes used by the validation callbacks; pmv is short */
-/* for 'pico module validation'. everything >PICO_PMV_OK means */
-/* that there was an error. */
-enum
-{
- PICO_PMV_OK, /* file valid */
- PICO_PMV_ERROR, /* file not valid */
- PICO_PMV_ERROR_IDENT, /* unknown file magic (aka ident) */
- PICO_PMV_ERROR_VERSION, /* unsupported file version */
- PICO_PMV_ERROR_SIZE, /* file size error */
- PICO_PMV_ERROR_MEMORY, /* out of memory error */
-};
-
-/* convenience (makes it easy to add new params to the callbacks) */
-#define PM_PARAMS_CANLOAD \
- const char *fileName, const void *buffer, int bufSize
-
-#define PM_PARAMS_LOAD \
- const char *fileName, int frameNum, const void *buffer, int bufSize
-
-#define PM_PARAMS_CANSAVE \
- void
-
-#define PM_PARAMS_SAVE \
- const char *fileName, picoModel_t * model
-
-/* pico file format module structure */
-struct picoModule_s
-{
- char *version; /* internal module version (e.g. '1.5-b2') */
-
- char *displayName; /* string used to display in guis, etc. */
- char *authorName; /* author name (eg. 'My Real Name') */
- char *copyright; /* copyright year and holder (eg. '2002 My Company') */
-
- char *defaultExts[ PICO_MAX_DEFAULT_EXTS ]; /* default file extensions used by this file type */
- int ( *canload )( PM_PARAMS_CANLOAD ); /* checks whether module can load given file (returns PMVR_*) */
- picoModel_t *( *load )( PM_PARAMS_LOAD ); /* parses model file data */
- int ( *cansave )( PM_PARAMS_CANSAVE ); /* checks whether module can save (returns 1 or 0 and might spit out a message) */
- int ( *save )( PM_PARAMS_SAVE ); /* saves a pico model in module's native model format */
-};
-
-
-
-/* general functions */
-int PicoInit( void );
-void PicoShutdown( void );
-int PicoError( void );
-
-void PicoSetMallocFunc( void *( *func )( size_t ) );
-void PicoSetFreeFunc( void ( *func )( void* ) );
-void PicoSetLoadFileFunc( void ( *func )( const char*, unsigned char**, int* ) );
-void PicoSetFreeFileFunc( void ( *func )( void* ) );
-void PicoSetPrintFunc( void ( *func )( int, const char* ) );
-
-const picoModule_t **PicoModuleList( int *numModules );
-
-picoModel_t *PicoLoadModel( const char *name, int frameNum );
-
-typedef size_t ( *PicoInputStreamReadFunc )( void* inputStream, unsigned char* buffer, size_t length );
-picoModel_t* PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum, const char *fileName );
-
-/* model functions */
-picoModel_t *PicoNewModel( void );
-void PicoFreeModel( picoModel_t *model );
-int PicoAdjustModel( picoModel_t *model, int numShaders, int numSurfaces );
-
-
-/* shader functions */
-picoShader_t *PicoNewShader( picoModel_t *model );
-void PicoFreeShader( picoShader_t *shader );
-picoShader_t *PicoFindShader( picoModel_t *model, char *name, int caseSensitive );
-
-
-/* surface functions */
-picoSurface_t *PicoNewSurface( picoModel_t *model );
-void PicoFreeSurface( picoSurface_t *surface );
-picoSurface_t *PicoFindSurface( picoModel_t *model, char *name, int caseSensitive );
-int PicoAdjustSurface( picoSurface_t *surface, int numVertexes, int numSTArrays, int numColorArrays, int numIndexes, int numFaceNormals );
-
-
-/* setter functions */
-void PicoSetModelName( picoModel_t *model, const char *name );
-void PicoSetModelFileName( picoModel_t *model, const char *fileName );
-void PicoSetModelFrameNum( picoModel_t *model, int frameNum );
-void PicoSetModelNumFrames( picoModel_t *model, int numFrames );
-void PicoSetModelData( picoModel_t *model, void *data );
-
-void PicoSetShaderName( picoShader_t *shader, char *name );
-void PicoSetShaderMapName( picoShader_t *shader, char *mapName );
-void PicoSetShaderAmbientColor( picoShader_t *shader, picoColor_t color );
-void PicoSetShaderDiffuseColor( picoShader_t *shader, picoColor_t color );
-void PicoSetShaderSpecularColor( picoShader_t *shader, picoColor_t color );
-void PicoSetShaderTransparency( picoShader_t *shader, float value );
-void PicoSetShaderShininess( picoShader_t *shader, float value );
-
-void PicoSetSurfaceData( picoSurface_t *surface, void *data );
-void PicoSetSurfaceType( picoSurface_t *surface, picoSurfaceType_t type );
-void PicoSetSurfaceName( picoSurface_t *surface, const char *name );
-void PicoSetSurfaceShader( picoSurface_t *surface, picoShader_t *shader );
-void PicoSetSurfaceXYZ( picoSurface_t *surface, int num, picoVec3_t xyz );
-void PicoSetSurfaceNormal( picoSurface_t *surface, int num, picoVec3_t normal );
-void PicoSetSurfaceST( picoSurface_t *surface, int array, int num, picoVec2_t st );
-void PicoSetSurfaceColor( picoSurface_t *surface, int array, int num, picoColor_t color );
-void PicoSetSurfaceIndex( picoSurface_t *surface, int num, picoIndex_t index );
-void PicoSetSurfaceIndexes( picoSurface_t *surface, int num, picoIndex_t *index, int count );
-void PicoSetFaceNormal( picoSurface_t *surface, int num, picoVec3_t normal );
-void PicoSetSurfaceSpecial( picoSurface_t *surface, int num, int special );
-void PicoSetSurfaceSmoothingGroup( picoSurface_t *surface, int num, picoIndex_t smoothingGroup );
-
-
-/* getter functions */
-char *PicoGetModelName( picoModel_t *model );
-char *PicoGetModelFileName( picoModel_t *model );
-int PicoGetModelFrameNum( picoModel_t *model );
-int PicoGetModelNumFrames( picoModel_t *model );
-void *PicoGetModelData( picoModel_t *model );
-int PicoGetModelNumShaders( picoModel_t *model );
-picoShader_t *PicoGetModelShader( picoModel_t *model, int num ); /* sea */
-int PicoGetModelNumSurfaces( picoModel_t *model );
-picoSurface_t *PicoGetModelSurface( picoModel_t *model, int num );
-int PicoGetModelTotalVertexes( picoModel_t *model );
-int PicoGetModelTotalIndexes( picoModel_t *model );
-
-char *PicoGetShaderName( picoShader_t *shader );
-char *PicoGetShaderMapName( picoShader_t *shader );
-picoByte_t *PicoGetShaderAmbientColor( picoShader_t *shader );
-picoByte_t *PicoGetShaderDiffuseColor( picoShader_t *shader );
-picoByte_t *PicoGetShaderSpecularColor( picoShader_t *shader );
-float PicoGetShaderTransparency( picoShader_t *shader );
-float PicoGetShaderShininess( picoShader_t *shader );
-
-void *PicoGetSurfaceData( picoSurface_t *surface );
-char *PicoGetSurfaceName( picoSurface_t *surface ); /* sea */
-picoSurfaceType_t PicoGetSurfaceType( picoSurface_t *surface );
-char *PicoGetSurfaceName( picoSurface_t *surface );
-picoShader_t *PicoGetSurfaceShader( picoSurface_t *surface ); /* sea */
-
-int PicoGetSurfaceNumVertexes( picoSurface_t *surface );
-picoVec_t *PicoGetSurfaceXYZ( picoSurface_t *surface, int num );
-picoVec_t *PicoGetSurfaceNormal( picoSurface_t *surface, int num );
-picoVec_t *PicoGetSurfaceST( picoSurface_t *surface, int array, int num );
-picoByte_t *PicoGetSurfaceColor( picoSurface_t *surface, int array, int num );
-int PicoGetSurfaceNumIndexes( picoSurface_t *surface );
-picoIndex_t PicoGetSurfaceIndex( picoSurface_t *surface, int num );
-picoIndex_t *PicoGetSurfaceIndexes( picoSurface_t *surface, int num );
-picoVec_t *PicoGetFaceNormal( picoSurface_t *surface, int num );
-int PicoGetSurfaceSpecial( picoSurface_t *surface, int num );
-
-
-/* hashtable related functions */
-typedef struct picoVertexCombinationData_s
-{
- picoVec3_t xyz, normal;
- picoVec2_t st;
- picoColor_t color;
-} picoVertexCombinationData_t;
-
-typedef struct picoVertexCombinationHash_s
-{
- picoVertexCombinationData_t vcd;
- picoIndex_t index;
-
- void *data;
-
- struct picoVertexCombinationHash_s *next;
-} picoVertexCombinationHash_t;
-
-int PicoGetHashTableSize( void );
-unsigned int PicoVertexCoordGenerateHash( picoVec3_t xyz );
-picoVertexCombinationHash_t **PicoNewVertexCombinationHashTable( void );
-void PicoFreeVertexCombinationHashTable( picoVertexCombinationHash_t **hashTable );
-picoVertexCombinationHash_t *PicoFindVertexCombinationInHashTable( picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color );
-picoVertexCombinationHash_t *PicoAddVertexCombinationToHashTable( picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color, picoIndex_t index );
-
-/* specialized functions */
-int PicoFindSurfaceVertexNum( picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, picoColor_t *color, picoIndex_t smoothingGroup );
-void PicoFixSurfaceNormals( picoSurface_t *surface );
-int PicoRemapModel( picoModel_t *model, char *remapFile );
-
-
-void PicoAddTriangleToModel( picoModel_t *model, picoVec3_t** xyz, picoVec3_t** normals, int numSTs, picoVec2_t **st, int numColors, picoColor_t **colors, picoShader_t* shader, const char *name, picoIndex_t* smoothingGroup );
-
-/* end marker */
-#ifdef __cplusplus
-}
-#endif
-
-#endif
add_library(picomodel
- lwo/clip.c
- lwo/envelope.c
- lwo/list.c
- lwo/lwio.c
- lwo/lwo2.c
- lwo/lwo2.h
- lwo/lwob.c
- lwo/pntspols.c
- lwo/surface.c
- lwo/vecmath.c
- lwo/vmap.c
- picointernal.c
- picointernal.h
- picomodel.c
- picomodules.c
- pm_3ds.c
- pm_ase.c
- pm_fm.c
- pm_fm.h
- pm_lwo.c
- pm_md2.c
- pm_md3.c
- pm_mdc.c
- pm_ms3d.c
- pm_obj.c
- pm_terrain.c
-)
+ lwo/clip.c
+ lwo/envelope.c
+ lwo/list.c
+ lwo/lwio.c
+ lwo/lwo2.c lwo/lwo2.h
+ lwo/lwob.c
+ lwo/pntspols.c
+ lwo/surface.c
+ lwo/vecmath.c
+ lwo/vmap.c
+
+ picointernal.c picointernal.h
+ picomodel.c picomodel.h
+ picomodules.c
+ pm_3ds.c
+ pm_ase.c
+ pm_fm.c pm_fm.h
+ pm_lwo.c
+ pm_md2.c
+ pm_md3.c
+ pm_mdc.c
+ pm_ms3d.c
+ pm_obj.c
+ pm_terrain.c
+ )
--- /dev/null
+/* -----------------------------------------------------------------------------
+
+ PicoModel Library
+
+ Copyright (c) 2002, Randy Reddig & seaw0lf
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+ Neither the names of the copyright holders nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ----------------------------------------------------------------------------- */
+
+
+
+/* marker */
+#ifndef PICOMODEL_H
+#define PICOMODEL_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stddef.h>
+
+
+
+/* version */
+#define PICOMODEL_VERSION "0.8.20"
+
+
+/* constants */
+#define PICO_GROW_SHADERS 16
+#define PICO_GROW_SURFACES 16
+#define PICO_GROW_VERTEXES 1024
+#define PICO_GROW_INDEXES 1024
+#define PICO_GROW_ARRAYS 8
+#define PICO_GROW_FACES 256
+#define PICO_MAX_SPECIAL 8
+#define PICO_MAX_DEFAULT_EXTS 4 /* max default extensions per module */
+
+
+/* types */
+typedef unsigned char picoByte_t;
+typedef float picoVec_t;
+typedef float picoVec2_t[ 2 ];
+typedef float picoVec3_t[ 3 ];
+typedef float picoVec4_t[ 4 ];
+typedef picoByte_t picoColor_t[ 4 ];
+typedef int picoIndex_t;
+
+typedef enum
+{
+ PICO_BAD,
+ PICO_TRIANGLES,
+ PICO_PATCH
+}
+picoSurfaceType_t;
+
+typedef enum
+{
+ PICO_NORMAL,
+ PICO_VERBOSE,
+ PICO_WARNING,
+ PICO_ERROR,
+ PICO_FATAL
+}
+picoPrintLevel_t;
+
+typedef struct picoSurface_s picoSurface_t;
+typedef struct picoShader_s picoShader_t;
+typedef struct picoModel_s picoModel_t;
+typedef struct picoModule_s picoModule_t;
+
+struct picoSurface_s
+{
+ void *data;
+
+ picoModel_t *model; /* owner model */
+
+ picoSurfaceType_t type;
+ char *name; /* sea: surface name */
+ picoShader_t *shader; /* ydnar: changed to ptr */
+
+ int numVertexes, maxVertexes;
+ picoVec3_t *xyz;
+ picoVec3_t *normal;
+ picoIndex_t *smoothingGroup;
+
+ int numSTArrays, maxSTArrays;
+ picoVec2_t **st;
+
+ int numColorArrays, maxColorArrays;
+ picoColor_t **color;
+
+ int numIndexes, maxIndexes;
+ picoIndex_t *index;
+
+ int numFaceNormals, maxFaceNormals;
+ picoVec3_t *faceNormal;
+
+ int special[ PICO_MAX_SPECIAL ];
+};
+
+
+/* seaw0lf */
+struct picoShader_s
+{
+ picoModel_t *model; /* owner model */
+
+ char *name; /* shader name */
+ char *mapName; /* shader file name (name of diffuse texturemap) */
+ picoColor_t ambientColor; /* ambient color of mesh (rgba) */
+ picoColor_t diffuseColor; /* diffuse color of mesh (rgba) */
+ picoColor_t specularColor; /* specular color of mesh (rgba) */
+ float transparency; /* transparency (0..1; 1 = 100% transparent) */
+ float shininess; /* shininess (0..128; 128 = 100% shiny) */
+};
+
+struct picoModel_s
+{
+ void *data;
+ char *name; /* model name */
+ char *fileName; /* sea: model file name */
+ int frameNum; /* sea: renamed to frameNum */
+ int numFrames; /* sea: number of frames */
+ picoVec3_t mins;
+ picoVec3_t maxs;
+
+ int numShaders, maxShaders;
+ picoShader_t **shader;
+
+ int numSurfaces, maxSurfaces;
+ picoSurface_t **surface;
+
+ const picoModule_t *module; /* sea */
+};
+
+
+/* seaw0lf */
+/* return codes used by the validation callbacks; pmv is short */
+/* for 'pico module validation'. everything >PICO_PMV_OK means */
+/* that there was an error. */
+enum
+{
+ PICO_PMV_OK, /* file valid */
+ PICO_PMV_ERROR, /* file not valid */
+ PICO_PMV_ERROR_IDENT, /* unknown file magic (aka ident) */
+ PICO_PMV_ERROR_VERSION, /* unsupported file version */
+ PICO_PMV_ERROR_SIZE, /* file size error */
+ PICO_PMV_ERROR_MEMORY, /* out of memory error */
+};
+
+/* convenience (makes it easy to add new params to the callbacks) */
+#define PM_PARAMS_CANLOAD \
+ const char *fileName, const void *buffer, int bufSize
+
+#define PM_PARAMS_LOAD \
+ const char *fileName, int frameNum, const void *buffer, int bufSize
+
+#define PM_PARAMS_CANSAVE \
+ void
+
+#define PM_PARAMS_SAVE \
+ const char *fileName, picoModel_t * model
+
+/* pico file format module structure */
+struct picoModule_s
+{
+ char *version; /* internal module version (e.g. '1.5-b2') */
+
+ char *displayName; /* string used to display in guis, etc. */
+ char *authorName; /* author name (eg. 'My Real Name') */
+ char *copyright; /* copyright year and holder (eg. '2002 My Company') */
+
+ char *defaultExts[ PICO_MAX_DEFAULT_EXTS ]; /* default file extensions used by this file type */
+ int ( *canload )( PM_PARAMS_CANLOAD ); /* checks whether module can load given file (returns PMVR_*) */
+ picoModel_t *( *load )( PM_PARAMS_LOAD ); /* parses model file data */
+ int ( *cansave )( PM_PARAMS_CANSAVE ); /* checks whether module can save (returns 1 or 0 and might spit out a message) */
+ int ( *save )( PM_PARAMS_SAVE ); /* saves a pico model in module's native model format */
+};
+
+
+
+/* general functions */
+int PicoInit( void );
+void PicoShutdown( void );
+int PicoError( void );
+
+void PicoSetMallocFunc( void *( *func )( size_t ) );
+void PicoSetFreeFunc( void ( *func )( void* ) );
+void PicoSetLoadFileFunc( void ( *func )( const char*, unsigned char**, int* ) );
+void PicoSetFreeFileFunc( void ( *func )( void* ) );
+void PicoSetPrintFunc( void ( *func )( int, const char* ) );
+
+const picoModule_t **PicoModuleList( int *numModules );
+
+picoModel_t *PicoLoadModel( const char *name, int frameNum );
+
+typedef size_t ( *PicoInputStreamReadFunc )( void* inputStream, unsigned char* buffer, size_t length );
+picoModel_t* PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum, const char *fileName );
+
+/* model functions */
+picoModel_t *PicoNewModel( void );
+void PicoFreeModel( picoModel_t *model );
+int PicoAdjustModel( picoModel_t *model, int numShaders, int numSurfaces );
+
+
+/* shader functions */
+picoShader_t *PicoNewShader( picoModel_t *model );
+void PicoFreeShader( picoShader_t *shader );
+picoShader_t *PicoFindShader( picoModel_t *model, char *name, int caseSensitive );
+
+
+/* surface functions */
+picoSurface_t *PicoNewSurface( picoModel_t *model );
+void PicoFreeSurface( picoSurface_t *surface );
+picoSurface_t *PicoFindSurface( picoModel_t *model, char *name, int caseSensitive );
+int PicoAdjustSurface( picoSurface_t *surface, int numVertexes, int numSTArrays, int numColorArrays, int numIndexes, int numFaceNormals );
+
+
+/* setter functions */
+void PicoSetModelName( picoModel_t *model, const char *name );
+void PicoSetModelFileName( picoModel_t *model, const char *fileName );
+void PicoSetModelFrameNum( picoModel_t *model, int frameNum );
+void PicoSetModelNumFrames( picoModel_t *model, int numFrames );
+void PicoSetModelData( picoModel_t *model, void *data );
+
+void PicoSetShaderName( picoShader_t *shader, char *name );
+void PicoSetShaderMapName( picoShader_t *shader, char *mapName );
+void PicoSetShaderAmbientColor( picoShader_t *shader, picoColor_t color );
+void PicoSetShaderDiffuseColor( picoShader_t *shader, picoColor_t color );
+void PicoSetShaderSpecularColor( picoShader_t *shader, picoColor_t color );
+void PicoSetShaderTransparency( picoShader_t *shader, float value );
+void PicoSetShaderShininess( picoShader_t *shader, float value );
+
+void PicoSetSurfaceData( picoSurface_t *surface, void *data );
+void PicoSetSurfaceType( picoSurface_t *surface, picoSurfaceType_t type );
+void PicoSetSurfaceName( picoSurface_t *surface, const char *name );
+void PicoSetSurfaceShader( picoSurface_t *surface, picoShader_t *shader );
+void PicoSetSurfaceXYZ( picoSurface_t *surface, int num, picoVec3_t xyz );
+void PicoSetSurfaceNormal( picoSurface_t *surface, int num, picoVec3_t normal );
+void PicoSetSurfaceST( picoSurface_t *surface, int array, int num, picoVec2_t st );
+void PicoSetSurfaceColor( picoSurface_t *surface, int array, int num, picoColor_t color );
+void PicoSetSurfaceIndex( picoSurface_t *surface, int num, picoIndex_t index );
+void PicoSetSurfaceIndexes( picoSurface_t *surface, int num, picoIndex_t *index, int count );
+void PicoSetFaceNormal( picoSurface_t *surface, int num, picoVec3_t normal );
+void PicoSetSurfaceSpecial( picoSurface_t *surface, int num, int special );
+void PicoSetSurfaceSmoothingGroup( picoSurface_t *surface, int num, picoIndex_t smoothingGroup );
+
+
+/* getter functions */
+char *PicoGetModelName( picoModel_t *model );
+char *PicoGetModelFileName( picoModel_t *model );
+int PicoGetModelFrameNum( picoModel_t *model );
+int PicoGetModelNumFrames( picoModel_t *model );
+void *PicoGetModelData( picoModel_t *model );
+int PicoGetModelNumShaders( picoModel_t *model );
+picoShader_t *PicoGetModelShader( picoModel_t *model, int num ); /* sea */
+int PicoGetModelNumSurfaces( picoModel_t *model );
+picoSurface_t *PicoGetModelSurface( picoModel_t *model, int num );
+int PicoGetModelTotalVertexes( picoModel_t *model );
+int PicoGetModelTotalIndexes( picoModel_t *model );
+
+char *PicoGetShaderName( picoShader_t *shader );
+char *PicoGetShaderMapName( picoShader_t *shader );
+picoByte_t *PicoGetShaderAmbientColor( picoShader_t *shader );
+picoByte_t *PicoGetShaderDiffuseColor( picoShader_t *shader );
+picoByte_t *PicoGetShaderSpecularColor( picoShader_t *shader );
+float PicoGetShaderTransparency( picoShader_t *shader );
+float PicoGetShaderShininess( picoShader_t *shader );
+
+void *PicoGetSurfaceData( picoSurface_t *surface );
+char *PicoGetSurfaceName( picoSurface_t *surface ); /* sea */
+picoSurfaceType_t PicoGetSurfaceType( picoSurface_t *surface );
+char *PicoGetSurfaceName( picoSurface_t *surface );
+picoShader_t *PicoGetSurfaceShader( picoSurface_t *surface ); /* sea */
+
+int PicoGetSurfaceNumVertexes( picoSurface_t *surface );
+picoVec_t *PicoGetSurfaceXYZ( picoSurface_t *surface, int num );
+picoVec_t *PicoGetSurfaceNormal( picoSurface_t *surface, int num );
+picoVec_t *PicoGetSurfaceST( picoSurface_t *surface, int array, int num );
+picoByte_t *PicoGetSurfaceColor( picoSurface_t *surface, int array, int num );
+int PicoGetSurfaceNumIndexes( picoSurface_t *surface );
+picoIndex_t PicoGetSurfaceIndex( picoSurface_t *surface, int num );
+picoIndex_t *PicoGetSurfaceIndexes( picoSurface_t *surface, int num );
+picoVec_t *PicoGetFaceNormal( picoSurface_t *surface, int num );
+int PicoGetSurfaceSpecial( picoSurface_t *surface, int num );
+
+
+/* hashtable related functions */
+typedef struct picoVertexCombinationData_s
+{
+ picoVec3_t xyz, normal;
+ picoVec2_t st;
+ picoColor_t color;
+} picoVertexCombinationData_t;
+
+typedef struct picoVertexCombinationHash_s
+{
+ picoVertexCombinationData_t vcd;
+ picoIndex_t index;
+
+ void *data;
+
+ struct picoVertexCombinationHash_s *next;
+} picoVertexCombinationHash_t;
+
+int PicoGetHashTableSize( void );
+unsigned int PicoVertexCoordGenerateHash( picoVec3_t xyz );
+picoVertexCombinationHash_t **PicoNewVertexCombinationHashTable( void );
+void PicoFreeVertexCombinationHashTable( picoVertexCombinationHash_t **hashTable );
+picoVertexCombinationHash_t *PicoFindVertexCombinationInHashTable( picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color );
+picoVertexCombinationHash_t *PicoAddVertexCombinationToHashTable( picoVertexCombinationHash_t **hashTable, picoVec3_t xyz, picoVec3_t normal, picoVec3_t st, picoColor_t color, picoIndex_t index );
+
+/* specialized functions */
+int PicoFindSurfaceVertexNum( picoSurface_t *surface, picoVec3_t xyz, picoVec3_t normal, int numSTs, picoVec2_t *st, int numColors, picoColor_t *color, picoIndex_t smoothingGroup );
+void PicoFixSurfaceNormals( picoSurface_t *surface );
+int PicoRemapModel( picoModel_t *model, char *remapFile );
+
+
+void PicoAddTriangleToModel( picoModel_t *model, picoVec3_t** xyz, picoVec3_t** normals, int numSTs, picoVec2_t **st, int numColors, picoColor_t **colors, picoShader_t* shader, const char *name, picoIndex_t* smoothingGroup );
+
+/* end marker */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pivot.h"
add_library(profile
- file.cpp
- file.h
- profile.cpp
- profile.h
-)
+ file.cpp file.h
+ profile.cpp profile.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "render.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "scenelib.h"
add_library(script
- scripttokeniser.cpp
- scripttokeniser.h
- scripttokenwriter.cpp
- scripttokenwriter.h
-)
+ scripttokeniser.h
+ scripttokenwriter.h
+ )
+set_target_properties(script PROPERTIES LINKER_LANGUAGE CXX)
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "scripttokeniser.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "scripttokenwriter.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "selectionlib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "shaderlib.h"
add_library(signal
- isignal.cpp
- isignal.h
- signal.cpp
- signal.h
- signalfwd.cpp
- signalfwd.h
-)
+ isignal.h
+ signal.cpp signal.h
+ signalfwd.h
+ )
+++ /dev/null
-
-#include "isignal.h"
+++ /dev/null
-
-#include "signalfwd.h"
add_library(splines
- math_angles.cpp
- math_angles.h
- math_matrix.cpp
- math_matrix.h
- math_quaternion.cpp
- math_quaternion.h
- math_vector.cpp
- math_vector.h
- q_parse.cpp
- q_shared.cpp
- q_shared.h
- splines.cpp
- splines.h
- util_list.h
- util_str.cpp
- util_str.h
-)
+ math_angles.cpp math_angles.h
+ math_matrix.cpp math_matrix.h
+ math_quaternion.cpp math_quaternion.h
+ math_vector.cpp math_vector.h
+ q_parse.cpp
+ q_shared.cpp q_shared.h
+ splines.cpp splines.h
+ util_list.h
+ util_str.cpp util_str.h
+ )
+++ /dev/null
-/*
- Copyright (c) 2001, Loki software, inc.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this list
- of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
- Neither the name of Loki software nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific prior
- written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
- DIRECT,INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "str.h"
add_library(stream
- filestream.cpp
- filestream.h
- memstream.cpp
- memstream.h
- stringstream.cpp
- stringstream.h
- textfilestream.cpp
- textfilestream.h
- textstream.cpp
- textstream.h
-)
+ filestream.h
+ memstream.h
+ stringstream.h
+ textfilestream.h
+ textstream.h
+ )
+set_target_properties(stream PROPERTIES LINKER_LANGUAGE CXX)
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "filestream.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "memstream.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stringstream.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "textfilestream.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "textstream.h"
add_library(string
- pooledstring.cpp
- pooledstring.h
- string.h
-)
+ pooledstring.cpp pooledstring.h
+ string.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "stringio.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "texturelib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "transformlib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "traverselib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "typesystem.h"
add_library(uilib
- uilib.cpp
- uilib.h
-)
+ uilib.cpp uilib.h
+ )
+
+find_package(GTK2 REQUIRED)
+target_include_directories(uilib PRIVATE ${GTK2_INCLUDE_DIRS})
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "undolib.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "uniquenames.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "versionlib.h"
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
-
add_library(xmllib
- ixml.cpp
- ixml.h
- xmlelement.cpp
- xmlelement.h
- xmlparser.cpp
- xmlparser.h
- xmltextags.cpp
- xmltextags.h
- xmlwriter.cpp
- xmlwriter.h
-)
+ ixml.h
+ xmlelement.h
+ xmlparser.h
+ xmltextags.cpp xmltextags.h
+ xmlwriter.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS})
+
+find_package(LibXml2 REQUIRED)
+target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR})
target_link_libraries(xmllib ${LIBXML2_LIBRARIES})
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ixml.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "xmlelement.h"
#if !defined( INCLUDED_XML_XMLELEMENT_H )
#define INCLUDED_XML_XMLELEMENT_H
-#include "xml/ixml.h"
+#include "ixml.h"
#include "string/string.h"
#include <map>
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "xmlparser.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "xmlwriter.h"
+++ /dev/null
-# Usage:
-# copy this file to Makefile.conf
-# edit the paths in here
-
-# how to get pkg-config
-PKGCONFIG ?= $(RADIANT_DEPENDENCIES_PREFIX)/gtk/bin/pkg-config.exe
-
-# extra utils
-GIT ?= $(RADIANT_DEPENDENCIES_PREFIX)/util/bin/git
-SVN ?= $(RADIANT_DEPENDENCIES_PREFIX)/util/bin/svn
-
-# these two need the "start" workaround, or they seem to crash (TODO figure out why)
-WGET ?= start $(RADIANT_DEPENDENCIES_PREFIX)/util/bin/wget
-UNZIPPER ?= start $(RADIANT_DEPENDENCIES_PREFIX)/util/bin/unzip
-
-# use mingw32
-include mingw-Makefile.inc
-include mingw-radiantdeps-Makefile.inc
+++ /dev/null
-# how to call the mingw tools
-MINGW_EXEC_PREFIX ?=
-
-# set the environment for make
-OS = Win32
-
-#CPPFLAGS_XML =
-#LIBS_XML = -lxml2
-
-CC = $(MINGW_EXEC_PREFIX)gcc
-CXX = $(MINGW_EXEC_PREFIX)g++
-LDD =
-RANLIB = $(MINGW_EXEC_PREFIX)ranlib
-AR = $(MINGW_EXEC_PREFIX)ar
-WINDRES = $(MINGW_EXEC_PREFIX)windres
+++ /dev/null
-# Usage:
-# copy this file to Makefile.conf
-# edit the paths in here
-
-# how to call the mingw tools
-MINGW_TARGET_ARCH=i686
-#MINGW_TARGET_ARCH=x86_64
-MINGW_EXEC_PREFIX = $(MINGW_TARGET_ARCH)-w64-mingw32-
-
-# use custom pkg-config
-PKGCONFIG = $(MINGW_EXEC_PREFIX)pkg-config
-
-# use custom dll install script
-DLLINSTALL = install-dlls-fedora.sh
-
-# use mingw32
-include mingw-Makefile.inc
+++ /dev/null
-# where the dependencies package is extracted
-RADIANT_DEPENDENCIES_PREFIX = $(HOME)/netradiant-dependencies-mingw32/
-
-# run the prefix fixing tool
-IGNORETHIS := $(shell cd $(RADIANT_DEPENDENCIES_PREFIX) && ./fixprefix.sh)
-
-# set the environment for make
-CFLAGS +=
-CXXFLAGS +=
-CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/include
-LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib
-CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/gtk/include
-LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib
-PKG_CONFIG_PATH := $(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib/pkgconfig:$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib/pkgconfig:$(PKG_CONFIG_PATH)
-WHICHDLL = $(RADIANT_DEPENDENCIES_PREFIX)/whichdll.sh
include_directories("${CMAKE_SOURCE_DIR}/libs")
include_directories("${CMAKE_SOURCE_DIR}/include")
-find_package(GTK2 REQUIRED)
-include_directories(${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
-
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules")
add_custom_target(modules)
radiant_plugin(archivepak
- archive.cpp
- archive.h
- pak.cpp
- pak.h
- plugin.cpp
- plugin.h
-)
+ archive.cpp archive.h
+ pak.h
+ plugin.cpp
+ )
#include "archive.h"
#include "idatastream.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "bytestreamutils.h"
#include <algorithm>
#include "stream/filestream.h"
#include "archivelib.h"
-
-#include "plugin.h"
-
#include <map>
#include "string/string.h"
#include "fs_filesystem.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pak.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "iarchive.h"
#include "debugging/debugging.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(archivewad
- archive.cpp
- archive.h
- plugin.cpp
- plugin.h
- wad.cpp
- wad.h
-)
+ archive.cpp archive.h
+ plugin.cpp
+ wad.h
+ )
#include "archive.h"
#include "idatastream.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "bytestreamutils.h"
#include <algorithm>
#include "stream/filestream.h"
#include "archivelib.h"
-#include "plugin.h"
-
#include <map>
#include "string/string.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "iarchive.h"
#include "debugging/debugging.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "wad.h"
-
radiant_plugin(archivezip
- archive.cpp
- archive.h
- pkzip.cpp
- pkzip.h
- plugin.cpp
- plugin.h
- zlibstream.cpp
- zlibstream.h
-)
+ archive.cpp archive.h
+ pkzip.h
+ plugin.cpp
+ zlibstream.h
+ )
find_package(ZLIB REQUIRED)
-include_directories(${ZLIB_INCLUDE_DIRS})
-
-target_link_libraries(archivezip ${ZLIB_LIBRARIES})
+target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS})
*/
#include "idatastream.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "bytestreamutils.h"
#include "modulesystem.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "pkzip.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "iarchive.h"
#include "debugging/debugging.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "zlibstream.h"
+++ /dev/null
-# Common configuration options for all plugins
-
-CC=gcc
-CXX=g++
-CFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
-CPPFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
-LDFLAGS+=`gtk-config --libs` -shared
-OUTDIR=$(RADIANT_DATA)plugins
-OBJS := $(patsubst %.cpp,%.o,$(filter %.cpp,$(SRC)))
-OBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRC)))
-
-all: $(OUTPUT)
-
-$(OUTPUT): $(OBJS)
- $(CXX) -o $(OUTPUT) $(OBJS) $(LDFLAGS)
- @if [ -d $(OUTDIR) ]; then cp $(OUTPUT) $(OUTDIR); fi
-
-## Other targets
-.PHONY: clean
-
-clean:
- rm -f *.o *.d $(OUTPUT) core
-
-## Dependencies
--include $(OBJS:.o=.d)
-
-%.d: %.cpp
- @echo -n "$(@) " > $@
- @if { !(eval $(CXX) -MM $(CPPFLAGS) -w $<) >> $@; }; then \
- rm -f $@; exit 1; \
- fi
- @[ -s $@ ] || rm -f $@
-
radiant_plugin(entity
- angle.cpp
- angle.h
- angles.cpp
- angles.h
- colour.cpp
- colour.h
- curve.cpp
- curve.h
- doom3group.cpp
- doom3group.h
- eclassmodel.cpp
- eclassmodel.h
- entity.cpp
- entity.h
- filters.cpp
- filters.h
- generic.cpp
- generic.h
- group.cpp
- group.h
- keyobservers.cpp
- keyobservers.h
- light.cpp
- light.h
- miscmodel.cpp
- miscmodel.h
- model.cpp
- model.h
- modelskinkey.cpp
- modelskinkey.h
- namedentity.cpp
- namedentity.h
- namekeys.cpp
- namekeys.h
- origin.cpp
- origin.h
- plugin.cpp
- plugin.h
- rotation.cpp
- rotation.h
- scale.cpp
- scale.h
- skincache.cpp
- skincache.h
- targetable.cpp
- targetable.h
-)
+ angle.h
+ angles.h
+ colour.h
+ curve.h
+ doom3group.cpp doom3group.h
+ eclassmodel.cpp eclassmodel.h
+ entity.cpp entity.h
+ filters.cpp filters.h
+ generic.cpp generic.h
+ group.cpp group.h
+ keyobservers.h
+ light.cpp light.h
+ miscmodel.cpp miscmodel.h
+ model.h
+ modelskinkey.h
+ namedentity.h
+ namekeys.h
+ origin.h
+ plugin.cpp
+ rotation.h
+ scale.h
+ skincache.cpp skincache.h
+ targetable.cpp targetable.h
+ )
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "angle.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "angles.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "colour.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "curve.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "keyobservers.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "model.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "modelskinkey.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "namedentity.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "namekeys.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "origin.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "debugging/debugging.h"
#include "iscenegraph.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "rotation.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "scale.h"
-
radiant_plugin(image
- bmp.cpp
- bmp.h
- dds.cpp
- dds.h
- image.h
- jpeg.cpp
- jpeg.h
- pcx.cpp
- pcx.h
- tga.cpp
- tga.h
- image.cpp
- ktx.cpp
- ktx.h
-)
+ bmp.cpp bmp.h
+ dds.cpp dds.h
+ image.cpp
+ jpeg.cpp jpeg.h
+ ktx.cpp ktx.h
+ pcx.cpp pcx.h
+ tga.cpp tga.h
+ )
find_package(JPEG REQUIRED)
-include_directories(${JPEG_INCLUDE_DIR})
+target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR})
target_link_libraries(image ddslib etclib ${JPEG_LIBRARIES})
#include "iarchive.h"
#include "idatastream.h"
-#include "ddslib.h"
+#include "ddslib/ddslib.h"
#include "imagelib.h"
Image* LoadDDSBuff( const byte* buffer ){
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "image.h"
-
#include "ifilesystem.h"
#include "iimage.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_IMAGE_H )
-#define INCLUDED_IMAGE_H
-
-#endif
#include <string.h>
#include "bytestreamutils.h"
-#include "etclib.h"
+#include "etclib/etclib.h"
#include "ifilesystem.h"
#include "imagelib.h"
radiant_plugin(imagehl
- hlw.cpp
- hlw.h
- imagehl.cpp
- imagehl.h
- mip.cpp
- mip.h
- sprite.cpp
- sprite.h
-)
+ hlw.cpp hlw.h
+ imagehl.cpp
+ mip.cpp mip.h
+ sprite.cpp sprite.h
+ )
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "imagehl.h"
-
#include "debugging/debugging.h"
#include "ifilesystem.h"
#include "iimage.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_IMAGEHL_H )
-#define INCLUDED_IMAGEHL_H
-
-#endif
radiant_plugin(imagepng
- plugin.cpp
- plugin.h
-)
+ plugin.cpp
+ )
find_package(PNG REQUIRED)
-include_directories(${PNG_INCLUDE_DIR})
-
-target_link_libraries(imagepng ${PNG_LIBRARIES})
+target_include_directories(imagepng PRIVATE ${PNG_INCLUDE_DIR})
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "debugging/debugging.h"
#include "ifilesystem.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(imageq2
- imageq2.cpp
- imageq2.h
- wal.cpp
- wal.h
- wal32.cpp
- wal32.h
-)
+ imageq2.cpp
+ wal.cpp wal.h
+ wal32.cpp wal32.h
+ )
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "imageq2.h"
-
#include "debugging/debugging.h"
#include "ifilesystem.h"
#include "iimage.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_IMAGEQ2_H )
-#define INCLUDED_IMAGEQ2_H
-
-#endif
radiant_plugin(mapq3
- parse.cpp
- parse.h
- plugin.cpp
- plugin.h
- write.cpp
- write.h
-)
+ parse.cpp parse.h
+ plugin.cpp
+ write.cpp write.h
+ )
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "iscriplib.h"
#include "ibrush.h"
#include "ipatch.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(mapxml
- plugin.cpp
- plugin.h
- xmlparse.cpp
- xmlparse.h
- xmlwrite.cpp
- xmlwrite.h
-)
-
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
+ plugin.cpp
+ xmlparse.cpp xmlparse.h
+ xmlwrite.cpp xmlwrite.h
+ )
-target_link_libraries(mapxml ${LIBXML2_LIBRARIES})
+target_link_libraries(mapxml xmllib)
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "ibrush.h"
#include "ipatch.h"
#include "ifiletypes.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(md3model
- ident.h
- md2.cpp
- md2.h
- md3.cpp
- md3.h
- md3normals.cpp
- md3normals.h
- md5.cpp
- md5.h
- mdc.cpp
- mdc.h
- mdl.cpp
- mdl.h
- mdlformat.cpp
- mdlformat.h
- mdlimage.cpp
- mdlimage.h
- mdlnormals.cpp
- mdlnormals.h
- model.cpp
- model.h
- plugin.cpp
- plugin.h
-)
+ ident.h
+ md2.cpp md2.h
+ md3.cpp md3.h
+ md3normals.h
+ md5.cpp md5.h
+ mdc.cpp mdc.h
+ mdl.cpp mdl.h
+ mdlformat.h
+ mdlimage.cpp mdlimage.h
+ mdlnormals.h
+ model.h
+ plugin.cpp
+ )
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "md3normals.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "mdlformat.h"
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "mdlnormals.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "model.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "iscenegraph.h"
#include "irender.h"
#include "iselection.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(model
- model.cpp
- model.h
- plugin.cpp
- plugin.h
-)
+ model.cpp model.h
+ plugin.cpp
+ )
target_link_libraries(model picomodel)
#include "model.h"
-#include "picomodel.h"
+#include "picomodel/picomodel.h"
#include "iarchive.h"
#include "idatastream.h"
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include <stdio.h>
-#include "picomodel.h"
+#include "picomodel/picomodel.h"
typedef unsigned char byte;
#include <cstdlib>
#include <algorithm>
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
-
radiant_plugin(sample
- sample.cpp
- sample.h
-)
+ sample.cpp
+ )
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "sample.h"
-
#include "debugging/debugging.h"
#include "iplugin.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_SAMPLE_H )
-#define INCLUDED_SAMPLE_H
-
-#endif
-
radiant_plugin(shaders
- plugin.cpp
- plugin.h
- shaders.cpp
- shaders.h
-)
+ plugin.cpp
+ shaders.cpp shaders.h
+ )
find_package(GLIB REQUIRED)
-include_directories(${GLIB_INCLUDE_DIRS})
-
-target_link_libraries(shaders ${GLIB_LIBRARIES})
+target_include_directories(shaders PRIVATE ${GLIB_INCLUDE_DIRS})
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "plugin.h"
-
#include "ishaders.h"
#include "ifilesystem.h"
#include "itextures.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_PLUGIN_H )
-#define INCLUDED_PLUGIN_H
-
-#endif
#include "stringio.h"
#include "shaderlib.h"
#include "texturelib.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "moduleobservers.h"
#include "archivelib.h"
#include "imagelib.h"
-
radiant_plugin(spritemodel
- plugin.cpp
- plugin.h
- spritemodel.cpp
- spritemodel.h
-)
+ plugin.cpp plugin.h
+ spritemodel.cpp spritemodel.h
+ )
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include <string.h>
#include "qertypes.h"
#include <stdio.h>
-
radiant_plugin(textool
- 2DView.cpp
- 2DView.h
- ControlPointsManager.cpp
- ControlPointsManager.h
- StdAfx.cpp
- StdAfx.h
- TexTool.cpp
- resource.h
-)
+ 2DView.cpp 2DView.h
+ ControlPointsManager.cpp ControlPointsManager.h
+ resource.h
+ StdAfx.h
+ TexTool.cpp
+ )
+++ /dev/null
-/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-// stdafx.cpp : source file that includes just the standard includes
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
#include "synapse.h"
#include "iplugin.h"
#include "qerplugin.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "igl.h"
#include "iselectedface.h"
#include "isurfaceplugin.h"
-
radiant_plugin(vfspk3
- archive.cpp
- archive.h
- vfs.cpp
- vfs.h
- vfspk3.cpp
- vfspk3.h
-)
+ archive.cpp archive.h
+ vfs.cpp vfs.h
+ vfspk3.cpp
+ )
find_package(GLIB REQUIRED)
-include_directories(${GLIB_INCLUDE_DIRS})
+target_include_directories(vfspk3 PRIVATE ${GLIB_INCLUDE_DIRS})
-target_link_libraries(vfspk3 filematch ${GLIB_LIBRARIES})
+target_link_libraries(vfspk3 filematch)
#include "archivelib.h"
#include "fs_path.h"
-#include "vfspk3.h"
-
class DirectoryArchive : public Archive
{
#include "stream/stringstream.h"
#include "os/path.h"
#include "moduleobservers.h"
-#include "filematch.h"
+#include "filematch/filematch.h"
#define VFS_MAXDIRS 64
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "vfspk3.h"
-
#include "qerplugin.h"
#include "iarchive.h"
#include "ifilesystem.h"
+++ /dev/null
-/*
- Copyright (C) 2001-2006, William Joseph.
- All Rights Reserved.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined( INCLUDED_VFSPK3_H )
-#define INCLUDED_VFSPK3_H
-
-#endif
-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
find_package(LibXml2 REQUIRED)
find_package(GTK2 REQUIRED)
include_directories(${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
+find_package(OpenGL REQUIRED)
+
find_package(GtkGLExt REQUIRED)
include_directories(${GTKGL_INCLUDE_DIRS})
target_link_libraries(radiant
${CMAKE_DL_LIBS}
${LIBXML2_LIBRARIES}
- ${GTK2_LIBRARIES}
${OPENGL_gl_LIBRARY}
+ ${GTK2_LIBRARIES}
+ ${GTKGL_LIBRARIES}
+ includes
cmdlib
container
ddslib
debugging
+ etclib
+ filematch
+ generic
gtkutil
- ${GTKGL_LIBRARIES}
l_net
-# math
+ math
mathlib
md5lib
memory
uilib
xmllib
)
-if(NOT WIN32)
- target_link_libraries(radiant ${X11_LIBRARIES})
-endif()
#include "os/file.h"
#include "os/path.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "stream/stringstream.h"
#include "gtkutil/messagebox.h"
#include "scenelib.h"
#include "container/array.h"
#include "scenelib.h"
#include "render.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "math/frustum.h"
#include "gtkutil/widget.h"
const Command& GlobalCommands_find( const char* command ){
Commands::iterator i = g_commands.find( command );
ASSERT_MESSAGE( i != g_commands.end(), "failed to lookup command " << makeQuoted( command ) );
- return ( *i ).second;
+ return i->second;
}
typedef std::map<std::string, Toggle> Toggles;
#include "stream/stringstream.h"
#include "moduleobservers.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "preferences.h"
#include "mainframe.h"
#include "debugging/debugging.h"
#include "os/path.h"
#include "os/file.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
int g_argc;
const char ** g_argv;
#include "mainframe.h"
#include "preferences.h"
#include "url.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "uilib/uilib.h"
#include <gtk/gtk.h>
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "os/file.h"
#include "os/path.h"
#include "stream/stringstream.h"
#include <gtk/gtk.h>
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "stream/stringstream.h"
#include "signal/isignal.h"
#include "os/path.h"
#include "traverselib.h"
#include "maplib.h"
#include "eclasslib.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "stream/textfilestream.h"
#include "os/path.h"
#include "uniquenames.h"
bool Radiant_Construct( ModuleServer& server ){
GlobalModuleServer::instance().set( server );
- StaticModuleRegistryList().instance().registerModules();
+ auto modules = StaticModuleRegistryList().instance();
+ modules.registerModules();
g_RadiantDependencies = new RadiantDependencies();
#include "stream/stringstream.h"
#include "os/path.h"
#include "os/file.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "map.h"
#include "qe3.h"
#include "os/dir.h"
#include "gtkutil/filechooser.h"
#include "gtkutil/messagebox.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "error.h"
#include "console.h"
#include <uilib/uilib.h>
#include "stream/textfilestream.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "stream/stringstream.h"
#include "os/path.h"
#include "scenelib.h"
#include "debugging/debugging.h"
#include <map>
-#include <vector>
#include "os/path.h"
#include "modulesystem.h"
}
Module* findModule( const char* type, int version, const char* name ) const {
- Modules_::const_iterator i = m_modules.find( ModuleKey( ModuleType( type, version ), name ) );
+ auto i = m_modules.find( ModuleKey( ModuleType( type, version ), name ) );
if ( i != m_modules.end() ) {
- return ( *i ).second;
+ return i->second;
}
- return 0;
+ return nullptr;
}
void foreachModule( const char* type, int version, const Visitor& visitor ){
#include <dlfcn.h>
-class DynamicLibrary
-{
-void* m_library;
+class DynamicLibrary {
+ void *m_library;
public:
-typedef int ( *FunctionPointer )();
+ using FunctionPointer = int (*)();
-DynamicLibrary( const char* filename ){
- m_library = dlopen(filename, RTLD_LOCAL
- | RTLD_NOW
- #ifndef __APPLE__
- | RTLD_DEEPBIND
- #endif
- );
- if ( !m_library )
+ DynamicLibrary(const char *filename)
{
- globalErrorStream() << "LoadLibrary failed: '" << filename << "'\n";
- if ( const char* error = dlerror() )
+ m_library = dlopen(filename, RTLD_LOCAL
+ | RTLD_NOW
+ #ifndef __APPLE__
+ | RTLD_DEEPBIND
+#endif
+ );
+ auto error = dlerror();
+ if (!m_library || error) {
+ globalErrorStream() << "LoadLibrary failed: '" << filename << "'\n";
globalErrorStream() << "GetLastError: " << error;
+ }
}
-}
-~DynamicLibrary(){
- if ( !failed() ) {
- dlclose( m_library );
+
+ ~DynamicLibrary()
+ {
+ if (!failed()) {
+ dlclose(m_library);
+ }
}
-}
-bool failed(){
- return m_library == 0;
-}
-FunctionPointer findSymbol( const char* symbol ){
- FunctionPointer p = (FunctionPointer)dlsym( m_library, symbol );
- if ( p == 0 ) {
- const char* error = reinterpret_cast<const char*>( dlerror() );
- if ( error != 0 ) {
+
+ bool failed()
+ {
+ return m_library == nullptr;
+ }
+
+ FunctionPointer findSymbol(const char *symbol)
+ {
+ if (auto p = reinterpret_cast<FunctionPointer>(dlsym(m_library, symbol))) {
+ return p;
+ }
+ if (auto error = reinterpret_cast<const char *>(dlerror())) {
globalErrorStream() << error;
}
+ return nullptr;
}
- return p;
-}
};
#else
#error "unsupported platform"
#endif
-class DynamicLibraryModule
-{
-typedef void ( RADIANT_DLLIMPORT * RegisterModulesFunc )( ModuleServer& server );
-DynamicLibrary m_library;
-RegisterModulesFunc m_registerModule;
+class DynamicLibraryModule {
+ typedef void ( RADIANT_DLLIMPORT *RegisterModulesFunc )(ModuleServer &server);
+
+ DynamicLibrary m_library;
+ RegisterModulesFunc m_registerModule;
public:
-DynamicLibraryModule( const char* filename )
- : m_library( filename ), m_registerModule( 0 ){
- if ( !m_library.failed() ) {
- m_registerModule = reinterpret_cast<RegisterModulesFunc>( m_library.findSymbol( "Radiant_RegisterModules" ) );
+ DynamicLibraryModule(const char *filename)
+ : m_library(filename), m_registerModule(nullptr)
+ {
+ if (!m_library.failed()) {
+ m_registerModule = reinterpret_cast<RegisterModulesFunc>( m_library.findSymbol("Radiant_RegisterModules"));
#if 0
- if ( !m_registerModule ) {
- m_registerModule = reinterpret_cast<RegisterModulesFunc>( m_library.findSymbol( "Radiant_RegisterModules@4" ) );
- }
+ if ( !m_registerModule ) {
+ m_registerModule = reinterpret_cast<RegisterModulesFunc>( m_library.findSymbol( "Radiant_RegisterModules@4" ) );
+ }
#endif
+ }
+ }
+
+ bool failed()
+ {
+ return m_registerModule == nullptr;
+ }
+
+ void registerModules(ModuleServer &server)
+ {
+ m_registerModule(server);
}
-}
-bool failed(){
- return m_registerModule == 0;
-}
-void registerModules( ModuleServer& server ){
- m_registerModule( server );
-}
};
#include "stream/memstream.h"
#include "stream/textfilestream.h"
#include "stream/stringstream.h"
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "texmanip.h"
#include "textures.h"
#include "convert.h"
#include <algorithm>
#include <gtk/gtk.h>
-#include "cmdlib.h"
+#include "cmdlib/cmdlib.h"
#include "convert.h"
#include "string/string.h"
#include "stream/stringstream.h"
#include "../common/cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "polyset.h"
void ASE_Load( const char *filename, qboolean verbose, qboolean meshanims );
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include "bspfile.h"
#include "scriplib.h"
// replaced qprintf with Sys_Printf
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include <sys/types.h>
#include <sys/stat.h>
#include "inout.h"
#include "cmdlib.h"
-#include "etclib.h"
+#include "etclib/etclib.h"
#include "imagelib.h"
#include "vfs.h"
//
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "polylib.h"
#include "inout.h"
#include <sys/types.h>
// inout is the only stuff relying on xml, include the headers there
#include "libxml/tree.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
// some useful xml routines
xmlNodePtr xml_NodeForVec( vec3_t v );
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include "polylib.h"
#include "qfiles.h"
// scriplib.c
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include "scriplib.h"
#include "vfs.h"
#include "../common/cmdlib.h"
#endif
#ifndef __MATHLIB__
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#endif
#define MAXTOKEN 1024
#endif
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include "qthreads.h"
#include <stdio.h>
#include "cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "polyset.h"
#include "trilib.h"
#include <sys/stat.h>
#include "cmdlib.h"
-#include "filematch.h"
-#include "mathlib.h"
+#include "filematch/filematch.h"
+#include "mathlib/mathlib.h"
#include "inout.h"
#include "vfs.h"
#include "unzip.h"
#include <stdio.h>
#include "../common/cmdlib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "../common/qfiles.h"
void MD3_Dump( const char *filename );
#include "../common/cmdlib.h"
#include "scriplib.h"
-#include "mathlib.h"
+#include "mathlib/mathlib.h"
#include "polyset.h"
#include "trilib.h"
#include "imagelib.h"
/* general */
#include "cmdlib.h"
-#include "mathlib.h"
-#include "md5lib.h"
-#include "ddslib.h"
+#include "mathlib/mathlib.h"
+#include "md5lib/md5lib.h"
+#include "ddslib/ddslib.h"
-#include "picomodel.h"
+#include "picomodel/picomodel.h"
#include "scriplib.h"
#include "polylib.h"