From a024866fd3c21929d5b488fe098a8a7cde255f78 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 16 Nov 2017 18:43:45 +0100 Subject: [PATCH] Builder bots base implementation --- src/CPackConfig.cmake | 93 +++++++++++++++++++++++++ src/CPackSourceConfig.cmake | 100 +++++++++++++++++++++++++++ src/common/restext.cpp | 4 ++ src/desktop/colobot.rc | 25 +++++++ src/graphics/engine/pyro.cpp | 23 ++++++ src/graphics/engine/water.cpp | 4 ++ src/level/parser/parserparam.cpp | 8 +++ src/level/robotmain.cpp | 8 +++ src/object/auto/autofactory.cpp | 4 ++ src/object/auto/automush.cpp | 4 ++ src/object/auto/autonuclearplant.cpp | 4 ++ src/object/auto/autopowerplant.cpp | 4 ++ src/object/auto/autopowerstation.cpp | 4 ++ src/object/drive_type.cpp | 4 ++ src/object/motion/motiontoto.cpp | 4 ++ src/object/motion/motionvehicle.cpp | 34 +++++++++ src/object/object_factory.cpp | 4 ++ src/object/object_type.h | 4 ++ src/object/old_object.cpp | 25 +++++++ src/object/task/taskbuild.cpp | 8 +-- src/object/task/taskgoto.cpp | 16 +++++ src/object/task/tasktake.cpp | 4 ++ src/object/tool_type.cpp | 6 ++ src/object/tool_type.h | 1 + src/physics/physics.cpp | 21 ++++++ src/script/cbottoken.cpp | 4 ++ src/script/scriptfunc.cpp | 8 +-- src/src/common/config.h | 22 ++++++ src/src/common/version.h | 7 ++ src/ui/controls/map.cpp | 8 +++ src/ui/mainshort.cpp | 4 ++ src/ui/object_interface.cpp | 8 +++ 32 files changed, 469 insertions(+), 8 deletions(-) create mode 100644 src/CPackConfig.cmake create mode 100644 src/CPackSourceConfig.cmake create mode 100644 src/desktop/colobot.rc create mode 100644 src/src/common/config.h create mode 100644 src/src/common/version.h diff --git a/src/CPackConfig.cmake b/src/CPackConfig.cmake new file mode 100644 index 00000000..fbcd118a --- /dev/null +++ b/src/CPackConfig.cmake @@ -0,0 +1,93 @@ +# This file will be configured to contain variables for CPack. These variables +# should be set in the CMake list file of the project before CPack module is +# included. The list of available CPACK_xxx variables and their associated +# documentation may be obtained using +# cpack --help-variable-list +# +# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) +# and some are specific to a generator +# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables +# usually begin with CPACK__xxxx. + + +SET(CPACK_BINARY_7Z "OFF") +SET(CPACK_BINARY_BUNDLE "") +SET(CPACK_BINARY_CYGWIN "") +SET(CPACK_BINARY_DEB "") +SET(CPACK_BINARY_DRAGNDROP "") +SET(CPACK_BINARY_IFW "OFF") +SET(CPACK_BINARY_NSIS "ON") +SET(CPACK_BINARY_OSXX11 "") +SET(CPACK_BINARY_PACKAGEMAKER "") +SET(CPACK_BINARY_PRODUCTBUILD "") +SET(CPACK_BINARY_RPM "") +SET(CPACK_BINARY_STGZ "") +SET(CPACK_BINARY_TBZ2 "") +SET(CPACK_BINARY_TGZ "") +SET(CPACK_BINARY_TXZ "") +SET(CPACK_BINARY_TZ "") +SET(CPACK_BINARY_WIX "OFF") +SET(CPACK_BINARY_ZIP "OFF") +SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") +SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") +SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") +SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") +SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") +SET(CPACK_GENERATOR "NSIS") +SET(CPACK_INSTALL_CMAKE_PROJECTS "C:/Users/Fiftytwo/Repos/colobot/src;colobot;ALL;/") +SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") +SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") +SET(CPACK_NSIS_DEFINES "SetOverwrite on +BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") +SET(CPACK_NSIS_DISPLAY_NAME "Colobot") +SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") +SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" + !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") +SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") +SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") +SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_PACKAGE_NAME "Colobot") +SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") +SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") +SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") +SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11+alpha-git-dev~radda8281") +SET(CPACK_PACKAGE_ICON "") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") +SET(CPACK_PACKAGE_NAME "colobot") +SET(CPACK_PACKAGE_RELOCATABLE "true") +SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") +SET(CPACK_PACKAGE_VERSION "0.1.11") +SET(CPACK_PACKAGE_VERSION_MAJOR "0") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "11") +SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") +SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") +SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") +SET(CPACK_SET_DESTDIR "OFF") +SET(CPACK_SOURCE_7Z "ON") +SET(CPACK_SOURCE_CYGWIN "") +SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") +SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") +SET(CPACK_SOURCE_RPM "") +SET(CPACK_SOURCE_TBZ2 "") +SET(CPACK_SOURCE_TGZ "") +SET(CPACK_SOURCE_TXZ "") +SET(CPACK_SOURCE_TZ "") +SET(CPACK_SOURCE_ZIP "ON") +SET(CPACK_STRIP_FILES "TRUE") +SET(CPACK_SYSTEM_NAME "win64") +SET(CPACK_TOPLEVEL_TAG "win64") +SET(CPACK_WIX_SIZEOF_VOID_P "8") + +if(NOT CPACK_PROPERTIES_FILE) + set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") +endif() + +if(EXISTS ${CPACK_PROPERTIES_FILE}) + include(${CPACK_PROPERTIES_FILE}) +endif() diff --git a/src/CPackSourceConfig.cmake b/src/CPackSourceConfig.cmake new file mode 100644 index 00000000..d6dddd85 --- /dev/null +++ b/src/CPackSourceConfig.cmake @@ -0,0 +1,100 @@ +# This file will be configured to contain variables for CPack. These variables +# should be set in the CMake list file of the project before CPack module is +# included. The list of available CPACK_xxx variables and their associated +# documentation may be obtained using +# cpack --help-variable-list +# +# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) +# and some are specific to a generator +# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables +# usually begin with CPACK__xxxx. + + +SET(CPACK_BINARY_7Z "OFF") +SET(CPACK_BINARY_BUNDLE "") +SET(CPACK_BINARY_CYGWIN "") +SET(CPACK_BINARY_DEB "") +SET(CPACK_BINARY_DRAGNDROP "") +SET(CPACK_BINARY_IFW "OFF") +SET(CPACK_BINARY_NSIS "ON") +SET(CPACK_BINARY_OSXX11 "") +SET(CPACK_BINARY_PACKAGEMAKER "") +SET(CPACK_BINARY_PRODUCTBUILD "") +SET(CPACK_BINARY_RPM "") +SET(CPACK_BINARY_STGZ "") +SET(CPACK_BINARY_TBZ2 "") +SET(CPACK_BINARY_TGZ "") +SET(CPACK_BINARY_TXZ "") +SET(CPACK_BINARY_TZ "") +SET(CPACK_BINARY_WIX "OFF") +SET(CPACK_BINARY_ZIP "OFF") +SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") +SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") +SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") +SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") +SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") +SET(CPACK_GENERATOR "7Z;ZIP") +SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") +SET(CPACK_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") +SET(CPACK_INSTALL_CMAKE_PROJECTS "") +SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") +SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") +SET(CPACK_NSIS_DEFINES "SetOverwrite on +BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") +SET(CPACK_NSIS_DISPLAY_NAME "Colobot") +SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") +SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" + !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") +SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") +SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") +SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_PACKAGE_NAME "Colobot") +SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") +SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") +SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") +SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11-Source") +SET(CPACK_PACKAGE_ICON "") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") +SET(CPACK_PACKAGE_NAME "colobot") +SET(CPACK_PACKAGE_RELOCATABLE "true") +SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") +SET(CPACK_PACKAGE_VERSION "0.1.11") +SET(CPACK_PACKAGE_VERSION_MAJOR "0") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "11") +SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") +SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") +SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") +SET(CPACK_RPM_PACKAGE_SOURCES "ON") +SET(CPACK_SET_DESTDIR "OFF") +SET(CPACK_SOURCE_7Z "ON") +SET(CPACK_SOURCE_CYGWIN "") +SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") +SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") +SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") +SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "colobot-0.1.11-Source") +SET(CPACK_SOURCE_RPM "") +SET(CPACK_SOURCE_TBZ2 "") +SET(CPACK_SOURCE_TGZ "") +SET(CPACK_SOURCE_TOPLEVEL_TAG "win64-Source") +SET(CPACK_SOURCE_TXZ "") +SET(CPACK_SOURCE_TZ "") +SET(CPACK_SOURCE_ZIP "ON") +SET(CPACK_STRIP_FILES "") +SET(CPACK_SYSTEM_NAME "win64") +SET(CPACK_TOPLEVEL_TAG "win64-Source") +SET(CPACK_WIX_SIZEOF_VOID_P "8") + +if(NOT CPACK_PROPERTIES_FILE) + set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") +endif() + +if(EXISTS ${CPACK_PROPERTIES_FILE}) + include(${CPACK_PROPERTIES_FILE}) +endif() diff --git a/src/common/restext.cpp b/src/common/restext.cpp index ac526af8..760e74c8 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -517,6 +517,10 @@ void InitializeRestext() stringsObject[OBJECT_MOBILEta] = TR("Tracked grabber"); stringsObject[OBJECT_MOBILEwa] = TR("Wheeled grabber"); stringsObject[OBJECT_MOBILEia] = TR("Legged grabber"); + stringsObject[OBJECT_MOBILEfb] = TR("Winged builder"); + stringsObject[OBJECT_MOBILEtb] = TR("Tracked builder"); + stringsObject[OBJECT_MOBILEwb] = TR("Wheeled builder"); + stringsObject[OBJECT_MOBILEib] = TR("Legged builder"); stringsObject[OBJECT_MOBILEfc] = TR("Winged shooter"); stringsObject[OBJECT_MOBILEtc] = TR("Tracked shooter"); stringsObject[OBJECT_MOBILEwc] = TR("Wheeled shooter"); diff --git a/src/desktop/colobot.rc b/src/desktop/colobot.rc new file mode 100644 index 00000000..5187a5af --- /dev/null +++ b/src/desktop/colobot.rc @@ -0,0 +1,25 @@ +id ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico" + +1 VERSIONINFO +FILEVERSION 0,1,11,0 +PRODUCTVERSION 0,1,11,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "OriginalFilename", "colobot.exe\0" + VALUE "InternalName", "colobot\0" + VALUE "FileDescription", "Colobot: Gold Edition - Colonize with Bots\0" + VALUE "ProductName", "Colobot: Gold Edition\0" + VALUE "CompanyName", "TerranovaTeam\0" + VALUE "LegalCopyright", "Copyright (c) 2012-2014 TerranovaTeam\0" + VALUE "FileVersion", "0.1.11+alpha-git-dev~radda8281\0" + VALUE "ProductVersion", "0.1.11+alpha-git-dev~radda8281\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5bc9f76d..5a0b9e2c 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1260,6 +1260,10 @@ void CPyro::DisplayError(PyroType type, CObject* obj) oType == OBJECT_MOBILEta || oType == OBJECT_MOBILEfa || oType == OBJECT_MOBILEia || + oType == OBJECT_MOBILEwb || + oType == OBJECT_MOBILEtb || + oType == OBJECT_MOBILEfb || + oType == OBJECT_MOBILEib || oType == OBJECT_MOBILEwc || oType == OBJECT_MOBILEtc || oType == OBJECT_MOBILEfc || @@ -1717,6 +1721,7 @@ void CPyro::BurnStart() angle.z = (Math::Rand()-0.5f)*0.4f; } else if ( m_burnType == OBJECT_MOBILEwa || + m_burnType == OBJECT_MOBILEwb || m_burnType == OBJECT_MOBILEwc || m_burnType == OBJECT_MOBILEwi || m_burnType == OBJECT_MOBILEws || @@ -1920,6 +1925,20 @@ void CPyro::BurnStart() angle.z = -25.0f*Math::PI/180.0f; BurnAddPart(1, pos, angle); // down the insect-cannon } + + if ( m_burnType == OBJECT_MOBILEfb || + m_burnType == OBJECT_MOBILEtb || + m_burnType == OBJECT_MOBILEwb || + m_burnType == OBJECT_MOBILEib ) + { + pos.x = -1.5f; + pos.y = -5.0f; + pos.z = 0.0f; + angle.x = (Math::Rand()-0.5f)*0.2f; + angle.y = (Math::Rand()-0.5f)*0.2f; + angle.z = -25.0f*Math::PI/180.0f; + BurnAddPart(1, pos, angle); // down the neutron gun + } if ( m_burnType == OBJECT_MOBILErt || m_burnType == OBJECT_MOBILErc ) @@ -2007,6 +2026,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEwa || + m_burnType == OBJECT_MOBILEwb || m_burnType == OBJECT_MOBILEwc || m_burnType == OBJECT_MOBILEwi || m_burnType == OBJECT_MOBILEws || @@ -2029,6 +2049,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEta || + m_burnType == OBJECT_MOBILEtb || m_burnType == OBJECT_MOBILEtc || m_burnType == OBJECT_MOBILEti || m_burnType == OBJECT_MOBILEts || @@ -2057,6 +2078,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEfa || + m_burnType == OBJECT_MOBILEfb || m_burnType == OBJECT_MOBILEfc || m_burnType == OBJECT_MOBILEfi || m_burnType == OBJECT_MOBILEfs || @@ -2077,6 +2099,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEia || + m_burnType == OBJECT_MOBILEib || m_burnType == OBJECT_MOBILEic || m_burnType == OBJECT_MOBILEii || m_burnType == OBJECT_MOBILEis ) // legs? diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp index 5adebb90..55f7465d 100644 --- a/src/graphics/engine/water.cpp +++ b/src/graphics/engine/water.cpp @@ -566,6 +566,10 @@ float CWater::GetLevel(CObject* object) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 37773efa..8ddb22e9 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -355,6 +355,10 @@ ObjectType CLevelParserParam::ToObjectType(std::string value) if (value == "TrackedSniffer" ) return OBJECT_MOBILEts; if (value == "WheeledSniffer" ) return OBJECT_MOBILEws; if (value == "LeggedSniffer" ) return OBJECT_MOBILEis; + if (value == "WingedBuilder" ) return OBJECT_MOBILEfb; + if (value == "TrackedBuilder" ) return OBJECT_MOBILEtb; + if (value == "WheeledBuilder" ) return OBJECT_MOBILEwb; + if (value == "LeggedBuilder" ) return OBJECT_MOBILEib; if (value == "Thumper" ) return OBJECT_MOBILErt; if (value == "PhazerShooter" ) return OBJECT_MOBILErc; if (value == "Recycler" ) return OBJECT_MOBILErr; @@ -556,6 +560,10 @@ const std::string CLevelParserParam::FromObjectType(ObjectType value) if (value == OBJECT_MOBILEts ) return "TrackedSniffer"; if (value == OBJECT_MOBILEws ) return "WheeledSniffer"; if (value == OBJECT_MOBILEis ) return "LeggedSniffer"; + if (value == OBJECT_MOBILEfb ) return "WingedBuilder"; + if (value == OBJECT_MOBILEtb ) return "TrackedBuilder"; + if (value == OBJECT_MOBILEwb ) return "WheeledBuilder"; + if (value == OBJECT_MOBILEib ) return "LeggedBuilder"; if (value == OBJECT_MOBILErt ) return "Thumper"; if (value == OBJECT_MOBILErc ) return "PhazerShooter"; if (value == OBJECT_MOBILErr ) return "Recycler"; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 3df62fe5..f2d849f6 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -1814,6 +1814,10 @@ void CRobotMain::SelectOneObject(CObject* obj, bool displayError) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -2195,6 +2199,10 @@ void CRobotMain::ChangeCamera() oType != OBJECT_MOBILEta && oType != OBJECT_MOBILEwa && oType != OBJECT_MOBILEia && + oType != OBJECT_MOBILEfb && + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_MOBILEfc && oType != OBJECT_MOBILEtc && oType != OBJECT_MOBILEwc && diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 45fd357c..5e998352 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -587,6 +587,10 @@ bool CAutoFactory::NearestVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index 679e0f73..a267322b 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -236,6 +236,10 @@ bool CAutoMush::SearchTarget() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autonuclearplant.cpp b/src/object/auto/autonuclearplant.cpp index 947ac05b..7601b6cb 100644 --- a/src/object/auto/autonuclearplant.cpp +++ b/src/object/auto/autonuclearplant.cpp @@ -345,6 +345,10 @@ bool CAutoNuclearPlant::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autopowerplant.cpp b/src/object/auto/autopowerplant.cpp index 2729c4fe..50504db1 100644 --- a/src/object/auto/autopowerplant.cpp +++ b/src/object/auto/autopowerplant.cpp @@ -408,6 +408,10 @@ bool CAutoPowerPlant::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 17479906..3b245d7e 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -253,6 +253,10 @@ CObject* CAutoPowerStation::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/drive_type.cpp b/src/object/drive_type.cpp index fafbddad..412e37bc 100644 --- a/src/object/drive_type.cpp +++ b/src/object/drive_type.cpp @@ -28,6 +28,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEwc: case OBJECT_MOBILEwi: case OBJECT_MOBILEws: + case OBJECT_MOBILEwb: return DriveType::Wheeled; case OBJECT_MOBILEtt: @@ -35,6 +36,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEtc: case OBJECT_MOBILEti: case OBJECT_MOBILEts: + case OBJECT_MOBILEtb: return DriveType::Tracked; case OBJECT_MOBILEft: @@ -42,6 +44,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEfc: case OBJECT_MOBILEfi: case OBJECT_MOBILEfs: + case OBJECT_MOBILEfb: return DriveType::Winged; case OBJECT_MOBILEit: @@ -49,6 +52,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEic: case OBJECT_MOBILEii: case OBJECT_MOBILEis: + case OBJECT_MOBILEib: return DriveType::Legged; case OBJECT_MOBILErt: diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index c0a2296a..8c22c2ea 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -335,6 +335,10 @@ bool CMotionToto::EventFrame(const Event &event) type == OBJECT_MOBILEta || type == OBJECT_MOBILEfa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEfc || diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 14d46dcd..a9cfa402 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -101,6 +101,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(0, rank); if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs) @@ -108,6 +109,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) @@ -115,6 +117,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws) @@ -129,6 +132,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } } else if (type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis) @@ -331,8 +335,25 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetPartPosition(2, Math::Vector(0.0f, 2.5f, 0.0f)); m_object->SetPartRotationZ(2, 0.0f); } + + if (type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib) + { + // Creates the neutron gun. + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(1, rank); + m_object->SetObjectParent(1, 0); + modelManager->AddModelReference("neutron.mod", false, rank, m_object->GetTeam()); +//? m_object->SetPartPosition(1, Math::Vector(0.0f, 5.3f, 0.0f)); + m_object->SetPartPosition(1, Math::Vector(0.0f, 5.3f, 0.0f)); + m_object->SetPartRotationZ(1, 0.0f); + } if (type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEws || type == OBJECT_MOBILEwi || @@ -411,6 +432,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) // caterpillars? @@ -493,6 +515,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEfi || @@ -526,6 +549,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEis || type == OBJECT_MOBILEii) // insect legs? @@ -867,6 +891,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->CreateShadowCircle(6.0f, 1.0f); } else if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || @@ -888,6 +913,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -948,6 +974,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) character = m_object->GetCharacter(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1004,6 +1031,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? @@ -1033,6 +1061,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) // legs? @@ -1063,6 +1092,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1240,6 +1270,7 @@ bool CMotionVehicle::EventFrame(const Event &event) type = m_object->GetType(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1406,6 +1437,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || @@ -1524,6 +1556,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1533,6 +1566,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) // legs? diff --git a/src/object/object_factory.cpp b/src/object/object_factory.cpp index 0b16e171..539256be 100644 --- a/src/object/object_factory.cpp +++ b/src/object/object_factory.cpp @@ -284,6 +284,10 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params) case OBJECT_MOBILEta: case OBJECT_MOBILEwa: case OBJECT_MOBILEia: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: case OBJECT_MOBILEfc: case OBJECT_MOBILEtc: case OBJECT_MOBILEwc: diff --git a/src/object/object_type.h b/src/object/object_type.h index 88c9587c..6d1b7039 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -129,6 +129,10 @@ enum ObjectType OBJECT_MOBILEtg = 211, //!< TargetBot OBJECT_MOBILEdr = 212, //!< Scribbler OBJECT_CONTROLLER = 213, //!< MissionController + OBJECT_MOBILEwb = 220, //!< WheeledBuilder + OBJECT_MOBILEtb = 221, //!< TrackedBuilder + OBJECT_MOBILEfb = 222, //!< WingedBuilder + OBJECT_MOBILEib = 223, //!< LeggedBuilder OBJECT_WAYPOINT = 250, //!< WayPoint OBJECT_FLAGb = 260, //!< BlueFlag OBJECT_FLAGr = 261, //!< RedFlag diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index beaa7c3d..c2578199 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -678,6 +678,7 @@ void COldObject::SetType(ObjectType type) // TODO: Temporary hack if ( m_type == OBJECT_MOBILEfa || // WingedGrabber + m_type == OBJECT_MOBILEfb || // WingedBuilder m_type == OBJECT_MOBILEfs || // WingedSniffer m_type == OBJECT_MOBILEfc || // WingedShooter m_type == OBJECT_MOBILEfi || // WingedOrgaShooter @@ -705,6 +706,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -767,6 +772,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -856,6 +865,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -2832,6 +2845,10 @@ void COldObject::CreateSelectParticle() m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -2930,6 +2947,7 @@ void COldObject::UpdateSelectParticle() // Red back lens if ( m_type == OBJECT_MOBILEfa || + m_type == OBJECT_MOBILEfb || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEfi || m_type == OBJECT_MOBILEfs || @@ -2941,6 +2959,7 @@ void COldObject::UpdateSelectParticle() dim[3].x = 0.6f; } if ( m_type == OBJECT_MOBILEwa || + m_type == OBJECT_MOBILEwb || m_type == OBJECT_MOBILEwc || m_type == OBJECT_MOBILEwi || m_type == OBJECT_MOBILEws ) // wheels? @@ -2954,6 +2973,7 @@ void COldObject::UpdateSelectParticle() pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f); } if ( m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEic || m_type == OBJECT_MOBILEii || m_type == OBJECT_MOBILEis || @@ -2963,6 +2983,7 @@ void COldObject::UpdateSelectParticle() pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f); } if ( m_type == OBJECT_MOBILEta || + m_type == OBJECT_MOBILEtb || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEti || m_type == OBJECT_MOBILEts || @@ -3198,6 +3219,10 @@ float COldObject::GetLightningHitProbability() m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 3d39b20d..5104acfe 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -321,10 +321,10 @@ bool CTaskBuild::EventProcess(const Event &event) mat = m_object->GetWorldMatrix(14); break; - case OBJECT_MOBILEfa: - case OBJECT_MOBILEta: - case OBJECT_MOBILEwa: - case OBJECT_MOBILEia: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: mat = m_object->GetWorldMatrix(3); break; diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index 6584465e..6a6b3afa 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -556,6 +556,10 @@ CObject* CTaskGoto::WormSearch(Math::Vector &impact) oType != OBJECT_MOBILEta && oType != OBJECT_MOBILEwa && oType != OBJECT_MOBILEia && + oType != OBJECT_MOBILEfb && + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_MOBILEfc && oType != OBJECT_MOBILEtc && oType != OBJECT_MOBILEwc && @@ -1164,6 +1168,10 @@ bool CTaskGoto::AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEts || type == OBJECT_MOBILEws || @@ -1432,6 +1440,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 2.0f; if ( iType == OBJECT_MOBILEwa || + iType == OBJECT_MOBILEwb || iType == OBJECT_MOBILEwc || iType == OBJECT_MOBILEwi || iType == OBJECT_MOBILEws || @@ -1441,6 +1450,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 1.5f; } if ( iType == OBJECT_MOBILEta || + iType == OBJECT_MOBILEtb || iType == OBJECT_MOBILEtc || iType == OBJECT_MOBILEti || iType == OBJECT_MOBILEts || @@ -1451,6 +1461,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 1.5f; } if ( iType == OBJECT_MOBILEfa || + iType == OBJECT_MOBILEfb || iType == OBJECT_MOBILEfc || iType == OBJECT_MOBILEfi || iType == OBJECT_MOBILEfs || @@ -1468,6 +1479,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) } } if ( iType == OBJECT_MOBILEia || + iType == OBJECT_MOBILEib || iType == OBJECT_MOBILEic || iType == OBJECT_MOBILEii || iType == OBJECT_MOBILEis || @@ -1962,6 +1974,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) type = m_object->GetType(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEws || type == OBJECT_MOBILEwi || @@ -1972,6 +1985,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? @@ -1999,6 +2013,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEfi || @@ -2009,6 +2024,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEis || type == OBJECT_MOBILEii ) // insect legs? diff --git a/src/object/task/tasktake.cpp b/src/object/task/tasktake.cpp index e6632b23..728b3519 100644 --- a/src/object/task/tasktake.cpp +++ b/src/object/task/tasktake.cpp @@ -354,6 +354,10 @@ CObject* CTaskTake::SearchFriendObject(float &angle, type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/tool_type.cpp b/src/object/tool_type.cpp index 33bc3e0b..99b875a7 100644 --- a/src/object/tool_type.cpp +++ b/src/object/tool_type.cpp @@ -46,6 +46,12 @@ ToolType GetToolFromObject(ObjectType type) case OBJECT_MOBILEfi: case OBJECT_MOBILEii: return ToolType::OrganicShooter; + + case OBJECT_MOBILEwb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEib: + return ToolType::Builder; default: return ToolType::Other; diff --git a/src/object/tool_type.h b/src/object/tool_type.h index a480679c..23ce08e2 100644 --- a/src/object/tool_type.h +++ b/src/object/tool_type.h @@ -28,6 +28,7 @@ enum class ToolType : unsigned int Sniffer, Shooter, OrganicShooter, + Builder, }; ToolType GetToolFromObject(ObjectType type); diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 1e801d11..65293510 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -988,6 +988,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime) { factor = 1.0f; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEis || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii ) factor = 0.5f; @@ -1148,6 +1149,7 @@ void CPhysics::EffectUpdate(float aTime, float rTime) } if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1193,6 +1195,7 @@ void CPhysics::EffectUpdate(float aTime, float rTime) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1800,6 +1803,10 @@ void CPhysics::WaterFrame(float aTime, float rTime) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -1838,6 +1845,7 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) float amplitude, time, freq; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -1953,6 +1961,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) int i, max; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -1980,6 +1989,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) amplitude = 0.9f; } else if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) @@ -2074,6 +2084,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) void CPhysics::SoundMotorStop(float rTime, ObjectType type) { if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -2736,6 +2747,10 @@ bool CPhysics::ExploOther(ObjectType iType, oType == OBJECT_MOBILEta || oType == OBJECT_MOBILEfa || oType == OBJECT_MOBILEia || + oType == OBJECT_MOBILEwb || + oType == OBJECT_MOBILEtb || + oType == OBJECT_MOBILEfb || + oType == OBJECT_MOBILEib || oType == OBJECT_MOBILEwc || oType == OBJECT_MOBILEtc || oType == OBJECT_MOBILEfc || @@ -2797,6 +2812,10 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force) iType == OBJECT_MOBILEta || iType == OBJECT_MOBILEfa || iType == OBJECT_MOBILEia || + iType == OBJECT_MOBILEwb || + iType == OBJECT_MOBILEtb || + iType == OBJECT_MOBILEfb || + iType == OBJECT_MOBILEib || iType == OBJECT_MOBILEwc || iType == OBJECT_MOBILEtc || iType == OBJECT_MOBILEfc || @@ -3019,6 +3038,7 @@ void CPhysics::MotorParticle(float aTime, float rTime) type = m_object->GetType(); if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis || // legs? @@ -3124,6 +3144,7 @@ void CPhysics::MotorParticle(float aTime, float rTime) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 4dd5c8ec..bb4066fc 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -99,6 +99,10 @@ const char* GetObjectName(ObjectType type) if ( type == OBJECT_MOBILEts ) return "TrackedSniffer"; if ( type == OBJECT_MOBILEfs ) return "WingedSniffer"; if ( type == OBJECT_MOBILEis ) return "LeggedSniffer"; + if ( type == OBJECT_MOBILEwb ) return "WheeledBuilder"; + if ( type == OBJECT_MOBILEtb ) return "TrackedBuilder"; + if ( type == OBJECT_MOBILEfb ) return "WingedBuilder"; + if ( type == OBJECT_MOBILEib ) return "LeggedBuilder"; if ( type == OBJECT_MOBILErt ) return "Thumper"; if ( type == OBJECT_MOBILErc ) return "PhazerShooter"; if ( type == OBJECT_MOBILErr ) return "Recycler"; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 8a774907..c673d8b4 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -1291,10 +1291,10 @@ bool CScriptFunctions::rBuild(CBotVar* var, CBotVar* result, int& exception, voi oType = pThis->GetType(); - if ( oType != OBJECT_MOBILEfa && // allowed only for grabber bots && humans - oType != OBJECT_MOBILEta && - oType != OBJECT_MOBILEwa && - oType != OBJECT_MOBILEia && + if ( oType != OBJECT_MOBILEfb && // allowed only for builder bots && humans + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_HUMAN && oType != OBJECT_TECH ) { diff --git a/src/src/common/config.h b/src/src/common/config.h new file mode 100644 index 00000000..196d9900 --- /dev/null +++ b/src/src/common/config.h @@ -0,0 +1,22 @@ +#pragma once + +// Macros set by CMake +#define PLATFORM_WINDOWS 1 +/* #undef PLATFORM_LINUX */ +/* #undef PLATFORM_GNU */ +/* #undef PLATFORM_MACOSX */ +/* #undef PLATFORM_OTHER */ + +#ifdef PLATFORM_MACOSX +// Assume we have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework +#define HAVE_CFLOCALECOPYCURRENT 1 +#endif + +/* #undef GLEW_STATIC */ + +#define OPENAL_SOUND + +/* #undef PORTABLE */ + +#define COLOBOT_DEFAULT_DATADIR "C:/Program Files (x86)/colobot/data" +#define COLOBOT_I18N_DIR "C:/Program Files (x86)/colobot/lang" diff --git a/src/src/common/version.h b/src/src/common/version.h new file mode 100644 index 00000000..61cea590 --- /dev/null +++ b/src/src/common/version.h @@ -0,0 +1,7 @@ +#pragma once + +#define COLOBOT_FULLNAME "Colobot: Gold Edition 0.1.11+alpha-git-dev~radda8281" +#define COLOBOT_VERSION_DISPLAY "git-dev~radda8281" + +#define BUILD_NUMBER 0 +/* #undef OFFICIAL_BUILD */ diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index b22453c5..1376f189 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -854,6 +854,10 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, if ( type == OBJECT_MOBILEta ) icon = 10; if ( type == OBJECT_MOBILEwa ) icon = 9; if ( type == OBJECT_MOBILEia ) icon = 22; + if ( type == OBJECT_MOBILEfb ) icon = 32; //placeholder icon + if ( type == OBJECT_MOBILEtb ) icon = 32; + if ( type == OBJECT_MOBILEwb ) icon = 32; + if ( type == OBJECT_MOBILEib ) icon = 32; if ( type == OBJECT_MOBILEfc ) icon = 17; if ( type == OBJECT_MOBILEtc ) icon = 16; if ( type == OBJECT_MOBILEwc ) icon = 15; @@ -1231,6 +1235,10 @@ void CMap::UpdateObject(CObject* pObj) type == OBJECT_MOBILEta || type == OBJECT_MOBILEfa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEfc || diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index 23b58ee9..ce077c8c 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -207,6 +207,10 @@ int CMainShort::GetShortcutIcon(ObjectType type) if ( type == OBJECT_MOBILEta ) icon = 10; if ( type == OBJECT_MOBILEwa ) icon = 9; if ( type == OBJECT_MOBILEia ) icon = 22; + if ( type == OBJECT_MOBILEfb ) icon = 32; + if ( type == OBJECT_MOBILEtb ) icon = 32; + if ( type == OBJECT_MOBILEwb ) icon = 32; + if ( type == OBJECT_MOBILEib ) icon = 32; if ( type == OBJECT_MOBILEfc ) icon = 17; if ( type == OBJECT_MOBILEtc ) icon = 16; if ( type == OBJECT_MOBILEwc ) icon = 15; diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index c819540a..bd2a5be9 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -841,6 +841,10 @@ bool CObjectInterface::CreateInterface(bool bSelect) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -1755,6 +1759,10 @@ void CObjectInterface::UpdateInterface() type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc ||