diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index a125605..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,284 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -project(WorldSpawn C CXX) - -option(BUILD_RADIANT "Build the GUI" ON) -option(BUILD_VMAP "Build the Compiler" ON) - -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE) -endif () - -#----------------------------------------------------------------------- -# Version -#----------------------------------------------------------------------- - -# CMake 3.0+ would allow this in project() -set(WorldSpawn_VERSION_MAJOR 1) -set(WorldSpawn_VERSION_MINOR 1) -set(WorldSpawn_VERSION_PATCH 0) -set(WorldSpawn_VERSION "${WorldSpawn_VERSION_MAJOR}.${WorldSpawn_VERSION_MINOR}.${WorldSpawn_VERSION_PATCH}") - -#SET(CMAKE_C_COMPILER gcc-9) -#SET(CMAKE_CXX_COMPILER g++-9) - -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" ${WorldSpawn_VERSION_MAJOR}) -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" ${WorldSpawn_VERSION_MINOR}) -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_PATCH" ${WorldSpawn_VERSION_PATCH}) - -#set(WorldSpawn_ABOUTMSG "Custom build" CACHE STRING "About message") - -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(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION}n") -if (GIT_VERSION) - set(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION_STRING}-git-${GIT_VERSION}") -endif () - -message(STATUS "Building ${PROJECT_NAME} ${WorldSpawn_VERSION_STRING} ${WorldSpawn_ABOUTMSG}") - -#----------------------------------------------------------------------- -# Language standard -#----------------------------------------------------------------------- - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS OFF) -if (CMAKE_VERSION VERSION_LESS "3.1") - 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) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}") - else () - message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better") - endif () - else () - message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}, make sure it supports C++${CMAKE_CXX_STANDARD}") - endif () -endif () - -#----------------------------------------------------------------------- -# Flags -#----------------------------------------------------------------------- - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") -macro(addflags_c args) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${args}") -endmacro() -macro(addflags_cxx args) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${args}") -endmacro() -macro(addflags args) - addflags_c("${args}") - addflags_cxx("${args}") -endmacro() -addflags("-fno-strict-aliasing") -if (NOT WIN32) - addflags("-fvisibility=hidden") -endif () - -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - #disabled due to GTK bug addflags("-Werror") - addflags("-pedantic-errors") -endif () - -addflags("-Wall") -addflags("-Wextra") -addflags("-pedantic") - -addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown - -addflags("-Wno-unused-function") -addflags("-Wno-unused-variable") -addflags("-Wno-unused-parameter") - -set(CMAKE_POSITION_INDEPENDENT_CODE 1) -set(GTK_TARGET 2 CACHE STRING "GTK target") -add_definitions(-DGTK_TARGET=${GTK_TARGET}) - -#----------------------------------------------------------------------- -# Defs -#----------------------------------------------------------------------- - -add_definitions(-DWorldSpawn_VERSION="${WorldSpawn_VERSION}") -add_definitions(-DWorldSpawn_MAJOR_VERSION="${WorldSpawn_VERSION_MAJOR}") -add_definitions(-DWorldSpawn_MINOR_VERSION="${WorldSpawn_VERSION_MINOR}") -add_definitions(-DWorldSpawn_PATCH_VERSION="${WorldSpawn_VERSION_PATCH}") - -add_definitions(-DWorldSpawn_ABOUTMSG="${WorldSpawn_ABOUT}") - -if (NOT CMAKE_BUILD_TYPE MATCHES Release) - add_definitions(-D_DEBUG=1) -endif () - -macro(disable_deprecated name gtk2only) - add_definitions(-D${name}_DISABLE_SINGLE_INCLUDES) - if ((${gtk2only} EQUAL 0) OR (GTK_TARGET EQUAL 2)) - add_definitions(-D${name}_DISABLE_DEPRECATED) - endif () -endmacro() - -disable_deprecated(ATK 0) -disable_deprecated(G 0) -disable_deprecated(GDK 0) -disable_deprecated(GDK_PIXBUF 0) -disable_deprecated(GTK 1) -disable_deprecated(PANGO 0) - -if (APPLE) - option(XWINDOWS "Build against X11" ON) - add_definitions( - -DPOSIX=1 - ) -elseif (WIN32) - add_definitions( - -DWIN32=1 - -D_WIN32=1 - ) -else () - set(XWINDOWS ON) - add_definitions( - -DPOSIX=1 - ) -endif () - -if (XWINDOWS) - find_package(X11 REQUIRED) - include_directories(${X11_INCLUDE_DIR}) - add_definitions(-DXWINDOWS=1) -endif () - -include_directories("${PROJECT_SOURCE_DIR}/include") -include_directories("${PROJECT_SOURCE_DIR}/libs") - -# For our OpenBSD friends, because CMake isn't smart enough to figure that out? -include_directories("/usr/local/include") -link_directories("/usr/local/lib") -include_directories("/usr/X11R6/include") -link_directories("/usr/X11R6/lib") - -if (WIN32 AND NOT CMAKE_CROSSCOMPILING) - set(BUNDLE_LIBRARIES_DEFAULT ON) -else () - set(BUNDLE_LIBRARIES_DEFAULT OFF) -endif () -option(BUNDLE_LIBRARIES "Bundle libraries" ${BUNDLE_LIBRARIES_DEFAULT}) - -macro(copy_dlls target) - if (BUNDLE_LIBRARIES) - add_custom_command(TARGET ${target} POST_BUILD - COMMAND bash - ARGS -c "ldd '$' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done" - VERBATIM - ) - endif () -endmacro() - -#----------------------------------------------------------------------- -# Libraries -#----------------------------------------------------------------------- - -add_subdirectory(libs) -add_subdirectory(include) - -#----------------------------------------------------------------------- -# Plugins -#----------------------------------------------------------------------- - -if (BUILD_RADIANT) - add_subdirectory(contrib) -endif () - -#----------------------------------------------------------------------- -# Modules -#----------------------------------------------------------------------- - -if (BUILD_RADIANT) - add_subdirectory(plugins) -endif () - -#----------------------------------------------------------------------- -# Radiant -#----------------------------------------------------------------------- - -if (CMAKE_EXECUTABLE_SUFFIX) - string(REGEX REPLACE "^[.]" "" WorldSpawn_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX}) -else () - execute_process( - COMMAND uname -m - OUTPUT_VARIABLE WorldSpawn_EXECUTABLE - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -endif () - -macro(radiant_tool name) - add_executable(${name} ${ARGN}) - install( - TARGETS ${name} - RUNTIME DESTINATION . - ) - if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL ".${WorldSpawn_EXECUTABLE}")) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND ln -f -s "$" "${PROJECT_BINARY_DIR}/${name}.${WorldSpawn_EXECUTABLE}" - VERBATIM - ) - install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${name}${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_INSTALL_PREFIX}/${name}.${WorldSpawn_EXECUTABLE}) - ") - endif () -endmacro() - -if (BUILD_RADIANT) - add_subdirectory(radiant _radiant) - set_target_properties(worldspawn PROPERTIES - COMPILE_DEFINITIONS WorldSpawn_EXECUTABLE="${WorldSpawn_EXECUTABLE}" - ) -endif () - -#----------------------------------------------------------------------- -# Tools -#----------------------------------------------------------------------- - -if (BUILD_VMAP) - add_subdirectory(tools) -endif () - -file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/resources/*") - -if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)) - # Copy data files from sources to the build directory - message(STATUS "Copying data files") - file(COPY ${DATA_FILES} DESTINATION "${PROJECT_BINARY_DIR}") -endif () - -#----------------------------------------------------------------------- -# Install -#----------------------------------------------------------------------- - -install( - FILES - "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" - "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" - "${PROJECT_BINARY_DIR}/WorldSpawn_PATCH" - DESTINATION . -) - -install( - DIRECTORY - resources/ - DESTINATION . -) - -install( - DIRECTORY - DESTINATION . - OPTIONAL -) - -include(cmake/scripts/package.cmake) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f708f3f --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +all: + cp -Rv ./resources/ ./build/ + cd libs && $(MAKE) + cd radiant && $(MAKE) + cd plugins && $(MAKE) + cd tools && $(MAKE) + cd contrib && $(MAKE) + +clean: + -rm -rf ./build + cd libs && $(MAKE) clean + cd radiant && $(MAKE) clean + cd plugins && $(MAKE) clean + cd tools && $(MAKE) clean + cd contrib && $(MAKE) clean diff --git a/build_binarydist.sh b/build_binarydist.sh deleted file mode 100755 index f379c63..0000000 --- a/build_binarydist.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -zip worldspawn_bin.zip -@ < build_contents.txt diff --git a/build_contents.txt b/build_contents.txt deleted file mode 100644 index 4596d0d..0000000 --- a/build_contents.txt +++ /dev/null @@ -1,150 +0,0 @@ -WorldSpawn.app -WorldSpawn.app/base -WorldSpawn.app/base/textures -WorldSpawn.app/base/textures/radiant -WorldSpawn.app/base/textures/radiant/notex.png -WorldSpawn.app/base/textures/radiant/shadernotex.png -WorldSpawn.app/bitmaps -WorldSpawn.app/bitmaps/black.png -WorldSpawn.app/bitmaps/brush_flipx.png -WorldSpawn.app/bitmaps/brush_flipy.png -WorldSpawn.app/bitmaps/brush_flipz.png -WorldSpawn.app/bitmaps/brush_rotatex.png -WorldSpawn.app/bitmaps/brush_rotatey.png -WorldSpawn.app/bitmaps/brush_rotatez.png -WorldSpawn.app/bitmaps/cap_bevel.png -WorldSpawn.app/bitmaps/cap_curve.png -WorldSpawn.app/bitmaps/cap_cylinder.png -WorldSpawn.app/bitmaps/cap_endcap.png -WorldSpawn.app/bitmaps/cap_ibevel.png -WorldSpawn.app/bitmaps/cap_iendcap.png -WorldSpawn.app/bitmaps/console.png -WorldSpawn.app/bitmaps/dontselectcurve.png -WorldSpawn.app/bitmaps/dontselectmodel.png -WorldSpawn.app/bitmaps/ellipsis.png -WorldSpawn.app/bitmaps/entities.png -WorldSpawn.app/bitmaps/file_open.png -WorldSpawn.app/bitmaps/file_save.png -WorldSpawn.app/bitmaps/icon.png -WorldSpawn.app/bitmaps/lightinspector.png -WorldSpawn.app/bitmaps/logo.png -WorldSpawn.app/bitmaps/modify_edges.png -WorldSpawn.app/bitmaps/modify_faces.png -WorldSpawn.app/bitmaps/modify_vertices.png -WorldSpawn.app/bitmaps/noFalloff.png -WorldSpawn.app/bitmaps/notex.png -WorldSpawn.app/bitmaps/patch_bend.png -WorldSpawn.app/bitmaps/patch_drilldown.png -WorldSpawn.app/bitmaps/patch_insdel.png -WorldSpawn.app/bitmaps/patch_showboundingbox.png -WorldSpawn.app/bitmaps/patch_weld.png -WorldSpawn.app/bitmaps/patch_wireframe.png -WorldSpawn.app/bitmaps/popup_selection.png -WorldSpawn.app/bitmaps/redo.png -WorldSpawn.app/bitmaps/refresh_models.png -WorldSpawn.app/bitmaps/scalelockx.png -WorldSpawn.app/bitmaps/scalelocky.png -WorldSpawn.app/bitmaps/scalelockz.png -WorldSpawn.app/bitmaps/selection_csgmerge.png -WorldSpawn.app/bitmaps/selection_csgsubtract.png -WorldSpawn.app/bitmaps/selection_makehollow.png -WorldSpawn.app/bitmaps/selection_makeroom.png -WorldSpawn.app/bitmaps/selection_selectcompletetall.png -WorldSpawn.app/bitmaps/selection_selectinside.png -WorldSpawn.app/bitmaps/selection_selectpartialtall.png -WorldSpawn.app/bitmaps/selection_selecttouching.png -WorldSpawn.app/bitmaps/select_mouseresize.png -WorldSpawn.app/bitmaps/select_mouserotate.png -WorldSpawn.app/bitmaps/select_mousescale.png -WorldSpawn.app/bitmaps/select_mousetranslate.png -WorldSpawn.app/bitmaps/shadernotex.png -WorldSpawn.app/bitmaps/show_entities.png -WorldSpawn.app/bitmaps/splash.png -WorldSpawn.app/bitmaps/texture_browser.png -WorldSpawn.app/bitmaps/texture_lock.png -WorldSpawn.app/bitmaps/textures_popup.png -WorldSpawn.app/bitmaps/undo.png -WorldSpawn.app/bitmaps/view_cameratoggle.png -WorldSpawn.app/bitmaps/view_cameraupdate.png -WorldSpawn.app/bitmaps/view_change.png -WorldSpawn.app/bitmaps/view_clipper.png -WorldSpawn.app/bitmaps/view_cubicclipping.png -WorldSpawn.app/bitmaps/view_entity.png -WorldSpawn.app/bitmaps/white.png -WorldSpawn.app/bitmaps/window1.png -WorldSpawn.app/bitmaps/window2.png -WorldSpawn.app/bitmaps/window3.png -WorldSpawn.app/bitmaps/window4.png -WorldSpawn.app/games -WorldSpawn.app/games/tw.game -WorldSpawn.app/gl -WorldSpawn.app/gl/lighting_DBS_omni_fp.glp -WorldSpawn.app/gl/lighting_DBS_omni_fp.glsl -WorldSpawn.app/gl/lighting_DBS_omni_vp.glp -WorldSpawn.app/gl/lighting_DBS_omni_vp.glsl -WorldSpawn.app/gl/lighting_DBS_XY_Z_arbfp1.cg -WorldSpawn.app/gl/lighting_DBS_XY_Z_arbvp1.cg -WorldSpawn.app/gl/utils.cg -WorldSpawn.app/gl/zfill_arbfp1.cg -WorldSpawn.app/gl/zfill_arbvp1.cg -WorldSpawn.app/gl/zfill_fp.glp -WorldSpawn.app/gl/zfill_fp.glsl -WorldSpawn.app/gl/zfill_vp.glp -WorldSpawn.app/gl/zfill_vp.glsl -WorldSpawn.app/global.xlink -WorldSpawn.app/modules -WorldSpawn.app/modules/libarchivezip.so -WorldSpawn.app/modules/libentity.so -WorldSpawn.app/modules/libimage.so -WorldSpawn.app/modules/libiqmmodel.so -WorldSpawn.app/modules/libmapq3.so -WorldSpawn.app/modules/libmodel.so -WorldSpawn.app/modules/libshaders.so -WorldSpawn.app/modules/libvfspk3.so -WorldSpawn.app/plugins -WorldSpawn.app/plugins/bitmaps -WorldSpawn.app/plugins/bitmaps/bobtoolz_caulk.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_cleanup.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_dropent.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_merge.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_poly.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_splitcol.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_split.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_splitrow.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_trainpathplot.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_treeplanter.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_turnedge.png -WorldSpawn.app/plugins/bitmaps/ufoai_actorclip.png -WorldSpawn.app/plugins/bitmaps/ufoai_level1.png -WorldSpawn.app/plugins/bitmaps/ufoai_level2.png -WorldSpawn.app/plugins/bitmaps/ufoai_level3.png -WorldSpawn.app/plugins/bitmaps/ufoai_level4.png -WorldSpawn.app/plugins/bitmaps/ufoai_level5.png -WorldSpawn.app/plugins/bitmaps/ufoai_level6.png -WorldSpawn.app/plugins/bitmaps/ufoai_level7.png -WorldSpawn.app/plugins/bitmaps/ufoai_level8.png -WorldSpawn.app/plugins/bitmaps/ufoai_nodraw.png -WorldSpawn.app/plugins/bitmaps/ufoai_stepon.png -WorldSpawn.app/plugins/bitmaps/ufoai_weaponclip.png -WorldSpawn.app/plugins/bt -WorldSpawn.app/plugins/bt/bt-el1.txt -WorldSpawn.app/plugins/bt/bt-el2.txt -WorldSpawn.app/plugins/bt/door-tex-trim.txt -WorldSpawn.app/plugins/bt/door-tex.txt -WorldSpawn.app/plugins/bt/tp_ent.txt -WorldSpawn.app/plugins/libbobtoolz.so -WorldSpawn.app/plugins/libbrushexport.so -WorldSpawn.app/plugins/libprtview.so -WorldSpawn.app/plugins/libshaderplug.so -WorldSpawn.app/plugins/libsunplug.so -WorldSpawn.app/tw.game -WorldSpawn.app/tw.game/default_build_menu.xml -WorldSpawn.app/tw.game/game.xlink -WorldSpawn.app/tw.game/wastes -WorldSpawn.app/tw.game/wastes/entities.def -WorldSpawn.app/Resources -WorldSpawn.app/Resources/Info-gnustep.plist -WorldSpawn.app/Resources/icon.tiff -WorldSpawn.app/vmap -WorldSpawn.app/worldspawn -WorldSpawn.app/WorldSpawn diff --git a/cmake/FindGLIB.cmake b/cmake/FindGLIB.cmake deleted file mode 100644 index 4b1b265..0000000 --- a/cmake/FindGLIB.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GLIB_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GLIB ${_pkgconfig_REQUIRED} glib-2.0) -else () - find_path(GLIB_INCLUDE_DIRS glib.h) - find_library(GLIB_LIBRARIES glib-2.0) - if (GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES) - set(GLIB_FOUND 1) - if (NOT GLIB_FIND_QUIETLY) - message(STATUS "Found GLIB: ${GLIB_LIBRARIES}") - endif () - elseif (GLIB_FIND_REQUIRED) - message(SEND_ERROR "Could not find GLIB") - elseif (NOT GLIB_FIND_QUIETLY) - message(STATUS "Could not find GLIB") - endif () -endif () -mark_as_advanced(GLIB_INCLUDE_DIRS GLIB_LIBRARIES) diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake deleted file mode 100644 index ff20526..0000000 --- a/cmake/FindGTK2.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GTK2_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GTK2 ${_pkgconfig_REQUIRED} gtk+-2.0) -else () - find_path(GTK2_INCLUDE_DIRS gtk.h) - # find_library(GTK2_LIBRARIES) - if (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES) - set(GTK2_FOUND 1) - if (NOT GTK2_FIND_QUIETLY) - message(STATUS "Found GTK2: ${GTK2_LIBRARIES}") - endif () - elseif (GTK2_FIND_REQUIRED) - message(SEND_ERROR "Could not find GTK2") - elseif (NOT GTK2_FIND_QUIETLY) - message(STATUS "Could not find GTK2") - endif () -endif () -mark_as_advanced(GTK2_INCLUDE_DIRS GTK2_LIBRARIES) diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake deleted file mode 100644 index 7bef3b0..0000000 --- a/cmake/FindGTK3.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GTK3_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GTK3 ${_pkgconfig_REQUIRED} gtk+-3.0) -else () - find_path(GTK3_INCLUDE_DIRS gtk.h) - # find_library(GTK3_LIBRARIES) - if (GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES) - set(GTK3_FOUND 1) - if (NOT GTK3_FIND_QUIETLY) - message(STATUS "Found GTK3: ${GTK3_LIBRARIES}") - endif () - elseif (GTK3_FIND_REQUIRED) - message(SEND_ERROR "Could not find GTK3") - elseif (NOT GTK3_FIND_QUIETLY) - message(STATUS "Could not find GTK3") - endif () -endif () -mark_as_advanced(GTK3_INCLUDE_DIRS GTK3_LIBRARIES) diff --git a/cmake/FindGtkGLExt.cmake b/cmake/FindGtkGLExt.cmake deleted file mode 100644 index b30a1e1..0000000 --- a/cmake/FindGtkGLExt.cmake +++ /dev/null @@ -1,27 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GtkGLExt_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - if (XWINDOWS) - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0) - elseif (WIN32) - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0) - else () - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-quartz-1.0) - endif () -else () - find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h) - # find_library(GtkGLExt_LIBRARIES) - if (GtkGLExt_INCLUDE_DIRS AND GtkGLExt_LIBRARIES) - set(GtkGLExt_FOUND 1) - if (NOT GtkGLExt_FIND_QUIETLY) - message(STATUS "Found GtkGLExt: ${GtkGLExt_LIBRARIES}") - endif () - elseif (GtkGLExt_FIND_REQUIRED) - message(SEND_ERROR "Could not find GtkGLExt") - elseif (NOT GtkGLExt_FIND_QUIETLY) - message(STATUS "Could not find GtkGLExt") - endif () -endif () -mark_as_advanced(GtkGLExt_INCLUDE_DIRS GtkGLExt_LIBRARIES) diff --git a/cmake/FindMinizip.cmake b/cmake/FindMinizip.cmake deleted file mode 100644 index 0de098f..0000000 --- a/cmake/FindMinizip.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (Minizip_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(Minizip ${_pkgconfig_REQUIRED} minizip) -else () - find_path(Minizip_INCLUDE_DIRS unzip.h) - # find_library(Minizip_LIBRARIES) - if (Minizip_INCLUDE_DIRS AND Minizip_LIBRARIES) - set(Minizip_FOUND 1) - if (NOT Minizip_FIND_QUIETLY) - message(STATUS "Found Minizip: ${Minizip_LIBRARIES}") - endif () - elseif (Minizip_FIND_REQUIRED) - message(SEND_ERROR "Could not find Minizip") - elseif (NOT Minizip_FIND_QUIETLY) - message(STATUS "Could not find Minizip") - endif () -endif () -mark_as_advanced(Minizip_INCLUDE_DIRS Minizip_LIBRARIES) diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake deleted file mode 100644 index 67359ef..0000000 --- a/cmake/FindPango.cmake +++ /dev/null @@ -1,23 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (Pango_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_search_module(Pango ${_pkgconfig_REQUIRED} pango pangocairo) - pkg_search_module(PangoFT2 ${_pkgconfig_REQUIRED} pangoft2) -else () - # find_path(Pango_INCLUDE_DIRS) - # find_library(Pango_LIBRARIES) - if (Pango_INCLUDE_DIRS AND Pango_LIBRARIES) - set(Pango_FOUND 1) - if (NOT Pango_FIND_QUIETLY) - message(STATUS "Found Pango: ${Pango_LIBRARIES}") - endif () - elseif (Pango_FIND_REQUIRED) - message(SEND_ERROR "Could not find Pango") - elseif (NOT Pango_FIND_QUIETLY) - message(STATUS "Could not find Pango") - endif () -endif () -mark_as_advanced(Pango_INCLUDE_DIRS Pango_LIBRARIES) -mark_as_advanced(PangoFT2_INCLUDE_DIRS PangoFT2_LIBRARIES) diff --git a/cmake/scripts/package.cmake b/cmake/scripts/package.cmake deleted file mode 100644 index 8191297..0000000 --- a/cmake/scripts/package.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(CPACK_PACKAGE_NAME "WorldSpawn") -set(CPACK_PACKAGE_VERSION_MAJOR "${WorldSpawn_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${WorldSpawn_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${WorldSpawn_VERSION_PATCH}") - -# binary: --target package -set(CPACK_GENERATOR "ZIP") -set(CPACK_STRIP_FILES 1) - -# source: --target package_source -set(CPACK_SOURCE_GENERATOR "ZIP") -set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/build/;/install/") - -# configure -include(InstallRequiredSystemLibraries) -include(CPack) diff --git a/compile_debug.sh b/compile_debug.sh deleted file mode 100755 index 119e43c..0000000 --- a/compile_debug.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if ! [ -x "$(command -v nproc)" ]; then - BUILD_PROC=1 -else - BUILD_PROC=$(nproc) -fi - -cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug && cmake --build build -- -j $BUILD_PROC diff --git a/compile_release.sh b/compile_release.sh deleted file mode 100755 index 0a7f4ab..0000000 --- a/compile_release.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if ! [ -x "$(command -v nproc)" ]; then - BUILD_PROC=1 -else - BUILD_PROC=$(nproc) -fi - -cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j $BUILD_PROC diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt deleted file mode 100644 index 28e3816..0000000 --- a/contrib/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/plugins") - -add_custom_target(plugins) -macro(radiant_plugin name) - message(STATUS "Found Plugin ${name}") - add_library(${name} MODULE ${ARGN}) - add_dependencies(plugins ${name}) - copy_dlls(${name}) - install( - TARGETS ${name} - LIBRARY DESTINATION plugins - ) -endmacro() - -add_subdirectory(brushexport) -add_subdirectory(prtview) diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..53451a3 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,8 @@ +all: + mkdir -p ../build/plugins + cd brushexport && $(MAKE) + cd prtview && $(MAKE) +clean: + -rm -rf ../build/plugins + cd brushexport && $(MAKE) clean + cd prtview && $(MAKE) clean diff --git a/contrib/brushexport/CMakeLists.txt b/contrib/brushexport/CMakeLists.txt deleted file mode 100644 index 578588d..0000000 --- a/contrib/brushexport/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -radiant_plugin(brushexport - callbacks.cpp callbacks.h - export.cpp export.h - interface.cpp - plugin.cpp plugin.h - support.cpp support.h - ) - -target_include_directories(brushexport PRIVATE uilib) -target_link_libraries(brushexport PRIVATE uilib) diff --git a/contrib/brushexport/Makefile b/contrib/brushexport/Makefile new file mode 100644 index 0000000..5fd2642 --- /dev/null +++ b/contrib/brushexport/Makefile @@ -0,0 +1,28 @@ +# WorldSpawn Plugin Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + callbacks.o export.o interface.o plugin.o support.o + +# binary target +../../build/plugins/libbrushexport.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a + +# object files +callbacks.o: callbacks.cpp callbacks.h +export.o: export.cpp export.h +interface.o: interface.cpp +plugin.o: plugin.cpp plugin.h +support.o: support.cpp support.h + +clean: + -rm -f *.o ../../build/plugins/libbrushexport.so diff --git a/contrib/brushexport/brushexport.def b/contrib/brushexport/brushexport.def deleted file mode 100644 index 2174016..0000000 --- a/contrib/brushexport/brushexport.def +++ /dev/null @@ -1,7 +0,0 @@ -; brushexport.def : Declares the module parameters for the DLL. - -LIBRARY "BRUSHEXPORT" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/contrib/brushexport/plugin.cpp b/contrib/brushexport/plugin.cpp index 25bdb51..5d86693 100644 --- a/contrib/brushexport/plugin.cpp +++ b/contrib/brushexport/plugin.cpp @@ -128,7 +128,13 @@ public: typedef SingletonModule SingletonBrushExportModule; SingletonBrushExportModule g_BrushExportModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); g_BrushExportModule.selfRegister(); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index 7042359..88d4ecf 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -66,7 +66,7 @@ void DoAboutDlg() char const *label_text = "Version 1.000\n\n" "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n" "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n" - "Built against WorldSpawn " WorldSpawn_VERSION "\n" + "Built against WorldSpawn\n" __DATE__; auto label = ui::Label(label_text); label.show(); diff --git a/contrib/prtview/CMakeLists.txt b/contrib/prtview/CMakeLists.txt deleted file mode 100644 index f08707f..0000000 --- a/contrib/prtview/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -radiant_plugin(prtview - AboutDialog.cpp AboutDialog.h - ConfigDialog.cpp ConfigDialog.h - LoadPortalFileDialog.cpp LoadPortalFileDialog.h - portals.cpp portals.h - prtview.cpp prtview.h - ) - -target_include_directories(prtview PRIVATE uilib) -target_link_libraries(prtview PRIVATE uilib) - -target_include_directories(prtview PRIVATE profile) -target_link_libraries(prtview PRIVATE profile) diff --git a/contrib/prtview/Makefile b/contrib/prtview/Makefile new file mode 100644 index 0000000..70abb5a --- /dev/null +++ b/contrib/prtview/Makefile @@ -0,0 +1,28 @@ +# WorldSpawn Plugin Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden -DWorldSpawn_VERSION=1 -DWorldSpawn_MAJOR_VERSION=1 -DWorldSpawn_MINOR_VERSION=0 -DWorldSpawn_PATCH_VERSION=0 +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + AboutDialog.o ConfigDialog.o LoadPortalFileDialog.o portals.o prtview.o + +# binary target +../../build/plugins/libprtview.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a ../../libs/libprofile.a + +# object files +AboutDialog.o: AboutDialog.cpp AboutDialog.h +ConfigDialog.o: ConfigDialog.cpp ConfigDialog.h +LoadPortalFileDialog.o: LoadPortalFileDialog.cpp LoadPortalFileDialog.h +portals.o: portals.cpp portals.h +prtview.o: prtview.cpp prtview.h + +clean: + -rm -f *.o ../../build/plugins/libprtview.so diff --git a/contrib/prtview/PrtView.def b/contrib/prtview/PrtView.def deleted file mode 100644 index 7c18cf8..0000000 --- a/contrib/prtview/PrtView.def +++ /dev/null @@ -1,7 +0,0 @@ -; PrtView.def : Declares the module parameters for the DLL. - -LIBRARY "PrtView" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/contrib/prtview/prtview.cpp b/contrib/prtview/prtview.cpp index e99b176..3f2be68 100644 --- a/contrib/prtview/prtview.cpp +++ b/contrib/prtview/prtview.cpp @@ -315,7 +315,13 @@ typedef SingletonModule Singleto SingletonPrtViewPluginModule g_PrtViewPluginModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/contrib/prtview/res/PrtView.rc2 b/contrib/prtview/res/PrtView.rc2 deleted file mode 100644 index 14acdde..0000000 --- a/contrib/prtview/res/PrtView.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// PRTVIEW.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt deleted file mode 100644 index 40ab793..0000000 --- a/include/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -add_library(includes - aboutmsg.h - cullable.h - dpkdeps.h - editable.h - iarchive.h - ibrush.h - icamera.h - idatastream.h - ieclass.h - ientity.h - ifilesystem.h - ifiletypes.h - ifilter.h - igl.h - iglrender.h - igtkgl.h - iimage.h - imap.h - imodel.h - ipatch.h - iplugin.h - ireference.h - irender.h - iscenegraph.h - iscriplib.h - iselection.h - ishaders.h - itexdef.h - itextstream.h - itextures.h - itoolbar.h - iundo.h - mapfile.h - modelskin.h - moduleobserver.h - modulesystem.h - nameable.h - namespace.h - preferencesystem.cpp preferencesystem.h - qerplugin.h - renderable.h - selectable.h - stream_version.h - version.h - warnings.h - windowobserver.h - ) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt deleted file mode 100644 index 9f5f834..0000000 --- a/libs/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -add_subdirectory(cmdlib) -add_subdirectory(container) -add_subdirectory(ddslib) -add_subdirectory(debugging) -add_subdirectory(etclib) -add_subdirectory(filematch) -add_subdirectory(generic) -if (BUILD_RADIANT) - add_subdirectory(gtkutil) -endif () -add_subdirectory(l_net) -add_subdirectory(math) -add_subdirectory(mathlib) -add_subdirectory(memory) -add_subdirectory(modulesystem) -add_subdirectory(os) -add_subdirectory(picomodel) -add_subdirectory(profile) -add_subdirectory(script) -add_subdirectory(signal) -add_subdirectory(splines) -add_subdirectory(stream) -add_subdirectory(string) -add_subdirectory(uilib) -add_subdirectory(xml) - -add_library(libs - _.cpp - archivelib.h - bytebool.h - bytestreamutils.h - character.h - convert.h - dragplanes.h - eclasslib.h - entitylib.h - entityxml.h - fs_filesystem.h - fs_path.h - globaldefs.h - imagelib.h - property.h - instancelib.h - maplib.h - moduleobservers.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 - ) - -find_package(GLIB REQUIRED) -target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(libs PRIVATE ${GLIB_LIBRARIES}) diff --git a/libs/Makefile b/libs/Makefile new file mode 100644 index 0000000..3f8f76b --- /dev/null +++ b/libs/Makefile @@ -0,0 +1,52 @@ + +all: + cd cmdlib && $(MAKE) + cd container && $(MAKE) + cd ddslib && $(MAKE) + cd debugging && $(MAKE) + cd etclib && $(MAKE) + cd filematch && $(MAKE) + cd generic && $(MAKE) + cd gtkutil && $(MAKE) + cd l_net && $(MAKE) + cd math && $(MAKE) + cd mathlib && $(MAKE) + #cd md5lib && $(MAKE) + cd memory && $(MAKE) + cd modulesystem && $(MAKE) + cd os && $(MAKE) + cd picomodel && $(MAKE) + cd profile && $(MAKE) + cd script && $(MAKE) + cd signal && $(MAKE) + cd splines && $(MAKE) + cd stream && $(MAKE) + cd string && $(MAKE) + cd uilib && $(MAKE) + cd xml && $(MAKE) + +clean: + cd cmdlib && $(MAKE) clean + cd container && $(MAKE) clean + cd ddslib && $(MAKE) clean + cd debugging && $(MAKE) clean + cd etclib && $(MAKE) clean + cd filematch && $(MAKE) clean + cd generic && $(MAKE) clean + cd gtkutil && $(MAKE) clean + cd l_net && $(MAKE) clean + cd math && $(MAKE) clean + cd mathlib && $(MAKE) clean + #cd md5lib && $(MAKE) clean + cd memory && $(MAKE) clean + cd modulesystem && $(MAKE) clean + cd os && $(MAKE) clean + cd picomodel && $(MAKE) clean + cd profile && $(MAKE) clean + cd script && $(MAKE) clean + cd signal && $(MAKE) clean + cd splines && $(MAKE) clean + cd stream && $(MAKE) clean + cd string && $(MAKE) clean + cd uilib && $(MAKE) clean + cd xml && $(MAKE) clean diff --git a/libs/cmdlib/CMakeLists.txt b/libs/cmdlib/CMakeLists.txt deleted file mode 100644 index 5d25ce8..0000000 --- a/libs/cmdlib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(cmdlib - cmdlib.cpp ../cmdlib.h - ) diff --git a/libs/cmdlib/Makefile b/libs/cmdlib/Makefile new file mode 100644 index 0000000..4b747c9 --- /dev/null +++ b/libs/cmdlib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + cmdlib.o + +# binary target +../libcmdlib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +cmdlib.o: cmdlib.cpp + +clean: + -rm -f *.o ../libcmdlib.a diff --git a/libs/container/CMakeLists.txt b/libs/container/CMakeLists.txt deleted file mode 100644 index 00bfbb4..0000000 --- a/libs/container/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(container - array.cpp array.h - cache.h - container.h - hashfunc.h - hashtable.cpp hashtable.h - stack.h - ) diff --git a/libs/container/Makefile b/libs/container/Makefile new file mode 100644 index 0000000..f701f29 --- /dev/null +++ b/libs/container/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + array.o hashtable.o + +# binary target +../libcontainer.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +array.o: array.cpp array.h cache.h container.h hashfunc.h +hashtable.o: hashtable.cpp hashtable.h stack.h + +clean: + -rm -f *.o ../libcontainer.a diff --git a/libs/ddslib/CMakeLists.txt b/libs/ddslib/CMakeLists.txt deleted file mode 100644 index d4de1a7..0000000 --- a/libs/ddslib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(ddslib - ddslib.c ../ddslib.h - ) diff --git a/libs/ddslib/Makefile b/libs/ddslib/Makefile new file mode 100644 index 0000000..c5aa975 --- /dev/null +++ b/libs/ddslib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + ddslib.o + +# binary target +../libddslib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +ddslib.o: ddslib.c + +clean: + -rm -f *.o ../libddslib.a diff --git a/libs/debugging/CMakeLists.txt b/libs/debugging/CMakeLists.txt deleted file mode 100644 index e5880de..0000000 --- a/libs/debugging/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(debugging - debugging.cpp debugging.h - ) diff --git a/libs/debugging/Makefile b/libs/debugging/Makefile new file mode 100644 index 0000000..b4cecac --- /dev/null +++ b/libs/debugging/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + debugging.o + +# binary target +../libdebugging.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +debugging.o: debugging.cpp debugging.h + +clean: + -rm -f *.o ../libdebugging.a diff --git a/libs/etclib/CMakeLists.txt b/libs/etclib/CMakeLists.txt deleted file mode 100644 index 8d8fb23..0000000 --- a/libs/etclib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(etclib - ../etclib.c ../etclib.h - ) diff --git a/libs/etclib/Makefile b/libs/etclib/Makefile new file mode 100644 index 0000000..79e55c3 --- /dev/null +++ b/libs/etclib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + etclib.o + +# binary target +../libetclib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +etclib.o: etclib.c etclib.h + +clean: + -rm -f *.o ../libetclib.a diff --git a/libs/etclib/etclib.c b/libs/etclib/etclib.c new file mode 100644 index 0000000..09a149e --- /dev/null +++ b/libs/etclib/etclib.c @@ -0,0 +1,114 @@ +// Copyright 2009 Google Inc. +// +// Based on the code from Android ETC1Util. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "etclib.h" + +static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){ + int baseX = 0, baseY = 0; + const int modifierTable[] = { + 2, 8, -2, -8, + 5, 17, -5, -17, + 9, 29, -9, -29, + 13, 42, -13, -42, + 18, 60, -18, -60, + 24, 80, -24, -80, + 33, 106, -33, -106, + 47, 183, -47, -183 + }; + const int *table = modifierTable + tableIndex * 4; + int i; + + if ( second ) { + if ( flipped ) { + baseY = 2; + } + else { + baseX = 2; + } + } + + for ( i = 0; i < 8; i++ ) + { + int x, y, k, delta; + int qr, qg, qb; + byte *q; + + if ( flipped ) { + x = baseX + ( i >> 1 ); + y = baseY + ( i & 1 ); + } + else { + x = baseX + ( i >> 2 ); + y = baseY + ( i & 3 ); + } + k = y + ( x * 4 ); + delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )]; + + qr = r + delta; + qg = g + delta; + qb = b + delta; + if ( outRGBA ) { + q = out + 4 * ( x + 4 * y ); + } + else { + q = out + 3 * ( x + 4 * y ); + } + *( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 ); + *( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 ); + *( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 ); + if ( outRGBA ) { + *( q++ ) = 255; + } + } +} + +void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){ + unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3]; + unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7]; + int r1, r2, g1, g2, b1, b2; + qboolean flipped = ( ( high & 1 ) != 0 ); + + if ( high & 2 ) { + int rBase, gBase, bBase; + const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + + rBase = ( high >> 27 ) & 31; + r1 = ( rBase << 3 ) | ( rBase >> 2 ); + rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31; + r2 = ( rBase << 3 ) | ( rBase >> 2 ); + + gBase = ( high >> 19 ) & 31; + g1 = ( gBase << 3 ) | ( gBase >> 2 ); + gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31; + g2 = ( gBase << 3 ) | ( gBase >> 2 ); + + bBase = ( high >> 11 ) & 31; + b1 = ( bBase << 3 ) | ( bBase >> 2 ); + bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31; + b2 = ( bBase << 3 ) | ( bBase >> 2 ); + } + else { + r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf ); + r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf ); + g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf ); + g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf ); + b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf ); + b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf ); + } + + ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped ); + ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped ); +} diff --git a/libs/etclib/etclib.h b/libs/etclib/etclib.h new file mode 100644 index 0000000..7d24074 --- /dev/null +++ b/libs/etclib/etclib.h @@ -0,0 +1,33 @@ +// Copyright 2009 Google Inc. +// +// Based on the code from Android ETC1Util. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef INCLUDED_ETCLIB_H +#define INCLUDED_ETCLIB_H + +#include "bytebool.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libs/filematch/CMakeLists.txt b/libs/filematch/CMakeLists.txt deleted file mode 100644 index c7d8a9e..0000000 --- a/libs/filematch/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(filematch - ../filematch.c ../filematch.h - ) diff --git a/libs/filematch/Makefile b/libs/filematch/Makefile new file mode 100644 index 0000000..f507520 --- /dev/null +++ b/libs/filematch/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + filematch.o + +# binary target +../libfilematch.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +filematch.o: filematch.c filematch.h + +clean: + -rm -f *.o ../libfilematch.a diff --git a/libs/filematch/filematch.c b/libs/filematch/filematch.c new file mode 100644 index 0000000..5b01db7 --- /dev/null +++ b/libs/filematch/filematch.c @@ -0,0 +1,74 @@ +#include +#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 +} diff --git a/libs/filematch/filematch.h b/libs/filematch/filematch.h new file mode 100644 index 0000000..cdb340a --- /dev/null +++ b/libs/filematch/filematch.h @@ -0,0 +1,16 @@ +#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 diff --git a/libs/generic/CMakeLists.txt b/libs/generic/CMakeLists.txt deleted file mode 100644 index d89f574..0000000 --- a/libs/generic/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -add_library(generic - arrayrange.h - bitfield.h - callback.cpp callback.h - constant.cpp constant.h - enumeration.h - functional.h - object.cpp object.h - reference.h - referencecounted.h - static.cpp static.h - vector.h - ) diff --git a/libs/generic/Makefile b/libs/generic/Makefile new file mode 100644 index 0000000..3dca823 --- /dev/null +++ b/libs/generic/Makefile @@ -0,0 +1,23 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + callback.o constant.o object.o static.o + +# binary target +../libgeneric.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +callback.o: callback.cpp callback.h +constant.o: constant.cpp constant.h +object.o: object.cpp object.h +static.o: static.cpp static.h + +clean: + -rm -f *.o ../libgeneric.a diff --git a/libs/gtkutil/CMakeLists.txt b/libs/gtkutil/CMakeLists.txt deleted file mode 100644 index b62098c..0000000 --- a/libs/gtkutil/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -add_library(gtkutil - 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.cpp 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.cpp nonmodal.h - paned.cpp paned.h - pointer.h - toolbar.cpp toolbar.h - widget.cpp widget.h - window.cpp window.h - xorrectangle.cpp xorrectangle.h - ) - -target_include_directories(gtkutil PRIVATE uilib) -target_link_libraries(gtkutil PRIVATE uilib) - -target_include_directories(gtkutil PRIVATE ${GTK${GTK_TARGET}_INCLUDE_DIRS}) -target_link_libraries(gtkutil PRIVATE ${GTK${GTK_TARGET}_LIBRARIES}) - -if (GTK_TARGET EQUAL 2) - find_package(GtkGLExt REQUIRED) - target_include_directories(gtkutil PRIVATE ${GtkGLExt_INCLUDE_DIRS}) - target_link_libraries(gtkutil PRIVATE ${GtkGLExt_LIBRARIES}) -endif () diff --git a/libs/gtkutil/Makefile b/libs/gtkutil/Makefile new file mode 100644 index 0000000..c4bb142 --- /dev/null +++ b/libs/gtkutil/Makefile @@ -0,0 +1,57 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include/ -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +accelerator.o \ +button.o \ +clipboard.o \ +cursor.o \ +dialog.o \ +entry.o \ +filechooser.o \ +frame.o \ +glfont.o \ +glwidget.o \ +image.o \ +menu.o \ +messagebox.o \ +nonmodal.o \ +paned.o \ +toolbar.o \ +widget.o \ +window.o \ +xorrectangle.o \ + +# binary target +../libgtkutil.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +accelerator.o: accelerator.cpp accelerator.h +button.o: button.cpp button.h +clipboard.o: clipboard.cpp clipboard.h +cursor.o: cursor.cpp cursor.h +dialog.o: dialog.cpp dialog.h +entry.o: entry.cpp entry.h +filechooser.o: filechooser.cpp filechooser.h +frame.o: frame.cpp frame.h +glfont.o: glfont.cpp glfont.h +glwidget.o: glwidget.cpp glwidget.h +image.o: image.cpp image.h +menu.o: menu.cpp menu.h +messagebox.o: messagebox.cpp messagebox.h +nonmodal.o: nonmodal.cpp nonmodal.h +paned.o: paned.cpp paned.h +toolbar.o: toolbar.cpp toolbar.h +widget.o: widget.cpp widget.h +window.o: window.cpp window.h +xorrectangle.o: xorrectangle.cpp xorrectangle.h + +clean: + -rm -f *.o ../libgtkutil.a diff --git a/libs/l_net/CMakeLists.txt b/libs/l_net/CMakeLists.txt deleted file mode 100644 index a0a19a8..0000000 --- a/libs/l_net/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(L_NETLIST - 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) - target_link_libraries(l_net PRIVATE ws2_32) -endif () diff --git a/libs/l_net/Makefile b/libs/l_net/Makefile new file mode 100644 index 0000000..71c9382 --- /dev/null +++ b/libs/l_net/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + l_net.o l_net_berkley.o + +# binary target +../libl_net.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +l_net.o: l_net.c l_net.h +l_net_berkley.o: l_net_berkley.c + +clean: + -rm -f *.o ../libl_net.a diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt deleted file mode 100644 index 6cfedbe..0000000 --- a/libs/math/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_library(math - _.cpp - aabb.h - curve.h - frustum.h - line.h - matrix.h - pi.h - plane.h - quaternion.h - vector.h - ) diff --git a/libs/math/Makefile b/libs/math/Makefile new file mode 100644 index 0000000..9a17352 --- /dev/null +++ b/libs/math/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libmath.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp aabb.h curve.h frustum.h line.h matrix.h pi.h plane.h quaternion.h vector.h + +clean: + -rm -f *.o ../libmath.a diff --git a/libs/mathlib/CMakeLists.txt b/libs/mathlib/CMakeLists.txt deleted file mode 100644 index 5682a5e..0000000 --- a/libs/mathlib/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_library(mathlib - bbox.c - line.c - m4x4.c - mathlib.c ../mathlib.h - ray.c - ) diff --git a/libs/mathlib/Makefile b/libs/mathlib/Makefile new file mode 100644 index 0000000..2e48089 --- /dev/null +++ b/libs/mathlib/Makefile @@ -0,0 +1,24 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + bbox.o line.o m4x4.o mathlib.o ray.o + +# binary target +../libmathlib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +bbox.o: bbox.c +line.o: line.c +m4x4.o: m4x4.c +mathlib.o: mathlib.c ../mathlib.h +ray.o: ray.c + +clean: + -rm -f *.o ../libmathlib.a diff --git a/libs/memory/CMakeLists.txt b/libs/memory/CMakeLists.txt deleted file mode 100644 index 1c34573..0000000 --- a/libs/memory/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(memory - allocator.cpp allocator.h - ) diff --git a/libs/memory/Makefile b/libs/memory/Makefile new file mode 100644 index 0000000..51888ab --- /dev/null +++ b/libs/memory/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + allocator.o + +# binary target +../libmemory.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +allocator.o: allocator.cpp allocator.h + +clean: + -rm -f *.o ../libmemory.a diff --git a/libs/modulesystem/CMakeLists.txt b/libs/modulesystem/CMakeLists.txt deleted file mode 100644 index d27aa63..0000000 --- a/libs/modulesystem/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(modulesystem - moduleregistry.h - modulesmap.h - singletonmodule.cpp singletonmodule.h - ) diff --git a/libs/modulesystem/Makefile b/libs/modulesystem/Makefile new file mode 100644 index 0000000..25a5e73 --- /dev/null +++ b/libs/modulesystem/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + singletonmodule.o + +# binary target +../libmodulesystem.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +singletonmodule.o: singletonmodule.cpp singletonmodule.h moduleregistry.h modulesmap.h + +clean: + -rm -f *.o ../libmodulesystem.a diff --git a/libs/os/CMakeLists.txt b/libs/os/CMakeLists.txt deleted file mode 100644 index 437b506..0000000 --- a/libs/os/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_library(os - _.cpp - dir.h - file.h - path.h - ) - -find_package(GLIB REQUIRED) -target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(os PRIVATE ${GLIB_LIBRARIES}) diff --git a/libs/os/Makefile b/libs/os/Makefile new file mode 100644 index 0000000..8fbdb8e --- /dev/null +++ b/libs/os/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libos.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp dir.h file.h path.h + +clean: + -rm -f *.o ../libos.a diff --git a/libs/picomodel/CMakeLists.txt b/libs/picomodel/CMakeLists.txt deleted file mode 100644 index b2e8ccc..0000000 --- a/libs/picomodel/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -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 ../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 - pm_iqm.c - ) diff --git a/libs/picomodel/Makefile b/libs/picomodel/Makefile new file mode 100644 index 0000000..89b782d --- /dev/null +++ b/libs/picomodel/Makefile @@ -0,0 +1,67 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + clip.o \ + envelope.o \ + list.o \ + lwio.o \ + lwo2.o \ + lwob.o \ + pntspols.o \ + surface.o \ + vecmath.o \ + vmap.o \ + picointernal.o \ + picomodel.o \ + picomodules.o \ + pm_3ds.o \ + pm_ase.o \ + pm_fm.o \ + pm_lwo.o \ + pm_md2.o \ + pm_md3.o \ + pm_mdc.o \ + pm_ms3d.o \ + pm_obj.o \ + pm_terrain.o \ + pm_iqm.o + +# binary target +../libpicomodel.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +clip.o: clip.c +envelope.o: envelope.c +list.o: list.c +lwio.o: lwio.c +lwo2.o: lwo2.c lwo2.h +lwob.o: lwob.c +pntspols.o: pntspols.c +surface.o: surface.c +vecmath.o: vecmath.c +vmap.o: vmap.c + +picointernal.o: picointernal.c picointernal.h +picomodel.o: picomodel.c ../picomodel.h +picomodules.o: picomodules.c +pm_3ds.o: pm_3ds.c +pm_ase.o: pm_ase.c +pm_fm.o: pm_fm.c pm_fm.h +pm_lwo.o: pm_lwo.c +pm_md2.o: pm_md2.c +pm_md3.o: pm_md3.c +pm_mdc.o: pm_mdc.c +pm_ms3d.o: pm_ms3d.c +pm_obj.o: pm_obj.c +pm_terrain.o: pm_terrain.c +pm_iqm.o: pm_iqm.c + +clean: + -rm -f *.o ../libpicomodel.a diff --git a/libs/picomodel/lwo/clip.c b/libs/picomodel/clip.c similarity index 99% rename from libs/picomodel/lwo/clip.c rename to libs/picomodel/clip.c index 6a347f5..8995dd0 100644 --- a/libs/picomodel/lwo/clip.c +++ b/libs/picomodel/clip.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/envelope.c b/libs/picomodel/envelope.c similarity index 99% rename from libs/picomodel/lwo/envelope.c rename to libs/picomodel/envelope.c index 27992d4..c4120d3 100644 --- a/libs/picomodel/lwo/envelope.c +++ b/libs/picomodel/envelope.c @@ -7,7 +7,7 @@ Ernie Wright 16 Nov 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" /* diff --git a/libs/picomodel/lwo/list.c b/libs/picomodel/list.c similarity index 98% rename from libs/picomodel/lwo/list.c rename to libs/picomodel/list.c index d57547d..097c0af 100644 --- a/libs/picomodel/lwo/list.c +++ b/libs/picomodel/list.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/lwio.c b/libs/picomodel/lwio.c similarity index 99% rename from libs/picomodel/lwo/lwio.c rename to libs/picomodel/lwio.c index e825a34..aff47e5 100644 --- a/libs/picomodel/lwo/lwio.c +++ b/libs/picomodel/lwio.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include #include "globaldefs.h" diff --git a/libs/picomodel/lwo/lwo2.c b/libs/picomodel/lwo2.c similarity index 99% rename from libs/picomodel/lwo/lwo2.c rename to libs/picomodel/lwo2.c index fd367e4..58b1f8f 100644 --- a/libs/picomodel/lwo/lwo2.c +++ b/libs/picomodel/lwo2.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include "globaldefs.h" diff --git a/libs/picomodel/lwo/lwo2.h b/libs/picomodel/lwo2.h similarity index 100% rename from libs/picomodel/lwo/lwo2.h rename to libs/picomodel/lwo2.h diff --git a/libs/picomodel/lwo/lwob.c b/libs/picomodel/lwob.c similarity index 99% rename from libs/picomodel/lwo/lwob.c rename to libs/picomodel/lwob.c index cae5357..6cad84f 100644 --- a/libs/picomodel/lwo/lwob.c +++ b/libs/picomodel/lwob.c @@ -8,7 +8,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include "globaldefs.h" diff --git a/libs/picomodel/pm_lwo.c b/libs/picomodel/pm_lwo.c index 6cbf0f4..e9ab02b 100644 --- a/libs/picomodel/pm_lwo.c +++ b/libs/picomodel/pm_lwo.c @@ -34,7 +34,7 @@ /* dependencies */ #include "picointernal.h" -#include "lwo/lwo2.h" +#include "lwo2.h" /* uncomment when debugging this module */ /*#define DEBUG_PM_LWO*/ diff --git a/libs/picomodel/lwo/pntspols.c b/libs/picomodel/pntspols.c similarity index 99% rename from libs/picomodel/lwo/pntspols.c rename to libs/picomodel/pntspols.c index fc2f642..52c81b0 100644 --- a/libs/picomodel/lwo/pntspols.c +++ b/libs/picomodel/pntspols.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/surface.c b/libs/picomodel/surface.c similarity index 99% rename from libs/picomodel/lwo/surface.c rename to libs/picomodel/surface.c index 1b2c1fc..f2200b5 100644 --- a/libs/picomodel/lwo/surface.c +++ b/libs/picomodel/surface.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/vecmath.c b/libs/picomodel/vecmath.c similarity index 100% rename from libs/picomodel/lwo/vecmath.c rename to libs/picomodel/vecmath.c diff --git a/libs/picomodel/lwo/vmap.c b/libs/picomodel/vmap.c similarity index 99% rename from libs/picomodel/lwo/vmap.c rename to libs/picomodel/vmap.c index 8976572..96a7123 100644 --- a/libs/picomodel/lwo/vmap.c +++ b/libs/picomodel/vmap.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/profile/CMakeLists.txt b/libs/profile/CMakeLists.txt deleted file mode 100644 index e3822f4..0000000 --- a/libs/profile/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_library(profile - file.cpp file.h - profile.cpp profile.h - ) diff --git a/libs/profile/Makefile b/libs/profile/Makefile new file mode 100644 index 0000000..a6c7091 --- /dev/null +++ b/libs/profile/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + file.o profile.o + +# binary target +../libprofile.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +file.o: file.cpp file.h +profile.o: profile.cpp profile.h + +clean: + -rm -f *.o ../libprofile.a diff --git a/libs/script/CMakeLists.txt b/libs/script/CMakeLists.txt deleted file mode 100644 index 6e49527..0000000 --- a/libs/script/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(script - _.cpp - scripttokeniser.h - scripttokenwriter.h - ) diff --git a/libs/script/Makefile b/libs/script/Makefile new file mode 100644 index 0000000..36b5337 --- /dev/null +++ b/libs/script/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libscript.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp scripttokeniser.h scripttokenwriter.h + +clean: + -rm -f *.o ../libscript.a diff --git a/libs/signal/CMakeLists.txt b/libs/signal/CMakeLists.txt deleted file mode 100644 index 499a483..0000000 --- a/libs/signal/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(signal - isignal.h - signal.cpp signal.h - signalfwd.h - ) diff --git a/libs/signal/Makefile b/libs/signal/Makefile new file mode 100644 index 0000000..d84fbd9 --- /dev/null +++ b/libs/signal/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + signal.o + +# binary target +../libsignal.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +signal.o: signal.cpp isignal.h signal.h signalfwd.h + +clean: + -rm -f *.o ../libsignal.a diff --git a/libs/splines/CMakeLists.txt b/libs/splines/CMakeLists.txt deleted file mode 100644 index 3a6b603..0000000 --- a/libs/splines/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -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 - ) diff --git a/libs/splines/Makefile b/libs/splines/Makefile new file mode 100644 index 0000000..a1beebd --- /dev/null +++ b/libs/splines/Makefile @@ -0,0 +1,34 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + math_angles.o \ + math_matrix.o \ + math_quaternion.o \ + math_vector.o \ + q_parse.o \ + q_shared.o \ + splines.o \ + util_str.o + +# binary target +../libsplines.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +math_angles.o: math_angles.cpp math_angles.h +math_matrix.o: math_matrix.cpp math_matrix.h +math_quaternion.o: math_quaternion.cpp math_quaternion.h +math_vector.o: math_vector.cpp math_vector.h +q_parse.o: q_parse.cpp +q_shared.o: q_shared.cpp q_shared.h +splines.o: splines.cpp splines.h +util_str.o: util_str.cpp util_str.h util_list.h + +clean: + -rm -f *.o ../libsplines.a diff --git a/libs/stream/CMakeLists.txt b/libs/stream/CMakeLists.txt deleted file mode 100644 index 6ce7939..0000000 --- a/libs/stream/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(stream - _.cpp - filestream.h - memstream.h - stringstream.h - textfilestream.h - textstream.h - ) diff --git a/libs/stream/Makefile b/libs/stream/Makefile new file mode 100644 index 0000000..b717df9 --- /dev/null +++ b/libs/stream/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + _.o + +# binary target +../libstream.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp filestream.h memstream.h stringstream.h textfilestream.h textstream.h + +clean: + -rm -f *.o ../libstream.a diff --git a/libs/string/CMakeLists.txt b/libs/string/CMakeLists.txt deleted file mode 100644 index 4b0720a..0000000 --- a/libs/string/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(string - pooledstring.cpp pooledstring.h - string.h - stringfwd.h - ) diff --git a/libs/string/Makefile b/libs/string/Makefile new file mode 100644 index 0000000..a426bda --- /dev/null +++ b/libs/string/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + pooledstring.o + +# binary target +../libstring.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +pooledstring.o: pooledstring.cpp pooledstring.h string.h stringfwd.h + +clean: + -rm -f *.o ../libstring.a diff --git a/libs/uilib/CMakeLists.txt b/libs/uilib/CMakeLists.txt deleted file mode 100644 index 080376b..0000000 --- a/libs/uilib/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_library(uilib - uilib.cpp - ) - -find_package(GLIB REQUIRED) -target_include_directories(uilib PUBLIC ${GLIB_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${GLIB_LIBRARIES}) - -find_package(Pango REQUIRED) -target_include_directories(uilib PUBLIC ${Pango_INCLUDE_DIRS} ${PangoFT2_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${Pango_LIBRARIES} ${PangoFT2_LIBRARIES}) - -find_package(GTK${GTK_TARGET} REQUIRED) -target_include_directories(uilib PUBLIC ${GTK${GTK_TARGET}_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${GTK${GTK_TARGET}_LIBRARIES}) - -target_include_directories(uilib PUBLIC gtkutil) -target_link_libraries(uilib PUBLIC gtkutil) diff --git a/libs/uilib/Makefile b/libs/uilib/Makefile new file mode 100644 index 0000000..6925190 --- /dev/null +++ b/libs/uilib/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + uilib.o + +# binary target +../libuilib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +uilib.o: uilib.cpp uilib.h + +clean: + -rm -f *.o ../libuilib.a diff --git a/libs/xml/CMakeLists.txt b/libs/xml/CMakeLists.txt deleted file mode 100644 index 96e1e21..0000000 --- a/libs/xml/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -add_library(xmllib - ixml.h - xmlelement.h - xmlparser.h - xmltextags.cpp xmltextags.h - xmlwriter.h - ) - -find_package(GLIB REQUIRED) -target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS}) -target_link_libraries(xmllib PUBLIC ${GLIB_LIBRARIES}) - -find_package(LibXml2 REQUIRED) -target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR}) -target_link_libraries(xmllib PUBLIC ${LIBXML2_LIBRARIES}) diff --git a/libs/xml/Makefile b/libs/xml/Makefile new file mode 100644 index 0000000..de02b0a --- /dev/null +++ b/libs/xml/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + xmltextags.o + +# binary target +../libxmllib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +xmltextags.o: ixml.h xmlelement.h xmlparser.h xmltextags.cpp xmltextags.h xmlwriter.h + +clean: + -rm -f *.o ../libxmllib.a diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt deleted file mode 100644 index 4efde2a..0000000 --- a/plugins/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/modules") - -add_custom_target(modules) -macro(radiant_plugin name) - message(STATUS "Found Module ${name}") - add_library(${name} MODULE ${ARGN}) - add_dependencies(modules ${name}) - copy_dlls(${name}) - install( - TARGETS ${name} - LIBRARY DESTINATION modules - ) -endmacro() - -add_subdirectory(archivezip) -add_subdirectory(entity) -add_subdirectory(image) -add_subdirectory(mapq3) -add_subdirectory(iqmmodel) -add_subdirectory(model) -add_subdirectory(shaders) -add_subdirectory(vfspk3) diff --git a/plugins/Makefile b/plugins/Makefile new file mode 100644 index 0000000..fd93e87 --- /dev/null +++ b/plugins/Makefile @@ -0,0 +1,20 @@ +all: + mkdir -p ../build/plugins + cd archivezip && $(MAKE) + cd entity && $(MAKE) + cd image && $(MAKE) + cd iqmmodel && $(MAKE) + cd mapq3 && $(MAKE) + cd model && $(MAKE) + cd shaders && $(MAKE) + cd vfspk3 && $(MAKE) +clean: + -rm -rf ../build/plugins + cd archivezip && $(MAKE) clean + cd entity && $(MAKE) clean + cd image && $(MAKE) clean + cd iqmmodel && $(MAKE) clean + cd mapq3 && $(MAKE) clean + cd model && $(MAKE) clean + cd shaders && $(MAKE) clean + cd vfspk3 && $(MAKE) clean diff --git a/plugins/archivezip/CMakeLists.txt b/plugins/archivezip/CMakeLists.txt deleted file mode 100644 index 7ed025d..0000000 --- a/plugins/archivezip/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -radiant_plugin(archivezip - archive.cpp archive.h - pkzip.h - plugin.cpp - zlibstream.h - ) - -find_package(ZLIB REQUIRED) -target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS}) -target_link_libraries(archivezip PRIVATE ${ZLIB_LIBRARIES}) diff --git a/plugins/archivezip/Makefile b/plugins/archivezip/Makefile new file mode 100644 index 0000000..a28797b --- /dev/null +++ b/plugins/archivezip/Makefile @@ -0,0 +1,23 @@ +# WorldSpawn Plugin Makefile + +PLUGIN_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + archive.o plugin.o + +# binary target +../../build/plugins/libarchivezip.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + +# object files +archive.o: archive.cpp archive.h +plugin.o: plugin.cpp zlibstream.h + +clean: + -rm -f *.o ../../build/plugins/libarchivezip.so diff --git a/plugins/archivezip/archivezip.def b/plugins/archivezip/archivezip.def deleted file mode 100644 index 82b0c81..0000000 --- a/plugins/archivezip/archivezip.def +++ /dev/null @@ -1,7 +0,0 @@ -; archivezip.def : Declares the module parameters for the DLL. - -LIBRARY "ARCHIVEZIP" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/archivezip/plugin.cpp b/plugins/archivezip/plugin.cpp index eda88c3..eda4b41 100644 --- a/plugins/archivezip/plugin.cpp +++ b/plugins/archivezip/plugin.cpp @@ -96,7 +96,13 @@ typedef SingletonModule ArchiveDPKModule; ArchiveDPKModule g_ArchiveDPKModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/config.mk b/plugins/config.mk deleted file mode 100644 index 8b97a39..0000000 --- a/plugins/config.mk +++ /dev/null @@ -1,32 +0,0 @@ -# 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 $@ diff --git a/plugins/entity/CMakeLists.txt b/plugins/entity/CMakeLists.txt deleted file mode 100644 index bd99916..0000000 --- a/plugins/entity/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -radiant_plugin(entity - angle.h - angles.h - colour.h - curve.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 - prop_dynamic.cpp prop_dynamic.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 - ) - -target_include_directories(entity - PRIVATE $ - ) diff --git a/plugins/entity/Makefile b/plugins/entity/Makefile new file mode 100644 index 0000000..6d908c2 --- /dev/null +++ b/plugins/entity/Makefile @@ -0,0 +1,44 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + eclassmodel.o \ + entity.o \ + filters.o \ + generic.o \ + group.o \ + light.o \ + miscmodel.o \ + prop_dynamic.o \ + plugin.o \ + skincache.o \ + targetable.o + +# binary target +../../build/plugins/libentity.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + +# object files +eclassmodel.o: eclassmodel.cpp eclassmodel.h +entity.o: entity.cpp entity.h +filters.o: filters.cpp filters.h +generic.o: generic.cpp generic.h +group.o: group.cpp group.h +light.o: light.cpp light.h +miscmodel.o: miscmodel.cpp miscmodel.h +prop_dynamic.o: prop_dynamic.cpp prop_dynamic.h +plugin.o: plugin.cpp +skincache.o: skincache.cpp skincache.h +targetable.o: targetable.cpp targetable.h + +clean: + -rm -f *.o ../../build/plugins/libentity.so diff --git a/plugins/entity/entityq3.def b/plugins/entity/entityq3.def deleted file mode 100644 index 00d82f4..0000000 --- a/plugins/entity/entityq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; entityq3.def : Declares the module parameters for the DLL. - -LIBRARY "ENTITYQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/entity/plugin.cpp b/plugins/entity/plugin.cpp index 5dc0a05..eecac6a 100644 --- a/plugins/entity/plugin.cpp +++ b/plugins/entity/plugin.cpp @@ -87,7 +87,13 @@ typedef SingletonModule EntityQ3Module; EntityQ3Module g_EntityQ3Module; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/image/CMakeLists.txt b/plugins/image/CMakeLists.txt deleted file mode 100644 index e1f40cc..0000000 --- a/plugins/image/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -radiant_plugin(image - 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) -target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR}) -target_link_libraries(image PRIVATE ddslib etclib ${JPEG_LIBRARIES}) diff --git a/plugins/image/Makefile b/plugins/image/Makefile new file mode 100644 index 0000000..acb27b9 --- /dev/null +++ b/plugins/image/Makefile @@ -0,0 +1,30 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared -ljpeg + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + bmp.o dds.o image.o jpeg.o ktx.o pcx.o tga.o + +# binary target +../../build/plugins/libimage.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libddslib.a ../../libs/libetclib.a + +# object files +bmp.o: bmp.cpp bmp.h +dds.o: dds.cpp dds.h +image.o: image.cpp +jpeg.o: jpeg.cpp jpeg.h +ktx.o: ktx.cpp ktx.h +pcx.o: pcx.cpp pcx.h +tga.o: tga.cpp tga.h + +clean: + -rm -f *.o ../../build/plugins/libimage.so diff --git a/plugins/image/image.cpp b/plugins/image/image.cpp index f7f7352..54cd606 100644 --- a/plugins/image/image.cpp +++ b/plugins/image/image.cpp @@ -173,7 +173,13 @@ typedef SingletonModule ImageKTXModule; ImageKTXModule g_ImageKTXModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/image/imageq3.def b/plugins/image/imageq3.def deleted file mode 100644 index e8c608f..0000000 --- a/plugins/image/imageq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; imageq3.def : Declares the module parameters for the DLL. - -LIBRARY "ImageQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/iqmmodel/CMakeLists.txt b/plugins/iqmmodel/CMakeLists.txt deleted file mode 100644 index e371ae7..0000000 --- a/plugins/iqmmodel/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -radiant_plugin(iqmmodel - iqm.cpp iqm.h - plugin.cpp plugin.h - ) diff --git a/plugins/iqmmodel/Makefile b/plugins/iqmmodel/Makefile new file mode 100644 index 0000000..b399205 --- /dev/null +++ b/plugins/iqmmodel/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + iqm.o plugin.o + +# binary target +../../build/plugins/libiqmmodel.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +iqm.o: iqm.cpp iqm.h +plugin.o: plugin.cpp plugin.h + +clean: + -rm -f *.o ../../build/plugins/libiqmmodel.so diff --git a/plugins/iqmmodel/modeliqm.def b/plugins/iqmmodel/modeliqm.def deleted file mode 100644 index 5791cd7..0000000 --- a/plugins/iqmmodel/modeliqm.def +++ /dev/null @@ -1,7 +0,0 @@ -; modeliqm.def : Declares the module parameters for the DLL. - -LIBRARY "MODELIQM" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/iqmmodel/plugin.cpp b/plugins/iqmmodel/plugin.cpp index 5d0999c..64f62d0 100644 --- a/plugins/iqmmodel/plugin.cpp +++ b/plugins/iqmmodel/plugin.cpp @@ -93,7 +93,13 @@ class ModelVVMAPI : public TypeSystemRef { typedef SingletonModule ModelVVMModule; ModelVVMModule g_ModelVVMModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer &server ){ +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules( ModuleServer &server ){ initialiseModule( server ); g_ModelIQMModule.selfRegister(); diff --git a/plugins/mapq3/CMakeLists.txt b/plugins/mapq3/CMakeLists.txt deleted file mode 100644 index f60c5f9..0000000 --- a/plugins/mapq3/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -radiant_plugin(mapq3 - parse.cpp parse.h - plugin.cpp - write.cpp write.h - ) - -target_include_directories(mapq3 - PRIVATE $ - ) diff --git a/plugins/mapq3/Makefile b/plugins/mapq3/Makefile new file mode 100644 index 0000000..0d507f0 --- /dev/null +++ b/plugins/mapq3/Makefile @@ -0,0 +1,27 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + parse.o plugin.o write.o + +# binary target +../../build/plugins/libmapq3.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +parse.o: parse.cpp parse.h +plugin.o: plugin.cpp +write.o: write.cpp write.h + +clean: + -rm -f *.o ../../build/plugins/libmapq3.so diff --git a/plugins/mapq3/mapq3.def b/plugins/mapq3/mapq3.def deleted file mode 100644 index ddbbaf5..0000000 --- a/plugins/mapq3/mapq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; mapq3.def : Declares the module parameters for the DLL. - -LIBRARY "MAPQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/mapq3/plugin.cpp b/plugins/mapq3/plugin.cpp index a33061c..3ffe32e 100644 --- a/plugins/mapq3/plugin.cpp +++ b/plugins/mapq3/plugin.cpp @@ -138,7 +138,13 @@ typedef SingletonModule MapQ3Module; MapQ3Module g_MapQ3Module; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/model/CMakeLists.txt b/plugins/model/CMakeLists.txt deleted file mode 100644 index 4a23e28..0000000 --- a/plugins/model/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -radiant_plugin(model - model.cpp model.h - plugin.cpp - ) - -target_include_directories(model PRIVATE picomodel) -target_link_libraries(model PRIVATE picomodel) diff --git a/plugins/model/Makefile b/plugins/model/Makefile new file mode 100644 index 0000000..39e9047 --- /dev/null +++ b/plugins/model/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + model.o plugin.o + +# binary target +../../build/plugins/libmodel.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libpicomodel.a + + +# object files +model.o: model.cpp model.h +plugin.o: plugin.cpp + +clean: + -rm -f *.o ../../build/plugins/libmodel.so diff --git a/plugins/model/modelpico.def b/plugins/model/modelpico.def deleted file mode 100644 index b92e0db..0000000 --- a/plugins/model/modelpico.def +++ /dev/null @@ -1,7 +0,0 @@ -; modelpico.def : Declares the module parameters for the DLL. - -LIBRARY "MODELPICO" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 \ No newline at end of file diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index 51aa05b..2f052db 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -168,8 +168,13 @@ typedef SingletonModule PicoModelModules; PicoModelModules g_PicoModelModules; - -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/shaders/CMakeLists.txt b/plugins/shaders/CMakeLists.txt deleted file mode 100644 index 04de80f..0000000 --- a/plugins/shaders/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -radiant_plugin(shaders - plugin.cpp - shaders.cpp shaders.h -) - -find_package(GLIB REQUIRED) -target_include_directories(shaders PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(shaders PRIVATE ${GLIB_LIBRARIES}) diff --git a/plugins/shaders/Makefile b/plugins/shaders/Makefile new file mode 100644 index 0000000..f8f79f4 --- /dev/null +++ b/plugins/shaders/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + shaders.o plugin.o + +# binary target +../../build/plugins/libshaders.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +shaders.o: shaders.cpp shaders.h +plugin.o: plugin.cpp + +clean: + -rm -f *.o ../../build/plugins/libshaders.so diff --git a/plugins/shaders/plugin.cpp b/plugins/shaders/plugin.cpp index c302d9b..e8ca1de 100644 --- a/plugins/shaders/plugin.cpp +++ b/plugins/shaders/plugin.cpp @@ -79,7 +79,13 @@ public: typedef SingletonModule > MaterialModule; MaterialModule g_MaterialModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); g_MaterialModule.selfRegister(); diff --git a/plugins/shaders/shadersq3.def b/plugins/shaders/shadersq3.def deleted file mode 100644 index ab66413..0000000 --- a/plugins/shaders/shadersq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; shadersq3.def : Declares the module parameters for the DLL. - -LIBRARY "ShadersQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/vfspk3/CMakeLists.txt b/plugins/vfspk3/CMakeLists.txt deleted file mode 100644 index a55e9de..0000000 --- a/plugins/vfspk3/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -radiant_plugin(vfspk3 - archive.cpp archive.h - vfs.cpp vfs.h - vfspk3.cpp - ) - -find_package(GLIB REQUIRED) -target_include_directories(vfspk3 PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(vfspk3 PRIVATE ${GLIB_LIBRARIES}) - -target_include_directories(vfspk3 PRIVATE filematch) -target_link_libraries(vfspk3 PRIVATE filematch) diff --git a/plugins/vfspk3/Makefile b/plugins/vfspk3/Makefile new file mode 100644 index 0000000..dfbd27f --- /dev/null +++ b/plugins/vfspk3/Makefile @@ -0,0 +1,27 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + archive.o vfs.o vfspk3.o + +# binary target +../../build/plugins/libvfspk3.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libfilematch.a + + +# object files +archive.o: archive.cpp archive.h +vfs.o: vfs.cpp vfs.h +vfspk3.o: vfspk3.cpp + +clean: + -rm -f *.o ../../build/plugins/libvfspk3.so diff --git a/plugins/vfspk3/vfspk3.cpp b/plugins/vfspk3/vfspk3.cpp index 4f16f73..64e2367 100644 --- a/plugins/vfspk3/vfspk3.cpp +++ b/plugins/vfspk3/vfspk3.cpp @@ -76,7 +76,13 @@ ArchiveModules &FileSystemQ3API_getArchiveModules() } -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/vfspk3/vfsq3.def b/plugins/vfspk3/vfsq3.def deleted file mode 100644 index 885ffeb..0000000 --- a/plugins/vfspk3/vfsq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; vfsq3.def : Declares the module parameters for the DLL. - -LIBRARY "VFSQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/radiant/CMakeLists.txt b/radiant/CMakeLists.txt deleted file mode 100644 index 170dda1..0000000 --- a/radiant/CMakeLists.txt +++ /dev/null @@ -1,133 +0,0 @@ -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") - -find_package(OpenGL REQUIRED) - -string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext) -add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}") -unset(_clibext) - -set(RADIANTLIST - autosave.cpp autosave.h - brush.cpp brush.h - brush_primit.cpp brush_primit.h - brushmanip.cpp brushmanip.h - brushmodule.cpp brushmodule.h - brushnode.cpp brushnode.h - brushtokens.cpp brushtokens.h - brushxml.cpp brushxml.h - build.cpp build.h - camwindow.cpp camwindow.h - clippertool.cpp clippertool.h - commands.cpp commands.h - console.cpp console.h - csg.cpp csg.h - dialog.cpp dialog.h - eclass.cpp eclass.h - eclass_def.cpp eclass_def.h - eclass_doom3.cpp eclass_doom3.h - eclass_fgd.cpp eclass_fgd.h - eclass_xml.cpp eclass_xml.h - entity.cpp entity.h - entityinspector.cpp entityinspector.h - entitylist.cpp entitylist.h - environment.cpp environment.h - error.cpp error.h - feedback.cpp feedback.h - filetypes.cpp filetypes.h - filters.cpp filters.h - findtexturedialog.cpp findtexturedialog.h - glwidget.cpp glwidget.h - grid.cpp grid.h - groupdialog.cpp groupdialog.h - gtkdlgs.cpp gtkdlgs.h - gtkmisc.cpp gtkmisc.h - help.cpp help.h - image.cpp image.h - main.cpp main.h - mainframe.cpp mainframe.h - map.cpp map.h - mru.cpp mru.h - nullmodel.cpp nullmodel.h - parse.cpp parse.h - patch.cpp patch.h - patchdialog.cpp patchdialog.h - patchmanip.cpp patchmanip.h - patchmodule.cpp patchmodule.h - plugin.cpp plugin.h - pluginapi.cpp pluginapi.h - pluginmanager.cpp pluginmanager.h - pluginmenu.cpp pluginmenu.h - plugintoolbar.cpp plugintoolbar.h - points.cpp points.h - preferencedictionary.cpp preferencedictionary.h - preferences.cpp preferences.h - qe3.cpp qe3.h - qgl.cpp qgl.h - referencecache.cpp referencecache.h - renderer.cpp renderer.h - renderstate.cpp renderstate.h - resource.h - scenegraph.cpp scenegraph.h - select.cpp select.h - selection.cpp selection.h - server.cpp server.h - shaders.cpp shaders.h - sockets.cpp sockets.h - stacktrace.cpp stacktrace.h - surfacedialog.cpp surfacedialog.h - texmanip.cpp texmanip.h - textureentry.cpp textureentry.h - textures.cpp textures.h - texwindow.cpp texwindow.h - timer.cpp timer.h - treemodel.cpp treemodel.h - undo.cpp undo.h - url.cpp url.h - view.cpp view.h - watchbsp.cpp watchbsp.h - winding.cpp winding.h - windowobservers.cpp windowobservers.h - xmlstuff.cpp xmlstuff.h - xywindow.cpp xywindow.h - ) -if (WIN32) - list(APPEND RADIANTLIST multimon.cpp multimon.h) -endif () - -radiant_tool(worldspawn WIN32 worldspawn.rc ${RADIANTLIST}) -add_dependencies(worldspawn modules) -target_link_libraries(worldspawn - ${CMAKE_DL_LIBS} - ${LIBXML2_LIBRARIES} - ${OPENGL_gl_LIBRARY} - ${GTK${GTK_TARGET}_LIBRARIES} - ${GTKGL_LIBRARIES} - includes - cmdlib - container - ddslib - debugging - etclib - filematch - generic - l_net - math - mathlib - memory - modulesystem - os - picomodel - profile - script - signal - splines - stream - string - uilib - xmllib - ) -if (X11_LIBRARIES) - target_link_libraries(worldspawn ${X11_LIBRARIES}) -endif () - -copy_dlls(worldspawn) diff --git a/radiant/Makefile b/radiant/Makefile new file mode 100644 index 0000000..c2fa27d --- /dev/null +++ b/radiant/Makefile @@ -0,0 +1,209 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +GTK_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) + +WS_VERSION= -DWorldSpawn_VERSION="1" -DWorldSpawn_MAJOR_VERSION="0" -DWorldSpawn_MINOR_VERSION="0" -DWorldSpawn_PATCH_VERSION="0" -DWorldSpawn_ABOUTMSG="" + +WS_LIBS= ../libs/libcmdlib.a \ +../libs/libcontainer.a \ +../libs/libddslib.a \ +../libs/libdebugging.a \ +../libs/libetclib.a \ +../libs/libgeneric.a \ +../libs/libgtkutil.a \ +../libs/libl_net.a \ +../libs/libmath.a \ +../libs/libmathlib.a \ +../libs/libmodulesystem.a \ +../libs/libos.a \ +../libs/libpicomodel.a \ +../libs/libprofile.a \ +../libs/libscript.a \ +../libs/libsignal.a \ +../libs/libsplines.a \ +../libs/libstream.a \ +../libs/libstring.a \ +../libs/libuilib.a \ +../libs/libxmllib.a + +WS_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../include -I../libs -DGTK_TARGET=2 $(WS_VERSION) -DPOSIX -DXWINDOWS +WS_LDFLAGS=$(LDFLAGS) -ldl -lm $(GTK_LDFLAGS) -lX11 -lGL -lxml2 -lgdkglext-x11-1.0 -lgtkglext-x11-1.0 -L../lib $(WS_LIBS) + +DO_CXX=$(CXX) $(WS_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + autosave.o \ + brush.o \ + brush_primit.o \ + brushmanip.o \ + brushmodule.o \ + brushnode.o \ + brushtokens.o \ + brushxml.o \ + build.o \ + camwindow.o \ + clippertool.o \ + commands.o \ + console.o \ + csg.o \ + dialog.o \ + eclass.o \ + eclass_def.o \ + eclass_doom3.o \ + eclass_fgd.o \ + eclass_xml.o \ + entity.o \ + entityinspector.o \ + entitylist.o \ + environment.o \ + error.o \ + feedback.o \ + filetypes.o \ + filters.o \ + findtexturedialog.o \ + glwidget.o \ + grid.o \ + groupdialog.o \ + gtkdlgs.o \ + gtkmisc.o \ + help.o \ + image.o \ + main.o \ + mainframe.o \ + map.o \ + mru.o \ + nullmodel.o \ + parse.o \ + patch.o \ + patchdialog.o \ + patchmanip.o \ + patchmodule.o \ + plugin.o \ + pluginapi.o \ + pluginmanager.o \ + pluginmenu.o \ + plugintoolbar.o \ + points.o \ + preferencedictionary.o \ + preferences.o \ + qe3.o \ + qgl.o \ + referencecache.o \ + renderer.o \ + renderstate.o \ + scenegraph.o \ + select.o \ + selection.o \ + server.o \ + shaders.o \ + sockets.o \ + stacktrace.o \ + surfacedialog.o \ + texmanip.o \ + textureentry.o \ + textures.o \ + texwindow.o \ + timer.o \ + treemodel.o \ + undo.o \ + url.o \ + view.o \ + watchbsp.o \ + winding.o \ + windowobservers.o \ + xmlstuff.o \ + xywindow.o + +# binary target +../build/worldspawn: $(WS_OBJS) + $(CXX) -o $@ $(WS_OBJS) $(WS_LDFLAGS) + +clean: + -rm -f *.o ../build/worldspawn + +# object files +autosave.o: autosave.cpp autosave.h +brush.o: brush.cpp brush.h +brush_primit.o: brush_primit.cpp brush_primit.h +brushmanip.o: brushmanip.cpp brushmanip.h +brushmodule.o: brushmodule.cpp brushmodule.h +brushnode.o: brushnode.cpp brushnode.h +brushtokens.o: brushtokens.cpp brushtokens.h +brushxml.o: brushxml.cpp brushxml.h +build.o: build.cpp build.h +camwindow.o: camwindow.cpp camwindow.h +clippertool.o: clippertool.cpp clippertool.h +commands.o: commands.cpp commands.h +console.o: console.cpp console.h +csg.o: csg.cpp csg.h +dialog.o: dialog.cpp dialog.h +eclass.o: eclass.cpp eclass.h +eclass_def.o: eclass_def.cpp eclass_def.h +eclass_doom3.o: eclass_doom3.cpp eclass_doom3.h +eclass_fgd.o: eclass_fgd.cpp eclass_fgd.h +eclass_xml.o: eclass_xml.cpp eclass_xml.h +entity.o: entity.cpp entity.h +entityinspector.o: entityinspector.cpp entityinspector.h +entitylist.o: entitylist.cpp entitylist.h +environment.o: environment.cpp environment.h +error.o: error.cpp error.h +feedback.o: feedback.cpp feedback.h +filetypes.o: filetypes.cpp filetypes.h +filters.o: filters.cpp filters.h +findtexturedialog.o: findtexturedialog.cpp findtexturedialog.h +glwidget.o: glwidget.cpp glwidget.h +grid.o: grid.cpp grid.h +groupdialog.o: groupdialog.cpp groupdialog.h +gtkdlgs.o: gtkdlgs.cpp gtkdlgs.h +gtkmisc.o: gtkmisc.cpp gtkmisc.h +help.o: help.cpp help.h +image.o: image.cpp image.h +main.o: main.cpp main.h +mainframe.o: mainframe.cpp mainframe.h +map.o: map.cpp map.h +mru.o: mru.cpp mru.h +nullmodel.o: nullmodel.cpp nullmodel.h +parse.o: parse.cpp parse.h +patch.o: patch.cpp patch.h +patchdialog.o: patchdialog.cpp patchdialog.h +patchmanip.o: patchmanip.cpp patchmanip.h +patchmodule.o: patchmodule.cpp patchmodule.h +plugin.o: plugin.cpp plugin.h +pluginapi.o: pluginapi.cpp pluginapi.h +pluginmanager.o: pluginmanager.cpp pluginmanager.h +pluginmenu.o: pluginmenu.cpp pluginmenu.h +plugintoolbar.o: plugintoolbar.cpp plugintoolbar.h +points.o: points.cpp points.h +preferencedictionary.o: preferencedictionary.cpp preferencedictionary.h +preferences.o: preferences.cpp preferences.h +qe3.o: qe3.cpp qe3.h +qgl.o: qgl.cpp qgl.h +referencecache.o: referencecache.cpp referencecache.h +renderer.o: renderer.cpp renderer.h +renderstate.o: renderstate.cpp renderstate.h +scenegraph.o: scenegraph.cpp scenegraph.h +select.o: select.cpp select.h +selection.o: selection.cpp selection.h +server.o: server.cpp server.h +shaders.o: shaders.cpp shaders.h +sockets.o: sockets.cpp sockets.h +stacktrace.o: stacktrace.cpp stacktrace.h +surfacedialog.o: surfacedialog.cpp surfacedialog.h +texmanip.o: texmanip.cpp texmanip.h +textureentry.o: textureentry.cpp textureentry.h +textures.o: textures.cpp textures.h +texwindow.o: texwindow.cpp texwindow.h +timer.o: timer.cpp timer.h +treemodel.o: treemodel.cpp treemodel.h +undo.o: undo.cpp undo.h +url.o: url.cpp url.h +view.o: view.cpp view.h +watchbsp.o: watchbsp.cpp watchbsp.h +winding.o: winding.cpp winding.h +windowobservers.o: windowobservers.cpp windowobservers.h +xmlstuff.o: xmlstuff.cpp xmlstuff.h +xywindow.o: xywindow.cpp xywindow.h diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index adf5e7d..7bfc817 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -438,7 +438,7 @@ void DoAbout() } { - char const *label_text = "WorldSpawn " WorldSpawn_VERSION "\n" + char const *label_text = "WorldSpawn\n" __DATE__ "\n\n" "QER taken to the space age.\n\n" "Developed by Vera Visions LLC.\n" diff --git a/radiant/main.cpp b/radiant/main.cpp index e16a1ce..1820a10 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -373,6 +373,8 @@ bool check_version_file(const char *filename, const char *version) bool check_version() { + return true; +#if 0 // a safe check to avoid people running broken installations // (otherwise, they run it, crash it, and blame us for not forcing them hard enough to pay attention while installing) // make something idiot proof and someone will make better idiots, this may be overkill @@ -403,6 +405,7 @@ bool check_version() ui::alert(ui::root, msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Default); } return bVerIsGood; +#endif } void create_global_pid() diff --git a/radiant/map.cpp b/radiant/map.cpp index f94aad3..33cda2a 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -1647,8 +1647,7 @@ bool Map_ImportFile(const char *filename) extension_equal(path_get_extension(filename), "map"))) { StringBuffer output; output.push_string(AppPath_get()); - output.push_string("q3map2."); - output.push_string(WorldSpawn_EXECUTABLE); + output.push_string("vmap"); output.push_string(" -v -game "); output.push_string((type && *type) ? type : "quake3"); output.push_string(" -fs_basepath \""); diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index f4646f7..93cad88 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -174,7 +174,6 @@ bool ConfirmModified(const char *title) void bsp_init() { build_set_variable("RadiantPath", AppPath_get()); - build_set_variable("ExecutableType", WorldSpawn_EXECUTABLE); build_set_variable("EnginePath", EnginePath_get()); build_set_variable("UserEnginePath", g_qeglobals.m_userEnginePath.c_str()); build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : ""); diff --git a/resources/Resources/FileIcon_.map.tiff b/resources/Resources/FileIcon_.map.tiff deleted file mode 100644 index 83e7c86..0000000 Binary files a/resources/Resources/FileIcon_.map.tiff and /dev/null differ diff --git a/resources/Resources/Info-gnustep.plist b/resources/Resources/Info-gnustep.plist deleted file mode 100644 index a175f24..0000000 --- a/resources/Resources/Info-gnustep.plist +++ /dev/null @@ -1,16 +0,0 @@ -{ - NSIcon = "icon.tiff"; - NSPrincipalClass = NSApplication; - NSRole = Editor; - - NSTypes = ( - { - NSName = "Map"; - NSHumanReadableName = "Map/Level Source"; - NSIcon = "FileIcon_.map.tiff"; - NSUnixExtensions = ( map ); - NSDOSExtensions = ( map ); - NSRole = Editor; - } - } -} diff --git a/resources/Resources/icon.tiff b/resources/Resources/icon.tiff deleted file mode 100644 index 61ac45e..0000000 Binary files a/resources/Resources/icon.tiff and /dev/null differ diff --git a/resources/WorldSpawn b/resources/WorldSpawn deleted file mode 100755 index c990180..0000000 --- a/resources/WorldSpawn +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "${CURRENT_DIR}" -./worldspawn \ No newline at end of file diff --git a/resources/platform.game/platform/entities.def b/resources/platform.game/platform/entities.def deleted file mode 100644 index 6e96560..0000000 --- a/resources/platform.game/platform/entities.def +++ /dev/null @@ -1,713 +0,0 @@ -/*QUAKED item_ammo (1 0 0) (-8 -8 -8) (8 8 8) -Real beta entity, do not use, left for historical purposes -*/ -/*QUAKED item_health (1 0 0) (-8 -8 0) (8 8 16) -"targetname" Name - -Health pickup item for players that replenishes 25 health points and stops -any potential bleeding. - -model="models/game_objects/obj_health_kit.vvm" -*/ -/*QUAKED ammo_container (1 0 0) (-17 -17 0) (17 17 30) -"targetname" Name - -An ammunitions container, which fills up all weapons when used. - -model="models/ammo/ammo_crate.vvm" -*/ -/*QUAKED item_weapon (1 0 0) (-16 -16 0) (16 16 16) -"weapon" Weapon to give the player. -"delay" How big the magazine/clip is. Default is '-1'. - -Weapon pickup item. -When the magazine size is set to '-1', the weapon will be filled up. -*/ -/*QUAKED info_player_spectate (1 1 1) (-16 -16 -36) (16 16 36) - -Random spectator starting spot. -*/ -/*QUAKED info_player_start (1 0.5 0) (-16 -16 -36) (16 16 36) - -Singleplayer starting spot for players. -*/ -/*QUAKED info_player_deathmatch (1 1 0) (-16 -16 -36) (16 16 36) - -Random multiplayer starting spot for players. -*/ -/*QUAKED info_vehicle_start (0 1 1) (-50 -50 0) (-50 -50 70) - -Random vehicle starting spot for players in the Vehicular Carnage mode. -*/ -/*QUAKED info_player_team1 (1 0 0) (-16 -16 -36) (16 16 36) - -Random multiplayer starting spot for players of team 1. -*/ -/*QUAKED info_player_team2 (0 1 0) (-16 -16 -36) (16 16 36) - -Random multiplayer starting spot for players of team 2. -*/ -/*QUAKED sky_camera (1 0.3 1) (-8 -8 -8) (8 8 8) -"scale" Scale modifier. Default is '16'. - -Defines the position of a skyroom camera. -You want to put this into a dedicated room that contains a 3D skybox. -The scale modifier is more like a divider. You want to keep these -divisable by 2 to avoid any precision funky-ness. -*/ -/*QUAKED prop_dynamic (1 0 0) (-8 -8 -8) (8 8 8) -"model" Model file that will be displayed by the entity. -"modelscale" Scale modifier of the model. Default is '1'. -"angles" Sets the pitch, yaw and roll angles of the model. -"_cs" Toggles if the prop casts a shadow or not. - -Client-side decorative model entity. -*/ -/*QUAKED worldspawn (0 0 0) ? -"message" Level title. -"sounds" Music track to play on the level. -"_fog" Global fog defined in normalized distance, red, green blue, alpha - values. Use the fog console command to test before comitting. -"team1" Team 1 on this level. -"team2" Team 2 on this level. - -This is the main world entity definition. -Any structural brush belongs to it. - -Team numbers: - 0 = Killshots - 1 = Regulators - 2 = Ronin - 3 = Tribals - 4 = USMC - 5 = Vagrants -*/ -/*QUAKED env_glow (0 0.5 1) (-8 -8 -8) (8 8 8) -"shader" Material to use for the glare/glow effect. -"model" Sprite model to use for the glare/glow (idTech 2 only) -"scale" Scale multiplier. -"rendercolor" Material color override in RGB8. -"renderamt" Material alpha override in A8. - -Client-side glare/glow orb effect like the flares in Unreal. -*/ -/*QUAKED env_sound (0 1 0) (-8 -8 -8) (8 8 8) -"radius" Radius in units. -"roomtype" Roomtype value: - 0 = DEFAULT - 1 = PADDEDCELL - 2 = ROOM - 3 = BATHROOM - 4 = LIVINGROOM - 5 = STONEROOM - 6 = AUDITORIUM - 7 = CONCERTHALL - 8 = CAVE - 9 = ARENA - 10 = HANGAR - 11 = CARPETEDHALLWAY - 12 = HALLWAY - 13 = STONECORRIDOR - 14 = ALLEY - 15 = FOREST - 16 = CITY - 17 = MOUNTAINS - 18 = QUARRY - 19 = PLAIN - 20 = PARKINGLOT - 21 = SEWERPIPE - 22 = UNDERWATER - 23 = DRUGGED - 24 = DIZZY - 25 = PSYCHOTIC - 26 = CITYSTREETS - 27 = SUBWAY - 28 = MUSEUM - 29 = LIBRARY - 30 = UNDERPASS - 31 = ABANDONED - 32 = DUSTYROOM - 33 = CHAPEL - 34 = SMALLWATERROOM - -Client-side environmental reverb modifier. -This works only with the OpenAL sound backend. -*/ -/*QUAKED point_message (0.2 1 0.2) (-8 -8 -8) (8 8 8) -"message" The message to display. -"radius" The radius in which it will appear. - -Client-side overlay/message that is projected in relation to its position -in 3D space. -Used for zoo and test maps in which less interactive overlays are desired. -*/ -/*QUAKED env_cubemap (0 0 1) (-8 -8 -8) (8 8 8) -"scale" Texture dimension at which to render the cubemap. Default is '32'. - -Specifies a location for which a cubemap will be generated when the -dev_buildcubemaps console command is executed. -*/ -/*QUAKED env_fade (0 0 0) (-8 -8 -8) (8 8 8) EVF_FADEDROM EVF_MODULATE EVF_ONLYUSER -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"rendercolor" RGB8 Color of the fade effect. -"renderamt" A8 alpha value we'll hit at max. -"duration" Duration of the effect in seconds. -"holdtime" How long we'll hold on the max color/alpha. - -When triggered, creates a colored overlay that blinds all players, or just -the one who triggered it if EVF_ONLYUSER is set. -*/ -/*QUAKED env_shake (1 0.5 0) (-8 -8 -8) (8 8 8) EVS_GLOBAL -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"radius" Radius of the quake/shake effect. -"amplitude" Amplitude of the effect. -"duration" Duration of the effect in seconds. -"frequency" The frequency of the shake. - -Causes an earthquake/shaking effect when triggered. -Affects all clients (radius ignored) when EVS_GLOBAL is set. -*/ -/*QUAKED func_conveyor (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED func_lod (0 .5 .8) ? -"targetname" Name -"DisappearDist" = Unit distance at which stuff disappears -"solid" 0 = Be solid (wtf volvo), 1 = non-solid - -Disappearing entity for non VISable maps (ex. Valley) -*/ -/*QUAKED trigger_once (0 .5 .8) ? TO_MONSTERS TO_NOCLIENTS TO_PUSHABLES -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"delay" Delay until target is triggered. - -A trigger volume which works only once. - -None of the spawnflags are implemented yet. -*/ -/*QUAKED trigger_teleport (0 .5 .8) ? -"targetname" Name -"target" Which target to teleport to. - -Teleportation volume. Teleports anything it touches to the position of -any entity set as the "target". Works best with info_teleport_destination. -*/ -/*QUAKED func_wall (0 .5 .8) ? -"targetname" Name - -Brush that lets light to pass through it. -On idTech 2 based levels, it will change texture variants when triggered. -*/ -/*QUAKED path_track (1 0 1) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED trigger_changelevel (0 .5 .8) ? LC_NOINTERMISSION LC_USEONLY -"targetname" Name -"map" Next .bsp file name to transition to. -"landmark" Landmark name to target. -"changedelay" Time in seconds until the transition happens. - -When a Landmark is specified, you will have to position two info_landmark -entities across your two levels with the same name. They'll mark a translation -point for the coordinates in your levels. - -When LC_NOINTERMISSION is set, there'll be no stats screen at the end of the -level. - -When LC_USEONLY is set, it will not act as a trigger volume people can step in. -It'll have to be triggered by another entity. -*/ -/*QUAKED func_tracktrain (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -Moving platform following along path_* entities that's fully user controlled. -Very unfinished. -*/ -/*QUAKED env_message (1 0 0) (-8 -8 -8) (8 8 8) EMF_ONCE EMF_ALLPLAYERS -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"message" Message to send to players -"messagesound" PCM sample to play when triggered -"messagevolume" PCM sample volume -"messageattenuation" PCM sample attenuation - -Sends a message to either one or all players, depending on if EMF_ALLPLAYERS -is set. An optional sound effect can be supplied as well. -*/ -/*QUAKED item_food (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"angles" Sets the pitch, yaw and roll angles of the model. -"model" Model file that will be displayed by the entity. - -This is a food item that will give the user 1 health when touched. -*/ -/*QUAKED func_door (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED func_pushable (0 .5 .8) ? SF_TRIGGER SF_TOUCH SF_PRESSURE -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED trigger_relay (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -See trigger_once. -*/ -/*QUAKED game_text (1 0 0) (-8 -8 -8) (8 8 8) GTF_ALLPLAYERS -"targetname" Name -"x" Horizontal position of text. - (0 - 1.0 = left to right, -1 = center) -"y" Vertical position of text. - (0 - 1.0 = top to bottom, -1 = center) -"effect" Effect to apply to the text. - Valid values: - 0 = Fade In/Out - 1 = Credits - 2 = Scan Out -"color" The main colour in RGB8. -"color2" The highlight colour in RGB8. -"fadein" Time taken to fade in each character. -"fadeout" Time taken to fade out message. -"holdtime" Length of time to hold message on screen after fading in. -"fxtime" Time the highlight lags behind the leading edge of the text in - seconds. -"channel" Message channel to use. Meant for overriding messages. - -This entity displays a message of your choice on-screen. -Line breaks can be added with a \n character. - -If GTF_ALLPLAYERS is set, it'll display the message to not just the activator, -but all players on the level. -*/ -/*QUAKED multi_manager (0.5 1 0.7) (-8 -8 -8) (8 8 8) MM_MULTITHREADED -"targetname" Name - -Triggers a maximum of 16 user defined entities with additonal timers. -Add a target's name as an entity key, with the value set to the time in seconds -that'll pass before the entity will be triggered. - -If MM_MULTITHREADED is set, it'll allow the multi_manager to be triggered -again before it has finished triggering it's previous list of entities. -*/ -/*QUAKED env_spark (1 0 0) (-8 -8 -8) (8 8 8) x x x x x EVSPARK_TOGGLE EVSPARK_STARTON -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"angles" Sets the pitch, yaw and roll angles of the spark. -"MaxDelay" Delay between sparks when start-on (or toggle) is set - -Creates a series (or just one) spark effect with sound when triggered. -*/ -/*QUAKED multisource (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED trigger_cdaudio (0 .5 .8) ? -"targetname" Name -"health" Music track to play. - -Switches the background music track when triggered. -*/ -/*QUAKED trigger_multiple (0 .5 .8) ? TM_MONSTERS TM_NOCLIENTS TM_PUSHABLES -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"delay" Delay until target is triggered. -"wait" Time until this entity can trigger again - -A trigger volume which works more than once. - -None of the spawnflags are implemented yet. -*/ -/*QUAKED func_recharge (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED trigger_endsection (0 .5 .8) ? -"targetname" Name - -This trigger shuts down the server. -Useful for when a singleplayer game ends, as it takes you to the main menu. -*/ -/*QUAKED func_door_rotating (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED env_sprite (1 0 0) (-8 -8 -8) (8 8 8) ENVS_STARTON ENVS_PLAYONCE -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"angles" Sets the pitch, yaw and roll angles of the sprite. -"model" Path to the sprite in question. -"rendercolor" Color modifier of the sprite. -"renderamt" Alpha modifier of the sprite. -"rendermode" Render mode of the sprite. -"framerate" Rate between frames in seconds. -"scale" Scale modifier of the sprite. - -A sprite entity manager with fancy overrides. -Only used with an external sprite format, like SPR, SPRHL and SPR32. -*/ -/*QUAKED func_wall_toggle (0 .5 .8) ? FTW_STARTHIDDEN -"targetname" Name - -Brush that can be hidden and reappear when triggered. - -If FTW_STARTHIDDEN is set, it'll start hidden. -*/ -/*QUAKED env_explosion (1 0 0) (-8 -8 -8) (8 8 8) ENVEXPLO_NODAMAGE ENVEXPLO_REPEATABLE ENVEXPLO_NOBALL ENVEXPLO_NOSMOKE ENVEXPLO_NODECAL ENVEXPLO_NOSPARKS -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"iMagnitude" Magnitude of the explosion. - -When triggered, creates an explosion at its location. -*/ -/*QUAKED env_beverage (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"health" Amount of soda-cans that can be dispensed at maximum -"angles" Sets the pitch, yaw and roll angles of the soda - -Upon triggered, the entity will spawn item_food in its place in -the shape of a soda can. -*/ -/*QUAKED cycler_sprite (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"angles" Sets the pitch, yaw and roll angles of the model. -"model" Model file that will be displayed by the entity. - -Decorative, does nothing yet. -*/ -/*QUAKED light (1 0 0) (-8 -8 -8) (8 8 8) OFF_OR_LINEAR -"targetname" Name - -Infinitely small point of light illuminating the scene. - -idTech3 relevant keys: -"light" Light intensity value. Default is '300'. -"_color" Normalized RGB color value. Default is '1 1 1'. -"radius" Sets the light cone radius. Default is '64'. -"target" When set, targets an enity instead, becoming a spotlight. - -If OFF_OR_LINEAR is set, the light will be cast with a linear falloff instead -of inverse square. This is useful for bright lights that'll travel long -distances. - -idTech2 relevant keys: -"light" Defines the brightness of the light. -"style" Light style ID. 0-11 are defined, 12-32 are reserved for switched - lights. List of pre-defined styles: - 0 = Normal - 1 = Flicker A - 2 = Slow strong pulse - 3 = Candle A - 4 = Fast strobe - 5 = Gentle pulse - 6 = Flicker B - 7 = Candle B - 8 = Candle C - 9 = Slow strobe - 10 = Fluorescent flicker - 11 = Slow pulse, no black -"pattern" Custom light style pattern. Needs unique light style ID. - Patterns are defined with letters of the alphabet. - 'a' being dark. 'z' being fully lit. Can be a string of characters - that'll interpolate between at 10 FPS ingame. - -If OFF_OR_LINEAR is set, it starts off/disabled. -*/ -/*QUAKED trigger_auto (1 0 0) (-8 -8 -8) (8 8 8) TA_USEONCE -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"delay" Time in seconds until it triggers its target. - -Will automatically start working when the level has spawned. -If TA_USEONCE is set, it'll remove itself from the level permanently. -It will not survive round respawns, etc. -*/ -/*QUAKED func_train (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -Moving platform following along path_* entities. -Very unfinished. -*/ -/*QUAKED trigger_camera (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"angles" Sets the pitch, yaw and roll angles of the camera -"target" Which entity we're aiming at. Overrides angles. -"wait" How long to hold onto the target. - -Causes the activators first-person camera to switch to the view of this entity. -*/ -/*QUAKED ambient_generic (1 0 0) (-8 -8 -8) (8 8 8) AS_SRADIUS AS_MRADIUS AS_LRADIUS AS_SILENT AS_NOTTOGGLED -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"message" pcm file to play -"volume" 0.0 to 1.0 -"pitch" 0.0 to 2.0 - -Plays a PCM sample of whatever format the engine is configured to support. -If you want it to loop, you have to give the file itself a loop flag. - -TODO: Add a forced loop flag for non .wav samples? -*/ -/*QUAKED func_ladder (0 .5 .8) ? -"targetname" Name - -Ladder volume. Only useful in idTech 2 based levels. -Use brushes with the common/climb texture instead. -*/ -/*QUAKED func_illusionary (0 .5 .8) ? -"targetname" Name - -Brush that lets light to pass through it and is non-solid. -On idTech 2 based levels, it will change texture variants when triggered. -*/ -/*QUAKED trigger_push (0 .5 .8) ? TP_ONCE TP_STARTOFF -"targetname" Name -"speed" The speed (units per second) it'll apply to touchers. -"angles" Sets the direction of the push. - -Pushes anything in its volume into a direction of your choosing. - -If TP_ONCE is set, It'll only emit a single push once before disabling itself. -If TP_STARTOFF is set, it needs to be triggered first in order to function. -*/ -/*QUAKED info_null (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name - -Entity that does nothing and gets deleted upon level load. -This is used for map compiling stages only. -*/ -/*QUAKED info_notnull (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name - -It's like an info_null, it just does not got deleted upon level load. -Useful for any entities/triggers that need to target something. -*/ -/*QUAKED func_group (.5 .5 .5) ? -"_lightmapscale" Floating point value scaling the resolution of - lightmaps on brushes/patches in this entity. Default is '1.0'. -"_cs" Cast shadows. Can either be 1 or 0. Default is '1'. -"_rs" Receive shadows. Can either be 1 or 0. Default is '1'. - -These structural groups will simply result in static world geometry once the -map is compiled. It's not a true entity in itself and only needed at the -compile stage. -*/ -/*QUAKED monster_furniture (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"angles" Sets the pitch, yaw and roll angles of the model. -"model" Model file that will be displayed by the entity. - -Decorative, does nothing yet. -*/ -/*QUAKED func_button (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED func_dustmotes (0 .5 .8) ? -AHHHHHHHHHHHHHHHHHHH -*/ -/*QUAKED env_render (1 0 0) (-8 -8 -8) (8 8 8) SF_NORENDERFX SF_NORENDERAMT SF_NORENDERMODE SF_NORENDERCOLOR -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"rendermode" Render-Mode the target changes to -"renderamt" Render-Alpha the target changes to -"rendercolor" Render-Color the target changes to - -Changes the visual appearance of a target. -*/ -/*QUAKED monster_generic (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"angles" Sets the pitch, yaw and roll angles of the model. -"model" Model file that will be displayed by the entity. - -Decorative, does nothing yet. -*/ -/*QUAKED cycler (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"angles" Sets the pitch, yaw and roll angles of the model. -"sequence" Sets the animation the model should start in. -"model" Model file that will be displayed by the entity. - -Upon damage, the cycler will switch between all available animation -sequences. This is really for test-maps and showroom entities. -*/ -/*QUAKED env_shooter (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"angles" Sets the pitch, yaw and roll direction of the shooter. -"shootmodel" Model file to shoot. -"shootsounds" PCM sample to play whenever a piece shoots out. -"m_iGibs" Amount of models shot in total. -"m_flDelay" Delay before being able to be fired again. -"m_flVelocity" Speed of the models in units per second. -"m_flVariance" Delay between shots. -"m_flGibLife" Life of the individual model piece. -"scale" Scale modifier of the model pieces. - -Shoots model entities from its location. -*/ -/*QUAKED scripted_sequence (1 0 0) (-8 -8 -8) (8 8 8) x x SSFL_REPEATABLE SSFL_LEAVECORPSE x SSFL_NOINTERRUPT SSFL_OVERRIDEAI SSFL_NOSCRIPTMOVE -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"m_iszEntity" Entity targetname OR classname description to target -"m_iszPlay" After the monster has moved to the action point, play this animation -"m_iszIdle" Animation to play until the scripted_sequence is triggered -"m_flRadius" Search radius for m_targetMonster if a classname is specified -"m_flRepeat" Loop? Unused. -"m_fMoveTo" How we move to perform m_iActionAnim - -f_fMoveTo values: -0 = Don't move or turn -1 = Walk to the scripted_sequence -2 = Run to the scripted_sequence -3 = Unused/Not defined. Do not use this. -4 = Warp to the location of the scripted_sequence and perform the animation. -5 = Turn to the scripted_sequence's angle before performing the animation. - -Allow a monster to be selected and given an action to perform. -This is done in the form of olaying an animation. -*/ -/*QUAKED func_healthcharger (0 .5 .8) ? -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED func_breakable (0 .5 .8) ? SF_TRIGGER SF_TOUCH SF_PRESSURE -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"material" Material it's made of. -"delay" Delay in seconds of when it breaks under pressure. -"explodemagnitude" Strength of the explosion. - -Brush volume that can break into lots of little pieces. - -When SF_TOUCH is set, it'll break when an entity runs into it at high -velocities (damage is speed in units * 0.01). - -When SF_PRESSURE is set, it'll collapse once someone is standing on top of it. -At that point the "delay" key will decide after how many seconds the object -breaks. - -The strength of the explosion decides the radius (magnitude * 2.5) and the -maximum damage the explosion will do (you have to stand in the center for that). -*/ -/*QUAKED infodecal (1 0 0) (-8 -8 -8) (8 8 8) -"texture" Name of the texture inside decals.wad it projects onto a surface. - -This entity only works on BSP version 30 levels. -Projects a decals.wad texture onto the nearest surface. -It'll automatically figure out the surface based on distance. -The texture will be aligned along the surface texture normals. -*/ -/*QUAKED trigger_hurt (0 .5 .8) ? SF_HURT_ONCE SF_HURT_OFF x SF_HURT_NOPLAYERS SF_HURT_FIREONPLAYER SF_HURT_TOUCHPLAYER -"targetname" Name -"target" Target when triggered. -"delay" Delay until target is triggered. -"killtarget" Target to kill when triggered. -"dmg" Damage inflicted. - -Trigger volume that damages everything it touches. - -If SF_HURT_ONCE is set, it'll stop once it's been triggered the first time. -If SF_HURT_OFF is set, it needs to be triggered in order to work again. -If SF_HURT_NOPLAYERS is set, it will only NPCs. -If SF_HURT_TOUCHPLAYER is set, it'll only hurt players. -If SF_HURT_FIREONPLAYER is set, it'll only trigger a target if a player -activates it. -*/ -/*QUAKED path_corner (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. - -STUB! -*/ -/*QUAKED env_global (1 0 0) (-8 -8 -8) (8 8 8) GLOBAL_SETSPAWN -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"globalstate" The variable name in which we hold information in. -"initialstate" Initial mode: 0 = off, 1 = on, 2 = dead -"triggermode" Mode when triggered: 0 = off, 1 = on, 2 = dead - -Sets/kills a global variable that carries across levels. -Without GLOBAL_SETSPAWN set, it'll only modify existing values when -triggered. -*/ -/*QUAKED env_beam (1 0 0) (-8 -8 -8) (8 8 8) -"targetname" Name - -This entity is incomplete. Purely stub. -*/ -/*QUAKED trigger_transition (0 .5 .8) ? -"targetname" Name - -Currently unused. This is meant for defining level transition regions. -All entities touching this volume would carry across to the next level. -*/ -/*QUAKED func_rotating (0 .5 .8) ? FR_STARTON FR_REVERSE FR_ZAXIS FR_XAXIS FR_ACCDCC FR_FANPAIN FR_NOTSOLID FR_SMALLRADIUS FR_MRADIUS FR_LRADIUS -"targetname" Name -"target" Target when triggered. -"killtarget" Target to kill when triggered. -"speed" Speed in units per second. -"dmg" Damage applied to entity blocking its rotational path. - -Rotating brush object. Useful for fans, etc. -*/ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt deleted file mode 100644 index dc82ec9..0000000 --- a/tools/CMakeLists.txt +++ /dev/null @@ -1,121 +0,0 @@ -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -include_directories(BEFORE common) - -set(Q3MAP_VERSION 2.5.17n) -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 -) -if (GIT_VERSION) - set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}") -endif () -add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}") - -find_package(GLIB REQUIRED) -include_directories(${GLIB_INCLUDE_DIRS}) - -find_package(JPEG REQUIRED) -include_directories(${JPEG_INCLUDE_DIR}) - -find_package(PNG REQUIRED) -include_directories(${PNG_INCLUDE_DIR}) - -find_package(LibXml2 REQUIRED) -include_directories(${LIBXML2_INCLUDE_DIR}) - -find_package(ZLIB REQUIRED) -include_directories(${ZLIB_INCLUDE_DIRS}) - -#find_package(Minizip REQUIRED) -#include_directories(${Minizip_INCLUDE_DIRS}) - -set(vmap_games - vmap/game_fte.h - ) - -radiant_tool(vmap - common/cmdlib.c common/cmdlib.h - common/imagelib.c common/imagelib.h - common/inout.c common/inout.h - common/jpeg.c - common/md4.c common/md4.h - common/mutex.c common/mutex.h - common/polylib.c common/polylib.h - common/polyset.h - common/qfiles.h - common/qthreads.h - common/scriplib.c common/scriplib.h - common/matlib.c common/matlib.h - common/surfaceflags.h - common/threads.c - common/vfs.c common/vfs.h - vmap/brush.c - vmap/brush_primit.c - vmap/bsp.c - vmap/bsp_analyze.c - vmap/bsp_info.c - vmap/bsp_scale.c - vmap/bspfile_abstract.c - vmap/bspfile_ibsp.c - vmap/bspfile_rbsp.c - vmap/convert_ase.c - vmap/convert_bsp.c - vmap/convert_map.c - vmap/convert_obj.c - vmap/decals.c - vmap/exportents.c - vmap/facebsp.c - vmap/fixaas.c - vmap/fog.c - ${vmap_games} vmap/game__null.h - vmap/help.c - vmap/image.c - vmap/leakfile.c - vmap/light.c - vmap/light_bounce.c - vmap/light_trace.c - vmap/light_ydnar.c - vmap/lightmaps_ydnar.c - vmap/main.c - vmap/map.c - vmap/mesh.c - vmap/model.c - vmap/patch.c - vmap/path_init.c - vmap/portals.c - vmap/prtfile.c - vmap/vmap.h - vmap/shaders.c - vmap/surface.c - vmap/surface_extra.c - vmap/surface_foliage.c - vmap/surface_fur.c - vmap/surface_meta.c - vmap/tjunction.c - vmap/tree.c - vmap/vis.c - vmap/visflow.c - vmap/writebsp.c - ) - -target_link_libraries(vmap - ${GLIB_LIBRARIES} - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${ZLIB_LIBRARIES} - ddslib - etclib - filematch - l_net - mathlib - minizip - picomodel - ) - -if (UNIX) - target_link_libraries(vmap pthread m) -endif () diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000..8ab8992 --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,145 @@ +# vmap Makefile + +# ws libs vmap uses +LIBOBJS=../libs/libddslib.a \ + ../libs/libetclib.a \ + ../libs/libfilematch.a \ + ../libs/libl_net.a \ + ../libs/libmathlib.a \ + ../libs/libpicomodel.a + +WS_VERSION= -DWorldSpawn_VERSION="1" -DWorldSpawn_MAJOR_VERSION="0" -DWorldSpawn_MINOR_VERSION="0" -DWorldSpawn_PATCH_VERSION="0" -DWorldSpawn_ABOUTMSG="" -DQ3MAP_VERSION=2.0 +GLIB_CFLAGS=$(shell pkg-config --cflags glib-2.0) +GLIB_LDFLAGS=$(shell pkg-config --libs glib-2.0) +VMAP_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../include -I./common -I../libs -DPOSIX -Wno-narrowing $(WS_VERSION) +VMAP_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -ldl -lm -lpthread -L../lib -lxml2 -ljpeg -lpng -lminizip $(LIBOBJS) + +DO_CC=$(CC) $(VMAP_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +VMAP_OBJS = \ + common/cmdlib.o \ + common/imagelib.o \ + common/inout.o \ + common/jpeg.o \ + common/md4.o \ + common/mutex.o \ + common/polylib.o \ + common/scriplib.o \ + common/matlib.o \ + common/threads.o \ + common/vfs.o \ + vmap/brush.o \ + vmap/brush_primit.o \ + vmap/bsp.o \ + vmap/bsp_analyze.o \ + vmap/bsp_info.o \ + vmap/bsp_scale.o \ + vmap/bspfile_abstract.o \ + vmap/bspfile_ibsp.o \ + vmap/bspfile_rbsp.o \ + vmap/convert_ase.o \ + vmap/convert_bsp.o \ + vmap/convert_map.o \ + vmap/convert_obj.o \ + vmap/decals.o \ + vmap/exportents.o \ + vmap/facebsp.o \ + vmap/fixaas.o \ + vmap/fog.o \ + vmap/help.o \ + vmap/image.o \ + vmap/leakfile.o \ + vmap/light.o \ + vmap/light_bounce.o \ + vmap/light_trace.o \ + vmap/light_ydnar.o \ + vmap/lightmaps_ydnar.o \ + vmap/main.o \ + vmap/map.o \ + vmap/mesh.o \ + vmap/model.o \ + vmap/patch.o \ + vmap/path_init.o \ + vmap/portals.o \ + vmap/prtfile.o \ + vmap/shaders.o \ + vmap/surface.o \ + vmap/surface_extra.o \ + vmap/surface_foliage.o \ + vmap/surface_fur.o \ + vmap/surface_meta.o \ + vmap/tjunction.o \ + vmap/tree.o \ + vmap/vis.o \ + vmap/visflow.o \ + vmap/writebsp.o + +# binary target +../build/vmap: $(VMAP_OBJS) + $(CXX) -o $@ $(VMAP_OBJS) $(VMAP_LDFLAGS) + +clean: + -rm -f ./common/*.o + -rm -f ./vmap/*.o + -rm -f ../build/vmap + +# object files +common/cmdlib.o: common/cmdlib.c common/cmdlib.h +common/imagelib.o: common/imagelib.c common/imagelib.h +common/inout.o: common/inout.c common/inout.h +common/jpeg.o: common/jpeg.c +common/md4.o: common/md4.c common/md4.h +common/mutex.o: common/mutex.c common/mutex.h +common/polylib.o: common/polylib.c common/polylib.h +common/scriplib.o: common/scriplib.c common/scriplib.h +common/matlib.o: common/matlib.c common/matlib.h +common/threads.o: common/threads.c +common/vfs.o: common/vfs.c common/vfs.h +vmap/brush.o: vmap/brush.c +vmap/brush_primit.o: vmap/brush_primit.c +vmap/bsp.o: vmap/bsp.c +vmap/bsp_analyze.o: vmap/bsp_analyze.c +vmap/bsp_info.o: vmap/bsp_info.c +vmap/bsp_scale.o: vmap/bsp_scale.c +vmap/bspfile_abstract.o: vmap/bspfile_abstract.c +vmap/bspfile_ibsp.o: vmap/bspfile_ibsp.c +vmap/bspfile_rbsp.o: vmap/bspfile_rbsp.c +vmap/convert_ase.o: vmap/convert_ase.c +vmap/convert_bsp.o: vmap/convert_bsp.c +vmap/convert_map.o: vmap/convert_map.c +vmap/convert_obj.o: vmap/convert_obj.c +vmap/decals.o: vmap/decals.c +vmap/exportents.o: vmap/exportents.c +vmap/facebsp.o: vmap/facebsp.c +vmap/fixaas.o: vmap/fixaas.c +vmap/fog.o: vmap/fog.c +vmap/help.o: vmap/help.c +vmap/image.o: vmap/image.c +vmap/leakfile.o: vmap/leakfile.c +vmap/light.o: vmap/light.c +vmap/light_bounce.o: vmap/light_bounce.c +vmap/light_trace.o: vmap/light_trace.c +vmap/light_ydnar.o: vmap/light_ydnar.c +vmap/lightmaps_ydnar.o: vmap/lightmaps_ydnar.c +vmap/main.o: vmap/main.c +vmap/map.o: vmap/map.c +vmap/mesh.o: vmap/mesh.c +vmap/model.o: vmap/model.c +vmap/patch.o: vmap/patch.c +vmap/path_init.o: vmap/path_init.c +vmap/portals.o: vmap/portals.c +vmap/prtfile.o: vmap/prtfile.c +vmap/shaders.o: vmap/shaders.c +vmap/surface.o: vmap/surface.c +vmap/surface_extra.o: vmap/surface_extra.c +vmap/surface_foliage.o: vmap/surface_foliage.c +vmap/surface_fur.o: vmap/surface_fur.c +vmap/surface_meta.o: vmap/surface_meta.c +vmap/tjunction.o: vmap/tjunction.c +vmap/tree.o: vmap/tree.c +vmap/vis.o: vmap/vis.c +vmap/visflow.o: vmap/visflow.c +vmap/writebsp.o: vmap/writebsp.c diff --git a/tools/common/cmdlib.c b/tools/common/cmdlib.c index 2d57aaa..58e34e0 100644 --- a/tools/common/cmdlib.c +++ b/tools/common/cmdlib.c @@ -51,7 +51,6 @@ #define BASEDIRNAME "quake" // assumed to have a 2 or 3 following #define PATHSEPERATOR '/' -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ){ void *p; @@ -73,7 +72,6 @@ void *safe_malloc_info( size_t size, const char* info ){ return p; } -#endif // set these before calling CheckParm int myargc; @@ -255,7 +253,7 @@ char *ExpandPath( const char *path ){ char *copystring( const char *s ){ char *b; - b = safe_malloc( strlen( s ) + 1 ); + b = (char *)safe_malloc( strlen( s ) + 1 ); strcpy( b, s ); return b; } diff --git a/tools/common/cmdlib.h b/tools/common/cmdlib.h index b487004..19bd671 100644 --- a/tools/common/cmdlib.h +++ b/tools/common/cmdlib.h @@ -64,13 +64,8 @@ // the dec offsetof macro doesnt work very well... #define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier ) -#define SAFE_MALLOC -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ); void *safe_malloc_info( size_t size, const char* info ); -#else -#define safe_malloc( a ) malloc( a ) -#endif /* SAFE_MALLOC */ // set these before calling CheckParm extern int myargc; diff --git a/tools/common/imagelib.c b/tools/common/imagelib.c index 5bc5ff7..7162226 100644 --- a/tools/common/imagelib.c +++ b/tools/common/imagelib.c @@ -1444,7 +1444,7 @@ void LoadKTXBufferFirstImage( const byte *buffer, size_t bufSize, byte **pic, in Error( "LoadKTX: Image has the wrong identifier" ); } - qboolean bigEndian = ( buffer[4] == 4 ); + qboolean bigEndian = (qboolean)( buffer[4] == 4 ); type = KTX_HEADER_UINT32( buffer + 16 ); if ( type ) { diff --git a/tools/common/inout.h b/tools/common/inout.h index eae54d3..934189f 100644 --- a/tools/common/inout.h +++ b/tools/common/inout.h @@ -51,6 +51,7 @@ void Broadcast_Shutdown(); extern qboolean verbose; void Sys_Printf( const char *text, ... ); void Sys_FPrintf( int flag, const char *text, ... ); +void Error( const char *error, ... ); #if GDEF_DEBUG #define DBG_XML 1 diff --git a/tools/vmap/brush.c b/tools/vmap/brush.c index 12088a1..650187c 100644 --- a/tools/vmap/brush.c +++ b/tools/vmap/brush.c @@ -36,8 +36,6 @@ /* dependencies */ #include "vmap.h" - - /* ------------------------------------------------------------------------------- functions diff --git a/tools/vmap/convert_bsp.c b/tools/vmap/convert_bsp.c index d9c4512..d72b178 100644 --- a/tools/vmap/convert_bsp.c +++ b/tools/vmap/convert_bsp.c @@ -239,10 +239,10 @@ int ConvertBSPMain( int argc, char **argv ){ StripExtension( source ); DefaultExtension( source, ".map" ); Sys_Printf( "Loading %s\n", source ); - LoadMapFile( source, qfalse, convertGame == NULL ); + LoadMapFile( source, qfalse, (qboolean)(convertGame == NULL)); sprintf( BSPFilePath, "%s.bsp", source ); sprintf( surfaceFilePath, "%s.srf", source ); - PseudoCompileBSP( convertGame != NULL, BSPFilePath, surfaceFilePath ); + PseudoCompileBSP( (qboolean)(convertGame != NULL), BSPFilePath, surfaceFilePath ); } else { diff --git a/tools/vmap/convert_map.c b/tools/vmap/convert_map.c index 0520ff2..253bffe 100644 --- a/tools/vmap/convert_map.c +++ b/tools/vmap/convert_map.c @@ -845,7 +845,7 @@ int ConvertBSPToMap_Ext( char *bspName, qboolean brushPrimitives ){ } /* export keys */ - ConvertEPairs( f, e, modelNum >= 0 ); + ConvertEPairs( f, e, (qboolean)(modelNum >= 0) ); fprintf( f, "\n" ); /* only handle bsp models */ diff --git a/tools/vmap/facebsp.c b/tools/vmap/facebsp.c index 040ebc6..33c791d 100644 --- a/tools/vmap/facebsp.c +++ b/tools/vmap/facebsp.c @@ -246,7 +246,7 @@ void BuildFaceTree_r( node_t *node, face_t *list ){ /* partition the list */ node->planenum = splitPlaneNum; node->compileFlags = compileFlags; - node->has_structural_children = !( compileFlags & C_DETAIL ) && !node->opaque; + node->has_structural_children = (qboolean)(!( compileFlags & C_DETAIL ) && !node->opaque); plane = &mapplanes[ splitPlaneNum ]; childLists[0] = NULL; childLists[1] = NULL; diff --git a/tools/vmap/light.c b/tools/vmap/light.c index 205fa28..1247c60 100644 --- a/tools/vmap/light.c +++ b/tools/vmap/light.c @@ -1672,7 +1672,7 @@ void TraceGrid( int num ){ } /* setup trace */ - trace.testOcclusion = !noTrace; + trace.testOcclusion = (qboolean)(!noTrace); trace.forceSunlight = qfalse; trace.recvShadows = WORLDSPAWN_RECV_SHADOWS; trace.numSurfaces = 0; @@ -2874,7 +2874,7 @@ int LightMain( int argc, char **argv ){ } else if ( !strcmp( argv[ i ], "-lightanglehl" ) ) { if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) { - lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 ); + lightAngleHL = (qboolean)( atoi( argv[ i + 1 ] ) != 0 ); if ( lightAngleHL ) { Sys_Printf( "Enabling half lambert light angle attenuation\n" ); } diff --git a/tools/vmap/light_ydnar.c b/tools/vmap/light_ydnar.c index 100742a..7704d6f 100644 --- a/tools/vmap/light_ydnar.c +++ b/tools/vmap/light_ydnar.c @@ -2106,7 +2106,7 @@ void IlluminateRawLightmap( int rawLightmapNum ){ lm = &rawLightmaps[ rawLightmapNum ]; /* setup trace */ - trace.testOcclusion = !noTrace; + trace.testOcclusion = (qboolean)(!noTrace); trace.forceSunlight = qfalse; trace.recvShadows = lm->recvShadows; trace.numSurfaces = lm->numLightSurfaces; diff --git a/tools/vmap/lightmaps_ydnar.c b/tools/vmap/lightmaps_ydnar.c index bd44a24..d043d65 100644 --- a/tools/vmap/lightmaps_ydnar.c +++ b/tools/vmap/lightmaps_ydnar.c @@ -228,7 +228,7 @@ void WriteHDR( char *filename, float *data, int width, int height, qboolean flip 1, 1, 0}; - flip = !flip; //opengl technically defines textures as bottom-up, but screw that. + flip = (qboolean)(!flip); //opengl technically defines textures as bottom-up, but screw that. fwrite( &header, 1, sizeof(header), file ); rowbytes = width*4; //FIXME: align diff --git a/tools/vmap/portals.c b/tools/vmap/portals.c index 0f6975a..3a5ed9a 100644 --- a/tools/vmap/portals.c +++ b/tools/vmap/portals.c @@ -677,7 +677,7 @@ int FloodEntities( tree_t *tree ){ inside = qfalse; tree->outside_node.occupied = 0; - tripped = qfalse; + tripped = 0; c_floodedleafs = 0; for ( i = 1; i < numEntities; i++ ) { diff --git a/tools/vmap/surface_meta.c b/tools/vmap/surface_meta.c index 30c2338..6f30cfc 100644 --- a/tools/vmap/surface_meta.c +++ b/tools/vmap/surface_meta.c @@ -427,7 +427,7 @@ void TriangulatePatchSurface( entity_t *e, mapDrawSurface_t *ds ){ #define MAXAREA_MAXTRIES 8 int MaxAreaIndexes( bspDrawVert_t *vert, int cnt, int *indexes ){ int r, s, t, bestR = 0, bestS = 1, bestT = 2; - int i, j, try; + int i, j, tryy; double A, bestA = -1, V, bestV = -1; vec3_t ab, ac, bc, cross; bspDrawVert_t *buf; @@ -497,9 +497,9 @@ int MaxAreaIndexes( bspDrawVert_t *vert, int cnt, int *indexes ){ printf("value was REALLY bad\n"); */ - for ( try = 0; try < MAXAREA_MAXTRIES; ++try ) + for ( tryy = 0; tryy < MAXAREA_MAXTRIES; ++tryy ) { - if ( try ) { + if ( tryy ) { bestR = rand() % cnt; bestS = rand() % cnt; bestT = rand() % cnt; diff --git a/tools/vmap/tjunction.c b/tools/vmap/tjunction.c index 9286d3f..6ab8d94 100644 --- a/tools/vmap/tjunction.c +++ b/tools/vmap/tjunction.c @@ -578,7 +578,7 @@ qboolean FixBrokenSurface( mapDrawSurface_t *ds ){ } /* one last check and return */ - return ds->numVerts >= 3; + return (qboolean)(ds->numVerts >= 3); } diff --git a/tools/vmap/vis.c b/tools/vmap/vis.c index 53864d8..34684b4 100644 --- a/tools/vmap/vis.c +++ b/tools/vmap/vis.c @@ -1003,8 +1003,8 @@ void LoadPortals( char *name ){ l->numportals++; p->num = i + 1; - p->hint = ((flags & 1) != 0); - p->sky = ((flags & 2) != 0); + p->hint = (qboolean)(((flags & 1) != 0)); + p->sky = (qboolean)(((flags & 2) != 0)); p->winding = w; VectorSubtract( vec3_origin, plane.normal, p->plane.normal ); p->plane.dist = -plane.dist; diff --git a/tools/vmap/vmap.h b/tools/vmap/vmap.h index 2f617a1..55a56b0 100644 --- a/tools/vmap/vmap.h +++ b/tools/vmap/vmap.h @@ -2200,8 +2200,8 @@ Q_EXTERN qboolean loMem Q_ASSIGN( qfalse ); Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse ); Q_EXTERN qboolean keepLights Q_ASSIGN( qfalse ); -Q_EXTERN int sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE ); -Q_EXTERN int minSampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE ); +//Q_EXTERN int sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE ); +//Q_EXTERN int minSampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE ); Q_EXTERN qboolean noVertexLighting Q_ASSIGN( qfalse ); Q_EXTERN qboolean noGridLighting Q_ASSIGN( qfalse );