diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..a1b12b5d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,46 @@ +root = true + +[*.{cpp,h}] +indent_style = tabs +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true + +# Charset encoding is an open topic, we would need to convert all files to the ideal encoding the world uses +# Visual Studio requires BOM to properly detect files as being utf if not using .editorconfig, but with .editorconfig we don't need the bom +#charset = utf-8 +#charset = utf-8-bom +# Currently windows-1252 seems to be used for most files, but thats not an officially supported .editorconfig encoding +#charset = windows-1252 + +# cmake +[*.json] +charset = utf-8 +indent_style = spaces +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true + +# github workflow +[*.{yml,yaml}] +charset = utf-8 +indent_style = spaces +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true + +# gamedir xml +[*.xml] +charset = utf-8 +indent_style = tabs +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true + +# gamedir ini +[*.ini] +charset = utf-8 +indent_style = tabs +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..5529cd97 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,242 @@ +name: build + +on: + push: + branches: + - '**' + tags: + - 'v*' + # allows to manually trigger a build + workflow_dispatch: + inputs: + build_all_languages: + description: build all languages + required: false + default: false + type: boolean + assemble_release: + description: create release + required: false + default: false + type: boolean + +permissions: + contents: write + +jobs: + workflow_setup: + runs-on: ubuntu-latest + outputs: + languages_json_array: ${{ steps.global_vars.outputs.languages_json_array }} + assemble_release: ${{ steps.global_vars.outputs.assemble_release }} + steps: + - id: global_vars + name: Set global variables + run: | + set -eux + + full_release='${{ ( github.repository == '1dot13/source' && github.ref_name == 'master' ) || startsWith(github.ref, 'refs/tags/v') }}' + + if [[ '${{ inputs.build_all_languages }}' == 'true' || ( '${{ inputs.build_all_languages }}' == '' && "$full_release" == 'true' ) ]] + then + languages_json_array='["Chinese", "German", "English", "French", "Polish", "Italian", "Dutch", "Russian"]'; + else + # English + some other language for compilation testing + languages_json_array='["German", "English"]' + fi + echo "languages_json_array=$languages_json_array" >> $GITHUB_OUTPUT + + if [[ '${{ inputs.assemble_release }}' == 'true' || ( '${{ inputs.assemble_release }}' == '' && "$full_release" == 'true' ) ]] + then + assemble_release='true' + else + assemble_release='false' + fi + echo "assemble_release=$assemble_release" >> $GITHUB_OUTPUT + + - name: Clone repos metadata + run: | + set -eux + + GAMEDIR_REPOSITORY=1dot13/gamedir + GAMEDIR_LANGUAGES_REPOSITORY=1dot13/gamedir-languages + + # filter tree is what makes this fast + git clone --config transfer.fsckobjects=false --tags --no-checkout --filter=tree:0 \ + "https://github.com/$GITHUB_REPOSITORY" \ + source + + git clone --config transfer.fsckobjects=false --no-checkout --filter=tree:0 \ + https://github.com/$GAMEDIR_REPOSITORY \ + gamedir + + git clone --config transfer.fsckobjects=false --no-checkout --filter=tree:0 \ + https://github.com/$GAMEDIR_LANGUAGES_REPOSITORY \ + gamedir-languages + + mkdir dist/ + echo -n " + GAMEDIR_REPOSITORY=$GAMEDIR_REPOSITORY + GAMEDIR_LANGUAGES_REPOSITORY=$GAMEDIR_LANGUAGES_REPOSITORY + " > dist/versions.env + + - name: Generate source version information + working-directory: source + run: | + set -eux + + SOURCE_COMMIT_DATETIME=$(TZ=UTC0 git log -1 --date=iso-strict-local --format=%cd $GITHUB_SHA) + SOURCE_COMMIT_DATE=$(TZ=UTC0 git log -1 --date=short-local --format=%cd $GITHUB_SHA) + + # GAME_VERSION is used to detect outdated save games and is the main version used for tracking + if [[ "$GITHUB_REF_TYPE" == 'tag' ]] + then + # if we build for a specific tag, use that as the game version + # examples: + # - v1.13.1 + # - v1.13.2-rc2 + GAME_VERSION="$GITHUB_REF_NAME" + else + # uses `git describe`, which tries to find a tag in the commit hierarchy. or fall back to a v1.13 version + # example five (5) commits after v1.13: + # - v1.13-5-7g7ffa + GAME_VERSION="$(git describe --tags --match='v[0-9]*' $GITHUB_SHA || echo v0-$(git rev-list --skip 1 --count $GITHUB_SHA)-g${GITHUB_SHA:0:8})" + fi + # max 15 CHAR8 + GAME_VERSION="${GAME_VERSION:0:15}" + + GAME_BUILD_INFORMATION="$SOURCE_COMMIT_DATE GitHub $GITHUB_REPOSITORY" + # in case of a branch or if the tag is truncated + if [[ "$GAME_VERSION" != *"$GITHUB_REF_NAME"* ]] + then + GAME_BUILD_INFORMATION="$GAME_BUILD_INFORMATION $GITHUB_REF_TYPE $GITHUB_REF_NAME" + fi + # max 255 CHAR16 + GAME_BUILD_INFORMATION="${GAME_BUILD_INFORMATION:0:255}" + + echo -n " + SOURCE_COMMIT_DATETIME=$SOURCE_COMMIT_DATETIME + GAME_VERSION=$GAME_VERSION + GAME_BUILD_INFORMATION=$GAME_BUILD_INFORMATION + " >> ../dist/versions.env + + # due to building everything in parallel, versions should be pinned at the start so everything builds based on the same versions + - name: Generate gamedir version information + working-directory: gamedir + run: | + set -eux + + GAMEDIR_COMMIT_SHA=$(git rev-parse HEAD) + GAMEDIR_COMMIT_DATETIME=$(TZ=UTC0 git log -1 --date=iso-strict-local --format=%cd $GAMEDIR_COMMIT_SHA) + + echo -n " + GAMEDIR_COMMIT_SHA=$GAMEDIR_COMMIT_SHA + GAMEDIR_COMMIT_DATETIME=$GAMEDIR_COMMIT_DATETIME + " >> ../dist/versions.env + + # due to building everything in parallel, versions should be pinned at the start so everything builds based on the same versions + - name: Generate gamedir-languages version information + working-directory: gamedir-languages + run: | + set -eux + + GAMEDIR_LANGUAGES_COMMIT_SHA=$(git rev-parse HEAD) + GAMEDIR_LANGUAGES_COMMIT_DATETIME=$(TZ=UTC0 git log -1 --date=iso-strict-local --format=%cd $GAMEDIR_LANGUAGES_COMMIT_SHA) + + echo -n " + GAMEDIR_LANGUAGES_COMMIT_SHA=$GAMEDIR_LANGUAGES_COMMIT_SHA + GAMEDIR_LANGUAGES_COMMIT_DATETIME=$GAMEDIR_LANGUAGES_COMMIT_DATETIME + " >> ../dist/versions.env + + - name: Show version information summary + run: | + set -eux + cat dist/versions.env + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: versions.env + path: dist/ + + build: + needs: [ workflow_setup ] + strategy: + fail-fast: false + matrix: + language: ${{ fromJson(needs.workflow_setup.outputs.languages_json_array) }} + uses: ./.github/workflows/build_language.yml + with: + language: ${{ matrix.language }} + assemble: ${{ needs.workflow_setup.outputs.assemble_release == 'true' }} + # at least English and some other lang have to work + continue-on-error: ${{ matrix.language != 'English' && matrix.language != 'German' }} + + release: + needs: [ workflow_setup, build ] + if: needs.workflow_setup.outputs.assemble_release == 'true' + runs-on: ubuntu-latest + + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Move release archives to dist/ + shell: bash + run: | + set -eux + mkdir dist/ + mv artifacts/*_release/* dist/ + + - name: Delete Latest + if: startsWith(github.ref, 'refs/tags/v') == false + uses: dev-drprasad/delete-tag-and-release@v1.0 + with: + tag_name: "latest" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: release_latest + name: Release Latest + if: startsWith(github.ref, 'refs/tags/v') == false + uses: ncipollo/release-action@v1 + with: + allowUpdates: false + artifactErrorsFailBuild: true + artifacts: dist/* + draft: false + generateReleaseNotes: true + makeLatest: true + name: "Latest (unstable)" + prerelease: true + tag: "latest" + + - id: release_tag + name: Release Tag + uses: ncipollo/release-action@v1 + if: startsWith(github.ref, 'refs/tags/v') + with: + allowUpdates: true + artifactErrorsFailBuild: true + artifacts: dist/* + draft: false + generateReleaseNotes: true + makeLatest: true + omitBodyDuringUpdate: true + omitDraftDuringUpdate: true + omitNameDuringUpdate: true + omitPrereleaseDuringUpdate: true + + - name: Show release outputs + shell: bash + run: | + echo 'id: ' + echo -n '${{ steps.release_tag.outputs.id }}' + echo -n '${{ steps.release_latest.outputs.id }}' + echo '' + echo '' + echo 'url:' + echo -n '${{ steps.release_tag.outputs.html_url }}' + echo -n '${{ steps.release_latest.outputs.html_url }}' + echo '' diff --git a/.github/workflows/build_language.yml b/.github/workflows/build_language.yml new file mode 100644 index 00000000..bea5a00a --- /dev/null +++ b/.github/workflows/build_language.yml @@ -0,0 +1,204 @@ +name: build language + +on: + workflow_call: + inputs: + language: + description: 'any of Chinese German English French Polish Italian Dutch Russian' + required: true + default: 'English' + type: string + assemble: + description: 'assemble full package' + required: true + default: true + type: boolean + continue-on-error: + description: 'allows a language to fail, used when building all languages' + required: false + default: false + type: boolean + +jobs: + compile: + runs-on: windows-latest # required for msbuild + continue-on-error: ${{ inputs.continue-on-error }} + strategy: + fail-fast: false + matrix: + application: [ja2, ja2mapeditor, ja2ub, ja2ubmapeditor] + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Download versions.env + uses: actions/download-artifact@v3 + with: + name: versions.env + path: artifacts + - name: Restore versions.env + shell: bash + run: cat artifacts/versions.env >> $GITHUB_ENV + + - name: Update GameVersion.cpp + shell: bash + run: | + set -eux + INPUTS_LANGUAGE=${{ inputs.language }} + GAME_VERSION=$(echo "$GAME_VERSION" | tr -cd '[:print:]' | tr -d '"\\') + GAME_BUILD="${INPUTS_LANGUAGE:0:2} $GAME_BUILD_INFORMATION" + GAME_BUILD=$(echo "$GAME_BUILD" | tr -cd '[:print:]' | tr -d '"\\') + sed -i "s|@Version@|${GAME_VERSION:0:15}|" GameVersion.cpp + sed -i "s|@Build@|${GAME_BUILD:0:255}|" GameVersion.cpp + cat GameVersion.cpp + + - name: Prepare build properties + shell: bash + run: | + set -eux + + touch CMakeUserPresets.json + + JA2Language=$(echo '${{ inputs.language }}' | tr '[:lower:]' '[:upper:]') + JA2Application=$(echo '${{ matrix.application }}' | tr '[:lower:]' '[:upper:]') + + echo " + JA2Language=$JA2Language + JA2Application=$JA2Application + " >> $GITHUB_ENV + + - uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x86 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x86 + - name: Prepare build + run: | + cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application" + - name: Build + run: | + cmake --build build/ -- -v + - name: List build artifacts + shell: bash + run: | + find build/ + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: ${{ inputs.language }}_${{ matrix.application }} + path: build/*.exe + + assemble: + needs: [ compile ] + if: inputs.assemble + runs-on: windows-latest # required for case-insensitive filesystem handling + continue-on-error: ${{ inputs.continue-on-error }} + + steps: + - name: Download versions.env + uses: actions/download-artifact@v3 + with: + name: versions.env + path: artifacts + - name: Restore versions.env + shell: bash + run: cat artifacts/versions.env >> $GITHUB_ENV + + - name: Checkout gamedir + uses: actions/checkout@v3 + with: + repository: ${{ env.GAMEDIR_REPOSITORY }} + ref: ${{ env.GAMEDIR_COMMIT_SHA }} + path: gamedir + + - name: Checkout gamedir-languages + if: inputs.language != 'English' + uses: actions/checkout@v3 + with: + repository: ${{ env.GAMEDIR_LANGUAGES_REPOSITORY }} + ref: ${{ env.GAMEDIR_LANGUAGES_COMMIT_SHA }} + path: gamedir-languages + + - name: Copy gamedir-languages files to gamedir + if: inputs.language != 'English' + shell: bash + run: | + set -eux + cp -a gamedir-languages/${{ inputs.language }}_Version/* gamedir/ + + - name: Download ja2 + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.language }}_ja2 + path: artifacts/ja2 + + - name: Download ja2mapeditor + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.language }}_ja2mapeditor + path: artifacts/ja2mapeditor + + - name: Download ja2ub + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.language }}_ja2ub + path: artifacts/ja2ub + + - name: Download ja2ubmapeditor + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.language }}_ja2ubmapeditor + path: artifacts/ja2ubmapeditor + + - name: Copy application files to gamedir + shell: bash + run: | + set -eux + for APP in ja2 ja2mapeditor ja2ub ja2ubmapeditor + do + mv artifacts/${APP}/*.exe gamedir/${APP}.exe + done + + - name: Create version information file + shell: bash + run: | + set -eux + + # "-" separates words, "_" combines words, see double-click behavior + DIST_PREFIX='JA2_113' + DIST_NAME="${DIST_PREFIX}-${GAME_VERSION}-G${GAMEDIR_COMMIT_SHA:0:4}L${GAMEDIR_LANGUAGES_COMMIT_SHA:0:4}-${{ inputs.language }}" + echo "DIST_NAME=$DIST_NAME" >> $GITHUB_ENV + + echo "If you encounter problems during gameplay, please provide the following version information: + Distribution Name: $DIST_NAME + Game Version: $GAME_VERSION + Language: ${{ inputs.language }} + Build Information: $GAME_BUILD_INFORMATION + Source Repository: $GITHUB_REPOSITORY + Source Commit SHA: $GITHUB_SHA + Source Commit Date: $SOURCE_COMMIT_DATETIME + Gamedir Repository: $GAMEDIR_REPOSITORY + Gamedir Commit SHA: $GAMEDIR_COMMIT_SHA + Gamedir Commit Date: $GAMEDIR_COMMIT_DATETIME + Gamedir Languages Repository: $GAMEDIR_LANGUAGES_REPOSITORY + Gamedir Languages Commit SHA: $GAMEDIR_LANGUAGES_COMMIT_SHA + Gamedir Languages Commit Date: $GAMEDIR_LANGUAGES_COMMIT_DATETIME + " > "gamedir/${DIST_PREFIX}-Version.txt" + cat "gamedir/${DIST_PREFIX}-Version.txt" + + - name: Create release archive + shell: bash + run: | + set -eux + mkdir dist/ + cd gamedir/ + 7z a -bb -xr'!.*' "../dist/${DIST_NAME}.7z" . + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: ${{ inputs.language }}_release + path: dist/ diff --git a/.gitignore b/.gitignore index f77e4723..07d506ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ -build/ -lib/ +# CLion +/.idea/ +/cmake-build-*/ + +# Visual Studio 2022 +/.vs/ +/build/ +/out/ +/CMakeSettings.json +/CMakeUserPresets.json diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..6b1c2357 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,176 @@ +cmake_minimum_required(VERSION 3.20) + +project(ja2) + +include(cmake/CopyUserPresetTemplate.cmake) +CopyUserPresetTemplate() + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# whether we are using MSBuild as a generator +set(usingMsBuild $) + +# lua51.lib and lua51.vc9.lib have been built with /MTx, so we must as well +# TODO: build our own Lua 5.1.2 from source so we can use whichever +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + +add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP USE_VFS _CRT_SECURE_NO_DEPRECATE) +include_directories(${CMAKE_SOURCE_DIR} "ext/VFS/include" Utils TileEngine TacticalAI ModularizedTacticalAI Tactical Strategic "Standard Gaming Platform" Res Lua Laptop Multiplayer "Multiplayer/raknet" Editor Console) + +# external libraries +add_subdirectory("ext/libpng") +add_subdirectory("ext/zlib") +add_subdirectory("ext/VFS") +target_link_libraries(bfVFS PRIVATE 7z) + +# ja2export utility +add_subdirectory("ext/export/src") + +# static libraries whose source files, header files or header files included +# by header files do not rely on Applications or Languages preprocessor definitions, +# and therefore only need to be compiled once. Good. +add_subdirectory(Lua) + +# static libraries whose source files, header files or header files included +# by header files rely on Application and Language preprocessor definitions, and +# therefore need to be compiled multiple times. Very Bad. +add_subdirectory(TileEngine) +add_subdirectory(TacticalAI) +add_subdirectory(Utils) +add_subdirectory(Strategic) +add_subdirectory("Standard Gaming Platform") +add_subdirectory(Laptop) +add_subdirectory(Editor) +add_subdirectory(Console) +add_subdirectory(Tactical) +add_subdirectory(ModularizedTacticalAI) +# TODO: Rename 'Standard Gaming Platform' directory to 'SGP' so this can be refactored away +set(Ja2_Libs +TileEngine +TacticalAI +Utils +Strategic +SGP +Laptop +Editor +Console +Tactical +ModularizedTacticalAI +) + +# TODO: Move these units into their own directory to declutter the root dir and CMakeLists.txt file +set(Ja2Src +"aniviewscreen.cpp" +"Credits.cpp" +"Fade Screen.cpp" +"FeaturesScreen.cpp" +"GameInitOptionsScreen.cpp" +"gameloop.cpp" +"gamescreen.cpp" +"GameSettings.cpp" +"GameVersion.cpp" +"HelpScreen.cpp" +"Init.cpp" +"Intro.cpp" +"JA2 Splash.cpp" +"Ja25Update.cpp" +"jascreens.cpp" +"Language Defines.cpp" +"Loading Screen.cpp" +"MainMenuScreen.cpp" +"MessageBoxScreen.cpp" +"MPChatScreen.cpp" +"MPConnectScreen.cpp" +"MPHostScreen.cpp" +"MPJoinScreen.cpp" +"MPScoreScreen.cpp" +"MPXmlTeams.cpp" +"Multiplayer/client.cpp" +"Multiplayer/server.cpp" +"Multiplayer/transfer_rules.cpp" +"Options Screen.cpp" +"profiler.cpp" +"SaveLoadGame.cpp" +"SaveLoadScreen.cpp" +"SCREENS.cpp" +"Sys Globals.cpp" +"ub_config.cpp" +"XML_DifficultySettings.cpp" +"XML_IntroFiles.cpp" +"XML_Layout_MainMenu.cpp" +Res/ja2.rc +) + +set(Ja2_Libraries +"${PROJECT_SOURCE_DIR}/libexpatMT.lib" +"Dbghelp.lib" +Lua +"${PROJECT_SOURCE_DIR}/lua51.lib" +"${PROJECT_SOURCE_DIR}/lua51.vc9.lib" +"Winmm.lib" +"${PROJECT_SOURCE_DIR}/SMACKW32.LIB" +"${PROJECT_SOURCE_DIR}/binkw32.lib" +bfVFS +"${PROJECT_SOURCE_DIR}/Multiplayer/raknet/RakNetLibStatic.lib" +"ws2_32.lib" +) + +# simple function to validate Languages and Application choices +include(cmake/ValidateOptions.cmake) + +set(ValidLanguages CHINESE DUTCH ENGLISH FRENCH GERMAN ITALIAN POLISH RUSSIAN) +ValidateOptions("${ValidLanguages}" "Languages" "${Languages}" "LangTargets") + +set(ValidApplications JA2 JA2MAPEDITOR JA2UB JA2UBMAPEDITOR) +ValidateOptions("${ValidApplications}" "Applications" "${Applications}" "ApplicationTargets") + + +# preprocessor definitions for Debug build, per the legacy MSBuild +set(debugFlags $,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>) + +# Due to widespread preprocessor definition abuse in the codebase, practically +# every library-language-executable combination is its own compilation target +# TODO: refactor preprocessor usage onto, ideally, a single translation unit +foreach(lang IN LISTS LangTargets) + foreach(exe IN LISTS ApplicationTargets) + set(Executable ${exe}_${lang}) + + # executable for an application/language combination, e.g. JA2_ENGLISH.exe + add_executable(${Executable} WIN32) + target_sources(${Executable} PRIVATE ${Ja2Src}) + + # Good libraries have already been built, can be simply linked here + target_link_libraries(${Executable} PRIVATE ${Ja2_Libraries} $) + target_link_options(${Executable} PRIVATE $) + + # for each app/lang combination, the Very Bad libraries need to be built, + # with the appropriate preprocessor definitions + foreach(lib IN LISTS Ja2_Libs) + # syntactic sugar to hopefully make this more readable + set(VeryBadLib ${Executable}_${lib}) + set(isEditor $) + set(isUb $) + set(isUbEditor $) + + # static library for an app/lang combination, e.g. JA2_ENGLISH_SGP.lib + add_library(${VeryBadLib}) + target_sources(${VeryBadLib} PRIVATE ${${lib}Src}) + + target_compile_definitions(${VeryBadLib} PUBLIC + $ + $ + $ + ${debugFlags} + ${lang} + ) + target_link_libraries(${Executable} PUBLIC ${VeryBadLib}) + endforeach() + + # for SGP only + target_link_libraries(${Executable}_SGP PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") + target_link_libraries(${Executable}_SGP PUBLIC libpng) + target_compile_definitions(${Executable}_SGP PRIVATE NO_ZLIB_COMPRESSION) + endforeach() +endforeach() diff --git a/Console/CMakeLists.txt b/Console/CMakeLists.txt new file mode 100644 index 00000000..7c67cd0a --- /dev/null +++ b/Console/CMakeLists.txt @@ -0,0 +1,6 @@ +set(ConsoleSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Console.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Dialogs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileStream.cpp" +PARENT_SCOPE) diff --git a/Console/Console.cpp b/Console/Console.cpp index b642bbd8..e7453938 100644 --- a/Console/Console.cpp +++ b/Console/Console.cpp @@ -189,18 +189,6 @@ Console::Console(LPCTSTR pszConfigFile, LPCTSTR pszShellCmdLine, LPCTSTR pszCons , m_nTextBgColor(0) { -#if 0 - m_strConfigFile = GetFullFilename(pszConfigFile); - - if (!_tcsicmp(pszReloadNewConfig, _T("yes"))) { - m_dwReloadNewConfigDefault = RELOAD_NEW_CONFIG_YES; - } else if (!_tcsicmp(pszReloadNewConfig, _T("no"))) { - m_dwReloadNewConfigDefault = RELOAD_NEW_CONFIG_NO; - } else { - m_dwReloadNewConfigDefault = RELOAD_NEW_CONFIG_PROMPT; - } - m_dwReloadNewConfig = m_dwReloadNewConfigDefault; -#endif m_mouseCursorOffset.x = 0; m_mouseCursorOffset.y = 0; @@ -210,26 +198,6 @@ Console::Console(LPCTSTR pszConfigFile, LPCTSTR pszShellCmdLine, LPCTSTR pszCons ::ZeroMemory(&m_rectSelection, sizeof(RECT)); -#if 0 - // get Console.exe directory - TCHAR szPathName[MAX_PATH]; - ::ZeroMemory(szPathName, sizeof(szPathName)); - ::GetModuleFileName(ghInstance, szPathName, MAX_PATH); - - tstring strExeDir(szPathName); - - strExeDir = strExeDir.substr(0, strExeDir.rfind(_T("\\"))); - strExeDir += TCHAR('\\'); - - // if no config file is given, get console.xml from the startup directory - if (m_strConfigFile.length() == 0) { - - m_strConfigFile = strExeDir + tstring(_T("console.xml")); - } - - // get readme filename - m_strReadmeFile = strExeDir + tstring(_T("Readme.txt")); -#endif ::ZeroMemory(&m_csbiCursor, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); ::ZeroMemory(&m_csbiConsole, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); @@ -591,16 +559,6 @@ void Console::OnActivateApp(BOOL bActivate, DWORD dwFlags) { DrawCursor(); } -#if 0 - if ((m_dwTransparency == TRANSPARENCY_ALPHA) && (m_byInactiveAlpha > 0)) { - if (bActivate) { - g_pfnSetLayeredWndAttr(m_hWnd, m_crBackground, m_byAlpha, LWA_ALPHA); - } else { - g_pfnSetLayeredWndAttr(m_hWnd, m_crBackground, m_byInactiveAlpha, LWA_ALPHA); - } - - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -683,53 +641,6 @@ void Console::OnInputLangChangeRequest(WPARAM wParam, LPARAM lParam) { ///////////////////////////////////////////////////////////////////////////// void Console::OnLButtonDown(UINT uiFlags, POINTS points) { -#if 0 - RECT windowRect; - ::GetCursorPos(&m_mouseCursorOffset); - ::GetWindowRect(m_hWnd, &windowRect); - m_mouseCursorOffset.x -= windowRect.left; - m_mouseCursorOffset.y -= windowRect.top; - - if (!m_bMouseDragable || - (m_bInverseShift == !(uiFlags & MK_SHIFT))) { - - if (m_nCharWidth) { - - if (m_nTextSelection == TEXT_SELECTION_SELECTED) return; - - // fixed-width characters - // start copy text selection - ::SetCapture(m_hWnd); - - if (!m_nTextSelection) { - RECT rect; - rect.left = 0; - rect.top = 0; - rect.right = m_nClientWidth; - rect.bottom = m_nClientHeight; - ::FillRect(m_hdcSelection, &rect, m_hbrushSelection); - } - - m_nTextSelection = TEXT_SELECTION_SELECTING; - - m_coordSelOrigin.X = min(max(points.x - m_nInsideBorder, 0) / m_nCharWidth, m_dwColumns-1); - m_coordSelOrigin.Y = min(max(points.y - m_nInsideBorder, 0) / m_nCharHeight, m_dwRows-1); - - m_rectSelection.left = m_rectSelection.right = m_coordSelOrigin.X * m_nCharWidth + m_nInsideBorder; - m_rectSelection.top = m_rectSelection.bottom = m_coordSelOrigin.Y * m_nCharHeight + m_nInsideBorder; - - TRACE(_T("Starting point: %ix%i\n"), m_coordSelOrigin.X, m_coordSelOrigin.Y); - } - - } else { - if (m_nTextSelection) { - return; - } else if (m_bMouseDragable) { - // start to drag window - ::SetCapture(m_hWnd); - } - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -825,88 +736,6 @@ void Console::OnMButtonDown(UINT uiFlags, POINTS points) { void Console::OnMouseMove(UINT uiFlags, POINTS points) { -#if 0 - RECT windowRect; - int deltaX, deltaY; - POINT point; - - if (uiFlags & MK_LBUTTON) { - - ::GetWindowRect(m_hWnd, &windowRect); - - point.x = points.x; - point.y = points.y; - - ::ClientToScreen(m_hWnd, &point); - - deltaX = point.x - windowRect.left - m_mouseCursorOffset.x; - deltaY = point.y - windowRect.top - m_mouseCursorOffset.y; - - if (deltaX | deltaY) { - -// TRACE(_T("m_nTextSelection: %i, Delta X: %i Delta Y: %i\n"), m_nTextSelection, deltaX, deltaY); - - if (m_nTextSelection) { - if ((!m_bMouseDragable) || (m_bInverseShift == !(uiFlags & MK_SHIFT))) { - - // some text has been selected, just return - if (m_nTextSelection == TEXT_SELECTION_SELECTED) return; - - // selecting text for copy/paste - COORD coordSel; - - ::InvalidateRect(m_hWnd, &m_rectSelection, FALSE); - - coordSel.X = min(max(points.x - m_nInsideBorder, 0) / m_nCharWidth, m_dwColumns-1); - coordSel.Y = min(max(points.y - m_nInsideBorder, 0) / m_nCharHeight, m_dwRows-1); - -// TRACE(_T("End point: %ix%i\n"), coordSel.X, coordSel.Y); - - if (coordSel.X >= m_coordSelOrigin.X) { - m_rectSelection.left = m_coordSelOrigin.X * m_nCharWidth + m_nInsideBorder; - m_rectSelection.right = (coordSel.X + 1) * m_nCharWidth + m_nInsideBorder; - } else { - m_rectSelection.left = coordSel.X * m_nCharWidth + m_nInsideBorder; - m_rectSelection.right = (m_coordSelOrigin.X + 1) * m_nCharWidth + m_nInsideBorder; - } - - if (coordSel.Y >= m_coordSelOrigin.Y) { - m_rectSelection.top = m_coordSelOrigin.Y * m_nCharHeight + m_nInsideBorder; - m_rectSelection.bottom = (coordSel.Y + 1) * m_nCharHeight + m_nInsideBorder; - } else { - m_rectSelection.top = coordSel.Y * m_nCharHeight + m_nInsideBorder; - m_rectSelection.bottom = (m_coordSelOrigin.Y + 1) * m_nCharHeight + m_nInsideBorder; - } - -// TRACE(_T("Selection rect: %i,%i x %i,%i\n"), m_rectSelection.left, m_rectSelection.top, m_rectSelection.right, m_rectSelection.bottom); - - ::InvalidateRect(m_hWnd, &m_rectSelection, FALSE); - } - - } else if (m_bMouseDragable) { - - // moving the window - HWND hwndZ; - switch (m_dwCurrentZOrder) { - case Z_ORDER_REGULAR : hwndZ = HWND_NOTOPMOST; break; - case Z_ORDER_ONTOP : hwndZ = HWND_TOPMOST; break; - case Z_ORDER_ONBOTTOM : hwndZ = HWND_BOTTOM; break; - } - - ::SetWindowPos( - m_hWnd, - hwndZ, - windowRect.left + deltaX, - windowRect.top + deltaY, - 0, - 0, - SWP_NOSIZE); - - ::PostMessage(m_hWnd, WM_PAINT, 0, 0); - } - } - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -1101,17 +930,6 @@ void Console::OnTrayNotify(WPARAM wParam, LPARAM lParam) { ///////////////////////////////////////////////////////////////////////////// -#if 0 -void Console::OnWallpaperChanged(const TCHAR* pszFilename) { - - if (m_dwTransparency == TRANSPARENCY_FAKE) { - SetWindowTransparency(); - CreateBackgroundBitmap(); - RepaintWindow(); - } - -} -#endif ///////////////////////////////////////////////////////////////////////////// @@ -1120,746 +938,6 @@ void Console::OnWallpaperChanged(const TCHAR* pszFilename) { BOOL Console::GetOptions() { -#if 0 - class XmlException { - public: XmlException(BOOL bRet) : m_bRet(bRet){}; - BOOL m_bRet; - }; - - BOOL bRet = FALSE; - - IStream* pFileStream = NULL; - IXMLDocument* pConfigDoc = NULL; - IPersistStreamInit* pPersistStream = NULL; - IXMLElement* pRootElement = NULL; - IXMLElementCollection* pColl = NULL; - IXMLElement* pFontElement = NULL; - IXMLElement* pPositionElement = NULL; - IXMLElement* pAppearanceElement = NULL; - IXMLElement* pScrollbarElement = NULL; - IXMLElement* pBackgroundElement = NULL; - IXMLElement* pCursorElement = NULL; - IXMLElement* pBehaviorElement = NULL; - - try { - ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - USES_CONVERSION; - - // open file stream - if (!SUCCEEDED(CreateFileStream( - m_strConfigFile.c_str(), - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - 0, - NULL, - &pFileStream))) { - - throw XmlException(FALSE); - } - - // create XML document instance - if (!SUCCEEDED(::CoCreateInstance( - CLSID_XMLDocument, - NULL, - CLSCTX_INPROC_SERVER, - IID_IXMLDocument, - (void**)&pConfigDoc))) { - - throw XmlException(FALSE); - } - - // load the configuration file - pConfigDoc->QueryInterface(IID_IPersistStreamInit, (void **)&pPersistStream); - - if (!SUCCEEDED(pPersistStream->Load(pFileStream))) throw XmlException(FALSE); - - // see if we're dealing with the skin - if (!SUCCEEDED(pConfigDoc->get_root(&pRootElement))) throw XmlException(FALSE); - - CComVariantOut varAttValue; - CComBSTROut bstr; - CComBSTROut strText; - tstring strTempText(_T("")); - - // root element must be CONSOLE - pRootElement->get_tagName(bstr.Out()); - bstr.ToUpper(); - - if (!(bstr == CComBSTR(_T("CONSOLE")))) throw XmlException(FALSE); - - pRootElement->getAttribute(CComBSTR(_T("title")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - m_strWindowTitle = OLE2T(varAttValue.bstrVal); - m_strWindowTitleCurrent = m_strWindowTitle; - } - - pRootElement->getAttribute(CComBSTR(_T("refresh")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_dwMasterRepaintInt = _ttol(OLE2T(varAttValue.bstrVal)); - - pRootElement->getAttribute(CComBSTR(_T("change_refresh")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_dwChangeRepaintInt = _ttol(OLE2T(varAttValue.bstrVal)); - if ((int)m_dwChangeRepaintInt < 5) m_dwChangeRepaintInt = 5; - - pRootElement->getAttribute(CComBSTR(_T("shell")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_strShell = OLE2T(varAttValue.bstrVal); - - pRootElement->getAttribute(CComBSTR(_T("editor")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_strConfigEditor = OLE2T(varAttValue.bstrVal); - - pRootElement->getAttribute(CComBSTR(_T("editor_params")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_strConfigEditorParams = OLE2T(varAttValue.bstrVal); - - pRootElement->get_children(&pColl); - if (!pColl) throw XmlException(TRUE); - - // get font settings - IXMLElementCollection* pFontColl = NULL; - if (!SUCCEEDED(pColl->item(CComVariant(_T("font")), CComVariant(0), (IDispatch**)&pFontElement))) throw XmlException(FALSE); - if (pFontElement) { - if (!SUCCEEDED(pFontElement->get_children(&pFontColl))) throw XmlException(FALSE); - - if (pFontColl) { - IXMLElement* pFontSubelement = NULL; - - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("size")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - pFontSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_dwFontSize = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pFontSubelement); - - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("italic")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - pFontSubelement->get_text(strText.Out()); - m_bItalic = !_tcsicmp(OLE2T(strText), _T("true")); - } - SAFERELEASE(pFontSubelement); - - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("bold")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - pFontSubelement->get_text(strText.Out()); - m_bBold = !_tcsicmp(OLE2T(strText), _T("true")); - } - SAFERELEASE(pFontSubelement); - - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("name")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - pFontSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_strFontName = OLE2T(strText); - } - SAFERELEASE(pFontSubelement); - - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("color")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - varAttValue.Clear(); - pFontSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - varAttValue.Clear(); - pFontSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - varAttValue.Clear(); - pFontSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - m_bUseFontColor = TRUE; - m_crFontColor = RGB(r, g, b); - } - SAFERELEASE(pFontSubelement); - - // get font color mapping - if (!SUCCEEDED(pFontColl->item(CComVariant(_T("colors")), CComVariant(0), (IDispatch**)&pFontSubelement))) throw XmlException(FALSE); - if (pFontSubelement) { - - IXMLElementCollection* pColorsColl = NULL; - - if (!SUCCEEDED(pFontSubelement->get_children(&pColorsColl))) throw XmlException(FALSE); - - if (pColorsColl) { - - for (int i = 0; i < 16; ++i) { - IXMLElement* pColorSubelement = NULL; - TCHAR szColorName[32]; - - _sntprintf(szColorName, sizeof(szColorName)/sizeof(TCHAR), _T("color_%02i"), i); - - if (!SUCCEEDED(pColorsColl->item(CComVariant(szColorName), CComVariant(0), (IDispatch**)&pColorSubelement))) throw XmlException(FALSE); - if (pColorSubelement) { - - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - varAttValue.Clear(); - pColorSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - varAttValue.Clear(); - pColorSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - varAttValue.Clear(); - pColorSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - Console::m_arrConsoleColors[i] = RGB(r, g, b); - } - - SAFERELEASE(pColorSubelement); - } - } - SAFERELEASE(pColorsColl); - } - SAFERELEASE(pFontSubelement); - } - SAFERELEASE(pFontColl); - } - - // get position settings - IXMLElementCollection* pPositionColl = NULL; - if (!SUCCEEDED(pColl->item(CComVariant(_T("position")), CComVariant(0), (IDispatch**)&pPositionElement))) throw XmlException(FALSE); - if (pPositionElement) { - if (!SUCCEEDED(pPositionElement->get_children(&pPositionColl))) throw XmlException(FALSE); - - if (pPositionColl) { - IXMLElement* pPositionSubelement = NULL; - - if (!m_bReloading) { - if (!SUCCEEDED(pPositionColl->item(CComVariant(_T("x")), CComVariant(0), (IDispatch**)&pPositionSubelement))) throw XmlException(FALSE); - if (pPositionSubelement) { - pPositionSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nX = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pPositionSubelement); - - if (!SUCCEEDED(pPositionColl->item(CComVariant(_T("y")), CComVariant(0), (IDispatch**)&pPositionSubelement))) throw XmlException(FALSE); - if (pPositionSubelement) { - pPositionSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nY = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pPositionSubelement); - } - - if (!SUCCEEDED(pPositionColl->item(CComVariant(_T("docked")), CComVariant(0), (IDispatch**)&pPositionSubelement))) throw XmlException(FALSE); - if (pPositionSubelement) { - pPositionSubelement->get_text(strText.Out()); - strTempText = OLE2T(strText); - - if (!_tcsicmp(strTempText.c_str(), _T("top left"))) { - m_dwDocked = DOCK_TOP_LEFT; - } else if (!_tcsicmp(strTempText.c_str(), _T("top right"))) { - m_dwDocked = DOCK_TOP_RIGHT; - } else if (!_tcsicmp(strTempText.c_str(), _T("bottom right"))) { - m_dwDocked = DOCK_BOTTOM_RIGHT; - } else if (!_tcsicmp(strTempText.c_str(), _T("bottom left"))) { - m_dwDocked = DOCK_BOTTOM_LEFT; - } else { - m_dwDocked = DOCK_NONE; - } - } - SAFERELEASE(pPositionSubelement); - - if (!SUCCEEDED(pPositionColl->item(CComVariant(_T("snap_distance")), CComVariant(0), (IDispatch**)&pPositionSubelement))) throw XmlException(FALSE); - if (pPositionSubelement) { - pPositionSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nSnapDst = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pPositionSubelement); - - if (!SUCCEEDED(pPositionColl->item(CComVariant(_T("z_order")), CComVariant(0), (IDispatch**)&pPositionSubelement))) throw XmlException(FALSE); - if (pPositionSubelement) { - pPositionSubelement->get_text(strText.Out()); - strTempText = OLE2T(strText); - - if (!_tcsicmp(strTempText.c_str(), _T("regular"))) { - m_dwCurrentZOrder = Z_ORDER_REGULAR; - m_dwOriginalZOrder = Z_ORDER_REGULAR; - } else if (!_tcsicmp(strTempText.c_str(), _T("on top"))) { - m_dwCurrentZOrder = Z_ORDER_ONTOP; - m_dwOriginalZOrder = Z_ORDER_ONTOP; - } else if (!_tcsicmp(strTempText.c_str(), _T("on bottom"))) { - m_dwCurrentZOrder = Z_ORDER_ONBOTTOM; - m_dwOriginalZOrder = Z_ORDER_ONBOTTOM; - } else { - m_dwCurrentZOrder = Z_ORDER_REGULAR; - m_dwOriginalZOrder = Z_ORDER_REGULAR; - } - } - SAFERELEASE(pPositionSubelement); - } - - SAFERELEASE(pPositionColl); - } - - // get appearance settings - IXMLElementCollection* pAppearanceColl = NULL; - if (!SUCCEEDED(pColl->item(CComVariant(_T("appearance")), CComVariant(0), (IDispatch**)&pAppearanceElement))) throw XmlException(FALSE); - if (pAppearanceElement) { - if (!SUCCEEDED(pAppearanceElement->get_children(&pAppearanceColl))) throw XmlException(FALSE); - - if (pAppearanceColl) { - IXMLElement* pAppearanaceSubelement = NULL; - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("hide_console")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bHideConsole = TRUE; - } else { - m_bHideConsole = FALSE; - } - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("hide_console_timeout")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_dwHideConsoleTimeout = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("start_minimized")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bStartMinimized = TRUE; - } else { - m_bStartMinimized = FALSE; - } - } - SAFERELEASE(pAppearanaceSubelement); - - IXMLElementCollection* pScrollbarColl = NULL; - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("scrollbar")), CComVariant(0), (IDispatch**)&pScrollbarElement))) throw XmlException(FALSE); - if (pScrollbarElement) { - if (!SUCCEEDED(pScrollbarElement->get_children(&pScrollbarColl))) throw XmlException(FALSE); - - if (pScrollbarColl) { - IXMLElement* pScrollbarSubelement = NULL; - - if (!SUCCEEDED(pScrollbarColl->item(CComVariant(_T("color")), CComVariant(0), (IDispatch**)&pScrollbarSubelement))) throw XmlException(FALSE); - if (pScrollbarSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - pScrollbarSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - pScrollbarSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - pScrollbarSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - m_crScrollbarColor = RGB(r, g, b); - } - SAFERELEASE(pScrollbarSubelement); - - if (!SUCCEEDED(pScrollbarColl->item(CComVariant(_T("style")), CComVariant(0), (IDispatch**)&pScrollbarSubelement))) throw XmlException(FALSE); - if (pScrollbarSubelement) { - pScrollbarSubelement->get_text(strText.Out()); - strTempText = OLE2T(strText); - - if (!_tcsicmp(strTempText.c_str(), _T("regular"))) { - m_nScrollbarStyle = FSB_REGULAR_MODE; - } else if (!_tcsicmp(strTempText.c_str(), _T("flat"))) { - m_nScrollbarStyle = FSB_FLAT_MODE; - } else if (!_tcsicmp(strTempText.c_str(), _T("encarta"))) { - m_nScrollbarStyle = FSB_ENCARTA_MODE; - } - } - SAFERELEASE(pScrollbarSubelement); - - - if (!SUCCEEDED(pScrollbarColl->item(CComVariant(_T("width")), CComVariant(0), (IDispatch**)&pScrollbarSubelement))) throw XmlException(FALSE); - if (pScrollbarSubelement) { - pScrollbarSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nScrollbarWidth = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pScrollbarSubelement); - - if (!SUCCEEDED(pScrollbarColl->item(CComVariant(_T("button_height")), CComVariant(0), (IDispatch**)&pScrollbarSubelement))) throw XmlException(FALSE); - if (pScrollbarSubelement) { - pScrollbarSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nScrollbarButtonHeight = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pScrollbarSubelement); - - if (!SUCCEEDED(pScrollbarColl->item(CComVariant(_T("thumb_height")), CComVariant(0), (IDispatch**)&pScrollbarSubelement))) throw XmlException(FALSE); - if (pScrollbarSubelement) { - pScrollbarSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nScrollbarThunmbHeight = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pScrollbarSubelement); - } - SAFERELEASE(pScrollbarColl); - } - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("border")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true")) || !_tcsicmp(OLE2T(strText), _T("regular"))) { - m_dwWindowBorder = BORDER_REGULAR; - } else if (!_tcsicmp(OLE2T(strText), _T("thin"))) { - m_dwWindowBorder = BORDER_THIN; - } else { - m_dwWindowBorder = BORDER_NONE; - } - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("inside_border")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_nInsideBorder = _ttoi(OLE2T(strText)); - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("taskbar_button")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("hide"))) { - m_dwTaskbarButton = TASKBAR_BUTTON_HIDE; - } else if (!_tcsicmp(OLE2T(strText), _T("tray"))) { - m_dwTaskbarButton = TASKBAR_BUTTON_TRAY; - } else { - m_dwTaskbarButton = TASKBAR_BUTTON_NORMAL; - } - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("size")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - - pAppearanaceSubelement->getAttribute(CComBSTR(_T("rows")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - if (_tcsicmp(OLE2T(varAttValue.bstrVal), _T("max")) == 0) { - m_dwRows = 0; - } else { - m_dwRows = _ttoi(OLE2T(varAttValue.bstrVal)); - } - } - - pAppearanaceSubelement->getAttribute(CComBSTR(_T("columns")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - if (_tcsicmp(OLE2T(varAttValue.bstrVal), _T("max")) == 0) { - m_dwColumns = 0; - } else { - m_dwColumns = _ttoi(OLE2T(varAttValue.bstrVal)); - } - } - - pAppearanaceSubelement->getAttribute(CComBSTR(_T("buffer_rows")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - m_dwBufferRows = _ttoi(OLE2T(varAttValue.bstrVal)); - m_bUseTextBuffer = TRUE; - } else { - m_dwBufferRows = m_dwRows; - } - } - SAFERELEASE(pAppearanaceSubelement); - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("transparency")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->getAttribute(CComBSTR(_T("alpha")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byAlpha = (BYTE)_ttoi(OLE2T(varAttValue.bstrVal)); - pAppearanaceSubelement->getAttribute(CComBSTR(_T("inactive_alpha")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byInactiveAlpha = (BYTE)_ttoi(OLE2T(varAttValue.bstrVal)); - - pAppearanaceSubelement->get_text(strText.Out()); - strTempText = OLE2T(strText); - - if (!_tcsicmp(strTempText.c_str(), _T("none"))) { - m_dwTransparency = TRANSPARENCY_NONE; - } else if (!_tcsicmp(strTempText.c_str(), _T("alpha"))) { - m_dwTransparency = TRANSPARENCY_ALPHA; - } else if (!_tcsicmp(strTempText.c_str(), _T("color key"))) { - m_dwTransparency = TRANSPARENCY_COLORKEY; - } else if (!_tcsicmp(strTempText.c_str(), _T("fake"))) { - m_dwTransparency = TRANSPARENCY_FAKE; - } - - } - SAFERELEASE(pAppearanaceSubelement); - - // get background settings - IXMLElementCollection* pBackgroundColl = NULL; - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("background")), CComVariant(0), (IDispatch**)&pBackgroundElement))) throw XmlException(FALSE); - if (pBackgroundElement) { - if (!SUCCEEDED(pBackgroundElement->get_children(&pBackgroundColl))) throw XmlException(FALSE); - - if (pBackgroundColl) { - IXMLElement* pBackgroundSubelement = NULL; - - if (!SUCCEEDED(pBackgroundColl->item(CComVariant(_T("color")), CComVariant(0), (IDispatch**)&pBackgroundSubelement))) throw XmlException(FALSE); - if (pBackgroundSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - pBackgroundSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - m_crBackground = RGB(r, g, b); - } - SAFERELEASE(pBackgroundSubelement); - - if (!SUCCEEDED(pBackgroundColl->item(CComVariant(_T("console_color")), CComVariant(0), (IDispatch**)&pBackgroundSubelement))) throw XmlException(FALSE); - if (pBackgroundSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - pBackgroundSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - m_crConsoleBackground = RGB(r, g, b); - } - SAFERELEASE(pBackgroundSubelement); - - if (!SUCCEEDED(pBackgroundColl->item(CComVariant(_T("tint")), CComVariant(0), (IDispatch**)&pBackgroundSubelement))) throw XmlException(FALSE); - if (pBackgroundSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - pBackgroundSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byTintR = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byTintG = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byTintB = _ttoi(OLE2T(varAttValue.bstrVal)); - pBackgroundSubelement->getAttribute(CComBSTR(_T("opacity")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) m_byTintOpacity = _ttoi(OLE2T(varAttValue.bstrVal)); - - if (m_byTintOpacity > 100) m_byTintOpacity = 50; - m_bTintSet = TRUE; - } - SAFERELEASE(pBackgroundSubelement); - - if (!SUCCEEDED(pBackgroundColl->item(CComVariant(_T("image")), CComVariant(0), (IDispatch**)&pBackgroundSubelement))) throw XmlException(FALSE); - if (pBackgroundSubelement) { - - pBackgroundSubelement->getAttribute(CComBSTR(_T("style")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - if (!_tcsicmp(OLE2T(varAttValue.bstrVal), _T("resize"))) { - m_dwBackgroundStyle = BACKGROUND_STYLE_RESIZE; - } else if (!_tcsicmp(OLE2T(varAttValue.bstrVal), _T("center"))) { - m_dwBackgroundStyle = BACKGROUND_STYLE_CENTER; - } else if (!_tcsicmp(OLE2T(varAttValue.bstrVal), _T("tile"))) { - m_dwBackgroundStyle = BACKGROUND_STYLE_TILE; - } - } - - pBackgroundSubelement->getAttribute(CComBSTR(_T("relative")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - if (!_tcsicmp(OLE2T(varAttValue.bstrVal), _T("true"))) { - m_bRelativeBackground = TRUE; - } else { - m_bRelativeBackground = FALSE; - } - } - - pBackgroundSubelement->getAttribute(CComBSTR(_T("extend")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) { - if (!_tcsicmp(OLE2T(varAttValue.bstrVal), _T("true"))) { - m_bExtendBackground = TRUE; - } else { - m_bExtendBackground = FALSE; - } - } - - pBackgroundSubelement->get_text(strText.Out()); - m_strBackgroundFile = OLE2T(strText); - m_bBitmapBackground = TRUE; - } - SAFERELEASE(pBackgroundSubelement); - } - SAFERELEASE(pBackgroundColl); - } - - IXMLElementCollection* pCursorColl = NULL; - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("cursor")), CComVariant(0), (IDispatch**)&pCursorElement))) throw XmlException(FALSE); - if (pCursorElement) { - if (!SUCCEEDED(pCursorElement->get_children(&pCursorColl))) throw XmlException(FALSE); - - if (pCursorColl) { - IXMLElement* pCursorSubelement = NULL; - - if (!SUCCEEDED(pCursorColl->item(CComVariant(_T("color")), CComVariant(0), (IDispatch**)&pCursorSubelement))) throw XmlException(FALSE); - if (pCursorSubelement) { - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - pCursorSubelement->getAttribute(CComBSTR(_T("r")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) r = _ttoi(OLE2T(varAttValue.bstrVal)); - pCursorSubelement->getAttribute(CComBSTR(_T("g")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) g = _ttoi(OLE2T(varAttValue.bstrVal)); - pCursorSubelement->getAttribute(CComBSTR(_T("b")), varAttValue.Out()); - if (varAttValue.vt == VT_BSTR) b = _ttoi(OLE2T(varAttValue.bstrVal)); - - m_crCursorColor = RGB(r, g, b); - } - SAFERELEASE(pCursorSubelement); - - if (!SUCCEEDED(pCursorColl->item(CComVariant(_T("style")), CComVariant(0), (IDispatch**)&pCursorSubelement))) throw XmlException(FALSE); - if (pCursorSubelement) { - pCursorSubelement->get_text(strText.Out()); - strTempText = OLE2T(strText); - - if (!_tcsicmp(strTempText.c_str(), _T("none"))) { - m_dwCursorStyle = CURSOR_STYLE_NONE; - } else if (!_tcsicmp(strTempText.c_str(), _T("XTerm"))) { - m_dwCursorStyle = CURSOR_STYLE_XTERM; - } else if (!_tcsicmp(strTempText.c_str(), _T("block"))) { - m_dwCursorStyle = CURSOR_STYLE_BLOCK; - } else if (!_tcsicmp(strTempText.c_str(), _T("noblink block"))) { - m_dwCursorStyle = CURSOR_STYLE_NBBLOCK; - } else if (!_tcsicmp(strTempText.c_str(), _T("pulse block"))) { - m_dwCursorStyle = CURSOR_STYLE_PULSEBLOCK; - } else if (!_tcsicmp(strTempText.c_str(), _T("bar"))) { - m_dwCursorStyle = CURSOR_STYLE_BAR; - } else if (!_tcsicmp(strTempText.c_str(), _T("console"))) { - m_dwCursorStyle = CURSOR_STYLE_CONSOLE; - } else if (!_tcsicmp(strTempText.c_str(), _T("noblink line"))) { - m_dwCursorStyle = CURSOR_STYLE_NBHLINE; - } else if (!_tcsicmp(strTempText.c_str(), _T("horizontal line"))) { - m_dwCursorStyle = CURSOR_STYLE_HLINE; - } else if (!_tcsicmp(strTempText.c_str(), _T("vertical line"))) { - m_dwCursorStyle = CURSOR_STYLE_VLINE; - } else if (!_tcsicmp(strTempText.c_str(), _T("rect"))) { - m_dwCursorStyle = CURSOR_STYLE_RECT; - } else if (!_tcsicmp(strTempText.c_str(), _T("noblink rect"))) { - m_dwCursorStyle = CURSOR_STYLE_NBRECT; - } else if (!_tcsicmp(strTempText.c_str(), _T("pulse rect"))) { - m_dwCursorStyle = CURSOR_STYLE_PULSERECT; - } else if (!_tcsicmp(strTempText.c_str(), _T("fading block"))) { - m_dwCursorStyle = CURSOR_STYLE_FADEBLOCK; - } - } - SAFERELEASE(pCursorSubelement); - } - SAFERELEASE(pCursorColl); - } - - if (!SUCCEEDED(pAppearanceColl->item(CComVariant(_T("icon")), CComVariant(0), (IDispatch**)&pAppearanaceSubelement))) throw XmlException(FALSE); - if (pAppearanaceSubelement) { - pAppearanaceSubelement->get_text(strText.Out()); - if (strText.Length() > 0) m_strIconFilename = OLE2T(strText); - } - SAFERELEASE(pAppearanaceSubelement); - - } - SAFERELEASE(pAppearanceColl); - } - - // get behaviour settings - IXMLElementCollection* pBehaviorColl = NULL; - if (!SUCCEEDED(pColl->item(CComVariant(_T("behaviour")), CComVariant(0), (IDispatch**)&pBehaviorElement))) { - if (!SUCCEEDED(pColl->item(CComVariant(_T("behavior")), CComVariant(0), (IDispatch**)&pBehaviorElement))) throw XmlException(FALSE); - } - - if (pBehaviorElement) { - if (!SUCCEEDED(pBehaviorElement->get_children(&pBehaviorColl))) throw XmlException(FALSE); - - if (pBehaviorColl) { - IXMLElement* pBehaviourSubelement = NULL; - - if (!SUCCEEDED(pBehaviorColl->item(CComVariant(_T("mouse_drag")), CComVariant(0), (IDispatch**)&pBehaviourSubelement))) throw XmlException(FALSE); - if (pBehaviourSubelement) { - pBehaviourSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bMouseDragable = TRUE; - } else { - m_bMouseDragable = FALSE; - } - } - SAFERELEASE(pBehaviourSubelement); - - if (!SUCCEEDED(pBehaviorColl->item(CComVariant(_T("copy_on_select")), CComVariant(0), (IDispatch**)&pBehaviourSubelement))) throw XmlException(FALSE); - if (pBehaviourSubelement) { - pBehaviourSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bCopyOnSelect = TRUE; - } else { - m_bCopyOnSelect = FALSE; - } - } - SAFERELEASE(pBehaviourSubelement); - - if (!SUCCEEDED(pBehaviorColl->item(CComVariant(_T("inverse_shift")), CComVariant(0), (IDispatch**)&pBehaviourSubelement))) throw XmlException(FALSE); - if (pBehaviourSubelement) { - pBehaviourSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bInverseShift = TRUE; - } else { - m_bInverseShift = FALSE; - } - } - SAFERELEASE(pBehaviourSubelement); - - if (!SUCCEEDED(pBehaviorColl->item(CComVariant(_T("reload_new_config")), CComVariant(0), (IDispatch**)&pBehaviourSubelement))) throw XmlException(FALSE); - if (pBehaviourSubelement) { - pBehaviourSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("yes"))) { - m_dwReloadNewConfig = RELOAD_NEW_CONFIG_YES; - } else if (!_tcsicmp(OLE2T(strText), _T("no"))) { - m_dwReloadNewConfig = RELOAD_NEW_CONFIG_NO; - } else { - m_dwReloadNewConfig = RELOAD_NEW_CONFIG_PROMPT; - } - } - SAFERELEASE(pBehaviourSubelement); - - if (!SUCCEEDED(pBehaviorColl->item(CComVariant(_T("disable_menu")), CComVariant(0), (IDispatch**)&pBehaviourSubelement))) throw XmlException(FALSE); - if (pBehaviourSubelement) { - pBehaviourSubelement->get_text(strText.Out()); - if (!_tcsicmp(OLE2T(strText), _T("true"))) { - m_bPopupMenuDisabled = TRUE; - } else { - m_bPopupMenuDisabled = FALSE; - } - } - SAFERELEASE(pBehaviourSubelement); - - } - SAFERELEASE(pBehaviorColl); - } - - bRet = TRUE; - - } catch (const XmlException& e) { - bRet = e.m_bRet; - } - - SAFERELEASE(pBehaviorElement); - SAFERELEASE(pCursorElement); - SAFERELEASE(pBackgroundElement); - SAFERELEASE(pScrollbarElement); - SAFERELEASE(pAppearanceElement); - SAFERELEASE(pPositionElement); - SAFERELEASE(pFontElement); - SAFERELEASE(pColl); - SAFERELEASE(pRootElement); - SAFERELEASE(pPersistStream); - SAFERELEASE(pConfigDoc); - SAFERELEASE(pFileStream); - - ::CoUninitialize(); - return bRet; -#endif return 1; } @@ -2175,284 +1253,12 @@ void Console::CreateOffscreenBuffers() { ///////////////////////////////////////////////////////////////////////////// -#if 0 -void Console::CreateBackgroundBitmap() { - - USES_CONVERSION; - - if (m_hbmpBackgroundOld) ::SelectObject(m_hdcBackground, m_hbmpBackgroundOld); - if (m_hbmpBackground) ::DeleteObject(m_hbmpBackground); - if (m_hdcBackground) ::DeleteDC(m_hdcBackground); - - if (!m_bBitmapBackground) return; - - // determine the total size of the background bitmap - DWORD dwPrimaryDisplayWidth = ::GetSystemMetrics(SM_CXSCREEN); - DWORD dwPrimaryDisplayHeight = ::GetSystemMetrics(SM_CYSCREEN); - - DWORD dwBackgroundWidth = 0; - DWORD dwBackgroundHeight = 0; - - if (m_bRelativeBackground) { - - if (g_bWin2000) { - // Win2K and later can handle multiple monitors - dwBackgroundWidth = ::GetSystemMetrics(SM_CXVIRTUALSCREEN); - dwBackgroundHeight = ::GetSystemMetrics(SM_CYVIRTUALSCREEN); - - // get offsets for virtual display - m_nBackgroundOffsetX = ::GetSystemMetrics(SM_XVIRTUALSCREEN); - m_nBackgroundOffsetY = ::GetSystemMetrics(SM_YVIRTUALSCREEN); - } else { - // WinNT compatibility (hope it works, I didn't test it) - dwBackgroundWidth = dwPrimaryDisplayWidth; - dwBackgroundHeight = dwBackgroundHeight; - } - - } else { - dwBackgroundWidth = m_nClientWidth; - dwBackgroundHeight = m_nClientHeight; - } - - // now, load the image... - fipImage image; - IMAGE_DATA imageData; - - if (!image.load(T2A(m_strBackgroundFile.c_str()))) { - m_bBitmapBackground = FALSE; - return; - } - - imageData.hdcImage = NULL; - imageData.dwImageWidth = image.getWidth(); - imageData.dwImageHeight = image.getHeight(); - - image.convertTo24Bits(); - - // ... if needed, tint the background image - if (m_bTintSet) { - - BYTE* pPixels = image.accessPixels(); - BYTE* pPixelsEnd = pPixels + 3*image.getWidth()*image.getHeight(); - BYTE* pPixelSubel = pPixels; - - while (pPixelSubel < pPixelsEnd) { - - *pPixelSubel = (BYTE) ((unsigned long)(*pPixelSubel * (100 - m_byTintOpacity) + m_byTintB*m_byTintOpacity)/100); - ++pPixelSubel; - *pPixelSubel = (BYTE) ((unsigned long)(*pPixelSubel * (100 - m_byTintOpacity) + m_byTintG*m_byTintOpacity)/100); - ++pPixelSubel; - *pPixelSubel = (BYTE) ((unsigned long)(*pPixelSubel * (100 - m_byTintOpacity) + m_byTintR*m_byTintOpacity)/100); - ++pPixelSubel; - } - } - - // create the basic image - HBITMAP hbmpImage = NULL; - HBITMAP hbmpImageOld = NULL; - - if (m_dwBackgroundStyle == BACKGROUND_STYLE_RESIZE) { - - if (m_bRelativeBackground) { - if (m_bExtendBackground) { - imageData.dwImageWidth = dwBackgroundWidth; - imageData.dwImageHeight = dwBackgroundHeight; - } else { - imageData.dwImageWidth = dwPrimaryDisplayWidth; - imageData.dwImageHeight = dwPrimaryDisplayHeight; - } - } else { - imageData.dwImageWidth = (DWORD)m_nClientWidth; - imageData.dwImageHeight = (DWORD)m_nClientHeight; - } - - if ((image.getWidth() != imageData.dwImageWidth) || (image.getHeight() != imageData.dwImageHeight)) { - image.rescale(imageData.dwImageWidth, imageData.dwImageHeight, FILTER_LANCZOS3); - } - } - - - // now, create a DC compatible with the screen and create the basic bitmap - HDC hdcDesktop = ::GetDCEx(m_hWnd, NULL, 0); - imageData.hdcImage = ::CreateCompatibleDC(hdcDesktop); - hbmpImage = ::CreateDIBitmap( - hdcDesktop, - image.getInfoHeader(), - CBM_INIT, - image.accessPixels(), - image.getInfo(), - DIB_RGB_COLORS); - hbmpImageOld= (HBITMAP)::SelectObject(imageData.hdcImage, hbmpImage); - ::ReleaseDC(m_hWnd, hdcDesktop); - - // create the background image - m_hdcBackground = ::CreateCompatibleDC(imageData.hdcImage); - m_hbmpBackground = ::CreateCompatibleBitmap(imageData.hdcImage, dwBackgroundWidth, dwBackgroundHeight); - m_hbmpBackgroundOld = (HBITMAP)::SelectObject(m_hdcBackground, m_hbmpBackground); - - RECT rectBackground; - rectBackground.left = 0; - rectBackground.top = 0; - rectBackground.right = dwBackgroundWidth; - rectBackground.bottom = dwBackgroundHeight; - - // fill the background with the proper background color in case the - // bitmap doesn't cover the entire background, - COLORREF crBackground; - - if (m_dwTransparency == TRANSPARENCY_FAKE) { - // get desktop background color - HKEY hkeyColors; - if (::RegOpenKeyEx(HKEY_CURRENT_USER, _T("Control Panel\\Colors"), 0, KEY_READ, &hkeyColors) == ERROR_SUCCESS) { - - TCHAR szData[MAX_PATH]; - DWORD dwDataSize = MAX_PATH; - - BYTE r = 0; - BYTE g = 0; - BYTE b = 0; - - ::ZeroMemory(szData, sizeof(szData)); - ::RegQueryValueEx(hkeyColors, _T("Background"), NULL, NULL, (BYTE*)szData, &dwDataSize); - - _stscanf(szData, _T("%i %i %i"), &r, &g, &b); - crBackground = RGB(r, g, b); - - ::RegCloseKey(hkeyColors); - } - } else { - ::CopyMemory(&crBackground, &m_crBackground, sizeof(COLORREF)); - } - - HBRUSH hBkBrush = ::CreateSolidBrush(crBackground); - ::FillRect(m_hdcBackground, &rectBackground, hBkBrush); - ::DeleteObject(hBkBrush); - - if (m_dwBackgroundStyle == BACKGROUND_STYLE_TILE) { - - // we're tiling the image, starting at coordinates (0, 0) of the virtual screen - DWORD dwX = 0; - DWORD dwY = 0; - - DWORD dwImageOffsetX = 0; - DWORD dwImageOffsetY = imageData.dwImageHeight + (m_nBackgroundOffsetY - (int)imageData.dwImageHeight*(m_nBackgroundOffsetY/(int)imageData.dwImageHeight)); - - while (dwY < dwBackgroundHeight) { - - dwX = 0; - dwImageOffsetX = imageData.dwImageWidth + (m_nBackgroundOffsetX - (int)imageData.dwImageWidth*(m_nBackgroundOffsetX/(int)imageData.dwImageWidth)); - - while (dwX < dwBackgroundWidth) { - - ::BitBlt( - m_hdcBackground, - dwX, - dwY, - imageData.dwImageWidth, - imageData.dwImageHeight, - imageData.hdcImage, - dwImageOffsetX, - dwImageOffsetY, - SRCCOPY); - - dwX += imageData.dwImageWidth - dwImageOffsetX; - dwImageOffsetX = 0; - } - - dwY += imageData.dwImageHeight - dwImageOffsetY; - dwImageOffsetY = 0; - } - - } else if (m_bExtendBackground || !m_bRelativeBackground) { - - switch (m_dwBackgroundStyle) { - case BACKGROUND_STYLE_RESIZE : - ::BitBlt( - m_hdcBackground, - 0, - 0, - dwBackgroundWidth, - dwBackgroundHeight, - imageData.hdcImage, - 0, - 0, - SRCCOPY); - break; - - case BACKGROUND_STYLE_CENTER : - ::BitBlt( - m_hdcBackground, - (dwBackgroundWidth <= imageData.dwImageWidth) ? 0 : (dwBackgroundWidth - imageData.dwImageWidth)/2, - (dwBackgroundHeight <= imageData.dwImageHeight) ? 0 : (dwBackgroundHeight - imageData.dwImageHeight)/2, - imageData.dwImageWidth, - imageData.dwImageHeight, - imageData.hdcImage, - (dwBackgroundWidth < imageData.dwImageWidth) ? (imageData.dwImageWidth - dwBackgroundWidth)/2 : 0, - (dwBackgroundHeight < imageData.dwImageHeight) ? (imageData.dwImageHeight - dwBackgroundHeight)/2 : 0, - SRCCOPY); - break; - } - } else { - ::EnumDisplayMonitors(NULL, NULL, Console::BackgroundEnumProc, (DWORD)&imageData); - } - - ::SelectObject(imageData.hdcImage, hbmpImageOld); - ::DeleteObject(hbmpImage); - ::DeleteDC(imageData.hdcImage); -} -#endif ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -#if 0 -BOOL CALLBACK Console::BackgroundEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) { - - IMAGE_DATA* pImageData = (IMAGE_DATA*)dwData; - - DWORD dwDisplayWidth = lprcMonitor->right - lprcMonitor->left; - DWORD dwDisplayHeight = lprcMonitor->bottom - lprcMonitor->top; - - DWORD dwPrimaryDisplayWidth = ::GetSystemMetrics(SM_CXSCREEN); - DWORD dwPrimaryDisplayHeight = ::GetSystemMetrics(SM_CYSCREEN); - - // center the image according to current display's size and position - switch (g_pConsole->m_dwBackgroundStyle) { - - case BACKGROUND_STYLE_RESIZE : - ::BitBlt( - g_pConsole->m_hdcBackground, - (dwDisplayWidth <= dwPrimaryDisplayWidth) ? lprcMonitor->left-g_pConsole->m_nBackgroundOffsetX : lprcMonitor->left-g_pConsole->m_nBackgroundOffsetX + (dwDisplayWidth - dwPrimaryDisplayWidth)/2, - (dwDisplayHeight <= dwPrimaryDisplayHeight) ? lprcMonitor->top-g_pConsole->m_nBackgroundOffsetY : lprcMonitor->top-g_pConsole->m_nBackgroundOffsetY + (dwDisplayHeight - dwPrimaryDisplayHeight)/2, - dwDisplayWidth, - dwDisplayHeight, - pImageData->hdcImage, - (dwDisplayWidth < dwPrimaryDisplayWidth) ? (dwPrimaryDisplayWidth - dwDisplayWidth)/2 : 0, - (dwDisplayHeight < dwPrimaryDisplayHeight) ? (dwPrimaryDisplayHeight - dwDisplayHeight)/2 : 0, - SRCCOPY); - - break; - - case BACKGROUND_STYLE_CENTER : - ::BitBlt( - g_pConsole->m_hdcBackground, - (dwDisplayWidth <= pImageData->dwImageWidth) ? lprcMonitor->left-g_pConsole->m_nBackgroundOffsetX : lprcMonitor->left-g_pConsole->m_nBackgroundOffsetX + (dwDisplayWidth - pImageData->dwImageWidth)/2, - (dwDisplayHeight <= pImageData->dwImageHeight) ? lprcMonitor->top-g_pConsole->m_nBackgroundOffsetY : lprcMonitor->top-g_pConsole->m_nBackgroundOffsetY + (dwDisplayHeight - pImageData->dwImageHeight)/2, - dwDisplayWidth, - dwDisplayHeight, - pImageData->hdcImage, - (dwDisplayWidth < pImageData->dwImageWidth) ? (pImageData->dwImageWidth - dwDisplayWidth)/2 : 0, - (dwDisplayHeight < pImageData->dwImageHeight) ? (pImageData->dwImageHeight - dwDisplayHeight)/2 : 0, - SRCCOPY); - - break; - } - - return TRUE; -} -#endif ///////////////////////////////////////////////////////////////////////////// @@ -2543,63 +1349,6 @@ void Console::CalcWindowSize() { ///////////////////////////////////////////////////////////////////////////// -#if 0 -void Console::SetWindowTransparency() { - // set alpha transparency (Win2000 and later only!) - if (g_bWin2000 && ((m_dwTransparency == TRANSPARENCY_ALPHA) || (m_dwTransparency == TRANSPARENCY_COLORKEY))) { - - ::SetWindowLong(m_hWnd, GWL_EXSTYLE, ::GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED); - g_pfnSetLayeredWndAttr(m_hWnd, m_crBackground, m_byAlpha, m_dwTransparency == TRANSPARENCY_ALPHA ? LWA_ALPHA : LWA_COLORKEY); - - } else if (m_dwTransparency == TRANSPARENCY_FAKE) { - // get wallpaper settings - HKEY hkeyDesktop; - if (::RegOpenKeyEx(HKEY_CURRENT_USER, _T("Control Panel\\Desktop"), 0, KEY_READ, &hkeyDesktop) == ERROR_SUCCESS) { - TCHAR szData[MAX_PATH]; - DWORD dwDataSize = MAX_PATH; - - DWORD dwWallpaperStyle; - DWORD dwTileWallpaper; - - ::ZeroMemory(szData, sizeof(szData)); - ::RegQueryValueEx(hkeyDesktop, _T("Wallpaper"), NULL, NULL, (BYTE*)szData, &dwDataSize); - - if (_tcslen(szData) > 0) { - m_bBitmapBackground = TRUE; - m_strBackgroundFile = szData; - m_bRelativeBackground = TRUE; - m_bExtendBackground = FALSE; - - // get wallpaper style and tile flag - dwDataSize = MAX_PATH; - ::ZeroMemory(szData, sizeof(szData)); - ::RegQueryValueEx(hkeyDesktop, _T("WallpaperStyle"), NULL, NULL, (BYTE*)szData, &dwDataSize); - - dwWallpaperStyle = _ttoi(szData); - - dwDataSize = MAX_PATH; - ::ZeroMemory(szData, sizeof(szData)); - ::RegQueryValueEx(hkeyDesktop, _T("TileWallpaper"), NULL, NULL, (BYTE*)szData, &dwDataSize); - - dwTileWallpaper = _ttoi(szData); - - if (dwTileWallpaper == 1) { - m_dwBackgroundStyle = BACKGROUND_STYLE_TILE; - } else { - - if (dwWallpaperStyle == 0) { - m_dwBackgroundStyle = BACKGROUND_STYLE_CENTER; - } else { - m_dwBackgroundStyle = BACKGROUND_STYLE_RESIZE; - } - } - } - - ::RegCloseKey(hkeyDesktop); - } - } -} -#endif ///////////////////////////////////////////////////////////////////////////// @@ -2660,17 +1409,10 @@ void Console::SetDefaultConsoleColors() { void Console::SetWindowSizeAndPosition() { // set window position -#if 0 - DWORD dwScreenWidth = ::GetSystemMetrics(g_bWin2000 ? SM_CXVIRTUALSCREEN : SM_CXSCREEN); - DWORD dwScreenHeight = ::GetSystemMetrics(g_bWin2000 ? SM_CYVIRTUALSCREEN : SM_CYSCREEN); - DWORD dwTop = ::GetSystemMetrics(g_bWin2000 ? SM_YVIRTUALSCREEN : 0); - DWORD dwLeft = ::GetSystemMetrics(g_bWin2000 ? SM_XVIRTUALSCREEN : 0); -#else DWORD dwScreenWidth = ::GetSystemMetrics(SM_CXSCREEN); DWORD dwScreenHeight = ::GetSystemMetrics(SM_CYSCREEN); DWORD dwTop = ::GetSystemMetrics(0); DWORD dwLeft = ::GetSystemMetrics(0); -#endif switch (m_dwDocked) { case DOCK_TOP_LEFT: @@ -2985,79 +1727,12 @@ void Console::ReloadSettings() { BOOL Console::StartShellProcess() { -#if 0 - if (m_strShell.length() == 0) { - TCHAR szComspec[MAX_PATH]; - - if (::GetEnvironmentVariable(_T("COMSPEC"), szComspec, MAX_PATH) > 0) { - m_strShell = szComspec; - } else { - m_strShell = _T("cmd.exe"); - } - } - - tstring strShellCmdLine(m_strShell); - if (m_strShellCmdLine.length() > 0) { - strShellCmdLine += _T(" "); - strShellCmdLine += m_strShellCmdLine; - } - -// strShellCmdLine = "cmd.exe"; - - // create the console window - TCHAR szConsoleTitle[MAX_PATH]; - ::AllocConsole(); - // we use this to avoid possible problems with multiple console instances running - _stprintf(szConsoleTitle, _T("%i"), ::GetCurrentThreadId()); - ::SetConsoleTitle(szConsoleTitle); - m_hStdOut = ::GetStdHandle(STD_OUTPUT_HANDLE); - while ((m_hWndConsole = ::FindWindow(NULL, szConsoleTitle)) == NULL) ::Sleep(50); - ::SetConsoleTitle(m_strWinConsoleTitle.c_str()); -#endif // this is a little hack needed to support columns greater than standard 80 RefreshStdOut(); InitConsoleWndSize(80); ResizeConsoleWindow(); -#if 0 - ::SetConsoleCtrlHandler(Console::CtrlHandler, TRUE); - - // setup the start up info struct - PROCESS_INFORMATION pi; - STARTUPINFO si; - ::ZeroMemory(&si, sizeof(STARTUPINFO)); - si.cb = sizeof(STARTUPINFO); - - if (!::CreateProcess( - NULL, - (TCHAR*)strShellCmdLine.c_str(), - NULL, - NULL, - TRUE, - 0, - NULL, - NULL, - &si, - &pi)) { - - return FALSE; - } - - if (m_dwHideConsoleTimeout > 0) { - ::ShowWindow(m_hWndConsole, SW_MINIMIZE); - ::SetTimer(m_hWnd, TIMER_SHOW_HIDE_CONSOLE, m_dwHideConsoleTimeout, NULL); - } else { - ShowHideConsole(); - } - - // close main thread handle - ::CloseHandle(pi.hThread); - - // set handles - m_hQuitEvent = ::CreateEvent(NULL, FALSE, FALSE, NULL); - m_hConsoleProcess = pi.hProcess; -#endif return TRUE; } @@ -3068,10 +1743,6 @@ BOOL Console::StartShellProcess() { ///////////////////////////////////////////////////////////////////////////// void Console::RefreshStdOut() { -#if 0 - if (m_hStdOutFresh) ::CloseHandle(m_hStdOutFresh); - m_hStdOutFresh = ::CreateFile(_T("CONOUT$"), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -3091,73 +1762,6 @@ void Console::RefreshScreenBuffer() { si.nPos = (int)m_csbiConsole.srWindow.Top; ::FlatSB_SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE); -#if 0 - if ((m_csbiConsole.srWindow.Right - m_csbiConsole.srWindow.Left + 1 != m_dwColumns) || (m_csbiConsole.srWindow.Bottom - m_csbiConsole.srWindow.Top + 1 != m_dwRows) || (m_csbiConsole.dwSize.Y != m_dwBufferRows)) { - m_dwColumns = m_csbiConsole.srWindow.Right - m_csbiConsole.srWindow.Left + 1; - m_dwRows = m_csbiConsole.srWindow.Bottom - m_csbiConsole.srWindow.Top + 1; - ResizeConsoleWindow(); - } - - COORD coordBufferSize; - COORD coordStart; - SMALL_RECT srRegion; - - coordStart.X = 0; - coordStart.Y = 0; - - coordBufferSize.X = m_dwColumns; - coordBufferSize.Y = m_dwRows; - - srRegion.Top = m_csbiConsole.srWindow.Top; - srRegion.Left = 0; - srRegion.Bottom = m_csbiConsole.srWindow.Top + m_dwRows - 1; - srRegion.Right = m_dwColumns - 1; - - DEL_ARR(m_pScreenBufferNew); - m_pScreenBufferNew = new CHAR_INFO[m_dwRows * m_dwColumns]; - ::ZeroMemory( m_pScreenBufferNew, m_dwRows * m_dwColumns * sizeof(CHAR_INFO)); - for (int i=0; i (DWORD) dwColumns * m_dwBufferRows) { - ::SetConsoleWindowInfo(m_hStdOutFresh, TRUE, &srConsoleRect); - ::SetConsoleScreenBufferSize(m_hStdOutFresh, coordConsoleSize); - } else if (((DWORD)csbi.dwSize.X < dwColumns) || ((DWORD)csbi.dwSize.Y < m_dwBufferRows) || ((DWORD)(csbi.srWindow.Bottom - csbi.srWindow.Top + 1) != m_dwRows)) { - ::SetConsoleScreenBufferSize(m_hStdOutFresh, coordConsoleSize); - ::SetConsoleWindowInfo(m_hStdOutFresh, TRUE, &srConsoleRect); - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -3235,28 +1827,6 @@ void Console::ResizeConsoleWindow() { // srConsoleRect.Right = m_dwColumns - 1; // srConsoleRect.Bottom= m_dwRows - 1; -#if 0 - // order of setting window size and screen buffer size depends on current and desired dimensions - if ((DWORD) csbi.dwSize.X * csbi.dwSize.Y > (DWORD) m_dwColumns * m_dwBufferRows) { - - if (m_bUseTextBuffer && (csbi.dwSize.Y > m_dwBufferRows)) { - coordBuffersSize.Y = m_dwBufferRows = csbi.dwSize.Y; - } - - ::SetConsoleWindowInfo(m_hStdOutFresh, TRUE, &srConsoleRect); - ::SetConsoleScreenBufferSize(m_hStdOutFresh, coordBuffersSize); - - // } else if (((DWORD)csbi.dwSize.X < m_dwColumns) || ((DWORD)csbi.dwSize.Y < m_dwBufferRows) || ((DWORD)(csbi.srWindow.Bottom - csbi.srWindow.Top + 1) != m_dwRows)) { - } else if ((DWORD) csbi.dwSize.X * csbi.dwSize.Y < (DWORD) m_dwColumns * m_dwBufferRows) { - - if (csbi.dwSize.Y < m_dwBufferRows) { - m_dwBufferRows = coordBuffersSize.Y = csbi.dwSize.Y; - } - - ::SetConsoleScreenBufferSize(m_hStdOutFresh, coordBuffersSize); - ::SetConsoleWindowInfo(m_hStdOutFresh, TRUE, &srConsoleRect); - } -#endif SetScrollbarStuff(); CalcWindowSize(); @@ -3290,15 +1860,6 @@ void Console::RepaintWindow() { rect.bottom = m_nClientHeight; rect.right = m_nClientWidth; -#if 0 - if (m_bBitmapBackground) { - if (m_bRelativeBackground) { - ::BitBlt(m_hdcConsole, 0, 0, m_nClientWidth, m_nClientHeight, m_hdcBackground, m_nX+m_nXBorderSize-m_nBackgroundOffsetX, m_nY+m_nCaptionSize+m_nYBorderSize-m_nBackgroundOffsetY, SRCCOPY); - } else { - ::BitBlt(m_hdcConsole, 0, 0, m_nClientWidth, m_nClientHeight, m_hdcBackground, 0, 0, SRCCOPY); - } - } else { -#endif ::FillRect(m_hdcConsole, &rect, m_hBkBrush); // } @@ -3473,15 +2034,6 @@ void Console::RepaintWindowChanges() { rect.bottom = dwY + m_nCharHeight; rect.right = dwX + m_nCharWidth; -#if 0 - if (m_bBitmapBackground) { - if (m_bRelativeBackground) { - ::BitBlt(m_hdcConsole, dwX, dwY, m_nCharWidth, m_nCharHeight, m_hdcBackground, m_nX+m_nXBorderSize-m_nBackgroundOffsetX+(int)dwX, m_nY+m_nCaptionSize+m_nYBorderSize-m_nBackgroundOffsetY+(int)dwY, SRCCOPY); - } else { - ::BitBlt(m_hdcConsole, dwX, dwY, m_nCharWidth, m_nCharHeight, m_hdcBackground, dwX, dwY, SRCCOPY); - } - } else { -#endif ::FillRect(m_hdcConsole, &rect, m_hBkBrush); // } @@ -3520,15 +2072,6 @@ void Console::RepaintWindowChanges() { rect.bottom = m_nClientHeight; rect.right = m_nClientWidth; -#if 0 - if (m_bBitmapBackground) { - if (m_bRelativeBackground) { - ::BitBlt(m_hdcConsole, 0, 0, m_nClientWidth, m_nClientHeight, m_hdcBackground, m_nX+m_nXBorderSize-m_nBackgroundOffsetX, m_nY+m_nCaptionSize+m_nYBorderSize-m_nBackgroundOffsetY, SRCCOPY); - } else { - ::BitBlt(m_hdcConsole, 0, 0, m_nClientWidth, m_nClientHeight, m_hdcBackground, 0, 0, SRCCOPY); - } - } else { -#endif ::FillRect(m_hdcConsole, &rect, m_hBkBrush); // } @@ -3579,27 +2122,9 @@ void Console::DrawCursor(BOOL bOnlyCursor) { ::InvalidateRect(m_hWnd, &rectCursorOld, FALSE); } -#if 0 - // now, see if the cursor is visible... - CONSOLE_CURSOR_INFO cinf; - ::GetConsoleCursorInfo(m_hStdOutFresh, &cinf); - - m_bCursorVisible = cinf.bVisible; -#endif // ... and draw it if (m_bCursorVisible) { -#if 0 - ::GetConsoleScreenBufferInfo(m_hStdOutFresh, &m_csbiCursor); - - if (m_csbiCursor.dwCursorPosition.Y < m_csbiCursor.srWindow.Top || m_csbiCursor.dwCursorPosition.Y > m_csbiCursor.srWindow.Bottom) { - m_bCursorVisible = FALSE; - return; - } - - // set proper cursor offset - m_csbiCursor.dwCursorPosition.Y -= m_csbiCursor.srWindow.Top; -#endif RECT rectCursor; if (!bOnlyCursor) { @@ -3634,7 +2159,7 @@ inline void Console::GetCursorRect(RECT& rectCursor) { // variable pitch, we do a little joggling here :-) RECT rectLine; int nLastCharWidth; - auto_ptr pszLine(new wchar_t[m_csbiCursor.dwCursorPosition.X + 2]); + std::unique_ptr pszLine(new wchar_t[m_csbiCursor.dwCursorPosition.X + 2]); ::ZeroMemory(pszLine.get(), (m_csbiCursor.dwCursorPosition.X + 2)*sizeof(wchar_t)); for (short i = 0; i <= m_csbiCursor.dwCursorPosition.X; ++i) pszLine.get()[i] = m_pScreenBuffer[m_csbiCursor.dwCursorPosition.Y * m_dwColumns + i].Char.UnicodeChar; @@ -3696,33 +2221,6 @@ inline void Console::DrawCursorBackground(RECT& rectCursor) { ::SetTextColor(m_hdcConsole, m_bUseFontColor ? m_crFontColor : m_arrConsoleColors[m_pScreenBuffer[dwOffset].Attributes & 0xF]); -#if 0 - if (m_bBitmapBackground) { - if (m_bRelativeBackground) { - ::BitBlt( - m_hdcConsole, - rectCursor.left, - rectCursor.top, - rectCursor.right - rectCursor.left, - rectCursor.bottom - rectCursor.top, - m_hdcBackground, - m_nX+m_nXBorderSize-m_nBackgroundOffsetX + rectCursor.left, - m_nY+m_nCaptionSize+m_nYBorderSize-m_nBackgroundOffsetY + rectCursor.top, - SRCCOPY); - - } else { - ::BitBlt( - m_hdcConsole, - rectCursor.left, - rectCursor.top, - rectCursor.right - rectCursor.left, - rectCursor.bottom - rectCursor.top, - m_hdcBackground, - rectCursor.left, - rectCursor.top, SRCCOPY); - } - } else { -#endif ::FillRect(m_hdcConsole, &rectCursor, m_hBkBrush); // } @@ -3791,13 +2289,6 @@ void Console::ShowHideConsole() { ///////////////////////////////////////////////////////////////////////////// -#if 0 -void Console::ShowHideConsoleTimeout() { - - ::KillTimer(m_hWnd, TIMER_SHOW_HIDE_CONSOLE); - ShowHideConsole(); -} -#endif ///////////////////////////////////////////////////////////////////////////// @@ -3860,24 +2351,6 @@ BOOL Console::HandleMenuCommand(DWORD dwID) { PasteClipoardText(); return FALSE; -#if 0 - case ID_HIDE_CONSOLE: - m_bHideConsole = !m_bHideConsole; - ShowHideConsole(); - return FALSE; - - case ID_EDIT_CONFIG_FILE: - EditConfigFile(); - return FALSE; - - case ID_RELOAD_SETTINGS: - ReloadSettings(); - return FALSE; - - case ID_TOGGLE_ONTOP: - ToggleWindowOnTop(); - return FALSE; -#endif case ID_EXIT_CONSOLE: ::SendMessage(m_hWnd, WM_CLOSE, 0, 0); @@ -3893,32 +2366,6 @@ BOOL Console::HandleMenuCommand(DWORD dwID) { return TRUE; } -#if 0 - // check if it's one of config file submenu items - if ((dwID >= ID_FIRST_XML_FILE) && - (dwID <= ID_LAST_XML_FILE)) { - - TCHAR szFilename[MAX_PATH]; - ::ZeroMemory(szFilename, sizeof(szFilename)); - ::GetMenuString(m_hConfigFilesMenu, dwID, szFilename, MAX_PATH, MF_BYCOMMAND); - m_strConfigFile = tstring(szFilename); - - if (m_dwReloadNewConfig == RELOAD_NEW_CONFIG_PROMPT) { - if (::MessageBox( - m_hWndConsole, - _T("Load new settings?"), - _T("New configuration selected"), - MB_YESNO|MB_ICONQUESTION) == IDYES) { - - ReloadSettings(); - } - } else if (m_dwReloadNewConfig == RELOAD_NEW_CONFIG_YES) { - ReloadSettings(); - } - - return FALSE; - } -#endif return TRUE; } @@ -3930,10 +2377,6 @@ BOOL Console::HandleMenuCommand(DWORD dwID) { void Console::UpdateOnTopMenuItem() { -#if 0 - ::CheckMenuItem(::GetSubMenu(m_hPopupMenu, 0), ID_TOGGLE_ONTOP, MF_BYCOMMAND | ((m_dwCurrentZOrder == Z_ORDER_ONTOP) ? MF_CHECKED : MF_UNCHECKED)); - ::CheckMenuItem(m_hSysMenu, ID_TOGGLE_ONTOP, MF_BYCOMMAND | ((m_dwCurrentZOrder == Z_ORDER_ONTOP) ? MF_CHECKED : MF_UNCHECKED)); -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -3943,10 +2386,6 @@ void Console::UpdateOnTopMenuItem() { void Console::UpdateHideConsoleMenuItem() { -#if 0 - ::CheckMenuItem(::GetSubMenu(m_hPopupMenu, 0), ID_HIDE_CONSOLE, MF_BYCOMMAND | (m_bHideConsole ? MF_CHECKED : MF_UNCHECKED)); - ::CheckMenuItem(m_hSysMenu, ID_HIDE_CONSOLE, MF_BYCOMMAND | (m_bHideConsole ? MF_CHECKED : MF_UNCHECKED)); -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -3956,55 +2395,6 @@ void Console::UpdateHideConsoleMenuItem() { void Console::UpdateConfigFilesSubmenu() { -#if 0 - // populate m_hConfigFilesMenu - - // first, delete old items - while (::GetMenuItemCount(m_hConfigFilesMenu) != 0) ::DeleteMenu(m_hConfigFilesMenu, 0, MF_BYPOSITION); - - // then, enumerate the files - WIN32_FIND_DATA wfd; - HANDLE hWfd = NULL; - BOOL bMoreFiles = TRUE; - DWORD dwID = ID_FIRST_XML_FILE; - - ::ZeroMemory(&wfd, sizeof(WIN32_FIND_DATA)); - - // create the search mask... - int nBackslashPos = m_strConfigFile.rfind(_TCHAR('\\')); - tstring strConfigFileDir(m_strConfigFile.substr(0, nBackslashPos+1)); - tstring strSearchFileMask(strConfigFileDir + tstring(_T("*.xml"))); - - // ... and enumearate files - hWfd = ::FindFirstFile(strSearchFileMask.c_str(), &wfd); - while ((hWfd != INVALID_HANDLE_VALUE) && bMoreFiles) { - - MENUITEMINFO mii; - TCHAR szFilename[MAX_PATH]; - - _sntprintf(szFilename, MAX_PATH, _T("%s"), (strConfigFileDir + tstring(wfd.cFileName)).c_str()); - - ::ZeroMemory(&mii, sizeof(MENUITEMINFO)); - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - mii.fType = MFT_RADIOCHECK | MFT_STRING; - mii.wID = dwID++; - mii.dwTypeData = szFilename; - mii.cch = _tcslen(wfd.cFileName); - - if (_tcsicmp(szFilename, m_strConfigFile.c_str()) == 0) { - mii.fState = MFS_CHECKED; - } else { - mii.fState = MFS_UNCHECKED; - } - - ::InsertMenuItem(m_hConfigFilesMenu, dwID-ID_FIRST_XML_FILE, TRUE, &mii); - - bMoreFiles = ::FindNextFile(hWfd, &wfd); - } - - ::FindClose(hWfd); -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -4229,29 +2619,6 @@ void Console::SendTextToConsole(const wchar_t *pszText) m_pCursor->SetState(c_state); } -#if 0 - HANDLE hStdIn = ::CreateFile(_T("CONIN$"), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - - DWORD dwTextLen = _tcslen(pszText); - DWORD dwTextWritten = 0; - - INPUT_RECORD* pKeyEvents = new INPUT_RECORD[dwTextLen]; - ::ZeroMemory(pKeyEvents, sizeof(INPUT_RECORD)*dwTextLen); - - for (DWORD i = 0; i < dwTextLen; ++i) { - pKeyEvents[i].EventType = KEY_EVENT; - pKeyEvents[i].Event.KeyEvent.bKeyDown = TRUE; - pKeyEvents[i].Event.KeyEvent.wRepeatCount = 1; - pKeyEvents[i].Event.KeyEvent.wVirtualKeyCode = 0; - pKeyEvents[i].Event.KeyEvent.wVirtualScanCode = 0; - pKeyEvents[i].Event.KeyEvent.uChar.UnicodeChar = pszText[i]; - pKeyEvents[i].Event.KeyEvent.dwControlKeyState = 0; - } - ::WriteConsoleInput(hStdIn, pKeyEvents, dwTextLen, &dwTextWritten); - - DEL_ARR(pKeyEvents); - ::CloseHandle(hStdIn); -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -4293,42 +2660,6 @@ void Console::GetDesktopRect(RECT& rectDesktop) { rectDesktop.bottom = rectDesktop.top + ::GetSystemMetrics(SM_CYVIRTUALSCREEN); } -#if 0 -} else { - // we keep this for WinNT compatibility - - rectDesktop.left= 0; - rectDesktop.top = 0; - rectDesktop.right = ::GetSystemMetrics(SM_CXSCREEN); - rectDesktop.bottom = ::GetSystemMetrics(SM_CYSCREEN); - - RECT rectTaskbar = {0, 0, 0, 0}; - HWND hWndTaskbar = ::FindWindow(_T("Shell_TrayWnd"), _T("")); - - - if (hWndTaskbar) { - - ::GetWindowRect(hWndTaskbar, &rectTaskbar); - - if ((rectTaskbar.top <= rectDesktop.top) && (rectTaskbar.left <= rectDesktop.left) && (rectTaskbar.right >= rectDesktop.right)) { - // top taskbar - rectDesktop.top += rectTaskbar.bottom; - - } else if ((rectTaskbar.top > rectDesktop.top) && (rectTaskbar.left <= rectDesktop.left)) { - // bottom taskbar - rectDesktop.bottom = rectTaskbar.top; - - } else if ((rectTaskbar.top <= rectDesktop.top) && (rectTaskbar.left > rectDesktop.left)) { - // right taskbar - rectDesktop.right = rectTaskbar.left; - - } else { - // left taskbar - rectDesktop.left += rectTaskbar.right; - } - } - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -4416,22 +2747,6 @@ LRESULT CALLBACK Console::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM myself->OnActivateApp((BOOL)wParam, (DWORD)lParam); return 0; -#if 0 - case WM_SYSKEYDOWN: - case WM_SYSKEYUP: - MSG msg; - - ::ZeroMemory(&msg, sizeof(MSG)); - - msg.hwnd = myself->m_hWnd; - msg.message = uMsg; - msg.wParam = wParam; - msg.lParam = lParam; - - ::TranslateMessage(&msg); - ::PostMessage(myself->m_hWndConsole, uMsg, wParam, lParam); - return 0; -#endif case WM_CHAR: myself->OnChar( (WORD) wParam); @@ -4459,11 +2774,6 @@ LRESULT CALLBACK Console::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM myself->OnCursorTimer(); return 0; -#if 0 - case TIMER_SHOW_HIDE_CONSOLE: - myself->ShowHideConsoleTimeout(); - return 0; -#endif default: return 1; @@ -4519,16 +2829,6 @@ DWORD Console::MonitorThread() { // HANDLE arrHandles[] = { m_hStdOut}; for (;;) { // Infinite loop -#if 0 - DWORD dwWait = ::WaitForMultipleObjects(1, arrHandles, FALSE, INFINITE); - - if (dwWait == WAIT_OBJECT_0) { - ::PostMessage(m_hWnd, WM_CLOSE, 0, 0); - break; - } else if (dwWait == WAIT_OBJECT_0 + 1) { - break; - } else if (dwWait == WAIT_OBJECT_0 + 2) { -#endif AddOutput(); ::SetTimer(m_hWnd, TIMER_REPAINT_CHANGE, m_dwChangeRepaintInt, NULL); // we sleep here for a while, to prevent 'flooding' of m_hStdOut events diff --git a/Console/Console_VS2005.vcproj b/Console/Console_VS2005.vcproj deleted file mode 100644 index 1e6f4eaa..00000000 --- a/Console/Console_VS2005.vcproj +++ /dev/null @@ -1,679 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Console/Console_VS2008.vcproj b/Console/Console_VS2008.vcproj deleted file mode 100644 index d67a1ef8..00000000 --- a/Console/Console_VS2008.vcproj +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Console/Console_VS2010.vcxproj b/Console/Console_VS2010.vcxproj deleted file mode 100644 index 02e1cc8d..00000000 --- a/Console/Console_VS2010.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - Win32Proj - Console - Console - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Console/Console_VS2010.vcxproj.filters b/Console/Console_VS2010.vcxproj.filters deleted file mode 100644 index e7559662..00000000 --- a/Console/Console_VS2010.vcxproj.filters +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {abfafc0c-c637-4524-960d-bddcb96d0913} - - - {680812ee-68a6-4c84-a9aa-615d9523b3b1} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Console/Console_VS2013.vcxproj b/Console/Console_VS2013.vcxproj deleted file mode 100644 index 436e2019..00000000 --- a/Console/Console_VS2013.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - Win32Proj - Console - Console - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Console/Console_VS2013.vcxproj.filters b/Console/Console_VS2013.vcxproj.filters deleted file mode 100644 index e7559662..00000000 --- a/Console/Console_VS2013.vcxproj.filters +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {abfafc0c-c637-4524-960d-bddcb96d0913} - - - {680812ee-68a6-4c84-a9aa-615d9523b3b1} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Console/Console_VS2017.vcxproj b/Console/Console_VS2017.vcxproj deleted file mode 100644 index 193cdb03..00000000 --- a/Console/Console_VS2017.vcxproj +++ /dev/null @@ -1,232 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - Win32Proj - Console - Console - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Console/Console_VS2019.vcxproj b/Console/Console_VS2019.vcxproj deleted file mode 100644 index 06921be5..00000000 --- a/Console/Console_VS2019.vcxproj +++ /dev/null @@ -1,408 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - Win32Proj - Console - Console - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Console/Cursors.cpp b/Console/Cursors.cpp index a74bd1b5..56579cae 100644 --- a/Console/Cursors.cpp +++ b/Console/Cursors.cpp @@ -327,13 +327,7 @@ void ConsoleCursor::Draw(LPRECT pRect) { if (m_bActive && m_bVisible) { -#if 0 - CONSOLE_CURSOR_INFO csi; - ::GetConsoleCursorInfo(m_hStdOut, &csi); - rect.top += (rect.bottom - rect.top) * (100-csi.dwSize)/100; -#else rect.top += (rect.bottom - rect.top) * 80 / 100; -#endif ::FillRect(m_hdcWindow, &rect, m_hActiveBrush); } @@ -706,38 +700,6 @@ FadeBlockCursor::FadeBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCurs { m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 35, NULL); -#if 0 - if (g_bWin2000) { - // on Win2000 we use real alpha blending - - // create a reasonable-sized bitmap, since AlphaBlt resizes - // destination rect if needed, and we don't need to redraw the mem DC - // each time - m_nBmpWidth = BLEND_BMP_WIDTH; - m_nBmpHeight= BLEND_BMP_HEIGHT; - m_hMemDC = ::CreateCompatibleDC(hdcWindow); - m_hBmp = ::CreateCompatibleBitmap(hdcWindow, m_nBmpWidth, m_nBmpHeight); - m_hBmpOld = (HBITMAP)::SelectObject(m_hMemDC, m_hBmp); - - HBRUSH hBrush= ::CreateSolidBrush(m_crCursorColor); - RECT rect; - rect.left = 0; - rect.top = 0; - rect.right = m_nBmpWidth; - rect.bottom = m_nBmpHeight; - - ::FillRect(m_hMemDC, &rect, hBrush); - ::DeleteObject(hBrush); - - m_nStep = -ALPHA_STEP; - - m_bfn.BlendOp = AC_SRC_OVER; - m_bfn.BlendFlags = 0; - m_bfn.SourceConstantAlpha = 255; - m_bfn.AlphaFormat = 0; - - } else { -#endif FakeBlend(); // } } @@ -746,13 +708,6 @@ FadeBlockCursor::~FadeBlockCursor() { if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer); -#if 0 - if (g_bWin2000) { - ::SelectObject(m_hMemDC, m_hBmpOld); - ::DeleteObject(m_hBmp); - ::DeleteDC(m_hMemDC); - } -#endif } ///////////////////////////////////////////////////////////////////////////// @@ -762,24 +717,6 @@ FadeBlockCursor::~FadeBlockCursor() { void FadeBlockCursor::Draw(LPRECT pRect) { -#if 0 - if (g_bWin2000) { - - g_pfnAlphaBlend( - m_hdcWindow, - pRect->left, - pRect->top, - pRect->right - pRect->left, - pRect->bottom - pRect->top, - m_hMemDC, - 0, - 0, - BLEND_BMP_WIDTH, - BLEND_BMP_HEIGHT, - m_bfn); - - } else { -#endif HBRUSH hBrush = ::CreateSolidBrush(m_arrColors[m_nIndex]); ::FillRect(m_hdcWindow, pRect, hBrush); @@ -793,17 +730,6 @@ void FadeBlockCursor::Draw(LPRECT pRect) { ///////////////////////////////////////////////////////////////////////////// void FadeBlockCursor::PrepareNext() { -#if 0 - if (g_bWin2000){ - if (m_bfn.SourceConstantAlpha < ALPHA_STEP) { - m_nStep = ALPHA_STEP; - } else if ((DWORD)m_bfn.SourceConstantAlpha + ALPHA_STEP > 255) { - m_nStep = -ALPHA_STEP; - } - - m_bfn.SourceConstantAlpha += m_nStep; - } else { -#endif if (m_nIndex == 0) { m_nStep = 1; } else if (m_nIndex == (FADE_STEPS)) { diff --git a/Console/Cursors.h b/Console/Cursors.h index a7e91609..3a1f4c17 100644 --- a/Console/Cursors.h +++ b/Console/Cursors.h @@ -337,12 +337,6 @@ class FadeBlockCursor : public Cursor { HMODULE m_hUser32; BLENDFUNCTION m_bfn; HDC m_hMemDC; -#if 0 - HBITMAP m_hBmp; - HBITMAP m_hBmpOld; - int m_nBmpWidth; - int m_nBmpHeight; -#endif }; ///////////////////////////////////////////////////////////////////////////// diff --git a/Credits.cpp b/Credits.cpp index 95f54bcf..7a1f8d25 100644 --- a/Credits.cpp +++ b/Credits.cpp @@ -1,9 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Credits.h" - #include "Encrypted File.h" - #include "Language Defines.h" -#else #include "Types.h" #include "Credits.h" #include "Language Defines.h" @@ -26,7 +20,6 @@ #include "english.h" #include "encrypted file.h" #include "Random.h" -#endif //externals extern HVSURFACE ghFrameBuffer; diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt new file mode 100644 index 00000000..75bed682 --- /dev/null +++ b/Editor/CMakeLists.txt @@ -0,0 +1,27 @@ +set(EditorSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Modes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Callbacks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Modes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Taskbar Creation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Taskbar Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Undo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorBuildings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorMapInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorMercs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorTerrain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/editscreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/edit_sys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Item Statistics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LoadScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/messagebox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/newsmooth.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popupmenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Road Smoothing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Sector Summary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/selectwin.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SmartMethod.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/smooth.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Smoothing Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ActionItems.cpp" +PARENT_SCOPE) diff --git a/Editor/Cursor Modes.cpp b/Editor/Cursor Modes.cpp index 69b1a2eb..16bb60b7 100644 --- a/Editor/Cursor Modes.cpp +++ b/Editor/Cursor Modes.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "types.h" #include "Cursor Modes.h" #include "renderworld.h" @@ -22,7 +17,6 @@ #include "Overhead.h" #include "EditorMercs.h" #include "EditorBuildings.h" -#endif #include "Text.h" diff --git a/Editor/Editor All.h b/Editor/Editor All.h deleted file mode 100644 index da876d15..00000000 --- a/Editor/Editor All.h +++ /dev/null @@ -1,127 +0,0 @@ -#include "BuildDefines.h" - -#ifndef __EDITOR_ALL_H -#define __EDITOR_ALL_H - -#ifdef JA2EDITOR - -#pragma message("GENERATED PCH FOR EDITOR PROJECT.") - -//external -#include "types.h" -#include -#include -#include "Action Items.h" -#include "Button System.h" -#include "debug.h" -#include "english.h" -#include "environment.h" -#include "Exit Grids.h" -#include "font.h" -#include "Font Control.h" -#include "Keys.h" -#include "input.h" -#include "interface.h" -#include "Interface Items.h" -#include "Isometric Utils.h" -#include "interface panels.h" -#include "lighting.h" -#include "Map Information.h" -#include "mousesystem.h" -#include "Overhead.h" -#include "Overhead map.h" -#include "overhead types.h" -#include "pits.h" -#include "random.h" -#include "Render Fun.h" -#include "Render Dirty.h" -#include "renderworld.h" -#include "Simple Render Utils.h" -#include "Soldier Create.h" -#include "Soldier Find.h" -#include "sysutil.h" -#include "Text.h" -#include "Text Input.h" -#include "tiledef.h" -#include "utilities.h" -#include "video.h" -#include "vobject.h" -#include "vobject_blitters.h" -#include "vsurface.h" -#include "wcheck.h" -#include "weapons.h" -#include "wordwrap.h" -#include "WorldDat.h" -#include "worlddef.h" -#include "World Items.h" -#include "worldman.h" -#include "line.h" -#include "Animation Data.h" -#include "Animation Control.h" -#include "Soldier Init List.h" -#include "StrategicMap.h" -#include "Soldier Add.h" -#include "Soldier Control.h" -#include "soldier profile type.h" -#include "Soldier Profile.h" -#include "Inventory Choosing.h" -#include "Scheduling.h" -#include "Timer Control.h" -#include "sgp.h" -#include "screenids.h" -#include "Sys Globals.h" -#include "Interactive Tiles.h" -#include "Handle UI.h" -#include "Event Pump.h" -#include "message.h" -#include "Game Clock.h" -#include "Game Init.h" -#include "Map Edgepoints.h" -#include "Music Control.h" -#include -#include "Item Types.h" -#include "Items.h" -#include "Handle Items.h" -#include "Animated ProgressBar.h" -#include "gameloop.h" -#include -#include "Structure Internals.h" -#include "Cursors.h" -#include "FileMan.h" -#include "Summary Info.h" -#include "time.h" -#include "structure wrap.h" -#include "MessageBoxScreen.h" -#include "GameSettings.h" - - -//internal -#include "Cursor Modes.h" -#include "edit_sys.h" -#include "Editor Callback Prototypes.h" -#include "Editor Modes.h" -#include "Editor Taskbar Creation.h" -#include "Editor Taskbar Utils.h" -#include "Editor Undo.h" -#include "EditorBuildings.h" -#include "EditorDefines.h" -#include "EditorItems.h" -#include "EditorMapInfo.h" -#include "EditorMercs.h" -#include "EditorTerrain.h" -#include "editscreen.h" -#include "Item Statistics.h" -#include "LoadScreen.h" -#include "messagebox.h" -#include "newsmooth.h" -#include "popupmenu.h" -#include "Road Smoothing.h" -#include "Sector Summary.h" -#include "selectwin.h" -#include "SmartMethod.h" -#include "smooth.h" -#include "Smoothing Utils.h" - -#endif - -#endif diff --git a/Editor/Editor Callbacks.cpp b/Editor/Editor Callbacks.cpp index cf6c2d8b..9590e7b4 100644 --- a/Editor/Editor Callbacks.cpp +++ b/Editor/Editor Callbacks.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "types.h" #include "Button System.h" #include "EditorDefines.h" @@ -31,7 +26,6 @@ #include "input.h" #include "Map Information.h" #include "EditorMapInfo.h" -#endif #include "LoadScreen.h" #include "Text Input.h" @@ -797,27 +791,7 @@ void ItemsLeftScrollCallback(GUI_BUTTON *btn, INT32 reason) { if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP) { -#if 0//dnl ch80 011213 - gfRenderTaskbar = TRUE; - if (_KeyDown( 17 ) ) // CTRL - { - if (_KeyDown( 16 ) ) // SHIFT - eInfo.sScrollIndex = 0; - else - eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 60, 0); - } - else if (_KeyDown( 16 ) ) // SHIFT - eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 6, 0); - else - eInfo.sScrollIndex--; - - if( !eInfo.sScrollIndex ) - DisableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex < ((eInfo.sNumItems+1)/2)-6 ) - EnableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); -#else ScrollEditorItemsInfo(FALSE); -#endif } } @@ -825,26 +799,7 @@ void ItemsRightScrollCallback(GUI_BUTTON *btn, INT32 reason) { if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP) { -#if 0//dnl ch80 011213 - gfRenderTaskbar = TRUE; - if (_KeyDown( 17 ) ) // CTRL - { - if (_KeyDown( 16 ) ) // SHIFT - eInfo.sScrollIndex = max( ((eInfo.sNumItems+1)/2)-6, 0); - else - eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 60, (eInfo.sNumItems+1)/2-6); - } - else if (_KeyDown( 16 ) ) // SHIFT - eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 6, (eInfo.sNumItems+1)/2-6); - else - eInfo.sScrollIndex++; - - EnableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0) ) - DisableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); -#else ScrollEditorItemsInfo(TRUE); -#endif } } diff --git a/Editor/Editor Modes.cpp b/Editor/Editor Modes.cpp index 8af7fa74..f8cd9084 100644 --- a/Editor/Editor Modes.cpp +++ b/Editor/Editor Modes.cpp @@ -1,13 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "types.h" #include "Editor Modes.h" #include "Editor Taskbar Utils.h" @@ -23,7 +18,6 @@ #include "worlddef.h" #include "Exit Grids.h" #include "Worldman.h" -#endif BOOLEAN gfShowExitGrids = FALSE; diff --git a/Editor/Editor Taskbar Creation.cpp b/Editor/Editor Taskbar Creation.cpp index 808bf575..1b7f5c50 100644 --- a/Editor/Editor Taskbar Creation.cpp +++ b/Editor/Editor Taskbar Creation.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS //sgp #include "Button System.h" #include "Font Control.h" @@ -22,7 +17,6 @@ #include "overhead types.h" #include "local.h" #include "Text.h" -#endif //Category tabs of the editor buttons void InitEditorTerrainToolbar(); diff --git a/Editor/Editor Taskbar Utils.cpp b/Editor/Editor Taskbar Utils.cpp index 538fff4f..75a77b06 100644 --- a/Editor/Editor Taskbar Utils.cpp +++ b/Editor/Editor Taskbar Utils.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "types.h" #include "mousesystem.h" @@ -47,7 +42,6 @@ #include "Keys.h" #include "InterfaceItemImages.h" #include "renderworld.h"//dnl ch78 271113 -#endif void RenderEditorInfo(); diff --git a/Editor/Editor Undo.cpp b/Editor/Editor Undo.cpp index c9481fa8..0d09d8b9 100644 --- a/Editor/Editor Undo.cpp +++ b/Editor/Editor Undo.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "worlddef.h" #include "worldman.h" #include "smooth.h" @@ -23,7 +18,6 @@ #include "keys.h" #include "EditorItems.h" #include "EditorMapInfo.h" -#endif /* Kris -- Notes on how the undo code works: @@ -373,56 +367,6 @@ void CropStackToMaxLength( INT32 iMaxCmds ) } } -#if 0//dnl ch86 200214 -//We are adding a light to the undo list. We won't save the mapelement, nor will -//we validate the gridno in the binary tree. This works differently than a mapelement, -//because lights work on a different system. By setting the fLightSaved flag to TRUE, -//this will handle the way the undo command is handled. If there is no lightradius in -//our saved light, then we intend on erasing the light upon undo execution, otherwise, we -//save the light radius and light ID, so that we place it during undo execution. -void AddLightToUndoList( INT32 iMapIndex, INT32 iLightRadius, UINT8 ubLightID ) -{ - undo_stack *pNode; - undo_struct *pUndoInfo; - - if( !gfUndoEnabled ) - return; - //When executing an undo command (by adding a light or removing one), that command - //actually tries to add it to the undo list. So we wrap the execution of the undo - //command by temporarily setting this flag, so it'll ignore, and not place a new undo - //command. When finished, the flag is cleared, and lights are again allowed to be saved - //in the undo list. - if( gfIgnoreUndoCmdsForLights ) - return; - - pNode = (undo_stack*)MemAlloc( sizeof( undo_stack ) ); - if( !pNode ) - return; - - pUndoInfo = (undo_struct *)MemAlloc( sizeof( undo_struct ) ); - if( !pUndoInfo ) - { - MemFree( pNode ); - return; - } - - pUndoInfo->fLightSaved = TRUE; - //if ubLightRadius is 0, then we don't need to save the light information because we - //will erase it when it comes time to execute the undo command. - pUndoInfo->ubLightRadius = (UINT8)iLightRadius; - pUndoInfo->ubLightID = ubLightID; - pUndoInfo->iMapIndex = iMapIndex; - pUndoInfo->pMapTile = NULL; - - //Add to undo stack - pNode->iCmdCount = 1; - pNode->pData = pUndoInfo; - pNode->pNext = gpTileUndoStack; - gpTileUndoStack = pNode; - - CropStackToMaxLength( MAX_UNDO_COMMAND_LENGTH ); -} -#endif BOOLEAN AddToUndoList( INT32 iMapIndex ) { @@ -549,11 +493,7 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount ) { // this loop won't execute for single-tile structures; for multi-tile structures, we have to // add to the undo list all the other tiles covered by the structure -#if 0//dnl ch83 080114 - iCoveredMapIndex = pStructure->sBaseGridNo + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase; -#else iCoveredMapIndex = AddPosRelToBase(pStructure->sBaseGridNo, pStructure->pDBStructureRef->ppTile[ubLoop]); -#endif AddToUndoList( iCoveredMapIndex ); } pStructure = pStructure->pNext; @@ -581,19 +521,11 @@ void CheckMapIndexForMultiTileStructures( UINT32 usMapIndex ) // for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure if (pStructure->fFlags & STRUCTURE_BASE_TILE) { -#if 0//dnl ch83 080114 - iCoveredMapIndex = usMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase; -#else iCoveredMapIndex = AddPosRelToBase(usMapIndex, pStructure->pDBStructureRef->ppTile[ubLoop]); -#endif } else { -#if 0//dnl ch83 080114 - iCoveredMapIndex = pStructure->sBaseGridNo + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase; -#else iCoveredMapIndex = AddPosRelToBase(pStructure->sBaseGridNo, pStructure->pDBStructureRef->ppTile[ubLoop]); -#endif } AddToUndoList( iCoveredMapIndex ); } @@ -642,26 +574,6 @@ BOOLEAN ExecuteUndoList( void ) while ( (iCurCount < iCmdCount) && (gpTileUndoStack != NULL) ) { iUndoMapIndex = gpTileUndoStack->pData->iMapIndex; -#if 0//dnl ch86 201214 - fExitGrid = ExitGridAtGridNo( iUndoMapIndex ); - - // Find which map tile we are to "undo" - if( gpTileUndoStack->pData->fLightSaved ) - { //We saved a light, so delete that light - INT16 sX, sY; - //Turn on this flag so that the following code, when executed, doesn't attempt to - //add lights to the undo list. That would cause problems... - gfIgnoreUndoCmdsForLights = TRUE; - ConvertGridNoToXY( iUndoMapIndex, &sX, &sY ); - if( !gpTileUndoStack->pData->ubLightRadius ) - RemoveLight( sX, sY ); - else - PlaceLight( gpTileUndoStack->pData->ubLightRadius, sX, sY, gpTileUndoStack->pData->ubLightID ); - //Turn off the flag so lights can again be added to the undo list. - gfIgnoreUndoCmdsForLights = FALSE; - } - else -#endif { // We execute the undo command node by simply swapping the contents // of the undo's MAP_ELEMENT with the world's element. SwapMapElementWithWorld( iUndoMapIndex, gpTileUndoStack->pData->pMapTile ); @@ -736,19 +648,8 @@ BOOLEAN ExecuteUndoList( void ) //an undo is called, the item is erased, but a cursor is added! I'm quickly //hacking around this by erasing all cursors here. RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS ); -#if 0//dnl ch86 110214 - if( fExitGrid && !ExitGridAtGridNo( iUndoMapIndex ) ) - { //An exitgrid has been removed, so get rid of the associated indicator. - RemoveTopmost( iUndoMapIndex, FIRSTPOINTERS8 ); - } - else if( !fExitGrid && ExitGridAtGridNo( iUndoMapIndex ) ) - { //An exitgrid has been added, so add the associated indicator - AddTopmostToTail( iUndoMapIndex, FIRSTPOINTERS8 ); - } -#else if(gfShowExitGrids && fExitGrid) AddTopmostToTail(iUndoMapIndex, FIRSTPOINTERS8); -#endif } return( TRUE ); diff --git a/Editor/EditorBuildings.cpp b/Editor/EditorBuildings.cpp index ffacff27..fd7f9c29 100644 --- a/Editor/EditorBuildings.cpp +++ b/Editor/EditorBuildings.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "tiledef.h" #include "edit_sys.h" #include "sysutil.h" @@ -34,7 +29,6 @@ #include "editscreen.h" #include "EditorItems.h" #include "EditorMapInfo.h" -#endif BOOLEAN fBuildingShowRoofs, fBuildingShowWalls, fBuildingShowRoomInfo; UINT16 usCurrentMode; @@ -372,44 +366,8 @@ void PasteMapElementToNewMapElement( INT32 iSrcGridNo, INT32 iDstGridNo ) AddTopmostToTail( iDstGridNo, pNode->usIndex ); pNode = pNode->pNext; } -#if 0//dnl ch86 110214 - for ( usType = FIRSTROOF; usType <= LASTSLANTROOF; usType++ ) - { - HideStructOfGivenType( iDstGridNo, usType, (BOOLEAN)(!fBuildingShowRoofs) ); - } -#endif } -#if 0//dnl ch86 220214 -void MoveBuilding( INT32 iMapIndex ) -{ - BUILDINGLAYOUTNODE *curr; - INT32 iOffset; - if( !gpBuildingLayoutList ) - return; - SortBuildingLayout( iMapIndex ); - iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo; - if(iOffset == 0)//dnl ch32 080909 - return; - //First time, set the undo gridnos to everything effected. - curr = gpBuildingLayoutList; - while( curr ) - { - AddToUndoList( curr->sGridNo ); - AddToUndoList( curr->sGridNo + iOffset ); - curr = curr->next; - } - //Now, move the building - curr = gpBuildingLayoutList; - while( curr ) - { - PasteMapElementToNewMapElement( curr->sGridNo, curr->sGridNo + iOffset ); - DeleteStuffFromMapTile( curr->sGridNo ); - curr = curr->next; - } - MarkWorldDirty(); -} -#else void MoveBuilding( INT32 iMapIndex ) { INT8 bLightType; @@ -471,7 +429,6 @@ void MoveBuilding( INT32 iMapIndex ) MarkWorldDirty(); LightSpriteRenderAll(); } -#endif void PasteBuilding( INT32 iMapIndex ) { diff --git a/Editor/EditorItems.cpp b/Editor/EditorItems.cpp index a90fce7f..b6c96847 100644 --- a/Editor/EditorItems.cpp +++ b/Editor/EditorItems.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "tiledef.h" #include "edit_sys.h" @@ -44,7 +39,6 @@ #include "keys.h" #include "InterfaceItemImages.h" #include "Editor Undo.h"//dnl ch86 220214 -#endif #include @@ -137,11 +131,7 @@ void EntryInitEditorItemsInfo() { INT32 i; INVTYPE *item; - eInfo.uiBuffer = 0; - eInfo.fKill = 0; eInfo.fActive = 0; - eInfo.sWidth = 0; - eInfo.sHeight = 0; eInfo.sScrollIndex = 0; eInfo.sSelItemIndex = 0; eInfo.sHilitedItemIndex = -1; @@ -223,20 +213,9 @@ void EntryInitEditorItemsInfo() void InitEditorItemsInfo(UINT32 uiItemType) { - VSURFACE_DESC vs_desc; - UINT8 *pDestBuf, *pSrcBuf; - UINT32 uiSrcPitchBYTES, uiDestPitchBYTES; INVTYPE *item; - SGPRect SaveRect, NewRect; - HVOBJECT hVObject; - UINT32 uiVideoObjectIndex; - UINT16 usUselessWidth, usUselessHeight; - INT32 sWidth, sOffset, sStart; - INT32 i, x, y; + INT32 i; UINT16 usCounter; - CHAR16 pStr[ 100 ];//, pStr2[ 100 ]; - CHAR16 pItemName[SIZE_ITEM_NAME]; - UINT8 ubBitDepth; BOOLEAN fTypeMatch; INT32 iEquipCount = 0; @@ -327,106 +306,31 @@ void InitEditorItemsInfo(UINT32 uiItemType) //Allocate memory to store all the item pointers. if(eInfo.sNumItems)//dnl ch78 271113 eInfo.pusItemIndex = (UINT16*)MemAlloc( sizeof(UINT16) * eInfo.sNumItems ); + //Disable the appropriate scroll buttons based on the saved scroll index if applicable - //Left most scroll position DetermineItemsScrolling(); - //calculate the width of the buffer based on the number of items. - //every pair of items (odd rounded up) requires 60 pixels for width. - //the minimum buffer size is 420. Height is always 80 pixels. - eInfo.sWidth = (eInfo.sNumItems > 12) ? (((INT32) eInfo.sNumItems+1)/2)*60 : 360;//dnl ch77 251113 was (SCREEN_HEIGHT - 120) but editor crash if resolution is 1024x768 - eInfo.sHeight = 80; - // Create item buffer - GetCurrentVideoSettings( &usUselessWidth, &usUselessHeight, &ubBitDepth ); - vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE; - vs_desc.usWidth = eInfo.sWidth; - vs_desc.usHeight = eInfo.sHeight; - vs_desc.ubBitDepth = ubBitDepth; - - //!!!Memory check. Create the item buffer - if(!AddVideoSurface( &vs_desc, &eInfo.uiBuffer )) - { - eInfo.fKill = TRUE; - eInfo.fActive = FALSE; - return; - } - - pDestBuf = LockVideoSurface(eInfo.uiBuffer, &uiDestPitchBYTES); - pSrcBuf = LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES); - - //copy a blank chunk of the editor interface to the new buffer. - for( i=0; iubGraphicNum; - //Calculate the center position of the graphic in a 60 pixel wide area. - sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth; - sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX; - sStart = x + (60 - sWidth - sOffset*2) / 2; - - BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, usGraphicNum, sStart, y+2, 0, FALSE ); - - //cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)... - if( y == 0 ) - { - y = 40; - } - else - { - y = 0; - x += 60; - } + eInfo.pusItemIndex[i] = KeyTable[LockTable[i].usKeyItem].usItem; } } else for( i = 0; i < eInfo.sNumItems; i++ ) { - fTypeMatch = FALSE; while( usCounternotineditor) { usCounter++; @@ -495,99 +399,12 @@ void InitEditorItemsInfo(UINT32 uiItemType) } if( fTypeMatch ) { - - uiVideoObjectIndex = GetInterfaceGraphicForItem( item ); - GetVideoObject( &hVObject, uiVideoObjectIndex ); - //Store these item pointers for later when rendering selected items. eInfo.pusItemIndex[i] = usCounter; - - SetFont(SMALLCOMPFONT); - SetFontForeground( FONT_MCOLOR_WHITE ); - SetFontDestBuffer( eInfo.uiBuffer, 0, 0, eInfo.sWidth, eInfo.sHeight, FALSE ); - - - if( eInfo.uiItemType != TBAR_MODE_ITEM_TRIGGERS ) - { - LoadItemInfo( usCounter, pItemName, NULL ); - swprintf( pStr, L"%s", pItemName ); - } - else - { - if( i == PRESSURE_ACTION_ID ) - { - swprintf( pStr, pInitEditorItemsInfoText[0] ); - } - else if( i < 2 ) - { - if( usCounter == SWITCH ) - swprintf( pStr, pInitEditorItemsInfoText[5] ); - else - swprintf( pStr, pInitEditorItemsInfoText[1] ); - } - else if( i < 4 ) - { - if( usCounter == SWITCH ) - swprintf( pStr, pInitEditorItemsInfoText[6] ); - else - swprintf( pStr, pInitEditorItemsInfoText[2] ); - } - else if( i < 6 ) - { - if( usCounter == SWITCH ) - swprintf( pStr, pInitEditorItemsInfoText[7] ); - else - swprintf( pStr, pInitEditorItemsInfoText[3] ); - } - else - { - if( usCounter == SWITCH ) - swprintf( pStr, pInitEditorItemsInfoText[8], (i-4)/2 ); - else - swprintf( pStr, pInitEditorItemsInfoText[4], (i-4)/2 ); - } - } - - DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED ); - - UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum; - if(usGraphicNum < hVObject->usNumberOfObjects) - { - //Calculate the center position of the graphic in a 60 pixel wide area. - sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth; - sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX; - sStart = x + (60 - sWidth - sOffset*2) / 2; - - if( sWidth && sWidth > 0 ) - { - BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, usGraphicNum, sStart, y+2, 0, FALSE ); - } - - //cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)... - if( y == 0 ) - { - y = 40; - } - else - { - y = 0; - x += 60; - } - } - else - { - static vfs::Log& editorLog = *vfs::Log::create(L"EditorItems.log"); - editorLog << L"Tried to access item [" - << item->ubGraphicNum << L"/" << hVObject->usNumberOfObjects - << L"]" << vfs::Log::endl; - } } usCounter++; } } - SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE ); - SetClippingRect(&SaveRect); - gfRenderTaskbar = TRUE; } void DetermineItemsScrolling() @@ -607,8 +424,6 @@ void DetermineItemsScrolling() void RenderEditorItemsInfo() { - UINT8 *pDestBuf, *pSrcBuf; - UINT32 uiSrcPitchBYTES, uiDestPitchBYTES; INVTYPE *item; HVOBJECT hVObject; UINT32 uiVideoObjectIndex; @@ -627,14 +442,6 @@ void RenderEditorItemsInfo() { //Mouse has moved out of the items display region -- so nothing can be highlighted. eInfo.sHilitedItemIndex = -1; } - pDestBuf = LockVideoSurface(FRAME_BUFFER, &uiDestPitchBYTES); - pSrcBuf = LockVideoSurface(eInfo.uiBuffer, &uiSrcPitchBYTES); - - Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, - (UINT16 *)pSrcBuf, uiSrcPitchBYTES, iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 360, 60*eInfo.sScrollIndex, 0, 360, 80 ); - - UnLockVideoSurface(eInfo.uiBuffer); - UnLockVideoSurface(FRAME_BUFFER); //calculate the min and max index that is currently shown. This determines //if the highlighted and/or selected items are drawn with the outlines. @@ -685,26 +492,101 @@ void RenderEditorItemsInfo() } } } - //draw item index no & the numbers of each visible item that currently resides in the world. + + + //draw item graphics, name, index number & the numbers of each visible item that currently resides in the world. maxIndex = min( maxIndex, eInfo.sNumItems-1 ); for( i = minIndex; i <= maxIndex; i++ ) { x = iScreenWidthOffset + (i/2 - eInfo.sScrollIndex)*60 + 110; y = 2 * iScreenHeightOffset + 360 + (i % 2) * 40; - SetFont( BLOCKFONTNARROW ); - SetFontForeground( FONT_LTGREEN ); - SetFontShadow( FONT_NEARBLACK ); - // item index no + + // Blit item graphics on demand based on what is visible + UINT16 itemIndex = eInfo.pusItemIndex[i]; + item = &Item[itemIndex]; + uiVideoObjectIndex = GetInterfaceGraphicForItem(item); + GetVideoObject(&hVObject, uiVideoObjectIndex); + UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : item->ubGraphicNum; + if (usGraphicNum >= hVObject->usNumberOfObjects) // Tried to access graphics outside of hvObject's indices + { + static vfs::Log& editorLog = *vfs::Log::create(L"EditorItems.log"); + editorLog << L"Tried to access item [" + << item->ubGraphicNum << L"/" << hVObject->usNumberOfObjects + << L"]" << vfs::Log::endl; + } + sWidth = hVObject->pETRLEObject[usGraphicNum].usWidth; + sOffset = hVObject->pETRLEObject[usGraphicNum].sOffsetX; + sStart = x + (60 - sWidth - sOffset * 2) / 2; + BltVideoObjectOutlineFromIndex(FRAME_BUFFER, uiVideoObjectIndex, usGraphicNum, sStart, y + 2, Get16BPPColor(FROMRGB(250, 0, 0)), FALSE); + + + // Display item name + CHAR16 pStr[100]; + CHAR16 pItemName[SIZE_ITEM_NAME]; + + if (eInfo.uiItemType == TBAR_MODE_ITEM_KEYS) + { + swprintf(pStr, L"%S", LockTable[i].ubEditorName); + } + else if (eInfo.uiItemType != TBAR_MODE_ITEM_TRIGGERS) + { + LoadItemInfo(eInfo.pusItemIndex[i], pItemName, NULL); + swprintf(pStr, L"%s", pItemName); + } + else + { + if (i == PRESSURE_ACTION_ID) + { + swprintf(pStr, pInitEditorItemsInfoText[0]); + } + else if (i < 2) + { + if (itemIndex == SWITCH) + swprintf(pStr, pInitEditorItemsInfoText[5]); + else + swprintf(pStr, pInitEditorItemsInfoText[1]); + } + else if (i < 4) + { + if (itemIndex == SWITCH) + swprintf(pStr, pInitEditorItemsInfoText[6]); + else + swprintf(pStr, pInitEditorItemsInfoText[2]); + } + else if (i < 6) + { + if (itemIndex == SWITCH) + swprintf(pStr, pInitEditorItemsInfoText[7]); + else + swprintf(pStr, pInitEditorItemsInfoText[3]); + } + else + { + if (itemIndex == SWITCH) + swprintf(pStr, pInitEditorItemsInfoText[8], (i - 4) / 2); + else + swprintf(pStr, pInitEditorItemsInfoText[4], (i - 4) / 2); + } + } + SetFont(SMALLCOMPFONT); + SetFontForeground(FONT_MCOLOR_WHITE); + DisplayWrappedString(x, (UINT16)(y + 25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED); + + + + SetFont(BLOCKFONTNARROW); + SetFontForeground(FONT_LTGREEN); + SetFontShadow(FONT_NEARBLACK); + // item index number mprintf( x + 12, y + 18, L"%d", eInfo.pusItemIndex[ i ] ); - // index no within usItemClass + // index number within usItemClass SetFontForeground( FONT_LTBLUE ); mprintf( x + 40, y + 18, L"%d", i ); // numbers of each visible item usNumItems = CountNumberOfEditorPlacementsInWorld( i, &usQuantity ); - if( usNumItems ) { SetFont( FONT10ARIAL ); @@ -719,21 +601,13 @@ void RenderEditorItemsInfo() void ClearEditorItemsInfo() { - if( eInfo.uiBuffer ) - { - DeleteVideoSurfaceFromIndex( eInfo.uiBuffer ); - eInfo.uiBuffer = 0; - } if( eInfo.pusItemIndex ) { MemFree( eInfo.pusItemIndex ); eInfo.pusItemIndex = NULL; } DisableEditorRegion( ITEM_REGION_ID ); - eInfo.fKill = 0; eInfo.fActive = 0; - eInfo.sWidth = 0; - eInfo.sHeight = 0; eInfo.sNumItems = 0; //save the highlighted selections switch( eInfo.uiItemType ) @@ -1158,16 +1032,10 @@ void DeleteSelectedItem() if( gpEditingItemPool == gpItemPool ) gpEditingItemPool = NULL; RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 ); -#if 0//dnl ch86 220214 - gpItemPool = NULL; - //determine if there are still any items at this location - if( GetItemPoolFromGround( sGridNo, &gpItemPool ) ) -#else ITEM_POOL *pItemPoolOld = gpItemPool; GetItemPoolFromGround(sGridNo, &gpItemPool); UpdateItemPoolInUndoList(sGridNo, pItemPoolOld, gpItemPool); if(gpItemPool) -#endif { //reset display for remaining items SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo ); } diff --git a/Editor/EditorItems.h b/Editor/EditorItems.h index 6e684aab..e56fbfdf 100644 --- a/Editor/EditorItems.h +++ b/Editor/EditorItems.h @@ -6,14 +6,9 @@ typedef struct{ BOOLEAN fGameInit; //Used for initializing save variables the first time. - //This flag is initialize at - BOOLEAN fKill; //flagged for deallocation. BOOLEAN fActive; //currently active UINT16 *pusItemIndex; //a dynamic array of Item indices - UINT32 uiBuffer; //index of buffer UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment - //Kaiden/Buggler: was previously INT16 - Fix for number of items capped by class in editor - INT32 sWidth, sHeight; //width and height of buffer INT16 sNumItems; //total number of items in the current class of item. INT16 sSelItemIndex; //currently selected item index. INT16 sHilitedItemIndex; diff --git a/Editor/EditorMapInfo.cpp b/Editor/EditorMapInfo.cpp index 366e1782..b4335ab3 100644 --- a/Editor/EditorMapInfo.cpp +++ b/Editor/EditorMapInfo.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "tiledef.h" #include "edit_sys.h" @@ -57,7 +52,6 @@ #include "environment.h" #include "Simple Render Utils.h" #include "Text.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Editor/EditorMercs.cpp b/Editor/EditorMercs.cpp index cef61a4f..6fb9f5b2 100644 --- a/Editor/EditorMercs.cpp +++ b/Editor/EditorMercs.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "tiledef.h" #include "edit_sys.h" @@ -64,7 +59,6 @@ #include "message.h" #include "InterfaceItemImages.h" #include "english.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; class SOLDIERTYPE; diff --git a/Editor/EditorMercs.h b/Editor/EditorMercs.h index 2f6c0eb6..71e66ccd 100644 --- a/Editor/EditorMercs.h +++ b/Editor/EditorMercs.h @@ -1,5 +1,281 @@ +#pragma once + #include "BuildDefines.h" +//----------------------------------------------- +// +// civilian "sub teams": +enum +{ + NON_CIV_GROUP = 0, + REBEL_CIV_GROUP, + KINGPIN_CIV_GROUP, + SANMONA_ARMS_GROUP, + ANGELS_GROUP, + BEGGARS_CIV_GROUP, + TOURISTS_CIV_GROUP, + ALMA_MILITARY_CIV_GROUP, + DOCTORS_CIV_GROUP, + COUPLE1_CIV_GROUP, + HICKS_CIV_GROUP, + WARDEN_CIV_GROUP, + JUNKYARD_CIV_GROUP, + FACTORY_KIDS_GROUP, + QUEENS_CIV_GROUP, + UNNAMED_CIV_GROUP_15, + UNNAMED_CIV_GROUP_16, + UNNAMED_CIV_GROUP_17, + UNNAMED_CIV_GROUP_18, + UNNAMED_CIV_GROUP_19, + ASSASSIN_CIV_GROUP, // Flugente: enemy assassins belong to this group + POW_PRISON_CIV_GROUP, // Flugente: prisoners of war the player caught are in this group + UNNAMED_CIV_GROUP_22, + UNNAMED_CIV_GROUP_23, + VOLUNTEER_CIV_GROUP, // Flugente: civilians that the player recruited + BOUNTYHUNTER_CIV_GROUP, // Flugente: hostile bounty hunters + DOWNEDPILOT_CIV_GROUP, // Flugente: downed pilots + SCIENTIST_GROUP, // Flugente: enemy civilian personnel + RADAR_TECHNICIAN_GROUP, + AIRPORT_STAFF_GROUP, + BARRACK_STAFF_GROUP, + FACTORY_GROUP, + ADMINISTRATIVE_STAFF_GROUP, + LOYAL_CIV_GROUP, // civil population deeply loyal to the queen + BLACKMARKET_GROUP, // black market dealer and bodyguards + UNNAMED_CIV_GROUP_35, + UNNAMED_CIV_GROUP_36, + UNNAMED_CIV_GROUP_37, + UNNAMED_CIV_GROUP_38, + UNNAMED_CIV_GROUP_39, + UNNAMED_CIV_GROUP_40, + UNNAMED_CIV_GROUP_41, + UNNAMED_CIV_GROUP_42, + UNNAMED_CIV_GROUP_43, + UNNAMED_CIV_GROUP_44, + UNNAMED_CIV_GROUP_45, + UNNAMED_CIV_GROUP_46, + UNNAMED_CIV_GROUP_47, + UNNAMED_CIV_GROUP_48, + UNNAMED_CIV_GROUP_49, + UNNAMED_CIV_GROUP_50, + UNNAMED_CIV_GROUP_51, + UNNAMED_CIV_GROUP_52, + UNNAMED_CIV_GROUP_53, + UNNAMED_CIV_GROUP_54, + UNNAMED_CIV_GROUP_55, + UNNAMED_CIV_GROUP_56, + UNNAMED_CIV_GROUP_57, + UNNAMED_CIV_GROUP_58, + UNNAMED_CIV_GROUP_59, + UNNAMED_CIV_GROUP_60, + UNNAMED_CIV_GROUP_61, + UNNAMED_CIV_GROUP_62, + UNNAMED_CIV_GROUP_63, + UNNAMED_CIV_GROUP_64, + UNNAMED_CIV_GROUP_65, + UNNAMED_CIV_GROUP_66, + UNNAMED_CIV_GROUP_67, + UNNAMED_CIV_GROUP_68, + UNNAMED_CIV_GROUP_69, + UNNAMED_CIV_GROUP_70, + UNNAMED_CIV_GROUP_71, + UNNAMED_CIV_GROUP_72, + UNNAMED_CIV_GROUP_73, + UNNAMED_CIV_GROUP_74, + UNNAMED_CIV_GROUP_75, + UNNAMED_CIV_GROUP_76, + UNNAMED_CIV_GROUP_77, + UNNAMED_CIV_GROUP_78, + UNNAMED_CIV_GROUP_79, + UNNAMED_CIV_GROUP_80, + UNNAMED_CIV_GROUP_81, + UNNAMED_CIV_GROUP_82, + UNNAMED_CIV_GROUP_83, + UNNAMED_CIV_GROUP_84, + UNNAMED_CIV_GROUP_85, + UNNAMED_CIV_GROUP_86, + UNNAMED_CIV_GROUP_87, + UNNAMED_CIV_GROUP_88, + UNNAMED_CIV_GROUP_89, + UNNAMED_CIV_GROUP_90, + UNNAMED_CIV_GROUP_91, + UNNAMED_CIV_GROUP_92, + UNNAMED_CIV_GROUP_93, + UNNAMED_CIV_GROUP_94, + UNNAMED_CIV_GROUP_95, + UNNAMED_CIV_GROUP_96, + UNNAMED_CIV_GROUP_97, + UNNAMED_CIV_GROUP_98, + UNNAMED_CIV_GROUP_99, + UNNAMED_CIV_GROUP_100, + UNNAMED_CIV_GROUP_101, + UNNAMED_CIV_GROUP_102, + UNNAMED_CIV_GROUP_103, + UNNAMED_CIV_GROUP_104, + UNNAMED_CIV_GROUP_105, + UNNAMED_CIV_GROUP_106, + UNNAMED_CIV_GROUP_107, + UNNAMED_CIV_GROUP_108, + UNNAMED_CIV_GROUP_109, + UNNAMED_CIV_GROUP_110, + UNNAMED_CIV_GROUP_111, + UNNAMED_CIV_GROUP_112, + UNNAMED_CIV_GROUP_113, + UNNAMED_CIV_GROUP_114, + UNNAMED_CIV_GROUP_115, + UNNAMED_CIV_GROUP_116, + UNNAMED_CIV_GROUP_117, + UNNAMED_CIV_GROUP_118, + UNNAMED_CIV_GROUP_119, + UNNAMED_CIV_GROUP_120, + UNNAMED_CIV_GROUP_121, + UNNAMED_CIV_GROUP_122, + UNNAMED_CIV_GROUP_123, + UNNAMED_CIV_GROUP_124, + UNNAMED_CIV_GROUP_125, + UNNAMED_CIV_GROUP_126, + UNNAMED_CIV_GROUP_127, + UNNAMED_CIV_GROUP_128, + UNNAMED_CIV_GROUP_129, + UNNAMED_CIV_GROUP_130, + UNNAMED_CIV_GROUP_131, + UNNAMED_CIV_GROUP_132, + UNNAMED_CIV_GROUP_133, + UNNAMED_CIV_GROUP_134, + UNNAMED_CIV_GROUP_135, + UNNAMED_CIV_GROUP_136, + UNNAMED_CIV_GROUP_137, + UNNAMED_CIV_GROUP_138, + UNNAMED_CIV_GROUP_139, + UNNAMED_CIV_GROUP_140, + + UNNAMED_CIV_GROUP_141, + UNNAMED_CIV_GROUP_142, + UNNAMED_CIV_GROUP_143, + UNNAMED_CIV_GROUP_144, + UNNAMED_CIV_GROUP_145, + UNNAMED_CIV_GROUP_146, + UNNAMED_CIV_GROUP_147, + UNNAMED_CIV_GROUP_148, + UNNAMED_CIV_GROUP_149, + UNNAMED_CIV_GROUP_150, + UNNAMED_CIV_GROUP_151, + UNNAMED_CIV_GROUP_152, + UNNAMED_CIV_GROUP_153, + UNNAMED_CIV_GROUP_154, + UNNAMED_CIV_GROUP_155, + UNNAMED_CIV_GROUP_156, + UNNAMED_CIV_GROUP_157, + UNNAMED_CIV_GROUP_158, + UNNAMED_CIV_GROUP_159, + UNNAMED_CIV_GROUP_160, + UNNAMED_CIV_GROUP_161, + UNNAMED_CIV_GROUP_162, + UNNAMED_CIV_GROUP_163, + UNNAMED_CIV_GROUP_164, + UNNAMED_CIV_GROUP_165, + UNNAMED_CIV_GROUP_166, + UNNAMED_CIV_GROUP_167, + UNNAMED_CIV_GROUP_168, + UNNAMED_CIV_GROUP_169, + UNNAMED_CIV_GROUP_170, + + UNNAMED_CIV_GROUP_171, + UNNAMED_CIV_GROUP_172, + UNNAMED_CIV_GROUP_173, + UNNAMED_CIV_GROUP_174, + UNNAMED_CIV_GROUP_175, + UNNAMED_CIV_GROUP_176, + UNNAMED_CIV_GROUP_177, + UNNAMED_CIV_GROUP_178, + UNNAMED_CIV_GROUP_179, + UNNAMED_CIV_GROUP_180, + UNNAMED_CIV_GROUP_181, + UNNAMED_CIV_GROUP_182, + UNNAMED_CIV_GROUP_183, + UNNAMED_CIV_GROUP_184, + UNNAMED_CIV_GROUP_185, + UNNAMED_CIV_GROUP_186, + UNNAMED_CIV_GROUP_187, + UNNAMED_CIV_GROUP_188, + UNNAMED_CIV_GROUP_189, + UNNAMED_CIV_GROUP_190, + UNNAMED_CIV_GROUP_191, + UNNAMED_CIV_GROUP_192, + UNNAMED_CIV_GROUP_193, + UNNAMED_CIV_GROUP_194, + UNNAMED_CIV_GROUP_195, + UNNAMED_CIV_GROUP_196, + UNNAMED_CIV_GROUP_197, + UNNAMED_CIV_GROUP_198, + UNNAMED_CIV_GROUP_199, + UNNAMED_CIV_GROUP_200, + + UNNAMED_CIV_GROUP_201, + UNNAMED_CIV_GROUP_202, + UNNAMED_CIV_GROUP_203, + UNNAMED_CIV_GROUP_204, + UNNAMED_CIV_GROUP_205, + UNNAMED_CIV_GROUP_206, + UNNAMED_CIV_GROUP_207, + UNNAMED_CIV_GROUP_208, + UNNAMED_CIV_GROUP_209, + UNNAMED_CIV_GROUP_210, + UNNAMED_CIV_GROUP_211, + UNNAMED_CIV_GROUP_212, + UNNAMED_CIV_GROUP_213, + UNNAMED_CIV_GROUP_214, + UNNAMED_CIV_GROUP_215, + UNNAMED_CIV_GROUP_216, + UNNAMED_CIV_GROUP_217, + UNNAMED_CIV_GROUP_218, + UNNAMED_CIV_GROUP_219, + UNNAMED_CIV_GROUP_220, + UNNAMED_CIV_GROUP_221, + UNNAMED_CIV_GROUP_222, + UNNAMED_CIV_GROUP_223, + UNNAMED_CIV_GROUP_224, + UNNAMED_CIV_GROUP_225, + UNNAMED_CIV_GROUP_226, + UNNAMED_CIV_GROUP_227, + UNNAMED_CIV_GROUP_228, + UNNAMED_CIV_GROUP_229, + UNNAMED_CIV_GROUP_230, + + UNNAMED_CIV_GROUP_231, + UNNAMED_CIV_GROUP_232, + UNNAMED_CIV_GROUP_233, + UNNAMED_CIV_GROUP_234, + UNNAMED_CIV_GROUP_235, + UNNAMED_CIV_GROUP_236, + UNNAMED_CIV_GROUP_237, + UNNAMED_CIV_GROUP_238, + UNNAMED_CIV_GROUP_239, + UNNAMED_CIV_GROUP_240, + UNNAMED_CIV_GROUP_241, + UNNAMED_CIV_GROUP_242, + UNNAMED_CIV_GROUP_243, + UNNAMED_CIV_GROUP_244, + UNNAMED_CIV_GROUP_245, + UNNAMED_CIV_GROUP_246, + UNNAMED_CIV_GROUP_247, + UNNAMED_CIV_GROUP_248, + UNNAMED_CIV_GROUP_249, + UNNAMED_CIV_GROUP_250, + + UNNAMED_CIV_GROUP_251, + UNNAMED_CIV_GROUP_252, + UNNAMED_CIV_GROUP_253, + UNNAMED_CIV_GROUP_254, + NUM_CIV_GROUPS +}; + +#define CIV_GROUP_NEUTRAL 0 +#define CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE 1 +#define CIV_GROUP_WILL_BECOME_HOSTILE 2 +#define CIV_GROUP_HOSTILE 3 + + #ifdef JA2EDITOR #ifndef __EDITORMERCS_H @@ -110,6 +386,13 @@ void HandleMercInventoryPanel( INT16 sX, INT16 sY, INT8 bEvent ); extern UINT16 gusMercsNewItemIndex; extern BOOLEAN gfRenderMercInfo; +//NOTE: The editor uses these enumerations, so please update the text as well if you modify or +// add new groups. Try to abbreviate the team name as much as possible. The text is in +// EditorMercs.c +extern CHAR16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 128 ]; +// +//----------------------------------------------- + void ChangeCivGroup( UINT8 ubNewCivGroup ); #define MERCINV_LGSLOT_WIDTH 48 diff --git a/Editor/EditorTerrain.cpp b/Editor/EditorTerrain.cpp index 026a1f24..932b44ef 100644 --- a/Editor/EditorTerrain.cpp +++ b/Editor/EditorTerrain.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "tiledef.h" #include "edit_sys.h" @@ -32,7 +27,6 @@ #include "Editor Taskbar Utils.h" #include "Cursor Modes.h" #include "english.h" -#endif BOOLEAN gfShowTerrainTileButtons; UINT8 ubTerrainTileButtonWeight[NUM_TERRAIN_TILE_REGIONS]; diff --git a/Editor/Editor_VS2005.vcproj b/Editor/Editor_VS2005.vcproj deleted file mode 100644 index 3fcf3ae1..00000000 --- a/Editor/Editor_VS2005.vcproj +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Editor/Editor_VS2008.vcproj b/Editor/Editor_VS2008.vcproj deleted file mode 100644 index 54b77649..00000000 --- a/Editor/Editor_VS2008.vcproj +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Editor/Editor_VS2010.vcxproj b/Editor/Editor_VS2010.vcxproj deleted file mode 100644 index c7727cc9..00000000 --- a/Editor/Editor_VS2010.vcxproj +++ /dev/null @@ -1,251 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {23EA0500-038A-4EB8-B753-0C709B25470D} - Win32Proj - Editor - Editor - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Editor/Editor_VS2010.vcxproj.filters b/Editor/Editor_VS2010.vcxproj.filters deleted file mode 100644 index 547bab05..00000000 --- a/Editor/Editor_VS2010.vcxproj.filters +++ /dev/null @@ -1,174 +0,0 @@ - - - - - {1305164a-0ad7-4d96-af15-765647f97f27} - - - {02bb6629-3e96-4c7d-931f-fb1ec12b8ef5} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Editor/Editor_VS2013.vcxproj b/Editor/Editor_VS2013.vcxproj deleted file mode 100644 index 775c5bc4..00000000 --- a/Editor/Editor_VS2013.vcxproj +++ /dev/null @@ -1,271 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {23EA0500-038A-4EB8-B753-0C709B25470D} - Win32Proj - Editor - Editor - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Editor/Editor_VS2013.vcxproj.filters b/Editor/Editor_VS2013.vcxproj.filters deleted file mode 100644 index 547bab05..00000000 --- a/Editor/Editor_VS2013.vcxproj.filters +++ /dev/null @@ -1,174 +0,0 @@ - - - - - {1305164a-0ad7-4d96-af15-765647f97f27} - - - {02bb6629-3e96-4c7d-931f-fb1ec12b8ef5} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Editor/Editor_VS2017.vcxproj b/Editor/Editor_VS2017.vcxproj deleted file mode 100644 index 89c6f7e3..00000000 --- a/Editor/Editor_VS2017.vcxproj +++ /dev/null @@ -1,272 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {23EA0500-038A-4EB8-B753-0C709B25470D} - Win32Proj - Editor - Editor - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Editor/Editor_VS2019.vcxproj b/Editor/Editor_VS2019.vcxproj deleted file mode 100644 index b07929b8..00000000 --- a/Editor/Editor_VS2019.vcxproj +++ /dev/null @@ -1,448 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {23EA0500-038A-4EB8-B753-0C709B25470D} - Win32Proj - Editor - Editor - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Editor/Item Statistics.cpp b/Editor/Item Statistics.cpp index f46ce0cc..57a1851b 100644 --- a/Editor/Item Statistics.cpp +++ b/Editor/Item Statistics.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include #include "types.h" @@ -31,7 +26,6 @@ #include "PopupMenu.h" #include "pits.h" #include "Text.h" -#endif #include "soldier profile type.h" #include "LuaInitNPCs.h" diff --git a/Editor/LoadScreen.cpp b/Editor/LoadScreen.cpp index 734058c6..81a9e024 100644 --- a/Editor/LoadScreen.cpp +++ b/Editor/LoadScreen.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "Font Control.h" #include "renderworld.h" @@ -45,7 +40,6 @@ #include "MessageBoxScreen.h" #include //dnl ch37 110909 #include "Exit Grids.h"//dnl ch86 190214 -#endif //=========================================================================== @@ -568,7 +562,7 @@ void CreateFileDialog( STR16 zTitle ) //File list window iFileDlgButtons[4] = CreateHotSpot( (iScreenWidthOffset + 179+4), (iScreenHeightOffset + 69+3), (179+4+240), (69+120+3), MSYS_PRIORITY_HIGH-1, BUTTON_NO_CALLBACK, FDlgNamesCallback); //Title button - iFileDlgButtons[5] = CreateTextButton(zTitle, HUGEFONT, FONT_LTKHAKI, FONT_DKKHAKI, + iFileDlgButtons[5] = CreateTextButton(zTitle, GetHugeFont(), FONT_LTKHAKI, FONT_DKKHAKI, BUTTON_USE_DEFAULT,iScreenWidthOffset + 179, iScreenHeightOffset + 39,281,30,BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH-2,BUTTON_NO_CALLBACK,BUTTON_NO_CALLBACK); DisableButton(iFileDlgButtons[5]); @@ -1019,7 +1013,7 @@ UINT32 ProcessFileIO() case INITIATE_MAP_SAVE: //draw save message StartFrameBufferRender( ); SaveFontSettings(); - SetFont( HUGEFONT ); + SetFont( GetHugeFont() ); SetFontForeground( FONT_LTKHAKI ); SetFontShadow( FONT_DKKHAKI ); SetFontBackground( 0 ); diff --git a/Editor/Road Smoothing.cpp b/Editor/Road Smoothing.cpp index 7df8a04b..5f7376f5 100644 --- a/Editor/Road Smoothing.cpp +++ b/Editor/Road Smoothing.cpp @@ -1,19 +1,13 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "types.h" #include "Road Smoothing.h" #include "tiledat.h" #include "worlddef.h" #include "worldman.h" #include "Editor Undo.h" -#endif typedef struct MACROSTRUCT diff --git a/Editor/Sector Summary.cpp b/Editor/Sector Summary.cpp index bcce1fdd..aa486552 100644 --- a/Editor/Sector Summary.cpp +++ b/Editor/Sector Summary.cpp @@ -1,13 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "types.h" #include "Sector Summary.h" @@ -42,7 +37,6 @@ #include "GameSettings.h" #include "EditorTerrain.h"//dnl ch78 261113 #include "Render Dirty.h"//dnl ch78 271113 -#endif #include #include @@ -245,11 +239,6 @@ enum{ SUMMARY_LOAD, SUMMARY_SAVE, SUMMARY_OVERRIDE, -#if 0 - SUMMARY_NEW_GROUNDLEVEL, - SUMMARY_NEW_BASEMENTLEVEL, - SUMMARY_NEW_CAVELEVEL, -#endif SUMMARY_UPDATE, SUMMARY_SCIFI, SUMMARY_REAL, @@ -357,17 +346,6 @@ void CreateSummaryWindow() CreateCheckBoxButton( ( INT16 ) ( MAP_LEFT + 110 ), ( INT16 ) ( MAP_BOTTOM + 59 ), "EDITOR\\smcheckbox.sti", MSYS_PRIORITY_HIGH, SummaryOverrideCallback ); -#if 0 - iSummaryButton[ SUMMARY_NEW_GROUNDLEVEL ] = - CreateSimpleButton( MAP_LEFT, MAP_BOTTOM+58, "EDITOR\\new.sti", BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, SummaryNewGroundLevelCallback ); - SetButtonFastHelpText( iSummaryButton[ SUMMARY_NEW_GROUNDLEVEL ], L"New map" ); - iSummaryButton[ SUMMARY_NEW_BASEMENTLEVEL ] = - CreateSimpleButton( MAP_LEFT+32, MAP_BOTTOM+58, "EDITOR\\new.sti", BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, SummaryNewBasementLevelCallback ); - SetButtonFastHelpText( iSummaryButton[ SUMMARY_NEW_BASEMENTLEVEL ], L"New basement" ); - iSummaryButton[ SUMMARY_NEW_CAVELEVEL ] = - CreateSimpleButton( MAP_LEFT+64, MAP_BOTTOM+58, "EDITOR\\new.sti", BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, SummaryNewCaveLevelCallback ); - SetButtonFastHelpText( iSummaryButton[ SUMMARY_NEW_CAVELEVEL ], L"New cave level" ); -#endif iSummaryButton[ SUMMARY_UPDATE ] = @@ -1830,28 +1808,6 @@ void SummaryToggleProgressCallback( GUI_BUTTON *btn, INT32 reason ) #include "Tile Surface.h" -void PerformTest() -{ -#if 0 - OutputDebugString( "PERFORMING A NEW TEST -------------------------------------------------\n" ); - memset( gbDefaultSurfaceUsed, 0, sizeof( gbDefaultSurfaceUsed ) ); - giCurrentTilesetID = -1; - switch( Random( 3 ) ) - { - case 0: - LoadWorld( "J9.dat" ); - break; - case 1: - LoadWorld( "J9_b1.dat" ); - break; - case 2: - LoadWorld( "J9_b2.dat" ); - break; - } -#endif -} - - BOOLEAN HandleSummaryInput( InputAtom *pEvent ) { if( !gfSummaryWindowActive ) @@ -1877,17 +1833,6 @@ BOOLEAN HandleSummaryInput( InputAtom *pEvent ) else if( gfWorldLoaded ) DestroySummaryWindow(); break; - case F6: - PerformTest(); - break; - case F7: - for( x = 0; x < 10; x++ ) - PerformTest(); - break; - case F8: - for( x = 0; x < 100; x++ ) - PerformTest(); - break; case 'y':case 'Y': if( gusNumEntriesWithOutdatedOrNoSummaryInfo && !gfOutdatedDenied ) { @@ -3035,16 +2980,6 @@ void SummaryUpdateCallback( GUI_BUTTON *btn, INT32 reason ) SetProgressBarTitle( 0, pSummaryUpdateCallbackText[0], BLOCKFONT2, FONT_RED, FONT_NEARBLACK ); SetProgressBarMsgAttributes( 0, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK ); -#if 0 - // 0verhaul: This should NOT be freed. An array index can be freed when it is recalculated, - // as this function is about to do. And then it SHOULD be freed first, which it wasn't doing. - // Either way, using this pointer is not a safe way to free the current sector's summary data. - if( gpCurrentSectorSummary ) - { - MemFree( gpCurrentSectorSummary ); - gpCurrentSectorSummary = NULL; - } -#endif sprintf( str, "%c%d", gsSelSectorY + 'A' - 1, gsSelSectorX ); EvaluateWorld( str, (UINT8)giCurrLevel ); @@ -3140,11 +3075,11 @@ void ApologizeOverrideAndForceUpdateEverything() //Draw it DrawButton( iSummaryButton[ SUMMARY_BACKGROUND ] ); InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); - SetFont( HUGEFONT ); + SetFont( GetHugeFont() ); SetFontForeground( FONT_RED ); SetFontShadow( FONT_NEARBLACK ); swprintf( str, pApologizeOverrideAndForceUpdateEverythingText[0] ); - mprintf( (iScreenWidthOffset + 320) - StringPixLength( str, HUGEFONT )/2, iScreenHeightOffset + 105, str ); + mprintf( (iScreenWidthOffset + 320) - StringPixLength( str, GetHugeFont() )/2, iScreenHeightOffset + 105, str ); SetFont( FONT10ARIAL ); SetFontForeground( FONT_YELLOW ); swprintf( str, pApologizeOverrideAndForceUpdateEverythingText[1], gusNumberOfMapsToBeForceUpdated ); @@ -3258,220 +3193,6 @@ void ApologizeOverrideAndForceUpdateEverything() gusNumberOfMapsToBeForceUpdated = 0; } -#if 0//dnl ch81 041213 this function is screwed up so decide to rewrite it -//CHRISL: ADB changed the way this load file is handled -extern int gEnemyPreservedTempFileVersion[256]; -extern int gCivPreservedTempFileVersion[256]; -void SetupItemDetailsMode( BOOLEAN fAllowRecursion ) -{ - HWFILE hfile; - UINT32 uiNumBytesRead; - UINT32 uiNumItems; - CHAR8 szFilename[40]; - BASIC_SOLDIERCREATE_STRUCT basic; - SOLDIERCREATE_STRUCT priority; - INT32 i, j; - UINT16 usNumItems; - OBJECTTYPE *pItem; - UINT16 usPEnemyIndex, usNEnemyIndex; - - SUMMARYFILE *s = gpCurrentSectorSummary; - MAPCREATE_STRUCT *m = &gpCurrentSectorSummary->MapInfo; - - //Clear memory for all the item summaries loaded - if( gpWorldItemsSummaryArray ) - { - delete[]( gpWorldItemsSummaryArray ); - gpWorldItemsSummaryArray = NULL; - gusWorldItemsSummaryArraySize = 0; - } - if( gpPEnemyItemsSummaryArray ) - { - delete[]( gpPEnemyItemsSummaryArray ); - gpPEnemyItemsSummaryArray = NULL; - gusPEnemyItemsSummaryArraySize = 0; - } - if( gpNEnemyItemsSummaryArray ) - { - delete[]( gpNEnemyItemsSummaryArray ); - gpNEnemyItemsSummaryArray = NULL; - gusNEnemyItemsSummaryArraySize = 0; - } - - if( !gpCurrentSectorSummary->uiNumItemsPosition ) - { //Don't have one, so generate them - if( gpCurrentSectorSummary->ubSummaryVersion == GLOBAL_SUMMARY_VERSION ) - gusNumEntriesWithOutdatedOrNoSummaryInfo++; - SummaryUpdateCallback( ButtonList[ iSummaryButton[ SUMMARY_UPDATE ] ], MSYS_CALLBACK_REASON_LBUTTON_UP ); - } - //Open the original map for the sector - sprintf( szFilename, "MAPS\\%S", gszFilename ); - hfile = FileOpen( szFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE ); - if( !hfile ) - { //The file couldn't be found! - return; - } - // ADB: The uiNumItemsPosition may be 0 here due to the recursion further down. - // If so, skip the read - uiNumItems = 0; - if (gpCurrentSectorSummary->uiNumItemsPosition) - { - //Now fileseek directly to the file position where the number of world items are stored - if( !FileSeek( hfile, gpCurrentSectorSummary->uiNumItemsPosition, FILE_SEEK_FROM_START ) ) - { //Position couldn't be found! - FileClose( hfile ); - return; - } - //Now load the number of world items from the map. - FileRead( hfile, &uiNumItems, 4, &uiNumBytesRead ); - if( uiNumBytesRead != 4 ) - { //Invalid situation. - FileClose( hfile ); - return; - } - } - - //Now compare this number with the number the summary thinks we should have. If they are different, - //then the summary doesn't match the map. What we will do is force regenerate the map so that they do - //match - if( uiNumItems != gpCurrentSectorSummary->usNumItems && fAllowRecursion ) - { - FileClose( hfile ); - gpCurrentSectorSummary->uiNumItemsPosition = 0; - SetupItemDetailsMode( FALSE ); - return; - } - //Passed the gauntlet, so now allocate memory for it, and load all the world items into this array. - ShowButton( iSummaryButton[ SUMMARY_SCIFI ] ); - ShowButton( iSummaryButton[ SUMMARY_REAL ] ); - ShowButton( iSummaryButton[ SUMMARY_ENEMY ] ); - gpWorldItemsSummaryArray = new WORLDITEM[ uiNumItems ]; - gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems; - for (unsigned int x = 0; x < uiNumItems; ++x) - { - gpWorldItemsSummaryArray[x].Load(hfile, s->dMajorMapVersion, m->ubMapVersion); - } - - //NOW, do the enemy's items! - //We need to do two passes. The first pass simply processes all the enemies and counts all the droppable items - //keeping track of two different values. The first value is the number of droppable items that come off of - //enemy detailed placements, the other counter keeps track of the number of droppable items that come off of - //normal enemy placements. After doing this, the memory is allocated for the tables that will store all the item - //summary information, then the second pass will repeat the process, except it will record the actual items. - - //PASS #1 - if( !FileSeek( hfile, gpCurrentSectorSummary->uiEnemyPlacementPosition, FILE_SEEK_FROM_START ) ) - { //Position couldn't be found! - FileClose( hfile ); - return; - } - for( i = 0; i < gpCurrentSectorSummary->MapInfo.ubNumIndividuals ; i++ ) - { - FileRead( hfile, &basic, sizeof( BASIC_SOLDIERCREATE_STRUCT ), &uiNumBytesRead ); - if( uiNumBytesRead != sizeof( BASIC_SOLDIERCREATE_STRUCT ) ) - { //Invalid situation. - FileClose( hfile ); - return; - } - if( basic.fDetailedPlacement ) - { //skip static priority placement - if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) ) - { //Invalid situation. - FileClose( hfile ); - return; - } - } - else - { //non detailed placements don't have items, so skip - continue; - } - if( basic.bTeam == ENEMY_TEAM ) - { - //Count the items that this enemy placement drops - usNumItems = 0; - for( j = 0; j < 9; j++ ) - { - pItem = &priority.Inv[ gbMercSlotTypes[ j ] ]; - if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) ) - { - usNumItems++; - } - } - if( basic.fPriorityExistance ) - { - gusPEnemyItemsSummaryArraySize += usNumItems; - } - else - { - gusNEnemyItemsSummaryArraySize += usNumItems; - } - } - } - - //Pass 1 completed, so now allocate enough space to hold all the items - if( gusPEnemyItemsSummaryArraySize ) - { - gpPEnemyItemsSummaryArray = new OBJECTTYPE[ gusPEnemyItemsSummaryArraySize ]; - } - if( gusNEnemyItemsSummaryArraySize ) - { - gpNEnemyItemsSummaryArray = new OBJECTTYPE[ gusNEnemyItemsSummaryArraySize ]; - } - - //PASS #2 - //During this pass, simply copy all the data instead of counting it, now that we have already done so. - usPEnemyIndex = usNEnemyIndex = 0; - if( !FileSeek( hfile, gpCurrentSectorSummary->uiEnemyPlacementPosition, FILE_SEEK_FROM_START ) ) - { //Position couldn't be found! - FileClose( hfile ); - return; - } - for( i = 0; i < gpCurrentSectorSummary->MapInfo.ubNumIndividuals ; i++ ) - { - FileRead( hfile, &basic, sizeof( BASIC_SOLDIERCREATE_STRUCT ), &uiNumBytesRead ); - if( uiNumBytesRead != sizeof( BASIC_SOLDIERCREATE_STRUCT ) ) - { //Invalid situation. - FileClose( hfile ); - return; - } - if( basic.fDetailedPlacement ) - { //skip static priority placement - if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) ) - { //Invalid situation. - FileClose( hfile ); - return; - } - } - else - { //non detailed placements don't have items, so skip - continue; - } - if( basic.bTeam == ENEMY_TEAM ) - { - //Copy the items that this enemy placement drops - usNumItems = 0; - for( j = 0; j < 9; j++ ) - { - pItem = &priority.Inv[ gbMercSlotTypes[ j ] ]; - if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) ) - { - if( basic.fPriorityExistance ) - { - gpPEnemyItemsSummaryArray[ usPEnemyIndex ] = *pItem; - usPEnemyIndex++; - } - else - { - gpNEnemyItemsSummaryArray[ usNEnemyIndex ] = *pItem; - usNEnemyIndex++; - } - } - } - } - } - FileClose( hfile ); -} -#else void SetupItemDetailsMode(BOOLEAN fAllowRecursion) { UINT32 uiNumItems, uiFileSize, uiBytesRead; @@ -3636,7 +3357,6 @@ L01: } } } -#endif UINT8 GetCurrentSummaryVersion() { diff --git a/Editor/SmartMethod.cpp b/Editor/SmartMethod.cpp index cc8bc034..af985cc3 100644 --- a/Editor/SmartMethod.cpp +++ b/Editor/SmartMethod.cpp @@ -1,18 +1,12 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "worlddef.h" //LEVELNODE def #include "worldman.h" //ReplaceStructIndex #include "SmartMethod.h" #include "Smoothing Utils.h" #include "Editor Undo.h" -#endif UINT8 gubDoorUIValue = 0; UINT8 gubWindowUIValue = 0; diff --git a/Editor/Smoothing Utils.cpp b/Editor/Smoothing Utils.cpp index 66a6bf47..b70e5453 100644 --- a/Editor/Smoothing Utils.cpp +++ b/Editor/Smoothing Utils.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "worlddef.h" //for LEVELNODE def #include "worldman.h" //for RemoveXXXX() @@ -17,7 +12,6 @@ #include "EditorDefines.h" #include "edit_sys.h" #include "environment.h" -#endif extern UINT16 PickAWallPiece( UINT16 usWallPieceType ); diff --git a/Editor/XML_ActionItems.cpp b/Editor/XML_ActionItems.cpp index 75ad2536..c089b93d 100644 --- a/Editor/XML_ActionItems.cpp +++ b/Editor/XML_ActionItems.cpp @@ -1,9 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else - #include "Editor All.h" #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -11,7 +5,6 @@ #include "Interface.h" #include "Item Statistics.h" #include "LuaInitNPCs.h" -#endif #include "Action Items.h" diff --git a/Editor/edit_sys.cpp b/Editor/edit_sys.cpp index 8f204c9c..3fa29012 100644 --- a/Editor/edit_sys.cpp +++ b/Editor/edit_sys.cpp @@ -1,13 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "worlddef.h" #include "worldman.h" #include "smooth.h" @@ -32,7 +27,6 @@ #include "Keys.h" #include "EditorMapInfo.h" #include "EditorItems.h" -#endif #include "input.h" diff --git a/Editor/editscreen.cpp b/Editor/editscreen.cpp index 0cb7d4c7..a62be1e5 100644 --- a/Editor/editscreen.cpp +++ b/Editor/editscreen.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "sgp.h" #include "vobject.h" #include "worlddef.h" @@ -79,7 +74,6 @@ #include "Cursor Control.h"//dnl ch2 210909 #include "maputility.h"//dnl ch49 061009 #include "Text.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -511,8 +505,6 @@ BOOLEAN EditModeShutdown( void ) RemoveLightPositionHandles( ); - MapOptimize(); - RemoveCursors(); fHelpScreen = FALSE; @@ -2096,22 +2088,7 @@ void HandleKeyboardShortcuts( ) // item left scroll if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE ) { -#if 0//dnl ch80 011213 - if( eInfo.sScrollIndex ) - { - if( EditorInputEvent.usKeyState & CTRL_DOWN ) - eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 60, 0); - else - eInfo.sScrollIndex--; - - if( !eInfo.sScrollIndex ) - DisableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex < ((eInfo.sNumItems+1)/2)-6 ) - EnableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); - } -#else ScrollEditorItemsInfo(FALSE); -#endif } else { @@ -2126,21 +2103,7 @@ void HandleKeyboardShortcuts( ) // item right scroll if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE ) { -#if 0//dnl ch80 011213 - if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) ) - { - if( EditorInputEvent.usKeyState & CTRL_DOWN ) - eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 60, (eInfo.sNumItems+1)/2-6); - else - eInfo.sScrollIndex++; - - EnableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0) ) - DisableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); - } -#else ScrollEditorItemsInfo(TRUE); -#endif } else { @@ -2155,22 +2118,7 @@ void HandleKeyboardShortcuts( ) // item left scroll by page if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE ) { -#if 0//dnl ch80 011213 - if( eInfo.sScrollIndex ) - { - if( EditorInputEvent.usKeyState & CTRL_DOWN ) - eInfo.sScrollIndex = 0; - else - eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 6, 0); - - if( !eInfo.sScrollIndex ) - DisableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex < ((eInfo.sNumItems+1)/2)-6 ) - EnableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); - } -#else ScrollEditorItemsInfo(FALSE); -#endif } //gfRenderTaskbar = TRUE; break; @@ -2178,21 +2126,7 @@ void HandleKeyboardShortcuts( ) // item right scroll by page if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE ) { -#if 0//dnl ch80 011213 - if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) ) - { - if( EditorInputEvent.usKeyState & CTRL_DOWN ) - eInfo.sScrollIndex = max( ((eInfo.sNumItems+1)/2)-6, 0); - else - eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 6, (eInfo.sNumItems+1)/2-6); - - EnableButton( iEditorButton[ITEMS_LEFTSCROLL] ); - if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0) ) - DisableButton( iEditorButton[ITEMS_RIGHTSCROLL] ); - } -#else ScrollEditorItemsInfo(TRUE); -#endif } //gfRenderTaskbar = TRUE; break; @@ -3270,65 +3204,6 @@ BOOLEAN PlaceLight( INT16 sRadius, INT16 iMapX, INT16 iMapY, INT16 sType, INT8 b // Returns TRUE if deleted the light, otherwise, returns FALSE. // i.e. FALSE is not an error condition! // -#if 0//dnl ch86 210214 -BOOLEAN RemoveLight( INT16 iMapX, INT16 iMapY ) -{ - INT32 iCount; - UINT16 cnt; - SOLDIERTYPE *pSoldier; - BOOLEAN fSoldierLight; - BOOLEAN fRemovedLight; - INT32 iMapIndex = 0; - UINT32 uiLastLightType = 0; - UINT8 *pLastLightName = NULL; - - fRemovedLight = FALSE; - - // Check all lights if any at this given position - for(iCount=0; iCount < MAX_LIGHT_SPRITES; iCount++) - { - if(LightSprites[iCount].uiFlags & LIGHT_SPR_ACTIVE) - { - if ( LightSprites[iCount].iX == iMapX && LightSprites[iCount].iY == iMapY ) - { - // Found a light, so let's see if it belong to a merc! - fSoldierLight = FALSE; - for ( cnt = 0; cnt < MAX_NUM_SOLDIERS && !fSoldierLight; cnt++ ) - { - if ( GetSoldier( &pSoldier, cnt ) ) - { - if ( pSoldier->iLight == iCount ) - fSoldierLight = TRUE; - } - } - - if ( !fSoldierLight ) - { - // Ok, it's not a merc's light so kill it! - pLastLightName = (UINT8 *) LightSpriteGetTypeName( iCount ); - uiLastLightType = LightSprites[iCount].uiLightType; - LightSpritePower( iCount, FALSE ); - LightSpriteDestroy( iCount ); - fRemovedLight = TRUE; - iMapIndex = ((INT32)iMapY * WORLD_COLS) + (INT32)iMapX; - RemoveAllObjectsOfTypeRange( iMapIndex, GOODRING, GOODRING ); - } - } - } - } - if( fRemovedLight ) - { - UINT16 usRadius; - //Assuming that the light naming convention doesn't change, then this following conversion - //should work. Basically, the radius values aren't stored in the lights, so I have pull - //the radius out of the filename. Ex: L-RO5.LHT - usRadius = pLastLightName[4] - 0x30; - AddLightToUndoList( iMapIndex, usRadius, (UINT8)uiLastLightType ); - } - - return( fRemovedLight ); -} -#else BOOLEAN RemoveLight(INT16 iMapX, INT16 iMapY, INT8 bLightType) { INT32 iCount, iMapIndex; @@ -3346,7 +3221,6 @@ BOOLEAN RemoveLight(INT16 iMapX, INT16 iMapY, INT8 bLightType) RemoveAllObjectsOfTypeRange(iMapIndex, GOODRING, GOODRING); return(fRemovedLight); } -#endif //---------------------------------------------------------------------------------------------- // ShowLightPositionHandles @@ -3465,97 +3339,6 @@ BOOLEAN CheckForSlantRoofs( void ) -//---------------------------------------------------------------------------------------------- -// MapOptimize -// -// Runs through all map locations, and if it's outside the visible world, then we remove -// EVERYTHING from it since it will never be seen! -// -// If it can be seen, then we remove all extraneous land tiles. We find the tile that has the first -// FULL TILE indicator, and delete anything that may come after it (it'll never be seen anyway) -// -// Doing the above has shown to free up about 1.1 Megs on the default map. Deletion of non-viewable -// land pieces alone gained us about 600 K of memory. -// -void MapOptimize(void) -{ -#if 0 - INT32 GridNo; - LEVELNODE *start, *head, *end, *node, *temp; - MAP_ELEMENT *pMapTile; - BOOLEAN fFound, fChangedHead, fChangedTail; - - for( GridNo = 0; GridNo < WORLD_MAX; GridNo++ ) - { - if ( !GridNoOnVisibleWorldTile( GridNo ) ) - { - // Tile isn't in viewable area so trash everything in it - TrashMapTile( GridNo ); - } - else - { - // Tile is in viewable area so try to optimize any extra land pieces - pMapTile = &gpWorldLevelData[ GridNo ]; - - node = start = pMapTile->pLandStart; - head = pMapTile->pLandHead; - - if ( start == NULL ) - node = start = head; - - end = pMapTile->pLandTail; - - fChangedHead = fChangedTail = fFound = FALSE; - while ( !fFound && node != NULL ) - { - if ( gTileDatabase[node->usIndex].ubFullTile == 1 ) - fFound = TRUE; - else - node = node->pNext; - } - - if(fFound) - { - // Delete everything up to the start node -/* -// Not having this means we still keep the smoothing - - while( head != start && head != NULL ) - { - fChangedHead = TRUE; - temp = head->pNext; - MemFree( head ); - head = temp; - if ( head ) - head->pPrev = NULL; - } -*/ - - // Now delete from the end to "node" - while( end != node && end != NULL ) - { - fChangedTail = TRUE; - temp = end->pPrev; - MemFree( end ); - end = temp; - if ( end ) - end->pNext = NULL; - } - - if ( fChangedHead ) - pMapTile->pLandHead = head; - - if ( fChangedTail ) - pMapTile->pLandTail = end; - } - } - } - -#endif -} - - - //---------------------------------------------------------------------------------------------- // CheckForFences // @@ -3935,29 +3718,11 @@ void HandleMouseClicksInGameScreen()//dnl ch80 011213 { if(iLastMapIndexRB != iMapIndex && iLastMapIndexRB == -1) iLastMapIndexRB = iMapIndex; -#if 0 - gfRenderWorld = TRUE; - switch(iDrawMode) - { - default: - gfRenderWorld = fPrevState; - break; - } -#endif } else if(_MiddleButtonDown) { if(iLastMapIndexMB != iMapIndex && iLastMapIndexMB == -1) iLastMapIndexMB = iMapIndex; -#if 0 - gfRenderWorld = TRUE; - switch(iDrawMode) - { - default: - gfRenderWorld = fPrevState; - break; - } -#endif } else if(!_LeftButtonDown) { @@ -4198,15 +3963,6 @@ void HandleMouseClicksInGameScreen()//dnl ch80 011213 { if(iMapIndex == iLastMapIndexMB)// MiddleClick performed on same tile { -#if 0 - gfRenderWorld = TRUE; - switch(iDrawMode) - { - default: - gfRenderWorld = fPrevState; - break; - } -#endif } iLastMapIndexMB = -1; } diff --git a/Editor/editscreen.h b/Editor/editscreen.h index 78e0d025..1f3c591a 100644 --- a/Editor/editscreen.h +++ b/Editor/editscreen.h @@ -57,8 +57,6 @@ void HideEditorToolbar( INT32 iOldTaskMode ); void ProcessSelectionArea(); -void MapOptimize(void); - extern UINT16 GenericButtonFillColors[40]; //These go together. The taskbar has a specific color scheme. diff --git a/Editor/messagebox.cpp b/Editor/messagebox.cpp index aab02a52..52226450 100644 --- a/Editor/messagebox.cpp +++ b/Editor/messagebox.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "vobject.h" #include "video.h" #include "font.h" @@ -14,7 +9,6 @@ #include "messagebox.h" #include "input.h" #include "english.h" -#endif //internal variables. INT32 iMsgBoxNum; diff --git a/Editor/newsmooth.cpp b/Editor/newsmooth.cpp index de95b8a6..2123937a 100644 --- a/Editor/newsmooth.cpp +++ b/Editor/newsmooth.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include #include "tiledef.h" #include "worlddef.h" @@ -21,7 +16,6 @@ #include "environment.h" #include "Random.h" #include "Render Fun.h" -#endif BOOLEAN CaveAtGridNo( INT32 iMapIndex ); diff --git a/Editor/popupmenu.cpp b/Editor/popupmenu.cpp index 1746376f..8d43a90a 100644 --- a/Editor/popupmenu.cpp +++ b/Editor/popupmenu.cpp @@ -10,15 +10,10 @@ //supported. Just remove the commented line of code (search for UNCOMMENT), and it's fixed -- it is //currently disabled. -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "tiledef.h" #include "sysutil.h" #include "font.h" @@ -37,7 +32,6 @@ #include "Scheduling.h" #include "english.h" #include "Item Statistics.h" -#endif CurrentPopupMenuInformation gPopupData; diff --git a/Editor/selectwin.cpp b/Editor/selectwin.cpp index 1d0a6d20..06ee221b 100644 --- a/Editor/selectwin.cpp +++ b/Editor/selectwin.cpp @@ -1,14 +1,9 @@ // WANNE: EDITOR: todo -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "tiledef.h" #include "vsurface.h" #include "worlddat.h" @@ -18,7 +13,6 @@ #include "selectwin.h" #include "EditorDefines.h" #include "Editor Taskbar Utils.h" -#endif #include "vobject_blitters.h" #include "Text.h" diff --git a/Editor/smooth.cpp b/Editor/smooth.cpp index 623bc3e3..c835a29a 100644 --- a/Editor/smooth.cpp +++ b/Editor/smooth.cpp @@ -1,12 +1,7 @@ -#ifdef PRECOMPILEDHEADERS - #include "Editor All.h" -#else #include "builddefines.h" -#endif #ifdef JA2EDITOR -#ifndef PRECOMPILEDHEADERS #include "stdlib.h" #include "FileMan.h" #include "time.h" @@ -21,7 +16,6 @@ #include "structure wrap.h" #include "Exit Grids.h" #include "Editor Undo.h" -#endif INT16 gbSmoothStruct[] = diff --git a/Fade Screen.cpp b/Fade Screen.cpp index 9e7d930f..f201e7bd 100644 --- a/Fade Screen.cpp +++ b/Fade Screen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "sgp.h" #include "screenids.h" #include "Timer Control.h" @@ -12,7 +9,6 @@ #include "music control.h" #include "Render Dirty.h" #include "gameloop.h" -#endif #define SQUARE_STEP 8 diff --git a/FeaturesScreen.cpp b/FeaturesScreen.cpp index fca10e4d..92d0b60f 100644 --- a/FeaturesScreen.cpp +++ b/FeaturesScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "JA2 All.h" -#else #include "Types.h" #include "FeaturesScreen.h" #include "Video.h" @@ -34,7 +31,6 @@ #include "Map Information.h" #include "Sys Globals.h" #include "insurance.h" -#endif #include "connect.h" #include "WorldMan.h" @@ -1521,7 +1517,7 @@ void HandleHighLightedText(BOOLEAN fHighLight) bLastRegion = -1; } - if (bHighLight != -1) + if (bHighLight != -1 && toggle_box_array[bHighLight] != -1) { if (bHighLight < OPT_FIRST_COLUMN_TOGGLE_CUT_OFF) { diff --git a/GameInitOptionsScreen.cpp b/GameInitOptionsScreen.cpp index c1ac82f6..fcad1e9d 100644 --- a/GameInitOptionsScreen.cpp +++ b/GameInitOptionsScreen.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Intro.h" -#else #include "Types.h" #include "GameInitOptionsScreen.h" #include "GameSettings.h" @@ -22,7 +18,6 @@ #include "Text.h" #include "_Ja25EnglishText.h" #include "Soldier Profile.h" -#endif #include "gameloop.h" #include "connect.h" @@ -4158,7 +4153,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason ) if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT ) { UINT8 maxSquadSize = GIO_SQUAD_SIZE_10; - if (iResolution >= _800x600 && iResolution < _1024x768) + if (iResolution >= _800x600 && iResolution < _1280x720) maxSquadSize = GIO_SQUAD_SIZE_8; if ( iCurrentSquadSize < maxSquadSize ) @@ -4178,7 +4173,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason ) btn->uiFlags|=(BUTTON_CLICKED_ON); UINT8 maxSquadSize = GIO_SQUAD_SIZE_10; - if (iResolution >= _800x600 && iResolution < _1024x768) + if (iResolution >= _800x600 && iResolution < _1280x720) maxSquadSize = GIO_SQUAD_SIZE_8; if ( iCurrentSquadSize < maxSquadSize ) diff --git a/GameSettings.cpp b/GameSettings.cpp index 49ec4290..3791ae0c 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1,10 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "HelpScreen.h" - #include "Campaign.h" - #include "Cheats.h" - #include "INIReader.h" -#else #include "Types.h" #include "GameSettings.h" #include "FileMan.h" @@ -36,7 +29,6 @@ #include "Init.h" #include "InterfaceItemImages.h" #include "DynamicDialogue.h" // added by Flugente -#endif #include "KeyMap.h" #include "Timer Control.h" @@ -256,6 +248,7 @@ void UpdateFeatureFlags() gGameExternalOptions.gfAllowSnow = gGameSettings.fFeatures[FF_ALLOW_SNOW]; gGameExternalOptions.fMiniEventsEnabled = gGameSettings.fFeatures[FF_MINI_EVENTS]; gGameExternalOptions.fRebelCommandEnabled = gGameSettings.fFeatures[FF_REBEL_COMMAND]; + gGameExternalOptions.fStrategicTransportGroupsEnabled = gGameSettings.fFeatures[FF_STRATEGIC_TRANSPORT_GROUPS]; } else { @@ -292,7 +285,7 @@ BOOLEAN LoadGameSettings() gGameSettings.fOptions[TOPTION_RTCONFIRM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RTCONFIRM" , FALSE ); gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SLEEPWAKE_NOTIFICATION" , TRUE ); gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_METRIC_SYSTEM" , TRUE ); - gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERC_ALWAYS_LIGHT_UP" , FALSE ); + gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_MERC_CASTS_LIGHT" , FALSE); gGameSettings.fOptions[TOPTION_SMART_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SMART_CURSOR" , FALSE ); gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SNAP_CURSOR_TO_DOOR" , TRUE ); gGameSettings.fOptions[TOPTION_GLOW_ITEMS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GLOW_ITEMS" , TRUE ); @@ -340,6 +333,8 @@ BOOLEAN LoadGameSettings() else gGameSettings.fOptions[TOPTION_TOGGLE_TURN_MODE] = FALSE; + gGameSettings.fOptions[TOPTION_ALT_START_AIM] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_START_AIM" , FALSE); // Start at max aiming level instead of default no aiming + gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_PATHFINDING" , FALSE); // A* pathfinding gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERCENARY_FORMATIONS" , TRUE ); // Flugente: mercenary formations gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ENEMY_LOCATION" , FALSE); // sevenfm: show locations of known enemies gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report @@ -361,7 +356,6 @@ BOOLEAN LoadGameSettings() gGameSettings.fOptions[TOPTION_DEBUG_MODE_OPTIONS_END] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DEBUG_MODE_OPTIONS_END" , FALSE ); gGameSettings.fOptions[TOPTION_LAST_OPTION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_LAST_OPTION" , FALSE ); gGameSettings.fOptions[NUM_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_GAME_OPTIONS" , FALSE ); - gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERC_CASTS_LIGHT" , TRUE ); gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE ); gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE ); gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , FALSE ); @@ -504,6 +498,7 @@ BOOLEAN LoadFeatureFlags() gGameSettings.fFeatures[FF_ALLOW_SNOW] = iniReader.ReadBoolean("JA2 Feature Flags", "FF_ALLOW_SNOW", TRUE, FALSE); gGameSettings.fFeatures[FF_MINI_EVENTS] = iniReader.ReadBoolean("JA2 Feature Flags", "FF_MINI_EVENTS", FALSE, FALSE); gGameSettings.fFeatures[FF_REBEL_COMMAND] = iniReader.ReadBoolean("JA2 Feature Flags", "FF_REBEL_COMMAND", FALSE, FALSE); + gGameSettings.fFeatures[FF_STRATEGIC_TRANSPORT_GROUPS] = iniReader.ReadBoolean("JA2 Feature Flags", "FF_STRATEGIC_TRANSPORT_GROUPS", FALSE, FALSE); } } catch(vfs::Exception) @@ -580,7 +575,7 @@ BOOLEAN SaveGameSettings() settings << "TOPTION_RTCONFIRM = " << (gGameSettings.fOptions[TOPTION_RTCONFIRM] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SLEEPWAKE_NOTIFICATION = " << (gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_USE_METRIC_SYSTEM = " << (gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] ? "TRUE" : "FALSE" ) << endl; - settings << "TOPTION_MERC_ALWAYS_LIGHT_UP = " << (gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] ? "TRUE" : "FALSE" ) << endl; + settings << "TOPTION_MERC_CASTS_LIGHT = " << (gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] ? "TRUE" : "FALSE") << endl; settings << "TOPTION_SMART_CURSOR = " << (gGameSettings.fOptions[TOPTION_SMART_CURSOR] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SNAP_CURSOR_TO_DOOR = " << (gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_GLOW_ITEMS = " << (gGameSettings.fOptions[TOPTION_GLOW_ITEMS] ? "TRUE" : "FALSE" ) << endl; @@ -616,12 +611,14 @@ BOOLEAN SaveGameSettings() settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_LAST_ENEMY = " << (gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_LBE_CONTENT = " << (gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] ? "TRUE" : "FALSE" ) << endl; - settings << "TOPTION_INVERT_WHEEL = " << (gGameSettings.fOptions[TOPTION_INVERT_WHEEL] ? "TRUE" : "FALSE" ) << endl; + settings << "TOPTION_INVERT_WHEEL = " << (gGameSettings.fOptions[TOPTION_INVERT_WHEEL] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_ZOMBIES = " << (gGameSettings.fOptions[TOPTION_ZOMBIES] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_ENABLE_INVENTORY_POPUPS = " << (gGameSettings.fOptions[TOPTION_ENABLE_INVENTORY_POPUPS] ? "TRUE" : "FALSE" ) << endl; // the_bob : enable popups for picking items from sector inv settings << "TOPTION_MERCENARY_FORMATIONS = " << (gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_SHOW_ENEMY_LOCATION = " << (gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] ? "TRUE" : "FALSE" ) << endl; + settings << "TOPTION_ALT_START_AIM = " << (gGameSettings.fOptions[TOPTION_ALT_START_AIM] ? "TRUE" : "FALSE") << endl; + settings << "TOPTION_ALT_PATHFINDING = " << (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] ? "TRUE" : "FALSE") << endl; settings << "TOPTION_CHEAT_MODE_OPTIONS_HEADER = " << (gGameSettings.fOptions[TOPTION_CHEAT_MODE_OPTIONS_HEADER] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_FORCE_BOBBY_RAY_SHIPMENTS = " << (gGameSettings.fOptions[TOPTION_FORCE_BOBBY_RAY_SHIPMENTS] ? "TRUE" : "FALSE" ) << endl; @@ -641,7 +638,6 @@ BOOLEAN SaveGameSettings() settings << ";******************************************************************************************************************************" << endl; settings << "TOPTION_LAST_OPTION = " << (gGameSettings.fOptions[TOPTION_LAST_OPTION] ? "TRUE" : "FALSE" ) << endl; settings << "NUM_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl; - settings << "TOPTION_MERC_CASTS_LIGHT = " << (gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_HIDE_BULLETS = " << (gGameSettings.fOptions[TOPTION_HIDE_BULLETS] ? "TRUE" : "FALSE" ) << endl; settings << "TOPTION_TRACKING_MODE = " << (gGameSettings.fOptions[TOPTION_TRACKING_MODE] ? "TRUE" : "FALSE" ) << endl; settings << "NUM_ALL_GAME_OPTIONS = " << (gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] ? "TRUE" : "FALSE" ) << endl; @@ -731,6 +727,7 @@ BOOLEAN SaveFeatureFlags() settings << "FF_ALLOW_SNOW = " << (gGameSettings.fFeatures[FF_ALLOW_SNOW] ? "TRUE" : "FALSE") << endl; settings << "FF_MINI_EVENTS = " << (gGameSettings.fFeatures[FF_MINI_EVENTS] ? "TRUE" : "FALSE") << endl; settings << "FF_REBEL_COMMAND = " << (gGameSettings.fFeatures[FF_REBEL_COMMAND] ? "TRUE" : "FALSE") << endl; + settings << "FF_STRATEGIC_TRANSPORT_GROUPS = " << (gGameSettings.fFeatures[FF_STRATEGIC_TRANSPORT_GROUPS] ? "TRUE" : "FALSE") << endl; try { @@ -785,7 +782,7 @@ void InitGameSettings() gGameSettings.fOptions[ TOPTION_RTCONFIRM ] = FALSE; gGameSettings.fOptions[ TOPTION_SLEEPWAKE_NOTIFICATION ] = TRUE; gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] = TRUE; - gGameSettings.fOptions[ TOPTION_MERC_ALWAYS_LIGHT_UP ] = FALSE; + gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = FALSE; gGameSettings.fOptions[ TOPTION_SMART_CURSOR ] = FALSE; gGameSettings.fOptions[ TOPTION_SNAP_CURSOR_TO_DOOR ] = TRUE; gGameSettings.fOptions[ TOPTION_GLOW_ITEMS ] = TRUE; @@ -849,7 +846,9 @@ void InitGameSettings() gGameSettings.fOptions[TOPTION_INVERT_WHEEL] = FALSE; gGameSettings.fOptions[ TOPTION_MERCENARY_FORMATIONS ] = FALSE; // Flugente: mercenary formations - gGameSettings.fOptions[ TOPTION_SHOW_ENEMY_LOCATION ] = FALSE; // sevenfm: show locations of known enemies + gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = FALSE; // sevenfm: show locations of known enemies + gGameSettings.fOptions[TOPTION_ALT_START_AIM] = FALSE; + gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = FALSE; // arynn: Cheat/Debug Menu gGameSettings.fOptions[ TOPTION_CHEAT_MODE_OPTIONS_HEADER ] = FALSE; @@ -878,8 +877,6 @@ void InitGameSettings() gGameSettings.fOptions[ NUM_GAME_OPTIONS ] = FALSE; // Toggles prior to this will be able to be toggled by the player // JA2Gold - gGameSettings.fOptions[ TOPTION_MERC_CASTS_LIGHT ] = TRUE; - gGameSettings.fOptions[ TOPTION_HIDE_BULLETS ] = FALSE; gGameSettings.fOptions[ TOPTION_TRACKING_MODE ] = TRUE; @@ -1431,6 +1428,11 @@ void LoadGameExternalOptions() gGameExternalOptions.usLeadershipSubpointsToImprove = iniReader.ReadInteger("Tactical Difficulty Settings","LEADERSHIP_SUBPOINTS_TO_IMPROVE", 25, 1, 1000 ); gGameExternalOptions.usLevelSubpointsToImprove = iniReader.ReadInteger("Tactical Difficulty Settings","LEVEL_SUBPOINTS_TO_IMPROVE", 350, 1, 6500); + // rftr: optionally slow stat growth at 80+ and 90+. this gives more value to mercs with high base stats + gGameExternalOptions.ubMaxGrowthChanceAt80 = iniReader.ReadInteger("Tactical Difficulty Settings", "MAX_GROWTH_CHANCE_AT_80", 100, 1, 100); + gGameExternalOptions.ubMaxGrowthChanceAt90 = iniReader.ReadInteger("Tactical Difficulty Settings", "MAX_GROWTH_CHANCE_AT_90", 100, 1, 100); + + // Alternate algorithm for choosing equipment level. Mostly disregards soldier's class and puts less emphasis on distance from Sector P3. // SANDRO - moved into the game //gGameExternalOptions.fSlowProgressForEnemyItemsChoice = iniReader.ReadBoolean("Tactical Difficulty Settings", "SLOW_PROGRESS_FOR_ENEMY_ITEMS_CHOICE", TRUE); @@ -2167,6 +2169,10 @@ void LoadGameExternalOptions() gGameExternalOptions.fAlternativeHelicopterFuelSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","ALTERNATIVE_HELICOPTER_FUEL_SYSTEM", TRUE); gGameExternalOptions.fHelicopterPassengersCanGetHit = iniReader.ReadBoolean("Strategic Gameplay Settings","HELICOPTER_PASSENGERS_CAN_GET_HIT", TRUE); + gGameExternalOptions.fStrategicTransportGroupsDebug = iniReader.ReadBoolean("Strategic Gameplay Settings", "STRATEGIC_TRANSPORT_GROUPS_DEBUG", FALSE, FALSE); + gGameExternalOptions.fStrategicTransportGroupsEnabled = iniReader.ReadBoolean("Strategic Gameplay Settings", "STRATEGIC_TRANSPORT_GROUPS_ENABLED", FALSE); + gGameExternalOptions.iMaxSimultaneousTransportGroups = iniReader.ReadInteger("Strategic Gameplay Settings", "MAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", 5, 1, 10); + //################# Morale Settings ################## gGameExternalOptions.sMoraleModAppearance = iniReader.ReadInteger("Morale Settings","MORALE_MOD_APPEARANCE", 1, 0, 5); gGameExternalOptions.sMoraleModRefinement = iniReader.ReadInteger("Morale Settings","MORALE_MOD_REFINEMENT", 2, 0, 5); @@ -2851,7 +2857,7 @@ void LoadSkillTraitsExternalSettings() // Flugente: RADIO OPERATOR gSkillTraitValues.fROAllowArtillery = iniReader.ReadBoolean("Radio Operator","RADIO_OPERATOR_ARTILLERY", TRUE); gSkillTraitValues.fROArtilleryDistributedOverTurns = iniReader.ReadBoolean("Radio Operator","RADIO_OPERATOR_ARTILLERY_DISTRIBUTED_OVER_TURNS", FALSE); - gSkillTraitValues.bVOArtillerySectorFrequency = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_ARTILLERY_SECTOR_FREQUENCY", 120, 20, 1440); + gSkillTraitValues.bVOArtillerySectorFrequency = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_ARTILLERY_SECTOR_FREQUENCY", 120, 5, 1440); gSkillTraitValues.usVOMortarCountDivisor = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_MORTAR_COUNT_DIVISOR", 6, 5, 20); gSkillTraitValues.usVOMortarShellDivisor = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_MORTAR_SHELL_DIVISOR", 30, 2, 100); gSkillTraitValues.usVOMortarPointsAdmin = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_MORTAR_POINTS_ADMIN", 10, 0, 100); @@ -4157,6 +4163,127 @@ void LoadRebelCommandSettings() gRebelCommandSettings.iFortificationsBonus = iniReader.ReadInteger("Rebel Command Settings", "FORTIFICATIONS_BONUS", 10, 0, 100); + // agent missions + gRebelCommandSettings.iMissionBaseCost = iniReader.ReadInteger("Rebel Command Settings", "MISSION_BASE_COST", 500, 100, 10000); + gRebelCommandSettings.iMissionAdditionalCost = iniReader.ReadInteger("Rebel Command Settings", "MISSION_ADDITIONAL_COST", 250, 0, 10000); + gRebelCommandSettings.iMissionPrepTime = iniReader.ReadInteger("Rebel Command Settings", "MISSION_PREPARATION_TIME", 24, 1, 168); + gRebelCommandSettings.iMissionRefreshTimeDays = iniReader.ReadInteger("Rebel Command Settings", "MISSION_REFRESH_TIME_DAYS", 2, 1, 7); + gRebelCommandSettings.iMinLoyaltyForMission = iniReader.ReadInteger("Rebel Command Settings", "MIN_LOYALTY_FOR_MISSION", 51, 0, 100); + + gRebelCommandSettings.iDeepDeploymentSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iDeepDeploymentRangeNS = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_NS", 200, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeEW = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_EW", 350, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_NS_BONUS_COVERT", 50, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_EW_BONUS_COVERT" , 15, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Scouting = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_NS_BONUS_SCOUTING" , 25, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Scouting = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_EW_BONUS_SCOUTING" , 40, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Stealthy = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_NS_BONUS_STEALTHY" , 15, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Stealthy = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_EW_BONUS_STEALTHY" , 30, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Survival = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_NS_BONUS_SURVIVAL" , 15, 0, 1000); + gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Survival = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_RANGE_EW_BONUS_SURVIVAL" , 30, 0, 1000); + gRebelCommandSettings.iDeepDeploymentDuration = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_DURATION" , 72, 0, 255); + gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_DURATION_BONUS_COVERT" , 24, 0, 255); + gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Scouting = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_DURATION_BONUS_SCOUTING" , 48, 0, 255); + gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Stealthy = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_DURATION_BONUS_STEALTHY" , 36, 0, 255); + gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Survival = iniReader.ReadInteger("Rebel Command Settings", "DEEP_DEPLOYMENT_DURATION_BONUS_SURVIVAL" , 36, 0, 255); + + gRebelCommandSettings.iDisruptAsdSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.fDisruptAsdIncomeReductionModifier = iniReader.ReadFloat("Rebel Command Settings", "DISRUPT_ASD_INCOME_MODIFIER", 0.5f, 0.f, 1.f); + gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Covert = iniReader.ReadFloat("Rebel Command Settings", "DISRUPT_ASD_INCOME_MODIFIER_COVERT", 0.5f, 0.f, 1.f); + gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Demolitions = iniReader.ReadFloat("Rebel Command Settings", "DISRUPT_ASD_INCOME_MODIFIER_DEMOLITIONS", 0.5f, 0.f, 1.f); + gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Nightops = iniReader.ReadFloat("Rebel Command Settings", "DISRUPT_ASD_INCOME_MODIFIER_NIGHTOPS", 0.5f, 0.f, 1.f); + gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Technician = iniReader.ReadFloat("Rebel Command Settings", "DISRUPT_ASD_INCOME_MODIFIER_TECHNICIAN", 0.5f, 0.f, 1.f); + gRebelCommandSettings.iDisruptAsdDuration = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_DURATION", 72, 0, 255); + gRebelCommandSettings.iDisruptAsdDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_DURATION_BONUS_COVERT", 48, 0, 255); + gRebelCommandSettings.iDisruptAsdDuration_Bonus_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_DURATION_BONUS_DEMOLITIONS", 48, 0, 255); + gRebelCommandSettings.iDisruptAsdDuration_Bonus_Nightops = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_DURATION_BONUS_NIGHTOPS", 48, 0, 255); + gRebelCommandSettings.iDisruptAsdDuration_Bonus_Technician = iniReader.ReadInteger("Rebel Command Settings", "DISRUPT_ASD_DURATION_BONUS_TECHNICIAN", 48, 0, 255); + + gRebelCommandSettings.iForgeTransportOrdersSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "FORGE_TRANSPORT_ORDERS_SUCCESS_CHANCE", 50, 0, 100); + + gRebelCommandSettings.iGetEnemyMovementTargetsSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "STRATEGIC_INTEL_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iGetEnemyMovementTargetsDuration = iniReader.ReadInteger("Rebel Command Settings", "STRATEGIC_INTEL_DURATION", 72, 0, 255); + gRebelCommandSettings.iGetEnemyMovementTargetsDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "STRATEGIC_INTEL_DURATION_BONUS_COVERT", 48, 0, 255); + gRebelCommandSettings.iGetEnemyMovementTargetsDuration_Bonus_Radio = iniReader.ReadInteger("Rebel Command Settings", "STRATEGIC_INTEL_DURATION_BONUS_RADIO", 48, 0, 255); + + gRebelCommandSettings.iImproveLocalShopsSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "IMPROVE_LOCAL_SHOPS_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iImproveLocalShopsDuration = iniReader.ReadInteger("Rebel Command Settings", "IMPROVE_LOCAL_SHOPS_DURATION", 72, 0, 255); + + gRebelCommandSettings.iReduceStrategicDecisionSpeedSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier = iniReader.ReadFloat("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_MODIFIER", 1.1f, 1.f, 10.f); + gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Covert = iniReader.ReadFloat("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_MODIFIER_BONUS_COVERT", 1.25f, 1.f, 10.f); + gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Deputy = iniReader.ReadFloat("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_MODIFIER_BONUS_DEPUTY", 1.25f, 1.f, 10.f); + gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Snitch = iniReader.ReadFloat("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_MODIFIER_BONUS_SNITCH", 1.25f, 1.f, 10.f); + gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration = iniReader.ReadInteger("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_DURATION", 72, 0, 255); + gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_DURATION_BONUS_COVERT", 24, 0, 255); + gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Deputy = iniReader.ReadInteger("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_DURATION_BONUS_DEPUTY", 24, 0, 255); + gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Snitch = iniReader.ReadInteger("Rebel Command Settings", "SLOWER_STRATEGIC_DECISIONS_DURATION_BONUS_SNITCH", 24, 0, 255); + + gRebelCommandSettings.iReduceUnalertedEnemyVisionSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "LOWER_READINESS_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier = iniReader.ReadFloat("Rebel Command Settings", "LOWER_READINESS_MODIFIER", 0.15f, 0.f, 1.f); + gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Covert = iniReader.ReadFloat("Rebel Command Settings", "LOWER_READINESS_MODIFIER_COVERT", 0.15f, 0.f, 1.f); + gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Radio = iniReader.ReadFloat("Rebel Command Settings", "LOWER_READINESS_MODIFIER_RADIO", 0.15f, 0.f, 1.f); + gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Stealthy = iniReader.ReadFloat("Rebel Command Settings", "LOWER_READINESS_MODIFIER_STEALTHY", 0.15f, 0.f, 1.f); + gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration = iniReader.ReadInteger("Rebel Command Settings", "LOWER_READINESS_DURATION", 72, 0, 255); + gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "LOWER_READINESS_DURATION_BONUS_COVERT", 72, 0, 255); + gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration_Bonus_Radio = iniReader.ReadInteger("Rebel Command Settings", "LOWER_READINESS_DURATION_BONUS_RADIO", 72, 0, 255); + + gRebelCommandSettings.iSabotageInfantryEquipmentSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Auto_Weapons = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_AUTO_WEAPONS", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Covert = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_COVERT", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_DEMOLITIONS", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Gunslinger = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_GUNSLINGER", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Ranger = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_RANGER", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Sniper = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_MODIFIER_SNIPER", 10, 0, 100); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Auto_Weapons = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_AUTO_WEAPONS", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_COVERT", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_DEMOLITIONS", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Gunslinger = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_GUNSLINGER", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Ranger = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_RANGER", 72, 0, 255); + gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Sniper = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_EQUIPMENT_DURATION_BONUS_SNIPER", 72, 0, 255); + + gRebelCommandSettings.iSabotageMechanicalUnitsSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_STAT_LOSS", 20, 0, 100); + gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Covert = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_STAT_LOSS_COVERT", 20, 0, 100); + gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_STAT_LOSS_DEMOLITIONS", 20, 0, 100); + gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Heavy_Weapons = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_STAT_LOSS_HEAVY_WEAPONS", 20, 0, 100); + gRebelCommandSettings.iSabotageMechanicalUnitsDuration = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_DURATION", 72, 0, 255); + gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_DURATION_BONUS_COVERT", 72, 0, 255); + gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_DURATION_BONUS_DEMOLITIONS", 72, 0, 255); + gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Heavy_Weapons = iniReader.ReadInteger("Rebel Command Settings", "SABOTAGE_VEHICLES_DURATION_BONUS_HEAVY_WEAPONS", 72, 0, 255); + + gRebelCommandSettings.iSendSuppliesToTownSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "SEND_SUPPLIES_TO_TOWN_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iSendSuppliesToTownDuration = iniReader.ReadInteger("Rebel Command Settings", "SEND_SUPPLIES_TO_TOWN_DURATION", 72, 0, 255); + gRebelCommandSettings.iSendSuppliesToTownLoyaltyGain = iniReader.ReadInteger("Rebel Command Settings", "SEND_SUPPLIES_TO_TOWN_LOYALTY_GAIN", 500, 1, 10000); + gRebelCommandSettings.iSendSuppliesToTownInterval = iniReader.ReadInteger("Rebel Command Settings", "SEND_SUPPLIES_TO_TOWN_INTERVAL", 6, 1, 24); + + gRebelCommandSettings.iTrainMilitiaAnywhereSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_MAX_TRAINERS", 1, 1, 4); + gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers_Teaching = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_MAX_TRAINERS_TEACHING", 1, 1, 4); + gRebelCommandSettings.iTrainMilitiaAnywhereDuration = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_DURATION", 72, 0, 255); + gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_DURATION_BONUS_COVERT", 72, 0, 255); + gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Survival = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_DURATION_BONUS_SURVIVAL", 72, 0, 255); + gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Teaching = iniReader.ReadInteger("Rebel Command Settings", "TRAIN_MILITIA_ANYWHERE_DURATION_BONUS_TEACHING", 72, 0, 255); + + gRebelCommandSettings.iSoldierBountiesKingpinSuccessChance = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_SUCCESS_CHANCE", 50, 0, 100); + gRebelCommandSettings.iSoldierBountiesKingpinDuration = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_DURATION", 24, 0, 255); + gRebelCommandSettings.iSoldierBountiesKingpinDuration_Bonus_Covert = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_DURATION_BONUS_COVERT", 24, 0, 255); + gRebelCommandSettings.iSoldierBountiesKingpinDuration_Bonus_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_DURATION_BONUS_DEMOLITIONS", 24, 0, 255); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Admin = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_ADMIN", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Troop = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_TROOP", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Elite = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_ELITE", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Robot = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_ROBOT", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Jeep = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_JEEP", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Tank = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_TANK", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Officer = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_OFFICER", 100, 0, 5000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_LIMIT", 10000, 0, 30000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit_Demolitions = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_LIMIT_DEMOLITIONS", 10000, 0, 30000); + gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit_Snitch = iniReader.ReadInteger("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_LIMIT_SNITCH", 10000, 0, 30000); + gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Covert = iniReader.ReadFloat("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_BONUS_COVERT", 1.1f, 0.f, 2.f); + gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Deputy = iniReader.ReadFloat("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_BONUS_DEPUTY", 1.1f, 0.f, 2.f); + gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Snitch = iniReader.ReadFloat("Rebel Command Settings", "SOLDIER_BOUNTIES_KINGPIN_PAYOUT_BONUS_SNITCH", 1.1f, 0.f, 2.f); } void FreeGameExternalOptions() @@ -4462,7 +4589,7 @@ BOOLEAN IsDriveLetterACDromDrive( STR pDriveLetter ) void DisplayGameSettings( ) { //Display the version number - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s (%S) %s", pMessageStrings[ MSG_VERSION ], zVersionLabel, czVersionNumber, zRevisionNumber ); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation ); //Display the difficulty level ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s: %s", gzGIOScreenText[ GIO_DIF_LEVEL_TEXT ], zDiffSetting[gGameOptions.ubDifficultyLevel].szDiffName ); diff --git a/GameSettings.h b/GameSettings.h index 8ed96c48..5bdeb6dc 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -33,7 +33,7 @@ enum // TOPTION_DISPLAY_ENEMY_INDICATOR, //Displays the number of enemies seen by the merc, ontop of their portrait TOPTION_SLEEPWAKE_NOTIFICATION, TOPTION_USE_METRIC_SYSTEM, //If set, uses the metric system - TOPTION_MERC_ALWAYS_LIGHT_UP, + TOPTION_MERC_CASTS_LIGHT, TOPTION_SMART_CURSOR, TOPTION_SNAP_CURSOR_TO_DOOR, TOPTION_GLOW_ITEMS, @@ -103,6 +103,8 @@ enum // sevenfm: new settings TOPTION_SHOW_ENEMY_LOCATION, + TOPTION_ALT_START_AIM, + TOPTION_ALT_PATHFINDING, // arynn: Debug/Cheat TOPTION_CHEAT_MODE_OPTIONS_HEADER, @@ -127,8 +129,6 @@ enum //These options will NOT be toggable by the Player // JA2Gold - TOPTION_MERC_CASTS_LIGHT, - TOPTION_HIDE_BULLETS, TOPTION_TRACKING_MODE, @@ -181,6 +181,7 @@ enum FF_ALLOW_SNOW, FF_MINI_EVENTS, FF_REBEL_COMMAND, + FF_STRATEGIC_TRANSPORT_GROUPS, NUM_FEATURE_FLAGS, }; @@ -1148,6 +1149,10 @@ typedef struct UINT16 usLeadershipSubpointsToImprove; UINT16 usLevelSubpointsToImprove; + // rftr: optionally slow stat growth at 80+ and 90+. this gives more value to mercs with high base stats + UINT8 ubMaxGrowthChanceAt80; + UINT8 ubMaxGrowthChanceAt90; + // HEADROCK HAM B2.7: When turned on, this will give a CTH approximation instead of an exact value, on CTH Bars and "F" key feedback. BOOLEAN fApproximateCTH; @@ -1602,6 +1607,10 @@ typedef struct BOOLEAN fAlternativeHelicopterFuelSystem; BOOLEAN fHelicopterPassengersCanGetHit; + BOOLEAN fStrategicTransportGroupsDebug; + BOOLEAN fStrategicTransportGroupsEnabled; + INT8 iMaxSimultaneousTransportGroups; + UINT16 usHelicopterHoverCostOnGreenTile; UINT16 usHelicopterHoverCostOnRedTile; @@ -1842,6 +1851,128 @@ typedef struct INT16 iFortificationsBonus; + // agent missions + INT32 iMissionBaseCost; + INT32 iMissionAdditionalCost; + INT16 iMissionPrepTime; + INT8 iMissionRefreshTimeDays; + INT8 iMinLoyaltyForMission; + + INT8 iDeepDeploymentSuccessChance; + INT16 iDeepDeploymentRangeNS; + INT16 iDeepDeploymentRangeEW; + INT16 iDeepDeploymentRangeNS_Bonus_Covert; + INT16 iDeepDeploymentRangeEW_Bonus_Covert; + INT16 iDeepDeploymentRangeNS_Bonus_Scouting; + INT16 iDeepDeploymentRangeEW_Bonus_Scouting; + INT16 iDeepDeploymentRangeNS_Bonus_Stealthy; + INT16 iDeepDeploymentRangeEW_Bonus_Stealthy; + INT16 iDeepDeploymentRangeNS_Bonus_Survival; + INT16 iDeepDeploymentRangeEW_Bonus_Survival; + UINT8 iDeepDeploymentDuration; + UINT8 iDeepDeploymentDuration_Bonus_Covert; + UINT8 iDeepDeploymentDuration_Bonus_Scouting; + UINT8 iDeepDeploymentDuration_Bonus_Stealthy; + UINT8 iDeepDeploymentDuration_Bonus_Survival; + + INT8 iDisruptAsdSuccessChance; + FLOAT fDisruptAsdIncomeReductionModifier; + FLOAT fDisruptAsdIncomeReductionModifier_Covert; + FLOAT fDisruptAsdIncomeReductionModifier_Demolitions; + FLOAT fDisruptAsdIncomeReductionModifier_Nightops; + FLOAT fDisruptAsdIncomeReductionModifier_Technician; + UINT8 iDisruptAsdDuration; + UINT8 iDisruptAsdDuration_Bonus_Covert; + UINT8 iDisruptAsdDuration_Bonus_Demolitions; + UINT8 iDisruptAsdDuration_Bonus_Nightops; + UINT8 iDisruptAsdDuration_Bonus_Technician; + + INT8 iForgeTransportOrdersSuccessChance; + + INT8 iGetEnemyMovementTargetsSuccessChance; + UINT8 iGetEnemyMovementTargetsDuration; + UINT8 iGetEnemyMovementTargetsDuration_Bonus_Covert; + UINT8 iGetEnemyMovementTargetsDuration_Bonus_Radio; + + INT8 iImproveLocalShopsSuccessChance; + UINT8 iImproveLocalShopsDuration; + + INT8 iReduceStrategicDecisionSpeedSuccessChance; + FLOAT fReduceStrategicDecisionSpeedModifier; + FLOAT fReduceStrategicDecisionSpeedModifier_Covert; + FLOAT fReduceStrategicDecisionSpeedModifier_Deputy; + FLOAT fReduceStrategicDecisionSpeedModifier_Snitch; + UINT8 iReduceStrategicDecisionSpeedDuration; + UINT8 iReduceStrategicDecisionSpeedDuration_Bonus_Covert; + UINT8 iReduceStrategicDecisionSpeedDuration_Bonus_Deputy; + UINT8 iReduceStrategicDecisionSpeedDuration_Bonus_Snitch; + + INT8 iReduceUnalertedEnemyVisionSuccessChance; + FLOAT fReduceUnlaertedEnemyVisionModifier; + FLOAT fReduceUnlaertedEnemyVisionModifier_Covert; + FLOAT fReduceUnlaertedEnemyVisionModifier_Radio; + FLOAT fReduceUnlaertedEnemyVisionModifier_Stealthy; + UINT8 iReduceUnalertedEnemyVisionDuration; + UINT8 iReduceUnalertedEnemyVisionDuration_Bonus_Covert; + UINT8 iReduceUnalertedEnemyVisionDuration_Bonus_Radio; + + INT8 iSabotageInfantryEquipmentSuccessChance; + INT8 iSabotageInfantryEquipmentModifier; + INT8 iSabotageInfantryEquipmentModifier_Auto_Weapons; + INT8 iSabotageInfantryEquipmentModifier_Covert; + INT8 iSabotageInfantryEquipmentModifier_Demolitions; + INT8 iSabotageInfantryEquipmentModifier_Gunslinger; + INT8 iSabotageInfantryEquipmentModifier_Ranger; + INT8 iSabotageInfantryEquipmentModifier_Sniper; + UINT8 iSabotageInfantryEquipmentDuration; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Auto_Weapons; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Covert; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Demolitions; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Gunslinger; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Ranger; + UINT8 iSabotageInfantryEquipmentDuration_Bonus_Sniper; + + INT8 iSabotageMechanicalUnitsSuccessChance; + INT8 iSabotageMechanicalUnitsStatLoss; + INT8 iSabotageMechanicalUnitsStatLoss_Covert; + INT8 iSabotageMechanicalUnitsStatLoss_Demolitions; + INT8 iSabotageMechanicalUnitsStatLoss_Heavy_Weapons; + UINT8 iSabotageMechanicalUnitsDuration; + UINT8 iSabotageMechanicalUnitsDuration_Bonus_Covert; + UINT8 iSabotageMechanicalUnitsDuration_Bonus_Demolitions; + UINT8 iSabotageMechanicalUnitsDuration_Bonus_Heavy_Weapons; + + INT8 iSendSuppliesToTownSuccessChance; + UINT8 iSendSuppliesToTownDuration; + INT32 iSendSuppliesToTownLoyaltyGain; + INT8 iSendSuppliesToTownInterval; + + INT8 iTrainMilitiaAnywhereSuccessChance; + INT8 iTrainMilitiaAnywhereMaxTrainers; + INT8 iTrainMilitiaAnywhereMaxTrainers_Teaching; + UINT8 iTrainMilitiaAnywhereDuration; + UINT8 iTrainMilitiaAnywhereDuration_Bonus_Covert; + UINT8 iTrainMilitiaAnywhereDuration_Bonus_Survival; + UINT8 iTrainMilitiaAnywhereDuration_Bonus_Teaching; + + INT8 iSoldierBountiesKingpinSuccessChance; + UINT8 iSoldierBountiesKingpinDuration; + UINT8 iSoldierBountiesKingpinDuration_Bonus_Covert; + UINT8 iSoldierBountiesKingpinDuration_Bonus_Demolitions; + UINT16 iSoldierBountiesKingpinPayout_Admin; + UINT16 iSoldierBountiesKingpinPayout_Troop; + UINT16 iSoldierBountiesKingpinPayout_Elite; + UINT16 iSoldierBountiesKingpinPayout_Robot; + UINT16 iSoldierBountiesKingpinPayout_Jeep; + UINT16 iSoldierBountiesKingpinPayout_Tank; + UINT16 iSoldierBountiesKingpinPayout_Officer; + INT16 iSoldierBountiesKingpinPayout_Limit; + INT16 iSoldierBountiesKingpinPayout_Limit_Demolitions; + INT16 iSoldierBountiesKingpinPayout_Limit_Snitch; + FLOAT fSoldierBountiesKingpinPayout_Bonus_Covert; + FLOAT fSoldierBountiesKingpinPayout_Bonus_Deputy; + FLOAT fSoldierBountiesKingpinPayout_Bonus_Snitch; + } REBELCOMMAND_SETTINGS; typedef struct diff --git a/GameVersion.cpp b/GameVersion.cpp index 5d08d501..d91a7c51 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -1,62 +1,45 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "GameVersion.h" -#endif - + // // Keeps track of the game version // - -// ------------------------------ -// MAP EDITOR (Release and Debug) BUILD VERSION -// ------------------------------ -#ifdef JA2EDITOR + +#ifdef JA2EDITOR // map editor #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"JA2 1.13 Unfinished Business - Map Editor" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"JA2 1.13 - Map Editor" }; #endif -// ------------------------------ -// DEBUG BUILD VERSIONS -// ------------------------------ -#elif defined JA2BETAVERSION +#elif defined JA2BETAVERSION // debug - //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"Debug: JA2 1.13 Unfinished Business" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"Debug: JA2 1.13 Demo" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"Debug: JA2 1.13" }; #endif #elif defined CRIPPLED_VERSION - //RELEASE BUILD VERSION s - CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; + CHAR16 zProductLabel[64] = { L"JA2 113 Beta-0.98" }; -// ------------------------------ -// RELEASE BUILD VERSIONS -// ------------------------------ -#else +#else // release - //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"JA2 1.13 Unfinished Business" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"JA2 1.13 Demo" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13 (Development Build)" }; + CHAR16 zProductLabel[64] = { L"JA2 1.13" }; #endif #endif - -CHAR8 czVersionNumber[16] = { "Build 10.10.22" }; //YY.MM.DD -CHAR16 zTrackingNumber[16] = { L"Z" }; -CHAR16 zRevisionNumber[16] = { L"Revision 9402" }; - + +CHAR8 czVersionString[16] = { "@Version@" }; +CHAR16 zBuildInformation[256] = { L"@Build@" }; + // SAVE_GAME_VERSION is defined in header, change it there diff --git a/GameVersion.h b/GameVersion.h index 2c39f131..65e47500 100644 --- a/GameVersion.h +++ b/GameVersion.h @@ -11,11 +11,12 @@ extern "C" { // Keeps track of the game version // -extern CHAR16 zVersionLabel[256]; -extern CHAR8 czVersionNumber[16]; -extern CHAR16 zTrackingNumber[16]; -extern CHAR16 zRevisionNumber[16]; - +// name of the product, Unfinished Business, Map Editor etc.. +extern CHAR16 zProductLabel[64]; +// used for save game comparison +extern CHAR8 czVersionString[16]; +// can contain information regarding the build: what git ref was the base (tag, branch), by whom, commit date, build date, etc.. +extern CHAR16 zBuildInformation[256]; //ADB: I needed these here so I moved them, and why put them in *.cpp anyways? // diff --git a/German.vsprops b/German.vsprops deleted file mode 100644 index 4d4c9b9d..00000000 --- a/German.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/HelpScreen.cpp b/HelpScreen.cpp index 47a240af..dcf0ccc4 100644 --- a/HelpScreen.cpp +++ b/HelpScreen.cpp @@ -1,9 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "HelpScreen.h" - #include "HelpScreenText.h" - #include "Line.h" -#else #include "sgp.h" #include "sysutil.h" #include "vobject_blitters.h" @@ -28,7 +22,6 @@ #include "renderworld.h" #include "Game Init.h" #include "Overhead.h" -#endif extern INT16 gsVIEWPORT_END_Y; extern void PrintDate( void ); diff --git a/Init.cpp b/Init.cpp index d11e3354..20788424 100644 --- a/Init.cpp +++ b/Init.cpp @@ -1,10 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "HelpScreen.h" - #include "Multilingual Text Code Generator.h" - #include "INIReader.h" - -#else #include "builddefines.h" #include #include "sgp.h" @@ -58,7 +51,6 @@ #include "Multilingual Text Code Generator.h" #include "editscreen.h" #include "Arms Dealer Init.h" -#endif #include "MPXmlTeams.hpp" #include "Strategic Mines LUA.h" #include "UndergroundInit.h" diff --git a/Init.h b/Init.h index 39e72319..fdea441c 100644 --- a/Init.h +++ b/Init.h @@ -1,7 +1,6 @@ #ifndef _INIT_H #define _INIT_H -#ifndef PRECOMPILEDHEADERS #include "LogicalBodyTypes/BodyTypeDB.h" #include "LogicalBodyTypes/Layers.h" #include "LogicalBodyTypes/AbstractXMLLoader.h" @@ -10,7 +9,6 @@ #include "LogicalBodyTypes/EnumeratorDB.h" #include "LogicalBodyTypes/BodyTypeDB.h" #include "LogicalBodyTypes/PaletteDB.h" -#endif #include #include diff --git a/Intro.cpp b/Intro.cpp index ccf4a471..928eaeed 100644 --- a/Intro.cpp +++ b/Intro.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Intro.h" - #include "Cinematics.h" -#else #include "sgp.h" #include "sysutil.h" #include "vobject_blitters.h" @@ -27,7 +22,6 @@ #include "Soldier Profile.h" #include "Game Init.h" #include "INIReader.h" -#endif #include diff --git a/JA2 All.h b/JA2 All.h deleted file mode 100644 index 8b94935e..00000000 --- a/JA2 All.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef __JA2_ALL_H -#define __JA2_ALL_H - -#pragma message("GENERATED PCH FOR JA2 PROJECT.") - -#include "builddefines.h" - -#include -#include -#include -#include "sgp.h" -#include "gameloop.h" -#include "himage.h" -#include "vobject.h" -#include "vobject_private.h" -#include "vobject_blitters.h" -#include "Types.h" -#include "wcheck.h" -#include "renderworld.h" -#include "input.h" -#include "screenids.h" -#include "overhead.h" -#include "Isometric Utils.h" -#include "sysutil.h" -#include "Radar Screen.h" -#include "Soldier Control.h" -#include "Animation Control.h" -#include "Animation Data.h" -#include "Event Pump.h" -#include "Timer Control.h" -#include "Render Dirty.h" -#include "Sys Globals.h" -#include "interface.h" -#include "soldier ani.h" -#include -#include -#include "english.h" -#include "Fileman.h" -#include "messageboxscreen.h" -#include "sgp.h" -#include "fade screen.h" -#include "cursor control.h" -#include "music control.h" -#include "GameInitOptionsScreen.h" -#include "GameSettings.h" -#include "Utilities.h" -#include "Font Control.h" -#include "WordWrap.h" -#include "Options Screen.h" -#include "cursors.h" -#include "Screens.h" -#include "init.h" -#include "laptop.h" -#include "mapscreen.h" -#include "Game Clock.h" -#include "LibraryDataBase.h" -#include "Map Screen Interface.h" -#include "Tactical Save.h" -#include "Interface Control.h" -#include "text.h" -#include "Handle UI.h" -#include "Button System.h" -#include "lighting.h" -#include "environment.h" -#include "bullets.h" -#include "message.h" -#include -#include "overhead map.h" -#include "Strategic Exit GUI.h" -#include "strategic movement.h" -#include "Tactical Placement GUI.h" -#include "Air raid.h" -#include "game init.h" -//DEF: Test Code -#ifdef NETWORKED -#include "Networking.h" -#endif -#include "physics.h" -#include "dialogue control.h" -#include "soldier macros.h" -#include "faces.h" -#include "strategicmap.h" -#include "gamescreen.h" -#include "strategic turns.h" -#include "merc entering.h" -#include "soldier create.h" -#include "Soldier Init List.h" -#include "interface panels.h" -#include "Map Information.h" -#include "Squads.h" -#include "interface dialogue.h" -#include "auto bandage.h" -#include "meanwhile.h" -#include "strategic ai.h" -#include "Sound Control.h" -#include "SaveLoadScreen.h" -#include "GameVersion.h" -#include "Debug.h" -#include "Language Defines.h" -#include "mousesystem.h" -#include "worlddef.h" -#include "video.h" -#include "interface items.h" -#include "Maputility.h" -#include "strategic.h" -#include "NPC.h" -#include "MercTextBox.h" -#include "tile cache.h" -#include "Shade Table Util.h" -#include "Exit Grids.h" -#include "Summary Info.h" -#include -#include "font.h" -#include "timer.h" -#include "tiledef.h" -#include "editscreen.h" -#include "jascreens.h" -#include "animation cache.h" -#include "mainmenuscreen.h" -#include "Random.h" -#include "Multi Language Graphic Utils.h" -#include "SaveLoadGame.h" -#include "Text Input.h" -#include "Slider.h" -#include "soundman.h" -#include "Ambient Control.h" -#include "Worlddat.h" -#include "Gap.h" -#include "Soldier Profile.h" -#include "Keys.h" -#include "finances.h" -#include "History.h" -#include "files.h" -#include "Email.h" -#include "Game Events.h" -#include "LaptopSave.h" -#include "Queen Command.h" -#include "Quests.h" -#include "opplist.h" -#include "Merc Hiring.h" -#include "Ai.h" -#include "SmokeEffects.h" -#include "Map Screen Interface Border.h" -#include "Map Screen Interface Bottom.h" -#include "Map Screen Helicopter.h" -#include "Arms Dealer Init.h" -#include "Strategic Mines.h" -#include "Strategic Town Loyalty.h" -#include "Vehicles.h" -#include "Merc Contract.h" -#include "Strategic Pathing.h" -#include "TeamTurns.h" -#include "explosion control.h" -#include "Creature Spreading.h" -#include "Strategic Status.h" -#include "Boxing.h" -#include "Map Screen Interface Map.h" -#include "lighteffects.h" -#include "JA2 Splash.h" -#include "Scheduling.h" -#include "_JA25EnglishText.h" -#include "XML.h" -#include "LogicalBodyTypes/BodyTypeDB.h" -#include "LogicalBodyTypes/Layers.h" -#include "LogicalBodyTypes/AbstractXMLLoader.h" -#include "LogicalBodyTypes/PaletteDB.h" -#include "LogicalBodyTypes/SurfaceDB.h" -#include "LogicalBodyTypes/FilterDB.h" -#include "LogicalBodyTypes/EnumeratorDB.h" -#include "LogicalBodyTypes/BodyTypeDB.h" - -#endif diff --git a/JA2 Splash.cpp b/JA2 Splash.cpp index 73ddc93d..4ef6714a 100644 --- a/JA2 Splash.cpp +++ b/JA2 Splash.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "vsurface.h" #include "mainmenuscreen.h" @@ -8,7 +5,6 @@ #include "Timer Control.h" #include "Multi Language Graphic Utils.h" #include -#endif UINT32 guiSplashFrameFade = 10; UINT32 guiSplashStartTime = 0; diff --git a/Ja25Update.cpp b/Ja25Update.cpp index 80edcd64..101b1152 100644 --- a/Ja25Update.cpp +++ b/Ja25Update.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -66,7 +63,6 @@ #include "Strategic Status.h" #include "civ quotes.h" #include "Debug Control.h" -#endif #ifdef JA2UB diff --git a/Laptop/AimArchives.cpp b/Laptop/AimArchives.cpp index 9904f839..b75d8a23 100644 --- a/Laptop/AimArchives.cpp +++ b/Laptop/AimArchives.cpp @@ -1,7 +1,4 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimArchives.h" #include "aim.h" @@ -10,7 +7,6 @@ #include "WCheck.h" #include "Encrypted File.h" #include "Text.h" -#endif #include "Soldier Profile.h" diff --git a/Laptop/AimFacialIndex.cpp b/Laptop/AimFacialIndex.cpp index 570bdeb8..60b88e78 100644 --- a/Laptop/AimFacialIndex.cpp +++ b/Laptop/AimFacialIndex.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimFacialIndex.h" #include "WordWrap.h" @@ -16,7 +13,6 @@ #include "GameSettings.h" #include "english.h" #include "sysutil.h" -#endif extern UINT8 gubCurrentSortMode; // symbol already defined in AimSort.cpp (jonathanl) diff --git a/Laptop/AimHistory.cpp b/Laptop/AimHistory.cpp index 8f737d5b..760911f2 100644 --- a/Laptop/AimHistory.cpp +++ b/Laptop/AimHistory.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimHistory.h" #include "aim.h" @@ -9,7 +6,6 @@ #include "WordWrap.h" #include "Encrypted File.h" #include "Text.h" -#endif #include "LocalizedStrings.h" diff --git a/Laptop/AimLinks.cpp b/Laptop/AimLinks.cpp index 79f98b09..b73bc32c 100644 --- a/Laptop/AimLinks.cpp +++ b/Laptop/AimLinks.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimLinks.h" #include "aim.h" @@ -8,7 +5,6 @@ #include "WordWrap.h" #include "Text.h" #include "Multi Language Graphic Utils.h" -#endif #ifdef JA2UB #include "ub_config.h" diff --git a/Laptop/AimMembers.cpp b/Laptop/AimMembers.cpp index 6bc2d0c5..d0f0561f 100644 --- a/Laptop/AimMembers.cpp +++ b/Laptop/AimMembers.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "Language Defines.h" -#else #include "email.h" #include "laptop.h" #include "AimMembers.h" @@ -47,7 +43,6 @@ #include "strategicmap.h" #include "Personnel.h" #include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item -#endif #include "Strategic Town Loyalty.h" #include "connect.h" diff --git a/Laptop/AimPolicies.cpp b/Laptop/AimPolicies.cpp index 2fa45060..bed0a5ed 100644 --- a/Laptop/AimPolicies.cpp +++ b/Laptop/AimPolicies.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimPolicies.h" #include "aim.h" @@ -10,7 +7,6 @@ #include "Encrypted File.h" #include "Text.h" #include "GameSettings.h" -#endif #include "LocalizedStrings.h" diff --git a/Laptop/AimSort.cpp b/Laptop/AimSort.cpp index 47ed8696..1b5b0f05 100644 --- a/Laptop/AimSort.cpp +++ b/Laptop/AimSort.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "AimSort.h" #include "Aim.h" @@ -13,7 +10,6 @@ #include "Multi Language Graphic Utils.h" #include "english.h" #include "sysutil.h" -#endif //#define diff --git a/Laptop/BobbyR.cpp b/Laptop/BobbyR.cpp index 0908fe1a..fcba33a6 100644 --- a/Laptop/BobbyR.cpp +++ b/Laptop/BobbyR.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyR.h" #include "BobbyRGuns.h" @@ -22,7 +19,6 @@ #include "GameSettings.h" #include "message.h" #include "postalservice.h" -#endif #ifdef JA2TESTVERSION diff --git a/Laptop/BobbyRAmmo.cpp b/Laptop/BobbyRAmmo.cpp index d94c04c0..8b4b6a53 100644 --- a/Laptop/BobbyRAmmo.cpp +++ b/Laptop/BobbyRAmmo.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRAmmo.h" #include "BobbyRGuns.h" @@ -10,7 +7,6 @@ #include "WordWrap.h" #include "Encrypted File.h" #include "text.h" -#endif UINT32 guiAmmoBackground; UINT32 guiAmmoGrid; diff --git a/Laptop/BobbyRArmour.cpp b/Laptop/BobbyRArmour.cpp index 30a084d8..9c21d4a4 100644 --- a/Laptop/BobbyRArmour.cpp +++ b/Laptop/BobbyRArmour.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRArmour.h" #include "BobbyRGuns.h" @@ -9,7 +6,6 @@ #include "WCheck.h" #include "WordWrap.h" #include "Text.h" -#endif UINT32 guiArmourBackground; diff --git a/Laptop/BobbyRGuns.cpp b/Laptop/BobbyRGuns.cpp index 8b4edef6..0d433ae9 100644 --- a/Laptop/BobbyRGuns.cpp +++ b/Laptop/BobbyRGuns.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRGuns.h" #include "BobbyR.h" @@ -23,7 +20,6 @@ // HEADROCK HAM 4 #include "input.h" #include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item -#endif #define BOBBYR_DEFAULT_MENU_COLOR 255 diff --git a/Laptop/BobbyRMailOrder.cpp b/Laptop/BobbyRMailOrder.cpp index 1ab35ca0..a7610e23 100644 --- a/Laptop/BobbyRMailOrder.cpp +++ b/Laptop/BobbyRMailOrder.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRMailOrder.h" #include "BobbyR.h" @@ -27,7 +24,6 @@ #include "postalservice.h" #include "english.h" #include -#endif #include "Strategic Event Handler.h" #include "connect.h" diff --git a/Laptop/BobbyRMisc.cpp b/Laptop/BobbyRMisc.cpp index 7059e421..a328c5ca 100644 --- a/Laptop/BobbyRMisc.cpp +++ b/Laptop/BobbyRMisc.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRMisc.h" #include "BobbyR.h" @@ -9,7 +6,6 @@ #include "WCheck.h" #include "WordWrap.h" #include "Text.h" -#endif UINT32 guiMiscBackground; diff --git a/Laptop/BobbyRShipments.cpp b/Laptop/BobbyRShipments.cpp index aff5732f..28f208f3 100644 --- a/Laptop/BobbyRShipments.cpp +++ b/Laptop/BobbyRShipments.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "BobbyRShipments.h" -#else #include "laptop.h" #include "BobbyRShipments.h" #include "bobbyr.h" @@ -17,7 +13,6 @@ #include "PostalService.h" #include "input.h" #include "english.h" -#endif diff --git a/Laptop/BobbyRUsed.cpp b/Laptop/BobbyRUsed.cpp index 8a48c740..ef3623fd 100644 --- a/Laptop/BobbyRUsed.cpp +++ b/Laptop/BobbyRUsed.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "BobbyRUsed.h" #include "BobbyR.h" @@ -9,7 +6,6 @@ #include "WCheck.h" #include "WordWrap.h" #include "Text.h" -#endif UINT32 guiUsedBackground; UINT32 guiUsedGrid; diff --git a/Laptop/BriefingRoom.cpp b/Laptop/BriefingRoom.cpp index 43fd3262..dc5c6711 100644 --- a/Laptop/BriefingRoom.cpp +++ b/Laptop/BriefingRoom.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else - #include "Laptop All.h" #include "Utilities.h" #include "WCheck.h" #include "timer control.h" @@ -12,10 +8,15 @@ #include "Game Clock.h" #include "Text.h" #include "soldier profile type.h" -#endif #include "BriefingRoom_Data.h" #include "BriefingRoom.h" +#include "english.h" +#include "laptop.h" +#include "IMP HomePage.h" +#include "line.h" +#include "input.h" +#include "Text Input.h" // Link Images #define BRIEFINGROOM_BUTTON_SIZE_X 205 diff --git a/Laptop/BriefingRoomM.cpp b/Laptop/BriefingRoomM.cpp index 5ee58eef..69a0c0da 100644 --- a/Laptop/BriefingRoomM.cpp +++ b/Laptop/BriefingRoomM.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else - #include "Laptop All.h" #include "Utilities.h" #include "WCheck.h" #include "timer control.h" @@ -12,10 +8,16 @@ #include "Game Clock.h" #include "Text.h" #include "soldier profile type.h" -#endif #include "BriefingRoom_Data.h" #include "BriefingRoomM.h" +#include "aim.h" +#include "laptop.h" +#include "IMP HomePage.h" +#include "line.h" +#include "input.h" +#include "Text Input.h" +#include "english.h" // Link Images #define BRIEFINGROOM_MISSION_BUTTON_SIZE_X 121 diff --git a/Laptop/BriefingRoom_Data.cpp b/Laptop/BriefingRoom_Data.cpp index f6e5f2ff..ba9c79f8 100644 --- a/Laptop/BriefingRoom_Data.cpp +++ b/Laptop/BriefingRoom_Data.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else //#include "Laptop All.h" #include "laptop.h" #include "aim.h" @@ -15,7 +12,6 @@ #include "Quests.h" #include "Tactical Save.h" #include "BriefingRoom_Data.h" -#endif #define MAX_FILTR_LOCATION_BUTTONS 11 diff --git a/Laptop/BrokenLink.cpp b/Laptop/BrokenLink.cpp index c0c15267..8c6fb157 100644 --- a/Laptop/BrokenLink.cpp +++ b/Laptop/BrokenLink.cpp @@ -1,14 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "BrokenLink.h" -#else #include "Types.h" #include "font.h" #include "laptop.h" #include "Font Control.h" #include "Text.h" #include "wordwrap.h" -#endif #define BROKEN_LINK__FONT FONT12ARIAL #define BROKEN_LINK__COLOR FONT_MCOLOR_BLACK diff --git a/Laptop/CMakeLists.txt b/Laptop/CMakeLists.txt new file mode 100644 index 00000000..c62b34bb --- /dev/null +++ b/Laptop/CMakeLists.txt @@ -0,0 +1,101 @@ +set(LaptopSrc +"${CMAKE_CURRENT_SOURCE_DIR}/aim.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimArchives.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimFacialIndex.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimHistory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimLinks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimMembers.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimPolicies.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimSort.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BaseTable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyR.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRAmmo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRArmour.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRGuns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRMailOrder.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRMisc.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRShipments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRUsed.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoomM.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoom_Data.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BrokenLink.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignHistoryMain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignHistory_Summary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignStats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CharProfile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DropDown.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DynamicDialogueWidget.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/email.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encyclopedia_Data_new.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encyclopedia_new.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FacilityProduction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/files.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/finances.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Cards.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Gallery.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Order Form.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/funeral.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GunEmporium.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/history.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP AboutUs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Selection.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Background.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Begin Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Character and Disability Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Character Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Color Choosing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Compile Character.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Confirm.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Disability Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Gear Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Gear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP HomePage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP MainPage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Minor Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Quiz.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Portraits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Prejudice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Skill Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Text System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Voices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMPVideoObjects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Comments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Contract.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Info.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Intelmarket.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/laptop.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/merccompare.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs Account.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs Files.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs No Account.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaInterface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaWebsite.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/personnel.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PMC.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PostalService.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sirtech.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Store Inventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WHO.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AIMAvailability.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_BriefingRoom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CampaignStatsEvents.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ConditionsForMercAvailability.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_DeliveryMethods.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Email.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EmailMercAvailable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EmailMercLevelUp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_History.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPPortraits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPVoices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_OldAIMArchive.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ShippingDestinations.cpp" +PARENT_SCOPE) diff --git a/Laptop/CampaignHistoryMain.cpp b/Laptop/CampaignHistoryMain.cpp index d8f799cb..e030ff87 100644 --- a/Laptop/CampaignHistoryMain.cpp +++ b/Laptop/CampaignHistoryMain.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -19,7 +16,6 @@ #include "Text.h" #include "Multi Language Graphic Utils.h" #include "CampaignHistoryMain.h" -#endif #define BACKGROUND_WIDTH 125 diff --git a/Laptop/CampaignHistory_Summary.cpp b/Laptop/CampaignHistory_Summary.cpp index f77c4c3a..b25c868f 100644 --- a/Laptop/CampaignHistory_Summary.cpp +++ b/Laptop/CampaignHistory_Summary.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "Insurance Text.h" #include "insurance.h" @@ -22,7 +19,6 @@ #include "Game Clock.h" #include "random.h" #include "strategicmap.h" -#endif #define CAMPHIS_SUM_TITLE_Y 52 + LAPTOP_SCREEN_WEB_UL_Y diff --git a/Laptop/CharProfile.cpp b/Laptop/CharProfile.cpp index 481e11dc..182f4bf7 100644 --- a/Laptop/CharProfile.cpp +++ b/Laptop/CharProfile.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" -#else #include "laptop.h" #include "cursors.h" #include "CharProfile.h" @@ -35,7 +31,6 @@ #include "IMP Prejudice.h" // added by Flugente #include "IMP Gear Entrance.h" // added by Flugente #include "IMP Gear.h" // added by Flugente -#endif //BOOLEAN fIMPCompletedFlag = FALSE; diff --git a/Laptop/Encyclopedia_Data_new.cpp b/Laptop/Encyclopedia_Data_new.cpp index 3f95602b..5de9ac67 100644 --- a/Laptop/Encyclopedia_Data_new.cpp +++ b/Laptop/Encyclopedia_Data_new.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "Types.h" #include "WCheck.h" #include @@ -30,7 +27,6 @@ #include "Text.h" #include "WordWrap.h" #include "Quests.h" -#endif #ifdef ENCYCLOPEDIA_WORKS /** @ingroup ENCYCLOPEDIA @@ -1328,13 +1324,8 @@ void GameInitEncyclopediaData_NEW( ) giEncyclopedia_DataBtnImage = BUTTON_NO_IMAGE; memset( giEncyclopedia_DataFilterBtn, BUTTON_NO_SLOT, sizeof(giEncyclopedia_DataFilterBtn) ); giEncyclopedia_DataFilterBtnImage = BUTTON_NO_IMAGE; -#if 0//debug - memset( gbEncyclopediaData_ItemVisible, ENC_ITEM_DISCOVERED_NOT_REACHABLE, sizeof(gbEncyclopediaData_ItemVisible) ); - gbEncyclopediaData_ItemVisible[1] = ENC_ITEM_NOT_DISCOVERED; -#else if( guiCurrentScreen == MAINMENU_SCREEN ) EncyclopediaInitItemsVisibility(); -#endif // do following only once at start of JA2 CHECKV( guiCurrentScreen == 0 ); //prepare indexes for subfilter texts defined in _LanguageText.cpp, assuming there are blank separators between filter button texts ("1", "2", "3", "", "1", "", "1", "2", "3", "4") diff --git a/Laptop/Encyclopedia_new.cpp b/Laptop/Encyclopedia_new.cpp index 983d56b9..e1c5ac39 100644 --- a/Laptop/Encyclopedia_new.cpp +++ b/Laptop/Encyclopedia_new.cpp @@ -29,9 +29,6 @@ /// uncomment to use just graphic + mouseregion instead of real buttons. No sounds, no button states, just plain 'hyperlinks'. #define ENC_USE_BUTTONSYSTEM -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "Types.h" #include "WCheck.h" #include "DEBUG.H" @@ -41,11 +38,7 @@ #include "vobject.h"//video objects #include "Utils/Cursors.h" #include "Text.h"//button text -#ifdef ENC_USE_BUTTONSYSTEM #include "Button System.h" -#else - #include "WordWrap.h"//centered text -#endif #include "Encyclopedia_new.h" //#include "Encrypted File.h" //#include "Soldier Profile.h" @@ -54,7 +47,6 @@ //#include "Quests.h" //#include "Tactical Save.h" #include "Encyclopedia_Data_new.h" -#endif #ifdef ENCYCLOPEDIA_WORKS /** @defgroup ENCYCLOPEDIA Encyclopedia @@ -72,13 +64,8 @@ UINT32 guiEncyclopediaAimLogo; ///@} ///@{ buttons, graphics and regions for main page -#ifdef ENC_USE_BUTTONSYSTEM INT32 giEncyclopediaBtn[ ENC_NUM_SUBPAGES ]; INT32 giEncyclopediaBtnImage; -#else -MOUSE_REGION gEncyclopediaBtnRegions[ ENC_NUM_SUBPAGES ]; -UINT32 guiEncyclopediaBtnImage; -#endif #define ENC_BTN_GAP 6 #define ENC_AIMLOGO_GAP_TOP 20 #define ENC_AIMLOGO_GAP_BOTTOM 40 @@ -89,11 +76,7 @@ ENC_SUBPAGE_T geENC_SubPage; ///< Current sub page /////// //prototypes -#ifdef ENC_USE_BUTTONSYSTEM void BtnEncyclopedia_newSelectDataPageBtnCallBack ( GUI_BUTTON *btn, INT32 reason ); -#else -void BtnEncyclopedia_newSelectDataPageRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason ); -#endif /////// //functions @@ -112,11 +95,8 @@ void BtnEncyclopedia_newSelectDataPageRegionCallBack( MOUSE_REGION * pRegion, IN void GameInitEncyclopedia_NEW() { // initialize gui handles -#ifdef ENC_USE_BUTTONSYSTEM memset( giEncyclopediaBtn, BUTTON_NO_SLOT, sizeof(giEncyclopediaBtn) ); giEncyclopediaBtnImage = BUTTON_NO_IMAGE; -#else -#endif // check for files only on start of JA2 CHECKV( guiCurrentScreen == 0 && gGameExternalOptions.gEncyclopedia ); @@ -182,7 +162,6 @@ BOOLEAN EnterEncyclopedia_NEW( ) CHECKF(hVObject);CHECKF(hVObject->pETRLEObject); logoBottomY = hVObject->pETRLEObject->usHeight + LAPTOP_SCREEN_WEB_UL_Y + ENC_AIMLOGO_GAP_TOP; -#ifdef ENC_USE_BUTTONSYSTEM//use button system ////// // load button graphic for the data pages giEncyclopediaBtnImage = LoadButtonImage( "ENCYCLOPEDIA\\CONTENTBUTTON.STI", BUTTON_NO_IMAGE, 0, BUTTON_NO_IMAGE , 0, BUTTON_NO_IMAGE ); @@ -206,34 +185,6 @@ BOOLEAN EnterEncyclopedia_NEW( ) GetButtonPtr( giEncyclopediaBtn[ i ] )->fShiftImage = TRUE; //SpecifyButtonSoundScheme( giEncyclopediaDataBtn[ i ], BUTTON_SOUND_SCHEME_BIGSWITCH3 ); } -#else - ////// - // load button graphic for the data pages - VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; - FilenameForBPP( "ENCYCLOPEDIA\\CONTENTBUTTON.STI", VObjectDesc.ImageFile ); - CHECKF( AddVideoObject( &VObjectDesc, &guiEncyclopediaBtnImage ) ); - ////// - // create mouse regions for data buttons and set user data - GetVideoObject( &hVObject, guiEncyclopediaBtnImage ); - CHECKF(hVObject);CHECKF(hVObject->pETRLEObject); - buttonSizeX = hVObject->pETRLEObject->usWidth;//get width of buttons from image - buttonSizeY = hVObject->pETRLEObject->usHeight;//get heigth of buttons from image - - for ( UINT8 i = 0; i < ENC_NUM_SUBPAGES; i++ ) - { - MSYS_DefineRegion( &gEncyclopediaBtnRegions[i], - LAPTOP_SCREEN_UL_X + (LAPTOP_SCREEN_WIDTH)/2 - buttonSizeX/2,//upper left x: center of laptop screen - 1/2 buttonsize - logoBottomY + ENC_AIMLOGO_GAP_BOTTOM + i * (ENC_BTN_GAP + buttonSizeY),//upper left y: below logo + logo gap + previous buttons and button gaps - LAPTOP_SCREEN_UL_X + (LAPTOP_SCREEN_WIDTH)/2 + buttonSizeX/2,//lower right x: center of laptop screen + 1/2 buttonsize - logoBottomY + ENC_AIMLOGO_GAP_BOTTOM + buttonSizeY + i * (ENC_BTN_GAP + buttonSizeY),//lower right y: below logo + logo gap + button height + previous buttons and button gaps - MSYS_PRIORITY_HIGH,//priority - CURSOR_WWW,//cursor - MSYS_NO_CALLBACK,//moveCB - BtnEncyclopedia_newSelectDataPageRegionCallBack); - MSYS_SetRegionUserData( &gEncyclopediaBtnRegions[i], 0, i + 1 ); - CHECKF( MSYS_AddRegion( &gEncyclopediaBtnRegions[i] ) ); - } -#endif return TRUE; } @@ -256,7 +207,6 @@ BOOLEAN ExitEncyclopedia_NEW( ) // destroy AIM logo success &= DeleteVideoObjectFromIndex( guiEncyclopediaAimLogo ); -#ifdef ENC_USE_BUTTONSYSTEM//use button system // destroy buttons for ( UINT8 i = 0; i < ENC_NUM_SUBPAGES; i++ ) if ( giEncyclopediaBtn[ i ] != BUTTON_NO_SLOT ) @@ -274,13 +224,6 @@ BOOLEAN ExitEncyclopedia_NEW( ) } else success = FALSE; -#else - // destroy button graphic - success &= DeleteVideoObjectFromIndex( guiEncyclopediaBtnImage ); - // destroy mouseregions for buttons - for (UINT8 i = 0; i < ENC_NUM_SUBPAGES; i++) - MSYS_RemoveRegion( &gEncyclopediaBtnRegions[i] ); -#endif return success; } @@ -307,20 +250,7 @@ void RenderEncyclopedia_NEW( ) CHECKV( BltVideoObjectFromIndex( FRAME_BUFFER, guiEncyclopediaAimLogo, 0, x, y, VO_BLT_SRCTRANSPARENCY, NULL ) ); // render Buttons for Data pages -#ifdef ENC_USE_BUTTONSYSTEM RenderButtons(); -#else - for ( UINT8 i = 0; i < ENC_NUM_SUBPAGES; i++ ) - { - x = gEncyclopediaBtnRegions[ i ].RegionTopLeftX; - y = gEncyclopediaBtnRegions[ i ].RegionTopLeftY; - //Btn graphic - CHECKV( BltVideoObjectFromIndex( FRAME_BUFFER, guiEncyclopediaBtnImage, 0, x, y, VO_BLT_SRCTRANSPARENCY, NULL ) ); - //Btn text - y += (gEncyclopediaBtnRegions[ i ].RegionBottomRightY - y)/2 - GetFontHeight( FONT12ARIAL )/2; - DrawTextToScreen( pMenuStrings[ i ], x, y, (UINT16)gEncyclopediaBtnRegions[ i ].RegionBottomRightX - x, FONT12ARIAL, FONT_FCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); - } -#endif // finish render CHECKV ( RenderWWWProgramTitleBar() ); InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y); @@ -405,7 +335,6 @@ void ChangingEncyclopediaSubPage( UINT8 ubSubPageNumber ) ////////////// //Callback functions -#ifdef ENC_USE_BUTTONSYSTEM//use button system void BtnEncyclopedia_newSelectDataPageBtnCallBack( GUI_BUTTON *btn, INT32 reason ) { if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) @@ -434,35 +363,5 @@ void BtnEncyclopedia_newSelectDataPageBtnCallBack( GUI_BUTTON *btn, INT32 reason InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); } } -#else -/** -* @brief Callback for data page buttons. -* Userdata at index 0 is used to determine which button is pressed. -*/ -void BtnEncyclopedia_newSelectDataPageRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason ) -{ - CHECKV( gGameExternalOptions.gEncyclopedia ); - if (iReason & MSYS_CALLBACK_REASON_INIT) - { - } - else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP) - { - UINT8 selectedButton = (UINT8)MSYS_GetRegionUserData( pRegion, 0 ); - - if( selectedButton == 0 ) - { - guiCurrentLaptopMode = LAPTOP_MODE_ENCYCLOPEDIA; - } - else if( selectedButton > 0 && selectedButton <= ENC_NUM_SUBPAGES ) - { - ChangingEncyclopediaSubPage ( selectedButton ); - guiCurrentLaptopMode = LAPTOP_MODE_ENCYCLOPEDIA_DATA; - } - } - else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP) - { - } -} -#endif #endif diff --git a/Laptop/FacilityProduction.cpp b/Laptop/FacilityProduction.cpp index 3b69b6e2..ea60571d 100644 --- a/Laptop/FacilityProduction.cpp +++ b/Laptop/FacilityProduction.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "WCheck.h" @@ -20,7 +17,6 @@ #include "Strategic Town Loyalty.h" #include "strategic.h" #include "BaseTable.h" -#endif /*#define MERCOMP_FONT_COLOR 2 #define CAMPHIS_FONT_BIG FONT14ARIAL diff --git a/Laptop/IMP AboutUs.cpp b/Laptop/IMP AboutUs.cpp index 37f03670..991aaca5 100644 --- a/Laptop/IMP AboutUs.cpp +++ b/Laptop/IMP AboutUs.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "IMP AboutUs.h" #include "CharProfile.h" #include "IMPVideoObjects.h" @@ -11,7 +8,6 @@ #include "cursors.h" #include "laptop.h" #include "IMP Text System.h" -#endif // IMP AboutUs buttons INT32 giIMPAboutUsButton[1]; diff --git a/Laptop/IMP Attribute Entrance.cpp b/Laptop/IMP Attribute Entrance.cpp index 50ccb47b..0ec42966 100644 --- a/Laptop/IMP Attribute Entrance.cpp +++ b/Laptop/IMP Attribute Entrance.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Attribute Entrance.h" #include "IMP MainPage.h" @@ -12,7 +9,6 @@ #include "cursors.h" #include "laptop.h" #include "IMP Text System.h" -#endif // the buttons UINT32 giIMPAttributeEntranceButtonImage[ 1 ]; diff --git a/Laptop/IMP Attribute Finish.cpp b/Laptop/IMP Attribute Finish.cpp index fa45e963..b87813f1 100644 --- a/Laptop/IMP Attribute Finish.cpp +++ b/Laptop/IMP Attribute Finish.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Attribute Finish.h" #include "IMP MainPage.h" @@ -15,7 +12,6 @@ #include "laptop.h" #include "IMP Text System.h" #include "IMP Attribute Selection.h" -#endif // buttons INT32 giIMPAttributeFinishButtonImage[ 2 ]; diff --git a/Laptop/IMP Attribute Selection.cpp b/Laptop/IMP Attribute Selection.cpp index 7418a101..6400f0f0 100644 --- a/Laptop/IMP Attribute Selection.cpp +++ b/Laptop/IMP Attribute Selection.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "GameSettings.h" -#else #include "CharProfile.h" #include "IMP Attribute Selection.h" #include "IMP MainPage.h" @@ -25,7 +20,6 @@ #include "IMP Color Choosing.h" #include "IMP Minor Trait.h" -#endif #define STARTING_LEVEL_BOX_POS_X ( 51 ) #define STARTING_LEVEL_BOX_POS_Y ( 296 ) diff --git a/Laptop/IMP Background.cpp b/Laptop/IMP Background.cpp index 99436dc2..9ea5c40e 100644 --- a/Laptop/IMP Background.cpp +++ b/Laptop/IMP Background.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Background.h" #include "IMP Skill Trait.h" #include "Button System.h" @@ -22,7 +17,6 @@ #include "IMP Compile Character.h" #include "GameSettings.h" #include "Interface.h" -#endif diff --git a/Laptop/IMP Begin Screen.cpp b/Laptop/IMP Begin Screen.cpp index bd65aed0..c140ee92 100644 --- a/Laptop/IMP Begin Screen.cpp +++ b/Laptop/IMP Begin Screen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Begin Screen.h" #include "IMP MainPage.h" @@ -26,7 +23,6 @@ #include "strategic.h" #include "text.h" #include "LaptopSave.h" -#endif #define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138 diff --git a/Laptop/IMP Character Trait.cpp b/Laptop/IMP Character Trait.cpp index cb605829..e7703298 100644 --- a/Laptop/IMP Character Trait.cpp +++ b/Laptop/IMP Character Trait.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Character Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Character Trait.h" #include "Button System.h" #include "utilities.h" @@ -18,7 +13,6 @@ #include "wordwrap.h" #include "CharProfile.h" #include "GameSettings.h" -#endif //******************************************************************* diff --git a/Laptop/IMP Character and Disability Entrance.cpp b/Laptop/IMP Character and Disability Entrance.cpp index e694a991..5cae0c9a 100644 --- a/Laptop/IMP Character and Disability Entrance.cpp +++ b/Laptop/IMP Character and Disability Entrance.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Character and Disability Entrance.h" #include "IMP MainPage.h" @@ -14,7 +11,6 @@ #include "IMP Text System.h" #include "text.h" -#endif // IMP personality entrance buttons INT32 giIMPCharacterAndDisabilityEntranceButton[1]; diff --git a/Laptop/IMP Color Choosing.cpp b/Laptop/IMP Color Choosing.cpp index a61e3aa2..310cf62d 100644 --- a/Laptop/IMP Color Choosing.cpp +++ b/Laptop/IMP Color Choosing.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Color Choosing Skin Hair.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Color Choosing.h" #include "Button System.h" #include "utilities.h" @@ -22,7 +17,6 @@ #include "Animation Data.h" #include "GameSettings.h" #include "Soldier Create.h" // added by Flugente for enums -#endif #include "IMP Confirm.h" diff --git a/Laptop/IMP Compile Character.cpp b/Laptop/IMP Compile Character.cpp index ee246952..0420b1c4 100644 --- a/Laptop/IMP Compile Character.cpp +++ b/Laptop/IMP Compile Character.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "GameSettings.h" -#else #include "laptop.h" #include "CharProfile.h" #include "Utilities.h" @@ -28,13 +23,13 @@ #include "IMP Color Choosing.h" #include "IMP Minor Trait.h" #include "IMP Voices.h" -#endif #include "IMP Confirm.h" // how many times should a 'die' be rolled for skills of the same type? #define HOW_MANY_ROLLS_FOR_SAME_SKILL_CHECK 20 +#define IMP_NEED_FOR_SLEEP 7 INT32 AttitudeList[ ATTITUDE_LIST_SIZE ]; INT32 iLastElementInAttitudeList = 0; @@ -191,6 +186,7 @@ void CreateACharacterFromPlayerEnteredStats( void ) gMercProfiles[LaptopSaveInfo.iIMPIndex].usVoiceIndex = iSelectedIMPVoiceSet; gMercProfiles[LaptopSaveInfo.iIMPIndex].Type = PROFILETYPE_IMP; + gMercProfiles[LaptopSaveInfo.iIMPIndex].ubNeedForSleep = IMP_NEED_FOR_SLEEP; // WDS: Advanced start //gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = gGameExternalOptions.ubIMPStartingLevel; diff --git a/Laptop/IMP Confirm.cpp b/Laptop/IMP Confirm.cpp index 40340279..81780462 100644 --- a/Laptop/IMP Confirm.cpp +++ b/Laptop/IMP Confirm.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP MainPage.h" #include "IMP HomePage.h" @@ -34,7 +31,6 @@ #include "GameSettings.h" #include "IMP Gear.h" // added by Flugente #include "IMP Gear Entrance.h" // added by Flugente -#endif #include #include diff --git a/Laptop/IMP Disability Trait.cpp b/Laptop/IMP Disability Trait.cpp index a940b5d2..b5a8e1be 100644 --- a/Laptop/IMP Disability Trait.cpp +++ b/Laptop/IMP Disability Trait.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Disability Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Disability Trait.h" #include "Button System.h" #include "utilities.h" @@ -18,7 +13,6 @@ #include "wordwrap.h" #include "CharProfile.h" #include "GameSettings.h" -#endif //******************************************************************* diff --git a/Laptop/IMP Finish.cpp b/Laptop/IMP Finish.cpp index aeedc233..f1a8bdbb 100644 --- a/Laptop/IMP Finish.cpp +++ b/Laptop/IMP Finish.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Finish.h" #include "IMP Portraits.h" @@ -19,7 +16,6 @@ #include "IMP Text System.h" #include "soundman.h" #include "text.h" -#endif #include "IMP Confirm.h" diff --git a/Laptop/IMP Gear Entrance.cpp b/Laptop/IMP Gear Entrance.cpp index 9dc5bd82..88da8903 100644 --- a/Laptop/IMP Gear Entrance.cpp +++ b/Laptop/IMP Gear Entrance.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Gear Entrance.h" #include "IMP MainPage.h" @@ -18,7 +15,6 @@ #include "laptop.h" #include "IMP Text System.h" #include "Text.h" -#endif // the buttons UINT32 giIMPGearEntranceButtonImage[2]; diff --git a/Laptop/IMP Gear.cpp b/Laptop/IMP Gear.cpp index fb843ab2..e8da0ada 100644 --- a/Laptop/IMP Gear.cpp +++ b/Laptop/IMP Gear.cpp @@ -3,11 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#include "IMP Skill Trait.h" -#include "_Ja25Englishtext.h" -#else #include "IMP Gear.h" #include "IMP Skill Trait.h" #include "Button System.h" @@ -34,7 +29,6 @@ #include "IMP Skill Trait.h" #include "IMP Minor Trait.h" #include "IMP Gear Entrance.h" -#endif extern BOOLEAN gfGlowTimerExpired; BOOLEAN fShowIMPItemHighLight = FALSE; @@ -75,6 +69,7 @@ extern BOOLEAN bBigBody; #define IMP_GEAR_SPACE_BETWEEN_BOXES 1 +#define IMP_GEAR_INV_SLOTS 25 //******************************************************************* // // Local Variables @@ -82,7 +77,7 @@ extern BOOLEAN bBigBody; //******************************************************************* INV_REGIONS gIMPGearInvData[NUM_INV_SLOTS]; MOUSE_REGION gIMPGearInvRegion[NUM_INV_SLOTS]; -MOUSE_REGION gIMPGearInvPoolRegion[25]; +MOUSE_REGION gIMPGearInvPoolRegion[IMP_GEAR_INV_SLOTS]; UINT32 gIMPInvDoneButtonImage; UINT32 gIMPInvDoneButton; UINT32 gIMPInvArrowButtonImage[2]; @@ -243,10 +238,11 @@ void ExitIMPGear( void ) { MSYS_RemoveRegion(&gIMPGearInvRegion[cnt]); } - for (size_t i = 0; i < 25; i++) + for (size_t i = 0; i < IMP_GEAR_INV_SLOTS; i++) { MSYS_RemoveRegion(&gIMPGearInvPoolRegion[i]); } + fShowIMPItemHighLight = FALSE; } @@ -865,7 +861,7 @@ void IMPCloseInventoryPool(void) { MSYS_EnableRegion(&gIMPGearInvRegion[cnt]); } - for (size_t i = 0; i < 25; i++) + for (size_t i = 0; i < IMP_GEAR_INV_SLOTS; i++) { MSYS_DisableRegion(&gIMPGearInvPoolRegion[i]); } @@ -952,7 +948,7 @@ void IMPInvClickCallback(MOUSE_REGION* pRegion, INT32 iReason) MSYS_DisableRegion(&gIMPGearInvRegion[cnt]); } - for (size_t i = 0; i < 25; i++) + for (size_t i = 0; i < IMP_GEAR_INV_SLOTS; i++) { MSYS_EnableRegion(&gIMPGearInvPoolRegion[i]); } @@ -1110,7 +1106,7 @@ void InitImpGearCoords(void) } // Inventory pool slots - for (size_t i = 0; i < 25; i++) + for (size_t i = 0; i < IMP_GEAR_INV_SLOTS; i++) { const UINT32 xOffset = gIMPInvPoolLayout.x + 24; // top left coords of the first item slot in selection grid sti const UINT32 yOffset = gIMPInvPoolLayout.y + 8; @@ -1193,12 +1189,19 @@ void DrawItemTextToInvPool(STR16 itemName, UINT32 x, UINT32 y) void RenderImpGearSelectionChoices(UINT32 pocket) { + CHAR16 tooltipText[5000]; const UINT32 xOffset = gIMPInvPoolLayout.x + 24; // top left coords of the first item slot in selection grid sti const UINT32 yOffset = gIMPInvPoolLayout.y + 8; const UINT32 xStep = 72; // steps to the next slot column and row const UINT32 yStep = 32; - - const UINT32 pageShift = gIMPCurrentInventoryPoolPage * 25; + + // Reset item slot tooltips + for (size_t i = 0; i < IMP_GEAR_INV_SLOTS; i++) + { + SetRegionFastHelpText(&gIMPGearInvPoolRegion[i], szIMPGearPocketText[55]); + } + + const UINT32 pageShift = gIMPCurrentInventoryPoolPage * IMP_GEAR_INV_SLOTS; UINT32 end = gIMPPossibleItems[pocket].size(); if (gIMPCurrentInventoryPoolPage < gIMPLastInventoryPoolPage) { @@ -1217,7 +1220,17 @@ void RenderImpGearSelectionChoices(UINT32 pocket) const auto xText = x; const auto yText = y + 24; DrawItemTextToInvPool(gIMPPossibleItems[pocket][i].second, xText, yText); + // Update tool tip to contain item name + const auto itemIndex = gIMPPossibleItems[pocket][i].first; + if (itemIndex != 0) + { + extern void GetHelpTextForItemInLaptop(STR16 pzStr, UINT16 usItemNumber); + GetHelpTextForItemInLaptop(tooltipText, itemIndex); + wcscat(tooltipText, L"\n"); + wcscat(tooltipText, szIMPGearPocketText[55]); + SetRegionFastHelpText(&gIMPGearInvPoolRegion[i - pageShift], tooltipText); + } // Check if currently selected item is shown in pool and adjust glow coordinates if (item == gIMPPocketSelectedItems[pocket].first) @@ -1482,4 +1495,4 @@ void RenderIMPGearBodytype(void) } BltVideoObjectFromIndex(FRAME_BUFFER, gIMPINVENTORY, index, x, y, VO_BLT_SRCTRANSPARENCY, NULL); -} \ No newline at end of file +} diff --git a/Laptop/IMP HomePage.cpp b/Laptop/IMP HomePage.cpp index da69f506..b54fa8a3 100644 --- a/Laptop/IMP HomePage.cpp +++ b/Laptop/IMP HomePage.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Compile Character.h" -#else #include "CharProfile.h" #include "IMP HomePage.h" #include "IMPVideoObjects.h" @@ -27,7 +23,6 @@ // WDS - make number of mercenaries, etc. be configurable #include "Squads.h" #include "Overhead.h" // added by Flugente for OUR_TEAM_SIZE_NO_VEHICLE -#endif #ifdef JA2UB #include "ub_config.h" diff --git a/Laptop/IMP MainPage.cpp b/Laptop/IMP MainPage.cpp index f0737421..41acd733 100644 --- a/Laptop/IMP MainPage.cpp +++ b/Laptop/IMP MainPage.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "IMP MainPage.h" #include "CharProfile.h" #include "IMPVideoObjects.h" @@ -23,7 +20,6 @@ #include "Soldier Profile.h" #include "Squads.h" #include "Overhead.h" // added by Flugente for OUR_TEAM_SIZE_NO_VEHICLE -#endif #include "IMP Confirm.h" diff --git a/Laptop/IMP Minor Trait.cpp b/Laptop/IMP Minor Trait.cpp index 17ed3eca..51286ca9 100644 --- a/Laptop/IMP Minor Trait.cpp +++ b/Laptop/IMP Minor Trait.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Minor Trait.h" #include "IMP Skill Trait.h" #include "Button System.h" @@ -22,7 +17,6 @@ #include "IMP Compile Character.h" #include "GameSettings.h" #include "personnel.h" // added by Flugente -#endif diff --git a/Laptop/IMP Personality Entrance.cpp b/Laptop/IMP Personality Entrance.cpp index 9b8f5637..2402663f 100644 --- a/Laptop/IMP Personality Entrance.cpp +++ b/Laptop/IMP Personality Entrance.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Personality Entrance.h" #include "IMP MainPage.h" @@ -12,7 +9,6 @@ #include "cursors.h" #include "laptop.h" #include "IMP Text System.h" -#endif // IMP personality entrance buttons INT32 giIMPPersonalityEntranceButton[1]; diff --git a/Laptop/IMP Personality Finish.cpp b/Laptop/IMP Personality Finish.cpp index 3e620005..cd5a0de5 100644 --- a/Laptop/IMP Personality Finish.cpp +++ b/Laptop/IMP Personality Finish.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Personality Finish.h" #include "IMP MainPage.h" @@ -13,7 +10,6 @@ #include "laptop.h" #include "IMP Text System.h" #include "IMP Compile Character.h" -#endif // this is the amount of time, the player waits until booted back to main profileing screen diff --git a/Laptop/IMP Personality Quiz.cpp b/Laptop/IMP Personality Quiz.cpp index 3ce0ac37..3a1cfe8f 100644 --- a/Laptop/IMP Personality Quiz.cpp +++ b/Laptop/IMP Personality Quiz.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Personality Quiz.h" #include "IMP MainPage.h" @@ -16,7 +13,6 @@ #include "IMP Text System.h" #include "input.h" #include "english.h" -#endif // Kaiden this line was commented before I screwed with it diff --git a/Laptop/IMP Portraits.cpp b/Laptop/IMP Portraits.cpp index fd1e21b4..9ba70518 100644 --- a/Laptop/IMP Portraits.cpp +++ b/Laptop/IMP Portraits.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Portraits.h" #include "IMP MainPage.h" @@ -15,7 +12,6 @@ #include "cursors.h" #include "laptop.h" #include "IMP Text System.h" -#endif #include "IMP Confirm.h" diff --git a/Laptop/IMP Prejudice.cpp b/Laptop/IMP Prejudice.cpp index 6c7cc83f..11712753 100644 --- a/Laptop/IMP Prejudice.cpp +++ b/Laptop/IMP Prejudice.cpp @@ -3,11 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Prejudice.h" #include "IMP Skill Trait.h" #include "Button System.h" @@ -28,7 +23,6 @@ #include "GameSettings.h" #include "Interface.h" #include "DropDown.h" -#endif //******************************************************************* diff --git a/Laptop/IMP Skill Trait.cpp b/Laptop/IMP Skill Trait.cpp index 080f23e3..eb1e18df 100644 --- a/Laptop/IMP Skill Trait.cpp +++ b/Laptop/IMP Skill Trait.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "IMP Skill Trait.h" - #include "_Ja25Englishtext.h" -#else #include "IMP Skill Trait.h" #include "Button System.h" #include "utilities.h" @@ -24,7 +19,6 @@ #include "IMP Minor Trait.h" #include "Soldier Profile.h" #include "personnel.h" // added by Flugente -#endif @@ -146,7 +140,7 @@ void HandleLastSelectedTraits( INT8 bNewTrait ); INT8 GetLastSelectedSkill( void ); BOOLEAN CameBackToSpecialtiesPageButNotFinished(); -MOUSE_REGION gMR_SkillTraitHelpTextRegions[IMP_SKILL_TRAITS_NEW_NUMBER_MAJOR_SKILLS]; +MOUSE_REGION gMR_SkillTraitHelpTextRegions[IMP_SKILL_TRAITS__NUMBER_SKILLS]; //ppp //******************************************************************* diff --git a/Laptop/IMP Text System.cpp b/Laptop/IMP Text System.cpp index 309d2d68..4fd013b8 100644 --- a/Laptop/IMP Text System.cpp +++ b/Laptop/IMP Text System.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "WordWrap.h" #include "sgp.h" #include "Encrypted File.h" @@ -41,7 +38,6 @@ #include "GameSettings.h" #endif -#endif #define IMP_SEEK_AMOUNT 5 * 80 * 2 diff --git a/Laptop/IMP Voices.cpp b/Laptop/IMP Voices.cpp index ac759e17..ed2398f7 100644 --- a/Laptop/IMP Voices.cpp +++ b/Laptop/IMP Voices.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "CharProfile.h" #include "IMP Voices.h" #include "IMP MainPage.h" @@ -20,7 +17,6 @@ #include "GameSettings.h" #include "LaptopSave.h" #include "IMP Confirm.h" -#endif INT32 iCurrentVoice = 0; UINT32 iSelectedIMPVoiceSet = 0; diff --git a/Laptop/IMPVideoObjects.cpp b/Laptop/IMPVideoObjects.cpp index 9328119d..57948a69 100644 --- a/Laptop/IMPVideoObjects.cpp +++ b/Laptop/IMPVideoObjects.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "IMPVideoObjects.h" #include "Utilities.h" #include "WCheck.h" @@ -10,7 +7,6 @@ #include "laptop.h" #include "Multi Language Graphic Utils.h" #include "IMP Attribute Selection.h" -#endif // globals diff --git a/Laptop/Intelmarket.cpp b/Laptop/Intelmarket.cpp index ee5e691e..99d3c839 100644 --- a/Laptop/Intelmarket.cpp +++ b/Laptop/Intelmarket.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -32,7 +29,6 @@ #include "Game Clock.h" #include "LuaInitNPCs.h" #include "Game Event Hook.h" -#endif #define MERCOMP_FONT_COLOR 2 #define CAMPHIS_FONT_COLOR_RED FONT_MCOLOR_RED diff --git a/Laptop/Laptop All.h b/Laptop/Laptop All.h deleted file mode 100644 index c2efeeb9..00000000 --- a/Laptop/Laptop All.h +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef __LAPTOP_ALL_H -#define __LAPTOP_ALL_H - -#pragma message("GENERATED PCH FOR LAPTOP PROJECT.") - -#include "Types.h" -#include "laptop.h" -#include "aim.h" -#include "Utilities.h" -#include "WCheck.h" -#include "Debug.h" -#include "WordWrap.h" -#include "Encrypted File.h" -#include "email.h" -#include "Text.h" -#include "LaptopSave.h" -#include "Multi Language Graphic Utils.h" -#include "AimArchives.h" -#include "AimFacialIndex.h" -#include "stdio.h" -#include "Aim.h" -#include "AimHistory.h" -#include "AimLinks.h" -#include "AimMembers.h" -#include "sysutil.h" -#include "Soldier Control.h" -#include "Interface Items.h" -#include "overhead.h" -#include "finances.h" -#include "vsurface.h" -#include "VObject.h" -#include "Faces.h" -#include "dialogue control.h" -#include "History.h" -#include "Game Event Hook.h" -#include "MercTextBox.h" -#include "Render Dirty.h" -#include "Soldier Add.h" -#include "Merc Hiring.h" -#include "strategic.h" -#include "english.h" -#include "GameSettings.h" -#include "Random.h" -#include "Strategic Status.h" -#include "Merc Contract.h" -#include "Strategic Merc Handler.h" -#include "AimPolicies.h" -#include "AimSort.h" -#include -#include "BobbyR.h" -#include "Arms Dealer Init.h" -#include "ArmsDealerInvInit.h" -#include "BobbyRGuns.h" -#include "Cursors.h" -#include "Weapons.h" -#include "Store Inventory.h" -#include "BobbyRAmmo.h" -#include "BobbyRArmour.h" -#include "BobbyRMailOrder.h" -#include "input.h" -#include "line.h" -#include "Campaign Types.h" -#include "BobbyRMisc.h" -#include "BobbyRUsed.h" -#include "CharProfile.h" -#include "IMP AboutUs.h" -#include "IMP Attribute Entrance.h" -#include "IMP Attribute Finish.h" -#include "IMP MainPage.h" -#include "IMP HomePage.h" -#include "IMPVideoObjects.h" -#include "IMP Text System.h" -#include "IMP Finish.h" -#include "IMP Portraits.h" -#include "IMP Voices.h" -#include "IMP Personality Entrance.h" -#include "IMP Attribute Selection.h" -#include "IMP Personality Quiz.h" -#include "IMP Begin Screen.h" -#include "IMP Personality Finish.h" -#include "IMP Confirm.h" -#include "messageboxscreen.h" -#include "soldier profile.h" -#include "IMP Compile Character.h" -#include "environment.h" -#include -#include "files.h" -#include "Game clock.h" -#include "Strategic Mines.h" -#include "florist.h" -#include "florist Cards.h" -#include "Florist Gallery.h" -#include "florist Order Form.h" -#include "Text Input.h" -#include "funeral.h" -#include "strategicmap.h" -#include "QuestText.h" -#include "Isometric Utils.h" -#include "Timer Control.h" -#include "Soldier Profile Type.h" -#include "Animation Data.h" -#include "soundman.h" -#include "mousesystem.h" -#include "sgp.h" -#include "Sound Control.h" -#include "Insurance Text.h" -#include "insurance.h" -#include "Assignments.h" -#include "insurance Info.h" -#include "insurance Contract.h" -#include "screens.h" -#include "Event Pump.h" -#include "mercs Files.h" -#include "mercs Account.h" -#include "mercs No Account.h" -#include "insurance Comments.h" -#include "sirtech.h" -#include "personnel.h" -#include "Interface Control.h" -#include "Game init.h" -#include "vobject_blitters.h" -#include "LibraryDataBase.h" -#include "music control.h" -#include "SaveLoadGame.h" -#include "RenderWorld.h" -#include "gameloop.h" -#include "Map Screen Interface.h" -#include "ambient control.h" -#include "Message.h" -#include "Map Screen Interface Bottom.h" -#include "Cursor Control.h" -#include "Quests.h" -#include "mercs.h" -#include "Speck Quotes.h" -#include "Font.h" -#include "mapscreen.h" -#include "Map Screen Interface Map.h" -#include "ShopKeeper Interface.h" -#include "Cheats.h" -#include "GameVersion.h" -#include "BriefingRoom_Data.h" -#include "Encyclopedia_new.h" -#include "Encyclopedia_Data_new.h" -#include "Rebel Command.h" -#endif \ No newline at end of file diff --git a/Laptop/Laptop_VS2005.vcproj b/Laptop/Laptop_VS2005.vcproj deleted file mode 100644 index 07b50e4b..00000000 --- a/Laptop/Laptop_VS2005.vcproj +++ /dev/null @@ -1,1107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Laptop/Laptop_VS2008.vcproj b/Laptop/Laptop_VS2008.vcproj deleted file mode 100644 index a2aed9bc..00000000 --- a/Laptop/Laptop_VS2008.vcproj +++ /dev/null @@ -1,1109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Laptop/Laptop_VS2010.vcxproj b/Laptop/Laptop_VS2010.vcxproj deleted file mode 100644 index 15da52cf..00000000 --- a/Laptop/Laptop_VS2010.vcxproj +++ /dev/null @@ -1,388 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - Win32Proj - Laptop - Laptop - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Laptop/Laptop_VS2010.vcxproj.filters b/Laptop/Laptop_VS2010.vcxproj.filters deleted file mode 100644 index d0576553..00000000 --- a/Laptop/Laptop_VS2010.vcxproj.filters +++ /dev/null @@ -1,585 +0,0 @@ - - - - - {84a4f64f-bc1b-4e0c-848c-2b7c145ae615} - - - {b159d1de-d6d6-4531-b86a-b991f7210268} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Laptop/Laptop_VS2013.vcxproj b/Laptop/Laptop_VS2013.vcxproj deleted file mode 100644 index bd787800..00000000 --- a/Laptop/Laptop_VS2013.vcxproj +++ /dev/null @@ -1,408 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - Win32Proj - Laptop - Laptop - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Laptop/Laptop_VS2013.vcxproj.filters b/Laptop/Laptop_VS2013.vcxproj.filters deleted file mode 100644 index 7f7f84a4..00000000 --- a/Laptop/Laptop_VS2013.vcxproj.filters +++ /dev/null @@ -1,585 +0,0 @@ - - - - - {84a4f64f-bc1b-4e0c-848c-2b7c145ae615} - - - {b159d1de-d6d6-4531-b86a-b991f7210268} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Laptop/Laptop_VS2017.vcxproj b/Laptop/Laptop_VS2017.vcxproj deleted file mode 100644 index 1603065e..00000000 --- a/Laptop/Laptop_VS2017.vcxproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - Win32Proj - Laptop - Laptop - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Laptop/Laptop_VS2019.vcxproj b/Laptop/Laptop_VS2019.vcxproj deleted file mode 100644 index a711fd99..00000000 --- a/Laptop/Laptop_VS2019.vcxproj +++ /dev/null @@ -1,585 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - Win32Proj - Laptop - Laptop - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Laptop/MilitiaWebsite.cpp b/Laptop/MilitiaWebsite.cpp index 662882b7..67e22893 100644 --- a/Laptop/MilitiaWebsite.cpp +++ b/Laptop/MilitiaWebsite.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -48,7 +45,6 @@ #include "Interface Items.h" #include "InterfaceItemImages.h" #include "CampaignStats.h" -#endif #define MERCOMP_FONT_COLOR 2 diff --git a/Laptop/PMC.cpp b/Laptop/PMC.cpp index f1f30ccb..652e15c5 100644 --- a/Laptop/PMC.cpp +++ b/Laptop/PMC.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -39,7 +36,6 @@ #include "Town Militia.h" #include "Strategic Town Loyalty.h" #include "MilitiaIndividual.h" -#endif std::vector gPMCHiringEvents; PMCGlobalData gPMCData; diff --git a/Laptop/Store Inventory.cpp b/Laptop/Store Inventory.cpp index f4d0b720..b21fa906 100644 --- a/Laptop/Store Inventory.cpp +++ b/Laptop/Store Inventory.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "Types.h" #include "Store Inventory.h" #include "Random.h" @@ -10,7 +7,6 @@ #include "ShopKeeper Interface.h" #include "armsdealerinvinit.h" #include "GameSettings.h" -#endif UINT8 StoreInventory[MAXITEMS][BOBBY_RAY_LISTS]; //= diff --git a/Laptop/WHO.cpp b/Laptop/WHO.cpp index 7ed01214..1b077b9f 100644 --- a/Laptop/WHO.cpp +++ b/Laptop/WHO.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -29,7 +26,6 @@ #include "Quests.h" #include "finances.h" #include "Game Clock.h" -#endif #define MERCOMP_FONT_COLOR 2 diff --git a/Laptop/XML_AIMAvailability.cpp b/Laptop/XML_AIMAvailability.cpp index fb76224c..76f7b2c0 100644 --- a/Laptop/XML_AIMAvailability.cpp +++ b/Laptop/XML_AIMAvailability.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "aim.h" -#endif struct { diff --git a/Laptop/XML_BriefingRoom.cpp b/Laptop/XML_BriefingRoom.cpp index 45c78ed9..d32f9a34 100644 --- a/Laptop/XML_BriefingRoom.cpp +++ b/Laptop/XML_BriefingRoom.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -16,7 +11,6 @@ #include "mercs.h" #include "Encrypted File.h" #include "GameSettings.h" -#endif #include "BriefingRoom_Data.h" diff --git a/Laptop/XML_CampaignStatsEvents.cpp b/Laptop/XML_CampaignStatsEvents.cpp index fc257b16..938c97bc 100644 --- a/Laptop/XML_CampaignStatsEvents.cpp +++ b/Laptop/XML_CampaignStatsEvents.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "CampaignStats.h" -#endif struct { diff --git a/Laptop/XML_ConditionsForMercAvailability.cpp b/Laptop/XML_ConditionsForMercAvailability.cpp index 929d574f..cd50b18c 100644 --- a/Laptop/XML_ConditionsForMercAvailability.cpp +++ b/Laptop/XML_ConditionsForMercAvailability.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "mercs.h" -#endif struct { diff --git a/Laptop/XML_Email.cpp b/Laptop/XML_Email.cpp index dae5a04e..ba0cd80f 100644 --- a/Laptop/XML_Email.cpp +++ b/Laptop/XML_Email.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -10,7 +5,6 @@ #include "Interface.h" #include "LuaInitNPCs.h" #include "email.h" -#endif struct { diff --git a/Laptop/XML_EmailMercAvailable.cpp b/Laptop/XML_EmailMercAvailable.cpp index 22b61f35..1a741297 100644 --- a/Laptop/XML_EmailMercAvailable.cpp +++ b/Laptop/XML_EmailMercAvailable.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -10,7 +5,6 @@ #include "Interface.h" #include "LuaInitNPCs.h" #include "email.h" -#endif struct { diff --git a/Laptop/XML_EmailMercLevelUp.cpp b/Laptop/XML_EmailMercLevelUp.cpp index 18a66cf0..c707dbd5 100644 --- a/Laptop/XML_EmailMercLevelUp.cpp +++ b/Laptop/XML_EmailMercLevelUp.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -10,7 +5,6 @@ #include "Interface.h" #include "LuaInitNPCs.h" #include "email.h" -#endif struct { diff --git a/Laptop/XML_History.cpp b/Laptop/XML_History.cpp index 8d182cd4..9706f980 100644 --- a/Laptop/XML_History.cpp +++ b/Laptop/XML_History.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -9,7 +6,6 @@ #include "Soldier Profile.h" #include "Text.h" #include "history.h" -#endif struct { diff --git a/Laptop/XML_IMPPortraits.cpp b/Laptop/XML_IMPPortraits.cpp index fd8902f6..d840a5fb 100644 --- a/Laptop/XML_IMPPortraits.cpp +++ b/Laptop/XML_IMPPortraits.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -8,7 +5,6 @@ #include "Interface.h" #include "IMP Confirm.h" #include "Soldier Profile.h" -#endif struct { diff --git a/Laptop/XML_IMPVoices.cpp b/Laptop/XML_IMPVoices.cpp index 428e97ef..64040f8e 100644 --- a/Laptop/XML_IMPVoices.cpp +++ b/Laptop/XML_IMPVoices.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "IMP Confirm.h" -#endif struct { diff --git a/Laptop/XML_OldAIMArchive.cpp b/Laptop/XML_OldAIMArchive.cpp index 48ab5633..4c3b56ea 100644 --- a/Laptop/XML_OldAIMArchive.cpp +++ b/Laptop/XML_OldAIMArchive.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "AimArchives.h" -#endif struct { diff --git a/Laptop/aim.cpp b/Laptop/aim.cpp index 732161f6..a03a80d5 100644 --- a/Laptop/aim.cpp +++ b/Laptop/aim.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "aim.h" #include "Utilities.h" @@ -17,7 +14,6 @@ #include "GameSettings.h" #include "english.h" #include "sysutil.h" -#endif #include "LocalizedStrings.h" #include "Soldier Profile.h" diff --git a/Laptop/email.cpp b/Laptop/email.cpp index 45ec6cef..6c12710f 100644 --- a/Laptop/email.cpp +++ b/Laptop/email.cpp @@ -1,7 +1,4 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else - #include "laptop.h" + #include "laptop.h" #include "email.h" #include "Utilities.h" #include "WCheck.h" @@ -23,7 +20,6 @@ #include "faces.h" #include "GameSettings.h" #include -#endif #include "soldier profile type.h" #include "strategicmap.h" diff --git a/Laptop/files.cpp b/Laptop/files.cpp index 08fd9637..feb80271 100644 --- a/Laptop/files.cpp +++ b/Laptop/files.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "builddefines.h" #include #include @@ -21,7 +18,6 @@ #include "XML.h" #include "expat.h" #include "Debug Control.h" -#endif #ifdef JA2UB #include "ub_config.h" diff --git a/Laptop/finances.cpp b/Laptop/finances.cpp index 261f02a8..57c8acba 100644 --- a/Laptop/finances.cpp +++ b/Laptop/finances.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "finances.h" #include "Game clock.h" @@ -23,7 +20,6 @@ #include "CampaignStats.h" // added by Flugente #include "DynamicDialogue.h" // added by Flugente -#endif // the global defines @@ -1612,6 +1608,10 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance) case REBEL_COMMAND_SPENDING: swprintf(pString, L"%s", pTransactionText[REBEL_COMMAND_SPENDING]); break; + + case REBEL_COMMAND_BOUNTY_PAYOUT: + swprintf(pString, L"%s", pTransactionText[REBEL_COMMAND_BOUNTY_PAYOUT]); + break; } } diff --git a/Laptop/finances.h b/Laptop/finances.h index b617e198..6c03e486 100644 --- a/Laptop/finances.h +++ b/Laptop/finances.h @@ -62,6 +62,7 @@ enum MINI_EVENT, // rftr: mini events REBEL_COMMAND, // rftr: rebel command REBEL_COMMAND_SPENDING, // rftr: rebel command + REBEL_COMMAND_BOUNTY_PAYOUT, // rftr: rebel command soldier bounties TEXT_NUM_FINCANCES }; diff --git a/Laptop/florist Cards.cpp b/Laptop/florist Cards.cpp index 5a37b718..2d15f995 100644 --- a/Laptop/florist Cards.cpp +++ b/Laptop/florist Cards.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "florist.h" #include "florist Cards.h" @@ -10,7 +7,6 @@ #include "Cursors.h" #include "Encrypted File.h" #include "Text.h" -#endif diff --git a/Laptop/florist Gallery.cpp b/Laptop/florist Gallery.cpp index 50fdc732..2734bc75 100644 --- a/Laptop/florist Gallery.cpp +++ b/Laptop/florist Gallery.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "florist.h" #include "florist Gallery.h" @@ -11,7 +8,6 @@ #include "stdio.h" #include "Encrypted File.h" #include "Text.h" -#endif diff --git a/Laptop/florist Order Form.cpp b/Laptop/florist Order Form.cpp index 6a3b64de..b62696fb 100644 --- a/Laptop/florist Order Form.cpp +++ b/Laptop/florist Order Form.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "florist.h" #include "florist Order Form.h" @@ -20,7 +17,6 @@ #include "LaptopSave.h" #include "Random.h" #include "postalservice.h" -#endif #include "meanwhile.h" diff --git a/Laptop/florist.cpp b/Laptop/florist.cpp index 0401461a..6f9df6f4 100644 --- a/Laptop/florist.cpp +++ b/Laptop/florist.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "florist.h" #include "florist Order Form.h" @@ -12,7 +9,6 @@ #include "florist Cards.h" #include "Text.h" #include "Multi Language Graphic Utils.h" -#endif #define FLORIST_SENTENCE_FONT FONT12ARIAL diff --git a/Laptop/funeral.cpp b/Laptop/funeral.cpp index 1669bb1c..cf79a381 100644 --- a/Laptop/funeral.cpp +++ b/Laptop/funeral.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "funeral.h" #include "WCheck.h" @@ -9,7 +6,6 @@ #include "Cursors.h" #include "Text.h" #include "Multi Language Graphic Utils.h" -#endif #define FUNERAL_SENTENCE_FONT FONT12ARIAL diff --git a/Laptop/history.cpp b/Laptop/history.cpp index d47031b4..6067098d 100644 --- a/Laptop/history.cpp +++ b/Laptop/history.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "History.h" #include "Game clock.h" @@ -16,7 +13,6 @@ #include "text.h" #include "message.h" #include "LaptopSave.h" -#endif #include "connect.h" @@ -1263,6 +1259,7 @@ void ProcessHistoryTransactionString(STR16 pString, HistoryUnitPtr pHistory) case HISTORY_SLAY_MYSTERIOUSLY_LEFT: case HISTORY_WALDO: case HISTORY_HELICOPTER_REPAIR_STARTED: + case HISTORY_INTERCEPTED_TRANSPORT_GROUP: //swprintf( pString, pHistoryStrings[ pHistory->ubCode ], pHistory->ubSecondCode ); swprintf( pString, HistoryName[ pHistory->ubCode ].sHistory, pHistory->ubSecondCode ); break; diff --git a/Laptop/history.h b/Laptop/history.h index 6fecf8d2..5a0a3d63 100644 --- a/Laptop/history.h +++ b/Laptop/history.h @@ -113,6 +113,7 @@ enum{ HISTORY_MERC_KILLED_CHARACTER, HISTORY_WALDO, HISTORY_HELICOPTER_REPAIR_STARTED, + HISTORY_INTERCEPTED_TRANSPORT_GROUP, TEXT_NUM_HISTORY }; diff --git a/Laptop/insurance Comments.cpp b/Laptop/insurance Comments.cpp index 2ba410d0..62b7c974 100644 --- a/Laptop/insurance Comments.cpp +++ b/Laptop/insurance Comments.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "Insurance Text.h" #include "insurance.h" @@ -10,7 +7,6 @@ #include "WordWrap.h" #include "Cursors.h" #include "Text.h" -#endif #define INS_CMNT_TITLE_Y 52 + LAPTOP_SCREEN_WEB_UL_Y diff --git a/Laptop/insurance Contract.cpp b/Laptop/insurance Contract.cpp index b40eaacf..c7114942 100644 --- a/Laptop/insurance Contract.cpp +++ b/Laptop/insurance Contract.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -26,7 +23,6 @@ #include "Assignments.h" #include "Map Screen Interface.h" #include "Interface.h" // added by Flugente -#endif #include #ifdef JA2UB diff --git a/Laptop/insurance Info.cpp b/Laptop/insurance Info.cpp index d281760c..12792df9 100644 --- a/Laptop/insurance Info.cpp +++ b/Laptop/insurance Info.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "insurance Info.h" #include "insurance.h" @@ -10,7 +7,6 @@ #include "Cursors.h" #include "Insurance Text.h" #include "Text.h" -#endif #define INS_INFO_FRAUD_TEXT_COLOR FONT_MCOLOR_RED diff --git a/Laptop/insurance.cpp b/Laptop/insurance.cpp index 04a3e7cd..6cb3ce2b 100644 --- a/Laptop/insurance.cpp +++ b/Laptop/insurance.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -13,7 +10,6 @@ #include "Encrypted File.h" #include "Text.h" #include "Multi Language Graphic Utils.h" -#endif #define INSURANCE_BACKGROUND_WIDTH 125 diff --git a/Laptop/laptop.cpp b/Laptop/laptop.cpp index 60262c7e..33e95d76 100644 --- a/Laptop/laptop.cpp +++ b/Laptop/laptop.cpp @@ -1,9 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "HelpScreen.h" - #include "BrokenLink.h" - #include "BobbyRShipments.h" -#else #include "sgp.h" #include "Utilities.h" #include "WCheck.h" @@ -94,7 +88,6 @@ #include "Intelmarket.h" // added by Flugente #include "FacilityProduction.h" // added by Flugente #include "Rebel Command.h" -#endif #include "connect.h" #include "BriefingRoom_Data.h" diff --git a/Laptop/merccompare.cpp b/Laptop/merccompare.cpp index 333c0584..413853d5 100644 --- a/Laptop/merccompare.cpp +++ b/Laptop/merccompare.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include "laptop.h" #include "insurance.h" #include "insurance Contract.h" @@ -27,7 +24,6 @@ #include "Overhead.h" #include "Map Screen Interface.h" #include "DynamicDialogue.h" // added by Flugente -#endif #define MERCOMP_FONT_COLOR 2 @@ -1227,4 +1223,4 @@ void SelectMercCompareMatrixRegionCallBack( MOUSE_REGION * pRegion, INT32 iReaso { } } -////////////////////////// MERC COMPARE MATRIX //////////////////////////////// \ No newline at end of file +////////////////////////// MERC COMPARE MATRIX //////////////////////////////// diff --git a/Laptop/mercs Account.cpp b/Laptop/mercs Account.cpp index bad6394c..b312ef2b 100644 --- a/Laptop/mercs Account.cpp +++ b/Laptop/mercs Account.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "mercs Account.h" #include "mercs.h" @@ -19,7 +16,6 @@ #include "Text.h" #include "Speck Quotes.h" #include "Multi Language Graphic Utils.h" -#endif #define MERC_ACCOUNT_TEXT_FONT FONT14ARIAL #define MERC_ACCOUNT_TEXT_COLOR FONT_MCOLOR_WHITE diff --git a/Laptop/mercs Files.cpp b/Laptop/mercs Files.cpp index f268ac39..e1372176 100644 --- a/Laptop/mercs Files.cpp +++ b/Laptop/mercs Files.cpp @@ -1,7 +1,4 @@ // WANNE 3 -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "mercs Files.h" #include "mercs.h" @@ -33,7 +30,6 @@ #include "Personnel.h" #include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item #include "mousesystem.h" -#endif #include "Cheats.h" #include "connect.h" diff --git a/Laptop/mercs No Account.cpp b/Laptop/mercs No Account.cpp index 9058f00a..d7e7d2a5 100644 --- a/Laptop/mercs No Account.cpp +++ b/Laptop/mercs No Account.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "mercs No Account.h" #include "mercs.h" @@ -12,7 +9,6 @@ #include "Random.h" #include "Text.h" #include "Speck Quotes.h" -#endif diff --git a/Laptop/mercs.cpp b/Laptop/mercs.cpp index c05fc362..0f96750a 100644 --- a/Laptop/mercs.cpp +++ b/Laptop/mercs.cpp @@ -1,12 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" - #include "GameSettings.h" - -#ifdef JA2UB - #include "Ja25 Strategic Ai.h" -#endif - -#else #include "laptop.h" #include "mercs.h" #include "Utilities.h" @@ -31,7 +22,6 @@ #include "Game Event Hook.h" #include "Quests.h" #include "AimMembers.h" -#endif #ifdef JA2UB #include "Ja25_Tactical.h" diff --git a/Laptop/personnel.cpp b/Laptop/personnel.cpp index 43e4c49b..beb0e873 100644 --- a/Laptop/personnel.cpp +++ b/Laptop/personnel.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "personnel.h" #include "Utilities.h" @@ -30,7 +27,6 @@ #include "GameSettings.h" #include "Merc Contract.h" #include "_Ja25Englishtext.h" // added by SANDRO -#endif #include "Soldier Macros.h" #include "InterfaceItemImages.h" diff --git a/Laptop/sirtech.cpp b/Laptop/sirtech.cpp index 82876a25..3709ed6e 100644 --- a/Laptop/sirtech.cpp +++ b/Laptop/sirtech.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS - #include "Laptop All.h" -#else #include "laptop.h" #include "SirTech.h" -#endif void GameInitSirTech() { diff --git a/Loading Screen.cpp b/Loading Screen.cpp index 496ee259..a0641d3b 100644 --- a/Loading Screen.cpp +++ b/Loading Screen.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Loading Screen.h" - #include "INIReader.h" -#else #include "vsurface.h" #include "mapscreen.h" #include "Loading Screen.h" @@ -15,7 +10,6 @@ #include "Font Control.h" #include "font.h" #include "render dirty.h" -#endif #include "Strategic Movement.h" #include "UndergroundInit.h" #include diff --git a/MPChatScreen.cpp b/MPChatScreen.cpp index 6cd03a9c..78ed6a65 100644 --- a/MPChatScreen.cpp +++ b/MPChatScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "sgp.h" #include "screenids.h" #include "Timer Control.h" @@ -25,7 +22,6 @@ #include "message.h" #include "utilities.h" #include "connect.h" -#endif #define CHATBOX_WIDTH 310 // 350 is the max size, the PrepareMercPopupBox will add the X_MARGIN to both sides #define CHATBOX_Y_MARGIN_NOLOG 25 @@ -1407,7 +1403,6 @@ void ChatLogMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) MoveToEndOfChatScreenMessageList( ); - //LeaveMutex(SCROLL_MESSAGE_MUTEX, __LINE__, __FILE__); } diff --git a/MPConnectScreen.cpp b/MPConnectScreen.cpp index 3e56d831..b6a1214a 100644 --- a/MPConnectScreen.cpp +++ b/MPConnectScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "MPConnectScreen.h" #include "GameSettings.h" @@ -22,7 +19,6 @@ #include "Soldier Profile.h" #include "Animated ProgressBar.h" #include "mainmenuscreen.h" -#endif #include "gameloop.h" #include "Game Init.h" diff --git a/MPHostScreen.cpp b/MPHostScreen.cpp index d93d3e73..21ec5580 100644 --- a/MPHostScreen.cpp +++ b/MPHostScreen.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Intro.h" -#else #include "Types.h" #include "MPHostScreen.h" #include "GameSettings.h" @@ -22,7 +18,6 @@ #include "Text Input.h" #include "_Ja25EnglishText.h" #include "Soldier Profile.h" -#endif #include "gameloop.h" #include "connect.h" diff --git a/MPJoinScreen.cpp b/MPJoinScreen.cpp index c30ec035..9eebad5f 100644 --- a/MPJoinScreen.cpp +++ b/MPJoinScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "MPJoinScreen.h" #include "GameSettings.h" @@ -19,7 +16,6 @@ #include "Text.h" #include "Text Input.h" #include "Soldier Profile.h" -#endif #include "gameloop.h" #include "connect.h" diff --git a/MPScoreScreen.cpp b/MPScoreScreen.cpp index 33802864..51d6e1a2 100644 --- a/MPScoreScreen.cpp +++ b/MPScoreScreen.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Intro.h" -#else #include "Types.h" #include "MPScoreScreen.h" #include "GameSettings.h" @@ -22,7 +18,6 @@ #include "Text.h" #include "Text Input.h" #include "Soldier Profile.h" -#endif #include "gameloop.h" #include "Game Init.h" diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index 656e804b..1db5e174 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "Encrypted File.h" -#else #include "sgp.h" #include "screenids.h" #include "Timer Control.h" @@ -29,7 +25,6 @@ #include "Encrypted File.h" #include "ja2 splash.h" #include "GameVersion.h" -#endif #include "gamesettings.h" #include "connect.h" @@ -105,9 +100,9 @@ extern void InitSightRange(); //lal UINT32 MainMenuScreenInit( ) { - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Version Label: %S, %s", zVersionLabel, zRevisionNumber )); - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Version #: %s", czVersionNumber )); - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Tracking #: %S", zTrackingNumber )); + DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Product: %S", zProductLabel )); + DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Version: %s", czVersionString )); + DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Build: %S", zBuildInformation )); return( TRUE ); } diff --git a/MessageBoxScreen.cpp b/MessageBoxScreen.cpp index 90e14c5d..79f9feb5 100644 --- a/MessageBoxScreen.cpp +++ b/MessageBoxScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "sgp.h" #include "screenids.h" #include "fade screen.h" @@ -24,7 +21,6 @@ #include "DropDown.h" // added by Flugente #include "Utilities.h" // added by Flugente for FilenameForBPP(...) #include "FeaturesScreen.h" -#endif #define MSGBOX_DEFAULT_WIDTH 300 diff --git a/ModularizedTacticalAI/CMakeLists.txt b/ModularizedTacticalAI/CMakeLists.txt new file mode 100644 index 00000000..0c4c78ba --- /dev/null +++ b/ModularizedTacticalAI/CMakeLists.txt @@ -0,0 +1,14 @@ +set(ModularizedTacticalAISrc +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyArmedVehiclePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/AbstractPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/CrowPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyCreaturePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyZombiePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/Plan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/PlanFactoryLibrary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/PlanList.cpp" +PARENT_SCOPE) diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2005.vcproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2005.vcproj deleted file mode 100644 index 2d8b2cdc..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2005.vcproj +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2008.vcproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2008.vcproj deleted file mode 100644 index 9d07527c..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2008.vcproj +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj deleted file mode 100644 index 74f62a65..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj +++ /dev/null @@ -1,186 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - {FF0A809E-A370-4640-A301-17B76D7A5B4E} - ModularizedTacticalAI - ModularizedTacticalAI - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\build\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\build\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - .lib - .lib - - - - Disabled - true - EnableFastChecks - MultiThreadedDebug - Level3 - EditAndContinue - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - - - true - MachineX86 - - - - - Disabled - true - EnableFastChecks - MultiThreadedDebug - Level3 - EditAndContinue - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - true - MachineX86 - - - - - MaxSpeed - true - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - MultiThreaded - true - Level3 - ProgramDatabase - - - - - MaxSpeed - true - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - MultiThreaded - true - Level3 - ProgramDatabase - - - - - MaxSpeed - true - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - MultiThreaded - true - Level3 - ProgramDatabase - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj.filters b/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj.filters deleted file mode 100644 index c10b1424..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2010.vcxproj.filters +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {4e822349-3600-4dac-8d02-84aed468b38e} - - - - - {a9a91695-5f1c-466f-b106-1b3829146363} - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj deleted file mode 100644 index ec76deb5..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {FF0A809E-A370-4640-A301-17B76D7A5B4E} - Win32Proj - ModularizedTacticalAI - ModularizedTacticalAI - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - NotSet - false - v120 - - - StaticLibrary - false - NotSet - false - v120 - - - StaticLibrary - false - NotSet - false - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj.filters b/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj.filters deleted file mode 100644 index 3ca27228..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2013.vcxproj.filters +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {4e822349-3600-4dac-8d02-84aed468b38e} - - - - - {a9a91695-5f1c-466f-b106-1b3829146363} - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2017.vcxproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2017.vcxproj deleted file mode 100644 index 2aae484c..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2017.vcxproj +++ /dev/null @@ -1,243 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {FF0A809E-A370-4640-A301-17B76D7A5B4E} - Win32Proj - ModularizedTacticalAI - ModularizedTacticalAI - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - NotSet - false - v141 - - - StaticLibrary - false - NotSet - false - v141 - - - StaticLibrary - false - NotSet - false - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj b/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj deleted file mode 100644 index 414b52ee..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj +++ /dev/null @@ -1,419 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {FF0A809E-A370-4640-A301-17B76D7A5B4E} - Win32Proj - ModularizedTacticalAI - ModularizedTacticalAI - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - StaticLibrary - false - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj.user b/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj.user deleted file mode 100644 index 6e2aec7a..00000000 --- a/ModularizedTacticalAI/ModularizedTacticalAI_VS2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Multiplayer/client.cpp b/Multiplayer/client.cpp index eaf8e54c..dfcd5fe7 100644 --- a/Multiplayer/client.cpp +++ b/Multiplayer/client.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "strategic.h" -#else #include "builddefines.h" #include "bullets.h" #include @@ -73,7 +69,6 @@ #include "SmokeEffects.h" #include "MPChatScreen.h" #include "sgp_logger.h" -#endif #include "MessageIdentifiers.h" #include "RakNetworkFactory.h" diff --git a/Options Screen.cpp b/Options Screen.cpp index 59096269..43fd9b1f 100644 --- a/Options Screen.cpp +++ b/Options Screen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "Options Screen.h" #include "Video.h" @@ -37,7 +34,6 @@ #include "Map Information.h" #include "SmokeEffects.h" #include "Sys Globals.h" -#endif #include "Cheats.h" #include "connect.h" diff --git a/Path Debug.vsprops b/Path Debug.vsprops deleted file mode 100644 index bf0b67d0..00000000 --- a/Path Debug.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/README.md b/README.md new file mode 100644 index 00000000..e5c4d516 --- /dev/null +++ b/README.md @@ -0,0 +1,83 @@ + +# JA2 v1.13 + +
+
+
+ +

+ JA2 v1.13 +

+ +
+
+ + + +### Preamble + +Jagged Alliance 2 v1.13 is a modification for the Jagged Alliance 2 game. + +Original development was done through SVN, this however ended abruptly in 2022, to keep the development going the step to Github has been made. + +Feel free to participate in the development! + + +For more information you can visit the following locations: +- [The Bear's Pit Forum](https://thepit.ja-galaxy-forum.com) +- [Jagged Alliance 2 v1.13 - Starter Documentation](https://github.com/1dot13/documentation) +- [How to get: latest 1.13, 7609, feature-descriptions and more](http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24648&start=0&) +- [JA2 v1.13 pbworks wiki (outdated)](http://ja2v113.pbworks.com/w/page/4218339/FrontPage) +- [The Bear's Pit Discord](https://discord.gg/GqrVZUM) + + +In case of any issues, look at [Reports](#Reports) or [Participation](#Participation) + +### Downloads + +> **Note** +> All-in-one releases come for different languages and include +> JA2 v1.13, the Map Editor and JA2 Unfinished Business. + +Visit the [releases page](https://github.com/1dot13/source/releases) to download the latest all-in-one. + + +### Installation + +1. Install the original Jagged Alliance 2 +2. Download the latest all-in-one release and copy its content to JA2 game directory. Overwrite when asked. +3. Modify ini settings if you like. +4. Play the game. + + Some additional information on can be found in folder "docs" inside download. + + If you face issues with higher resolutions, alt+tab not working, blackscreen, etc., + run the "cnc-ddraw-config.exe" in game-folder and adjust settings to your liking. + (those issues can occur due to the combination of old game and modern OS/hardware, cnc-ddraw helps to avoid those) + + +### Visual Studio setup + +1. Run `Visual Studio 2019` or newer. +2. Clone and open the location with the source code using one of these two options: + * Click `Clone a repository` + * Enter `git@github.com:1dot13/source.git` or `https://github.com/1dot13/source.git` in the Repository location field, select the path you want to clone the repository to and click `Clone`. + * Double-click on `Folder View` in the `Solution Explorer` + * Click `Open a local folder` + * Use this option if you already cloned the repository yourself. +3. Visual Studio will automatically detect the CMake configuration files and will run the CMake generation. There will bet a CMake error in the logs saying `No existing preset was found, copied a preset template to [some_path]`. This is normal and only happens once. +4. Click on the dropdown that says `x64-Debug` and select `Manage configurations...`. This should trigger Visual Studio to load the `CMakeUserPresets.json` file it just copied. Now you can close the window for managing the configurations. +5. The `x64-Debug` option should have been replaced by `1dot13 Debug`. Click it and select `Manage configurations...` again. Here is where you configure the language for the built executables as well as which ones to build, Most important, here is where you set `CMAKE_RUNTIME_OUTPUT_DIRECTORY` to the path to your JA2 1.13 installation. This will be used for debugging. Note that the path needs to have a working 1.13 installation, and that includes the 1.13 game data. +6. You can use `Build -> Build All` to build the executables you selected in the configuration. + + +### Reports + +For more information and reports, visit [Bug reports at Bear's Pit Forum](http://thepit.ja-galaxy-forum.com/index.php?t=thread&frm_id=216&) or join the [Bear's Pit Discord](https://discord.gg/GqrVZUM "Bear's Pit Discord") + + +### Participation + +Feel free to participate on GitHub. If you want to know how, or simply wanna share your thoughts on a topic join the [Bear's Pit Discord](https://discord.gg/GqrVZUM "Bear's Pit Discord") + + diff --git a/Roof Debug.vsprops b/Roof Debug.vsprops deleted file mode 100644 index 6975c0a4..00000000 --- a/Roof Debug.vsprops +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/Russian.vsprops b/Russian.vsprops deleted file mode 100644 index 41b43a1c..00000000 --- a/Russian.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/SaveLoadGame.cpp b/SaveLoadGame.cpp index dabf4588..13224cd6 100644 --- a/SaveLoadGame.cpp +++ b/SaveLoadGame.cpp @@ -1,14 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "PreBattle Interface.h" - #include "civ quotes.h" - #include "Militia Control.h" - #include "Strategic Event Handler.h" - #include "HelpScreen.h" - #include "Cheats.h" - #include "Animated ProgressBar.h" - #include "Shopkeeper Interface.h" -#else #include "Types.h" #include "Soldier Profile.h" #include "FileMan.h" @@ -119,7 +108,6 @@ #include "ASD.h" // added by Flugente #include "MilitiaIndividual.h" // added by Flugente #include "Rebel Command.h" -#endif #include "BobbyR.h" #include "Imp Portraits.h" @@ -2513,7 +2501,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile) return(FALSE); } - // WANNE - BMP: TODO! Struktur prfen + // WANNE - BMP: TODO! Struktur prüfen //load some structs, atm just POD but could change //Load STRUCT_AIData numBytesRead = 0; @@ -3456,7 +3444,7 @@ BOOLEAN SaveGame( int ubSaveGameID, STR16 pGameDesc ) SaveGameHeader.uiSavedGameVersion = SAVE_GAME_VERSION; wcscpy( SaveGameHeader.sSavedGameDesc, pGameDesc ); - strcpy( SaveGameHeader.zGameVersionNumber, czVersionNumber ); + strcpy( SaveGameHeader.zGameVersionNumber, czVersionString ); SaveGameHeader.uiFlags; @@ -4790,7 +4778,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID ) } if ((gGameOptions.ubSquadSize == 8 && iResolution < _800x600) || - (gGameOptions.ubSquadSize == 10 && iResolution < _1024x768)) + (gGameOptions.ubSquadSize == 10 && iResolution < _1280x720)) { FileClose( hFile ); return(FALSE); diff --git a/SaveLoadScreen.cpp b/SaveLoadScreen.cpp index 90e1ee54..5fe319ff 100644 --- a/SaveLoadScreen.cpp +++ b/SaveLoadScreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Types.h" #include "SaveLoadScreen.h" #include "Video.h" @@ -36,7 +33,6 @@ #include "Multi Language Graphic Utils.h" #include "Campaign Types.h" #include "PostalService.h" -#endif #include "connect.h" @@ -2370,7 +2366,7 @@ UINT8 CompareSaveGameVersion( INT32 bSaveGameID ) ubRetVal = SLS_SAVED_GAME_VERSION_OUT_OF_DATE; } - if( strcmp( SaveGameHeader.zGameVersionNumber, czVersionNumber ) != 0 ) + if( strcmp( SaveGameHeader.zGameVersionNumber, czVersionString ) != 0 ) { if( ubRetVal == SLS_SAVED_GAME_VERSION_OUT_OF_DATE ) ubRetVal = SLS_BOTH_SAVE_GAME_AND_GAME_VERSION_OUT_OF_DATE; @@ -2516,7 +2512,7 @@ void DoneFadeOutForSaveLoadScreen( void ) NextLoopCheckForEnoughFreeHardDriveSpace(); } else if ((gGameOptions.ubSquadSize == 8 && iResolution < _800x600) || - (gGameOptions.ubSquadSize == 10 && iResolution < _1024x768)) + (gGameOptions.ubSquadSize == 10 && iResolution < _1280x720)) { DoSaveLoadMessageBox( MSG_BOX_BASIC_STYLE, zSaveLoadText[SLG_SQUAD_SIZE_RES_ERROR], SAVE_LOAD_SCREEN, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack ); NextLoopCheckForEnoughFreeHardDriveSpace(); diff --git a/Screens.cpp b/Screens.cpp index 61e36800..6ddd8c47 100644 --- a/Screens.cpp +++ b/Screens.cpp @@ -1,13 +1,10 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "Screens.h" -#endif int iResolution; // INI file int iPlayIntro; int iDisableMouseScrolling; int iUseWinFonts; +float fTooltipScaleFactor; /* WANNE, Sgt.Kolja * INI file (Windowed or Fullscreen) * REPLACE all defines WINDOWED_MODE with this variable diff --git a/Standard Gaming Platform/Bitmap.h b/Standard Gaming Platform/Bitmap.h deleted file mode 100644 index 81bc4b35..00000000 --- a/Standard Gaming Platform/Bitmap.h +++ /dev/null @@ -1,63 +0,0 @@ -//************************************************************************** -// -// Filename : bitmap.h -// -// Purpose : bitmap format -// -// Modification history : -// -// 20nov96:HJH - Creation -// -//************************************************************************** - -#ifndef _bitmap_h -#define _bitmap_h - -//************************************************************************** -// -// Includes -// -//************************************************************************** - -#include "types.h" - -//************************************************************************** -// -// Defines -// -//************************************************************************** - -//************************************************************************** -// -// Typedefs -// -//************************************************************************** - -typedef struct sgpBmHeadertag -{ - UINT32 uiNumBytes; // number of bytes of the bitmap, including the - // memory for all variables in this structure plus - // all the memory in bitmap - UINT32 uiWidth; // width of bitmap in pixels - UINT32 uiHeight; // height of bitmap in pixels - UINT8 uiBitDepth; // 8, 16, 24, or 32 - UINT8 uiNumPalEntries; // if uiBitDepth is 8, non-zero, else 0 -} SGPBmHeader; - -typedef struct sgpBitmaptag -{ - SGPBmHeader header; - UINT8 uiData[1]; // if uiNumPalEntries != 0 - // uiNumPalEntries*3 (rgb) bytes for palette - // if uiBitDepth == 8 - // uiWidth * uiHeight bytes - // else if uiBitDepth == 16 - // uiWidth * uiHeight * 2 bytes - // else if uiBitDepth == 24 - // uiWidth * uiHeight * 3 bytes - // else if uiBitDepth == 32 - // uiWidth * uiHeight * 4 bytes -} SGPBitmap; - -#endif - diff --git a/Standard Gaming Platform/Button Sound Control.cpp b/Standard Gaming Platform/Button Sound Control.cpp index 404fe718..a2479e9c 100644 --- a/Standard Gaming Platform/Button Sound Control.cpp +++ b/Standard Gaming Platform/Button Sound Control.cpp @@ -1,21 +1,14 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include "Button System.h" #include "Button Sound Control.h" #include "Sound Control.h" #include "jascreens.h" -#endif void SpecifyButtonSoundScheme( INT32 iButtonID, INT8 bSoundScheme ) { ButtonList[ iButtonID ]->ubSoundSchemeID = (UINT8)bSoundScheme; if( bSoundScheme == BUTTON_SOUND_SCHEME_GENERIC ) { - #ifdef JA2 switch( guiCurrentScreen ) { case MAINMENU_SCREEN: @@ -52,7 +45,6 @@ void SpecifyButtonSoundScheme( INT32 iButtonID, INT8 bSoundScheme ) //DEBUG_SCREEN, //SEX_SCREEN, } - #endif if( bSoundScheme == BUTTON_SOUND_SCHEME_GENERIC ) bSoundScheme = BUTTON_SOUND_SCHEME_NONE; } @@ -71,7 +63,6 @@ void PlayButtonSound( INT32 iButtonID, INT32 iSoundType ) case BUTTON_SOUND_SCHEME_GENERIC: break; -#ifdef JA2 case BUTTON_SOUND_SCHEME_VERYSMALLSWITCH1: switch( iSoundType ) @@ -186,7 +177,6 @@ void PlayButtonSound( INT32 iButtonID, INT32 iSoundType ) } break; -#endif } diff --git a/Standard Gaming Platform/Button System.cpp b/Standard Gaming Platform/Button System.cpp index ea0796be..dd3d5b04 100644 --- a/Standard Gaming Platform/Button System.cpp +++ b/Standard Gaming Platform/Button System.cpp @@ -4,11 +4,6 @@ Rewritten mostly by Kris Morness ***********************************************************************************************/ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include @@ -23,7 +18,6 @@ #include "Button System.h" #include "line.h" #include - #if defined( JA2 ) || defined( UTIL ) #include "WordWrap.h" #include "video.h" #include "Button Sound Control.h" @@ -32,33 +26,11 @@ #include "Render Dirty.h" #include "utilities.h" #endif - #else - #include "video2.h" - #endif -#endif #include //ATE: Added to let Wiz default creating mouse regions with no cursor, JA2 default to a cursor ( first one ) -#ifdef JA2 #define MSYS_STARTING_CURSORVAL 0 -#else - #define MSYS_STARTING_CURSORVAL MSYS_NO_CURSOR - // The following should be moved from here - #define GETPIXELDEPTH( ) ( gbPixelDepth ) // From "utilities.h" in JA2 - #define COLOR_RED 162 // From "lighting.h" in JA2 - #define COLOR_BLUE 203 - #define COLOR_YELLOW 144 - #define COLOR_GREEN 184 - #define COLOR_LTGREY 134 - #define COLOR_BROWN 80 - #define COLOR_PURPLE 160 - #define COLOR_ORANGE 76 - #define COLOR_WHITE 208 - #define COLOR_BLACK 72 - // this doesn't exactly belong here either... (From "Font Control.h" in JA2) - #define FONT_MCOLOR_BLACK 0 -#endif #define COLOR_DKGREY 136 @@ -78,11 +50,9 @@ CHAR8 str[128]; //an already deleted button, or it's images, etc. It will also ensure that you don't create //the same button that already exists. //TO REMOVE ALL DEBUG FUNCTIONALITY: simply comment out BUTTONSYSTEM_DEBUGGING definition -#ifdef JA2 #ifdef _DEBUG #define BUTTONSYSTEM_DEBUGGING #endif -#endif #ifdef BUTTONSYSTEM_DEBUGGING BOOLEAN gfIgnoreShutdownAssertions; // symbol already declared globally in mousesystem.cpp (jonathanl) @@ -2872,9 +2842,7 @@ void QuickButtonCallbackMButn( MOUSE_REGION *reg, INT32 reason ) if( StateBefore != StateAfter ) { -#ifdef JA2 InvalidateRegion(b->Area.RegionTopLeftX, b->Area.RegionTopLeftY, b->Area.RegionBottomRightX, b->Area.RegionBottomRightY); -#endif } if( gfPendingButtonDeletion ) @@ -2937,11 +2905,9 @@ void RenderButtons(void) b->uiFlags &= (~BUTTON_DIRTY); DrawButtonFromPtr(b); -#ifdef JA2 InvalidateRegion(b->Area.RegionTopLeftX, b->Area.RegionTopLeftY, b->Area.RegionBottomRightX, b->Area.RegionBottomRightY); //#else // InvalidateRegion(b->Area.RegionTopLeftX, b->Area.RegionTopLeftY, b->Area.RegionBottomRightX, b->Area.RegionBottomRightY, FALSE); -#endif } } @@ -3214,9 +3180,7 @@ void DrawDefaultOnButton( GUI_BUTTON *b ) //bottom (two thick) LineDraw( TRUE, b->Area.RegionTopLeftX-1, b->Area.RegionBottomRightY, b->Area.RegionBottomRightX+1, b->Area.RegionBottomRightY, 0, pDestBuf ); LineDraw( TRUE, b->Area.RegionTopLeftX-1, b->Area.RegionBottomRightY+1, b->Area.RegionBottomRightX+1, b->Area.RegionBottomRightY+1, 0, pDestBuf ); - #ifdef JA2 InvalidateRegion( b->Area.RegionTopLeftX-1, b->Area.RegionTopLeftY-1, b->Area.RegionBottomRightX+1, b->Area.RegionBottomRightY+1 ); - #endif } if( b->bDefaultStatus == DEFAULT_STATUS_DOTTEDINTERIOR || b->bDefaultStatus == DEFAULT_STATUS_WINDOWS95 ) { //Draw an internal dotted rectangle. @@ -3559,7 +3523,6 @@ void DrawTextOnButton(GUI_BUTTON *b) xp++; yp++; } -#ifdef JA2 if( b->sWrappedWidth != -1 ) { UINT8 bJustified=0; @@ -3606,12 +3569,6 @@ void DrawTextOnButton(GUI_BUTTON *b) xp+= b->bTextXSubOffSet; mprintf(xp, yp, b->string); } -#else - if(b->fMultiColor) - gprintf(xp, yp, b->string); - else - mprintf(xp, yp, b->string); -#endif // Restore the old text printing settings } } @@ -3680,11 +3637,6 @@ void DrawGenericButton(GUI_BUTTON *b) // The 3x2 size was a bit limiting. JA2 should default to the original // size, unchanged -#ifndef JA2 - pTrav = &(BPic->pETRLEObject[0] ); - iBorderHeight = (INT32)pTrav->usHeight; - iBorderWidth = (INT32)pTrav->usWidth; -#endif // Compute the number of button "chunks" needed to be blitted width = b->Area.RegionBottomRightX - b->Area.RegionTopLeftX; @@ -4204,9 +4156,7 @@ void BtnGenericMouseMoveButtonCallback(GUI_BUTTON *btn,INT32 reason) } } - #ifdef JA2 InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); - #endif } else if( reason & MSYS_CALLBACK_REASON_GAIN_MOUSE ) { @@ -4216,9 +4166,7 @@ void BtnGenericMouseMoveButtonCallback(GUI_BUTTON *btn,INT32 reason) PlayButtonSound( btn->IDNum, BUTTON_SOUND_CLICKED_ON ); } - #ifdef JA2 InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY); - #endif } } @@ -4237,9 +4185,7 @@ void ReleaseAnchorMode() gpAnchoredButton->uiFlags |= BUTTON_CLICKED_ON; else gpAnchoredButton->uiFlags &= ( ~BUTTON_CLICKED_ON ); - #ifdef JA2 InvalidateRegion(gpAnchoredButton->Area.RegionTopLeftX, gpAnchoredButton->Area.RegionTopLeftY, gpAnchoredButton->Area.RegionBottomRightX, gpAnchoredButton->Area.RegionBottomRightY); - #endif } gpPrevAnchoredButton = gpAnchoredButton; gpAnchoredButton = NULL; @@ -4308,9 +4254,7 @@ void HideButton( INT32 iButtonNum ) b->Area.uiFlags &= (~MSYS_REGION_ENABLED); b->uiFlags |= BUTTON_DIRTY; - #ifdef JA2 InvalidateRegion(b->Area.RegionTopLeftX, b->Area.RegionTopLeftY, b->Area.RegionBottomRightX, b->Area.RegionBottomRightY); - #endif } void ShowButton( INT32 iButtonNum ) @@ -4326,9 +4270,7 @@ void ShowButton( INT32 iButtonNum ) b->Area.uiFlags |= MSYS_REGION_ENABLED; b->uiFlags |= BUTTON_DIRTY; - #ifdef JA2 InvalidateRegion(b->Area.RegionTopLeftX, b->Area.RegionTopLeftY, b->Area.RegionBottomRightX, b->Area.RegionBottomRightY); - #endif } void DisableButtonHelpTextRestore( void ) diff --git a/Standard Gaming Platform/Button System.h b/Standard Gaming Platform/Button System.h index a00705da..c1c074d6 100644 --- a/Standard Gaming Platform/Button System.h +++ b/Standard Gaming Platform/Button System.h @@ -15,17 +15,10 @@ // Moved here from Button System.c by DB 99/01/07 // Names of the default generic button image files. -#ifdef JA2 #define DEFAULT_GENERIC_BUTTON_OFF "GENBUTN.STI" #define DEFAULT_GENERIC_BUTTON_ON "GENBUTN2.STI" #define DEFAULT_GENERIC_BUTTON_OFF_HI "GENBUTN3.STI" #define DEFAULT_GENERIC_BUTTON_ON_HI "GENBUTN4.STI" -#else -#define DEFAULT_GENERIC_BUTTON_OFF "Data\\Message Box\\GENBUTN.STI" -#define DEFAULT_GENERIC_BUTTON_ON "Data\\Message Box\\GENBUTN2.STI" -#define DEFAULT_GENERIC_BUTTON_OFF_HI "Data\\Message Box\\GENBUTN3.STI" -#define DEFAULT_GENERIC_BUTTON_ON_HI "Data\\Message Box\\GENBUTN4.STI" -#endif #define BUTTON_TEXT_LEFT -1 #define BUTTON_TEXT_CENTER 0 diff --git a/Standard Gaming Platform/CMakeLists.txt b/Standard Gaming Platform/CMakeLists.txt new file mode 100644 index 00000000..e804d037 --- /dev/null +++ b/Standard Gaming Platform/CMakeLists.txt @@ -0,0 +1,43 @@ +set(SGPSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Button Sound Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Button System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Compression.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Container.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DEBUG.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/debug_util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/debug_win_util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DirectDraw Calls.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DirectX Common.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/English.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileCat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileMan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Flic.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Font.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/himage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/impTGA.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Install.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja2 Libs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LibraryDataBase.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/line.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MemMan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mousesystem.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PCX.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PngLoader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Random.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/readdir.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/RegInst.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sgp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sgp_logger.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/shading.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/soundman.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/STCI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/stringicmp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/timer.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/video.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vobject.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vobject_blitters.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vsurface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WinFont.cpp" +PARENT_SCOPE) diff --git a/Standard Gaming Platform/Compression.cpp b/Standard Gaming Platform/Compression.cpp index 66ae6e91..b9922aae 100644 --- a/Standard Gaming Platform/Compression.cpp +++ b/Standard Gaming Platform/Compression.cpp @@ -1,12 +1,6 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "MemMan.h" #include "debug.h" #include "zlib.h" -#endif // mem allocation functions for ZLIB's purposes diff --git a/Standard Gaming Platform/Container.cpp b/Standard Gaming Platform/Container.cpp index 56b8845c..ad140dd5 100644 --- a/Standard Gaming Platform/Container.cpp +++ b/Standard Gaming Platform/Container.cpp @@ -19,11 +19,6 @@ // this crap. DON'T USE THIS -- NO MATTER WHAT!!! //***************************************************************************** -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include @@ -35,7 +30,6 @@ #if _MSC_VER < 1300 //(iostream.h was removed from VC.NET2003) #include #endif -#endif //***************************************************************************** diff --git a/Standard Gaming Platform/Cursor Control.cpp b/Standard Gaming Platform/Cursor Control.cpp index fc9bd1ec..fc06f69c 100644 --- a/Standard Gaming Platform/Cursor Control.cpp +++ b/Standard Gaming Platform/Cursor Control.cpp @@ -1,17 +1,7 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "Cursor Control.h" - #if defined( JA2 ) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif -#endif /////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -317,7 +307,6 @@ void CursorDatabaseClear(void) BOOLEAN SetCurrentCursorFromDatabase( UINT32 uiCursorIndex ) { -#ifdef JA2 BOOLEAN ReturnValue = TRUE; UINT16 usSubIndex; @@ -331,9 +320,6 @@ BOOLEAN SetCurrentCursorFromDatabase( UINT32 uiCursorIndex ) if ( gfCursorDatabaseInit ) { - // Enter mouse buffer mutex - //EnterMutex(MOUSE_BUFFER_MUTEX, __LINE__, __FILE__); - // If the current cursor is the first index, disable cursors if ( uiCursorIndex == VIDEO_NO_CURSOR ) @@ -407,11 +393,7 @@ BOOLEAN SetCurrentCursorFromDatabase( UINT32 uiCursorIndex ) } - #ifdef JA2 SetMouseCursorProperties( (INT16)(usEffWidth/2), (INT16)(usEffHeight/2), (UINT16)(usEffHeight), (UINT16)(usEffWidth ) ); - #else - SetMouseCursorProperties( sCenterValY, (INT16)( sCenterValY + gsGlobalCursorYOffset ), MAX_CURSOR_HEIGHT, MAX_CURSOR_WIDTH ); - #endif DirtyCursor( ); } @@ -554,11 +536,7 @@ BOOLEAN SetCurrentCursorFromDatabase( UINT32 uiCursorIndex ) sCenterValX = pCurData->sOffsetX; sCenterValY = pCurData->sOffsetY; - #ifdef JA2 SetMouseCursorProperties( sCenterValX, (INT16)( sCenterValY + gsGlobalCursorYOffset ), pCurData->usHeight, pCurData->usWidth ); - #else - SetMouseCursorProperties( sCenterValY, (INT16)( sCenterValY + gsGlobalCursorYOffset ), MAX_CURSOR_HEIGHT, MAX_CURSOR_WIDTH ); - #endif DirtyCursor( ); } } @@ -584,9 +562,6 @@ BOOLEAN SetCurrentCursorFromDatabase( UINT32 uiCursorIndex ) } return ( ReturnValue ); -#else - return(0); -#endif } diff --git a/Standard Gaming Platform/Cursor Control.h b/Standard Gaming Platform/Cursor Control.h index 3d5a5a36..bd3404ca 100644 --- a/Standard Gaming Platform/Cursor Control.h +++ b/Standard Gaming Platform/Cursor Control.h @@ -6,11 +6,7 @@ #include "VObject.h" #include "VSurface.h" -#if defined( JA2 ) || defined( UTIL ) #include "Video.h" -#else -#include "video2.h" -#endif #ifdef __cplusplus extern "C" { diff --git a/Standard Gaming Platform/DEBUG.H b/Standard Gaming Platform/DEBUG.H index e09af8d5..2b2e3169 100644 --- a/Standard Gaming Platform/DEBUG.H +++ b/Standard Gaming Platform/DEBUG.H @@ -200,12 +200,8 @@ extern void _DebugMessage(const char *pSourceFile, unsigned uiLineNum, const cha #define DbgTopicRegistration(a, b, c); ((void *)0) #define DbgMessage(a, b, c) ((void *)0) -#if defined( JA2 ) || defined( UTIL ) #define RegisterJA2DebugTopic(a, b) ((void *)0) #define DebugMsg(a, b, c) ((void *)0) -#else -#define DebugMsg(a) ((void *)0) -#endif //******************************************************************************************* #endif diff --git a/Standard Gaming Platform/DEBUG.cpp b/Standard Gaming Platform/DEBUG.cpp index 9b1bb528..8463e9fb 100644 --- a/Standard Gaming Platform/DEBUG.cpp +++ b/Standard Gaming Platform/DEBUG.cpp @@ -29,16 +29,13 @@ #include #include #include "debug.h" - #include "WizShare.h" //Kris addition - #ifdef JA2 #include "screenids.h" #include "Sys Globals.h" #include "jascreens.h" #include "gameloop.h" #include "input.h" - #endif // CJC added #ifndef _NO_DEBUG_TXT @@ -46,6 +43,9 @@ #endif #include "GameSettings.h" #include "SaveLoadGame.h" +#include "Font.h" +#include "GameVersion.h" +#include "Text.h" #include "debug_util.h" @@ -411,6 +411,8 @@ void _FailMessage(const char* message, unsigned lineNum, const char * functionNa sgp::dumpStackTrace(message); + mprintf( 10, 10, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation ); + std::stringstream basicInformation; basicInformation << "Assertion Failure [Line " << lineNum; if (functionName) { diff --git a/Standard Gaming Platform/DbMan.cpp b/Standard Gaming Platform/DbMan.cpp deleted file mode 100644 index d4cd1b8a..00000000 --- a/Standard Gaming Platform/DbMan.cpp +++ /dev/null @@ -1,1038 +0,0 @@ -//************************************************************************** -// -// Filename : DbMan.c -// -// Purpose : function definitions for the database manager -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -//************************************************************************** -// -// Includes -// -//************************************************************************** - -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else - #include "types.h" - #include - #include - #include - #include "windows.h" - #include "FileMan.h" - #include "MemMan.h" - #include "DbMan.h" - #include "Debug.h" -#endif - -//************************************************************************** -// -// Defines -// -//************************************************************************** - -#define FILENAME_LENGTH 600 -#define IM_FILENAME_LENGTH 100 -#define BUCKET_FILENAME_LENGTH 100 -#define INITIAL_NUM_HANDLES 20 -#define NUM_FILES_TO_ADD_AT_A_TIME 20 - -#define CHECKF(exp) if (!(exp)) { return(FALSE); } -#define CHECKV(exp) if (!(exp)) { return; } -#define CHECKN(exp) if (!(exp)) { return(NULL); } -#define CHECKBI(exp) if (!(exp)) { return(-1); } -#define CHECK0(exp) if (!(exp)) { return(0); } - -#define PRINT_DEBUG_INFO FileDebugPrint(); - -#define ExtractFileIndex( exp ) ( (HFILEINDEX)((exp)>>16) ) -#define ExtractDbIndex( exp ) ( (HDBINDEX)((exp)&0x0000FFFF) ) - -//************************************************************************** -// -// Typedefs -// -//************************************************************************** - - -// NOTE: the file format of the index file will be as follows: -// -// UINT32 # - number of entries to follow for filenames starting with '0' -// entry 1 filename -// entry 1 databasename -// entry 2 filename -// entry 2 databasename -// ... -// entry # filename -// entry # databasename -// -// UINT32 # - number of entries to follow for filenames starting with '1' -// entry 1 filename -// entry 1 databasename -// entry 2 filename -// entry 2 databasename -// ... -// entry # filename -// entry # databasename -// -// ... -// -// UINT32 # - number of entries to follow for filenames starting with 'z' -// entry 1 filename -// entry 1 databasename -// entry 2 filename -// entry 2 databasename -// ... -// entry # filename -// entry # databasename -// -// UINT32 #### - offset in file to entries for the letter '0' -// ... -// UINT32 #### - offset in file to entries for the letter '9' -// UINT32 #### - offset in file to entries for the letter 'a' -// ... -// UINT32 #### - offset in file to entries for the letter 'z' -// -// - each set of entries for a letter will comprise a bucket - -typedef struct DbBucketTag -{ - CHAR cFirstLetter; - - CHAR *pstrFilenames; - CHAR *pstrDatabasenames; - UINT32 uiNumNames; -} DbBucket; - -typedef struct DbFileTag -{ - CHAR strFilename[FILENAME_LENGTH]; - INT32 iFileSize; // if 0, this structure is not in use - INT32 iOffsetIntoFile; - INT32 iCurrentPosition; -} DbFile; - -typedef struct DbInfoTag -{ - CHAR strFilename[FILENAME_LENGTH]; - HWFILE hFile; // if 0, this structure is not in use - - DbFile *pOpenFiles; - UINT32 uiNumFiles; -} DbInfo; - -typedef struct DbSystemTag -{ - DbBucket bucket; - CHAR strIndexFilename[FILENAME_LENGTH]; - - DbInfo *pDBFiles; - UINT32 uiNumDBFiles; - - BOOLEAN fDebug; -} DbSystem; - -// this is for reading the database file -typedef struct DbHeaderTag -{ - CHAR strSignature[20]; - INT32 iNumFiles; - INT32 iOffsetToIndex; -} DbHeader; - -// this is for reading the database file -typedef struct IndexMemberTag -{ - CHAR strFilename[IM_FILENAME_LENGTH]; - INT32 iFileSize; - INT32 iOffsetIntoFile; - INT32 time; -} IndexMember; - -//************************************************************************** -// -// Variables -// -//************************************************************************** - -DbSystem gdb; - -//************************************************************************** -// -// Function Prototypes -// -//************************************************************************** - -void DbDebugPrint( void ); -HDBFILE CreateDBFileHandle( HFILEINDEX, HDBINDEX ); -BOOLEAN InitDB( DbInfo *pDBInfo, STR strFilename ); -HDBINDEX OpenDatabaseContainingFile( STR strFilename ); -BOOLEAN InitFile( HWFILE hDBFile, DbFile *pFileInfo, STR strFilename ); -BOOLEAN LoadBucket( CHAR cFirstLetter ); -BOOLEAN GetShortFilename( STR strFilename, STR strPathname ); - -//************************************************************************** -// -// Functions -// -//************************************************************************** - -//************************************************************************** -// -// CreateDBFileHandle -// -// Creates a file handle from two indices. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -HDBFILE CreateDBFileHandle( HFILEINDEX high, HDBINDEX low ) -{ - return( (((LONG)high)<<16)|low ); -} - -//************************************************************************** -// -// DbSystemInit -// -// Starts up the database system. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -BOOLEAN InitializeDatabaseManager( STR strIndexFilename ) -{ - INT32 i; - UINT32 uiSize; - - if ( !FileExistsNoDB( strIndexFilename ) ) - { - return(FALSE); - } - - uiSize = INITIAL_NUM_HANDLES * sizeof(DbInfo); - gdb.fDebug = FALSE; - gdb.pDBFiles = (DbInfo *) MemAlloc( uiSize ); - CHECKF( gdb.pDBFiles ); - - gdb.uiNumDBFiles = INITIAL_NUM_HANDLES; - - for ( i=0 ; icreation -// -//************************************************************************** - -void ShutdownDatabaseManager( void ) -{ - UINT32 i; - - MemFree( gdb.bucket.pstrFilenames ); - MemFree( gdb.bucket.pstrDatabasenames ); - - // close any unclosed files - for ( i=1 ; icreation -// -//************************************************************************** - -void DbDebug( BOOLEAN fFlag ) -{ - gdb.fDebug = fFlag; -} - -//************************************************************************** -// -// DbExists -// -// Checks if a database file exists. -// -// Parameter List : -// -// STR ->name of file to check existence of -// -// Return Value : -// -// BOOLEAN ->TRUE if it exists -// ->FALSE if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -BOOLEAN DbExists( STR strFilename ) -{ - return( FileExists( strFilename ) ); -} - -//************************************************************************** -// -// DbOpen -// -// Opens a database. -// -// Parameter List : -// -// STR ->filename -// -// Return Value : -// -// HDBINDEX ->handle of opened file -// ->0 if unsuccessful -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -HDBINDEX DbOpen( STR strFilename ) -{ - HDBINDEX hDBIndex; - UINT16 i; - CHAR cShortFilename[FILENAME_LENGTH]; - CHAR cShortDBName[FILENAME_LENGTH]; - BOOLEAN fFound; - - fFound = FALSE; - hDBIndex = 0; - - // first, find any already open databases, and make sure that if we're trying to - // open one that's already open, then we just return an index to it - for ( i=1 ; ihandle to database file to close -// -// Return Value : -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -void DbClose( HDBINDEX hFile ) -{ - if ( hFile && gdb.pDBFiles[hFile].hFile ) - { - MemFree( gdb.pDBFiles[hFile].pOpenFiles ); - FileClose( gdb.pDBFiles[hFile].hFile ); - gdb.pDBFiles[hFile].hFile = 0; - - DbgMessage( TOPIC_DATABASE_MANAGER, DBG_LEVEL_2, "Closing Database File" ); - } -} - -//************************************************************************** -// -// DbFileOpen -// -// Opens a file in a database. -// -// Parameter List : -// -// STR ->filename -// UIN32 ->access - read or write, or both -// BOOLEAN ->delete on close -// -// Return Value : -// -// HWFILE ->handle of opened file -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -HDBFILE DbFileOpen( STR strFilename ) -{ - HDBFILE hFile; - HFILEINDEX hFileIndex = 0xffff; - HDBINDEX hDBIndex; - UINT16 i; - - hDBIndex = OpenDatabaseContainingFile( strFilename ); - if ( !hDBIndex ) - return(0); - - for ( i=1 ; ihandle to database file to close -// -// Return Value : -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -void DbFileClose( HDBFILE hDBFile ) -{ - HFILEINDEX hFileIndex; - HDBINDEX hDBIndex; - - hFileIndex = ExtractFileIndex( hDBFile ); - hDBIndex = ExtractDbIndex( hDBFile ); - - if ( hDBIndex >= gdb.uiNumDBFiles ) - return; - - if ( gdb.pDBFiles[hDBIndex].pOpenFiles ) - { - if ( hFileIndex >= gdb.pDBFiles[hDBIndex].uiNumFiles ) - return; - - if ( gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize ) - { - gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize = 0; - } - } -} - -//************************************************************************** -// -// DbFileRead -// -// To read a file in a database. -// -// Parameter List : -// -// HWFILE ->handle to file to read from -// void * ->source buffer -// UINT32 ->num bytes to read -// UINT32 ->num bytes read -// -// Return Value : -// -// BOOLEAN ->TRUE if successful -// ->FALSE if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -BOOLEAN DbFileRead(HDBFILE hDBFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead) -{ - HFILEINDEX hFileIndex; - HDBINDEX hDBIndex; - HWFILE hFile; - UINT32 uiStartPos, uiCurPos, uiBytesRead; - - hFileIndex = ExtractFileIndex( hDBFile ); - hDBIndex = ExtractDbIndex( hDBFile ); - - CHECKF( hDBIndex < gdb.uiNumDBFiles ); - CHECKF( gdb.pDBFiles[hDBIndex].pOpenFiles ) - CHECKF( hFileIndex < gdb.pDBFiles[hDBIndex].uiNumFiles ); - CHECKF( gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize ); - - hFile = gdb.pDBFiles[hDBIndex].hFile; - uiStartPos = gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iOffsetIntoFile; - uiCurPos = gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iCurrentPosition; - - CHECKF( hFile ); - - FileSeek( hFile, uiStartPos + uiCurPos, FILE_SEEK_FROM_START ); - FileRead( hFile, pDest, uiBytesToRead, &uiBytesRead ); - - if ( puiBytesRead ) - *puiBytesRead = uiBytesRead; - - gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iCurrentPosition += uiBytesToRead; - - return(TRUE); -} - -//************************************************************************** -// -// DbFileLoad -// -// To open, read, and close a file. -// -// Parameter List : -// -// -// Return Value : -// -// BOOLEAN ->TRUE if successful -// ->FALSE if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -BOOLEAN DbFileLoad(STR filename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead) -{ - HDBFILE hDBFile; - UINT32 uiBytesRead; - - hDBFile = DbFileOpen( filename ); - CHECKF( hDBFile ); - - DbFileRead( hDBFile, pDest, uiBytesToRead, &uiBytesRead ); - DbFileClose( hDBFile ); - - if ( puiBytesRead ) - *puiBytesRead = uiBytesRead; - - return(TRUE); -} - -//************************************************************************** -// -// DbFileSeek -// -// To seek to a position in a file in a database. -// -// Parameter List : -// -// HWFILE ->handle to file to seek in -// UINT32 ->distance to seek -// UINT8 ->how to seek -// -// Return Value : -// -// BOOLEAN ->TRUE if successful -// ->FALSE if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -BOOLEAN DbFileSeek( HDBFILE hDBFile, UINT32 uiDistance, UINT8 uiHow ) -{ - HFILEINDEX hFileIndex; - HDBINDEX hDBIndex; - UINT32 uiStartPos, uiCurPos, uiSize; - - hFileIndex = ExtractFileIndex( hDBFile ); - hDBIndex = ExtractDbIndex( hDBFile ); - - CHECKF( hDBIndex < gdb.uiNumDBFiles ); - CHECKF( gdb.pDBFiles[hDBIndex].pOpenFiles ) - CHECKF( hFileIndex < gdb.pDBFiles[hDBIndex].uiNumFiles ); - CHECKF( gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize ); - - uiStartPos = gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iOffsetIntoFile; - uiCurPos = gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iCurrentPosition; - uiSize = gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize; - - if ( uiHow == FILE_SEEK_FROM_START ) - uiCurPos = uiDistance; - else if ( uiHow == FILE_SEEK_FROM_END ) - uiCurPos = uiSize - uiDistance; - else if ( uiHow == FILE_SEEK_FROM_CURRENT ) - uiCurPos += uiDistance; - else - return(FALSE); - - return(TRUE); -} - -//************************************************************************** -// -// DbFileGetSize -// -// To get the current position in a file. -// -// Parameter List : -// -// HWFILE ->handle to file -// -// Return Value : -// -// INT32 ->current offset in file if successful -// ->-1 if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -UINT32 DbFileGetPos( HDBFILE hDBFile ) -{ - HFILEINDEX hFileIndex; - HDBINDEX hDBIndex; - - hFileIndex = ExtractFileIndex( hDBFile ); - hDBIndex = ExtractDbIndex( hDBFile ); - - CHECK0( hDBIndex < gdb.uiNumDBFiles ); - CHECK0( gdb.pDBFiles[hDBIndex].pOpenFiles ) - CHECK0( hFileIndex < gdb.pDBFiles[hDBIndex].uiNumFiles ); - CHECK0( gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize ); - - return(gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iCurrentPosition); -} - -//************************************************************************** -// -// DbFileGetSize -// -// To get the current file size. -// -// Parameter List : -// -// HWFILE ->handle to file -// -// Return Value : -// -// INT32 ->file size in file if successful -// ->0 if not -// -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -UINT32 DbFileGetSize( HDBFILE hDBFile ) -{ - HFILEINDEX hFileIndex; - HDBINDEX hDBIndex; - - hFileIndex = ExtractFileIndex( hDBFile ); - hDBIndex = ExtractDbIndex( hDBFile ); - - CHECK0( hDBIndex < gdb.uiNumDBFiles ); - CHECK0( gdb.pDBFiles[hDBIndex].pOpenFiles ) - CHECK0( hFileIndex < gdb.pDBFiles[hDBIndex].uiNumFiles ); - CHECK0( gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize ); - - return(gdb.pDBFiles[hDBIndex].pOpenFiles[hFileIndex].iFileSize); -} - -//************************************************************************** -// -// DbDebugPrint -// -// To print the debug state to output. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 24sep96:HJH ->creation -// -//************************************************************************** - -void DbDebugPrint( void ) -{ -} - -//************************************************************************** -// -// InitDB -// -// To initialize a database info structure. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 15oct96:HJH ->creation -// -//************************************************************************** - -BOOLEAN InitDB( DbInfo *pDBInfo, STR strFilename ) -{ - HWFILE hFile; - INT32 i; - - CHECKF(pDBInfo); - - hFile = FileOpen( strFilename, FILE_ACCESS_READ, FALSE ); - CHECKF( hFile ); - - strcpy( pDBInfo->strFilename, strFilename ); - pDBInfo->hFile = hFile; - pDBInfo->pOpenFiles = (DbFile *) MemAlloc(INITIAL_NUM_HANDLES * sizeof(DbFile)); - - if ( !pDBInfo->pOpenFiles ) - { - FileClose( hFile ); - return(FALSE); - } - - for ( i=0 ; ipOpenFiles[i].iFileSize = 0; - } - pDBInfo->uiNumFiles = INITIAL_NUM_HANDLES; - - return(TRUE); -} - -//************************************************************************** -// -// OpenDatabaseContainingFile -// -// To open, or find the already opened database, containing the given file. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 15oct96:HJH ->creation -// -//************************************************************************** - -HDBINDEX OpenDatabaseContainingFile( STR strFilename ) -{ - CHAR cFirst, cFilename[FILENAME_LENGTH], cCheckname[FILENAME_LENGTH]; - UINT32 i; - HDBINDEX hIndex; - - hIndex = 0; - GetShortFilename( cFilename, strFilename ); - - cFirst = cFilename[0]; - - if ( cFirst != gdb.bucket.cFirstLetter ) - LoadBucket( cFirst ); - - for ( i=0 ; icreation -// -//************************************************************************** - -BOOLEAN InitFile( HWFILE hDBFile, DbFile *pFileInfo, STR strFilename ) -{ - DbHeader header; - IndexMember im; - UINT32 uiBytesRead; - INT32 i; - CHAR cFilename[FILENAME_LENGTH], cShortFilename[FILENAME_LENGTH]; - - CHECKF( pFileInfo ); - CHECKF( strFilename ); - CHECKF( hDBFile ); - - FileSeek( hDBFile, 0, FILE_SEEK_FROM_START ); - FileRead( hDBFile, &header, sizeof(DbHeader), &uiBytesRead ); - CHECKF( uiBytesRead == sizeof(DbHeader) ); - FileSeek( hDBFile, header.iOffsetToIndex, FILE_SEEK_FROM_START ); - - GetShortFilename( cShortFilename, strFilename ); - for ( i=0 ; istrFilename, strFilename ); - pFileInfo->iFileSize = im.iFileSize; - pFileInfo->iOffsetIntoFile = im.iOffsetIntoFile; - pFileInfo->iCurrentPosition = 0; - return(TRUE); - } - } - - return(FALSE); -} - -//************************************************************************** -// -// LoadBucket -// -// To load a bucketfull of file-database name pairs. -// -// Parameter List : -// Return Value : -// Modification history : -// -// 15oct96:HJH ->creation -// -//************************************************************************** - -BOOLEAN LoadBucket( CHAR cFirstLetter ) -{ - HWFILE hFile; - UINT32 i, uiPosition, uiBytesRead, uiNumEntries, uiSize; - CHAR cFilename[FILENAME_LENGTH], cDatabasename[FILENAME_LENGTH]; - - uiNumEntries = 0; - - MemFree( gdb.bucket.pstrFilenames ); - MemFree( gdb.bucket.pstrDatabasenames ); - - hFile = FileOpen( gdb.strIndexFilename, FILE_ACCESS_READ, FALSE ); - CHECKF(hFile); - uiSize = FileGetSize( hFile ); - - if ( cFirstLetter >= 'a' && cFirstLetter <= 'z' ) - uiPosition = 'z' - cFirstLetter + 1; - else - uiPosition = 26 + ('9' - cFirstLetter + 1); - - FileSeek( hFile, sizeof(UINT32)*uiPosition, FILE_SEEK_FROM_END ); - FileRead( hFile, &uiPosition, sizeof(UINT32), &uiBytesRead ); - if ( uiPosition > uiSize ) - { - // error - return(FALSE); - } - - FileSeek( hFile, uiPosition, FILE_SEEK_FROM_START ); - FileRead( hFile, &uiNumEntries, sizeof(UINT32), &uiBytesRead ); - - CHECKF(uiNumEntries); - - gdb.bucket.pstrFilenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH); - CHECKF(gdb.bucket.pstrFilenames); - - gdb.bucket.pstrDatabasenames = (STR8)MemAlloc( uiNumEntries * FILENAME_LENGTH); - if ( !gdb.bucket.pstrDatabasenames ) - { - MemFree(gdb.bucket.pstrFilenames); - return(FALSE); - } - - - for ( i=0 ; icreation -// -//************************************************************************** - -BOOLEAN GetShortFilename( STR strFilename, STR strPathname ) -{ - CHAR *pcLast; - - pcLast = strrchr( strPathname, '\\' ); - - if ( pcLast ) - { - pcLast = pcLast + 1; - strcpy( strFilename, pcLast ); - } - else - strcpy( strFilename, strPathname ); - - return(TRUE); -} - diff --git a/Standard Gaming Platform/DbMan.h b/Standard Gaming Platform/DbMan.h deleted file mode 100644 index 13af5e63..00000000 --- a/Standard Gaming Platform/DbMan.h +++ /dev/null @@ -1,87 +0,0 @@ -//************************************************************************** -// -// Filename : DbMan.h -// -// Purpose : prototypes for the database manager -// -// Modification history : -// -// 08oct96:HJH - Creation -// -//************************************************************************** - -#ifndef _DBMAN_H -#define _DBMAN_H - -//************************************************************************** -// -// Includes -// -//************************************************************************** - -#include "types.h" - -//************************************************************************** -// -// Defines -// -//************************************************************************** - -#ifndef FILE_ACCESS_READ -#define FILE_ACCESS_READ 0x01 -#endif - -#ifndef FILE_ACCESS_WRITE -#define FILE_ACCESS_WRITE 0x02 -#endif - -#define FILE_SEEK_FROM_START 0x01 // keep in sync with fileman.h -#define FILE_SEEK_FROM_END 0x02 // keep in sync with fileman.h -#define FILE_SEEK_FROM_CURRENT 0x04 // keep in sync with fileman.h - -//************************************************************************** -// -// Typedefs -// -//************************************************************************** - -typedef UINT8 BYTE; -typedef UINT32 HDBFILE; -typedef UINT16 HFILEINDEX; -typedef UINT16 HDBINDEX; - -//************************************************************************** -// -// Function Prototypes -// -//************************************************************************** - -#ifdef __cplusplus -extern "C" { -#endif - -extern BOOLEAN InitializeDatabaseManager( STR strIndexFilename ); -extern void ShutdownDatabaseManager( void ); -extern void DbDebug( BOOLEAN f ); - -extern BOOLEAN DbExists( STR filename ); - -extern HDBINDEX DbOpen( STR filename ); -extern void DbClose( HDBINDEX ); - -extern HDBFILE DbFileOpen( STR filename ); -extern void DbFileClose( HDBFILE ); - -extern BOOLEAN DbFileRead( HDBFILE hFile, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead ); -extern BOOLEAN DbFileLoad( STR filename, PTR pDest, UINT32 uiBytesToRead, UINT32 *puiBytesRead ); -extern BOOLEAN DbFileSeek( HDBFILE hFile, UINT32 uiDistance, UINT8 uiHow ); - -extern UINT32 DbFileGetPos( HDBFILE hFile ); -extern UINT32 DbFileGetSize( HDBFILE ); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/Standard Gaming Platform/DirectDraw Calls.cpp b/Standard Gaming Platform/DirectDraw Calls.cpp index dc5aa11c..99fa328f 100644 --- a/Standard Gaming Platform/DirectDraw Calls.cpp +++ b/Standard Gaming Platform/DirectDraw Calls.cpp @@ -1,15 +1,9 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "DirectX Common.h" #include "DirectDraw Calls.h" #include #include "debug.h" #include "vobject_blitters.h" -#endif // DirectDrawSurface2 Calls void diff --git a/Standard Gaming Platform/DirectX Common.cpp b/Standard Gaming Platform/DirectX Common.cpp index 832d3037..9c6daefb 100644 --- a/Standard Gaming Platform/DirectX Common.cpp +++ b/Standard Gaming Platform/DirectX Common.cpp @@ -2,17 +2,11 @@ #include #include -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include "DirectX Common.h" #include #include "debug.h" -#endif void DirectXZeroMem ( void* pMemory, int nSize ) { diff --git a/Standard Gaming Platform/English.cpp b/Standard Gaming Platform/English.cpp index 48d360fa..9781fce2 100644 --- a/Standard Gaming Platform/English.cpp +++ b/Standard Gaming Platform/English.cpp @@ -1,10 +1,4 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "english.h" -#endif // The gsKeyTranslationTable is used to return KEY values on the basis of the virtual key code and // SHIFT/ALT/CTRL key states. Range 0-255 is for normal keys, 256-511 is when SHIFT is pressed diff --git a/Standard Gaming Platform/ExceptionHandling.cpp b/Standard Gaming Platform/ExceptionHandling.cpp deleted file mode 100644 index 5e8ff996..00000000 --- a/Standard Gaming Platform/ExceptionHandling.cpp +++ /dev/null @@ -1,1600 +0,0 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else - #include "Types.h" - #include - #include - #include - #include "FileMan.h" -#endif - - - -#ifdef JA2 -#endif - -//If we are to use exception handling -#ifdef ENABLE_EXCEPTION_HANDLING - - -const int NumCodeBytes = 16; // Number of code bytes to record. -const int MaxStackDump = 2048; // Maximum number of DWORDS in stack dumps. -const int StackColumns = 8; // Number of columns in stack dump. - -#define ONEK 1024 -#define SIXTYFOURK (64*ONEK) -#define ONEM (ONEK*ONEK) -#define ONEG (ONEK*ONEK*ONEK) - -//ppp -void ErrorLog(HWFILE LogFile, STR8 Format, ...); -STR GetExceptionString( DWORD uiExceptionCode ); -void DisplayRegisters( HWFILE hFile, CONTEXT *pContext ); -BOOLEAN GetAndDisplayModuleAndSystemInfo( HWFILE hFile, CONTEXT *pContext ); -BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext ); -void RecordModuleList(HWFILE hFile ); -void PrintTime(STR8 output, FILETIME TimeToPrint); -static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle); - -static LPTOP_LEVEL_EXCEPTION_FILTER g_pfnOrigFilt = NULL ; - -LONG __stdcall ERCrashDumpExceptionFilter(EXCEPTION_POINTERS* pExPtrs); -LONG __stdcall ERCrashDumpExceptionFilterEx(const char* pAppName, const char* pPath, EXCEPTION_POINTERS* pExPtrs); -static void ERLogModules(HWFILE fdump); - -#if defined(_IMAGEHLP_) && defined(_X86_) -#define MAX_SYMNAME_SIZE 1024 -static CHAR symBuffer[sizeof(IMAGEHLP_SYMBOL)+MAX_SYMNAME_SIZE]; -static PIMAGEHLP_SYMBOL g_sym = (PIMAGEHLP_SYMBOL) symBuffer; -static void ERLogStackWalk(HWFILE fdump, EXCEPTION_POINTERS* pExPtrs); -#endif //defined(_IMAGEHLP_) && defined(_X86_) - - - -INT32 RecordExceptionInfo( EXCEPTION_POINTERS *pExceptInfo ) -{ - EXCEPTION_RECORD Record; - CONTEXT Context; - CHAR8 zFileName[512]; - CHAR8 zDate[512]; - CHAR8 zTime[512]; - HWFILE hFile; - CHAR8 zString[2048]; - SYSTEMTIME SysTime; - CHAR8 zNewLine[] = "\r\n"; - - - //create local copies of the exception info - memcpy( &Record, pExceptInfo->ExceptionRecord , sizeof( EXCEPTION_RECORD ) ); - memcpy( &Context, pExceptInfo->ContextRecord, sizeof( CONTEXT ) ); - - - // - // Open a file to output the current state of the game - // - - // Get the current time - GetLocalTime( &SysTime ); - - //create a date string - sprintf( zDate, "%02d_%02d_%d", SysTime.wDay, SysTime.wMonth, SysTime.wYear ); - - //create a time string - sprintf( zTime, "%02d_%02d", SysTime.wHour, SysTime.wMinute ); - - //create the crash file - sprintf( zFileName, "Crash Report_%s___%s.txt", zDate, zTime ); - - // create the save game file - hFile = FileOpen( zFileName, FILE_ACCESS_WRITE | FILE_OPEN_ALWAYS, FALSE ); - if( !hFile ) - { - FileClose( hFile ); - return( 0 ); - } - - // - // Display the version number - // -#ifdef JA2 - - //Dispay Ja's version number - ErrorLog( hFile, "%S %S: %s. %S",zVersionLabel, zRevisionNumber, czVersionNumber, zTrackingNumber ); - - //Insert a new line - ErrorLog( hFile, zNewLine ); - - //Insert a new line - ErrorLog( hFile, zNewLine ); -#endif - - - - // - // Write out the current state of the system - // - - GetAndDisplayModuleAndSystemInfo( hFile, &Context ); - - - //Insert a new line - ErrorLog( hFile, zNewLine ); - - //Display the address of where the exception occurred - sprintf( zString, "Exception occurred at address: 0x%08x\r\n", Record.ExceptionAddress ); - ErrorLog( hFile, zString ); - - - //if the exception was an access violation, display the offending address - if( Record.ExceptionCode == EXCEPTION_ACCESS_VIOLATION && Record.NumberParameters != 0 ) - { - if( Record.ExceptionInformation[0] != 0 ) - { - //Display the address of where the access violation occurred - sprintf( zString, "\tWrite Access Violation at: 0x%08x\r\n", Record.ExceptionInformation[1] ); - } - else - { - //Display the address of where the access violation occurred - sprintf( zString, "\tWrite Access Violation at: 0x%08x\r\n", Record.ExceptionInformation[1] ); - } - - ErrorLog( hFile, zString ); - } - - - //Insert a new line - ErrorLog( hFile, zNewLine ); - - //Display the exception that caused this - sprintf( zString, "Exact Error Message \r\n \"%s\"\r\n", GetExceptionString( Record.ExceptionCode ) ); - ErrorLog( hFile, zString ); - - //Insert a new line - ErrorLog( hFile, zNewLine ); - - //Dispay if the code 'could' continue - if( Record.ExceptionFlags != 0 ) - sprintf( zString, "%s\r\n", "The game 'can NOT' continue" ); - else - sprintf( zString, "%s\r\n", "The game 'CAN' continue" ); - ErrorLog( hFile, zString ); - - - //Insert a new line - ErrorLog( hFile, zNewLine ); - ErrorLog( hFile, zNewLine ); - - // - // Display the current context information - // - DisplayRegisters( hFile, &Context ); - - ErrorLog( hFile, zNewLine ); - ErrorLog( hFile, zNewLine ); - - // Stack walk if symbles are available - ERLogStackWalk( hFile, pExceptInfo ); - ErrorLog( hFile, zNewLine ); - ErrorLog( hFile, zNewLine ); - - //display the stack ( call stack + local variables ) - DisplayStack( hFile, &Context); - - //Display some spaces - ErrorLog( hFile, zNewLine ); - ErrorLog( hFile, zNewLine ); - - //Display all modules currently loaded - //RecordModuleList(hFile ); - - ERLogModules(hFile); // records version - - //eee - - FileClose( hFile ); - - return( EXCEPTION_EXECUTE_HANDLER ); -} - - - -void ErrorLog( HWFILE hFile, STR8 Format, ...) -{ - char buffer[2000]; // wvsprintf never prints more than one K. - UINT32 uiNumBytesWritten=0; - UINT32 uiStringWidth; - va_list arglist; - va_start( arglist, Format); - wvsprintf(buffer, Format, arglist); - va_end( arglist); - - //WriteFile(LogFile, buffer, lstrlen(buffer), &NumBytes, 0); - - - uiStringWidth = lstrlen(buffer); - - //write out the string - FileWrite( hFile, buffer, uiStringWidth, &uiNumBytesWritten ); - if( uiNumBytesWritten != uiStringWidth ) - { - FileClose( hFile ); - return; - } - -} - -STR GetExceptionString( DWORD uiExceptionCode ) -{ - switch( uiExceptionCode ) - { - case EXCEPTION_ACCESS_VIOLATION: - return( "The thread tried to read from or write to a virtual address for which it does not have the appropriate access."); - break; - case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: - return( "The thread tried to access an array element that is out of bounds and the underlying hardware supports bounds checking."); - case EXCEPTION_BREAKPOINT: - return( "A breakpoint was encountered."); - case EXCEPTION_DATATYPE_MISALIGNMENT: - return( "The thread tried to read or write data that is misaligned on hardware that does not provide alignment. For example, 16-bit values must be aligned on 2-byte boundaries; 32-bit values on 4-byte boundaries, and so on."); - case EXCEPTION_FLT_DENORMAL_OPERAND: - return( "One of the operands in a floating-point operation is denormal. A denormal value is one that is too small to represent as a standard floating-point value."); - case EXCEPTION_FLT_DIVIDE_BY_ZERO: - return( "The thread tried to divide a floating-point value by a floating-point divisor of zero."); - case EXCEPTION_FLT_INEXACT_RESULT: - return( "The result of a floating-point operation cannot be represented exactly as a decimal fraction."); - case EXCEPTION_FLT_INVALID_OPERATION: - return( "This exception represents any floating-point exception not included in this list."); - case EXCEPTION_FLT_OVERFLOW: - return( "The exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type."); - case EXCEPTION_FLT_STACK_CHECK: - return( "The stack overflowed or underflowed as the result of a floating-point operation."); - case EXCEPTION_FLT_UNDERFLOW: - return( "The exponent of a floating-point operation is less than the magnitude allowed by the corresponding type."); - case EXCEPTION_ILLEGAL_INSTRUCTION: - return( "The thread tried to execute an invalid instruction."); - case EXCEPTION_IN_PAGE_ERROR: - return( "The thread tried to access a page that was not present, and the system was unable to load the page. For example, this exception might occur if a network connection is lost while running a program over the network."); - case EXCEPTION_INT_DIVIDE_BY_ZERO: - return( "The thread tried to divide an integer value by an integer divisor of zero."); - case EXCEPTION_INT_OVERFLOW: - return( "The result of an integer operation caused a carry out of the most significant bit of the result."); - case EXCEPTION_INVALID_DISPOSITION: - return( "An exception handler returned an invalid disposition to the exception dispatcher. Programmers using a high-level language such as C should never encounter this exception."); - case EXCEPTION_NONCONTINUABLE_EXCEPTION: - return( "The thread tried to continue execution after a noncontinuable exception occurred."); - case EXCEPTION_PRIV_INSTRUCTION: - return( "The thread tried to execute an instruction whose operation is not allowed in the current machine mode."); - case EXCEPTION_SINGLE_STEP: - return( "A trace trap or other single-instruction mechanism signaled that one instruction has been executed."); - case EXCEPTION_STACK_OVERFLOW: - return( "The thread used up its stack."); - - default: - return("Exception not in case "); - break; - } -} - - -void DisplayRegisters( HWFILE hFile, CONTEXT *pContext ) -{ - ErrorLog( hFile, "Registers:\r\n"); - ErrorLog( hFile, "\tEAX=%08x CS=%04x EIP=%08x EFLGS=%08x\r\n", - pContext->Eax, pContext->SegCs, pContext->Eip, pContext->EFlags); - ErrorLog( hFile, "\tEBX=%08x SS=%04x ESP=%08x EBP=%08x\r\n", - pContext->Ebx, pContext->SegSs, pContext->Esp, pContext->Ebp); - ErrorLog( hFile, "\tECX=%08x DS=%04x ESI=%08x FS=%04x\r\n", - pContext->Ecx, pContext->SegDs, pContext->Esi, pContext->SegFs); - ErrorLog( hFile, "\tEDX=%08x ES=%04x EDI=%08x GS=%04x\r\n", - pContext->Edx, pContext->SegEs, pContext->Edi, pContext->SegGs); -// ErrorLog( hFile, "Bytes at CS:EIP:\r\n"); -} - -BOOLEAN GetAndDisplayModuleAndSystemInfo( HWFILE hFile, CONTEXT *pContext ) -{ - char zFileName[2048]; - char zString[2048]; - SYSTEM_INFO SystemInfo; - MEMORYSTATUS MemInfo; -// MEMORY_BASIC_INFORMATION MemBasicInfo; - size_t PageSize; - size_t pageNum = 0; - SGP_FILETIME LastWriteTime; - - if( GetModuleFileName(0, zFileName, sizeof(zFileName) ) == 0) - { - return( FALSE ); - } - - MemInfo.dwLength = sizeof(MemInfo); - GlobalMemoryStatus(&MemInfo); - - //Display the filename - ErrorLog( hFile, "File:\r\n\t%s\r\n", zFileName); - - - //Get the time the file was created - if (GetFileManFileTime(hFile, 0, 0, &LastWriteTime)) - { - PrintTime( zString, LastWriteTime); - - ErrorLog( hFile, "\tFile created on: %s\r\n", zString ); - } - - - //Get cpu type and number - GetSystemInfo(&SystemInfo); - ErrorLog( hFile, "\t%d type %d processor.\r\n", SystemInfo.dwNumberOfProcessors, SystemInfo.dwProcessorType ); - - //Get free ram - ErrorLog( hFile, "\tTotal Physical Memory: %d Megs.\r\n", MemInfo.dwTotalPhys/(1024*1024) ); - - - PageSize = SystemInfo.dwPageSize; - - pageNum = 0; - -/* - //Get current instruction pointer - if( VirtualQuery((void *)(pageNum * PageSize), &MemBasicInfo, sizeof(MemBasicInfo) ) ) - { - if (MemBasicInfo.RegionSize > 0) - { - ErrorLog( hFile, "\r\n\r\nJagged is loaded into memory at: 0x%08d.\r\n", MemBasicInfo.AllocationBase ); - } - } -*/ - - ErrorLog( hFile, "Segment( CS:EIP ):\t%04x:%08x.\r\n", pContext->SegCs, pContext->Eip ); - - return( TRUE ); -} - - - -// -// This code for this function is based ( stolen ) from Bruce Dawson's article in Game Developer Magazine Jan 99 -// -BOOLEAN DisplayStack( HWFILE hFile, CONTEXT *pContext ) -{ - int Count = 0; - char buffer[1000] = ""; - const int safetyzone = 50; - STR8 nearend = buffer + sizeof(buffer) - safetyzone; - STR8 output = buffer; - - // Time to print part or all of the stack to the error log. This allows - // us to figure out the call stack, parameters, local variables, etc. - ErrorLog( hFile, "Stack dump:\r\n" ); - - __try - { - // Esp contains the bottom of the stack, or at least the bottom of - // the currently used area. - DWORD* pStack = (DWORD *)pContext->Esp; - DWORD* pStackTop; - __asm - { - // Load the top (highest address) of the stack from the - // thread information block. It will be found there in - // Win9x and Windows NT. - mov eax, fs:[4] - mov pStackTop, eax - } - if (pStackTop > pStack + MaxStackDump) - pStackTop = pStack + MaxStackDump; - - - // Too many calls to WriteFile can take a long time, causing - // confusing delays when programs crash. Therefore I implemented - // simple buffering for the stack dumping code instead of calling - // hprintf directly. - - while (pStack + 1 <= pStackTop) - { - STR8 Suffix = " "; - - if ((Count % StackColumns) == 0) - output += wsprintf(output, "%08x: ", pStack); - - if ((++Count % StackColumns) == 0 || pStack + 2 > pStackTop) - Suffix = "\r\n"; - output += wsprintf(output, "%08x%s", *pStack, Suffix); - pStack++; - - // Check for when the buffer is almost full, and flush it to disk. - if (output > nearend) - { - ErrorLog( hFile, "%s", buffer); - buffer[0] = 0; - output = buffer; - } - } - // Print out any final characters from the cache. - ErrorLog( hFile, "%s", buffer); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { - ErrorLog( hFile, "Exception encountered during stack dump.\r\n"); - } - - return( TRUE ); -} - - -// -// This code for this function is ( stolen :) from Bruce Dawson's article in Game Developer Magazine Jan 99 -// - -// Print the specified FILETIME to output in a human readable format, -// without using the C run time. - -void PrintTime(STR8 output, FILETIME TimeToPrint) -{ - WORD Date, Time; - if (FileTimeToLocalFileTime(&TimeToPrint, &TimeToPrint) && - FileTimeToDosDateTime(&TimeToPrint, &Date, &Time)) - { - // What a silly way to print out the file date/time. Oh well, - // it works, and I'm not aware of a cleaner way to do it. - wsprintf(output, "%02d/%02d/%d %02d:%02d:%02d", - (Date / 32) & 15, Date & 31, (Date / 512) + 1980, - (Time / 2048), (Time / 32) & 63, (Time & 31) * 2); - } - else - output[0] = 0; -} - - - - - - - -// -// This code for this function is ( stolen :) from Bruce Dawson's article in Game Developer Magazine Jan 99 -// - -// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used -// to find all the blocks of address space that were reserved or committed, -// and ShowModuleInfo will display module information if they are code -// modules. - - -void RecordModuleList(HWFILE hFile ) -{ - ErrorLog( hFile, "\r\n" - "Module list: names, addresses, sizes, time stamps " - "and file times:\r\n"); - SYSTEM_INFO SystemInfo; - GetSystemInfo(&SystemInfo); - const size_t PageSize = SystemInfo.dwPageSize; - // Set NumPages to the number of pages in the 4GByte address space, - // while being careful to avoid overflowing ints. - const size_t NumPages = 4 * size_t(ONEG / PageSize); - size_t pageNum = 0; - void *LastAllocationBase = 0; - while (pageNum < NumPages) - { - MEMORY_BASIC_INFORMATION MemInfo; - if (VirtualQuery((void *)(pageNum * PageSize), &MemInfo, - sizeof(MemInfo))) - { - if (MemInfo.RegionSize > 0) - { - // Adjust the page number to skip over this block of memory. - pageNum += MemInfo.RegionSize / PageSize; - if (MemInfo.State == MEM_COMMIT && MemInfo.AllocationBase > - LastAllocationBase) - { - // Look for new blocks of committed memory, and try - // recording their module names - this will fail - // gracefully if they aren't code modules. - LastAllocationBase = MemInfo.AllocationBase; - ShowModuleInfo(hFile, (HINSTANCE)LastAllocationBase); - } - } - else - pageNum += SIXTYFOURK / PageSize; - } - else - pageNum += SIXTYFOURK / PageSize; - // If VirtualQuery fails we advance by 64K because that is the - // granularity of address space doled out by VirtualAlloc(). - } -} - - - -// -// This code for this function is ( stolen :) from Bruce Dawson's article in Game Developer Magazine Jan 99 -// -static void ShowModuleInfo(HWFILE hFile, HINSTANCE ModuleHandle) -{ - char ModName[MAX_PATH]; - __try - { - if (GetModuleFileName(ModuleHandle, ModName, sizeof(ModName)) > 0) - { - // If GetModuleFileName returns greater than zero then this must - // be a valid code module address. Therefore we can try to walk - // our way through its structures to find the link time stamp. - IMAGE_DOS_HEADER *DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle; - if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic) - return; - IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((STR8 )DosHeader - + DosHeader->e_lfanew); - if (IMAGE_NT_SIGNATURE != NTHeader->Signature) - return; - // Open the code module file so that we can get its file date - // and size. - HANDLE ModuleFile = CreateFile(ModName, GENERIC_READ, - FILE_SHARE_READ, 0, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, 0); - char TimeBuffer[100] = ""; - DWORD FileSize = 0; - if (ModuleFile != INVALID_HANDLE_VALUE) - { - FileSize = GetFileSize(ModuleFile, 0); - FILETIME LastWriteTime; - if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime)) - { - wsprintf(TimeBuffer, " - file date is "); - PrintTime(TimeBuffer + lstrlen(TimeBuffer), LastWriteTime); - } - CloseHandle(ModuleFile); - } - ErrorLog( hFile, "%-35s, loaded at 0x%08x - %7d bytes - %08x%s\r\n", - ModName, ModuleHandle, FileSize, - NTHeader->FileHeader.TimeDateStamp, TimeBuffer); - } - } - // Handle any exceptions by continuing from this point. - __except(EXCEPTION_EXECUTE_HANDLER) - { - } -} - -////////////////////////////////////////////////////////////////////////// - -/*---------------------------------------------------------------------- -"Debugging Applications" (Microsoft Press) -Copyright (c) 1997-2000 John Robbins -- All rights reserved. -----------------------------------------------------------------------*/ - - -#define _USE_VERSIONING_ -#define _USE_PSAPI_ - -#ifdef _USE_VERSIONING_ -#include -#endif -#define _USE_PSAPI_ -#ifdef _USE_PSAPI_ -// Copied from psapi.h -typedef struct _MODULEINFO { - LPVOID lpBaseOfDll; - DWORD SizeOfImage; - LPVOID EntryPoint; -} MODULEINFO, *LPMODULEINFO; -#endif - -#ifndef _IMAGEHLP64 -// copied from imagehlp.h -typedef struct _ER_IMAGEHLP_LINE64 { - DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_LINE64) - PVOID Key; // internal - DWORD LineNumber; // line number in file - PCHAR FileName; // full filename - DWORD64 Address; // first instruction of line -} ER_IMAGEHLP_LINE64, *PER_IMAGEHLP_LINE64; -#endif - -/*---------------------------------------------------------------------- - IsNT - Detect if this is an NT installation -----------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------- -"Debugging Applications" (Microsoft Press) -Copyright (c) 1997-2000 John Robbins -- All rights reserved. -----------------------------------------------------------------------*/ - -BOOL __stdcall IsNT ( void ) -{ - static BOOL s_bHasVersion = FALSE ; // Indicates that the version information is valid. - static BOOL s_bIsNT = TRUE ; // Indicates NT or 95/98. - BOOL bRet; - OSVERSIONINFO stOSVI ; - - if ( TRUE == s_bHasVersion ) - return ( TRUE == s_bIsNT ) ; - - memset ( &stOSVI , 0, sizeof ( OSVERSIONINFO ) ) ; - stOSVI.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO ) ; - - bRet = GetVersionEx ( &stOSVI ) ; - if ( FALSE == bRet ) - return ( FALSE ) ; - - // Check the version and call the appropriate thing. - if ( VER_PLATFORM_WIN32_NT == stOSVI.dwPlatformId ) - s_bIsNT = TRUE ; - else - s_bIsNT = FALSE ; - s_bHasVersion = TRUE ; - return ( TRUE == s_bIsNT ) ; -} - -/*---------------------------------------------------------------------- - Version.dll Wrappers -----------------------------------------------------------------------*/ -#ifdef _USE_VERSIONING_ - -typedef DWORD (__stdcall *FVN_GetFileVersionInfoSize)(LPCTSTR, LPDWORD ); -static FVN_GetFileVersionInfoSize g_GetFileVersionInfoSize = NULL; - -static DWORD __stdcall -ERGetFileVersionInfoSize(LPCTSTR lptstrFilename, LPDWORD lpdwHandle) -{ - if (g_GetFileVersionInfoSize) - { - return (*g_GetFileVersionInfoSize)(lptstrFilename, lpdwHandle); - } - return 0; -} - - -typedef BOOL (__stdcall *FVN_GetFileVersionInfo)(LPCTSTR, DWORD, DWORD, LPVOID); -static FVN_GetFileVersionInfo g_GetFileVersionInfo = NULL; - -static BOOL __stdcall -ERGetFileVersionInfo(LPCTSTR lptstrFilename, DWORD dwHandle, - DWORD dwLen, LPVOID lpData) -{ - if (g_GetFileVersionInfo) - { - return (*g_GetFileVersionInfo)(lptstrFilename, dwHandle, dwLen, lpData); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_VerQueryValue)(const LPVOID, LPTSTR, LPVOID *, PUINT); -static FVN_VerQueryValue g_VerQueryValue = NULL; - -static BOOL __stdcall -ERVerQueryValue(const LPVOID pBlock, LPTSTR lpSubBlock, - LPVOID *lplpBuffer, PUINT puLen) -{ - if (g_VerQueryValue) - { - return (*g_VerQueryValue)(pBlock, lpSubBlock, lplpBuffer, puLen); - } - return 0; -} - -static HMODULE g_VerMod = NULL; -static BOOL ERLoadVersionDLL() -{ - if (!g_VerMod) - { - g_VerMod = LoadLibrary("Version.dll"); - if (g_VerMod) - { - g_GetFileVersionInfoSize = (FVN_GetFileVersionInfoSize)GetProcAddress(g_VerMod, "GetFileVersionInfoSizeA"); - g_GetFileVersionInfo = (FVN_GetFileVersionInfo) GetProcAddress(g_VerMod, "GetFileVersionInfoA"); - g_VerQueryValue = (FVN_VerQueryValue) GetProcAddress(g_VerMod, "VerQueryValueA"); - } - } - if (g_VerMod && g_GetFileVersionInfoSize && g_GetFileVersionInfo && g_VerQueryValue) - return TRUE; - return FALSE; -} - -#endif //_USE_VERSIONING_ - -/*---------------------------------------------------------------------- - imagehlp.dll Wrappers -----------------------------------------------------------------------*/ -#if defined(_IMAGEHLP_) && defined(_X86_) - -typedef BOOL (__stdcall *FVN_SymInitialize)(HANDLE, PSTR, BOOL); -static FVN_SymInitialize g_SymInitialize = NULL; - -static BOOL __stdcall -ERSymInitialize(HANDLE hProcess, PSTR UserSearchPath, BOOL fInvadeProcess) -{ - if (g_SymInitialize) - { - return (*g_SymInitialize)(hProcess, UserSearchPath, fInvadeProcess); - } - return 0; -} - - -typedef BOOL (__stdcall *FVN_SymCleanup)(HANDLE); -static FVN_SymCleanup g_SymCleanup = NULL; - -static BOOL __stdcall ERSymCleanup(HANDLE hProcess) -{ - if (g_SymCleanup) - { - return (*g_SymCleanup)(hProcess); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_StackWalk)(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID, - PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE , - PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE); -static FVN_StackWalk g_StackWalk = NULL; - -static BOOL __stdcall ERStackWalk( - DWORD MachineType, - HANDLE hProcess, - HANDLE hThread, - LPSTACKFRAME StackFrame, - PVOID ContextRecord, - PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine, - PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine, - PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine, - PTRANSLATE_ADDRESS_ROUTINE TranslateAddress -) -{ - if (g_StackWalk) - { - return (*g_StackWalk)(MachineType, hProcess, hThread, StackFrame, - ContextRecord, ReadMemoryRoutine, FunctionTableAccessRoutine, - GetModuleBaseRoutine, TranslateAddress - ); - } - return 0; -} - -typedef LPVOID (__stdcall *FVN_SymFunctionTableAccess)(HANDLE, DWORD); -static FVN_SymFunctionTableAccess g_SymFunctionTableAccess = NULL; - -static LPVOID __stdcall -ERSymFunctionTableAccess(HANDLE hProcess, DWORD AddrBase) -{ - if (g_SymFunctionTableAccess) - { - return (*g_SymFunctionTableAccess)(hProcess, AddrBase); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_SymGetModuleBase)(HANDLE, DWORD); -static FVN_SymGetModuleBase g_SymGetModuleBase = NULL; - -static DWORD __stdcall -ERSymGetModuleBase(HANDLE hProcess, DWORD dwAddr) -{ - if (g_SymGetModuleBase) - { - return (*g_SymGetModuleBase)(hProcess, dwAddr); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_SymGetModuleInfo)(HANDLE, DWORD, PIMAGEHLP_MODULE); -static FVN_SymGetModuleInfo g_SymGetModuleInfo = NULL; - -static BOOL __stdcall -ERSymGetModuleInfo(HANDLE hProcess, DWORD dwAddr, PIMAGEHLP_MODULE ModuleInfo) -{ - if (g_SymGetModuleInfo) - { - return (*g_SymGetModuleInfo)(hProcess, dwAddr, ModuleInfo); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_SymGetSymFromAddr)(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL); -static FVN_SymGetSymFromAddr g_SymGetSymFromAddr = NULL; - -static BOOL __stdcall -ERSymGetSymFromAddr(HANDLE hProcess, DWORD Address, PDWORD Displacement, PIMAGEHLP_SYMBOL Symbol) -{ - if (g_SymGetSymFromAddr) - { - return (*g_SymGetSymFromAddr)(hProcess, Address, Displacement, Symbol); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_SymGetLineFromAddr)(HANDLE, DWORD64, PDWORD, PER_IMAGEHLP_LINE64); -static FVN_SymGetLineFromAddr g_SymGetLineFromAddr = NULL; -static BOOL __stdcall - ERSymGetLineFromAddr(HANDLE hProcess, DWORD64 Address, PDWORD Displacement, PER_IMAGEHLP_LINE64 Line) -{ - if (g_SymGetLineFromAddr) - { - return (*g_SymGetLineFromAddr)(hProcess, Address, Displacement, Line); - } - return 0; -} - -typedef BOOL (WINAPI *FVN_MiniDumpWriteDump)( HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); -static FVN_MiniDumpWriteDump g_MiniDumpWriteDump = NULL; - -static CRITICAL_SECTION g_miniCritSec; - -static BOOL __stdcall - ERMiniDumpWriteDump(HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam) -{ - if (g_MiniDumpWriteDump) - { - // DBGHELP.DLL is not thread safe - BOOL result; - EnterCriticalSection(&g_miniCritSec); - result = (*g_MiniDumpWriteDump)(hProcess, dwPid, hFile, DumpType, ExceptionParam, UserStreamParam, CallbackParam); - LeaveCriticalSection(&g_miniCritSec); - return result; - } - return 0; -} - - -static HMODULE g_ImgHlpMod = NULL; -static BOOL ERLoadImageHlpDLL() -{ - if (!g_ImgHlpMod) - { - g_ImgHlpMod = LoadLibrary("dbghelp.dll"); - if (!g_ImgHlpMod) - g_ImgHlpMod = LoadLibrary("Imagehlp.dll"); - - if (g_ImgHlpMod) - { - g_SymInitialize = (FVN_SymInitialize)GetProcAddress(g_ImgHlpMod, "SymInitialize"); - g_SymCleanup = (FVN_SymCleanup)GetProcAddress(g_ImgHlpMod, "SymCleanup"); - g_StackWalk = (FVN_StackWalk)GetProcAddress(g_ImgHlpMod, "StackWalk"); - g_SymFunctionTableAccess = (FVN_SymFunctionTableAccess)GetProcAddress(g_ImgHlpMod, "SymFunctionTableAccess"); - g_SymGetModuleBase = (FVN_SymGetModuleBase)GetProcAddress(g_ImgHlpMod, "SymGetModuleBase"); - g_SymGetModuleInfo = (FVN_SymGetModuleInfo)GetProcAddress(g_ImgHlpMod, "SymGetModuleInfo"); - g_SymGetSymFromAddr = (FVN_SymGetSymFromAddr)GetProcAddress(g_ImgHlpMod, "SymGetSymFromAddr"); - g_SymGetLineFromAddr = (FVN_SymGetLineFromAddr)GetProcAddress(g_ImgHlpMod, "SymGetLineFromAddr64"); - - InitializeCriticalSection(&g_miniCritSec); - g_MiniDumpWriteDump = (FVN_MiniDumpWriteDump)GetProcAddress(g_ImgHlpMod, "MiniDumpWriteDump"); - } - } - if (g_ImgHlpMod && - g_SymInitialize && g_SymCleanup && - g_StackWalk && g_SymFunctionTableAccess && - g_SymGetModuleBase && g_SymGetModuleInfo && - g_SymGetSymFromAddr) - return TRUE; - return FALSE; -} -#endif // defined(_IMAGEHLP_) && defined(_X86_) - - -/*---------------------------------------------------------------------- - Version.dll Wrappers -----------------------------------------------------------------------*/ -#ifdef _USE_PSAPI_ - -typedef BOOL (__stdcall *FVN_EnumProcessModules)(HANDLE, HMODULE *, DWORD , LPDWORD ); -static FVN_EnumProcessModules g_EnumProcessModules = NULL; - -static BOOL __stdcall -EREnumProcessModules(HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded) -{ - if (g_EnumProcessModules) - { - return (*g_EnumProcessModules)(hProcess, lphModule, cb, lpcbNeeded); - } - return 0; -} - -typedef BOOL (__stdcall *FVN_GetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD); -static FVN_GetModuleInformation g_GetModuleInformation = NULL; - -static BOOL __stdcall -ERGetModuleInformation(HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb) -{ - if (g_GetModuleInformation) - { - return (*g_GetModuleInformation)(hProcess, hModule, lpmodinfo, cb); - } - return 0; -} - -static HMODULE g_PSAPIMod = NULL; -static BOOL ERLoadPSAPIDLL() -{ - if (!g_PSAPIMod) - { - g_PSAPIMod = LoadLibrary("psapi.dll"); - if (g_PSAPIMod) - { - g_EnumProcessModules = (FVN_EnumProcessModules)GetProcAddress(g_PSAPIMod, "EnumProcessModules"); - g_GetModuleInformation = (FVN_GetModuleInformation)GetProcAddress(g_PSAPIMod, "GetModuleInformation"); - } - } - if (g_PSAPIMod && g_EnumProcessModules && g_GetModuleInformation) - return TRUE; - return FALSE; -} - - -#endif //_USE_PSAPI_ - - -#pragma region Crash MiniDump Handler - -static BOOL ERGetImpersonationToken(HANDLE* phToken) -{ - *phToken = NULL; - if(!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, TRUE, phToken)) - { - if(GetLastError() == ERROR_NO_TOKEN) - { - // No impersonation token for the current thread available - go for the process token - if(!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, phToken)) - { - return FALSE; - } - } - else - { - return FALSE; - } - } - return TRUE; -} - -static BOOL EREnablePriv(LPCTSTR pszPriv, HANDLE hToken, TOKEN_PRIVILEGES* ptpOld) -{ - BOOL bOk = FALSE; - - TOKEN_PRIVILEGES tp; - tp.PrivilegeCount = 1; - tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - bOk = LookupPrivilegeValue( 0, pszPriv, &tp.Privileges[0].Luid); - if(bOk) - { - DWORD cbOld = sizeof(*ptpOld); - bOk = AdjustTokenPrivileges(hToken, FALSE, &tp, cbOld, ptpOld, &cbOld); - } - - return (bOk && (ERROR_NOT_ALL_ASSIGNED != GetLastError())); -} - -static BOOL ERRestorePriv(HANDLE hToken, TOKEN_PRIVILEGES* ptpOld) -{ - BOOL bOk = AdjustTokenPrivileges(hToken, FALSE, ptpOld, 0, 0, 0); - return (bOk && (ERROR_NOT_ALL_ASSIGNED != GetLastError())); -} - -static BOOL ERGenerateMiniDump(CHAR *szFileName, PEXCEPTION_POINTERS pExceptionInfo) -{ - BOOL bRet = FALSE; - DWORD dwLastError = 0; - HANDLE hDumpFile = 0; - MINIDUMP_EXCEPTION_INFORMATION stInfo = {0}; - TOKEN_PRIVILEGES tp; - HANDLE hImpersonationToken = NULL; - BOOL bPrivilegeEnabled; - - if(!ERGetImpersonationToken(&hImpersonationToken)) - { - return FALSE; - } - - // Create the dump file - hDumpFile = CreateFileA(szFileName, - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_WRITE | FILE_SHARE_READ, - 0, CREATE_ALWAYS, 0, 0); - if(hDumpFile == INVALID_HANDLE_VALUE) - { - CloseHandle(hImpersonationToken); - return FALSE; - } - - // Write the dump - stInfo.ThreadId = GetCurrentThreadId(); - stInfo.ExceptionPointers = pExceptionInfo; - stInfo.ClientPointers = TRUE; - - // We need the SeDebugPrivilege to be able to run MiniDumpWriteDump - bPrivilegeEnabled = EREnablePriv(SE_DEBUG_NAME, hImpersonationToken, &tp); - -// VS 2008 and VS 2010 -#if _MSC_VER >= 1500 - bRet = ERMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile - , (MINIDUMP_TYPE)(MiniDumpWithHandleData|MiniDumpWithThreadInfo|MiniDumpWithDataSegs), &stInfo, NULL, NULL); -// VS 2005 -#else - bRet = ERMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile - , (MINIDUMP_TYPE)(MiniDumpWithHandleData|MiniDumpWithDataSegs), &stInfo, NULL, NULL); -#endif - - if(bPrivilegeEnabled) - { - // Restore the privilege - ERRestorePriv(hImpersonationToken, &tp); - } - - CloseHandle(hDumpFile); - CloseHandle(hImpersonationToken); - - return bRet; -} - - -/*---------------------------------------------------------------------- - Handler -----------------------------------------------------------------------*/ - -LONG __stdcall ERCrashDumpExceptionFilterEx(const CHAR *pAppName, const CHAR* pPath, EXCEPTION_POINTERS* pExPtrs) -{ - LONG lRet = EXCEPTION_CONTINUE_SEARCH ; - FILE *fdump = NULL; - HANDLE hProc = GetCurrentProcess(); - SYSTEMTIME stTime; - CHAR pszFilename[MAX_PATH], szPathName[_MAX_PATH], szBuffer[_MAX_PATH]; - size_t cbFilename = sizeof(pszFilename) / sizeof(pszFilename[0]) - 1; - if (!ERLoadImageHlpDLL()) - return lRet; - - __try - { - szPathName[0] = 0; - if (pPath && *pPath) - GetFullPathNameA(pPath, MAX_PATH, szPathName, NULL); - if (szPathName[strlen(szPathName)-1] != '\\') - lstrcat(szPathName, "\\"); - - // Create filename - GetLocalTime(&stTime); - - if (pAppName == NULL) - { - GetModuleFileName(NULL, szBuffer, MAX_PATH); - CHAR *pszFilePart = strrchr(szBuffer, '\\'); - pszFilePart = (pszFilePart == NULL) ? szBuffer : pszFilePart+1; - if (CHAR *pExt = strrchr(pszFilePart, '.') ) - *pExt = 0; - pAppName = pszFilePart; - } - - // Filename is composed like this, to avoid collisions; - // \-Crash---YYYYMMDD-HHMMSS.dmp - _snprintf_s(pszFilename, cbFilename, cbFilename, "%s-Crash-%ld-%ld-%04d%02d%02d-%02d%02d%02d", pAppName, GetCurrentProcessId(), GetCurrentThreadId(), stTime.wYear,stTime.wMonth,stTime.wDay,stTime.wHour, stTime.wMinute, stTime.wSecond); - lstrcat(szPathName, pszFilename); - lstrcpy(szPathName, ".dmp"); - - // Generate proper mini dump - ERGenerateMiniDump(szPathName, pExPtrs); - } - __except ( EXCEPTION_EXECUTE_HANDLER ) - { - lRet = EXCEPTION_CONTINUE_SEARCH ; - } - if (hProc != (HANDLE)0xFFFFFFFF) CloseHandle(hProc); - if (fdump) fclose(fdump); - return ( lRet ) ; -} - -LONG __stdcall ERCrashDumpExceptionFilter (EXCEPTION_POINTERS* pExPtrs) -{ - return ERCrashDumpExceptionFilterEx(NULL, NULL, pExPtrs); -} - - -LONG __stdcall ERGetVersionStringA(LPCSTR szModName, LPSTR szVersion, int maxlen) -{ -#ifdef _USE_VERSIONING_ - if (ERLoadVersionDLL()) - { - UINT dwBytes = 0; - LPVOID lpBuffer = 0; - LPVOID lpData; - DWORD dwSize; - - szVersion[0] = 0; - dwSize = ERGetFileVersionInfoSize(szModName, 0); - lpData = alloca(dwSize); - ERGetFileVersionInfo(szModName, 0, dwSize, lpData); - if (ERVerQueryValue(lpData, TEXT("\\"), &lpBuffer, &dwBytes)) - { - VS_FIXEDFILEINFO *lpvs = (VS_FIXEDFILEINFO *)lpBuffer; - if (lpvs->dwFileVersionLS) - { - sprintf_s(szVersion, maxlen, "%d.%d.%d.%d", - HIWORD(lpvs->dwFileVersionMS), LOWORD(lpvs->dwFileVersionMS), - HIWORD(lpvs->dwFileVersionLS), LOWORD(lpvs->dwFileVersionLS) - ); - } - else if (lpvs->dwFileVersionMS) - { - sprintf_s(szVersion, maxlen, "%d.%d", - HIWORD(lpvs->dwFileVersionMS), LOWORD(lpvs->dwFileVersionMS) - ); - } - return strlen(szVersion); - } - } -#endif - return 0; -} - - - -#if defined(_IMAGEHLP_) && defined(_X86_) - -BOOL __stdcall ERReadProcessMemory ( HANDLE hProc, - LPCVOID lpBaseAddress, - LPVOID lpBuffer, - DWORD nSize, - LPDWORD lpNumberOfBytesRead ) -{ - return ( ReadProcessMemory ( GetCurrentProcess ( ) , - lpBaseAddress , - lpBuffer , - nSize , - lpNumberOfBytesRead ) ) ; -} - -static void ERLogStackWalk(HWFILE fdump, EXCEPTION_POINTERS* pExPtrs) -{ - #define SAVE_EBP(f) f.Reserved[0] - #define TRAP_TSS(f) f.Reserved[1] - #define TRAP_EDITED(f) f.Reserved[1] - #define SAVE_TRAP(f) f.Reserved[2] - - CONTEXT Context; - DWORD dwDisplacement = 0; - char *szSymName; - IMAGEHLP_MODULE mi; - STACKFRAME stFrame; - DWORD i; - HANDLE hProc = (HANDLE)GetCurrentProcess(); - - memcpy( &Context, pExPtrs->ContextRecord, sizeof( CONTEXT ) ); - - if (!ERLoadImageHlpDLL()) - return; - - ErrorLog(fdump, "Stack Walk:\r\n"); - - ERSymInitialize(hProc, NULL, TRUE); - - memset(g_sym, 0, MAX_SYMNAME_SIZE + sizeof(IMAGEHLP_SYMBOL) ) ; - g_sym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL); - g_sym->MaxNameLength = MAX_SYMNAME_SIZE; - - - ZeroMemory( &stFrame, sizeof(stFrame) ); - - stFrame.AddrPC.Offset = Context.Eip ; - stFrame.AddrPC.Mode = AddrModeFlat ; - stFrame.AddrStack.Offset = Context.Esp ; - stFrame.AddrStack.Mode = AddrModeFlat ; - stFrame.AddrFrame.Offset = Context.Ebp ; - stFrame.AddrFrame.Mode = AddrModeFlat ; - - ErrorLog(fdump, "FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name\r\n"); - - for (i=0; i<15; i++) - { - if (!ERStackWalk( IMAGE_FILE_MACHINE_I386, - hProc, - GetCurrentThread(), - &stFrame, - &Context, - NULL, - ERSymFunctionTableAccess, - ERSymGetModuleBase, - NULL)) - { - break; - } - - if (ERSymGetSymFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, g_sym)) { - szSymName = g_sym->Name; - } - else { - szSymName = ""; - } - ErrorLog(fdump, "%08x %08x %08x %08x %08x %08x ", - stFrame.AddrFrame.Offset, - stFrame.AddrReturn.Offset, - stFrame.Params[0], - stFrame.Params[1], - stFrame.Params[2], - stFrame.Params[3] - ); - - memset(&mi, 0, sizeof(mi)); - mi.SizeOfStruct = sizeof(mi); - if (ERSymGetModuleInfo(hProc, stFrame.AddrPC.Offset, &mi )) { - ErrorLog(fdump, "%s!", mi.ModuleName ); - } - - ErrorLog(fdump, "%s ", szSymName ); - - if (g_sym && (g_sym->Flags & SYMF_OMAP_GENERATED || g_sym->Flags & SYMF_OMAP_MODIFIED)) { - ErrorLog(fdump, "[omap] " ); - } - - if (stFrame.FuncTableEntry) - { - PFPO_DATA pFpoData = (PFPO_DATA)stFrame.FuncTableEntry; - switch (pFpoData->cbFrame) - { - case FRAME_FPO: - if (pFpoData->fHasSEH) - { - ErrorLog(fdump, "(FPO: [SEH])" ); - } else - { - ErrorLog(fdump, " (FPO:" ); - if (pFpoData->fUseBP) - { - ErrorLog(fdump, " [EBP 0x%08x]", SAVE_EBP(stFrame) ); - } - ErrorLog(fdump, " [%d,%d,%d])", pFpoData->cdwParams, - pFpoData->cdwLocals, - pFpoData->cbRegs); - } - break; - case FRAME_NONFPO: - ErrorLog(fdump, "(FPO: Non-FPO [%d,%d,%d])", - pFpoData->cdwParams, - pFpoData->cdwLocals, - pFpoData->cbRegs); - break; - - case FRAME_TRAP: - case FRAME_TSS: - default: - ErrorLog(fdump, "(UNKNOWN FPO TYPE)" ); - break; - } - } - ER_IMAGEHLP_LINE64 lineInfo; - ZeroMemory( &lineInfo, sizeof(lineInfo) ); - lineInfo.SizeOfStruct = sizeof(lineInfo); - dwDisplacement = 0; - if ( ERSymGetLineFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, &lineInfo) ) - ErrorLog(fdump, " \t%s:%d ", lineInfo.FileName, lineInfo.LineNumber); - - ErrorLog(fdump, "\r\n" ); - } - ErrorLog(fdump, "\r\n" ); - - ERSymCleanup(hProc); - - return; -} -#endif //_IMAGEHLP_ - -//************************************ -// Method: ERLogStackWalk -// FullName: ERLogStackWalk -// Access: public static -// Returns: LPCSTR (Free with LocalFree) -// Qualifier: -// Parameter: EXCEPTION_POINTERS * pExPtrs -//************************************ -LPCSTR ERStackWalk(EXCEPTION_POINTERS* pExPtrs) -{ -#if defined(_IMAGEHLP_) && defined(_X86_) - CONTEXT Context; - DWORD dwDisplacement = 0; - char *szSymName; - IMAGEHLP_MODULE mi; - STACKFRAME stFrame; - DWORD i; - HANDLE hProc = (HANDLE)GetCurrentProcess(); - - if (!ERLoadImageHlpDLL()) - return NULL; - - std::stringstream ss; - - HMODULE hModule = GetModuleHandle(NULL); - - memcpy( &Context, pExPtrs->ContextRecord, sizeof( CONTEXT ) ); - - ERSymInitialize(hProc, NULL, TRUE); - - memset(g_sym, 0, MAX_SYMNAME_SIZE + sizeof(IMAGEHLP_SYMBOL) ) ; - g_sym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL); - g_sym->MaxNameLength = MAX_SYMNAME_SIZE; - - ZeroMemory( &stFrame, sizeof(stFrame) ); - - stFrame.AddrPC.Offset = Context.Eip ; - stFrame.AddrPC.Mode = AddrModeFlat ; - stFrame.AddrStack.Offset = Context.Esp ; - stFrame.AddrStack.Mode = AddrModeFlat ; - stFrame.AddrFrame.Offset = Context.Ebp ; - stFrame.AddrFrame.Mode = AddrModeFlat ; - - for (i=0; i<100; i++) - { - if (!ERStackWalk( IMAGE_FILE_MACHINE_I386, - hProc, - GetCurrentThread(), - &stFrame, - &Context, - NULL, - ERSymFunctionTableAccess, - ERSymGetModuleBase, - NULL)) - { - break; - } - - if (ERSymGetSymFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, g_sym)) { - szSymName = g_sym->Name; - } - else { - szSymName = ""; - } - memset(&mi, 0, sizeof(mi)); - mi.SizeOfStruct = sizeof(mi); - if (ERSymGetModuleInfo(hProc, stFrame.AddrPC.Offset, &mi )) { - if (mi.BaseOfImage != (DWORD)hModule) - { - ss << mi.ModuleName << "!"; - } - } - ss << szSymName << " "; - - ER_IMAGEHLP_LINE64 lineInfo; - ZeroMemory( &lineInfo, sizeof(lineInfo) ); - lineInfo.SizeOfStruct = sizeof(lineInfo); - dwDisplacement = 0; - if ( ERSymGetLineFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, &lineInfo) ) - { - LPSTR pFileName = strrchr(lineInfo.FileName, '\\'); - if (pFileName) ++pFileName; - if (!pFileName) pFileName = lineInfo.FileName; - - ss << " \t" << pFileName << ":" << lineInfo.LineNumber << " "; - } - ss << std::endl; - } - ss << std::endl; - - ERSymCleanup(hProc); - - std::string str = ss.str(); - LPSTR lpResult = (LPSTR)LocalAlloc(LPTR, str.length()+1); - strcpy(lpResult, str.c_str()); - return lpResult; -#else - return NULL; -#endif //_IMAGEHLP_ -} - - -//************************************ -// Method: ERGetFirstModuleException -// FullName: ERGetFirstModuleException -// Access: public -// Returns: BOOL -// Qualifier: -// Parameter: EXCEPTION_POINTERS * pExPtrs -// Parameter: HMODULE hModule -// Parameter: LPSTR funcName -// Parameter: INT funcNameLen -// Parameter: LPSTR sourceName -// Parameter: INT sourceNameLen -// Parameter: INT * lpLineNum -//************************************ -BOOL ERGetFirstModuleException( - EXCEPTION_POINTERS* pExPtrs - , HMODULE hModule - , LPSTR funcName, INT funcNameLen - , LPSTR sourceName, INT sourceNameLen - , INT *lpLineNum - ) -{ -#if defined(_IMAGEHLP_) && defined(_X86_) - CONTEXT Context; - DWORD dwDisplacement = 0; - char *szSymName; - IMAGEHLP_MODULE mi; - STACKFRAME stFrame; - DWORD i; - HANDLE hProc = (HANDLE)GetCurrentProcess(); - BOOL bFound = FALSE; - - if (!ERLoadImageHlpDLL()) - return FALSE; - - memcpy( &Context, pExPtrs->ContextRecord, sizeof( CONTEXT ) ); - - if (hModule == NULL) - hModule = GetModuleHandle(NULL); - - ERSymInitialize(hProc, NULL, TRUE); - - memset(g_sym, 0, MAX_SYMNAME_SIZE + sizeof(IMAGEHLP_SYMBOL) ) ; - g_sym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL); - g_sym->MaxNameLength = MAX_SYMNAME_SIZE; - - ZeroMemory( &stFrame, sizeof(stFrame) ); - - stFrame.AddrPC.Offset = Context.Eip ; - stFrame.AddrPC.Mode = AddrModeFlat ; - stFrame.AddrStack.Offset = Context.Esp ; - stFrame.AddrStack.Mode = AddrModeFlat ; - stFrame.AddrFrame.Offset = Context.Ebp ; - stFrame.AddrFrame.Mode = AddrModeFlat ; - - for (i=0; i<15; i++) - { - if (!ERStackWalk( IMAGE_FILE_MACHINE_I386, - hProc, - GetCurrentThread(), - &stFrame, - &Context, - NULL, - ERSymFunctionTableAccess, - ERSymGetModuleBase, - NULL)) - { - break; - } - - if (ERSymGetSymFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, g_sym)) { - szSymName = g_sym->Name; - } - else { - szSymName = ""; - } - memset(&mi, 0, sizeof(mi)); - mi.SizeOfStruct = sizeof(mi); - if (!ERSymGetModuleInfo(hProc, stFrame.AddrPC.Offset, &mi )) - continue; - - if (mi.BaseOfImage != (DWORD)hModule) - continue; - - ER_IMAGEHLP_LINE64 lineInfo; - ZeroMemory( &lineInfo, sizeof(lineInfo) ); - lineInfo.SizeOfStruct = sizeof(lineInfo); - dwDisplacement = 0; - if ( ERSymGetLineFromAddr(hProc, stFrame.AddrPC.Offset, &dwDisplacement, &lineInfo) ) - { - LPSTR pFileName = strrchr(lineInfo.FileName, '\\'); - if (pFileName) ++pFileName; - if (!pFileName) pFileName = lineInfo.FileName; - - if (funcName) lstrcpyn(funcName,szSymName, funcNameLen); - if (sourceName) lstrcpyn(sourceName,pFileName, sourceNameLen); - if (lpLineNum) *lpLineNum = lineInfo.LineNumber; - bFound = TRUE; - break; - } - } - - ERSymCleanup(hProc); - return bFound; -#else - return FALSE; -#endif //_IMAGEHLP_ -} - - -void ERLogModules(HWFILE fdump) -{ -#ifdef _USE_PSAPI_ - if (!ERLoadImageHlpDLL()) - return; - - HANDLE hProc = (HANDLE)GetCurrentProcess(); - ERSymInitialize(hProc, NULL, TRUE); - - if (IsNT()) - { - if (ERLoadPSAPIDLL()) - { - HMODULE hMods[1024]; - DWORD cbNeeded; - unsigned int i; - -#ifdef _USE_VERSIONING_ - BOOL bVerOK = ERLoadVersionDLL(); -#endif - if( EREnumProcessModules(hProc, hMods, sizeof(hMods), &cbNeeded)) - { - for ( i = 0; i < (cbNeeded / sizeof(HMODULE)); i++ ) - { - char szModName[MAX_PATH]; - MODULEINFO mi; - memset(&mi, 0, sizeof(MODULEINFO)); - - ERGetModuleInformation(hProc, hMods[i], &mi, sizeof(MODULEINFO)); - - // Get the full path to the module's file. - if ( GetModuleFileName( hMods[i], szModName, sizeof(szModName))) - { - BOOL bPrintSimple = TRUE; - - // Open the code module file so that we can get its file date - // and size. - HANDLE ModuleFile = CreateFile(szModName, GENERIC_READ, - FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - char TimeBuffer[100] = ""; - DWORD FileSize = 0; - if (ModuleFile != INVALID_HANDLE_VALUE) - { - FileSize = GetFileSize(ModuleFile, 0); - FILETIME LastWriteTime; - if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime)) - { - wsprintf(TimeBuffer, " - file date is "); - PrintTime(TimeBuffer + lstrlen(TimeBuffer), LastWriteTime); - } - CloseHandle(ModuleFile); - } - -#ifdef _USE_VERSIONING_ - if (bVerOK) - { - UINT dwBytes = 0; - LPVOID lpBuffer = 0; - LPVOID lpData; - DWORD dwSize; - - dwSize = ERGetFileVersionInfoSize(szModName, 0); - lpData = alloca(dwSize); - ERGetFileVersionInfo(szModName, 0, dwSize, lpData); - if (ERVerQueryValue(lpData, TEXT("\\"), &lpBuffer, &dwBytes)) - { - VS_FIXEDFILEINFO *lpvs = (VS_FIXEDFILEINFO *)lpBuffer; - - ErrorLog(fdump, "(%.8X - %.8X) %s \t %d.%d.%d.%d \t %d.%d.%d.%d \t %s\r\n", - mi.lpBaseOfDll, ((LPBYTE)(mi.lpBaseOfDll)) + mi.SizeOfImage, - szModName, - HIWORD(lpvs->dwFileVersionMS), LOWORD(lpvs->dwFileVersionMS), - HIWORD(lpvs->dwFileVersionLS), LOWORD(lpvs->dwFileVersionLS), - HIWORD(lpvs->dwProductVersionMS), LOWORD(lpvs->dwProductVersionMS), - HIWORD(lpvs->dwProductVersionLS), LOWORD(lpvs->dwProductVersionLS), - TimeBuffer - ); - bPrintSimple = FALSE; - } - } -#endif - if (bPrintSimple) - { - ErrorLog(fdump, "(%.8X - %.8X) %s \t %s\r\n", - mi.lpBaseOfDll, ((LPBYTE)(mi.lpBaseOfDll)) + mi.SizeOfImage, - szModName, TimeBuffer - ); - } - } - } - } - } - } - ERSymCleanup(hProc); -#endif -} - -#endif diff --git a/Standard Gaming Platform/ExceptionHandling.h b/Standard Gaming Platform/ExceptionHandling.h deleted file mode 100644 index b5ae4a98..00000000 --- a/Standard Gaming Platform/ExceptionHandling.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _EXCEPTION_HANDLING__H_ -#define _EXCEPTION_HANDLING__H_ - -#include - -//uncomment this line if you want Exceptions to be handled -#ifdef JA2 - -#ifndef _DEBUG - #define ENABLE_EXCEPTION_HANDLING -#endif - -#else - //Wizardry -//#define ENABLE_EXCEPTION_HANDLING -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - - -INT32 RecordExceptionInfo( EXCEPTION_POINTERS *pExceptInfo ); - - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/Standard Gaming Platform/FileMan.cpp b/Standard Gaming Platform/FileMan.cpp index c1630801..0de5e3d8 100644 --- a/Standard Gaming Platform/FileMan.cpp +++ b/Standard Gaming Platform/FileMan.cpp @@ -24,11 +24,6 @@ // Includes // //************************************************************************** -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "Types.h" #include #include @@ -39,14 +34,12 @@ #include "windows.h" #include "FileMan.h" #include "MemMan.h" - #include "DbMan.h" #include "Debug.h" #include "RegInst.h" #include "Container.h" #include "LibraryDataBase.h" #include "io.h" #include "sgp_logger.h" -#endif using namespace std; @@ -101,7 +94,6 @@ typedef struct FMFileInfoTag UINT8 uiFileAccess; UINT32 uiFilePosition; HANDLE hFileHandle; - HDBFILE hDBFile; } FMFileInfo; // for 'File Manager File Information' diff --git a/Standard Gaming Platform/Font.cpp b/Standard Gaming Platform/Font.cpp index 565aa5cc..5caa433b 100644 --- a/Standard Gaming Platform/Font.cpp +++ b/Standard Gaming Platform/Font.cpp @@ -1,9 +1,4 @@ // font.c -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include @@ -18,18 +13,13 @@ #include "Font.h" #include "Debug.h" - #if defined( JA2 ) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif #include "himage.h" #include "vobject.h" #include "vobject_blitters.h" #include -#endif //******************************************************* // // Defines @@ -403,9 +393,7 @@ UINT32 LoadIndex; if((LoadIndex=FindFreeFont())==(-1)) { DbgMessage(TOPIC_FONT_HANDLER, DBG_LEVEL_0, String("Out of font slots (%s)", filename)); -#ifdef JA2 FatalError( "Cannot init FONT file %s", filename ); -#endif return(-1); } @@ -415,9 +403,7 @@ UINT32 LoadIndex; if((FontObjs[LoadIndex]=CreateVideoObject(&vo_desc))==NULL) { DbgMessage(TOPIC_FONT_HANDLER, DBG_LEVEL_0, String("Error creating VOBJECT (%s)", filename)); -#ifdef JA2 FatalError( "Cannot init FONT file %s", filename ); -#endif return(-1); } @@ -735,7 +721,7 @@ UINT16 GetFontHeight(INT32 FontNum) MapFont = WinFontMap[FontNum]; if (FontNum != -1) { - return (GetWinFontHeight(L"A", MapFont)); + return (GetWinFontHeight(MapFont)); } } return((UINT16)GetHeight(FontObjs[FontNum], 0)); @@ -1243,16 +1229,9 @@ UINT8 *pDestBuf; // Unlock buffer UnLockVideoSurface( FontDestBuffer ); -#if defined ( JA2 ) || defined( UTIL ) InvalidateRegion(x, y, x + StringPixLength(string, FontDefault), y + GetFontHeight(FontDefault)); -#else - InvalidateRegion(x, y, - x + StringPixLength(string, FontDefault), - y + GetFontHeight(FontDefault), - INVAL_SRC_TRANS); -#endif return(0); } @@ -1627,12 +1606,6 @@ FontTranslationTable *CreateEnglishTransTable( ) pTable = (FontTranslationTable *)MemAlloc(sizeof(FontTranslationTable)); memset(pTable, 0, sizeof(FontTranslationTable) ); - //#ifdef JA2 - // // ha ha, we have more than Wizardry now (again) - // pTable->usNumberOfSymbols = 255; - //#else - // pTable->usNumberOfSymbols = 255; - //#endif pTable->usNumberOfSymbols = 255; diff --git a/Standard Gaming Platform/Font.h b/Standard Gaming Platform/Font.h index 07035f57..16802d61 100644 --- a/Standard Gaming Platform/Font.h +++ b/Standard Gaming Platform/Font.h @@ -15,7 +15,6 @@ #define MILITARY_SHADOW 67 #define NO_SHADOW 0 -#ifdef JA2 // these are bogus! No palette is set yet! // font foreground color symbols @@ -39,36 +38,6 @@ #define FONT_BCOLOR_ORANGE 76 #define FONT_BCOLOR_PURPLE 160 -#else - -// font foreground color symbols -#define FONT_FCOLOR_WHITE 0x0000 -#define FONT_FCOLOR_RED 0x0000 -#define FONT_FCOLOR_BLUE 0x0000 -#define FONT_FCOLOR_GREEN 0x0000 -#define FONT_FCOLOR_YELLOW 0x0000 -#define FONT_FCOLOR_BROWN 0x0000 -#define FONT_FCOLOR_ORANGE 0x0000 -#define FONT_FCOLOR_PURPLE 0x0000 - -// font background color symbols -#define FONT_BCOLOR_WHITE 0x0000 -#define FONT_BCOLOR_RED 0x0000 -#define FONT_BCOLOR_BLUE 0x0000 -#define FONT_BCOLOR_GREEN 0x0000 -#define FONT_BCOLOR_YELLOW 0x0000 -#define FONT_BCOLOR_BROWN 0x0000 -#define FONT_BCOLOR_ORANGE 0x0000 -#define FONT_BCOLOR_PURPLE 0x0000 - -// font glyphs for spell targeting types -#define FONT_GLYPH_TARGET_POINT 0xFFF0 -#define FONT_GLYPH_TARGET_CONE 0xFFF1 -#define FONT_GLYPH_TARGET_SINGLE 0xFFF2 -#define FONT_GLYPH_TARGET_GROUP 0xFFF3 -#define FONT_GLYPH_TARGET_NONE 0xFFF4 - -#endif // typedefs diff --git a/Standard Gaming Platform/Install.cpp b/Standard Gaming Platform/Install.cpp index cb20d068..672cb7b1 100644 --- a/Standard Gaming Platform/Install.cpp +++ b/Standard Gaming Platform/Install.cpp @@ -16,16 +16,10 @@ // //************************************************************************** -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include "Install.h" #include "RegInst.h" -#endif //************************************************************************** // diff --git a/Standard Gaming Platform/JA2 SGP ALL.H b/Standard Gaming Platform/JA2 SGP ALL.H deleted file mode 100644 index ad188eb2..00000000 --- a/Standard Gaming Platform/JA2 SGP ALL.H +++ /dev/null @@ -1,105 +0,0 @@ -/* - * ChangeLog: - * 10.12.2005 Lesh ripped out everything that refers to MSS - * 10.12.2005 Lesh added fmod.h - */ -#ifndef __JA2_SGP_ALL_H -#define __JA2_SGP_ALL_H - -#pragma message("GENERATED PCH FOR JA2 SGP PROJECT.") - -//#ifndef INITGUID -// #define INITGUID -//#endif - - -#include "WordWrap.h" -#include "video.h" -#include "Button Sound Control.h" -#include "Sound Control.h" -#ifdef _JA2_RENDER_DIRTY - #include "Font Control.h" - #include "Render Dirty.h" - #include "utilities.h" -#endif -#include "input.h" -#include "memman.h" -#include "english.h" -#include "vobject.h" -#include "vobject_blitters.h" -#include "soundman.h" -#include "Button System.h" -#include "line.h" -#include -#include "debug.h" -#ifndef NO_ZLIB_COMPRESSION - #include "zlib.h" - #include "Compression.h" -#endif -#include "types.h" -#include -#include -#include -#include "Container.h" -#if _MSC_VER < 1300 //(iostream.h was removed from VC.NET2003) -#include -#endif -#include "Cursor Control.h" -#include "wcheck.h" -#include "FileMan.h" -#include "DbMan.h" -#include -#include -#include "TopicIDs.h" -#include "TopicOps.h" -#include "WizShare.h" -#include "screenids.h" -#include "Sys Globals.h" -#include "jascreens.h" -#include "gameloop.h" -#include "DirectX Common.h" -#include "DirectDraw Calls.h" -#include "video_private.h" -#include -#include "RegInst.h" -#include "LibraryDataBase.h" -#include "io.h" -#include -#include "sgp.h" -#include "pcx.h" -#include "Font.h" -#include "himage.h" -#include -#include -#include "impTGA.h" -#include "STCI.h" -#include -#include "local.h" -#include -#include -#include "Install.h" -#include "GameSettings.h" -#ifdef _DEBUG - #include -#endif -#include "mousesystem.h" -#include "Mutex Manager.h" -#include "Random.h" -#include -#include "vobject_private.h" -#include "shading.h" -#include "imgfmt.h" -#include "timer.h" -#include "renderworld.h" -#include "Isometric utils.h" -#include "fade screen.h" -#include "timer control.h" -#include "vsurface.h" -#include "vsurface_private.h" -#include "Timer Control.h" - -// Lesh modifications -#include "fmod.h" -#include "fmod_errors.h" - -#endif diff --git a/Standard Gaming Platform/LibraryDataBase.cpp b/Standard Gaming Platform/LibraryDataBase.cpp index 8d28d1bf..dd5bd67e 100644 --- a/Standard Gaming Platform/LibraryDataBase.cpp +++ b/Standard Gaming Platform/LibraryDataBase.cpp @@ -1,8 +1,3 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "Types.h" #include "windows.h" #include "FileMan.h" @@ -12,23 +7,11 @@ #include "WCheck.h" #include "Debug.h" - #if defined(JA2) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif -#endif //NUMBER_OF_LIBRARIES -#ifdef JA2 #include "Ja2 Libs.h" #include "GameSettings.h" -#elif defined(UTIL) - LibraryInitHeader gGameLibaries[ ] = { 0 }; -#else -// We link it as an .obj file -// #include "WizLibs.c" -#endif @@ -65,11 +48,7 @@ BOOLEAN InitializeFileDatabase( ) UINT32 uiSize; BOOLEAN fLibraryInited = FALSE; -#ifdef JA2 GetCDLocation( ); -#else - gzCdDirectory[ 0 ] = '.'; -#endif //if all the libraries exist, set them up gFileDataBase.usNumberOfLibraries = NUMBER_OF_LIBRARIES; diff --git a/Standard Gaming Platform/LibraryDataBase.h b/Standard Gaming Platform/LibraryDataBase.h index ed0f9452..86922d8a 100644 --- a/Standard Gaming Platform/LibraryDataBase.h +++ b/Standard Gaming Platform/LibraryDataBase.h @@ -40,14 +40,7 @@ typedef struct -#ifdef JA2 #include "Ja2 Libs.h" -#elif UTIL - #define NUMBER_OF_LIBRARIES 0 - typedef FILETIME SGP_FILETIME; -#else //wizardry - #include "WizLibs.h" -#endif extern LibraryInitHeader gGameLibaries[]; extern CHAR8 gzCdDirectory[ SGPFILENAME_LEN ]; diff --git a/Standard Gaming Platform/MemMan.cpp b/Standard Gaming Platform/MemMan.cpp index fb18d692..8db37790 100644 --- a/Standard Gaming Platform/MemMan.cpp +++ b/Standard Gaming Platform/MemMan.cpp @@ -18,11 +18,6 @@ // //************************************************************************** -//#ifdef JA2_PRECOMPILED_HEADERS -// #include "JA2 SGP ALL.H" -//#elif defined( WIZ8_PRECOMPILED_HEADERS ) -// #include "WIZ8 SGP ALL.H" -//#else #include "types.h" #include #include @@ -35,7 +30,6 @@ #ifdef _DEBUG #include #endif -//#endif #ifdef _DEBUG @@ -48,7 +42,6 @@ // //************************************************************************** -#ifdef JA2 #include "MessageBoxScreen.h" STR16 gzJA2ScreenNames[] = { @@ -82,7 +75,6 @@ STR16 gzJA2ScreenNames[] = L"QUEST_DEBUG_SCREEN", #endif }; -#endif #ifdef EXTREME_MEMORY_DEBUGGING typedef struct MEMORY_NODE diff --git a/Standard Gaming Platform/Mss.h b/Standard Gaming Platform/Mss.h index c89f8e5d..bd0e38b6 100644 --- a/Standard Gaming Platform/Mss.h +++ b/Standard Gaming Platform/Mss.h @@ -277,12 +277,8 @@ extern "C" { #define DXDEF __declspec(dllexport) #else - #if 1 /*def __BORLANDC__*/ #define DXDEC extern #define DXDEF - #else - #define DXDEC __declspec(dllimport) - #endif #endif diff --git a/Standard Gaming Platform/Mutex Manager.cpp b/Standard Gaming Platform/Mutex Manager.cpp deleted file mode 100644 index 088a4bcd..00000000 --- a/Standard Gaming Platform/Mutex Manager.cpp +++ /dev/null @@ -1,223 +0,0 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else - #include "Mutex Manager.h" - #include "debug.h" -#endif -//#define __MUTEX_TYPE - -#ifdef __MUTEX_TYPE - -// -// Use defines to allocate slots in the mutex manager. Put these defines in LOCAL.H -// - -HANDLE MutexTable[MAX_MUTEX_HANDLES]; - -BOOLEAN InitializeMutexManager(void) -{ - UINT32 uiIndex; - - // - // Register the Mutex Manager debug topic - // - - RegisterDebugTopic(TOPIC_MUTEX, "Mutex Manager"); - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "Initializing the Mutex Manager"); - - // - // Initialize the table of mutex handles to NULL - // - - for (uiIndex = 0; uiIndex < MAX_MUTEX_HANDLES; uiIndex++) - { - MutexTable[uiIndex] = NULL; - } - - return TRUE; -} - -void ShutdownMutexManager(void) -{ - UINT32 uiIndex; - - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "Shutting down the Mutex Manager"); - - // - // Make sure all mutex handles are closed - // - - for (uiIndex = 0; uiIndex < MAX_MUTEX_HANDLES; uiIndex++) - { - if (MutexTable[uiIndex] != NULL) - { - CloseHandle(MutexTable[uiIndex]); - MutexTable[uiIndex] = NULL; - } - } - - UnRegisterDebugTopic(TOPIC_MUTEX, "Mutex Manager"); -} - -BOOLEAN InitializeMutex(UINT32 uiMutexIndex, UINT8 *ubMutexName) -{ - MutexTable[uiMutexIndex] = CreateMutex(NULL, FALSE, ubMutexName); - if (MutexTable[uiMutexIndex] == NULL) - { - // - // Mutex creation has failed. - // - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Mutex initialization has failed."); - return FALSE; - } - - return TRUE; -} - -BOOLEAN DeleteMutex(UINT32 uiMutexIndex) -{ - if (MutexTable[uiMutexIndex] == NULL) - { - // - // Hum ?? We just tried to initialize a mutex entry which doesn't have a reserved slot - // - - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Mutex cannot be deleted since it does not exit"); - return FALSE; - } - - if (CloseHandle(MutexTable[uiMutexIndex]) == FALSE) - { - // - // Hum, the mutex deletion has failed - // - - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Mutex cannot be deleted since it does not exit"); - return FALSE; - } - - MutexTable[uiMutexIndex] = NULL; - - return TRUE; -} - -BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename) -{ - switch (WaitForSingleObject(MutexTable[uiMutexIndex], INFINITE)) - { - case WAIT_OBJECT_0 - : return TRUE; - case WAIT_TIMEOUT - : DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Possible infinite loop detected due to enter mutex timeout"); - return FALSE; - case WAIT_ABANDONED - : DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Abandoned mutex has been found"); - return FALSE; - } -} - -BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename) -{ - switch (WaitForSingleObject(MutexTable[uiMutexIndex], uiTimeout)) - { - case WAIT_OBJECT_0 - : return TRUE; - case WAIT_TIMEOUT - : return FALSE; - case WAIT_ABANDONED - : return FALSE; - } - return TRUE; -} - -BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename) -{ - if (ReleaseMutex(MutexTable[uiMutexIndex]) == FALSE) - { - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "ERROR : Failed to leave mutex"); - return FALSE; - } - - return TRUE; -} - -#else - -// -// Use defines to allocate slots in the mutex manager. Put these defines in LOCAL.H -// - -CRITICAL_SECTION MutexTable[MAX_MUTEX_HANDLES]; - -BOOLEAN InitializeMutexManager(void) -{ - UINT32 uiIndex; - - // - // Make sure all mutex handles are opened - // - - for (uiIndex = 0; uiIndex < MAX_MUTEX_HANDLES; uiIndex++) - { - InitializeCriticalSection(&MutexTable[uiIndex]); - } - - RegisterDebugTopic(TOPIC_MUTEX, "Mutex Manager"); - - return TRUE; -} - -void ShutdownMutexManager(void) -{ - UINT32 uiIndex; - - DbgMessage(TOPIC_MUTEX, DBG_LEVEL_0, "Shutting down the Mutex Manager"); - - // - // Make sure all mutex handles are closed - // - - for (uiIndex = 0; uiIndex < MAX_MUTEX_HANDLES; uiIndex++) - { - DeleteCriticalSection(&MutexTable[uiIndex]); - } - - UnRegisterDebugTopic(TOPIC_MUTEX, "Mutex Manager"); -} - -BOOLEAN InitializeMutex(UINT32 uiMutexIndex, UINT8 *ubMutexName) -{ - //InitializeCriticalSection(&MutexTable[uiMutexIndex]); - - return TRUE; -} - -BOOLEAN DeleteMutex(UINT32 uiMutexIndex) -{ - //DeleteCriticalSection(&MutexTable[uiMutexIndex]); - - return TRUE; -} - -BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename) -{ - EnterCriticalSection(&MutexTable[uiMutexIndex]); - return TRUE; -} - -BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename) -{ - EnterCriticalSection(&MutexTable[uiMutexIndex]); - return TRUE; -} - -BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename) -{ - LeaveCriticalSection(&MutexTable[uiMutexIndex]); - - return TRUE; -} - -#endif diff --git a/Standard Gaming Platform/Mutex Manager.h b/Standard Gaming Platform/Mutex Manager.h deleted file mode 100644 index b428dea4..00000000 --- a/Standard Gaming Platform/Mutex Manager.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __MUTEX_ -#define __MUTEX_ - -#include -#include "Types.h" -#include "Local.h" - -extern BOOLEAN InitializeMutexManager(void); -extern void ShutdownMutexManager(void); -extern BOOLEAN InitializeMutex(UINT32 uiMutexIndex, UINT8 *ubMutexName); -extern BOOLEAN DeleteMutex(UINT32 uiMutexIndex); -extern BOOLEAN EnterMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename); -extern BOOLEAN EnterMutexWithTimeout(UINT32 uiMutexIndex, UINT32 uiTimeout, INT32 nLine, STR8 szFilename); -extern BOOLEAN LeaveMutex(UINT32 uiMutexIndex, INT32 nLine, STR8 szFilename); - -// -// Use defines to allocate slots in the mutex manager. Put these defines in LOCAL.H -// - -#endif \ No newline at end of file diff --git a/Standard Gaming Platform/PCX.cpp b/Standard Gaming Platform/PCX.cpp index b2314997..25eb2cb2 100644 --- a/Standard Gaming Platform/PCX.cpp +++ b/Standard Gaming Platform/PCX.cpp @@ -1,13 +1,7 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include #include "pcx.h" #include "memman.h" #include "fileman.h" -#endif // Local typedefs diff --git a/Standard Gaming Platform/PngLoader.cpp b/Standard Gaming Platform/PngLoader.cpp index b817851d..88453b61 100644 --- a/Standard Gaming Platform/PngLoader.cpp +++ b/Standard Gaming Platform/PngLoader.cpp @@ -179,62 +179,6 @@ bool IndexedSTIImage::addImage(UINT8 *data, UINT32 data_size, UINT32 image_width return true; -#if 0 - unsigned int uiBufferPos = 0; - - bool bZeroRun = false; - UINT8 uiRunLength = 0; - UINT8 *uiRunStartPosition = data; - if(*data == 0) - { - bZeroRun = true; - } - bool done = false; - UINT32 scanline = 0; - while(!done) - { - if(bZeroRun) - { - while((*data == 0) && (uiRunLength < 128) && (uiBufferPos < data_size) && (scanline < image_width)) - { - data++; - uiRunLength++; - uiBufferPos++; - scanline++; - } - uiRunStartPosition = compressed; - *compressed++ = uiRunLength | iCOMPRESS_TRANSPARENT; - compressed_size += 1; - } - else - { - uiRunStartPosition = compressed++; - while((*data != 0) && (uiRunLength < 128) && (uiBufferPos < data_size) && (scanline < image_width)) - { - *compressed++ = *data++; - uiRunLength++; - uiBufferPos++; - scanline++; - } - *uiRunStartPosition = uiRunLength; - compressed_size += uiRunLength+1; - } - // prepare next run - uiRunLength = 0; - bZeroRun = (*data != 0) ? false : true; - if(scanline == image_width) - { - scanline = 0; - // "close" scanline with a zero - *compressed++ = 0; - compressed_size += 1; - } - if(uiBufferPos >= data_size) - { - done = true; - } - } -#endif } @@ -870,7 +814,6 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents) void Load32bppPNGImage(HIMAGE hImage, png::png_bytepp rows, png::png_infop info) { -#if 1 hImage->pETRLEObject = (ETRLEObject*)MemAlloc(1 * sizeof(ETRLEObject)); if(!hImage->pETRLEObject) { @@ -908,37 +851,6 @@ void Load32bppPNGImage(HIMAGE hImage, png::png_bytepp rows, png::png_infop info) } hImage->fFlags |= IMAGE_BITMAPDATA; -#else - UINT32 SIZE = info->height * info->width; - hImage->p16BPPData = new UINT16[SIZE]; - memset(hImage->p16BPPData, 0, SIZE*sizeof(UINT16)); - UINT16* dest_row = NULL; - UINT32 rgbcolor = 0; - for(unsigned int i=0; iheight; ++i) - { - dest_row = &(hImage->p16BPPData[i*info->width]); - png_bytep row_i = rows[i]; - for(unsigned int sx = 0, dx = 0; sx < 4*info->width; sx+=4, dx+=1) - { - if(row_i[sx+3] == 255) - { - rgbcolor = FROMRGB(row_i[sx], row_i[sx+1], row_i[sx+2]); - if(rgbcolor == 0) - { - // since we already use rgb(0,0,0) as a fully transparent color, - // the color black will be mapped to rgb(0,1,0), because green has the most bits - //rgbcolor = 1 << 8; - rgbcolor = FROMRGB(0,1,0); - } - dest_row[dx] = Get16BPPColor(rgbcolor); - } - else - { - dest_row[dx] = Get16BPPColor(0); - } - } - } -#endif } @@ -1039,65 +951,6 @@ void LoadPalettedPNGImage(HIMAGE hImage, png::png_bytepp rows, png::png_infop in SGP_THROW_IFFALSE( etrle_size > 0, L"ETRLE compression of PNG image failed" ); subim.sOffsetX = subimage.sOffsetX; subim.sOffsetY = subimage.sOffsetY; -#if 0 - unsigned int uiBufferPos = 0; - - bool bZeroRun = false; - UINT8 uiRunLength = 0; - UINT8 *uiRunStartPosition = data; - if(*data == 0) - { - bZeroRun = true; - } - bool done = false; - UINT32 scanline = 0; - while(!done) - { - if(bZeroRun) - { - while((*data == 0) && (uiRunLength < 128) && (uiBufferPos < SIZE) && (scanline < info->width)) - { - data++; - uiRunLength++; - uiBufferPos++; - scanline++; - } - uiRunStartPosition = compressed; - *compressed++ = uiRunLength | COMPRESS_TRANSPARENT; - compressed_size += 1; - *compressed++ = 0; - compressed_size += 1; - } - else - { - uiRunStartPosition = compressed++; - while((*data != 0) && (uiRunLength < 128) && (uiBufferPos < SIZE) && (scanline < info->width)) - { - *compressed++ = *data++; - uiRunLength++; - uiBufferPos++; - scanline++; - } - *uiRunStartPosition = uiRunLength | COMPRESS_NON_TRANSPARENT; - compressed_size += uiRunLength+1; - } - // prepare next run - uiRunLength = 0; - bZeroRun = (*data != 0) ? false : true; - if(scanline == info->width) - { - scanline = 0; - // "close" scanline with a zero - *compressed++ = 0; - compressed_size += 1; - } - if(uiBufferPos >= SIZE) - { - done = true; - } - } - UINT32 etrle_size = compressed_size; -#endif //subimage.uiDataLength = compressed_size; subimage.uiDataLength = etrle_size; subimage.uiDataOffset = 0; diff --git a/Standard Gaming Platform/RegInst.cpp b/Standard Gaming Platform/RegInst.cpp index 1a1c34d2..d77a845e 100644 --- a/Standard Gaming Platform/RegInst.cpp +++ b/Standard Gaming Platform/RegInst.cpp @@ -16,15 +16,9 @@ // //************************************************************************** -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include "RegInst.h" #include "WCheck.h" -#endif //************************************************************************** // diff --git a/Standard Gaming Platform/SGP_VS2005.vcproj b/Standard Gaming Platform/SGP_VS2005.vcproj deleted file mode 100644 index 354043ea..00000000 --- a/Standard Gaming Platform/SGP_VS2005.vcproj +++ /dev/null @@ -1,803 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Standard Gaming Platform/SGP_VS2008.vcproj b/Standard Gaming Platform/SGP_VS2008.vcproj deleted file mode 100644 index e1c23c64..00000000 --- a/Standard Gaming Platform/SGP_VS2008.vcproj +++ /dev/null @@ -1,801 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Standard Gaming Platform/SGP_VS2010.vcxproj b/Standard Gaming Platform/SGP_VS2010.vcxproj deleted file mode 100644 index 357f3ac2..00000000 --- a/Standard Gaming Platform/SGP_VS2010.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - Win32Proj - SGP - SGP - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2010.vcxproj.filters b/Standard Gaming Platform/SGP_VS2010.vcxproj.filters deleted file mode 100644 index 4d7304a1..00000000 --- a/Standard Gaming Platform/SGP_VS2010.vcxproj.filters +++ /dev/null @@ -1,354 +0,0 @@ - - - - - {efcdc6de-effe-499c-865f-bbb1cd30a876} - - - {3abaeda9-a6ab-443e-9e82-5b43020f6328} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2013.vcxproj b/Standard Gaming Platform/SGP_VS2013.vcxproj deleted file mode 100644 index f824da53..00000000 --- a/Standard Gaming Platform/SGP_VS2013.vcxproj +++ /dev/null @@ -1,331 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - Win32Proj - SGP - SGP - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2013.vcxproj.filters b/Standard Gaming Platform/SGP_VS2013.vcxproj.filters deleted file mode 100644 index 4d7304a1..00000000 --- a/Standard Gaming Platform/SGP_VS2013.vcxproj.filters +++ /dev/null @@ -1,354 +0,0 @@ - - - - - {efcdc6de-effe-499c-865f-bbb1cd30a876} - - - {3abaeda9-a6ab-443e-9e82-5b43020f6328} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2017.vcxproj b/Standard Gaming Platform/SGP_VS2017.vcxproj deleted file mode 100644 index 5770271c..00000000 --- a/Standard Gaming Platform/SGP_VS2017.vcxproj +++ /dev/null @@ -1,332 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - Win32Proj - SGP - SGP - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2019.vcxproj b/Standard Gaming Platform/SGP_VS2019.vcxproj deleted file mode 100644 index 9854c599..00000000 --- a/Standard Gaming Platform/SGP_VS2019.vcxproj +++ /dev/null @@ -1,509 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - Win32Proj - SGP - SGP - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - NativeRecommendedRules.ruleset - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;NO_ZLIB_COMPRESSION;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Standard Gaming Platform/SGP_VS2019.vcxproj.filters b/Standard Gaming Platform/SGP_VS2019.vcxproj.filters deleted file mode 100644 index 2632c47a..00000000 --- a/Standard Gaming Platform/SGP_VS2019.vcxproj.filters +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Standard Gaming Platform/STCI.cpp b/Standard Gaming Platform/STCI.cpp index 810e90fb..7a117e57 100644 --- a/Standard Gaming Platform/STCI.cpp +++ b/Standard Gaming Platform/STCI.cpp @@ -1,8 +1,3 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include #include "MemMan.h" #include "FileMan.h" @@ -11,7 +6,6 @@ #include "Types.h" #include "Debug.h" #include "WCheck.h" -#endif BOOLEAN STCILoadRGB( HIMAGE hImage, UINT16 fContents, HWFILE hFile, STCIHeader * pHeader ); BOOLEAN STCILoadIndexed( HIMAGE hImage, UINT16 fContents, HWFILE hFile, STCIHeader * pHeader ); @@ -153,12 +147,7 @@ BOOLEAN STCILoadRGB( HIMAGE hImage, UINT16 fContents, HWFILE hFile, STCIHeader * } } } -#ifdef JA2 return( TRUE ); -#else -// Anything else is an ERROR! --DB - return(FALSE); -#endif } diff --git a/Standard Gaming Platform/TopicIDs.h b/Standard Gaming Platform/TopicIDs.h index 4ec01487..e549e4e0 100644 --- a/Standard Gaming Platform/TopicIDs.h +++ b/Standard Gaming Platform/TopicIDs.h @@ -23,7 +23,6 @@ const unsigned TOPIC_FONT_HANDLER = 9; const unsigned TOPIC_VIDEOSURFACE = 8; const unsigned TOPIC_MOUSE_SYSTEM = 7; const unsigned TOPIC_BUTTON_HANDLER = 6; -const unsigned TOPIC_MUTEX = 5; const unsigned TOPIC_JA2INTERRUPT = 4; const unsigned TOPIC_JA2 = 3; const unsigned TOPIC_BLIT_QUEUE = INVALID_TOPIC; diff --git a/Standard Gaming Platform/Types.h b/Standard Gaming Platform/Types.h index dd727b41..0fc57bef 100644 --- a/Standard Gaming Platform/Types.h +++ b/Standard Gaming Platform/Types.h @@ -4,7 +4,6 @@ #ifndef _SIRTECH_TYPES_ #define _SIRTECH_TYPES_ -#ifdef JA2 #ifdef RELEASE_WITH_DEBUG_INFO //For JA2 Release with debug info build, disable these warnigs messages @@ -13,7 +12,6 @@ #endif -#endif // build defines header.... @@ -31,16 +29,11 @@ // HEY WIZARDRY DUDES, JA2 ISN'T THE ONLY PROGRAM WE COMPILE! :-) -#if defined( JA2 ) || defined( UTILS ) typedef unsigned int UINT32; typedef signed __int64 INT64; // WANNE - BMP: Used for Big Maps typedef signed int INT32; typedef unsigned __int64 UINT64; //typedef unsigned long long UINT128; //Madd: Doing away with this redundant type -#else -typedef unsigned int UINT32; -typedef int INT32; -#endif // integers typedef unsigned char UINT8; diff --git a/Standard Gaming Platform/WinFont.cpp b/Standard Gaming Platform/WinFont.cpp index 1bcdafa2..bfed0c1b 100644 Binary files a/Standard Gaming Platform/WinFont.cpp and b/Standard Gaming Platform/WinFont.cpp differ diff --git a/Standard Gaming Platform/WinFont.h b/Standard Gaming Platform/WinFont.h index 77fceb6a..751e42e3 100644 --- a/Standard Gaming Platform/WinFont.h +++ b/Standard Gaming Platform/WinFont.h @@ -5,6 +5,9 @@ void InitWinFonts( ); void ShutdownWinFonts( ); +void InitTooltipFonts(); +void ShutdownTooltipFonts(); + INT32 CreateWinFont( LOGFONT &logfont ); void DeleteWinFont( INT32 iFont ); @@ -14,8 +17,7 @@ void SetWinFontForeColor( INT32 iFont, COLORVAL *pColor ); void PrintWinFont( UINT32 uiDestBuf, INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...); INT16 WinFontStringPixLength( STR16 string, INT32 iFont ); -INT16 GetWinFontHeight( STR16 string, INT32 iFont ); -UINT32 WinFont_mprintf( INT32 iFont, INT32 x, INT32 y, STR16 pFontString, ...); +INT16 GetWinFontHeight( INT32 iFont ); //if you cahnge this enum, you must change FontInfo struct in WinFont.cpp too. enum { @@ -43,5 +45,7 @@ WIN_LASTFONT }; #define MAX_WINFONTMAP 25 extern INT32 WinFontMap[MAX_WINFONTMAP]; +extern INT32 TOOLTIP_IFONT; +extern INT32 TOOLTIP_IFONT_BOLD; #endif diff --git a/Standard Gaming Platform/WizShare.h b/Standard Gaming Platform/WizShare.h deleted file mode 100644 index 73216e57..00000000 --- a/Standard Gaming Platform/WizShare.h +++ /dev/null @@ -1,54 +0,0 @@ -//************************************************************************** -// -// Filename : WizShare.h -// -// Purpose : -// -// Modification history : -// -// 25nov96:HJH - creation -// -//************************************************************************** - -#ifndef _WizShare_h -#define _WizShare_h - -//************************************************************************** -// -// Includes -// -//************************************************************************** - -#include "types.h" - -//************************************************************************** -// -// Defines -// -//************************************************************************** - -#define MAX_MSG_LENGTH 128 -#define NUM_MESSAGES 100 - -//************************************************************************** -// -// Typedefs -// -//************************************************************************** - -#pragma pack(push, 1) - -typedef struct WizSharedtag -{ - BOOLEAN fMessage; - - INT32 iMessageIndex; // index to 1st message - INT32 iNumMessages; // # messages - INT32 iLastIndex; - - CHAR cMessages[NUM_MESSAGES][MAX_MSG_LENGTH]; -} WizShared; - -#pragma pack(pop) - -#endif diff --git a/Standard Gaming Platform/english.h b/Standard Gaming Platform/english.h index 9ead3cfe..09d1f54a 100644 --- a/Standard Gaming Platform/english.h +++ b/Standard Gaming Platform/english.h @@ -71,12 +71,7 @@ #define INSERT 245 #define DEL 246 -#ifndef JA2 -// Stupid definition causes problems with headers that use the keyword END -- DB - #define KEY_END 247 -#else #define END 247 -#endif #define DNARROW 248 #define PGDN 249 diff --git a/Standard Gaming Platform/himage.cpp b/Standard Gaming Platform/himage.cpp index 64e20278..f2c84bdd 100644 --- a/Standard Gaming Platform/himage.cpp +++ b/Standard Gaming Platform/himage.cpp @@ -1,8 +1,3 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "builddefines.h" #include #include @@ -19,7 +14,6 @@ #include "Compression.h" #include "vobject.h" #include "vobject_blitters.h" -#endif #include @@ -135,104 +129,19 @@ HIMAGE CreateImage( SGPFILENAME ImageFile, UINT16 fContents, ImageFileType::Test CHAR8 ExtensionSep[] = "."; UINT32 iFileLoader; -#if 0 - SGPFILENAME Extension; - STR StrPtr; - - // Depending on extension of filename, use different image readers - // Get extension - StrPtr = strstr( ImageFile, ExtensionSep ); - - if ( StrPtr == NULL ) - { - // No extension given, use default internal loader extension - DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_2, "No extension given, using default" ); - strcat( ImageFile, ".PCX" ); - strcpy( Extension, ".PCX" ); - } - else - { - strcpy( Extension, StrPtr+1 ); - } - - // Determine type from Extension - do - { - iFileLoader = UNKNOWN_FILE_READER; - - if ( _stricmp( Extension, "PCX" ) == 0 ) - { - iFileLoader = PCX_FILE_READER; - break; - } - else if ( _stricmp( Extension, "TGA" ) == 0 ) - { - iFileLoader = TGA_FILE_READER; - break; - } - else if ( _stricmp( Extension, "STI" ) == 0 ) - { -#ifdef USE_VFS - // see if there is a .jpc file first and when that fails, try .sti - vfs::Path str(ImageFile); - vfs::String::str_t const& findext = str.c_wcs(); - vfs::String::size_t dot = findext.find_last_of(vfs::Const::DOT()); - vfs::String fname = findext.substr(0,dot).append(CONST_DOTJPC); - if(getVFS()->fileExists(fname)) - { - iFileLoader = JPC_FILE_READER; - strncpy(ImageFile, fname.utf8().c_str(), fname.length()); - ImageFile[fname.length()] = 0; - break; - } -#endif - iFileLoader = STCI_FILE_READER; - break; - } - else if ( _stricmp( Extension, "PNG" ) == 0 ) - { - iFileLoader = PNG_FILE_READER; - break; - } -#ifdef USE_VFS - else if ( vfs::StrCmp::Equal(Extension, L"jpc.7z") ) - { - iFileLoader = JPC_FILE_READER; - break; - } -#endif - } while ( FALSE ); - - // Determine if resource exists before creating image structure - if ( !FileExists( ImageFile ) ) - { - //If in debig, make fatal! -#ifdef JA2 -#ifdef _DEBUG - //FatalError( "Resource file %s does not exist.", ImageFile ); -#endif -#endif - DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_2, String("Resource file %s does not exist.", ImageFile) ); - - return( NULL ); - } -#else std::string filename(ImageFile); iFileLoader = ImageFileType::getFileReaderType(filename, order); if ( iFileLoader == UNKNOWN_FILE_READER ) { //If in debug, make fatal! -#ifdef JA2 #ifdef _DEBUG //FatalError( "Resource file %s does not exist.", ImageFile ); -#endif #endif DbgMessage( TOPIC_HIMAGE, DBG_LEVEL_2, String("Resource file %s does not exist.", ImageFile) ); return( NULL ); } -#endif // Create memory for image structure hImage = (HIMAGE)MemAlloc( sizeof( image_type ) ); diff --git a/Standard Gaming Platform/impTGA.cpp b/Standard Gaming Platform/impTGA.cpp index b9aecb4c..8c4564c0 100644 --- a/Standard Gaming Platform/impTGA.cpp +++ b/Standard Gaming Platform/impTGA.cpp @@ -16,11 +16,6 @@ // //************************************************************************** -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include "Fileman.h" #include "memman.h" @@ -28,13 +23,8 @@ #include "himage.h" #include "string.h" #include "debug.h" - #if defined( JA2 ) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif #include "impTGA.h" -#endif //************************************************************************** // @@ -279,29 +269,6 @@ BOOLEAN ReadUncompRGBImage( HIMAGE hImage, HWFILE hFile, UINT8 uiImgID, UINT8 ui hImage->fFlags |= IMAGE_BITMAPDATA; } - #if 0 - // 32 bit not yet allowed in SGP - else if ( uiImagePixelSize == 32 ) - { - iNumValues = uiWidth * uiHeight; - - for ( i=0 ; iusStringOffset = 0 ; gpCurrentStringDescriptor->usLastCharacter = usInputCharacter; break; -#ifndef JA2 - // Stupid definition causes problems with headers that use the keyword END -- DB - case KEY_END -#else case END -#endif : // Go to the end of the input string gpCurrentStringDescriptor->usStringOffset = gpCurrentStringDescriptor->usCurrentStringLength; gpCurrentStringDescriptor->usLastCharacter = usInputCharacter; @@ -1632,28 +1609,6 @@ BOOLEAN IsCursorRestricted( void ) void SimulateMouseMovement( UINT32 uiNewXPos, UINT32 uiNewYPos ) { -#if 0 - FLOAT flNewXPos, flNewYPos; - - // Wizardry NOTE: This function currently doesn't quite work right for in any Windows resolution other than 640x480. - // mouse_event() uses your current Windows resolution to calculate the resulting x,y coordinates. So in order to get - // the right coordinates, you'd have to find out the current Windows resolution through a system call, and then do: - // uiNewXPos = uiNewXPos * SCREEN_WIDTH / WinScreenResX; - // uiNewYPos = uiNewYPos * SCREEN_HEIGHT / WinScreenResY; - // - // JA2 doesn't have this problem, 'cause they use DirectDraw calls that change the Windows resolution properly. - // - // Alex Meduna, Dec. 3, 1997 - - // Adjust coords based on our resolution - flNewXPos = ( (FLOAT)uiNewXPos / SCREEN_WIDTH ) * 65536; - flNewYPos = ( (FLOAT)uiNewYPos / SCREEN_HEIGHT ) * 65536; - - mouse_event( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, (UINT32)flNewXPos, (UINT32)flNewYPos, 0, 0 ); -#endif - // 0verhaul: - // The above is a bad hack. Especially in windowed mode. We don't want coords relative to the entire screen in that case. - // So instead, get screen coords and then use the setcursorpos call. POINT newmouse; newmouse.x = uiNewXPos; newmouse.y = uiNewYPos; diff --git a/Standard Gaming Platform/line.cpp b/Standard Gaming Platform/line.cpp index 3b0f3341..76c344f7 100644 --- a/Standard Gaming Platform/line.cpp +++ b/Standard Gaming Platform/line.cpp @@ -1,10 +1,4 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "line.h" -#endif //************************************************************************** // diff --git a/Standard Gaming Platform/mousesystem.cpp b/Standard Gaming Platform/mousesystem.cpp index e939df13..a9fb22c2 100644 --- a/Standard Gaming Platform/mousesystem.cpp +++ b/Standard Gaming Platform/mousesystem.cpp @@ -11,11 +11,6 @@ // //================================================================================================= -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include @@ -24,13 +19,8 @@ #include "input.h" #include "memman.h" #include "line.h" - #if (defined( JA2 ) || defined( UTIL )) #include "video.h" #define BASE_REGION_FLAGS (MSYS_REGION_ENABLED | MSYS_SET_CURSOR) - #else - #include "video2.h" - #define BASE_REGION_FLAGS MSYS_REGION_ENABLED // Wiz doesn't ever want MSYS_SET_CURSOR to be on... - #endif #ifdef _JA2_RENDER_DIRTY #include "render dirty.h" #include "Font Control.h" @@ -42,13 +32,7 @@ #include "Button System.h" ///***ddd #include "GameSettings.h" -#endif -#ifdef JA2_PRECOMPILED_HEADERS - #define BASE_REGION_FLAGS (MSYS_REGION_ENABLED | MSYS_SET_CURSOR) -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #define BASE_REGION_FLAGS MSYS_REGION_ENABLED // Wiz doesn't ever want MSYS_SET_CURSOR to be on... -#endif @@ -72,6 +56,7 @@ extern void ReleaseAnchorMode(); //private function used here (implemented in Bu INT16 GetNumberOfLinesInHeight( const STR16 pStringA ); INT16 GetWidthOfString( const STR16 pStringA ); void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY ); +bool isTooltipScalingEnabled(); @@ -128,13 +113,11 @@ BOOLEAN gfRefreshUpdate = FALSE; //an already deleted region. It will also ensure that you don't create an identical region //that already exists. //TO REMOVE ALL DEBUG FUNCTIONALITY: simply comment out MOUSESYSTEM_DEBUGGING definition -#ifdef JA2 #ifdef _DEBUG #ifndef BOUNDS_CHECKER #define MOUSESYSTEM_DEBUGGING #endif #endif -#endif #ifdef MOUSESYSTEM_DEBUGGING extern BOOLEAN gfIgnoreShutdownAssertions; @@ -294,9 +277,7 @@ void MSYS_SGP_Mouse_Handler_Hook(UINT16 Type,UINT16 Xcoord, UINT16 Ycoord, BOOLE //you release inside of the button, the action is selected -- but later in the code. //NOTE: It has to be here, because the mouse can be released anywhere regardless of //regions, buttons, etc. - #ifdef JA2 ReleaseAnchorMode(); - #endif } else if(Type == RIGHT_BUTTON_DOWN) { @@ -719,17 +700,12 @@ void MSYS_UpdateMouseRegion(void) MSYS_PrevRegion->uiFlags &= (~MSYS_GOT_BACKGROUND); MSYS_PrevRegion->uiFlags &= (~MSYS_FASTHELP_RESET); - #ifndef UTIL // dirty buttons, need a re-render //DEF: Nov 30 98 // PausedMarkButtonsDirty( ); - #endif //if( region->uiFlags & MSYS_REGION_ENABLED ) // region->uiFlags |= BUTTON_DIRTY; -#ifndef JA2 - VideoRemoveToolTip(); -#endif } if (MSYS_CurrRegion) @@ -762,9 +738,6 @@ void MSYS_UpdateMouseRegion(void) MSYS_CurrRegion->uiFlags &= (~MSYS_GOT_BACKGROUND); MSYS_CurrRegion->uiFlags |= MSYS_FASTHELP_RESET; -#ifndef JA2 - VideoRemoveToolTip(); -#endif //if( b->uiFlags & BUTTON_ENABLED ) // b->uiFlags |= BUTTON_DIRTY; @@ -893,9 +866,6 @@ void MSYS_UpdateMouseRegion(void) //if( b->uiFlags & BUTTON_ENABLED ) // b->uiFlags |= BUTTON_DIRTY; -#ifndef JA2 - VideoRemoveToolTip(); -#endif } //Kris: Nov 31, 1999 -- Added support for double click events. @@ -1120,10 +1090,6 @@ void MSYS_RemoveRegion(MOUSE_REGION *region) // Get rid of the FastHelp text (if applicable) if( region->FastHelpText ) { -#ifndef JA2 - if(region->uiFlags & MSYS_FASTHELP) - VideoRemoveToolTip(); -#endif MemFree( region->FastHelpText ); } region->FastHelpText = NULL; @@ -1380,10 +1346,8 @@ void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText ) // ATE: We could be replacing already existing, active text // so let's remove the region so it be rebuilt... - #ifdef JA2 if ( guiCurrentScreen != MAP_SCREEN ) { - #endif #ifdef _JA2_RENDER_DIRTY if( region->uiFlags & MSYS_GOT_BACKGROUND ) @@ -1393,39 +1357,36 @@ void SetRegionFastHelpText( MOUSE_REGION *region, const STR16 szText ) region->uiFlags &= (~MSYS_GOT_BACKGROUND); region->uiFlags &= (~MSYS_FASTHELP_RESET); - #ifdef JA2 } - #endif //region->FastHelpTimer = gsFastHelpDelay; } -INT16 GetNumberOfLinesInHeight( const STR16 pStringA ) +bool isTooltipScalingEnabled() { + return fTooltipScaleFactor > 1; +} + +UINT16 GetScaledFontHeight() { - STR16 pToken; - INT16 sCounter = 0; - CHAR16 pString[ 4096 ]; + return isTooltipScalingEnabled() + ? GetWinFontHeight(TOOLTIP_IFONT) + : GetFontHeight(FONT10ARIAL); +} - wcscpy( pString, pStringA ); +// this function returns the number of lines the input string has +// that can be renderered within the screen height +INT16 GetNumberOfLinesInHeight(const STR16 inputString) { + INT32 fontHeight = GetScaledFontHeight(); - // tokenize - pToken = wcstok( pString, L"\n" ); - - while( pToken != NULL ) - { - // WANNE: Fix by Headrock - if ( (sCounter+1) * (GetFontHeight(FONT10ARIAL)+1) > (SCREEN_HEIGHT - 10) ) - { - break; - } - pToken = wcstok( NULL, L"\n" ); - sCounter++; - - /*pToken = wcstok( NULL, L"\n" ); - sCounter++;*/ + INT32 count = 1; + INT32 stringLength = (INT32)wcslen(inputString); + for (int i = 0; i < stringLength && count * (fontHeight + 1) < (SCREEN_HEIGHT - 10); i++) { + if (inputString[i] == '\n' && i + 1 < stringLength) { + count++; + } } - return( sCounter ); + return(count); } @@ -1437,17 +1398,14 @@ INT16 GetNumberOfLinesInHeight( const STR16 pStringA ) // void DisplayFastHelp( MOUSE_REGION *region ) { - UINT16 usFillColor; INT32 iX,iY,iW,iH; if ( region->uiFlags & MSYS_FASTHELP ) { - usFillColor = Get16BPPColor(FROMRGB(250, 240, 188)); + iW = (INT32)GetWidthOfString(region->FastHelpText) + 10 * fTooltipScaleFactor; + iH = (INT32)(GetNumberOfLinesInHeight(region->FastHelpText) * (GetScaledFontHeight() + 1) + 8 * fTooltipScaleFactor); - iW = (INT32)GetWidthOfString( region->FastHelpText ) + 10; - iH = (INT32)( GetNumberOfLinesInHeight( region->FastHelpText ) * (GetFontHeight(FONT10ARIAL)+1) + 8 ); - - iX = (INT32)region->RegionTopLeftX + 10; + iX = (INT32)region->RegionTopLeftX + 10 * fTooltipScaleFactor; if (iX < 0) iX = 0; @@ -1463,7 +1421,7 @@ void DisplayFastHelp( MOUSE_REGION *region ) iY = 0; if ( (iY + iH) >= SCREEN_HEIGHT ) - iY = (SCREEN_HEIGHT - iH - 15); + iY = (SCREEN_HEIGHT - iH - 10); if ( !(region->uiFlags & MSYS_GOT_BACKGROUND) ) { @@ -1484,83 +1442,149 @@ void DisplayFastHelp( MOUSE_REGION *region ) ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); - SetFont( FONT10ARIAL ); - SetFontShadow( FONT_NEARBLACK ); - DisplayHelpTokenizedString( region->FastHelpText ,( INT16 )( iX + 5 ), ( INT16 )( iY + 5 ) ); + DisplayHelpTokenizedString( + region->FastHelpText, + (INT16)(iX + (isTooltipScalingEnabled() ? 5 * fTooltipScaleFactor : 5)), + (INT16)(iY + (isTooltipScalingEnabled() ? 4 * fTooltipScaleFactor : 5)) + ); InvalidateRegion( iX, iY, (iX + iW) , (iY + iH) ); } } } -INT16 GetWidthOfString( const STR16 pStringA ) +INT16 GetWidthOfString(const STR16 inputString) { - CHAR16 pString[ 4096 ]; - STR16 pToken; - INT16 sWidth = 0; - wcscpy( pString, pStringA ); + INT16 width = 0; + CHAR16 stringBuffer[256] = L""; + INT32 bufferIndex = 0; + bool isBold = false; - // tokenize - pToken = wcstok( pString, L"\n" ); + INT32 iFontHeight = GetScaledFontHeight(); - while( pToken != NULL ) - { - if( sWidth < StringPixLength( pToken, FONT10ARIAL ) ) - { - sWidth = StringPixLength( pToken, FONT10ARIAL ); + INT16 lineWidth = 0; + + INT32 lineCounter = 0; + INT32 stringLength = (INT32)wcslen(inputString); + for (int i = 0; i < stringLength; i++) { + if (inputString[i] == '\n') { + // if the lines don't fit the screen the last line is ... + if ((lineCounter + 2) * (iFontHeight + 1) > (SCREEN_HEIGHT - 10)) { + lineWidth = isTooltipScalingEnabled() + ? WinFontStringPixLength(L"...", TOOLTIP_IFONT) + : StringPixLength(L"...", FONT10ARIAL); + if (width < lineWidth) { + width = lineWidth; + } + break; + } + lineWidth = 0; + lineCounter++; } + else if (inputString[i] == '|') { + isBold = true; + } + else { + stringBuffer[bufferIndex++] = inputString[i]; - pToken = wcstok( NULL, L"\n" ); + // look ahead to see if we need to flush the string buffer + if (i + 1 >= stringLength + || inputString[i + 1] == '\n' + || (isBold && inputString[i + 1] != '|') + || (!isBold && inputString[i + 1] == '|')) { + + // set string ending character + stringBuffer[bufferIndex] = '\0'; + + if (isTooltipScalingEnabled()) { + INT32 iFont = isBold ? TOOLTIP_IFONT_BOLD : TOOLTIP_IFONT; + lineWidth += WinFontStringPixLength(stringBuffer, iFont); + } + else { + INT32 iFont = isBold ? FONT10ARIALBOLD : FONT10ARIAL; + SetFont(iFont); + lineWidth += StringPixLength(stringBuffer, iFont); + } + bufferIndex = 0; + isBold = false; + + if (i + 1 >= stringLength || inputString[i + 1] == '\n') { + if (width < lineWidth) { + width = lineWidth; + } + } + } + } } - return( sWidth ); - + return width; } -void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY ) +void DisplayHelpTokenizedString(const STR16 inputString, INT16 sX, INT16 sY) { - STR16 pToken; - INT32 iCounter = 0, i; - UINT32 uiCursorXPos; - CHAR16 pString[ 4096 ]; - INT32 iLength; + SetFontShadow(FONT_NEARBLACK); - wcscpy( pString, pStringA ); + INT32 fontHeight = GetScaledFontHeight(); - // tokenize - pToken = wcstok( pString, L"\n" ); + CHAR16 stringBuffer[256] = L""; + INT32 bufferIndex = 0; + bool isBold = false; - while( pToken != NULL ) - { - // WANNE: Fix by Headrock - if ( (iCounter+2) * (GetFontHeight(FONT10ARIAL)+1) > (SCREEN_HEIGHT - 10) ) - { - mprintf( sX, sY + iCounter * (GetFontHeight(FONT10ARIAL)+1), L"..." ); - break; - } - iLength = (INT32)wcslen( pToken ); + INT16 xDelta = 0; - //iLength = (INT32)wcslen( pToken ); - for( i = 0; i < iLength; i++ ) - { - uiCursorXPos = StringPixLengthArgFastHelp( FONT10ARIAL, FONT10ARIALBOLD, i, pToken ); - if( pToken[ i ] == '|' ) - { - i++; - SetFont( FONT10ARIALBOLD ); - SetFontForeground( 146 ); + INT32 lineCounter = 0; + INT32 stringLength = (INT32)wcslen(inputString); + for (int i = 0; i < stringLength; i++) { + if (inputString[i] == '\n') { + // if the lines don't fit the screen the last line is ... + if ((lineCounter + 2) * (fontHeight + 1) > (SCREEN_HEIGHT - 10)) { + if (isTooltipScalingEnabled()) { + PrintWinFont(FontDestBuffer, TOOLTIP_IFONT, sX, sY + lineCounter * (fontHeight + 1), L"..."); + } + else { + SetFont(FONT10ARIAL); + mprintf(sX, sY + lineCounter * (fontHeight + 1), L"..."); + } + break; + } + xDelta = 0; + lineCounter++; + } + else if (inputString[i] == '|') { + isBold = true; + } + else { + stringBuffer[bufferIndex++] = inputString[i]; + + // look ahead to see if we need to flush the string buffer + if (i + 1 >= stringLength + || inputString[i + 1] == '\n' + || (isBold && inputString[i + 1] != '|') + || (!isBold && inputString[i + 1] == '|')) { + + // set string ending character + stringBuffer[bufferIndex] = '\0'; + + if (isTooltipScalingEnabled()) { + // the font color is set on font initialization + INT32 iFont = isBold ? TOOLTIP_IFONT_BOLD : TOOLTIP_IFONT; + PrintWinFont(FontDestBuffer, iFont, sX + xDelta, sY + lineCounter * (fontHeight + 1), L"%s", stringBuffer); + xDelta += WinFontStringPixLength(stringBuffer, iFont); + } + else { + INT32 iFont = isBold ? FONT10ARIALBOLD : FONT10ARIAL; + SetFont(iFont); + SetFontForeground(isBold ? 146 : FONT_BEIGE); + mprintf(sX + xDelta, sY + lineCounter * (fontHeight + 1), L"%s", stringBuffer); + xDelta += StringPixLength(stringBuffer, iFont); + } + bufferIndex = 0; + isBold = false; } - else - { - SetFont( FONT10ARIAL ); - SetFontForeground( FONT_BEIGE ); - } - mprintf( sX + uiCursorXPos, sY + iCounter * (GetFontHeight(FONT10ARIAL)+1), L"%c", pToken[ i ] ); } - pToken = wcstok( NULL, L"\n" ); - iCounter++; } - SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE ); + + SetFontDestBuffer(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE); } void RenderFastHelp() @@ -1858,4 +1882,4 @@ MOUSE_REGION *get_next_entry_in_MSYS_RegList(MOUSE_REGION *current_region) void ResetWheelState( MOUSE_REGION *region ) { region->WheelState = 0; -} \ No newline at end of file +} diff --git a/Standard Gaming Platform/mousesystem.h b/Standard Gaming Platform/mousesystem.h index 87d17297..a3c9993d 100644 --- a/Standard Gaming Platform/mousesystem.h +++ b/Standard Gaming Platform/mousesystem.h @@ -27,9 +27,7 @@ // // ***************************************************************************** -#ifdef JA2 #define _JA2_RENDER_DIRTY // Undef this if not using the JA2 Dirty Rectangle System. -#endif typedef void (*MOUSE_CALLBACK)(struct _MOUSE_REGION *,INT32); // Define MOUSE_CALLBACK type as pointer to void typedef void (*MOUSE_HELPTEXT_DONE_CALLBACK)( ); // the help is done callback diff --git a/Standard Gaming Platform/sgp.cpp b/Standard Gaming Platform/sgp.cpp index d070b779..91f5d545 100644 --- a/Standard Gaming Platform/sgp.cpp +++ b/Standard Gaming Platform/sgp.cpp @@ -1,12 +1,5 @@ /* $Id: sgp.c,v 1.4 2004/03/19 06:16:04 digicrab Exp $ */ //its test what doeas it do? -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" - #include "JA2 Splash.h" - #include "utilities.h" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include #include @@ -22,16 +15,10 @@ #include "Random.h" #include "gameloop.h" #include "soundman.h" - #ifdef JA2 #include "JA2 Splash.h" #include "Timer Control.h" - #endif - #if !defined( JA2 ) && !defined( UTIL ) - #include "GameData.h" // for MoveTimer() [Wizardry specific] - #endif #include "LibraryDataBase.h" #include "utilities.h" -#endif #include "GameSettings.h" #include "input.h" @@ -64,10 +51,8 @@ #include "connect.h" #include "english.h" -#ifdef JA2 #include "BuildDefines.h" #include "Intro.h" -#endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN @@ -133,11 +118,9 @@ void SHOWEXCEPTION(vfs::Exception& ex) extern UINT32 MemDebugCounter; -#ifdef JA2 extern BOOLEAN gfPauseDueToPlayerGamePause; extern int iScreenMode; extern BOOL bScreenModeCmdLine; -#endif extern BOOLEAN CheckIfGameCdromIsInCDromDrive(); extern void QueueEvent(UINT16 ubInputEvent, UINT32 usParam, UINT32 uiParam); @@ -159,21 +142,7 @@ static CRITICAL_SECTION gcsGameLoop; int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCommandLine, int sCommandShow); -#if USE_CONSOLE -Console g_Console("", "", "Lua Console", "no"); -#endif -#if !defined(JA2) && !defined(UTILS) -void ProcessCommandLine(CHAR8 *pCommandLine); -BOOLEAN RunSetup(void); - -// Should the game immediately load the quick save at startup? -BOOLEAN gfLoadAtStartup=FALSE; -BOOLEAN gfUsingBoundsChecker=FALSE; -CHAR8 *gzStringDataOverride=NULL; -BOOLEAN gfCapturingVideo = FALSE; - -#endif #ifdef USE_VFS static void PopulateSectionFromCommandLine(vfs::PropertyContainer &oProps, vfs::String const& sSection); @@ -182,16 +151,13 @@ static void PopulateSectionFromCommandLine(vfs::PropertyContainer &oProps, vfs:: HINSTANCE ghInstance; -#ifdef JA2 void ProcessJa2CommandLineBeforeInitialization(CHAR8 *pCommandLine); -#endif // Global Variable Declarations RECT rcWindow; POINT ptWindowSize; // moved from header file: 24mar98:HJH -UINT32 giStartMem; //UINT8 gbPixelDepth; // redefintion... look down a few lines (jonathanl) // GLOBAL RUN-TIME SETTINGS @@ -200,7 +166,6 @@ UINT32 guiMouseWheelMsg; // For mouse wheel messages BOOLEAN gfApplicationActive; BOOLEAN gfProgramIsRunning; BOOLEAN gfGameInitialized = FALSE; -//UINT32 giStartMem; // redefintion... look up a few lines (jonathanl) BOOLEAN gfDontUseDDBlits = FALSE; // There were TWO of them??!?! -- DB @@ -269,7 +234,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP // break; // } */ -#ifdef JA2 case WM_MOVE: // if( 1==iScreenMode ) { @@ -308,160 +272,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP mmi->ptMinTrackSize = mmi->ptMaxSize; break; } -#else - case WM_MOUSEMOVE: - break; - - case WM_SIZING: - { - LPRECT lpWindow; - INT32 iWidth, iHeight, iX, iY; - BOOLEAN fWidthByHeight=FALSE, fHoldRight=FALSE; - - lpWindow = (LPRECT) lParam; - - iWidth = lpWindow->right-lpWindow->left; - iHeight = lpWindow->bottom-lpWindow->top; - iX = (lpWindow->left + lpWindow->right)/2; - iY = (lpWindow->top + lpWindow->bottom)/2; - - switch(wParam) - { - case WMSZ_BOTTOMLEFT: - fHoldRight=TRUE; - case WMSZ_BOTTOM: - case WMSZ_BOTTOMRIGHT: - if(iHeight < SCREEN_HEIGHT) - { - lpWindow->bottom=lpWindow->top+SCREEN_HEIGHT; - iHeight=SCREEN_HEIGHT; - } - fWidthByHeight=TRUE; - break; - - case WMSZ_TOPLEFT: - fHoldRight=TRUE; - case WMSZ_TOP: - case WMSZ_TOPRIGHT: - if(iHeight < SCREEN_HEIGHT) - { - lpWindow->top=lpWindow->bottom-SCREEN_HEIGHT; - iHeight=SCREEN_HEIGHT; - } - fWidthByHeight=TRUE; - break; - - case WMSZ_LEFT: - if(iWidth < SCREEN_WIDTH) - { - lpWindow->left=lpWindow->right-SCREEN_WIDTH; - iWidth = SCREEN_WIDTH; - } - break; - - case WMSZ_RIGHT: - if(iWidth < SCREEN_WIDTH) - { - lpWindow->right=lpWindow->left+SCREEN_WIDTH; - iWidth = SCREEN_WIDTH; - } - } - - // Calculate width as a factor of height - if(fWidthByHeight) - { - iWidth = iHeight * SCREEN_WIDTH / SCREEN_HEIGHT; -// lpWindow->left = iX - iWidth/2; -// lpWindow->right = iX + iWidth / 2; - if(fHoldRight) - lpWindow->left = lpWindow->right - iWidth; - else - lpWindow->right = lpWindow->left + iWidth; - } - else // Calculate height as a factor of width - { - iHeight = iWidth * SCREEN_HEIGHT / SCREEN_WIDTH; -// lpWindow->top = iY - iHeight/2; -// lpWindow->bottom = iY + iHeight/2; - lpWindow->bottom = lpWindow->top + iHeight; - } - -/* - switch(wParam) - { - case WMSZ_BOTTOM: - case WMSZ_BOTTOMLEFT: - case WMSZ_BOTTOMRIGHT: - if(iHeight < SCREEN_HEIGHT) - { - lpWindow->bottom=lpWindow->top+SCREEN_HEIGHT; - } - } - - switch(wParam) - { - case WMSZ_TOP: - case WMSZ_TOPLEFT: - case WMSZ_TOPRIGHT: - if(iHeight < SCREEN_HEIGHT) - { - lpWindow->top=lpWindow->bottom-SCREEN_HEIGHT; - } - } - - switch(wParam) - { - case WMSZ_BOTTOMLEFT: - case WMSZ_LEFT: - case WMSZ_TOPLEFT: - if(iWidth < SCREEN_WIDTH) - { - lpWindow->left=lpWindow->right-SCREEN_WIDTH; - } - } - - switch(wParam) - { - case WMSZ_BOTTOMRIGHT: - case WMSZ_RIGHT: - case WMSZ_TOPRIGHT: - if(iWidth < SCREEN_WIDTH) - { - lpWindow->right=lpWindow->left+SCREEN_WIDTH; - } - } -*/ - } - break; - - case WM_SIZE: - { - UINT16 nWidth = LOWORD(lParam); // width of client area - UINT16 nHeight = HIWORD(lParam); // height of client area - - if(nWidth && nHeight) - { - switch(wParam) - { - case SIZE_MAXIMIZED: - VideoFullScreen(TRUE); - break; - - case SIZE_RESTORED: - VideoResizeWindow(); - break; - } - } - } - break; - - case WM_MOVE: - { - INT32 xPos = (INT32)LOWORD(lParam); // horizontal position - INT32 yPos = (INT32)HIWORD(lParam); // vertical position - } - break; -#endif case WM_SETCURSOR: SetCursor( NULL); return TRUE; @@ -482,7 +292,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP case TRUE: // We are restarting DirectDraw if (fRestore == TRUE) { -#ifdef JA2 RestoreVideoManager(); RestoreVideoSurfaces(); // Restore any video surfaces @@ -491,39 +300,18 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP { PauseTime( FALSE ); } -#else - if(!VideoInspectorIsEnabled()) - { - RestoreVideoManager(); - RestoreVideoSurfaces(); // Restore any video surfaces - } - - MoveTimer(TIMER_RESUME); -#endif gfApplicationActive = TRUE; } break; case FALSE: // We are suspending direct draw if (iScreenMode == 0) { -#ifdef JA2 // pause the JA2 Global clock //PauseTime( TRUE ); SuspendVideoManager(); -#else -#ifndef UTIL - if(!VideoInspectorIsEnabled()) - { - SuspendVideoManager(); - } -#endif -#endif // suspend movement timer, to prevent timer crash if delay becomes long // * it doesn't matter whether the 3-D engine is actually running or not, or if it's even been initialized // * restore is automatic, no need to do anything on reactivation -#if !defined( JA2 ) && !defined( UTIL ) - MoveTimer(TIMER_SUSPEND); -#endif // gfApplicationActive = FALSE; fRestore = TRUE; } @@ -545,36 +333,18 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP case WM_SETFOCUS: //if (iScreenMode == 0) { -#if !defined( JA2 ) && !defined( UTIL ) - if(!VideoInspectorIsEnabled()) - { - RestoreVideoManager(); - } - gfApplicationActive=TRUE; -// RestrictMouseToXYXY(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); -#else RestoreCursorClipRect( ); -#endif } break; case WM_KILLFOCUS: if (iScreenMode == 0) { -#if !defined( JA2 ) && !defined( UTIL ) - if(!VideoInspectorIsEnabled()) - { - SuspendVideoManager(); - } - gfApplicationActive=FALSE; - FreeMouseCursor( FALSE ); -#endif // Set a flag to restore surfaces once a WM_ACTIVEATEAPP is received fRestore = TRUE; } break; -#if defined( JA2 ) case WM_DEVICECHANGE: { //DEV_BROADCAST_HDR *pHeader = (DEV_BROADCAST_HDR *)lParam; @@ -593,7 +363,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP //} } break; -#endif case WM_SYSKEYUP: case WM_KEYUP: @@ -622,15 +391,6 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP if (wParam == '\\' && lParam && KF_ALTDOWN) { -#if USE_CONSOLE - g_Console.Create(ghWindow); - cout << "LUA console ready" << endl; - cout << "> "; - - // Reset the pressed keys - gfKeyState[ ALT ] = FALSE; - gfKeyState[ 219 ] = FALSE; // "\" -#endif } } } @@ -668,9 +428,6 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow) InitializeRegistryKeys( "Wizardry8", "Wizardry8key" ); // For rendering DLLs etc. -#ifndef JA2 - AddSubdirectoryToPath("DLL"); -#endif // Second, read in settings GetRuntimeSettings( ); @@ -691,17 +448,6 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow) return FALSE; } -#ifdef JA2 - FastDebugMsg("Initializing Mutex Manager"); - // Initialize the Dirty Rectangle Manager - if (InitializeMutexManager() == FALSE) - { - // We were unable to initialize the game - FastDebugMsg("FAILED : Initializing Mutex Manager"); - return FALSE; - } -#endif - FastDebugMsg("Initializing File Manager"); // Initialize the File Manager if (InitializeFileManager(NULL) == FALSE) @@ -844,9 +590,7 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow) Loc::ImportStrings(); } -//#ifdef JA2 InitJA2SplashScreen(); -//#endif // Make sure we start up our local clock (in milliseconds) // We don't need to check for a return value here since so far its always TRUE @@ -872,14 +616,12 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow) FastDebugMsg("Initializing Sound Manager"); // Initialize the Sound Manager (DirectSound) -#ifndef UTIL if (InitializeSoundManager() == FALSE) { // We were unable to initialize the sound manager FastDebugMsg("FAILED : Initializing Sound Manager"); return FALSE; } -#endif FastDebugMsg("Initializing Game Manager"); // Initialize the Game @@ -920,22 +662,6 @@ void CreateStandardGamingPlatform(HWND hWindow) void ShutdownStandardGamingPlatform(void) { -#ifndef JA2 - static BOOLEAN Reenter = FALSE; - - // - // Prevent multiple reentry into this function - // - - if (Reenter == FALSE) - { - Reenter = TRUE; - } - else - { - return; - } -#endif // // Shut down the different components of the SGP @@ -954,9 +680,7 @@ void ShutdownStandardGamingPlatform(void) ShutdownButtonSystem(); MSYS_Shutdown(); -#ifndef UTIL ShutdownSoundManager(); -#endif DestroyEnglishTransTable( ); // has to go before ShutdownFontManager() ShutdownFontManager(); @@ -974,9 +698,6 @@ void ShutdownStandardGamingPlatform(void) ShutdownInputManager(); ShutdownContainers(); ShutdownFileManager(); -#ifdef JA2 - ShutdownMutexManager(); -#endif #ifdef EXTREME_MEMORY_DEBUGGING DumpMemoryInfoIntoFile( "ExtremeMemoryDump.txt", FALSE ); @@ -1179,33 +900,17 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC ghInstance = hInstance; // Copy commandline! -#ifdef JA2 strncpy( gzCommandLine, pCommandLine, 100); gzCommandLine[99]='\0'; //Process the command line BEFORE initialization ProcessJa2CommandLineBeforeInitialization( pCommandLine ); -#else - ProcessCommandLine(pCommandLine); -#endif - // Mem Usage - giStartMem = MemGetFree( ) / 1024; - - -#ifdef JA2 // Handle Check for CD if ( !HandleJA2CDCheck( ) ) { return( 0 ); } -#else - - if(!RunSetup()) - { - return(0); - } -#endif // ShowCursor(FALSE); @@ -1240,7 +945,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC } #endif -#ifdef JA2 # ifdef ENGLISH try { @@ -1248,7 +952,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC } HANDLE_FATAL_ERROR; # endif -#endif gfApplicationActive = TRUE; gfProgramIsRunning = TRUE; @@ -1303,30 +1006,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC SHOWEXCEPTION(ex); } -#if 0 - else - { - // Windows hasn't processed any messages, therefore we handle the rest -#ifdef LUACONSOLE - PollConsole( ); -#endif - - if (gfApplicationActive == FALSE) - { - // Well we got nothing to do but to wait for a message to activate - WaitMessage(); - } - else - { - // Well, the game is active, so we handle the game stuff - GameLoop(); - - // After this frame, reset input given flag - gfSGPInputReceived = FALSE; - } - } - } -#endif // This is the normal exit point @@ -1354,19 +1033,6 @@ void SGPExit(void) gfProgramIsRunning = FALSE; // Wizardry only -#if !defined( JA2 ) && !defined( UTIL ) - if (gfGameInitialized) - { - // ARM: if in DEBUG mode & we've ShutdownWithErrorBox, don't unload screens and release data structs to permit easier debugging -#ifdef _DEBUG - if (gfIgnoreMessages) - { - fUnloadScreens = FALSE; - } -#endif - GameloopExit(fUnloadScreens); - } -#endif ShutdownStandardGamingPlatform(); // ShowCursor(TRUE); @@ -1375,15 +1041,15 @@ void SGPExit(void) MessageBox(NULL, gzErrorMsg, "Error", MB_OK | MB_ICONERROR ); } -#ifndef JA2 - VideoDumpMemoryLeaks(); -#endif } void GetRuntimeSettings( ) { int iMaximize; + + /* Detect cnc-ddraw and disable windowed mode */ + BOOL bCncDdraw = GetProcAddress(GetModuleHandleW(L"ddraw.dll"), "GameHandlesClose") != NULL; #ifndef USE_VFS CHAR8 zMaximize[ 50 ]; @@ -1415,7 +1081,7 @@ void GetRuntimeSettings( ) } if (GetPrivateProfileString( "Ja2 Settings","SCREEN_MODE_WINDOWED", "", zWindowedMode, 50, INIFile )) { - iWindowedMode = atoi(zWindowedMode); + iWindowedMode = bCncDdraw ? 0 : atoi(zWindowedMode); } #else vfs::String loc = oProps.getStringProperty("Ja2 Settings", L"LOCALE"); @@ -1430,7 +1096,7 @@ void GetRuntimeSettings( ) //iMaximize = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_MODE_WINDOWED_MAXIMIZE", -1); iMaximize = 1; - iWindowedMode = (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_MODE_WINDOWED", -1); + iWindowedMode = bCncDdraw ? 0 : (int)oProps.getIntProperty(L"Ja2 Settings", L"SCREEN_MODE_WINDOWED", -1); vfs::Settings::setUseUnicode( !oProps.getBoolProperty(L"Ja2 Settings", L"VFS_NO_UNICODE", false) ); @@ -1658,11 +1324,13 @@ void GetRuntimeSettings( ) /* Sergeant_Kolja. 2007-02-20: runtime Windowed mode instead of compile-time */ /* 1 for Windowed, 0 for Fullscreen */ if( !bScreenModeCmdLine ) - iScreenMode = (int) GetPrivateProfileInt( "Ja2 Settings","SCREEN_MODE_WINDOWED", iScreenMode, INIFile ); + iScreenMode = bCncDdraw ? 0 : (int) GetPrivateProfileInt( "Ja2 Settings","SCREEN_MODE_WINDOWED", iScreenMode, INIFile ); // WANNE: Should we play the intro? iPlayIntro = (int) GetPrivateProfileInt( "Ja2 Settings","PLAY_INTRO", iPlayIntro, INIFile ); iUseWinFonts = (int) GetPrivateProfileInt( "Ja2 Settings","USE_WINFONTS", iUseWinFonts, INIFile,); + fTooltipScaleFactor = ((int)GetPrivateProfileInt("Ja2 Settings", "TOOLTIP_SCALE_FACTOR", 100, INIFile, )) / 100; + if (fTooltipScaleFactor < 1) fTooltipScaleFactor = 1; // haydent: mouse scrolling iDisableMouseScrolling = (int) GetPrivateProfileInt( "Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling, INIFile ); @@ -1698,13 +1366,15 @@ void GetRuntimeSettings( ) /* 1 for Windowed, 0 for Fullscreen */ if( !bScreenModeCmdLine ) { - iScreenMode = (int)oProps.getIntProperty("Ja2 Settings","SCREEN_MODE_WINDOWED", iScreenMode); + iScreenMode = bCncDdraw ? 0 : (int)oProps.getIntProperty("Ja2 Settings","SCREEN_MODE_WINDOWED", iScreenMode); } // WANNE: Should we play the intro? iPlayIntro = (int)oProps.getIntProperty("Ja2 Settings","PLAY_INTRO", iPlayIntro); iUseWinFonts= (int)oProps.getIntProperty("Ja2 Settings","USE_WINFONTS", iUseWinFonts); + fTooltipScaleFactor = ((float)oProps.getFloatProperty("Ja2 Settings", "TOOLTIP_SCALE_FACTOR", 100)) / 100; + if (fTooltipScaleFactor < 1) fTooltipScaleFactor = 1; // haydent: mouse scrolling iDisableMouseScrolling = (int)oProps.getIntProperty("Ja2 Settings","DISABLE_MOUSE_SCROLLING", iDisableMouseScrolling); @@ -1747,81 +1417,6 @@ void ShutdownWithErrorBox(CHAR8 *pcMessage) exit(0); } -#if !defined(JA2) && !defined(UTILS) - -void ProcessCommandLine(CHAR8 *pCommandLine) -{ - CHAR8 cSeparators[] = "\t ="; - CHAR8 *pCopy=NULL, *pToken; - - pCopy = (CHAR8 *)MemAlloc(strlen(pCommandLine) + 1); - - Assert(pCopy); - if(!pCopy) - { - return; - } - memcpy(pCopy, pCommandLine, strlen(pCommandLine)+1); - - pToken=strtok(pCopy, cSeparators); - while(pToken) - { - if(!_strnicmp(pToken, "/NOSOUND", 8)) - { - SoundEnableSound(FALSE); - } - else if(!_strnicmp(pToken, "/INSPECTOR", 10)) - { - VideoInspectorEnable(); - } - else if(!_strnicmp(pToken, "/VIDEOCFG", 9)) - { - pToken=strtok(NULL, cSeparators); - VideoSetConfigFile(pToken); - } - else if(!_strnicmp(pToken, "/LOAD", 5)) - { - gfLoadAtStartup=TRUE; - } - else if(!_strnicmp(pToken, "/WINDOW", 7)) - { - VideoFullScreen(FALSE); - } - else if(!_strnicmp(pToken, "/BC", 7)) - { - gfUsingBoundsChecker = TRUE; - } - else if(!_strnicmp(pToken, "/CAPTURE", 7)) - { - gfCapturingVideo = TRUE; - } - else if(!_strnicmp(pToken, "/NOOCT", 6)) - { - NoOct(); - } - else if(!_strnicmp(pToken, "/STRINGDATA", 11)) - { - pToken=strtok(NULL, cSeparators); - gzStringDataOverride = (CHAR8 *)MemAlloc(strlen(pToken) + 1); - strcpy(gzStringDataOverride, pToken); - } - - pToken=strtok(NULL, cSeparators); - } - - MemFree(pCopy); -} - -BOOLEAN RunSetup(void) -{ - if(!FileExists(VideoGetConfigFile())) - { - _spawnl(_P_WAIT, "3DSetup.EXE", "3DSetup.EXE", VideoGetConfigFile(), NULL); - } - return(FileExists(VideoGetConfigFile())); -} - -#endif diff --git a/Standard Gaming Platform/sgp.h b/Standard Gaming Platform/sgp.h index b535ec64..c97f4b55 100644 --- a/Standard Gaming Platform/sgp.h +++ b/Standard Gaming Platform/sgp.h @@ -6,46 +6,18 @@ #include "timer.h" #include "debug.h" -#if defined( JA2 ) || defined( UTIL ) #include "video.h" -#else -#include "video2.h" -#endif -#ifndef JA2 -#include "input.h" -#include "memman.h" -#include "fileman.h" -#include "dbman.h" -#include "soundman.h" -#include "pcx.h" -#include "line.h" -#include "gameloop.h" -#include "font.h" -#include "english.h" -#include "Mutex Manager.h" -#include "vobject.h" -#include "Random.h" -#include "shading.h" -#endif #ifdef __cplusplus extern "C" { #endif extern BOOLEAN gfProgramIsRunning; // Turn this to FALSE to exit program -extern UINT32 giStartMem; extern CHAR8 gzCommandLine[100]; // Command line given extern UINT8 gbPixelDepth; // GLOBAL RUN-TIME SETTINGS extern BOOLEAN gfDontUseDDBlits; // GLOBAL FOR USE OF DD BLITTING -#if !defined(JA2) && !defined(UTILS) -extern BOOLEAN gfLoadAtStartup; -extern CHAR8 *gzStringDataOverride; -extern BOOLEAN gfUsingBoundsChecker; -extern BOOLEAN gfCapturingVideo; - -#endif // function prototypes void SGPExit(void); diff --git a/Standard Gaming Platform/sgp_auto_memory.h b/Standard Gaming Platform/sgp_auto_memory.h index 08c63495..461bed00 100644 --- a/Standard Gaming Platform/sgp_auto_memory.h +++ b/Standard Gaming Platform/sgp_auto_memory.h @@ -84,7 +84,6 @@ namespace sgp } // namespace sgp -#ifdef JA2 #include "MemMan.h" @@ -108,6 +107,5 @@ namespace sgp }; } -#endif #endif // _SGP_AUTO_MEMORY_H_ diff --git a/Standard Gaming Platform/shading.cpp b/Standard Gaming Platform/shading.cpp index dc505f4d..32155139 100644 --- a/Standard Gaming Platform/shading.cpp +++ b/Standard Gaming Platform/shading.cpp @@ -1,21 +1,11 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "DirectDraw Calls.h" #include #include "debug.h" - #if defined( JA2 ) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif #include "himage.h" #include "vobject.h" #include "vobject_blitters.h" #include "shading.h" -#endif BOOLEAN ShadesCalculateTables(SGPPaletteEntry *p8BPPPalette); BOOLEAN ShadesCalculatePalette(SGPPaletteEntry *pSrcPalette, SGPPaletteEntry *pDestPalette, UINT16 usRed, UINT16 usGreen, UINT16 usBlue, BOOLEAN fMono); @@ -242,29 +232,6 @@ void BuildIntensityTable(void) -#if 0 - - UINT32 lumin; - UINT32 rmod, gmod, bmod; - - for(red=0; red < 256; red+=4) - for(green=0; green < 256; green+=4) - for(blue=0; blue < 256; blue+=4) - { - index=Get16BPPColor(FROMRGB(red, green, blue)); - - lumin=( red*299/1000)+ ( green*587/1000 ) + ( blue*114/1000 ); - - //lumin = __min(lumin, 255); - rmod=(255*lumin)/256; - gmod=(100*lumin)/256; - bmod=(100*lumin)/256; - - //rmod = __m( 255, rmod ); - - IntensityTable[index]=Get16BPPColor( FROMRGB( rmod, gmod , bmod ) ); - } -#endif @@ -287,7 +254,6 @@ void SetShadeTablePercent( FLOAT uiShadePercent ) } -#ifdef JA2 // Jul. 23 '97 - ALEX - because Wizardry isn't using it & no longer has a version of Set8BPPPalette() available void Init8BitTables(void) { SGPPaletteEntry Pal[256]; @@ -314,4 +280,4 @@ BOOLEAN Set8BitModePalette(SGPPaletteEntry *pPal) Set8BPPPalette(pPal); return(TRUE); } -#endif + diff --git a/Standard Gaming Platform/shading.h b/Standard Gaming Platform/shading.h index f028520b..4ffb3227 100644 --- a/Standard Gaming Platform/shading.h +++ b/Standard Gaming Platform/shading.h @@ -16,10 +16,8 @@ void BuildShadeTable(void); void BuildIntensityTable(void); void SetShadeTablePercent( FLOAT uiShadePercent ); -#ifdef JA2 // Jul. 23 '97 - ALEX - because Wizardry isn't using it & no longer has a version of Set8BPPPalette() available void Init8BitTables(void); BOOLEAN Set8BitModePalette(SGPPaletteEntry *pPal); -#endif extern SGPPaletteEntry Shaded8BPPPalettes[HVOBJECT_SHADE_TABLES+3][256]; extern UINT8 ubColorTables[HVOBJECT_SHADE_TABLES+3][256]; diff --git a/Standard Gaming Platform/soundman.cpp b/Standard Gaming Platform/soundman.cpp index 37216332..22077f74 100644 --- a/Standard Gaming Platform/soundman.cpp +++ b/Standard Gaming Platform/soundman.cpp @@ -6,11 +6,6 @@ * Derek Beland, May 28, 1997 * *********************************************************************************/ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "builddefines.h" #include #include @@ -29,7 +24,6 @@ //#include "input.h" #include #include -#endif // Uncomment this to disable the startup of sound hardware //#define SOUND_DISABLE @@ -1858,16 +1852,6 @@ UINT32 uiCount; return(FALSE); } -// Lesh modifications -// Sound debug -static struct SoundLog { - sgp::Logger_ID id; - SoundLog() { - id = sgp::Logger::instance().createLogger(); - sgp::Logger::instance().connectFile(id, SndDebugFileName, true, sgp::Logger::FLUSH_ON_DELETE); - } -} s_SoundLog; - //***************************************************************************************** // SoundLog // Writes string into log file @@ -1878,6 +1862,13 @@ static struct SoundLog { //***************************************************************************************** void SoundLog(CHAR8 *strMessage) { + static struct SoundLog { + sgp::Logger_ID id; + SoundLog() { + id = sgp::Logger::instance().createLogger(); + sgp::Logger::instance().connectFile(id, SndDebugFileName, true, sgp::Logger::FLUSH_ON_DELETE); + } + } s_SoundLog; #ifndef USE_VFS if ((SndDebug = fopen(SndDebugFileName, "a+t")) != NULL) { diff --git a/Standard Gaming Platform/stringicmp.cpp b/Standard Gaming Platform/stringicmp.cpp index b354b579..b1881ed4 100644 --- a/Standard Gaming Platform/stringicmp.cpp +++ b/Standard Gaming Platform/stringicmp.cpp @@ -11,20 +11,6 @@ bool TStringiLess::operator() (std::string const& s1, std::string const& s2) con // An MSVC compliance issue... //using std::toupper; -#if 0 - std::string::const_iterator p1 = s1.begin(); - std::string::const_iterator p2 = s2.begin(); - - while (p1 != s1.end() && p2 != s2.end() && toupper(*p1) == toupper(*p2)) { - ++p1; - ++p2; - } - - if (p1 == s1.end()) return p2 != s2.end(); - if (p2 == s2.end()) return false; - - return toupper(*p1) < toupper(*p2); -#else const char *p1 = s1.c_str(); const char *p2 = s2.c_str(); @@ -37,5 +23,4 @@ bool TStringiLess::operator() (std::string const& s1, std::string const& s2) con if (!*p2) return false; return toupper(*p1) < toupper(*p2); -#endif } diff --git a/Standard Gaming Platform/timer.cpp b/Standard Gaming Platform/timer.cpp index b1fb0250..4ea4ba95 100644 --- a/Standard Gaming Platform/timer.cpp +++ b/Standard Gaming Platform/timer.cpp @@ -1,17 +1,7 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "types.h" #include - #if defined( JA2 ) || defined( UTIL ) #include "video.h" - #else - #include "video2.h" - #endif #include "timer.h" -#endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN diff --git a/Standard Gaming Platform/trle.h b/Standard Gaming Platform/trle.h deleted file mode 100644 index aebb607c..00000000 --- a/Standard Gaming Platform/trle.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __TRLE_H -#define __TRLE_H - - -typedef struct -{ - UINT32 uiOffset; - UINT32 uiWidth; - UINT32 uiOffLen; - INT16 sOffsetX; - INT16 sOffsetY; - -} TRLEObject; - - -typedef struct -{ - UINT32 uiHeightEach; - UINT32 uiTotalElements; - TRLEObject *pTRLEObject; - PTR pPixData; - UINT32 uiSizePixDataElem; - -} TRLEData; - - -BOOLEAN GetTRLEObjectData( UINT32 uiTotalElements, TRLEObject *pTRLEObject, INT16 ssIndex, UINT32 *pWidth, UINT32 *pOffset, UINT32 *pOffLen, UINT16 *pOffsetX, UINT16 *pOffsetY ); - -BOOLEAN SetTRLEObjectOffset( UINT32 uiTotalElements, TRLEObject *pTRLEObject, INT16 ssIndex, INT16 sOffsetX, INT16 sOffsetY ); - -#endif \ No newline at end of file diff --git a/Standard Gaming Platform/video.cpp b/Standard Gaming Platform/video.cpp index fd623560..0432e512 100644 --- a/Standard Gaming Platform/video.cpp +++ b/Standard Gaming Platform/video.cpp @@ -1,8 +1,3 @@ -#ifdef JA2_PRECOMPILED_HEADERS -#include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) -#include "WIZ8 SGP ALL.H" -#else #include "types.h" #include "Video.h" #include "vobject_blitters.h" @@ -18,7 +13,6 @@ #include "Input.h" #include "GameSettings.h" #include "sgp_logger.h" -#endif #include "resource.h" #include @@ -620,24 +614,6 @@ BOOLEAN InitializeVideoManager(HINSTANCE hInstance, UINT16 usCommandShow, void * } } - // - // Initialize the mutex sections - // - - // ATE: Keep these mutexes for now! - if (InitializeMutex(REFRESH_THREAD_MUTEX, (UINT8 *)"RefreshThreadMutex") == FALSE) - { - return FALSE; - } - if (InitializeMutex(FRAME_BUFFER_MUTEX, (UINT8 *)"FrameBufferMutex") == FALSE) - { - return FALSE; - } - if (InitializeMutex(MOUSE_BUFFER_MUTEX, (UINT8 *)"MouseBufferMutex") == FALSE) - { - return FALSE; - } - // // Initialize state variables // @@ -1517,13 +1493,6 @@ void ScrollJA2Background(UINT32 uiDirection, INT16 sScrollXIncrement, INT16 sScr #endif -#if 0 - StripRegions[ 0 ].left = gsVIEWPORT_START_X ; - StripRegions[ 0 ].right = gsVIEWPORT_END_X ; - StripRegions[ 0 ].top = gsVIEWPORT_WINDOW_START_Y ; - StripRegions[ 0 ].bottom = gsVIEWPORT_WINDOW_END_Y ; - usNumStrips = 1; -#endif for ( cnt = 0; cnt < usNumStrips; cnt++ ) { @@ -1620,28 +1589,6 @@ void ScrollJA2Background(UINT32 uiDirection, INT16 sScrollXIncrement, INT16 sScr ExecuteVideoOverlaysToAlternateBuffer( BACKBUFFER ); -#if 0 - - // Erase mouse from old position - if (gMouseCursorBackground[ uiCurrentMouseBackbuffer ].fRestore == TRUE ) - { - - do - { - ReturnCode = IDirectDrawSurface2_SGPBltFast(gpBackBuffer, usMouseXPos, usMouseYPos, gMouseCursorBackground[uiCurrentMouseBackbuffer].pSurface, (LPRECT)&MouseRegion, DDBLTFAST_NOCOLORKEY); - if ((ReturnCode != DD_OK)&&(ReturnCode != DDERR_WASSTILLDRAWING)) - { - DirectXAttempt ( ReturnCode, __LINE__, __FILE__ ); - - if (ReturnCode == DDERR_SURFACELOST || (IS_ERROR(ReturnCode) && ++iDXLoopCount > iMaxDXLoopCount)) - { - - } - } - } while (ReturnCode != DD_OK); - } - -#endif } @@ -1810,14 +1757,6 @@ void RefreshScreen(void *DummyVariable) // Either Method (1) or (2) // { -#if 0 - if ( gfRenderScroll ) - { - ScrollJA2Background( guiScrollDirection, gsScrollXIncrement, gsScrollYIncrement, gpPrimarySurface, gpBackBuffer, TRUE, PREVIOUS_MOUSE_DATA ); - // ScrollJA2Background( guiScrollDirection, gsScrollXIncrement, gsScrollYIncrement, gpBackBuffer, gpBackBuffer, TRUE, PREVIOUS_MOUSE_DATA ); - gfForceFullScreenRefresh = TRUE; - } -#endif if (gfForceFullScreenRefresh == TRUE) { // diff --git a/Standard Gaming Platform/video.h b/Standard Gaming Platform/video.h index a0dd64d8..02527b3a 100644 --- a/Standard Gaming Platform/video.h +++ b/Standard Gaming Platform/video.h @@ -10,7 +10,6 @@ #include "Types.h" #include "DirectDraw Calls.h" #include "VSurface.h" -#include "Mutex Manager.h" #define BUFFER_READY 0x00 #define BUFFER_BUSY 0x01 diff --git a/Standard Gaming Platform/video_private.h b/Standard Gaming Platform/video_private.h deleted file mode 100644 index c2db612e..00000000 --- a/Standard Gaming Platform/video_private.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __VIDEO_PRIVATE_ -#define __VIDEO_PRIVATE_ - -// *********************************************************************** -// -// PRIVATE, INTERNAL Header used by other SGP Internal modules -// -// Allows direct access to underlying Direct Draw Implementation -// -// *********************************************************************** - - -LPDIRECTDRAW2 GetDirectDraw2Object( ); -LPDIRECTDRAWSURFACE2 GetPrimarySurfaceInterface( ); -LPDIRECTDRAWSURFACE2 GetBackbufferInterface( ); - -BOOLEAN SetDirectDraw2Object( LPDIRECTDRAW2 pDirectDraw ); -BOOLEAN SetPrimarySurfaceInterface( LPDIRECTDRAWSURFACE2 pSurface ); -BOOLEAN SetBackbufferInterface( LPDIRECTDRAWSURFACE2 pSurface ); - -#endif diff --git a/Standard Gaming Platform/vobject.cpp b/Standard Gaming Platform/vobject.cpp index baf76e85..d8ade50c 100644 --- a/Standard Gaming Platform/vobject.cpp +++ b/Standard Gaming Platform/vobject.cpp @@ -1,22 +1,12 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else - #include "DirectDraw Calls.h" - #include - #include "debug.h" - #if defined( JA2 ) || defined( UTIL ) - #include "video.h" - #else - #include "video2.h" - #endif - #include "himage.h" - #include "vobject.h" - #include "wcheck.h" - #include "vobject_blitters.h" - #include "sgp.h" -#endif +#include "DirectDraw Calls.h" +#include +#include "debug.h" +#include "video.h" +#include "himage.h" +#include "vobject.h" +#include "wcheck.h" +#include "vobject_blitters.h" +#include "sgp.h" #include @@ -599,6 +589,7 @@ HVOBJECT CreateVideoObject( VOBJECT_DESC *VObjectDesc ) hVObject->usNumberOf16BPPObjects = 1; hVObject->ubBitDepth = hImage->ubBitDepth; + strncpy(hVObject->ImageFile, hImage->ImageFile, SGPFILENAME_LEN); if ( VObjectDesc->fCreateFlags & VOBJECT_CREATE_FROMFILE ) { @@ -637,6 +628,7 @@ HVOBJECT CreateVideoObject( VOBJECT_DESC *VObjectDesc ) hVObject->usNumberOf16BPPObjects = 1; hVObject->ubBitDepth = hImage->ubBitDepth; + strncpy(hVObject->ImageFile, hImage->ImageFile, SGPFILENAME_LEN); if ( VObjectDesc->fCreateFlags & VOBJECT_CREATE_FROMFILE ) { @@ -666,6 +658,7 @@ HVOBJECT CreateVideoObject( VOBJECT_DESC *VObjectDesc ) hVObject->pETRLEObject = TempETRLEData.pETRLEObject; hVObject->pPixData = TempETRLEData.pPixData; hVObject->uiSizePixData = TempETRLEData.uiSizePixData; + strncpy(hVObject->ImageFile, hImage->ImageFile, SGPFILENAME_LEN); // Set palette from himage if ( hImage->ubBitDepth == 8 ) @@ -907,9 +900,10 @@ UINT32 count; // // ******************************************************************* -// High level blit function encapsolates ALL effects and BPP +// High level blit function encapsulates ALL effects and BPP BOOLEAN BltVideoObjectToBuffer( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJECT hSrcVObject, UINT16 usIndex, INT32 iDestX, INT32 iDestY, INT32 fBltFlags, blt_fx *pBltFx ) { + CHAR8 errorText[512]; // Sometimes an exception is thrown in that method. //BF __try { @@ -930,24 +924,18 @@ BOOLEAN BltVideoObjectToBuffer( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJE switch( hSrcVObject->ubBitDepth ) { case 32: - SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, L"index larger that number images"); + sprintf(errorText, "Video object index is larger than the number of images. Filename: %s", hSrcVObject->ImageFile); + SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, errorText); image = &hSrcVObject->p16BPPObject[usIndex]; -#if 0 - Blt16BPPTo16BPPTrans( pBuffer, uiDestPitchBYTES, - image->p16BPPData, image->usWidth * sizeof(UINT16), - iDestX, iDestY, - 0, 0, image->usWidth, image->usHeight, - 0 ); -#else Blt32BPPTo16BPPTrans( pBuffer, uiDestPitchBYTES, (UINT32*)image->p16BPPData, image->usWidth * sizeof(UINT32), iDestX, iDestY, 0, 0, image->usWidth, image->usHeight); -#endif break; case 16: - SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, L"index larger that number images"); + sprintf(errorText, "Video object index is larger than the number of images. Filename: %s", hSrcVObject->ImageFile); + SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, errorText); image = &hSrcVObject->p16BPPObject[usIndex]; if ( fBltFlags & VO_BLT_SRCTRANSPARENCY ) { @@ -967,24 +955,13 @@ BOOLEAN BltVideoObjectToBuffer( UINT16 *pBuffer, UINT32 uiDestPitchBYTES, HVOBJE break; case 8: - - SGP_THROW_IFFALSE( hSrcVObject->usNumberOfObjects > usIndex, L"Video object index is larger than the number of subimages"); + sprintf(errorText, "Video object index is larger than the number of sub images. Filename: %s", hSrcVObject->ImageFile); + SGP_THROW_IFFALSE( hSrcVObject->usNumberOfObjects > usIndex, errorText); // Switch based on flags given do { if(gbPixelDepth==16) { -#ifndef JA2 - if ( fBltFlags & VO_BLT_MIRROR_Y) - { - if(!BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect)) - Blt8BPPDataTo16BPPBufferTransMirror( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex ); -// CLipping version not done -- DB -// Blt8BPPDataTo16BPPBufferTransMirrorClip( pBuffer, uiDestPitchBYTES, hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect); - break; - } - else -#endif if ( fBltFlags & VO_BLT_SRCTRANSPARENCY ) { if(BltIsClipped(hSrcVObject, iDestX, iDestY, usIndex, &ClippingRect)) @@ -1590,9 +1567,10 @@ BOOLEAN BltVideoObjectOutline(UINT32 uiDestVSurface, HVOBJECT hSrcVObject, UINT1 BOOLEAN BltVideoObjectOutlineShadowFromIndex(UINT32 uiDestVSurface, UINT32 uiSrcVObject, UINT16 usIndex, INT32 iDestX, INT32 iDestY ) { - UINT16 *pBuffer; - UINT32 uiPitch; - HVOBJECT hSrcVObject; + CHAR8 errorText[512]; + UINT16 *pBuffer; + UINT32 uiPitch; + HVOBJECT hSrcVObject; // Lock video surface pBuffer = (UINT16*)LockVideoSurface( uiDestVSurface, &uiPitch ); @@ -1621,14 +1599,16 @@ BOOLEAN BltVideoObjectOutlineShadowFromIndex(UINT32 uiDestVSurface, UINT32 uiSrc } else if(hSrcVObject->ubBitDepth == 16) { - SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, L"index larger that number images"); + sprintf(errorText, "Video object index is larger than the number of images. Filename: %s", hSrcVObject->ImageFile); + SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, errorText); SixteenBPPObjectInfo &image = hSrcVObject->p16BPPObject[0]; Blt16BPPTo16BPPTransShadow(pBuffer, uiPitch, image.p16BPPData, image.usWidth * sizeof(UINT16), iDestX, iDestY, 0, 0, image.usWidth, image.usHeight, 0x1F); } else if(hSrcVObject->ubBitDepth == 32) { - SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, L"index larger that number images"); + sprintf(errorText, "Video object index is larger than the number of images. Filename: %s", hSrcVObject->ImageFile); + SGP_THROW_IFFALSE(usIndex < hSrcVObject->usNumberOf16BPPObjects, errorText); SixteenBPPObjectInfo &image = hSrcVObject->p16BPPObject[0]; Blt32BPPTo16BPPTransShadow(pBuffer, uiPitch, (UINT32*)image.p16BPPData, image.usWidth * sizeof(UINT32), iDestX, iDestY, 0, 0, image.usWidth, image.usHeight); diff --git a/Standard Gaming Platform/vobject.h b/Standard Gaming Platform/vobject.h index 98e1ca20..0cdd5553 100644 --- a/Standard Gaming Platform/vobject.h +++ b/Standard Gaming Platform/vobject.h @@ -84,30 +84,26 @@ typedef struct // The video object contains different data based on it's type, compressed or not typedef struct TAG_HVOBJECT { - UINT32 fFlags; // Special flags - UINT32 uiSizePixData; // ETRLE data size - SGPPaletteEntry *pPaletteEntry; // 8BPP Palette - COLORVAL TransparentColor; // Defaults to 0,0,0 - UINT16 *p16BPPPalette; // A 16BPP palette used for 8->16 blits + UINT32 fFlags; // Special flags + UINT32 uiSizePixData; // ETRLE data size + SGPPaletteEntry *pPaletteEntry; // 8BPP Palette + COLORVAL TransparentColor; // Defaults to 0,0,0 + UINT16 *p16BPPPalette; // A 16BPP palette used for 8->16 blits - PTR pPixData; // ETRLE pixel data - ETRLEObject *pETRLEObject; // Object offset data etc + PTR pPixData; // ETRLE pixel data + ETRLEObject *pETRLEObject; // Object offset data etc SixteenBPPObjectInfo *p16BPPObject; - UINT16 *pShades[HVOBJECT_SHADE_TABLES]; // Shading tables - UINT16 *pShadeCurrent; - UINT16 *pGlow; // glow highlight table - UINT8 *pShade8; // 8-bit shading index table - UINT8 *pGlow8; // 8-bit glow table - ZStripInfo **ppZStripInfo; // Z-value strip info arrays - - UINT16 usNumberOf16BPPObjects; - UINT16 usNumberOfObjects; // Total number of objects - UINT8 ubBitDepth; // BPP - - // Reserved for added room and 32-byte boundaries - BYTE bReserved[ 1 ]; - + UINT16 *pShades[HVOBJECT_SHADE_TABLES]; // Shading tables + UINT16 *pShadeCurrent; + UINT16 *pGlow; // glow highlight table + UINT8 *pShade8; // 8-bit shading index table + UINT8 *pGlow8; // 8-bit glow table + ZStripInfo **ppZStripInfo; // Z-value strip info arrays + UINT16 usNumberOf16BPPObjects; + UINT16 usNumberOfObjects; // Total number of objects + UINT8 ubBitDepth; // BPP + SGPFILENAME ImageFile; } SGPVObject, *HVOBJECT; diff --git a/Standard Gaming Platform/vobject_blitters.cpp b/Standard Gaming Platform/vobject_blitters.cpp index 7e317eb5..999aa63e 100644 --- a/Standard Gaming Platform/vobject_blitters.cpp +++ b/Standard Gaming Platform/vobject_blitters.cpp @@ -1,16 +1,7 @@ -#ifdef JA2_PRECOMPILED_HEADERS - #include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) - #include "WIZ8 SGP ALL.H" -#else #include "DirectDraw Calls.h" #include #include "debug.h" - #if defined( JA2 ) || defined( UTIL ) #include "video.h" // JA2 - #else - #include "video2.h" // Wiz8 - #endif #include "himage.h" #include "vobject.h" #include "wcheck.h" @@ -18,7 +9,6 @@ #include "vobject_blitters.h" #include "shading.h" #include "sgp_logger.h" -#endif #include std::map g_SurfaceRectangle; @@ -234,7 +224,6 @@ BOOLEAN Blt32BPPTo16BPPTransShadow(UINT16 *pDst, UINT32 uiDstPitch, UINT32 *pSrc //alpha = 255; if(alpha > 0) { -#if 1 // the darker shade tmpVal = ShadeTable[*pDstPtr]; @@ -259,9 +248,6 @@ BOOLEAN Blt32BPPTo16BPPTransShadow(UINT16 *pDst, UINT32 uiDstPitch, UINT32 *pSrc newcolor = FROMRGB(red,green,blue); *pDstPtr = Get16BPPColor(newcolor); -#else - *pDstPtr = ShadeTable[*pDstPtr]; -#endif } pSrcPtr++; pDstPtr++; @@ -7268,7 +7254,6 @@ BOOLEAN Blt16BPPTo16BPPTrans(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UI pDestPtr = (UINT16*)((UINT8 *)pDest+(iDestYPos*uiDestPitch)+(iDestXPos*2)); uiLineSkipDest = uiDestPitch - (uiWidth*2); uiLineSkipSrc = uiSrcPitch - (uiWidth*2); -#if 1 do { UINT32 w = uiWidth; @@ -7283,36 +7268,6 @@ BOOLEAN Blt16BPPTo16BPPTrans(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pSrc, UI pDestPtr = (UINT16*)((UINT8*)pDestPtr + uiLineSkipDest); } while (--uiHeight != 0); -#else -__asm { - mov esi, pSrcPtr - mov edi, pDestPtr - mov ebx, uiHeight - mov dx, usTrans - -BlitNewLine: - mov ecx, uiWidth - -Blit2: - mov ax, [esi] - cmp ax, dx - je Blit3 - - mov [edi], ax - -Blit3: - add esi, 2 - add edi, 2 - dec ecx - jnz Blit2 - - add edi, uiLineSkipDest - add esi, uiLineSkipSrc - dec ebx - jnz BlitNewLine - - } -#endif return(TRUE); } @@ -7328,7 +7283,6 @@ BOOLEAN Blt16BPPTo16BPPTransShadow(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pS pDestPtr = (UINT16*)((UINT8 *)pDest + (iDestYPos * uiDestPitch) + (iDestXPos * 2)); uiLineSkipDest = uiDestPitch - (uiWidth * 2); uiLineSkipSrc = uiSrcPitch - (uiWidth * 2); -#if 1 do { UINT32 w = uiWidth; @@ -7346,7 +7300,6 @@ BOOLEAN Blt16BPPTo16BPPTransShadow(UINT16 *pDest, UINT32 uiDestPitch, UINT16 *pS pDestPtr = (UINT16*)((UINT8*)pDestPtr + uiLineSkipDest); } while (--uiHeight != 0); -#endif return TRUE; } @@ -9659,51 +9612,6 @@ BOOLEAN Blt8BPPDataTo16BPPBufferTransShadowZNBAlpha(UINT16 *pBuffer, UINT32 uiDe } -#if 0 - -BlitNTL4: - - // TEST FOR Z FIRST! - mov ax, [ebx] - cmp ax, usZValue - ja BlitNTL8 - - // Write it NOW! - jmp BlitNTL7 - -BlitNTL8: - - test uiLineFlag, 1 - jz BlitNTL6 - - test edi, 2 - jz BlitNTL5 - jmp BlitNTL9 - -BlitNTL6: - test edi, 2 - jnz BlitNTL5 - -BlitNTL7: - - // Write normal z value - mov ax, usZValue - mov [ebx], ax - jmp BlitNTL10 - -BlitNTL9: - - // Write high z - mov ax, 32767 - mov [ebx], ax - -BlitNTL10: - - xor eax, eax - mov al, [esi] - mov ax, [edx+eax*2] - mov [edi], ax -#endif /********************************************************************************************** diff --git a/Standard Gaming Platform/vobject_private.h b/Standard Gaming Platform/vobject_private.h deleted file mode 100644 index e02cb3eb..00000000 --- a/Standard Gaming Platform/vobject_private.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __VOBJECT_PRIVATE_ -#define __VOBJECT_PRIVATE_ - -#endif \ No newline at end of file diff --git a/Standard Gaming Platform/vsurface.cpp b/Standard Gaming Platform/vsurface.cpp index fcb4938c..8636b2c0 100644 --- a/Standard Gaming Platform/vsurface.cpp +++ b/Standard Gaming Platform/vsurface.cpp @@ -1,23 +1,13 @@ -#ifdef JA2_PRECOMPILED_HEADERS -#include "JA2 SGP ALL.H" -#elif defined( WIZ8_PRECOMPILED_HEADERS ) -#include "WIZ8 SGP ALL.H" -#else #include "DirectDraw Calls.h" #include #include #include "debug.h" -#if defined( JA2 ) || defined( UTIL ) #include "video.h" -#else -#include "video2.h" -#endif #include "himage.h" #include "vsurface.h" #include "vsurface_private.h" #include "wcheck.h" #include "vobject_blitters.h" -#endif extern void SetClippingRect(SGPRect *clip); extern void GetClippingRect(SGPRect *clip); @@ -459,7 +449,6 @@ BYTE *LockVideoSurface( UINT32 uiVSurface, UINT32 *puiPitch ) // // Check if given backbuffer or primary buffer // -#ifdef JA2 if ( uiVSurface == PRIMARY_SURFACE ) { return SurfaceData::SetSurfaceData(uiVSurface, (BYTE *)LockPrimarySurface( puiPitch )); @@ -469,7 +458,6 @@ BYTE *LockVideoSurface( UINT32 uiVSurface, UINT32 *puiPitch ) { return SurfaceData::SetSurfaceData(uiVSurface, (BYTE *)LockBackBuffer( puiPitch )); } -#endif if ( uiVSurface == FRAME_BUFFER ) { @@ -515,7 +503,6 @@ void UnLockVideoSurface( UINT32 uiVSurface ) // // Check if given backbuffer or primary buffer // -#ifdef JA2 if ( uiVSurface == PRIMARY_SURFACE ) { UnlockPrimarySurface(); @@ -527,7 +514,6 @@ void UnLockVideoSurface( UINT32 uiVSurface ) UnlockBackBuffer(); return; } -#endif if ( uiVSurface == FRAME_BUFFER ) { @@ -686,7 +672,6 @@ BOOLEAN SetPrimaryVideoSurfaces( ) // // Get Primary surface // -#ifdef JA2 pSurface = GetPrimarySurfaceObject(); CHECKF( pSurface != NULL ); @@ -715,7 +700,6 @@ BOOLEAN SetPrimaryVideoSurfaces( ) CHECKF( ghMouseBuffer != NULL ); SurfaceData::RegisterSurface(MOUSE_BUFFER,ghMouseBuffer); -#endif // // Get frame buffer surface @@ -996,11 +980,9 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc ) UINT8 ubBitDepth; UINT32 fMemUsage; - //#ifdef JA2 UINT32 uiRBitMask; UINT32 uiGBitMask; UINT32 uiBBitMask; - //#endif //Clear the memory memset( &SurfaceDescription, 0, sizeof( DDSURFACEDESC ) ); @@ -1014,11 +996,7 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc ) // // The description structure contains memory usage flag // -#ifdef JA2 fMemUsage = VSurfaceDesc->fCreateFlags; -#else - fMemUsage = VSURFACE_SYSTEM_MEM_USAGE; -#endif // // Check creation options @@ -1116,16 +1094,10 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc ) // We're using pixel formats too -- DB/Wiz - //#ifdef JA2 CHECKF( GetPrimaryRGBDistributionMasks( &uiRBitMask, &uiGBitMask, &uiBBitMask ) ); PixelFormat.dwRBitMask = uiRBitMask; PixelFormat.dwGBitMask = uiGBitMask; PixelFormat.dwBBitMask = uiBBitMask; - //#else - // PixelFormat.dwRBitMask = 0xf800; - // PixelFormat.dwGBitMask = 0x7e0; - // PixelFormat.dwBBitMask = 0x1f; - //#endif break; default: @@ -1398,10 +1370,6 @@ BYTE *LockVideoSurfaceBuffer( HVSURFACE hVSurface, UINT32 *pPitch ) Assert( hVSurface != NULL ); Assert( pPitch != NULL ); -#ifndef JA2 - if(hVSurface==ghFrameBuffer) - return(LockFrameBuffer(pPitch)); -#endif DDLockSurface( (LPDIRECTDRAWSURFACE2)hVSurface->pSurfaceData, NULL, &SurfaceDescription, 0, NULL); @@ -1414,13 +1382,6 @@ void UnLockVideoSurfaceBuffer( HVSURFACE hVSurface ) { Assert( hVSurface != NULL ); -#ifndef JA2 - if(hVSurface==ghFrameBuffer) - { - UnlockFrameBuffer(); - return; - } -#endif DDUnlockSurface( (LPDIRECTDRAWSURFACE2)hVSurface->pSurfaceData, NULL ); @@ -2094,28 +2055,6 @@ BOOLEAN BltVideoSurfaceToVideoSurface( HVSURFACE hDestVSurface, HVSURFACE hSrcVS return(TRUE); } // For testing with non-DDraw blitting, uncomment to test -- DB -#ifndef JA2 - else - { - if((pSrcSurface16=(UINT16 *)LockVideoSurfaceBuffer(hSrcVSurface, &uiSrcPitch))==NULL) - { - DbgMessage(TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Failed on lock of 16BPP surface for blitting" )); - return(FALSE); - } - - if((pDestSurface16=(UINT16 *)LockVideoSurfaceBuffer(hDestVSurface, &uiDestPitch))==NULL) - { - UnLockVideoSurfaceBuffer(hSrcVSurface); - DbgMessage(TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Failed on lock of 16BPP dest surface for blitting" )); - return(FALSE); - } - - Blt16BPPTo16BPP(pDestSurface16, uiDestPitch, pSrcSurface16, uiSrcPitch, iDestX, iDestY, SrcRect.left, SrcRect.top, uiWidth, uiHeight); - UnLockVideoSurfaceBuffer(hSrcVSurface); - UnLockVideoSurfaceBuffer(hDestVSurface); - return(TRUE); - } -#endif CHECKF( BltVSurfaceUsingDD( hDestVSurface, hSrcVSurface, fBltFlags, iDestX, iDestY, &SrcRect ) ); diff --git a/Strategic/AI Viewer.cpp b/Strategic/AI Viewer.cpp index bfbf2db7..3c1945fe 100644 --- a/Strategic/AI Viewer.cpp +++ b/Strategic/AI Viewer.cpp @@ -1,9 +1,5 @@ //Strategic AI Viewer -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "INIReader.h" -#else #include "builddefines.h" #include #include "types.h" @@ -38,7 +34,6 @@ #include "Strategic Status.h" #include "wordwrap.h" #include "Town Militia.h" // added by Flugente -#endif #ifdef JA2BETAVERSION diff --git a/Strategic/ASD.cpp b/Strategic/ASD.cpp index 84c67085..8c23a678 100644 --- a/Strategic/ASD.cpp +++ b/Strategic/ASD.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#else #include #include "ASD.h" #include "strategic.h" @@ -52,7 +49,7 @@ #include "Sound Control.h" #include "renderworld.h" #include "Isometric Utils.h" -#endif +#include "Rebel Command.h" extern BOOLEAN gfTacticalDoHeliRun; @@ -548,9 +545,22 @@ UINT32 ASDResourceCostMoney( UINT8 aType ) return gGameExternalOptions.gASDResource_Cost[aType]; } +INT32 GetStrategicAIResourceCount( UINT8 aType ) +{ + if (aType < 0 || aType >= ASD_RESOURCE_MAX) + return 0; + + return gASDResource[aType]; +} + // add resources to the AIs resource pool void AddStrategicAIResources( UINT8 aType, INT32 aAmount ) { + if (aType == ASD_MONEY) + { + aAmount *= RebelCommand::GetASDIncomeModifier(); + } + gASDResource[aType] = max( 0, gASDResource[aType] + aAmount ); if ( aType == ASD_HELI ) @@ -1500,7 +1510,7 @@ UINT32 ASDResourceCostFuel( UINT8 aType ) // if ASD has tanks, it can allow the queen to upgrade soldiers to tanks BOOLEAN ASDSoldierUpgradeToTank( ) { - if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsTanks ) + if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsTanks && RebelCommand::GetASDCanDeployUnits() ) { if ( gASD_Flags & ASDFACT_TANK_UNLOCKED ) { @@ -1517,7 +1527,7 @@ BOOLEAN ASDSoldierUpgradeToTank( ) BOOLEAN ASDSoldierUpgradeToJeep( ) { - if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsJeeps ) + if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsJeeps && RebelCommand::GetASDCanDeployUnits() ) { if ( gASD_Flags & ASDFACT_JEEP_UNLOCKED ) { @@ -1534,7 +1544,7 @@ BOOLEAN ASDSoldierUpgradeToJeep( ) BOOLEAN ASDSoldierUpgradeToRobot( ) { - if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsRobots ) + if ( gGameExternalOptions.fASDActive && gGameExternalOptions.fASDAssignsRobots && RebelCommand::GetASDCanDeployUnits() ) { if ( gASD_Flags & ASDFACT_ROBOT_UNLOCKED ) { diff --git a/Strategic/ASD.h b/Strategic/ASD.h index 0b786fbe..62cd5b18 100644 --- a/Strategic/ASD.h +++ b/Strategic/ASD.h @@ -56,6 +56,8 @@ void SetASDFlag( UINT32 aFlag ); UINT32 ASDResourceDeliveryTime( UINT8 aType ); UINT32 ASDResourceCostMoney( UINT8 aType ); +INT32 GetStrategicAIResourceCount( UINT8 aType ); + // add resources to the AIs resource pool void AddStrategicAIResources( UINT8 aType, INT32 aAmount ); diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index da5fb2bb..24008090 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Assignments.h" #include "Strategic.h" #include "Items.h" @@ -77,7 +73,6 @@ #include "Strategic AI.h" #include "MiniEvents.h" #include "Rebel Command.h" -#endif #include #include @@ -813,6 +808,11 @@ BOOLEAN BasicCanCharacterAssignment( SOLDIERTYPE * pSoldier, BOOLEAN fNotInComba return( FALSE ); } + if (pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + { + return( FALSE ); + } + return( TRUE ); } @@ -1657,6 +1657,9 @@ BOOLEAN BasicCanCharacterTrainMilitia( SOLDIERTYPE *pSoldier ) // check if sam site if( fSamSitePresent == FALSE ) { + if (RebelCommand::CanTrainMilitiaAnywhere()) + return( TRUE ); + // nope return ( FALSE ); } @@ -1970,6 +1973,9 @@ BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier ) } } + if (RebelCommand::CanTrainMilitiaAnywhere() && GetTownIdForSector(pSoldier->sSectorX, pSoldier->sSectorY) == BLANK_SECTOR) + ubFacilityTrainersAllowed = RebelCommand::GetMaxTrainersForTrainMilitiaAnywhere(); + // Count number of trainers already operating here if ( CountMilitiaTrainersInSoldiersSector( pSoldier, TOWN_MILITIA ) >= ubFacilityTrainersAllowed ) { @@ -2032,6 +2038,9 @@ BOOLEAN DoesSectorMercIsInHaveSufficientLoyaltyToTrainMilitia( SOLDIERTYPE *pSol { return( TRUE ); } + + if (RebelCommand::CanTrainMilitiaAnywhere()) + return(TRUE); return( FALSE ); } @@ -2084,7 +2093,7 @@ BOOLEAN IsMilitiaTrainableFromSoldiersSectorMaxed( SOLDIERTYPE *pSoldier, INT8 i // is there a town really here if( bTownId == BLANK_SECTOR ) { - fSamSitePresent = IsThisSectorASAMSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ); + fSamSitePresent = IsThisSectorASAMSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) || RebelCommand::CanTrainMilitiaAnywhere(); // if there is a sam site here if( fSamSitePresent ) @@ -2490,7 +2499,7 @@ BOOLEAN CanCharacterSleep( SOLDIERTYPE *pSoldier, BOOLEAN fExplainWhyNot ) } // POW? - if( pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) + if( pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) { return( FALSE ); } @@ -2708,7 +2717,7 @@ INT8 CanCharacterSquad( SOLDIERTYPE *pSoldier, INT8 bSquadValue ) return ( CHARACTER_CANT_JOIN_SQUAD ); } - if ( pSoldier->bAssignment == ASSIGNMENT_POW || (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT && pSoldier->ubHoursRemainingOnMiniEvent > 0)) + if ( pSoldier->bAssignment == ASSIGNMENT_POW || (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT && pSoldier->ubHoursRemainingOnMiniEvent > 0) || (pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) ) { // not allowed to be put on a squad return( CHARACTER_CANT_JOIN_SQUAD ); @@ -4872,7 +4881,7 @@ struct RepairItem { item(object), owner(soldier), inventorySlot(slot) {} }; -struct RepairPriority : std::binary_function { +struct RepairPriority { /// Comperator function bool operator() (const RepairItem& firstItem, const RepairItem& secondItem) const { UINT8 priFirst = CalculateItemPriority(firstItem), @@ -5829,7 +5838,7 @@ void FatigueCharacter( SOLDIERTYPE *pSoldier ) } // POW? - if( pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) + if( pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) { return; } @@ -6135,7 +6144,8 @@ void HandleTrainingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) } // check if we're doing a sector where militia can be trained - if( ( (StrategicMap[CALCULATE_STRATEGIC_INDEX(sMapX, sMapY) ].bNameId != BLANK_SECTOR ) || ( fSamSiteInSector == TRUE ) ) && (bZ == 0) ) + const BOOL canTrainMilitiaAnywhere = RebelCommand::CanTrainMilitiaAnywhere(); + if( (canTrainMilitiaAnywhere || (StrategicMap[CALCULATE_STRATEGIC_INDEX(sMapX, sMapY) ].bNameId != BLANK_SECTOR ) || ( fSamSiteInSector == TRUE ) ) && (bZ == 0) ) { // init town trainer list memset( TownTrainer, 0, sizeof( TownTrainer ) ); @@ -7897,7 +7907,7 @@ BOOLEAN TrainTownInSector( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMapY, INT1 // get town index ubTownId = StrategicMap[CALCULATE_STRATEGIC_INDEX(pTrainer->sSectorX, pTrainer->sSectorY ) ].bNameId; - if( fSamSiteInSector == FALSE ) + if( fSamSiteInSector == FALSE && !RebelCommand::CanTrainMilitiaAnywhere()) { AssertNE(ubTownId, BLANK_SECTOR); } @@ -10707,7 +10717,7 @@ void HandleShadingOfLinesForAssignmentMenus( void ) } // radio scan - if( pSoldier->CanUseRadio() ) + if( BasicCanCharacterAssignment( pSoldier, TRUE ) && pSoldier->CanUseRadio() ) { // unshade line UnShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_RADIO_SCAN ); @@ -16311,7 +16321,7 @@ void HandleRestFatigueAndSleepStatus( void ) continue; } - if( ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) ) + if( ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { continue; } @@ -16460,7 +16470,7 @@ void HandleRestFatigueAndSleepStatus( void ) continue; } - if( ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) ) + if( ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { continue; } @@ -19441,7 +19451,8 @@ BOOLEAN CanCharacterRepairAnotherSoldiersStuff( SOLDIERTYPE *pSoldier, SOLDIERTY ( AM_A_ROBOT( pSoldier ) ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__EPC ) || ( pOtherSoldier->bAssignment == ASSIGNMENT_DEAD ) || - ( pOtherSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) ) + ( pOtherSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pOtherSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { return( FALSE ); } @@ -20164,6 +20175,9 @@ BOOLEAN CanCharacterTrainMilitiaWithErrorReport( SOLDIERTYPE *pSoldier ) } } + if (RebelCommand::CanTrainMilitiaAnywhere() && GetTownIdForSector(pSoldier->sSectorX, pSoldier->sSectorY) == BLANK_SECTOR) + ubFacilityTrainersAllowed = RebelCommand::GetMaxTrainersForTrainMilitiaAnywhere(); + // If we are here, then TrainersAllowed > 0. // Otherwise we'd have failed the BasicCanTrain check if ( CountMilitiaTrainersInSoldiersSector( pSoldier, TOWN_MILITIA ) >= ubFacilityTrainersAllowed ) diff --git a/Strategic/Assignments.h b/Strategic/Assignments.h index a3c731ae..03672ed7 100644 --- a/Strategic/Assignments.h +++ b/Strategic/Assignments.h @@ -100,6 +100,7 @@ enum ADMINISTRATION, // merc boosts the effectiveness of other mercs EXPLORATION, // merc searches the sector for undiscovered items ASSIGNMENT_MINIEVENT, + ASSIGNMENT_REBELCOMMAND, NUM_ASSIGNMENTS, }; diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 91349039..dcc58e1a 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "builddefines.h" #include #include "types.h" @@ -73,7 +69,6 @@ #include "DynamicDialogue.h" // added by Flugente #include "MilitiaIndividual.h" // added by Flugente #include "Rebel Command.h" -#endif #include "Reinforcement.h" @@ -638,6 +633,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve1"); switch( GetEnemyEncounterCode() ) { case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: gpAR->ubPlayerDefenceAdvantage = 21; //Skewed to the player's advantage for convenience purposes. break; case ENEMY_INVASION_CODE: @@ -1750,6 +1746,7 @@ void RenderAutoResolve() swprintf( str, gpStrategicString[STR_AR_ATTACK_HEADER] ); break; case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: swprintf( str, gpStrategicString[STR_AR_ENCOUNTER_HEADER] ); break; case ENEMY_INVASION_CODE: @@ -2209,19 +2206,6 @@ void CreateAutoResolveInterface() ubRegMilitia += bonusRegularMilitia; ubGreenMilitia += bonusGreenMilitia; - // This block should be unnecessary. If the counts do not line up, there is a bug. -#if 0 - while( ubEliteMilitia + ubRegMilitia + ubGreenMilitia < gpAR->ubCivs ) - { - switch( PreRandom( 3 ) ) - { - case 0: ubEliteMilitia++; break; - case 1: ubRegMilitia++; break; - case 2: ubGreenMilitia++; break; - } - } -#endif - cnt = 0; // Add the militia in this sector ARCreateMilitiaSquad( &cnt, ubEliteMilitia, ubRegMilitia, ubGreenMilitia, gpAR->ubSectorX, gpAR->ubSectorY); @@ -6076,6 +6060,5 @@ BOOLEAN IndividualMilitiaInUse_AutoResolve( UINT32 aMilitiaId ) } } } - return FALSE; -} \ No newline at end of file +} diff --git a/Strategic/CMakeLists.txt b/Strategic/CMakeLists.txt new file mode 100644 index 00000000..295ff41a --- /dev/null +++ b/Strategic/CMakeLists.txt @@ -0,0 +1,67 @@ +set(StrategicSrc +"${CMAKE_CURRENT_SOURCE_DIR}/AI Viewer.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ASD.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Assignments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Auto Resolve.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Campaign Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Creature Spreading.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Facilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Clock.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Event Hook.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Events.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Hourly Update.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja25 Strategic Ai.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Luaglobal.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LuaInitNPCs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Helicopter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Border.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Bottom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Map Inventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Map.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface TownMine Info.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MapScreen Quotes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mapscreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Meanwhile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Contract.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaIndividual.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaSquads.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MiniEvents.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Player Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PreBattle Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Queen Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quest Debug System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quests.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rebel Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Reinforcement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Scheduling.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic AI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Event Handler.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Merc Handler.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Mines LUA.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Mines.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Movement Costs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Movement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Pathing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Status.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Town Loyalty.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategic town reputation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Transport Groups.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Turns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategic.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategicmap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Town Militia.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/UndergroundInit.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Army.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Bloodcats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CoolnessBySector.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Creatures.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ExtraItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Facilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_FacilityTypes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Minerals.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SectorNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SquadNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_UniformColors.cpp" +PARENT_SCOPE) diff --git a/Strategic/Campaign Init.cpp b/Strategic/Campaign Init.cpp index 333be928..c3faaa38 100644 --- a/Strategic/Campaign Init.cpp +++ b/Strategic/Campaign Init.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "ASD.h" // added by Flugente #include "types.h" #include "Campaign Init.h" @@ -17,7 +13,6 @@ #include "expat.h" #include "Debug Control.h" #include "Tactical Save.h" -#endif #include "connect.h" #include diff --git a/Strategic/Creature Spreading.cpp b/Strategic/Creature Spreading.cpp index 167cfc6b..13581a26 100644 --- a/Strategic/Creature Spreading.cpp +++ b/Strategic/Creature Spreading.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "types.h" #include "fileman.h" #include "himage.h" @@ -36,7 +32,6 @@ #include "Isometric Utils.h" // added by Flugente #include "Soldier Create.h" // added by Flugente #include "Player Command.h" // added by Flugente -#endif #include "Strategic Mines.h" #include "connect.h" diff --git a/Strategic/Facilities.cpp b/Strategic/Facilities.cpp index c9203fec..cf039a44 100644 --- a/Strategic/Facilities.cpp +++ b/Strategic/Facilities.cpp @@ -8,10 +8,6 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Campaign Types.h" #include "Facilities.h" #include "Soldier Control.h" @@ -38,7 +34,6 @@ #include "Isometric Utils.h" #include "MilitiaSquads.h" #include "Tactical Save.h" -#endif INT16 gsSkyriderCostModifier; // HEADROCK HAM 3.6: Strategic info variable, total of income/costs accumulated for the use of facilities today. diff --git a/Strategic/Game Clock.cpp b/Strategic/Game Clock.cpp index c07d4345..6b92c103 100644 --- a/Strategic/Game Clock.cpp +++ b/Strategic/Game Clock.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "sgp.h" #include "Game Clock.h" #include "Font.h" @@ -25,7 +22,6 @@ #include "gamescreen.h" #include "Map Information.h" #include "GameSettings.h" -#endif #include "LuaInitNPCs.h" diff --git a/Strategic/Game Event Hook.cpp b/Strategic/Game Event Hook.cpp index 7942c2b5..1a971658 100644 --- a/Strategic/Game Event Hook.cpp +++ b/Strategic/Game Event Hook.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "InIReader.h" -#else #include "types.h" #include "Game Events.h" #include "soundman.h" @@ -51,7 +47,8 @@ #include "Player Command.h" // added by Flugente #include "LuaInitNPCs.h" // added by Flugente #include "MiniEvents.h" -#endif + #include "Rebel Command.h" + #include "interface Dialogue.h" #include "connect.h" @@ -105,18 +102,6 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent ) { BOOLEAN bMercDayOne = FALSE; -// BF : file access is bad, especially if a function is called so often. -#if 0 - // Kaiden: Opening the INI File - CIniReader iniReader("..\\Ja2_Options.ini"); - - if(is_networked) memset(&iniReader, 0, sizeof (CIniReader) );//disable ini in mp (taking default values) - - //Kaiden: Getting Value for MERC Available on Day one? - // for some reason, this can't be in gamesettings.cpp - // or it won't work. - bMercDayOne = iniReader.ReadBoolean("Options","MERC_DAY_ONE",FALSE); -#endif DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"ExecuteStrategicEvent"); if( gGameExternalOptions.gfEnableEmergencyButton_SkipStrategicEvents && _KeyDown( NUM_LOCK ) ) @@ -680,6 +665,15 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent ) CheckMiniEvents(pEvent->uiParam); } break; + + case EVENT_REBELCOMMAND: + RebelCommand::HandleStrategicEvent(pEvent->uiParam); + break; + + case EVENT_RETURN_TRANSPORT_GROUP: + // for this action, we only care about the groupid, which is in the event param + ExecuteStrategicAIAction(NPC_ACTION_RETURN_TRANSPORT_GROUP, 0, 0, pEvent->uiParam); + break; } gfPreventDeletionOfAnyEvent = fOrigPreventFlag; return TRUE; diff --git a/Strategic/Game Event Hook.h b/Strategic/Game Event Hook.h index 20077c04..fa9cacd9 100644 --- a/Strategic/Game Event Hook.h +++ b/Strategic/Game Event Hook.h @@ -152,6 +152,11 @@ enum EVENT_MINIEVENT, + EVENT_REBELCOMMAND, + + EVENT_RETURN_TRANSPORT_GROUP, + EVENT_TRANSPORT_GROUP_DEFEATED, + NUMBER_OF_EVENT_TYPES_PLUS_ONE, NUMBER_OF_EVENT_TYPES = NUMBER_OF_EVENT_TYPES_PLUS_ONE - 1 }; @@ -215,4 +220,4 @@ void DeleteAllStrategicEvents(); // Flugente: return vector of all events of type ubCallbackID with time and param std::vector< std::pair > GetAllStrategicEventsOfType( UINT8 ubCallbackID ); -#endif \ No newline at end of file +#endif diff --git a/Strategic/Game Events.cpp b/Strategic/Game Events.cpp index a698d903..d6fc6d9b 100644 --- a/Strategic/Game Events.cpp +++ b/Strategic/Game Events.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "builddefines.h" #include #include "types.h" @@ -12,7 +9,6 @@ #include "message.h" #include "MiniEvents.h" #include "Text.h" -#endif #ifdef JA2TESTVERSION @@ -140,6 +136,8 @@ CHAR16 gEventName[NUMBER_OF_EVENT_TYPES_PLUS_ONE][40]={ L"bandit attack", L"ArmyFinishTraining", L"MiniEvent", + L"ARC_Event", + L"ReturnTransportGroup", }; #endif diff --git a/Strategic/Game Init.cpp b/Strategic/Game Init.cpp index d3c01cb2..c47c0578 100644 --- a/Strategic/Game Init.cpp +++ b/Strategic/Game Init.cpp @@ -1,9 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "Language Defines.h" - #include "HelpScreen.h" - #include "GameSettings.h" -#else #include "sgp.h" #include "jascreens.h" #include "laptop.h" @@ -65,7 +59,6 @@ #include "MiniEvents.h" #include "Rebel Command.h" #include "World Items.h" -#endif #include "Vehicles.h" #include "text.h" diff --git a/Strategic/Hourly Update.cpp b/Strategic/Hourly Update.cpp index 800e5603..d9e0ddfa 100644 --- a/Strategic/Hourly Update.cpp +++ b/Strategic/Hourly Update.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Assignments.h" #include "Strategic Town Loyalty.h" #include "Strategic Merc Handler.h" @@ -27,7 +24,6 @@ #include "strategic.h" // added by Flugente #include "message.h" // added by Flugente for ScreenMsg(...) #include "Rebel Command.h" -#endif #include "Luaglobal.h" #include "LuaInitNPCs.h" @@ -712,6 +708,7 @@ void HourlyStealUpdate() && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT + && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && !( ( ( gWorldSectorX == pSoldier->sSectorX ) && ( gWorldSectorY == pSoldier->sSectorY ) && ( gbWorldSectorZ == pSoldier->bSectorZ ) ) && ( gTacticalStatus.fEnemyInSector || guiCurrentScreen == GAME_SCREEN ) ) ) { UINT8 ubSectorId = SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ); @@ -741,6 +738,7 @@ void HourlyStealUpdate() && pOtherSoldier->bAssignment != IN_TRANSIT && pOtherSoldier->bAssignment != ASSIGNMENT_POW && pOtherSoldier->bAssignment != ASSIGNMENT_MINIEVENT + && pOtherSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && !SPY_LOCATION( pOtherSoldier->bAssignment ) && pOtherSoldier->bActive && !pOtherSoldier->flags.fMercAsleep diff --git a/Strategic/Ja25 Strategic Ai.cpp b/Strategic/Ja25 Strategic Ai.cpp index 581b54d6..7e97ba21 100644 --- a/Strategic/Ja25 Strategic Ai.cpp +++ b/Strategic/Ja25 Strategic Ai.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "strategicmap.h" #include "strategic.h" #include "Strategic Mines.h" @@ -70,7 +67,6 @@ #include "physics.h" #include "Auto Resolve.h" #include "cursors.h" -#endif #ifdef JA2UB #include "Soldier Init List.h" @@ -2967,4 +2963,4 @@ void AddJA25AIDataToSector( JA25_SECTOR_AI *pSectorAIInfo ) */ } -#endif \ No newline at end of file +#endif diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index 23b1282b..0aa574cf 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -11,7 +11,6 @@ #include "Game Init.h" #include "interface Dialogue.h" #include "opplist.h" -#include "Strategic All.h" #include "pits.h" #include "Game Event Hook.h" #include "Creature Spreading.h" @@ -40,6 +39,12 @@ #include "soldier profile type.h" #include "history.h" #include "Merc Hiring.h" +#include "Game Events.h" +#include "email.h" +#include "worldman.h" +#include "text.h" +#include "Dialogue Control.h" +#include "Boxing.h" #include "LOS.h" #include "Music Control.h" @@ -75,6 +80,22 @@ extern "C" { #include "BriefingRoom_Data.h" #include "MiniGame.h" // added by Flugente +#include "Campaign.h" +#include "strategic.h" +#include "PreBattle Interface.h" +#include "Strategic Event Handler.h" +#include "files.h" +#include "finances.h" +#include "Sound Control.h" +#include "SaveLoadMap.h" +#include "renderworld.h" +#include "Keys.h" +#include "Render Fun.h" +#include "Soldier Add.h" +#include "gameloop.h" +#include "Merc Contract.h" +#include "message.h" +#include "Town Militia.h" extern UINT8 gubWaitingForAllMercsToExitCode; @@ -12755,22 +12776,7 @@ static bool locationStringToCoordinates_AltSector(std::string loc, UINT8* x, UIN } // gather column -#if 0 - loc = loc.substr(1); - stringstream ss = stringstream(); - if (loc[0] >= '0' && loc[0] <= '9') - { - ss << loc[0]; - loc = loc.substr(1); - } - if (loc[0] >= '0' && loc[0] <= '9') - { - ss << loc[0]; - loc = loc.substr(1); - } -#else stringstream ss(loc.substr(1)); -#endif int col = 0; ss >> col; if (col >= 1 && col <= 16) @@ -12809,22 +12815,7 @@ static bool locationStringToCoordinates(std::string loc, UINT8* x, UINT8* y, UIN } // gather column -#if 0 - loc = loc.substr(1); - stringstream ss = stringstream(); - if (loc[0] >= '0' && loc[0] <= '9') - { - ss << loc[0]; - loc = loc.substr(1); - } - if (loc[0] >= '0' && loc[0] <= '9') - { - ss << loc[0]; - loc = loc.substr(1); - } -#else stringstream ss(loc); -#endif int col = 0; ss >> col; if (col >= 1 && col <= 16) @@ -13623,43 +13614,58 @@ static int l_GetNumHostilesInSector( lua_State *L ) void LuaGetIntelAndQuestMapData( INT32 aLevel ) { - const char* filename = "scripts\\strategicmap.lua"; + static LuaScopeState _LS(true); + static bool isInitialized = false; - LuaScopeState _LS( true ); - - IniFunction( _LS.L(), TRUE ); - IniGlobalGameSetting( _LS.L() ); - - SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget ); + // Initialize only once during lifetime of program + if (!isInitialized) + { + isInitialized = true; + IniFunction(_LS.L(), TRUE); + IniGlobalGameSetting(_LS.L()); + const char* filename = "scripts\\strategicmap.lua"; + SGP_THROW_IFFALSE(_LS.L.EvalFile(filename), _BS("Cannot open file: ") << filename << _BS::cget); + } + IniGlobalGameSetting(_LS.L()); LuaFunction( _LS.L, "GetIntelAndQuestMapData" ).Param( aLevel ).Call( 1 ); } void SetFactoryLeftoverProgress( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usFacilityType, UINT16 usProductionNumber, INT32 sProgressLeft ) { - const char* filename = "scripts\\strategicmap.lua"; + static LuaScopeState _LS(true); + static bool isInitialized = false; - LuaScopeState _LS( true ); - - IniFunction( _LS.L(), TRUE ); - IniGlobalGameSetting( _LS.L() ); - - SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget ); + // Initialize only once during lifetime of program + if (!isInitialized) + { + isInitialized = true; + IniFunction(_LS.L(), TRUE); + IniGlobalGameSetting(_LS.L()); + const char* filename = "scripts\\strategicmap.lua"; + SGP_THROW_IFFALSE(_LS.L.EvalFile(filename), _BS("Cannot open file: ") << filename << _BS::cget); + } + IniGlobalGameSetting(_LS.L()); LuaFunction( _LS.L, "SetFactoryLeftoverProgress" ).Param( sSectorX ).Param( sSectorY ).Param( bSectorZ ).Param( usFacilityType ).Param( usProductionNumber ).Param( sProgressLeft ).Call( 6 ); } INT32 GetFactoryLeftoverProgress( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 usFacilityType, UINT16 usProductionNumber ) { - const char* filename = "scripts\\strategicmap.lua"; + static LuaScopeState _LS( true ); + static bool isInitialized = false; - LuaScopeState _LS( true ); - - IniFunction( _LS.L(), TRUE ); - IniGlobalGameSetting( _LS.L() ); - - SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget ); + // Initialize only once during lifetime of program + if (!isInitialized) + { + isInitialized = true; + IniFunction( _LS.L(), TRUE ); + IniGlobalGameSetting(_LS.L()); + const char* filename = "scripts\\strategicmap.lua"; + SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget ); + } + IniGlobalGameSetting(_LS.L()); LuaFunction( _LS.L, "GetFactoryLeftoverProgress" ).Param( sSectorX ).Param( sSectorY ).Param( bSectorZ ).Param( usFacilityType ).Param( usProductionNumber ).Call( 5 ); if ( lua_gettop( _LS.L() ) >= 0 ) diff --git a/Strategic/Luaglobal.cpp b/Strategic/Luaglobal.cpp index 82f9401b..3abb4a73 100644 --- a/Strategic/Luaglobal.cpp +++ b/Strategic/Luaglobal.cpp @@ -6,7 +6,6 @@ #include "FileMan.h" #include "GameSettings.h" #include "interface Dialogue.h" -#include "Strategic All.h" #include "Luaglobal.h" #include "Boxing.h" #include "LuaInitNPCs.h" @@ -36,6 +35,8 @@ extern "C" { #include "lualib.h" } +#include "strategicmap.h" +#include "Map Screen Interface.h" using namespace std; diff --git a/Strategic/Map Screen Helicopter.cpp b/Strategic/Map Screen Helicopter.cpp index a48f9a32..f6bf41ec 100644 --- a/Strategic/Map Screen Helicopter.cpp +++ b/Strategic/Map Screen Helicopter.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Map Screen Helicopter.h" #include "LaptopSave.h" #include "Vehicles.h" @@ -44,7 +41,6 @@ #include "expat.h" #include "merc entering.h" // added by Flugente #include "ASD.h" // added by Flugente -#endif #include "Vehicles.h" #include "NPC.h" diff --git a/Strategic/Map Screen Interface Border.cpp b/Strategic/Map Screen Interface Border.cpp index 04fa25c7..4155783d 100644 --- a/Strategic/Map Screen Interface Border.cpp +++ b/Strategic/Map Screen Interface Border.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Map Screen Interface Border.h" #include "Types.h" #include "vsurface.h" @@ -31,7 +28,6 @@ #include "popup_callback.h" #include "popup_class.h" #include "Queen Command.h" // added by Flugente -#endif #include "connect.h" @@ -128,7 +124,7 @@ BOOLEAN LoadMapBorderGraphics( void ) { FilenameForBPP( "INTERFACE\\MBS.sti", VObjectDesc.ImageFile ); } - else if (iResolution == _1280x720) + else if (isWidescreenUI()) { FilenameForBPP("INTERFACE\\MBS_1280x720.sti", VObjectDesc.ImageFile); } diff --git a/Strategic/Map Screen Interface Bottom.cpp b/Strategic/Map Screen Interface Bottom.cpp index f1a730c4..0c5530ab 100644 --- a/Strategic/Map Screen Interface Bottom.cpp +++ b/Strategic/Map Screen Interface Bottom.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Map Screen Interface Bottom.h" #include "Map Screen Interface Border.h" #include "Types.h" @@ -48,7 +45,6 @@ #include "Interface Control.h" #include "Sys Globals.h" #include "game init.h" -#endif #ifdef JA2UB #include "Ja25 Strategic Ai.h" @@ -270,7 +266,7 @@ void HandleLoadOfMapBottomGraphics( void ) { FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile ); } - else if (iResolution == _1280x720) + else if (isWidescreenUI()) { FilenameForBPP("INTERFACE\\map_screen_bottom_1280x720.sti", VObjectDesc.ImageFile); } @@ -344,7 +340,7 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender ) // HEADROCK HAM 3.6: OK, let's always render this panel, as long as the team inventory screen isn't open. // sevenfm: improved r8524 fix to work with 1280x720 resolution //if (fMapScreenBottomDirty || ((!fShowInventoryFlag || iResolution > _1024x600) && fForceMapscreenFullRender)) - if ((!fShowInventoryFlag || iResolution > _1280x720) && (fMapScreenBottomDirty || fForceMapscreenFullRender)) + if ( (!fShowInventoryFlag || iResolution > _1024x600) && (fMapScreenBottomDirty || fForceMapscreenFullRender)) { // get and blt panel GetVideoObject(&hHandle, guiMAPBOTTOMPANEL ); @@ -1296,7 +1292,7 @@ void EnableDisableBottomButtonsAndRegions( void ) { DisableButton( giMapInvDoneButton ); } - else + else if (!isWidescreenUI()) { EnableButton( giMapInvDoneButton ); } @@ -1795,6 +1791,7 @@ BOOLEAN AnyUsableRealMercenariesOnTeam( void ) ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_DEAD ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && + ( pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) && ( pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__EPC ) ) { return( TRUE ); diff --git a/Strategic/Map Screen Interface Map Inventory.cpp b/Strategic/Map Screen Interface Map Inventory.cpp index faea4fbc..5dcbb920 100644 --- a/Strategic/Map Screen Interface Map Inventory.cpp +++ b/Strategic/Map Screen Interface Map Inventory.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Map Screen Interface Map Inventory.h" #include "Render Dirty.h" #include "vobject.h" @@ -34,7 +30,6 @@ #include "rt time defines.h" #include "Encyclopedia_new.h" //Moa: item visibility #include "Town Militia.h" // added by Flugente -#endif #include "ShopKeeper Interface.h" #include "ArmsDealerInvInit.h" @@ -45,6 +40,7 @@ #include "Interface Items.h" #include "Food.h" // added by Flugente #include "Campaign Types.h" // added by Flugente +#include "mapscreen.h" //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -453,7 +449,7 @@ BOOLEAN LoadInventoryPoolGraphic( void ) { sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" ); } - else if (iResolution == _1280x720) + else if (isWidescreenUI()) { sprintf(VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_1280x720.sti"); } @@ -592,7 +588,7 @@ BOOLEAN RenderItemInPoolSlot( INT32 iCurrentSlot, INT32 iFirstSlotOnPage ) INT16 sCenX, sCenY, usWidth, usHeight, sX, sY; HVOBJECT hHandle; ETRLEObject *pTrav; - CHAR16 sString[ 64 ]; + CHAR16 sString[ 80 ]; INT16 sWidth = 0, sHeight = 0; INT16 sOutLine = 0; BOOLEAN fOutLine = FALSE; @@ -1096,24 +1092,8 @@ void SaveSeenAndUnseenItems( void ) //make list of seen items for ( UINT32 i = 0; i < pInventoryPoolList.size(); i++ ) { -#if 0 - if ( pInventoryPoolList[ i ].object.exists() ) - { - pInventoryPoolList[ i ].fExists = TRUE; - pInventoryPoolList[ i ].bVisible = TRUE; - //Check - if(TileIsOutOfBounds( pInventoryPoolList[ i ].sGridNo) && !( pInventoryPoolList[ i ].usFlags & WORLD_ITEM_GRIDNO_NOT_SET_USE_ENTRY_POINT ) ) - { - pInventoryPoolList[ i ].usFlags |= WORLD_ITEM_GRIDNO_NOT_SET_USE_ENTRY_POINT; - - // Display warning..... - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Error: Trying to add item ( %d: %s ) to invalid gridno in unloaded sector. Please Report.", pInventoryPoolList[ i ].object.usItem, ItemNames[ pInventoryPoolList[ i ].object.usItem] ); - } - -#else if ( pInventoryPoolList[i].fExists ) { -#endif worldItemsSaveList.push_back(pInventoryPoolList[i]); iExistingItems++; } @@ -3630,45 +3610,6 @@ void HandleMouseInCompatableItemForMapSectorInventory( INT32 iCurrentSlot ) { SOLDIERTYPE *pSoldier = NULL; static BOOLEAN fItemWasHighLighted = FALSE; -#if 0 - if( iCurrentSlot == -1 ) - { - giCompatibleItemBaseTime = 0; - } - - if( fChangedInventorySlots == TRUE ) - { - giCompatibleItemBaseTime = 0; - fChangedInventorySlots = FALSE; - } - - // reset the base time to the current game clock - if( giCompatibleItemBaseTime == 0 ) - { - giCompatibleItemBaseTime = GetJA2Clock( ); - - if( fItemWasHighLighted == TRUE ) - { - fTeamPanelDirty = TRUE; - fMapPanelDirty = TRUE; - fItemWasHighLighted = FALSE; - } - } - - ResetCompatibleItemArray( ); - ResetMapSectorInventoryPoolHighLights( ); - - if( iCurrentSlot == -1 ) - { - return; - } - - // Check also that we're not beyond the resize. - if (pInventoryPoolList.size() < (UINT32)(iCurrentSlot + ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) )) - { - return; - } -#else //if same slot then before dont recalculate if ( !fChangedInventorySlots ) return; @@ -3694,36 +3635,10 @@ void HandleMouseInCompatableItemForMapSectorInventory( INT32 iCurrentSlot ) } return; } -#endif // given this slot value, check if anything in the displayed sector inventory or on the mercs inventory is compatable if( fShowInventoryFlag ) { -#if 0 - // check if any compatable items in the soldier inventory matches with this item - if( gfCheckForCursorOverMapSectorInventoryItem ) - { - pSoldier = &Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ]; - if( pSoldier ) - { - if( HandleCompatibleAmmoUIForMapScreen( pSoldier, iCurrentSlot + ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ), TRUE, FALSE ) ) - { - if( GetJA2Clock( ) - giCompatibleItemBaseTime > 100 ) - { - if( fItemWasHighLighted == FALSE ) - { - fTeamPanelDirty = TRUE; - fItemWasHighLighted = TRUE; - } - } - } - } - } - else - { - giCompatibleItemBaseTime = 0; - } -#else //Soldier inventory is shown, highlight those items pSoldier = &Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ]; if( pSoldier ) @@ -3734,40 +3649,17 @@ void HandleMouseInCompatableItemForMapSectorInventory( INT32 iCurrentSlot ) } fTeamPanelDirty = TRUE; } -#endif } // now handle for the sector inventory if( fShowMapInventoryPool ) { -#if 0 - // check if any compatable items in the soldier inventory matches with this item - if( gfCheckForCursorOverMapSectorInventoryItem ) - { - if( HandleCompatibleAmmoUIForMapInventory( pSoldier, iCurrentSlot, ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) , TRUE, FALSE ) ) - { - if( GetJA2Clock( ) - giCompatibleItemBaseTime > 100 ) - { - if( fItemWasHighLighted == FALSE ) - { - fItemWasHighLighted = TRUE; - fMapPanelDirty = TRUE; - } - } - } - } - else - { - giCompatibleItemBaseTime = 0; - } -#else if( HandleCompatibleAmmoUIForMapInventory( pSoldier, iCurrentSlot, ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) , TRUE, FALSE ) ) { fItemWasHighLighted = TRUE;//remember that something is highlighted } fMapPanelDirty = TRUE; -#endif } fChangedInventorySlots = FALSE; @@ -3875,79 +3767,11 @@ void CheckGridNoOfItemsInMapScreenMapInventory() void SortSectorInventory( std::vector& pInventory, UINT32 uiSizeOfArray ) { -#if 0//dnl ch75 011113 return code from v1.12 as current one is terrible slow - //first, compress the inventory by stacking like items that are reachable, while moving empty items towards the back - for (std::vector::iterator iter = pInventory.begin(); iter != pInventory.end(); ++iter) { - //if object exists, we want to try to stack it - if (iter->fExists && iter->object.exists() == true) { - - //ADB TODO if it is active and reachable etc, alternatively if it's on the same gridNo -#if 0 - if (iter->object.ubNumberOfObjects < ItemSlotLimit( iter->object.usItem, STACK_SIZE_LIMIT )) { - std::vector::iterator second = iter; - for (++second; second != pInventory.end(); ++second) { - if (second->object.usItem == iter->object.usItem - && second->object.exists() == true) { - iter->object.AddObjectsToStack(second->object, second->object.ubNumberOfObjects); - if (iter->object.ubNumberOfObjects >= ItemSlotLimit( iter->object.usItem, STACK_SIZE_LIMIT )) { - break; - } - } - } - } -#endif - } - else { - //object does not exist, so compress the list - std::vector::iterator second = iter; - for (++second; second != pInventory.end(); ++second) { - if (second->fExists && second->object.exists() == true) { - *iter = *second; - second->initialize(); - break; - } - } - if (second == pInventory.end()) { - //we reached the end of the list without finding any active item, so we can break out of this loop too! - break; - } - } - } - - //once compressed, we need only sort the existing items - //all empty items should be at the back!!! - std::vector::iterator endSort = pInventory.begin(); - for (unsigned int x = 1; x < pInventory.size(); ++x) { - if (pInventory[x].fExists && pInventory[x].object.exists() == true) { - ++endSort; - } - else { - break; - } - } - ++endSort; - - //ADB I'm not sure qsort will work with OO data, so replace it with stl sort, which is faster anyways - std::sort(pInventory.begin(), endSort); - - //then compress it by removing the empty objects, we know they are at the back - //we want the size to equal x * MAP_INVENTORY_POOL_SLOT_COUNT - for (unsigned int x = 1; x <= pInventory.size() / MAP_INVENTORY_POOL_SLOT_COUNT && pInventory.size() > x * MAP_INVENTORY_POOL_SLOT_COUNT; ++x) { - if (pInventory[x * MAP_INVENTORY_POOL_SLOT_COUNT].fExists == false - && pInventory[x * MAP_INVENTORY_POOL_SLOT_COUNT].object.exists() == false) { - //we have found a page where the first item on the page does not exist, resize to this - //we may have just cut off a blank page leaving the previous page full with no place to put - //any new objects, but ResizeInventoryList after this will take care of that. - pInventory.resize(x * MAP_INVENTORY_POOL_SLOT_COUNT); - } - } -#else #if _ITERATOR_DEBUG_LEVEL > 1//dnl ch75 061113 under debug VS2010 throws exceptions after qsort but not under VS2005 and VS2008, all release version seems to work fine std::sort(pInventory.begin(), pInventory.begin() + uiSizeOfArray); #else qsort((LPVOID)&pInventory.front(), (size_t)uiSizeOfArray, sizeof(WORLDITEM), MapScreenSectorInventoryCompare); #endif -#endif } INT32 MapScreenSectorInventoryCompare( const void *pNum1, const void *pNum2) @@ -3960,31 +3784,10 @@ INT32 MapScreenSectorInventoryCompare( const void *pNum1, const void *pNum2) UINT16 ubItem2Quality; //dnl ch75 071113 without below fix sort will create mess when use empty slots because fExists remain TRUE after item is removed from inventory so decide to rather check ubNumberOfObjects -#if 0 - if(!(pFirst->fExists && pFirst->object.ubNumberOfObjects && pFirst->object.usItem) && (pFirst->fExists | pFirst->object.ubNumberOfObjects | pFirst->object.usItem)) - { - pFirst->fExists = FALSE; - pFirst->object.ubNumberOfObjects = 0; - pFirst->object.usItem = NONE; - return(1); - } - if(!(pSecond->fExists && pSecond->object.ubNumberOfObjects && pSecond->object.usItem) && (pSecond->fExists | pSecond->object.ubNumberOfObjects | pSecond->object.usItem)) - { - pSecond->fExists = FALSE; - pSecond->object.ubNumberOfObjects = 0; - pSecond->object.usItem = NONE; - return(-1); - } - if(!pFirst->fExists) - return(1); - if(!pSecond->fExists) - return(-1); -#else if(!pFirst->object.ubNumberOfObjects) return(1); if(!pSecond->object.ubNumberOfObjects) return(-1); -#endif usItem1Index = pFirst->object.usItem; usItem2Index = pSecond->object.usItem; @@ -4162,20 +3965,7 @@ BOOLEAN SortInventoryPoolQ(void) { if(pInventoryPoolList.size() > 0) { -#if 0//dnl ch75 311013 - for(INT32 iSlotCounter=0; iSlotCounter<(INT32)pInventoryPoolList.size(); iSlotCounter++) - if(pInventoryPoolList[iSlotCounter].object.usItem == NOTHING && pInventoryPoolList[iSlotCounter].object.exists() == false) - { - pInventoryPoolList[iSlotCounter].fExists = FALSE; - pInventoryPoolList[iSlotCounter].bVisible = FALSE; - } SortSectorInventory(pInventoryPoolList, pInventoryPoolList.size()); - iLastInventoryPoolPage = (pInventoryPoolList.size() - 1) / MAP_INVENTORY_POOL_SLOT_COUNT; - if(iCurrentInventoryPoolPage > iLastInventoryPoolPage) - iCurrentInventoryPoolPage = iLastInventoryPoolPage; -#else - SortSectorInventory(pInventoryPoolList, pInventoryPoolList.size()); -#endif } fMapPanelDirty = TRUE; return(TRUE); @@ -6232,8 +6022,8 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO FLOAT newguntemperature = max(0.0f, guntemperature - tickspassed * cooldownfactor ); // ... calculate new temperature ... -#if 0//def JA2TESTVERSION - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", guntemperature, newguntemperature ); +#if JA2TESTVERSION + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", guntemperature, newguntemperature); #endif (*itemStack)[i]->data.bTemperature = newguntemperature; // ... set new temperature @@ -6252,8 +6042,8 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO (*iter)[i]->data.bTemperature = newtemperature; // ... set new temperature -#if 0//def JA2TESTVERSION - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", temperature, newtemperature ); +#if JA2TESTVERSION + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", temperature, newtemperature); #endif // we assume that there can exist only 1 underbarrel weapon per gun diff --git a/Strategic/Map Screen Interface Map.cpp b/Strategic/Map Screen Interface Map.cpp index e0645860..a4b41a14 100644 --- a/Strategic/Map Screen Interface Map.cpp +++ b/Strategic/Map Screen Interface Map.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Font.h" #include "Font Control.h" #include "mapscreen.h" @@ -49,7 +45,8 @@ #include "Map Screen Interface Map Inventory.h" // added by Flugente #include "LuaInitNPCs.h" // added by Flugente #include "Game Event Hook.h" // added by Flugente -#endif + #include "Rebel Command.h" + #include "Strategic Transport Groups.h" #include "Quests.h" #include "connect.h" @@ -844,6 +841,44 @@ void fillMapColoursForVisitedSectors(INT32(&colorMap)[ MAXIMUM_VALID_Y_COORDINAT } } } + + FillMapColoursForTransportGroups(colorMap); + + if (RebelCommand::ShowEnemyMovementTargets()) + { + const auto targetColor = MAP_SHADE_LT_RED; + GROUP* pGroup = gpGroupList; + + while (pGroup) + { + if (pGroup->usGroupTeam == ENEMY_TEAM) + { + const UINT8 intention = pGroup->pEnemyGroup->ubIntention; + if (intention == STAGING + || intention == REINFORCEMENTS + || intention == PURSUIT + || intention == ASSAULT) + { + WAYPOINT* wp = pGroup->pWaypoints; + + while (wp) + { + if (wp->next == nullptr) + break; + + wp = wp->next; + } + + if (GetSectorFlagStatus(wp->x-1, wp->y-1, (UINT8)iCurrentMapSectorZ, SF_ALREADY_VISITED)) + { + colorMap[wp->y-1][wp->x-1] = targetColor; + } + } + } + + pGroup = pGroup->next; + } + } } @@ -1328,6 +1363,7 @@ INT32 ShowAssignedTeam(INT16 sMapX, INT16 sMapY, INT32 iCount) ( pSoldier->bAssignment != IN_TRANSIT ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && + ( pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) && ( pSoldier->stats.bLife > 0 ) && ( !PlayerIDGroupInMotion( pSoldier->ubGroupID ) ) ) { @@ -1786,7 +1822,7 @@ BOOLEAN InitializePalettesForMap( void ) if (iResolution >= _640x480 && iResolution < _800x600) strcpy(vs_desc.ImageFile, "INTERFACE\\b_map.pcx"); - else if (iResolution == _1280x720) + else if (isWidescreenUI()) strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_1280x720.pcx"); else if (iResolution < _1024x768) strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_800x600.pcx"); @@ -6684,7 +6720,7 @@ void HandleLowerLevelMapBlit( void ) offsetY = yVal; imageIndex = 0; } - else if (iResolution == _1280x720) + else if (isWidescreenUI()) { offsetX = xVal + 21; offsetY = yVal + 17; @@ -6938,6 +6974,7 @@ BOOLEAN CanMercsScoutThisSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == ASSIGNMENT_DEAD ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) || ( pSoldier->flags.fMercAsleep == TRUE ) || ( pSoldier->stats.bLife < OKLIFE ) ) { @@ -8550,6 +8587,25 @@ void DetermineMapIntelData( INT32 asSectorZ ) } } + // transport groups + std::map map = GetTransportGroupSectorInfo(); + for (const auto iter : map) + { + CHAR16 str[128]; + + switch (iter.second) + { + case TransportGroupSectorInfo::TransportGroupSectorInfo_LocatedGroup: + swprintf( str, gpStrategicString[STR_PB_TRANSPORT_GROUP]); + break; + + case TransportGroupSectorInfo::TransportGroupSectorInfo_LocatedDestination: + swprintf( str, gpStrategicString[STR_PB_TRANSPORT_GROUP_EN_ROUTE]); + break; + } + AddIntelAndQuestMapDataForSector( SECTORX(iter.first), SECTORY(iter.first), MAP_SHADE_LT_YELLOW, -1, str, L"" ); + } + // uncovered terrorists we know of for ( int cnt = 0; cnt < 6; ++cnt ) { diff --git a/Strategic/Map Screen Interface TownMine Info.cpp b/Strategic/Map Screen Interface TownMine Info.cpp index 31a05010..17294d0a 100644 --- a/Strategic/Map Screen Interface TownMine Info.cpp +++ b/Strategic/Map Screen Interface TownMine Info.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "HelpScreen.h" -#else #include "Map Screen Interface TownMine Info.h" #include "strategicmap.h" #include "popupbox.h" @@ -31,7 +27,6 @@ #include "Overhead.h" // added by Flugente #include "Game Clock.h" // added by Flugente #include "Game Event Hook.h" // added by Flugente -#endif #include "Strategic Mines.h" diff --git a/Strategic/Map Screen Interface.cpp b/Strategic/Map Screen Interface.cpp index 4b90b9e5..19f9b19d 100644 --- a/Strategic/Map Screen Interface.cpp +++ b/Strategic/Map Screen Interface.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Map Screen Interface.h" #include "string.h" #include "Map Screen Interface Map.h" @@ -56,7 +53,6 @@ #include "Food.h" #include "Personnel.h" #include "mapscreen.h" -#endif #include "connect.h" @@ -1938,7 +1934,7 @@ void UpdateCharRegionHelpText( void ) pSoldier = MercPtrs[ gCharactersList[ bSelectedInfoChar ].usSolID ]; // health/energy/morale - if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) + if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) { if ( pSoldier->stats.bLife != 0 ) { @@ -2963,85 +2959,6 @@ void DisplayUserDefineHelpTextRegions( FASTHELPREGION *pRegion ) -extern void DisplayHelpTokenizedString( const STR16 pStringA, INT16 sX, INT16 sY ); -extern INT16 GetNumberOfLinesInHeight( const STR16 pStringA ); -extern INT16 GetWidthOfString( const STR16 pStringA ); - -void DisplaySoldierToolTip( FASTHELPREGION *pRegion ) -{ - UINT16 usFillColor; - INT32 iX,iY,iW,iH; - UINT8 *pDestBuf; - UINT32 uiDestPitchBYTES; - - - // grab the color for the background region - usFillColor = Get16BPPColor(FROMRGB(250, 240, 188)); - - - iX = pRegion->iX; - iY = pRegion->iY; - // get the width and height of the string - //iW = (INT32)( pRegion->iW ) + 14; - iW = (INT32)GetWidthOfString( pRegion->FastHelpText ) + 10; - - //iH = IanWrappedStringHeight( ( UINT16 )iX, ( UINT16 )iY, ( UINT16 )( pRegion->iW ), 0, FONT10ARIAL, FONT_BLACK, pRegion->FastHelpText, FONT_BLACK, TRUE, 0 ); - iH = (INT32)( GetNumberOfLinesInHeight( pRegion->FastHelpText ) * (GetFontHeight(FONT10ARIAL)+1) + 8 ); - - // tack on the outer border - iH += 14; - - // gone not far enough? - if ( iX < 0 ) - iX = 0; - - // gone too far - if ( ( pRegion->iX + iW ) >= SCREEN_WIDTH ) - iX = (SCREEN_WIDTH - iW - 4); - - // what about the y value? - iY = (INT32)pRegion->iY - ( iH * 3 / 4); - - // not far enough - if (iY < 0) - iY = 0; - - // too far - if ( (iY + iH) >= SCREEN_HEIGHT ) - iY = (SCREEN_HEIGHT - iH - 15); - - pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); - SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); - RectangleDraw( TRUE, iX + 1, iY + 1, iX + iW - 1, iY + iH - 1, Get16BPPColor( FROMRGB( 65, 57, 15 ) ), pDestBuf ); - RectangleDraw( TRUE, iX, iY, iX + iW - 2, iY + iH - 2, Get16BPPColor( FROMRGB( 227, 198, 88 ) ), pDestBuf ); - UnLockVideoSurface( FRAME_BUFFER ); - ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); - ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); - - // fillt he video surface areas - //ColorFillVideoSurfaceArea(FRAME_BUFFER, iX, iY, (iX + iW), (iY + iH), 0); - //ColorFillVideoSurfaceArea(FRAME_BUFFER, (iX + 1), (iY + 1), (iX + iW - 1), (iY + iH - 1), usFillColor); - - SetFont( FONT10ARIAL ); - SetFontForeground( FONT_BEIGE ); - - //iH = ( INT32 )DisplayWrappedString( ( INT16 )( iX + 10 ), ( INT16 )( iY + 6 ), ( INT16 )pRegion->iW, 0, FONT10ARIAL, FONT_BEIGE, pRegion->FastHelpText, FONT_NEARBLACK, TRUE, 0 ); - - DisplayHelpTokenizedString( pRegion->FastHelpText ,( INT16 )( iX + 5 ), ( INT16 )( iY + 5 ) ); - - iHeightOfInitFastHelpText = iH + 20; - - InvalidateRegion( iX, iY, (iX + iW) , (iY + iH + 20 ) ); -} - - - - - - - - - void DisplayFastHelpForInitialTripInToMapScreen( FASTHELPREGION *pRegion ) { if( gTacticalStatus.fDidGameJustStart ) @@ -3713,7 +3630,7 @@ void SetUpMovingListsForSector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ ) pSoldier = MercPtrs[ gCharactersList[ iCounter ].usSolID ]; if( ( pSoldier->bActive ) && - ( pSoldier->bAssignment != IN_TRANSIT ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && !SPY_LOCATION( pSoldier->bAssignment ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && + ( pSoldier->bAssignment != IN_TRANSIT ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && !SPY_LOCATION( pSoldier->bAssignment ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && ( pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) && ( pSoldier->sSectorX == sSectorX ) && ( pSoldier->sSectorY == sSectorY ) && ( pSoldier->bSectorZ == sSectorZ ) ) { if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) @@ -6097,8 +6014,8 @@ BOOLEAN CanCharacterMoveInStrategic( SOLDIERTYPE *pSoldier, INT8 *pbErrorNumber return( FALSE ); } - // mini event? - if ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) + // mini event/rebel command? + if ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) { *pbErrorNumber = 29; return( FALSE ); diff --git a/Strategic/MapScreen Quotes.cpp b/Strategic/MapScreen Quotes.cpp index 0d8f8836..b90be26f 100644 --- a/Strategic/MapScreen Quotes.cpp +++ b/Strategic/MapScreen Quotes.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Map Screen Interface.h" #include "string.h" #include "Map Screen Interface Map.h" @@ -47,7 +44,6 @@ #include "Air Raid.h" #include "Queen Command.h" #include "Render Fun.h" -#endif #include "connect.h" @@ -477,4 +473,4 @@ BOOLEAN HasJerryAlreadySaidTheMapScreenIntroSequence() } } -#endif \ No newline at end of file +#endif diff --git a/Strategic/Meanwhile.cpp b/Strategic/Meanwhile.cpp index 682cae21..ad9cdb8a 100644 --- a/Strategic/Meanwhile.cpp +++ b/Strategic/Meanwhile.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "sgp.h" #include "meanwhile.h" #include "PreBattle Interface.h" @@ -36,7 +33,6 @@ #include "Campaign Types.h" #include "Squads.h" #include "Random.h" -#endif #include "GameInitOptionsScreen.h" diff --git a/Strategic/Merc Contract.cpp b/Strategic/Merc Contract.cpp index 69b1f419..01fb52ee 100644 --- a/Strategic/Merc Contract.cpp +++ b/Strategic/Merc Contract.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Types.h" #include "Merc Contract.h" #include "Soldier Profile.h" @@ -38,7 +35,6 @@ #include "Vehicles.h" #include "email.h" #include "Map Screen Helicopter.h" -#endif #include "GameSettings.h" #include "connect.h" @@ -1377,42 +1373,6 @@ BOOLEAN HandleFiredDeadMerc( SOLDIERTYPE *pSoldier ) { AddCharacterToDeadList( pSoldier ); -#if 0 - //if the dead merc is in the current sector - if( pSoldier->sSectorX == gWorldSectorX && - pSoldier->sSectorY == gWorldSectorY && - pSoldier->bSectorZ == gbWorldSectorZ ) - { - TurnSoldierIntoCorpse( pSoldier, FALSE, FALSE ); - } - else - { - ROTTING_CORPSE_DEFINITION Corpse; - - // Setup some values! - Corpse.ubBodyType = pSoldier->ubBodyType; - Corpse.sGridNo = pSoldier->sInsertionGridNo; - Corpse.dXPos = pSoldier->dXPos; - Corpse.dYPos = pSoldier->dYPos; - Corpse.sHeightAdjustment = pSoldier->sHeightAdjustment; - - SET_PALETTEREP_ID ( Corpse.HeadPal, pSoldier->HeadPal ); - SET_PALETTEREP_ID ( Corpse.VestPal, pSoldier->VestPal ); - SET_PALETTEREP_ID ( Corpse.SkinPal, pSoldier->SkinPal ); - SET_PALETTEREP_ID ( Corpse.PantsPal, pSoldier->PantsPal ); - - Corpse.bDirection = pSoldier->ubDirection; - - // Set time of death - Corpse.uiTimeOfDeath = GetWorldTotalMin( ); - - // Set type - Corpse.ubType = (UINT8)gubAnimSurfaceCorpseID[ pSoldier->ubBodyType][ pSoldier->usAnimState ]; - - //Add the rotting corpse info to the sectors unloaded rotting corpse file - AddRottingCorpseToUnloadedSectorsRottingCorpseFile( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, &Corpse); - } -#endif return( TRUE ); } diff --git a/Strategic/MilitiaSquads.cpp b/Strategic/MilitiaSquads.cpp index 963f5b5a..303ea283 100644 --- a/Strategic/MilitiaSquads.cpp +++ b/Strategic/MilitiaSquads.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Town Militia.h" #include "Militia Control.h" #include "Campaign Types.h" @@ -30,7 +27,6 @@ #include "mapscreen.h" #include "Strategic Pathing.h" #include "GameVersion.h" -#endif #include "connect.h" #include "MilitiaSquads.h" diff --git a/Strategic/MiniEvents.cpp b/Strategic/MiniEvents.cpp index 99a5585c..88516ea3 100644 --- a/Strategic/MiniEvents.cpp +++ b/Strategic/MiniEvents.cpp @@ -9,10 +9,6 @@ Mini events are set up in MiniEvents.lua. This file handles mini event triggers to call into. */ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "MiniEvents.h" #include "Assignments.h" @@ -44,7 +40,6 @@ to call into. #include "Text.h" #include "Town Militia.h" #include "Vehicles.h" -#endif extern "C" { #include "lua.h" @@ -346,7 +341,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bLife = min(gMercProfiles[merc->ubProfile].bLife, gMercProfiles[merc->ubProfile].bLifeMax); merc->usValueGoneUp &= ~( HEALTH_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bLifeDelta += amount; merc->usValueGoneUp |= HEALTH_INCREASE; @@ -364,7 +359,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bStrength = merc->stats.bStrength; merc->usValueGoneUp &= ~( STRENGTH_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bStrengthDelta += amount; merc->usValueGoneUp |= STRENGTH_INCREASE; @@ -382,7 +377,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bAgility = merc->stats.bAgility; merc->usValueGoneUp &= ~( AGIL_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bAgilityDelta += amount; merc->usValueGoneUp |= AGIL_INCREASE; @@ -400,7 +395,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bDexterity = merc->stats.bDexterity; merc->usValueGoneUp &= ~( DEX_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bDexterityDelta += amount; merc->usValueGoneUp |= DEX_INCREASE; @@ -418,7 +413,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bWisdom = merc->stats.bWisdom; merc->usValueGoneUp &= ~( WIS_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bWisdomDelta += amount; merc->usValueGoneUp |= WIS_INCREASE; @@ -435,7 +430,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bLeadership = merc->stats.bLeadership; merc->usValueGoneUp &= ~( LDR_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bLeadershipDelta += amount; merc->usValueGoneUp |= LDR_INCREASE; @@ -452,7 +447,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bMarksmanship = merc->stats.bMarksmanship; merc->usValueGoneUp &= ~( MRK_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bMarksmanshipDelta += amount; merc->usValueGoneUp |= MRK_INCREASE; @@ -469,7 +464,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bMechanical = merc->stats.bMechanical; merc->usValueGoneUp &= ~( MECH_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bMechanicDelta += amount; merc->usValueGoneUp |= MECH_INCREASE; @@ -486,7 +481,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bExplosive = merc->stats.bExplosive; merc->usValueGoneUp &= ~( EXP_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bExplosivesDelta += amount; merc->usValueGoneUp |= EXP_INCREASE; @@ -503,7 +498,7 @@ namespace MiniEventHelpers gMercProfiles[merc->ubProfile].bMedical = merc->stats.bMedical; merc->usValueGoneUp &= ~( MED_INCREASE ); } - else + else if (amount > 0) { gMercProfiles[merc->ubProfile].bMedicalDelta += amount; merc->usValueGoneUp |= MED_INCREASE; @@ -511,8 +506,11 @@ namespace MiniEventHelpers break; } - BuildStatChangeString(wTempString, merc->GetName(), amount > 0, amount > 0 ? amount : -amount, statId); - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, wTempString ); + if (amount != 0) + { + BuildStatChangeString(wTempString, merc->GetName(), amount > 0, amount > 0 ? amount : -amount, statId); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, wTempString ); + } }); return 0; @@ -1529,6 +1527,7 @@ void MiniEventsLua(UINT32 eventId) && pSoldier->stats.bLife > 0 && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_POW + && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && !(pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE)) { gAllMercs.push_back(pSoldier); diff --git a/Strategic/Player Command.cpp b/Strategic/Player Command.cpp index 5da09c71..efa91292 100644 --- a/Strategic/Player Command.cpp +++ b/Strategic/Player Command.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Player Command.h" #include "Queen Command.h" #include "Campaign Types.h" @@ -30,7 +27,6 @@ #include "CampaignStats.h" // added by Flugente #include "Town Militia.h" // added by Flugente #include "LuaInitNPCs.h" // added by Flugente -#endif #include "postalservice.h" @@ -527,22 +523,10 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO UpdateRefuelSiteAvailability( ); } - //shadooow: re-enable quest if player loses control of the N7 prison and quest was disabled previously - if (sMapX == gModSettings.ubMeanwhileInterrogatePOWSectorX && sMapY == gModSettings.ubMeanwhileInterrogatePOWSectorY && gubQuest[QUEST_INTERROGATION] == QUESTCANNOTSTART) - { - gubQuest[QUEST_INTERROGATION] = QUESTNOTSTARTED; - } - //shadooow: re-enable quest if player loses control of the Alma prison and quest was disabled previously - if (sMapX == gModSettings.ubInitialPOWSectorX && sMapY == gModSettings.ubInitialPOWSectorY && gubQuest[QUEST_HELD_IN_ALMA] == QUESTCANNOTSTART) - { - gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED; - } #ifndef JA2UB - //shadooow: re-enable quest if player loses control of the Tixa prison and quest was disabled previously - if (sMapX == gModSettings.ubTixaPrisonSectorX && sMapY == gModSettings.ubTixaPrisonSectorY && gubQuest[QUEST_HELD_IN_TIXA] == QUESTCANNOTSTART) - { - gubQuest[QUEST_HELD_IN_TIXA] = QUESTNOTSTARTED; - } + HandlePOWQuestState(Q_RESET, QUEST_INTERROGATION, sMapX, sMapY, bMapZ); + HandlePOWQuestState(Q_RESET, QUEST_HELD_IN_ALMA, sMapX, sMapY, bMapZ); + HandlePOWQuestState(Q_RESET, QUEST_HELD_IN_TIXA, sMapX, sMapY, bMapZ); #endif // Flugente: reduce workforce SectorInfo[SECTOR( sMapX, sMapY )].usWorkers = SectorInfo[SECTOR( sMapX, sMapY )].usWorkers * gGameExternalOptions.dInitialWorkerRate; diff --git a/Strategic/PreBattle Interface.cpp b/Strategic/PreBattle Interface.cpp index a3bacc9b..b4b68ff1 100644 --- a/Strategic/PreBattle Interface.cpp +++ b/Strategic/PreBattle Interface.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "builddefines.h" #include #include "PreBattle Interface.h" @@ -50,7 +47,7 @@ #include "CampaignStats.h" // added by Flugente #include "militiasquads.h" // added by Flugente #include "SkillCheck.h" // added by Flugente -#endif + #include "Strategic Transport Groups.h" #ifdef JA2UB #include "ub_config.h" @@ -442,7 +439,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) } else if ( pBattleGroup && pBattleGroup->usGroupTeam != OUR_TEAM && NumNonPlayerTeamMembersInSector( pBattleGroup->ubSectorX, pBattleGroup->ubSectorY, MILITIA_TEAM ) > 0 ) { - SetEnemyEncounterCode( ENEMY_ENCOUNTER_CODE ); + SetEnemyEncounterCode( pBattleGroup->usGroupTeam == ENEMY_TEAM && pBattleGroup->pEnemyGroup->ubIntention == TRANSPORT ? TRANSPORT_INTERCEPT_CODE : ENEMY_ENCOUNTER_CODE ); } else if( GetEnemyEncounterCode() == ENTERING_ENEMY_SECTOR_CODE || GetEnemyEncounterCode() == ENEMY_ENCOUNTER_CODE || @@ -456,7 +453,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) GetEnemyEncounterCode() == CONCEALINSERTION_CODE || GetEnemyEncounterCode() == BLOODCAT_ATTACK_CODE || GetEnemyEncounterCode() == ZOMBIE_ATTACK_CODE || - GetEnemyEncounterCode() == BANDIT_ATTACK_CODE ) + GetEnemyEncounterCode() == BANDIT_ATTACK_CODE || + GetEnemyEncounterCode() == TRANSPORT_INTERCEPT_CODE ) { //use same code SetExplicitEnemyEncounterCode( GetEnemyEncounterCode() ); @@ -683,8 +681,24 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) { SetEnemyEncounterCode( ENEMY_ENCOUNTER_CODE ); + GROUP* pGroup = gpGroupList; + BOOLEAN encounteredTransportGroup = FALSE; + while (pGroup) + { + if (pGroup->usGroupTeam == ENEMY_TEAM && pGroup->pEnemyGroup->ubIntention == TRANSPORT && pGroup->ubSectorX == gpBattleGroup->ubSectorX && pGroup->ubSectorY == gpBattleGroup->ubSectorY && pGroup->ubSectorZ == gpBattleGroup->ubSectorZ) + { + encounteredTransportGroup = TRUE; + break; + } + + pGroup = pGroup->next; + } + if (encounteredTransportGroup) + { + SetEnemyEncounterCode( TRANSPORT_INTERCEPT_CODE ); + } // Flugente: no ambushes on an airdrop - if ( !fAirDrop ) + else if ( !fAirDrop ) { //Don't consider ambushes until the player has reached 25% (normal) progress if( gfHighPotentialForAmbush ) @@ -802,7 +816,9 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) } else { //Are enemies invading a town, or just encountered the player. - if( GetTownIdForSector( gubPBSectorX, gubPBSectorY ) ) + if (pBattleGroup && pBattleGroup->usGroupTeam == ENEMY_TEAM && pBattleGroup->pEnemyGroup->ubIntention == TRANSPORT) + SetEnemyEncounterCode( TRANSPORT_INTERCEPT_CODE ); + else if( GetTownIdForSector( gubPBSectorX, gubPBSectorY ) ) SetEnemyEncounterCode( ENEMY_INVASION_CODE ); //SAM sites not in towns will also be considered to be important else if( pSector->uiFlags & SF_SAM_SITE ) @@ -870,7 +886,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) } HideButton( giMapContractButton ); - if( GetEnemyEncounterCode() == ENEMY_ENCOUNTER_CODE ) + if( GetEnemyEncounterCode() == ENEMY_ENCOUNTER_CODE || GetEnemyEncounterCode() == TRANSPORT_INTERCEPT_CODE ) { //we know how many enemies are here, so until we leave the sector, we will continue to display the value. //the flag will get cleared when time advances after the fEnemyInSector flag is clear. @@ -959,6 +975,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ) { case CREATURE_ATTACK_CODE: case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: case ENEMY_INVASION_CODE: case ENEMY_INVASION_AIRDROP_CODE: case BLOODCAT_ATTACK_CODE: @@ -1217,6 +1234,7 @@ void RenderPBHeader( INT32 *piX, INT32 *piWidth) swprintf( str, gpStrategicString[ STR_PB_ENEMYINVASION_HEADER ] ); break; case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: swprintf( str, gpStrategicString[ STR_PB_ENEMYENCOUNTER_HEADER ] ); break; case ENEMY_AMBUSH_CODE: @@ -2145,6 +2163,15 @@ void PutNonSquadMercsInPlayerGroupOnSquads( GROUP *pGroup, BOOLEAN fExitVehicles // because if this is a simultaneous group attack, the mercs could be coming from different sides, and the // placement screen can't handle mercs on the same squad arriving from difference edges! fSuccess = AddCharacterToSquad( pSoldier, bUniqueVehicleSquad ); + // if we failed, create another squad + if (!fSuccess) + { + bUniqueVehicleSquad = GetFirstEmptySquad(); + if (bUniqueVehicleSquad != -1) + { + fSuccess = AddCharacterToSquad(pSoldier, bUniqueVehicleSquad); + } + } } //CHRISL: So what's supposed to happen in the merc is assigned to a vehicle but fExitVehicles is FALSE? else @@ -2376,6 +2403,7 @@ BOOLEAN PlayerMercInvolvedInThisCombat( SOLDIERTYPE *pSoldier ) pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_DEAD && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && + pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && !(pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) && // Robot is involved if it has a valid controller with it, uninvolved otherwise ( !AM_A_ROBOT( pSoldier ) || ( pSoldier->ubRobotRemoteHolderID != NOBODY ) ) && @@ -2514,6 +2542,10 @@ void LogBattleResults( UINT8 ubVictoryCode) break; case CONCEALINSERTION_CODE: break; + case TRANSPORT_INTERCEPT_CODE: + AddHistoryToPlayersLog( HISTORY_INTERCEPTED_TRANSPORT_GROUP, 0, GetWorldTotalMin(), sSectorX, sSectorY ); + NotifyTransportGroupDefeated(); + break; } // Flugente: campaign stats @@ -2528,6 +2560,7 @@ void LogBattleResults( UINT8 ubVictoryCode) AddHistoryToPlayersLog( HISTORY_LOSTTOWNSECTOR, 0, GetWorldTotalMin(), sSectorX, sSectorY ); break; case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: AddHistoryToPlayersLog( HISTORY_LOSTBATTLE, 0, GetWorldTotalMin(), sSectorX, sSectorY ); break; case ENEMY_AMBUSH_CODE: @@ -2561,6 +2594,7 @@ void LogBattleResults( UINT8 ubVictoryCode) gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACK_ENEMY; break; case ENEMY_ENCOUNTER_CODE: + case TRANSPORT_INTERCEPT_CODE: case ENTERING_ENEMY_SECTOR_CODE: case CREATURE_ATTACK_CODE: case ENTERING_BLOODCAT_LAIR_CODE: diff --git a/Strategic/PreBattle Interface.h b/Strategic/PreBattle Interface.h index d8bc045e..78070486 100644 --- a/Strategic/PreBattle Interface.h +++ b/Strategic/PreBattle Interface.h @@ -47,6 +47,8 @@ enum BLOODCAT_ATTACK_CODE, // Flugente: like CREATURE_ATTACK_CODE, but with cats ZOMBIE_ATTACK_CODE, // Flugente: like CREATURE_ATTACK_CODE, but with zombies BANDIT_ATTACK_CODE, // Flugente: like CREATURE_ATTACK_CODE, but with bandits + + TRANSPORT_INTERCEPT_CODE, // rftr: like ENEMY_ENCOUNTER_CODE }; extern BOOLEAN gfAutoAmbush; @@ -112,4 +114,4 @@ enum }; void LogBattleResults( UINT8 ubVictoryCode); -#endif \ No newline at end of file +#endif diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index 0ecf8901..676c21d3 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -1,9 +1,5 @@ //Queen Command.c -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Queen Command.h" #include "Strategic Event Handler.h" #include "Overhead Types.h" @@ -45,7 +41,8 @@ #include "Morale.h" #include "CampaignStats.h" // added by Flugente #include "ASD.h" // added by Flugente -#endif + #include "Interface Panels.h" + #include "Strategic Transport Groups.h" #ifdef JA2BETAVERSION extern BOOLEAN gfClearCreatureQuest; @@ -102,7 +99,6 @@ void HandleBloodCatDeaths( SECTORINFO *pSector ); extern void Ensure_RepairedGarrisonGroup( GARRISON_GROUP **ppGarrison, INT32 *pGarraySize ); - void ValidateEnemiesHaveWeapons() { #ifdef JA2BETAVERSION @@ -299,7 +295,7 @@ UINT16 NumPlayerTeamMembersInSector( INT16 sSectorX, INT16 sSectorY, INT8 sSecto // we test several conditions before we allow adding an opinion // other merc must be active, have a profile, be someone else and not be in transit or dead if ( pTeamSoldier->bActive && !pTeamSoldier->flags.fBetweenSectors && pTeamSoldier->stats.bLife > 0 && !(pTeamSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) && - !(pTeamSoldier->bAssignment == IN_TRANSIT || pTeamSoldier->bAssignment == ASSIGNMENT_DEAD || pTeamSoldier->bAssignment == ASSIGNMENT_POW || pTeamSoldier->bAssignment == ASSIGNMENT_MINIEVENT) && + !(pTeamSoldier->bAssignment == IN_TRANSIT || pTeamSoldier->bAssignment == ASSIGNMENT_DEAD || pTeamSoldier->bAssignment == ASSIGNMENT_POW || pTeamSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pTeamSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) && (pTeamSoldier->sSectorX == sSectorX && pTeamSoldier->sSectorY == sSectorY && pTeamSoldier->bSectorZ == sSectorZ) ) { ++teammemberspresent; @@ -617,6 +613,9 @@ BOOLEAN PrepareEnemyForSectorBattle() gfPendingNonPlayerTeam[ENEMY_TEAM] = FALSE; + // rftr: clear cached transport groups + ClearTransportGroupMap(); + if( gbWorldSectorZ > 0 ) return PrepareEnemyForUndergroundBattle(); @@ -644,9 +643,9 @@ BOOLEAN PrepareEnemyForSectorBattle() for( unsigned ubIndex = 0; ubIndex < ubDirNumber; ++ubIndex ) { - while ( NumMobileEnemiesInSector( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ) ) && GetNonPlayerGroupInSector( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), ENEMY_TEAM ) ) + while ( NumMobileEnemiesInSector( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ) ) && GetNonPlayerGroupInSectorForReinforcement( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), ENEMY_TEAM ) ) { - pGroup = GetNonPlayerGroupInSector( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), ENEMY_TEAM ); + pGroup = GetNonPlayerGroupInSectorForReinforcement( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), ENEMY_TEAM ); pGroup->ubPrevX = pGroup->ubSectorX; pGroup->ubPrevY = pGroup->ubSectorY; @@ -673,10 +672,23 @@ BOOLEAN PrepareEnemyForSectorBattle() HandleArrivalOfReinforcements( pGroup ); } + // for transport groups, track how many enemies of each type we're adding so we can update drops for them + if (pGroup->usGroupTeam == ENEMY_TEAM && pGroup->pEnemyGroup->ubIntention == TRANSPORT && pGroup->ubSectorX == gWorldSectorX && pGroup->ubSectorY == gWorldSectorY && !gbWorldSectorZ) + { + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ADMINISTRATOR, pGroup->pEnemyGroup->ubNumAdmins); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ARMY, pGroup->pEnemyGroup->ubNumTroops); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ELITE, pGroup->pEnemyGroup->ubNumElites); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ROBOT, pGroup->pEnemyGroup->ubNumRobots); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_JEEP, pGroup->pEnemyGroup->ubNumJeeps); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_TANK, pGroup->pEnemyGroup->ubNumTanks); + } + pGroup = pGroup->next; } } + UpdateTransportGroupInventory(); + ValidateEnemiesHaveWeapons(); UnPauseGame(); return ( ( BOOLEAN) ( gpBattleGroup->ubGroupSize > 0 ) ); @@ -856,6 +868,7 @@ BOOLEAN PrepareEnemyForSectorBattle() if ( pGroup->usGroupTeam == ENEMY_TEAM && !pGroup->fVehicle && pGroup->ubSectorX == gWorldSectorX && pGroup->ubSectorY == gWorldSectorY && !gbWorldSectorZ ) { //Process enemy group in sector. + const BOOLEAN isTransportGroup = pGroup->pEnemyGroup->ubIntention == TRANSPORT; if( sNumSlots > 0 ) { AssertGE(pGroup->pEnemyGroup->ubNumAdmins, pGroup->pEnemyGroup->ubAdminsInBattle); @@ -869,6 +882,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubAdminsInBattle += ubNumAdmins; ubTotalAdmins += ubNumAdmins; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ADMINISTRATOR, ubNumAdmins); } if( sNumSlots > 0 ) { //Add regular army forces. @@ -883,6 +899,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubTroopsInBattle += ubNumTroops; ubTotalTroops += ubNumTroops; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ARMY, ubNumTroops); } if( sNumSlots > 0 ) { //Add elite troops @@ -897,6 +916,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubElitesInBattle += ubNumElites; ubTotalElites += ubNumElites; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ELITE, ubNumElites); } if( sNumSlots > 0 ) { //Add robots @@ -911,6 +933,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubRobotsInBattle += ubNumRobots; ubTotalRobots += ubNumRobots; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ROBOT, ubNumRobots); } if( sNumSlots > 0 ) { //Add tanks @@ -925,6 +950,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubTanksInBattle += ubNumTanks; ubTotalTanks += ubNumTanks; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_TANK, ubNumTanks); } if ( sNumSlots > 0 ) { @@ -940,6 +968,9 @@ BOOLEAN PrepareEnemyForSectorBattle() } pGroup->pEnemyGroup->ubJeepsInBattle += ubNumJeeps; ubTotalJeeps += ubNumJeeps; + + if (isTransportGroup) + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_JEEP, ubNumJeeps); } //NOTE: //no provisions for profile troop leader or retreat groups yet. @@ -980,6 +1011,7 @@ BOOLEAN PrepareEnemyForSectorBattle() unsigned firstSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID; unsigned lastSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID; unsigned slotsAvailable = lastSlot-firstSlot+1; + while( pGroup && sNumSlots > 0 ) { if ( pGroup->usGroupTeam != OUR_TEAM && !pGroup->fVehicle && @@ -1092,6 +1124,7 @@ BOOLEAN PrepareEnemyForSectorBattle() } break; } + } // Flugente: instead of just crashing the game without any explanation to the user, ignore this issue if it still exists. @@ -1107,6 +1140,8 @@ BOOLEAN PrepareEnemyForSectorBattle() pGroup = pGroup->next; } + UpdateTransportGroupInventory(); + ValidateEnemiesHaveWeapons(); UnPauseGame(); @@ -2149,6 +2184,16 @@ void AddEnemiesToBattle( GROUP *pGroup, UINT8 ubStrategicInsertionCode, UINT8 ub UINT8 ubTotalSoldiers; UINT8 bDesiredDirection=0; + // while transport groups can't normally reinforce, this covers the case where a transport group enters a sector (via normal movement) + // where a battle is in progress. + if (pGroup && pGroup->pEnemyGroup->ubIntention == TRANSPORT) + { + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ADMINISTRATOR, ubNumAdmins); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ARMY, ubNumTroops); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_ELITE, ubNumElites); + AddToTransportGroupMap(pGroup->ubGroupID, SOLDIER_CLASS_JEEP, ubNumJeeps); + } + switch( ubStrategicInsertionCode ) { case INSERTION_CODE_NORTH: bDesiredDirection = SOUTHEAST; break; @@ -2721,43 +2766,31 @@ void BeginCaptureSquence( ) void EndCaptureSequence( ) { -#ifdef JA2UB -// no UB -#else - +#ifndef JA2UB // Set flag... if( !( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ) || !(gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE) ) { - // CJC Dec 1 2002: fixing multiple captures: - //gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE; - if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED ) { - // CJC Dec 1 2002: fixing multiple captures: gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE; StartQuest( QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY ); } - // CJC Dec 1 2002: fixing multiple captures: - //else if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTDONE ) - else if (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) + else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) { - // CJC Dec 1 2002: fixing multiple captures: gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE; StartQuest(QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY); } - else if (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) + else if (gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) { StartQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY ); - // CJC Dec 1 2002: fixing multiple captures: gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE; // OK! - Schedule Meanwhile now! HandleInterrogationMeanwhileScene(); } - // CJC Dec 1 2002: fixing multiple captures else { - // !?!? set both flags + // Set both flags if we can't start any of the three POW quests gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE; gStrategicStatus.uiFlags |= STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE; } @@ -2765,16 +2798,22 @@ void EndCaptureSequence( ) #endif } +int CalculateMaximumPrisonerAmount() +{ +#ifndef JA2UB + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED) { return std::size(gModSettings.iInitialPOWGridNo); } + if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) { return std::size(gModSettings.iTixaPrisonPOWGridNo); } + if (gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) { return std::size(gModSettings.iMeanwhileInterrogatePOWGridNo); } +#endif + return 0; +} + void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) { - UINT32 i; - BOOLEAN fMadeCorpse; - INT32 iNumEnemiesInSector; - +#ifndef JA2UB AssertNotNIL(pSoldier); // ATE: Check first if ! in player captured sequence already - // CJC Dec 1 2002: fixing multiple captures if ( ( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ) && (gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_ESCAPE) ) { return; @@ -2785,6 +2824,7 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) { pSoldier->stats.bLife = 0; pSoldier->iHealableInjury = 0; // added by SANDRO + BOOLEAN fMadeCorpse; HandleSoldierDeath( pSoldier, &fMadeCorpse ); return; } @@ -2795,37 +2835,41 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) return; } + if (pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + { + return; + } + if ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) { return; } - // ATE: Patch fix If in a vehicle, remove from vehicle... - TakeSoldierOutOfVehicle( pSoldier ); - - HandleMoraleEvent( pSoldier, MORALE_MERC_CAPTURED, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ); - - // Change to POW.... - //-add him to a POW assignment/group - if( ( pSoldier->bAssignment != ASSIGNMENT_POW ) ) + if (gStrategicStatus.ubNumCapturedForRescue >= CalculateMaximumPrisonerAmount()) { - SetTimeOfAssignmentChangeForMerc( pSoldier ); + SetTimeOfAssignmentChangeForMerc(pSoldier); + return; } - ChangeSoldiersAssignment( pSoldier, ASSIGNMENT_POW ); - RemoveCharacterFromSquads( pSoldier ); - - WORLDITEM WorldItem; - std::vector pWorldItem; - -#ifdef JA2UB - if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) -#else if (gStrategicStatus.ubNumCapturedForRescue < 3 && (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) -#endif { - INT32 itemdropoffgridno = -1; + // ATE: Patch fix If in a vehicle, remove from vehicle... + TakeSoldierOutOfVehicle(pSoldier); + HandleMoraleEvent(pSoldier, MORALE_MERC_CAPTURED, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ); + + // Change to POW.... + //-add him to a POW assignment/group + if ((pSoldier->bAssignment != ASSIGNMENT_POW)) + { + SetTimeOfAssignmentChangeForMerc(pSoldier); + } + + ChangeSoldiersAssignment(pSoldier, ASSIGNMENT_POW); + RemoveCharacterFromSquads(pSoldier); + + + INT32 itemdropoffgridno = -1; // Is this the first one..? if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED ) { @@ -2837,7 +2881,6 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) pSoldier->usStrategicInsertionData = gModSettings.iInitialPOWGridNo[gStrategicStatus.ubNumCapturedForRescue]; itemdropoffgridno = gModSettings.iInitialPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue]; } - #ifndef JA2UB else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) { //-teleport him to Tixa as originally planned @@ -2848,7 +2891,6 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) pSoldier->usStrategicInsertionData = gModSettings.iTixaPrisonPOWGridNo[gStrategicStatus.ubNumCapturedForRescue]; itemdropoffgridno = gModSettings.iTixaPrisonPOWItemGridNo[gStrategicStatus.ubNumCapturedForRescue]; } - #endif else //if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE ) { //-teleport him to N7 @@ -2860,8 +2902,10 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) } // OK, drop all items! + WORLDITEM WorldItem; + std::vector pWorldItem; UINT32 invsize = pSoldier->inv.size(); - for ( i = 0; i < invsize; ++i ) + for (UINT32 i = 0; i < invsize; ++i ) { if ( pSoldier->inv[i].exists() ) { @@ -2883,34 +2927,40 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier ) pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; gStrategicStatus.ubNumCapturedForRescue++; - } - //Bandaging him would prevent him from dying (due to low HP) - pSoldier->bBleeding = 0; + //Bandaging him would prevent him from dying (due to low HP) + pSoldier->bBleeding = 0; - // wake him up - if ( pSoldier->flags.fMercAsleep ) - { - PutMercInAwakeState( pSoldier ); - pSoldier->flags.fForcedToStayAwake = FALSE; - } + // wake him up + if ( pSoldier->flags.fMercAsleep ) + { + PutMercInAwakeState( pSoldier ); + pSoldier->flags.fForcedToStayAwake = FALSE; + } - //Set his life to 50% + or - 10 HP. - INT8 oldlife = pSoldier->stats.bLife; - pSoldier->stats.bLife = max(35, pSoldier->stats.bLifeMax / 2); + //Set his life to 50% + or - 10 HP. + INT8 oldlife = pSoldier->stats.bLife; + pSoldier->stats.bLife = max(35, pSoldier->stats.bLifeMax / 2); - if ( pSoldier->stats.bLife >= 45 ) - { - pSoldier->stats.bLife += (INT8)(10 - Random( 21 ) ); - } + if ( pSoldier->stats.bLife >= 45 ) + { + pSoldier->stats.bLife += (INT8)(10 - Random( 21 ) ); + } - // SANDRO - make the lost life insta-healable - pSoldier->iHealableInjury = ((pSoldier->stats.bLifeMax - pSoldier->stats.bLife) * 100); + // SANDRO - make the lost life insta-healable + pSoldier->iHealableInjury = ((pSoldier->stats.bLifeMax - pSoldier->stats.bLife) * 100); - // make him quite exhausted when found - pSoldier->bBreath = pSoldier->bBreathMax = 50; - pSoldier->sBreathRed = 0; - pSoldier->flags.fMercCollapsedFlag = FALSE; + // make him quite exhausted when found + pSoldier->bBreath = pSoldier->bBreathMax = 50; + pSoldier->sBreathRed = 0; + pSoldier->flags.fMercCollapsedFlag = FALSE; + + + RemoveSoldierFromTacticalSector(pSoldier, TRUE); + RemovePlayerFromTeamSlotGivenMercID(pSoldier->ubID); + SelectNextAvailSoldier(pSoldier); + } +#endif } @@ -3593,3 +3643,5 @@ void CorrectTurncoatCount( INT16 sSectorX, INT16 sSectorY ) pGroup = pGroup->next; } } + + diff --git a/Strategic/Quest Debug System.cpp b/Strategic/Quest Debug System.cpp index d4daf16c..1cd77da1 100644 --- a/Strategic/Quest Debug System.cpp +++ b/Strategic/Quest Debug System.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Types.h" #include "Quest Debug System.h" #include "WCheck.h" @@ -39,7 +36,6 @@ #include "SysUtil.h" #include "Message.h" #include "Random.h" -#endif //#ifdef JA2BETAVERSION diff --git a/Strategic/Quests.cpp b/Strategic/Quests.cpp index 0f947a77..51e5b27a 100644 --- a/Strategic/Quests.cpp +++ b/Strategic/Quests.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "sgp.h" #include "message.h" #include "quests.h" @@ -32,7 +28,6 @@ #include "strategic.h" #include "Strategic Event Handler.h" #include "Soldier Control.h" -#endif #include "BobbyRMailOrder.h" #include "connect.h" @@ -1601,9 +1596,7 @@ void CheckForQuests( UINT32 uiDay ) { // This function gets called at 8:00 AM time of the day -#ifdef TESTQUESTS ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Checking For Quests, Day %d", uiDay ); -#endif #ifdef JA2UB // ------------------------------------------------------------------------------- @@ -1614,9 +1607,7 @@ void CheckForQuests( UINT32 uiDay ) if( gubQuest[ QUEST_DESTROY_MISSLES ] == QUESTNOTSTARTED ) { StartQuest( QUEST_DESTROY_MISSLES, -1, -1 ); -#ifdef TESTQUESTS ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DESTORY MISSLES quest"); -#endif } //Ja25: No deliver letter quest, dont start it #else @@ -1628,11 +1619,9 @@ void CheckForQuests( UINT32 uiDay ) if (gubQuest[QUEST_DELIVER_LETTER] == QUESTNOTSTARTED) { StartQuest( QUEST_DELIVER_LETTER, -1, -1 ); -#ifdef TESTQUESTS if (!is_networked) ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DELIVER LETTER quest"); -#endif } #endif // This quest gets turned OFF through conversation with Miguel - when user hands @@ -1742,9 +1731,84 @@ void GiveQuestRewardPoint( INT16 sQuestSectorX, INT16 sQuestsSectorY, INT8 bExpR } } +void HandlePOWQuestState(PowQuestState state, Quests quest, INT16 mapX, INT16 mapY, INT8 mapZ) +{ +#ifndef JA2UB + bool correctSector = false; + switch (quest) + { + case QUEST_HELD_IN_ALMA: + correctSector = (mapX == gModSettings.ubInitialPOWSectorX && mapY == gModSettings.ubInitialPOWSectorY && mapZ == 0); + break; + case QUEST_INTERROGATION: + correctSector = (mapX == gModSettings.ubMeanwhileInterrogatePOWSectorX && mapY == gModSettings.ubMeanwhileInterrogatePOWSectorY && mapZ == 0); + break; + case QUEST_HELD_IN_TIXA: + correctSector = (mapX == gModSettings.ubTixaPrisonSectorX && mapY == gModSettings.ubTixaPrisonSectorY && mapZ == 0); + break; + default: + break; + } - - - - - + if (correctSector) + { + switch (state) + { + case Q_FAIL: + // End quest if player loses prison + if (gubQuest[quest] == QUESTINPROGRESS) + { + // Quest failed + InternalEndQuest(quest, mapX, mapY, FALSE); + } + else if (gubQuest[quest] == QUESTCANNOTSTART) + { + // Re-enable quest if player loses control of the prison and quest was disabled previously + gubQuest[quest] = QUESTNOTSTARTED; + } + break; + case Q_SUCCESS: + // End quest if player takes control of the prison + if (gubQuest[quest] == QUESTINPROGRESS) + { + // Complete quest + EndQuest(quest, mapX, mapY); + } + else if (gubQuest[quest] == QUESTNOTSTARTED) + { + // Disable quest if player takes control of the prison + gubQuest[quest] = QUESTCANNOTSTART; + } + break; + case Q_RESET: + // Re-enable quest if player loses control of the prison and quest was disabled previously + if (gubQuest[quest] == QUESTCANNOTSTART) + { + gubQuest[quest] = QUESTNOTSTARTED; + } + break; + case Q_END: + if (gubQuest[quest] == QUESTINPROGRESS) + { + EndQuest(quest, mapX, mapY); + HandleNPCDoAction(0, NPC_ACTION_GRANT_EXPERIENCE_3, 0); + } + break; + case Q_LEFT_SECTOR: + // End interrogation quest if we left the sector, but haven't killed all enemies + if (gubQuest[quest] == QUESTINPROGRESS) + { + // Finish quest, although not give points here... + InternalEndQuest(quest, mapX, mapY, FALSE); + // ... give them manually, but halved + GiveQuestRewardPoint(mapX, mapY, 4, NO_PROFILE); + // Also let us know we finished the quest + ResetHistoryFact(quest, mapX, mapY); + } + break; + default: + break; + } + } +#endif +} diff --git a/Strategic/Quests.h b/Strategic/Quests.h index 9ceab069..117d6199 100644 --- a/Strategic/Quests.h +++ b/Strategic/Quests.h @@ -756,10 +756,13 @@ extern BOOLEAN CheckForNewShipment( void ); extern BOOLEAN CheckTalkerFemale( void ); extern BOOLEAN CheckTalkerUnpropositionedFemale( void ); +enum PowQuestState +{ + Q_FAIL, + Q_SUCCESS, + Q_RESET, + Q_END, + Q_LEFT_SECTOR +}; +void HandlePOWQuestState(PowQuestState state, Quests quest, INT16 mapX, INT16 mapY, INT8 mapZ); #endif - - - - - - diff --git a/Strategic/Rebel Command.cpp b/Strategic/Rebel Command.cpp index 2291b913..b5ce30aa 100644 --- a/Strategic/Rebel Command.cpp +++ b/Strategic/Rebel Command.cpp @@ -15,6 +15,9 @@ Directives can be improved with money. At the start of the campaign, this feature is unavailable, but the player gains access to the ARC website as soon as they complete the food delivery quest for the rebels. +Missions provide powerful temporary bonuses. To enable these bonuses, Supplies must be spent as well as sending +either a generic rebel agent or one of their own mercenaries, the latter providing better mission bonuses. + How to add a new directive: - add to the RebelCommandDirectives enum in the header @@ -37,6 +40,17 @@ How to add a new admin action: - add admin-action-specific effect - if effect applies outside of towns, add help text range band as appropriate to SetupAdminActionBox +How to add a new mission: +- add strings to text files (szRebelCommandText (trait bonuses), szRebelCommandAgentMissionsText (title/description)) +- add to the RebelCommandText and RebelCommandAgentMissions enums in the header +- add to the RebelCommandAgentMissionsText enums in the cpp +- add mission variables to GameSettings +- add values to MissionHelpers::missionInfo table in SetupInfo() +- add to valid check in HandleStrategicEvent() (allows advance from first event/prepare to second event/active effect) +- add to SetupMissionAgentBox() (mission description and merc bonus text) +- add to PrepareMission() +- add mission-specific functions + Points of interest: - Init() - set up rebel command for the first time - SetupInfo() - set constants @@ -44,12 +58,9 @@ Points of interest: - RebelCommandSaveInfo - pretty much everything important is in here */ -#ifdef PRECOMPILEDHEADERS -#include "Laptop All.h" -#include "Strategic All.h" -#else #include "Rebel Command.h" +#include "ASD.h" #include "Button System.h" #include "Campaign.h" #include "Campaign Types.h" @@ -60,34 +71,45 @@ Points of interest: #include "finances.h" #include "Font Control.h" #include "Game Clock.h" +#include "Game Event Hook.h" #include "GameSettings.h" #include "GameVersion.h" #include "input.h" #include "Line.h" -#include "insurance.h" #include "laptop.h" #include "message.h" #include "MessageBoxScreen.h" #include "MilitiaIndividual.h" #include "mousesystem.h" +#include "Overhead Types.h" #include "Queen Command.h" +#include "Quests.h" #include "random.h" #include "SaveLoadGame.h" +#include "Soldier macros.h" +#include "Squads.h" +#include "strategic.h" #include "strategicmap.h" #include "Strategic Mines.h" #include "Strategic Movement.h" #include "Strategic Town Loyalty.h" +#include "Strategic Transport Groups.h" +#include "Structure Wrap.h" +#include "Tactical Save.h" #include "Text.h" #include "Town Militia.h" #include "Utilities.h" +#include "Vehicles.h" #include "WCheck.h" #include "WordWrap.h" -#endif + +#include +#include #define DIRECTIVE_TEXT(id) RCDT_##id##, RCDT_##id##_EFFECT, RCDT_##id##_DESC, RCDT_##id##_IMPROVE, +#define MISSION_TEXT(id) RCAMT_##id##_TITLE, RCAMT_##id##_DESC, #define ADMIN_ACTION_CHANGE_COST 15000 -#define GRANT_SUPPLIES_LOYALTY_GAIN 1000 #define REBEL_COMMAND_DROPDOWN DropDownTemplate::getInstance() @@ -97,29 +119,149 @@ Points of interest: #define WEBSITE_HEIGHT 395 extern UINT32 gCoolnessBySector[256]; -extern UINT32 guiInsuranceBackGround; extern BOOLEAN gfTownUsesLoyalty[MAX_TOWNS]; extern GROUP *gpGroupList; namespace RebelCommand { + +namespace ItemIdCache +{ + // cache these values on load so that we don't need to search for them every time something happens + std::vector gasCans; + std::vector firstAidKits; + std::vector medKits; + std::vector toolKits; + std::vector ammo[10]; // coolness + + void Clear() + { + gasCans.clear(); + firstAidKits.clear(); + medKits.clear(); + toolKits.clear(); + for (int i = 0; i < 10; ++i) + { + ammo[i].clear(); + } + } +} + +namespace MissionHelpers +{ +constexpr UINT16 DEEP_DEPLOYMENT_RANGE_BONUS_COVERT = 1; +constexpr UINT16 DEEP_DEPLOYMENT_RANGE_BONUS_SCOUTING = 2; +constexpr UINT16 DEEP_DEPLOYMENT_RANGE_BONUS_STEALTHY = 3; +constexpr UINT16 DEEP_DEPLOYMENT_RANGE_BONUS_SURVIVAL = 4; +constexpr UINT16 DISRUPT_ASD_STEAL_FUEL = 1; +constexpr UINT16 DISRUPT_ASD_DESTROY_RESERVES = 2; +constexpr UINT16 REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_COVERT = 1; +constexpr UINT16 REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_DEPUTY = 2; +constexpr UINT16 REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_SNITCH = 3; +constexpr UINT16 REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_COVERT = 1; +constexpr UINT16 REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_RADIO = 2; +constexpr UINT16 REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_STEALTHY = 3; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_AUTO_WEAPONS = 1; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_COVERT = 2; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_DEMOLITIONS = 3; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_GUNSLINGER = 4; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_RANGER = 5; +constexpr UINT16 SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_SNIPER = 6; +constexpr UINT16 SABOTAGE_MECHANICAL_UNITS_COVERT = 1; +constexpr UINT16 SABOTAGE_MECHANICAL_UNITS_DEMOLITIONS = 2; +constexpr UINT16 SABOTAGE_MECHANICAL_UNITS_HEAVY_WEAPONS = 3; +constexpr UINT16 TRAIN_MILITIA_ANYWHERE_TEACHING = 1; +constexpr UINT16 SOLDIER_BOUNTIES_KINGPIN_OFFICER_PAYOUTS = 1; +constexpr UINT16 SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS = 2; + + +typedef struct { + std::vector newSkills; + std::vector oldSkills; + std::vector durationBonuses; + std::vector floatModifiers; + std::vector intModifiers; + std::vector extraBits; +} MissionInfo; + +// this vector serves as a comparison table to determine which bonuses will be applied to a mission +// see SetupInfo() for initialisation +std::vector missionInfo; + +// cached param for firing the preparation/first event. used in the mission start confirmation popup callback +UINT32 missionParam; + +void GetMissionInfo(RebelCommandAgentMissions mission, const MERCPROFILESTRUCT* merc, UINT32& durationBonus, FLOAT& floatModifier, INT16& intModifier, int& durationBonusSkill, int& floatModifierSkill, int& intModifierSkill, UINT16& extraBits) +{ + durationBonus = 0; + durationBonusSkill = 0; + floatModifier = 0; + floatModifierSkill = 0; + intModifier = 0; + intModifierSkill = 0; + extraBits = 0; + + if (merc == nullptr) + return; + + if (mission == RCAM_NONE) + return; + + const std::vector* skills = gGameOptions.fNewTraitSystem ? &missionInfo[mission].newSkills : &missionInfo[mission].oldSkills; + + for (int i = 0; i < sizeof(merc->bSkillTraits) / sizeof(merc->bSkillTraits[0]); ++i) + { + for (size_t j = 0; j < skills->size(); ++j) + { + if (merc->bSkillTraits[i] == (*skills)[j]) + { + if (missionInfo[mission].durationBonuses[j] > durationBonus) + { + durationBonus = missionInfo[mission].durationBonuses[j]; + durationBonusSkill = (*skills)[j]; + } + + if (missionInfo[mission].floatModifiers[j] > floatModifier) + { + floatModifier = missionInfo[mission].floatModifiers[j]; + floatModifierSkill = (*skills)[j]; + extraBits = missionInfo[mission].extraBits[j]; + } + + if (missionInfo[mission].intModifiers[j] > intModifier) + { + intModifier = missionInfo[mission].intModifiers[j]; + intModifierSkill = (*skills)[j]; + extraBits = missionInfo[mission].extraBits[j]; + } + } + } + } +} + +} + void DEBUG_DAY(); -void DEBUG_PRINT(); enum WebsiteState { RCS_NATIONAL_OVERVIEW, RCS_REGIONAL_OVERVIEW, + RCS_AGENT_OVERVIEW, }; enum RebelCommandText // keep this synced with szRebelCommandText in the text files { RCT_NATIONAL_OVERVIEW = 0, RCT_REGIONAL_OVERVIEW, + RCT_AGENT_OVERVIEW, + RCT_SELECT_VIEW, RCT_SWITCH_TO_REGIONAL, RCT_SWITCH_TO_NATIONAL, + RCT_SWITCH_TO_AGENT, RCT_SUPPLIES, RCT_INCOMING_SUPPLIES, + RCT_INTEL, RCT_PER_DAY, RCT_CURRENT_DIRECTIVE, RCT_IMPROVE_DIRECTIVE, @@ -177,6 +319,59 @@ enum RebelCommandText // keep this synced with szRebelCommandText in the text fi RCT_PREV_ARROW, RCT_NEXT_ARROW, RCT_CONFIRM_CHANGE_ADMIN_ACTION_PROMPT, + RCT_INSUFFICIENT_SUPPLIES_ADMIN_ACTIONS_DISABLED, + RCT_NEW_MISSIONS_AVAILABLE_TIME, + RCT_NEW_MISSIONS_AVAILABLE_NOTIFICATION, + RCT_MISSION_PREP_IN_PROGRESS, + RCT_MISSION_DURATION_DAYS, + RCT_MISSION_SUCCESS_CHANCE, + RCT_MISSION_AGENT_REDACTED, + RCT_MISSION_AGENT_NAME, + RCT_MISSION_AGENT_LOCATION, + RCT_MISSION_AGENT_ASSIGNMENT, + RCT_MISSION_AGENT_CONTRACT_DAYS, + RCT_MISSION_AGENT_CONTRACT_HOURS, + RCT_MISSION_AGENT_CONTRACT_NONE, + RCT_MISSION_AGENT_BONUS, + RCT_MISSION_BONUS_SUCCESS_CHANCE, + RCT_MISSION_BONUS_DEPLOY_RANGE, + RCT_MISSION_BONUS_ASD_INCOME_REDUCTION, + RCT_MISSION_BONUS_STEAL_FUEL, + RCT_MISSION_BONUS_DESTROY_RESERVES, + RCT_MISSION_BONUS_DECISION_TIME, + RCT_MISSION_BONUS_UNALERTED_VISION_PENALTY, + RCT_MISSION_BONUS_INFANTRY_GEAR_QUALITY, + RCT_MISSION_BONUS_MECHANICAL_STAT_LOSS, + RCT_MISSION_BONUS_MAX_TRAINERS, + RCT_MISSION_BONUS_PAYOUT, + RCT_MISSION_BONUS_PAYOUT_LIMIT_INCREASE, + RCT_MISSION_BONUS_OFFICER_PAYOUT, + RCT_MISSION_BONUS_VEHICLE_PAYOUT, + RCT_MISSION_BONUS_DURATION, + RCT_MISSION_CANT_START_NOT_IN_TOWN, + RCT_MISSION_CANT_START_LOW_LOYALTY, + RCT_MISSION_CANT_START_AGENT_UNAVAILABLE, + RCT_MISSION_CANT_START_CONTRACT_EXPIRING, + RCT_MISSION_CANT_USE_REBEL_AGENT, + RCT_MISSION_CANT_START_BATTLE_IN_PROGRESS, + RCT_MISSION_START_BUTTON, + RCT_MISSION_VIEW_ACTIVE, + RCT_MISSION_VIEW_LIST, + RCT_MISSION_HELP_1, + RCT_MISSION_HELP_2, + RCT_MISSION_HELP_3, + RCT_MISSION_NEXT_AVAILABILITY, + RCT_MISSION_ACTIVE_MISSIONS, + RCT_MISSION_LIST_PREPARING, + RCT_MISSION_LIST_ACTIVE, + RCT_MISSION_POPUP_PART1, + RCT_MISSION_POPUP_PART2_GENERIC, + RCT_MISSION_POPUP_PART2_MALE, + RCT_MISSION_POPUP_PART2_FEMALE, + RCT_MISSION_SUCCESS, + RCT_MISSION_FAILURE, + RCT_MISSION_EXPIRED, + }; enum RebelCommandHelpText // keep this synced with szRebelCommandHelpText in the text files @@ -187,7 +382,6 @@ enum RebelCommandHelpText // keep this synced with szRebelCommandHelpText in the RCHT_ADMIN_TEAM, RCHT_LOYALTY, RCHT_MAX_LOYALTY, - RCHT_GRANT_SUPPLIES, RCHT_AA_TOWN_ONLY, RCHT_AA_TOWN_PLUS_ONE, RCHT_AA_TOWN_PLUS_TWO, @@ -210,21 +404,125 @@ enum RebelCommandDirectivesText // keep this synced with szRebelCommandDirective DIRECTIVE_TEXT(DRAFT) }; +enum RebelCommandAgentMissionsText // keep this synced with szRebelCommandAgentMissionsText in the text files +{ + MISSION_TEXT(DEEP_DEPLOYMENT) + MISSION_TEXT(DISRUPT_ASD) + MISSION_TEXT(FORGE_TRANSPORT_ORDERS) + MISSION_TEXT(GET_ENEMY_MOVEMENT_TARGETS) + MISSION_TEXT(IMPROVE_LOCAL_SHOPS) + MISSION_TEXT(REDUCE_STRATEGIC_DECISION_SPEED) + MISSION_TEXT(REDUCE_UNALERTED_ENEMY_VISION) + MISSION_TEXT(SABOTAGE_INFANTRY_EQUIPMENT) + MISSION_TEXT(SABOTAGE_MECHANICAL_UNITS) + MISSION_TEXT(SEND_SUPPLIES_TO_TOWN) + MISSION_TEXT(SOLDIER_BOUNTIES_KINGPIN) + MISSION_TEXT(TRAIN_MILITIA_ANYWHERE) +}; + enum ChangeAdminActionState { CAAS_INIT, CAAS_CHANGING, }; +enum MissionOverviewSubview +{ + MOS_MISSION_LIST, + MOS_ACTIVE_MISSION_EFFECTS, + MOS_HELP, +}; + +struct MissionFirstEvent +{ + BOOLEAN isFirstEvent; + BOOLEAN sentGenericRebelAgent; + BOOLEAN isMissionSuccess; + UINT8 mercProfileId; + UINT8 missionId; + UINT8 missionDurationInHours; + UINT8 extraBits; +}; + +struct MissionSecondEvent +{ + BOOLEAN isSecondEvent; + BOOLEAN sentGenericRebelAgent; + UINT8 mercProfileId; + UINT8 missionId; + UINT16 extraBits; +}; + +// serialisation/deserialisation functions for passing information into a strategic event param +UINT32 SerialiseMissionFirstEvent(BOOLEAN sentGenericRebelAgent, UINT8 mercProfileId, RebelCommandAgentMissions mission, UINT8 missionDuration, UINT8 extraBits) +{ + UINT32 ret = 0x00000000; + + if (!sentGenericRebelAgent) + ret |= 0x01000000; + + ret |= (mercProfileId << 16); + ret |= (static_cast(mission) << 8); + ret |= missionDuration; + + // extraBits can only be 6 bits + extraBits &= 0x3F; + + ret |= (extraBits << 25); + + return ret; +} + +void DeserialiseMissionFirstEvent(UINT32 param, MissionFirstEvent& evt) +{ + evt.isFirstEvent = ((param >> 31) & 0x00000001) == 0; + evt.sentGenericRebelAgent = ((param >> 24) & 0x00000001) == 0; + evt.isMissionSuccess = (param & 0x000000FF) > 0; + evt.mercProfileId = ((param >> 16) & 0x000000FF); + evt.missionId = ((param >> 8) & 0x000000FF); + evt.missionDurationInHours = (param & 0x000000FF); + evt.extraBits = ((param >> 25) & 0x0000003F); +} + +UINT32 SerialiseMissionSecondEvent(BOOLEAN sentGenericRebelAgent, UINT8 mercProfileId, RebelCommandAgentMissions mission, UINT16 extraBits) +{ + UINT32 ret = 0x80000000; + + if (!sentGenericRebelAgent) + ret |= 0x00010000; + + ret |= (mercProfileId << 8); + ret |= static_cast(mission); + + // extraBits can only be 14 bits + extraBits &= 0x3FFF; + + ret |= (extraBits << 17); + + return ret; +} + +void DeserialiseMissionSecondEvent(UINT32 param, MissionSecondEvent& evt) +{ + evt.isSecondEvent = ((param >> 31) & 0x00000001) == 1; + evt.sentGenericRebelAgent = ((param >> 16) & 0x00000001) == 0; + evt.mercProfileId = ((param >> 8) & 0x000000FF); + evt.missionId = (param & 0x000000FF); + evt.extraBits = ((param >> 17) & 0x0003FFF); +} + // website functions template void ButtonHelper(GUI_BUTTON* btn, INT32 reason, voidFunc onClick); +INT32 CalcIncomingSuppliesPerDay(RebelCommandDirectives directive); void ClearAllButtons(); void ClearAllHelpTextRegions(); void DeployOrReactivateAdminTeam(INT16 regionId); void DropdownSetup(); void GetDirectiveEffect(const RebelCommandDirectives directive, STR16 text); INT32 GetDirectiveImprovementCost(const RebelCommandDirectives directive); +INT32 GetMissionCost(); +INT8 GetMissionSuccessChanceBonus(const MERCPROFILESTRUCT* merc); void ImproveDirective(const RebelCommandDirectives directiveId); void PurchaseAdminAction(INT32 regionId, INT32 actionIndex); void RegionNavNext(); @@ -232,16 +530,26 @@ void RegionNavPrev(); void RenderHeader(RebelCommandText titleText); void RenderNationalOverview(); void RenderRegionalOverview(); +void RenderMissionOverview(); void SetDirectiveDescriptionHelpText(INT32 reason, MOUSE_REGION& region, RebelCommandDirectives text); void SetRegionHelpText(INT32 reason, MOUSE_REGION& helpTextRegion, RebelCommandHelpText text); void SetupAdminActionBox(const UINT8 actionIndex, const UINT16 descriptionText, const UINT16 buttonText); +BOOLEAN SetupMissionAgentBox(UINT16 x, UINT16 y, INT8 index); +void SetWebsiteView(WebsiteState newState); +void PrepareMission(INT8 index); void ToggleWebsiteView(); void UpdateAdminActionChangeList(INT16 regionId); +void ApplyAdditionalASDEffects(); +constexpr BOOLEAN CanAdminActionBeToggled(RebelCommandAdminActions action) { return action != RebelCommandAdminActions::RCAA_SUPPLY_LINE; } +BOOLEAN CanAdminActionBeUsed(INT32 regionIndex, INT32 actionIndex); +void CreateItemAtAirport(UINT16 itemId, INT16 status); INT32 GetAdminActionCostForRegion(INT16 regionId); INT16 GetAdminActionInRegion(INT16 regionId, RebelCommandAdminActions adminAction); UINT8 GetRegionLoyalty(INT16 regionId); void HandleScouting(); +void SendSuppliesToTownMission(); +INT16 SendSuppliesToTownDurationBonus(const MERCPROFILESTRUCT* merc); void SetupInfo(); void UpgradeMilitiaStats(); @@ -250,6 +558,7 @@ std::vector btnIds; ChangeAdminActionState adminActionChangeState; // help text regions +MOUSE_REGION adminActionActiveTextRegion[5]; MOUSE_REGION adminActionHelpTextRegion[6]; MOUSE_REGION adminTeamHelpTextRegion; MOUSE_REGION directiveDescriptionHelpTextRegion; @@ -266,6 +575,9 @@ INT16 iCurrentRegionId = 1; INT32 iIncomingSuppliesPerDay = 0; SaveInfo rebelCommandSaveInfo; WebsiteState websiteState; +INT8 agentIndex[NUM_ARC_AGENT_SLOTS]; +std::unordered_map missionMap; +MissionOverviewSubview missionOverviewSubview = MOS_MISSION_LIST; // website template @@ -285,6 +597,28 @@ void ButtonHelper(GUI_BUTTON* btn, INT32 reason, voidFunc onClick) } } +INT32 CalcIncomingSuppliesPerDay(RebelCommandDirectives directive) +{ + const INT32 base = static_cast(CurrentPlayerProgressPercentage() * gRebelCommandSettings.fIncomeModifier + (directive == RCD_GATHER_SUPPLIES ? rebelCommandSaveInfo.directives[RCD_GATHER_SUPPLIES].GetValue1() : 0)); + const INT32 supplyUpkeep = static_cast(gRebelCommandSettings.fIncomeModifier + 0.5f); + INT32 upkeepCount = 0; + + for (int a = FIRST_TOWN+1; a < NUM_TOWNS; ++a) + { + // ignore this region if there is no active admin team + if (rebelCommandSaveInfo.regions[a].adminStatus != RAS_ACTIVE) + continue; + + for (int b = 0; b < REBEL_COMMAND_MAX_ACTIONS_PER_REGION; ++b) + { + if (rebelCommandSaveInfo.regions[a].IsActive(b) && rebelCommandSaveInfo.regions[a].GetLevel(b) > 0) + upkeepCount++; + } + } + + return base - upkeepCount * supplyUpkeep; +} + void ClearAllButtons() { for (const auto btnId : btnIds) @@ -296,6 +630,8 @@ void ClearAllButtons() void ClearAllHelpTextRegions() { + for (int a = 0; a < 5; a++) + MSYS_RemoveRegion(&adminActionActiveTextRegion[a]); for (int a = 0; a < 6; a++) MSYS_RemoveRegion(&adminActionHelpTextRegion[a]); MSYS_RemoveRegion(&adminTeamHelpTextRegion); @@ -375,6 +711,42 @@ void DropdownSetup() REBEL_COMMAND_DROPDOWN.Create(WEBSITE_LEFT + 5, WEBSITE_TOP + 98); } +BOOLEAN CanAdminActionBeUsed(INT32 regionIndex, INT32 actionIndex) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) return FALSE; + + if (rebelCommandSaveInfo.regions[regionIndex].adminStatus != RAS_ACTIVE) return FALSE; + + if (rebelCommandSaveInfo.regions[regionIndex].GetLevel(actionIndex) == 0) return FALSE; + + if (CanAdminActionBeToggled(rebelCommandSaveInfo.regions[regionIndex].actions[actionIndex]) && !rebelCommandSaveInfo.regions[regionIndex].IsActive(actionIndex)) return FALSE; + + return TRUE; +} + +void CreateItemAtAirport(UINT16 itemId, INT16 status) +{ + // create an item - use bobby ray's delivery coordinates/gridno + OBJECTTYPE obj; + const BOOLEAN success = CreateItem(itemId, status, &obj); + if (!success) + { + ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, L"Warning - CreateItemAtAirport() failed for itemid %d", itemId); + return; + } + const BOOLEAN airportSectorLoaded = gWorldSectorX == BOBBYR_SHIPPING_DEST_SECTOR_X && gWorldSectorY == BOBBYR_SHIPPING_DEST_SECTOR_Y && gbWorldSectorZ == BOBBYR_SHIPPING_DEST_SECTOR_Z; + + if (airportSectorLoaded) + { + SetOpenableStructureToClosed( BOBBYR_SHIPPING_DEST_GRIDNO, 0 ); + AddItemToPool( BOBBYR_SHIPPING_DEST_GRIDNO, &obj, -1, 0, 0, 0 ); + } + else + { + AddItemsToUnLoadedSector(BOBBYR_SHIPPING_DEST_SECTOR_X, BOBBYR_SHIPPING_DEST_SECTOR_Y, BOBBYR_SHIPPING_DEST_SECTOR_Z, BOBBYR_SHIPPING_DEST_GRIDNO, 1, &obj, 0, 0, 0, -1, FALSE); + } +} + INT32 GetAdminActionCostForRegion(INT16 regionId) { INT16 totalLocalActions = 0; @@ -385,10 +757,10 @@ INT32 GetAdminActionCostForRegion(INT16 regionId) { for (int b = 0; b < REBEL_COMMAND_MAX_ACTIONS_PER_REGION; ++b) { - totalNationalActions += rebelCommandSaveInfo.regions[a].actionLevels[b]; + totalNationalActions += rebelCommandSaveInfo.regions[a].GetLevel(b); if (a == regionId) - totalLocalActions += rebelCommandSaveInfo.regions[a].actionLevels[b]; + totalLocalActions += rebelCommandSaveInfo.regions[a].GetLevel(b); } } @@ -401,7 +773,7 @@ INT16 GetAdminActionInRegion(INT16 regionId, RebelCommandAdminActions adminActio { for (int idx = 0; idx < REBEL_COMMAND_MAX_ACTIONS_PER_REGION; ++idx) { - if (rebelCommandSaveInfo.regions[regionId].actions[idx] == adminAction) + if (rebelCommandSaveInfo.regions[regionId].actions[idx] == adminAction && rebelCommandSaveInfo.regions[regionId].IsActive(idx)) { return idx; } @@ -453,6 +825,17 @@ INT32 GetDirectiveImprovementCost(const RebelCommandDirectives directive) return rebelCommandSaveInfo.directives[directive].GetCostToImprove(); } +INT32 GetMissionCost() +{ + const INT32 additionalCost = missionMap.size() * gRebelCommandSettings.iMissionAdditionalCost; + return gRebelCommandSettings.iMissionBaseCost + additionalCost; +} + +INT8 GetMissionSuccessChanceBonus(const MERCPROFILESTRUCT* merc) +{ + return merc ? merc->bExpLevel * 5 : 0; +} + void ImproveDirective(const RebelCommandDirectives directive) { const INT32 cost = rebelCommandSaveInfo.directives[directive].GetCostToImprove(); @@ -552,35 +935,114 @@ void SetupAdminActionBox(const UINT8 actionIndex, const UINT16 descriptionText, { // show label if maxed out if ((actionIndex == RCAA_SUPPLY_LINE && rebelCommandSaveInfo.regions[iCurrentRegionId].ubMaxLoyalty >= MAX_LOYALTY_VALUE) - || (actionIndex != RCAA_SUPPLY_LINE && rebelCommandSaveInfo.regions[iCurrentRegionId].actionLevels[actionIndex] >= 2)) + || (actionIndex != RCAA_SUPPLY_LINE && rebelCommandSaveInfo.regions[iCurrentRegionId].GetLevel(actionIndex) >= 2)) { DrawTextToScreen(szRebelCommandAdminActionsText[buttonText], x, y + 7, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); } else // show button { - const UINT8 level = rebelCommandSaveInfo.regions[iCurrentRegionId].actionLevels[actionIndex]; + const UINT8 level = rebelCommandSaveInfo.regions[iCurrentRegionId].GetLevel(actionIndex); swprintf(text, szRebelCommandText[level == 0 ? RCT_ADMIN_ACTION_ESTABLISH : RCT_ADMIN_ACTION_IMPROVE], szRebelCommandAdminActionsText[buttonText]); - const INT32 btnId = CreateTextButton(text, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, x, y, 140, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + const INT32 btnId = CreateTextButton(text, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, x, y, 140, 18, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) { - ButtonHelper(btn, reason, [btn]() { PurchaseAdminAction(btn->UserData[0], btn->UserData[1]); }); + ButtonHelper(btn, reason, [btn]() { PurchaseAdminAction(MSYS_GetBtnUserData(btn, 0), MSYS_GetBtnUserData(btn, 1)); }); }); - Assert(ButtonList[btnId]); - ButtonList[btnId]->UserData[0] = iCurrentRegionId; - ButtonList[btnId]->UserData[1] = actionIndex; + MSYS_SetBtnUserData(btnId, 0, iCurrentRegionId); + MSYS_SetBtnUserData(btnId, 1, actionIndex); btnIds.push_back(btnId); } y += 22; - swprintf(text, szRebelCommandText[RCT_ADMIN_ACTION_TIER], rebelCommandSaveInfo.regions[iCurrentRegionId].actionLevels[actionIndex]); + swprintf(text, szRebelCommandText[RCT_ADMIN_ACTION_TIER], rebelCommandSaveInfo.regions[iCurrentRegionId].GetLevel(actionIndex)); DrawTextToScreen(text, x, y, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + // show on/off switch for toggleable actions + if (CanAdminActionBeToggled(rebelCommandSaveInfo.regions[iCurrentRegionId].actions[actionIndex]) && rebelCommandSaveInfo.regions[iCurrentRegionId].GetLevel(actionIndex) > 0) + { + // draw checkbox text + DrawTextToScreen(szRebelCommandText[RCT_ACTIVE], x+125, y, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); + + // draw checkbox + const INT32 btnId = CreateCheckBoxButton(x + 128, y-3, "INTERFACE\\OptionsCheckBoxes_12x12.sti", MSYS_PRIORITY_HIGH, [](GUI_BUTTON* btn, INT32 reason) { + const UINT8 regionIndex = (UINT8)MSYS_GetBtnUserData( btn, 0 ); + const UINT8 actionIndex = (UINT8)MSYS_GetBtnUserData( btn, 1 ); + + if (reason & MSYS_CALLBACK_REASON_LBUTTON_UP) + { + if (btn->uiFlags & BUTTON_CLICKED_ON) + { + // don't toggle on if we have a bad supply balance + if (rebelCommandSaveInfo.iSupplies <= 0) + return; + + btn->uiFlags &= ~BUTTON_CLICKED_ON; + rebelCommandSaveInfo.regions[regionIndex].SetActive(actionIndex); + } + else + { + btn->uiFlags |= BUTTON_CLICKED_ON; + rebelCommandSaveInfo.regions[regionIndex].SetInactive(actionIndex); + } + } + RenderWebsite(); + }); + + if (rebelCommandSaveInfo.iSupplies <= 0) + DisableButton(btnId); + + MSYS_SetBtnUserData( btnId, 0, iCurrentRegionId ); + MSYS_SetBtnUserData( btnId, 1, actionIndex ); + + Assert(ButtonList[btnId]); + if (rebelCommandSaveInfo.regions[iCurrentRegionId].IsActive(actionIndex)) + ButtonList[btnId]->uiFlags |= BUTTON_CLICKED_ON; + + btnIds.push_back(btnId); + + // setup mouse target for "Active" text - setting this AFTER the checkbox so we can set the button id + MSYS_DefineRegion(&adminActionActiveTextRegion[actionIndex-1], x+75, y-2, x+125, y+14, MSYS_PRIORITY_HIGH, + CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, [](MOUSE_REGION* pRegion, INT32 iReason) { + if (iReason & MSYS_CALLBACK_REASON_LBUTTON_UP) + { + const UINT8 regionIndex = (UINT8)MSYS_GetRegionUserData( pRegion, 0 ); + const UINT8 actionIndex = (UINT8)MSYS_GetRegionUserData( pRegion, 1 ); + const INT32 buttonId = MSYS_GetRegionUserData( pRegion, 2 ); + GUI_BUTTON* btn = ButtonList[buttonId]; + + if (btn->uiFlags & BUTTON_CLICKED_ON) + { + // don't toggle on if we have a bad supply balance + if (rebelCommandSaveInfo.iSupplies <= 0) + return; + + btn->uiFlags &= ~BUTTON_CLICKED_ON; + rebelCommandSaveInfo.regions[regionIndex].SetInactive(actionIndex); + } + else + { + btn->uiFlags |= BUTTON_CLICKED_ON; + rebelCommandSaveInfo.regions[regionIndex].SetActive(actionIndex); + } + + RenderWebsite(); + } + }); + MSYS_AddRegion(&adminActionActiveTextRegion[actionIndex-1]); + MSYS_SetRegionUserData(&adminActionActiveTextRegion[actionIndex-1], 0, iCurrentRegionId); + MSYS_SetRegionUserData(&adminActionActiveTextRegion[actionIndex-1], 1, actionIndex); + MSYS_SetRegionUserData(&adminActionActiveTextRegion[actionIndex-1], 2, btnId); + + } + y += 13; - DisplayWrappedString(x, y, 140, 2, FONT10ARIAL, FONT_MCOLOR_BLACK, szRebelCommandAdminActionsText[descriptionText], FONT_MCOLOR_BLACK, FALSE, 0); + const UINT8 textColor = rebelCommandSaveInfo.regions[iCurrentRegionId].IsActive(actionIndex) ? FONT_MCOLOR_BLACK : FONT_MCOLOR_DKGRAY; + DisplayWrappedString(x, y, 140, 2, FONT10ARIAL, textColor, szRebelCommandAdminActionsText[descriptionText], FONT_MCOLOR_BLACK, FALSE, 0); helpTextY = y; + // special case for index 5: show state change button if (actionIndex == 5) { @@ -711,12 +1173,27 @@ void SetRegionHelpText(INT32 reason, MOUSE_REGION& helpTextRegion, RebelCommandH SetRegionFastHelpText(&helpTextRegion, L""); } +void SetWebsiteView(WebsiteState newState) +{ + websiteState = newState; +} + void ToggleWebsiteView() { - if (websiteState == RCS_REGIONAL_OVERVIEW) - websiteState = RCS_NATIONAL_OVERVIEW; - else + switch (websiteState) + { + case RCS_NATIONAL_OVERVIEW: websiteState = RCS_REGIONAL_OVERVIEW; + break; + + case RCS_REGIONAL_OVERVIEW: + websiteState = RCS_AGENT_OVERVIEW; + break; + + case RCS_AGENT_OVERVIEW: + websiteState = RCS_NATIONAL_OVERVIEW; + break; + } } void UpdateAdminActionChangeList(INT16 regionId) @@ -760,14 +1237,6 @@ BOOLEAN EnterWebsite() websiteState = RCS_NATIONAL_OVERVIEW; - VOBJECT_DESC VObjectDesc; - - // load the background (white tile) - VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; - FilenameForBPP("LAPTOP\\BackGroundTile.sti", VObjectDesc.ImageFile); - AddVideoObject(&VObjectDesc, &guiInsuranceBackGround); - - RenderWebsite(); return(TRUE); @@ -778,8 +1247,6 @@ void ExitWebsite() ClearAllButtons(); ClearAllHelpTextRegions(); REBEL_COMMAND_DROPDOWN.Destroy(); - - DeleteVideoObjectFromIndex(guiInsuranceBackGround); } void HandleWebsite() @@ -809,6 +1276,21 @@ void HandleWebsite() RenderWebsite(); break; + case '1': + SetWebsiteView(RCS_NATIONAL_OVERVIEW); + RenderWebsite(); + break; + + case '2': + SetWebsiteView(RCS_REGIONAL_OVERVIEW); + RenderWebsite(); + break; + + case '3': + SetWebsiteView(RCS_AGENT_OVERVIEW); + RenderWebsite(); + break; + default: HandleKeyBoardShortCutsForLapTop(input.usEvent, input.usParam, input.usKeyState); break; @@ -833,9 +1315,9 @@ void RenderWebsite() ClearAllHelpTextRegions(); // background - WebPageTileBackground(4, 4, 125, 100, guiInsuranceBackGround); + ColorFillVideoSurfaceArea(FRAME_BUFFER, WEBSITE_LEFT, WEBSITE_TOP, WEBSITE_LEFT + WEBSITE_WIDTH, WEBSITE_TOP + WEBSITE_HEIGHT, Get16BPPColor(FROMRGB(224, 224, 224))); - SetFontShadow(FONT_MCOLOR_WHITE); + SetFontShadow(FONT_GRAY1); // national/regional views switch (websiteState) @@ -844,6 +1326,10 @@ void RenderWebsite() RenderRegionalOverview(); break; + case RCS_AGENT_OVERVIEW: + RenderMissionOverview(); + break; + case RCS_NATIONAL_OVERVIEW: default: RenderNationalOverview(); @@ -861,10 +1347,11 @@ void RenderHeader(RebelCommandText titleText) { CHAR16 sText[500]; UINT16 usPosX, usPosY; + INT32 btnId; // title usPosX = WEBSITE_LEFT + 1; - usPosY = WEBSITE_TOP + 3; + usPosY = WEBSITE_TOP + 2; DrawTextToScreen(szRebelCommandText[titleText], usPosX, usPosY, 0, FONT16ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); // supplies @@ -873,21 +1360,69 @@ void RenderHeader(RebelCommandText titleText) DrawTextToScreen(szRebelCommandText[RCT_SUPPLIES], usPosX, usPosY, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); // supply count - usPosX = WEBSITE_LEFT + 50; + usPosX = WEBSITE_LEFT + 55; usPosY = WEBSITE_TOP + 20; swprintf(sText, L"%d", rebelCommandSaveInfo.iSupplies); DrawTextToScreen(sText, usPosX, usPosY, 0, FONT14ARIAL, rebelCommandSaveInfo.iSupplies > 0 ? FONT_GREEN : FONT_MCOLOR_LTRED, FONT_MCOLOR_BLACK, FALSE, 0); + // intel + usPosX = WEBSITE_LEFT + 150; + usPosY = WEBSITE_TOP + 23; + DrawTextToScreen(szRebelCommandText[RCT_INTEL], usPosX, usPosY, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // intel count + usPosX = WEBSITE_LEFT + 185; + usPosY = WEBSITE_TOP + 20; + const int intel = (int)GetIntel(); + swprintf(sText, L"%d", intel); + DrawTextToScreen(sText, usPosX, usPosY, 0, FONT14ARIAL, intel > 0 ? FONT_GREEN : FONT_MCOLOR_LTRED, FONT_MCOLOR_BLACK, FALSE, 0); + // supplies region MSYS_DefineRegion(&suppliesHelpTextRegion, WEBSITE_LEFT, WEBSITE_TOP + 20, WEBSITE_LEFT + 100, WEBSITE_TOP + 35, MSYS_PRIORITY_HIGH, CURSOR_LAPTOP_SCREEN, [](MOUSE_REGION* pRegion, INT32 iReason) { SetRegionHelpText(iReason, suppliesHelpTextRegion, RCHT_SUPPLIES); }, MSYS_NO_CALLBACK); MSYS_AddRegion(&suppliesHelpTextRegion); MSYS_SetRegionUserData(&suppliesHelpTextRegion, 0, 0); + // view select text + usPosX = WEBSITE_LEFT + 251; + usPosY = WEBSITE_TOP + 3; + DrawTextToScreen(szRebelCommandText[RCT_SELECT_VIEW], usPosX, usPosY, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // view swap buttons + usPosY = WEBSITE_TOP + 13; + btnId = CreateTextButton(szRebelCommandText[RCT_SWITCH_TO_NATIONAL], FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 82, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + ButtonHelper(btn, reason, []() { SetWebsiteView(RCS_NATIONAL_OVERVIEW); }); + }); + btnIds.push_back(btnId); + usPosX = WEBSITE_LEFT + 334; + btnId = CreateTextButton(szRebelCommandText[RCT_SWITCH_TO_REGIONAL], FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 82, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + ButtonHelper(btn, reason, []() { SetWebsiteView(RCS_REGIONAL_OVERVIEW); }); + }); + btnIds.push_back(btnId); + usPosX = WEBSITE_LEFT + 417; + btnId = CreateTextButton(szRebelCommandText[RCT_SWITCH_TO_AGENT], FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 82, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + ButtonHelper(btn, reason, []() { SetWebsiteView(RCS_AGENT_OVERVIEW); }); + }); + btnIds.push_back(btnId); + // line at the bottom of the header usPosX = WEBSITE_LEFT - 1; usPosY = WEBSITE_TOP + 35; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 500, usPosY, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + WEBSITE_WIDTH, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // DEBUG if (CHEATER_CHEAT_LEVEL()) @@ -899,12 +1434,6 @@ void RenderHeader(RebelCommandText titleText) ButtonHelper(btn, reason, []() { DEBUG_DAY(); }); }); btnIds.push_back(btnId); - - usPosY = WEBSITE_TOP + 365; - btnId = CreateTextButton(L"DEBUG PRINT!", FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 99, 14, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) { - ButtonHelper(btn, reason, []() { DEBUG_PRINT(); }); - }); - btnIds.push_back(btnId); } } @@ -920,15 +1449,6 @@ void RenderNationalOverview() // title RenderHeader(RCT_NATIONAL_OVERVIEW); - // view swap button - usPosX = WEBSITE_LEFT + 350; - usPosY = WEBSITE_TOP + 1; - btnId = CreateTextButton(szRebelCommandText[RCT_SWITCH_TO_REGIONAL], FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 149, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) - { - ButtonHelper(btn, reason, []() { ToggleWebsiteView(); }); - }); - btnIds.push_back(btnId); - // incoming supplies usPosX = WEBSITE_LEFT + 1; usPosY = WEBSITE_TOP + 40; @@ -936,7 +1456,7 @@ void RenderNationalOverview() usPosX = WEBSITE_LEFT + 5; usPosY += 10; - iIncomingSuppliesPerDay = static_cast(CurrentPlayerProgressPercentage() * gRebelCommandSettings.fIncomeModifier + (rebelCommandSaveInfo.iSelectedDirective == RCD_GATHER_SUPPLIES ? rebelCommandSaveInfo.directives[RCD_GATHER_SUPPLIES].GetValue1() : 0)); + iIncomingSuppliesPerDay = CalcIncomingSuppliesPerDay(static_cast(rebelCommandSaveInfo.iSelectedDirective)); swprintf(sText, L"%d", iIncomingSuppliesPerDay); DrawTextToScreen(sText, usPosX, usPosY, 0, FONT14ARIAL, iIncomingSuppliesPerDay > 0 ? FONT_GREEN : FONT_MCOLOR_LTRED, FONT_MCOLOR_BLACK, FALSE, 0); @@ -954,14 +1474,61 @@ void RenderNationalOverview() usPosX = WEBSITE_LEFT + 1; usPosY -= 13; MSYS_DefineRegion(&suppliesIncomeHelpTextRegion, usPosX, usPosY, usPosX + 100, usPosY + 35, MSYS_PRIORITY_HIGH, - CURSOR_LAPTOP_SCREEN, [](MOUSE_REGION* pRegion, INT32 iReason) { SetRegionHelpText(iReason, suppliesIncomeHelpTextRegion, RCHT_SUPPLIES_INCOME); }, MSYS_NO_CALLBACK); + CURSOR_LAPTOP_SCREEN, [](MOUSE_REGION* pRegion, INT32 iReason) { + if (iReason == MSYS_CALLBACK_REASON_MOVE) + { + CHAR16 text[1000]; + + // base income + const INT32 base = static_cast(CurrentPlayerProgressPercentage() * gRebelCommandSettings.fIncomeModifier); + swprintf(text, szRebelCommandHelpText[RCHT_SUPPLIES_INCOME], base); + + // admin action upkeep + const INT32 supplyUpkeep = static_cast(gRebelCommandSettings.fIncomeModifier + 0.5f); + + for (int a = FIRST_TOWN+1; a < NUM_TOWNS; ++a) + { + // ignore this region if there is no active admin team + if (rebelCommandSaveInfo.regions[a].adminStatus != RAS_ACTIVE) + continue; + + INT32 upkeepCount = 0; + for (int b = 0; b < REBEL_COMMAND_MAX_ACTIONS_PER_REGION; ++b) + { + if (rebelCommandSaveInfo.regions[a].IsActive(b) && rebelCommandSaveInfo.regions[a].GetLevel(b) > 0) + upkeepCount++; + } + + if (upkeepCount > 0) + { + const INT32 totalUpkeep = upkeepCount * supplyUpkeep; + swprintf(text, L"%s\n-%d (%s)", text, totalUpkeep, pTownNames[a]); + } + } + + SetRegionFastHelpText(&suppliesIncomeHelpTextRegion, text); + } + else if (iReason == MSYS_CALLBACK_REASON_LOST_MOUSE) + SetRegionFastHelpText(&suppliesIncomeHelpTextRegion, L""); + }, MSYS_NO_CALLBACK); MSYS_AddRegion(&suppliesIncomeHelpTextRegion); MSYS_SetRegionUserData(&suppliesIncomeHelpTextRegion, 0, 0); // line between incoming supplies and directive usPosX = WEBSITE_LEFT - 1; usPosY += 43; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 500, usPosY, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + WEBSITE_WIDTH, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // current directive usPosX = WEBSITE_LEFT + 1; @@ -981,12 +1548,11 @@ void RenderNationalOverview() swprintf(sText, szRebelCommandText[RCT_IMPROVE_DIRECTIVE], GetDirectiveImprovementCost(static_cast(directive))); btnId = CreateTextButton(sText, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 200, 24, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) { - ButtonHelper(btn, reason, [btn]() { ImproveDirective(static_cast(btn->UserData[0])); }); + ButtonHelper(btn, reason, [btn]() { ImproveDirective(static_cast(MSYS_GetBtnUserData(btn, 0))); }); }); btnIds.push_back(btnId); - Assert(ButtonList[btnId]); - ButtonList[btnId]->UserData[0] = REBEL_COMMAND_DROPDOWN.GetSelectedEntryKey(); + MSYS_SetBtnUserData( btnId, 0, REBEL_COMMAND_DROPDOWN.GetSelectedEntryKey() ); } // directive effect @@ -1016,7 +1582,18 @@ void RenderNationalOverview() // line between directive and militia usPosX = WEBSITE_LEFT - 1; usPosY += 10; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 500, usPosY, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + WEBSITE_WIDTH, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // militia usPosX = WEBSITE_LEFT + 1; @@ -1063,7 +1640,18 @@ void RenderNationalOverview() // draw vertical line usPosX += 75; usPosY = militiaY - 3; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 38, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 38, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // header usPosX += 20; @@ -1084,8 +1672,18 @@ void RenderNationalOverview() // draw vertical line usPosX += 75; usPosY = militiaY - 3; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 38, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 38, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // headers usPosX += 20; DrawTextToScreen(szRebelCommandText[RCT_MILITIA_RESOURCES], usPosX, usPosY, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); @@ -1112,7 +1710,18 @@ void RenderNationalOverview() // line usPosX = WEBSITE_LEFT + 25; usPosY = militiaY + 50; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 450, usPosY, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + 450, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // training cost usPosX = WEBSITE_LEFT + 10; @@ -1121,7 +1730,18 @@ void RenderNationalOverview() // draw vertical line usPosX += 120; - DisplaySmallColouredLineWithShadow(usPosX, usPosY - 2, usPosX, usPosY + 38, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY - 2, usPosX, usPosY + 38, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // upkeep cost usPosX += 20; @@ -1164,7 +1784,18 @@ void RenderNationalOverview() // line usPosX = WEBSITE_LEFT + 25; usPosY += 30; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 450, usPosY, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + 450, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // training speed bonus usPosX = WEBSITE_LEFT + 10; @@ -1187,7 +1818,18 @@ void RenderNationalOverview() // draw vertical line usPosX = WEBSITE_LEFT + 130; usPosY -= 12; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 38, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 38, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // militia physical stat bonus usPosX += 20; @@ -1233,15 +1875,6 @@ void RenderRegionalOverview() // title RenderHeader(RCT_REGIONAL_OVERVIEW); - // view swap button - usPosX = WEBSITE_LEFT + 350; - usPosY = WEBSITE_TOP + 1; - btnId = CreateTextButton(szRebelCommandText[RCT_SWITCH_TO_NATIONAL], FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 149, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) - { - ButtonHelper(btn, reason, []() { ToggleWebsiteView(); }); - }); - btnIds.push_back(btnId); - // region usPosX = WEBSITE_LEFT + 1; usPosY = WEBSITE_TOP + 40; @@ -1277,8 +1910,19 @@ void RenderRegionalOverview() // line between region info and admin info usPosX = WEBSITE_LEFT - 1; - usPosY += 20; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 500, usPosY, FROMRGB(240, 240, 240)); + usPosY += 15; + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + WEBSITE_WIDTH, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // admin team usPosX = WEBSITE_LEFT + 1; @@ -1316,7 +1960,18 @@ void RenderRegionalOverview() // vertical line between admin team and loyalty usPosX = WEBSITE_LEFT + 105; usPosY += 5; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 15, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 15, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // loyalty usPosX += 15; @@ -1347,7 +2002,18 @@ void RenderRegionalOverview() // vertical line between loyalty and max loyalty usPosX = WEBSITE_LEFT + 195; usPosY += 5; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 15, FROMRGB(240, 240, 240)); + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 15, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // max loyalty usPosX += 15; @@ -1375,37 +2041,20 @@ void RenderRegionalOverview() MSYS_AddRegion(&maxLoyaltyHelpTextRegion); MSYS_SetRegionUserData(&maxLoyaltyHelpTextRegion, 0, 0); - // vertical line between max loyalty and supply grant + // vertical line between max loyalty usPosX = WEBSITE_LEFT + 325; usPosY += 5; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX, usPosY + 15, FROMRGB(240, 240, 240)); - - if (iCurrentRegionId != OMERTA && rebelCommandSaveInfo.regions[iCurrentRegionId].adminStatus == RAS_ACTIVE) { - // supply grant - usPosX = WEBSITE_LEFT + 334; - btnId = CreateTextButton(L"Grant 100 Supplies", FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 165, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) - { - ButtonHelper(btn, reason, []() - { - if (rebelCommandSaveInfo.iSupplies >= 100) - { - rebelCommandSaveInfo.iSupplies -= 100; - IncrementTownLoyalty(iCurrentRegionId, static_cast(GRANT_SUPPLIES_LOYALTY_GAIN)); + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; - if (rebelCommandSaveInfo.uSupplyDropCount < 255) - rebelCommandSaveInfo.uSupplyDropCount++; - } - else - { - DoLapTopMessageBox(MSG_BOX_LAPTOP_DEFAULT, szRebelCommandText[RCT_INSUFFICIENT_FUNDS], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL); - } - }); - }); - btnIds.push_back(btnId); - - // supply grant region - SetButtonFastHelpText(btnId, szRebelCommandHelpText[RCHT_GRANT_SUPPLIES]); + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY + 15, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); } // deploy/reactivate admin teams (if applicable) @@ -1447,12 +2096,11 @@ void RenderRegionalOverview() swprintf(sText, szRebelCommandText[RCT_DEPLOY_ADMIN_TEAM], adminDeployCost); btnId = CreateTextButton(sText, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 300, 100, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) { - ButtonHelper(btn, reason, [btn]() { DeployOrReactivateAdminTeam(btn->UserData[0]); }); + ButtonHelper(btn, reason, [btn]() { DeployOrReactivateAdminTeam(MSYS_GetBtnUserData(btn, 0)); }); }); btnIds.push_back(btnId); - Assert(ButtonList[btnId]); - ButtonList[btnId]->UserData[0] = iCurrentRegionId; + MSYS_SetBtnUserData( btnId, 0, iCurrentRegionId ); return; } else if (rebelCommandSaveInfo.regions[iCurrentRegionId].adminStatus == RAS_INACTIVE) @@ -1469,20 +2117,30 @@ void RenderRegionalOverview() swprintf(sText, szRebelCommandText[RCT_REACTIVATE_ADMIN_TEAM], adminReactivateCost / 2); btnId = CreateTextButton(sText, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, usPosX, usPosY, 300, 100, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) { - ButtonHelper(btn, reason, [btn]() { DeployOrReactivateAdminTeam(btn->UserData[0]); }); + ButtonHelper(btn, reason, [btn]() { DeployOrReactivateAdminTeam(MSYS_GetBtnUserData(btn, 0)); }); }); btnIds.push_back(btnId); - Assert(ButtonList[btnId]); - ButtonList[btnId]->UserData[0] = iCurrentRegionId; + MSYS_SetBtnUserData( btnId, 0, iCurrentRegionId ); return; } // line between admin info and admin actions usPosX = WEBSITE_LEFT - 1; - usPosY += 30; - DisplaySmallColouredLineWithShadow(usPosX, usPosY, usPosX + 500, usPosY, FROMRGB(240, 240, 240)); + usPosY += 25; + { + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + LineDraw(FALSE, usPosX, usPosY, usPosX + WEBSITE_WIDTH, usPosY, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + } // admin actions usPosX = WEBSITE_LEFT + 1; @@ -1506,6 +2164,864 @@ void RenderRegionalOverview() swprintf(sText, szRebelCommandText[RCT_ADMIN_ACTION_COST], GetAdminActionCostForRegion(iCurrentRegionId)); DrawTextToScreen(sText, usPosX, usPosY, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); } + +BOOLEAN SetupMissionAgentBox(UINT16 x, UINT16 y, INT8 index) +{ + CHAR16 sText[800]; + INT32 btnId; + VOBJECT_DESC vObjDesc; + HVOBJECT hvObj; + char sTemp[100]; + UINT32 image; + UINT32 uiDestPitchBYTES; + UINT8 *pDestBuf; + + // temp/fixme + std::vector mercs; + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + + if (pSoldier && pSoldier->bActive + && !(pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) + ) + { + mercs.push_back(pSoldier); + } + } + + pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); + + SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + // top horizontal line + LineDraw(FALSE, x, y, x+230, y, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + // bottom horizontal line + LineDraw(FALSE, x, y+310, x+230, y+310, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + // left vertical line + LineDraw(FALSE, x, y, x, y+310, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + // right vertical line + LineDraw(FALSE, x+230, y, x+230, y+310, Get16BPPColor(FROMRGB(0, 0, 0)), pDestBuf); + + UnLockVideoSurface( FRAME_BUFFER ); + + // clamp indices + // we're reserving an index for the generic rebel agent, so no need to subtract 1 from size here + if (agentIndex[index] < 0) agentIndex[index] = static_cast(mercs.size()); + else if (agentIndex[index] > static_cast(mercs.size())) agentIndex[index] = 0; + + if (rebelCommandSaveInfo.availableMissions[index] == RCAM_NONE) + { + // we shouldn't even reach this point, but leaving this here for safety + DrawTextToScreen(szRebelCommandText[RCT_MISSION_PREP_IN_PROGRESS], x, y+155, 230, FONT14ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED); + return FALSE; + } + + // draw mission title + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_DEEP_DEPLOYMENT_TITLE]); break; + case RCAM_DISRUPT_ASD: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_DISRUPT_ASD_TITLE]); break; + case RCAM_FORGE_TRANSPORT_ORDERS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_FORGE_TRANSPORT_ORDERS_TITLE]); break; + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_GET_ENEMY_MOVEMENT_TARGETS_TITLE]); break; + case RCAM_IMPROVE_LOCAL_SHOPS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_IMPROVE_LOCAL_SHOPS_TITLE]); break; + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_REDUCE_STRATEGIC_DECISION_SPEED_TITLE]); break; + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_REDUCE_UNALERTED_ENEMY_VISION_TITLE]); break; + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SABOTAGE_INFANTRY_EQUIPMENT_TITLE]); break; + case RCAM_SABOTAGE_MECHANICAL_UNITS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SABOTAGE_MECHANICAL_UNITS_TITLE]); break; + case RCAM_SEND_SUPPLIES_TO_TOWN: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SEND_SUPPLIES_TO_TOWN_TITLE]); break; + case RCAM_SOLDIER_BOUNTIES_KINGPIN: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SOLDIER_BOUNTIES_KINGPIN_TITLE]); break; + case RCAM_TRAIN_MILITIA_ANYWHERE: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_TRAIN_MILITIA_ANYWHERE_TITLE]); break; + + default: swprintf(sText, L"Mission Index: %d", rebelCommandSaveInfo.availableMissions[index]); break; + } + DrawTextToScreen(sText, x+5, y+5, 0, FONT14ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw mission base duration, in days + UINT8 missionDurationBase = 0; + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: missionDurationBase = gRebelCommandSettings.iDeepDeploymentDuration; break; + case RCAM_DISRUPT_ASD: missionDurationBase = gRebelCommandSettings.iDisruptAsdDuration; break; + case RCAM_FORGE_TRANSPORT_ORDERS: missionDurationBase = 1; break; // instant effect + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: missionDurationBase = gRebelCommandSettings.iGetEnemyMovementTargetsDuration; break; + case RCAM_IMPROVE_LOCAL_SHOPS: missionDurationBase = gRebelCommandSettings.iImproveLocalShopsDuration; break; + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: missionDurationBase = gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration; break; + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: missionDurationBase = gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration; break; + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: missionDurationBase = gRebelCommandSettings.iSabotageInfantryEquipmentDuration; break; + case RCAM_SABOTAGE_MECHANICAL_UNITS: missionDurationBase = gRebelCommandSettings.iSabotageMechanicalUnitsDuration; break; + case RCAM_SEND_SUPPLIES_TO_TOWN: missionDurationBase = gRebelCommandSettings.iSendSuppliesToTownDuration; break; + case RCAM_SOLDIER_BOUNTIES_KINGPIN: missionDurationBase = gRebelCommandSettings.iSoldierBountiesKingpinDuration; break; + case RCAM_TRAIN_MILITIA_ANYWHERE: missionDurationBase = gRebelCommandSettings.iTrainMilitiaAnywhereDuration; break; + + default: break; + } + // convert from hours + missionDurationBase /= 24; + swprintf(sText, szRebelCommandText[RCT_MISSION_DURATION_DAYS], missionDurationBase); + DrawTextToScreen(sText, x+5, y+21, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw mission base success chance + int missionSuccessChanceBase = 50; + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: missionSuccessChanceBase = gRebelCommandSettings.iDeepDeploymentSuccessChance; break; + case RCAM_DISRUPT_ASD: missionSuccessChanceBase = gRebelCommandSettings.iDisruptAsdSuccessChance; break; + case RCAM_FORGE_TRANSPORT_ORDERS: missionSuccessChanceBase = gRebelCommandSettings.iForgeTransportOrdersSuccessChance; break; + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: missionSuccessChanceBase = gRebelCommandSettings.iGetEnemyMovementTargetsSuccessChance; break; + case RCAM_IMPROVE_LOCAL_SHOPS: missionSuccessChanceBase = gRebelCommandSettings.iImproveLocalShopsSuccessChance; break; + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: missionSuccessChanceBase = gRebelCommandSettings.iReduceStrategicDecisionSpeedSuccessChance; break; + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: missionSuccessChanceBase = gRebelCommandSettings.iReduceUnalertedEnemyVisionSuccessChance; break; + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: missionSuccessChanceBase = gRebelCommandSettings.iSabotageInfantryEquipmentSuccessChance; break; + case RCAM_SABOTAGE_MECHANICAL_UNITS: missionSuccessChanceBase = gRebelCommandSettings.iSabotageMechanicalUnitsSuccessChance; break; + case RCAM_SEND_SUPPLIES_TO_TOWN: missionSuccessChanceBase = gRebelCommandSettings.iSendSuppliesToTownSuccessChance; break; + case RCAM_SOLDIER_BOUNTIES_KINGPIN: missionSuccessChanceBase = gRebelCommandSettings.iSoldierBountiesKingpinSuccessChance; break; + case RCAM_TRAIN_MILITIA_ANYWHERE: missionSuccessChanceBase = gRebelCommandSettings.iTrainMilitiaAnywhereSuccessChance; break; + + default: break; + } + swprintf(sText, szRebelCommandText[RCT_MISSION_SUCCESS_CHANCE], missionSuccessChanceBase, L"%%"); + DrawTextToScreen(sText, x+5, y+33, 0, FONT10ARIALBOLD, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw mission description + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_DEEP_DEPLOYMENT_DESC]); break; + case RCAM_DISRUPT_ASD: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_DISRUPT_ASD_DESC]); break; + case RCAM_FORGE_TRANSPORT_ORDERS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_FORGE_TRANSPORT_ORDERS_DESC]); break; + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_GET_ENEMY_MOVEMENT_TARGETS_DESC]); break; + case RCAM_IMPROVE_LOCAL_SHOPS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_IMPROVE_LOCAL_SHOPS_DESC]); break; + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_REDUCE_STRATEGIC_DECISION_SPEED_DESC]); break; + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_REDUCE_UNALERTED_ENEMY_VISION_DESC]); break; + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SABOTAGE_INFANTRY_EQUIPMENT_DESC]); break; + case RCAM_SABOTAGE_MECHANICAL_UNITS: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SABOTAGE_MECHANICAL_UNITS_DESC]); break; + case RCAM_SEND_SUPPLIES_TO_TOWN: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SEND_SUPPLIES_TO_TOWN_DESC]); break; + case RCAM_SOLDIER_BOUNTIES_KINGPIN: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_SOLDIER_BOUNTIES_KINGPIN_DESC], gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit); break; + case RCAM_TRAIN_MILITIA_ANYWHERE: swprintf(sText, szRebelCommandAgentMissionsText[RCAMT_TRAIN_MILITIA_ANYWHERE_DESC]); break; + + default: swprintf(sText, L"Mission description goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut faucibus libero dui. Etiam facilisis posuere dictum. Etiam a velit viverra, interdum eros non, placerat lectus. Vivamus ut lorem id velit tempus auctor. Donec molestie, erat at molestie malesuada, diam purus tincidunt eros, vel hendrerit mi elit vitae leo. Suspendisse dui lectus, malesuada eu elementum at, viverra eu odio."); break; + } + DisplayWrappedString(x+5, y+45, 220, 2, FONT10ARIAL, FONT_MCOLOR_BLACK, sText, FONT_MCOLOR_BLACK, FALSE, 0); + + if (agentIndex[index] == mercs.size()) // generic rebel agent + { + // draw black box for face + ColorFillVideoSurfaceArea(FRAME_BUFFER, x+5, y+150+10, x+5+48, y+150+10+43, Get16BPPColor(FROMRGB(64, 64, 64))); + + // draw question mark + SetFontShadow(NO_SHADOW); + DrawTextToScreen(L"?", x+5+20, y+150+10+16, 0, FONT14HUMANIST, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, 0); + SetFontShadow(FONT_GRAY1); + + // draw name + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_NAME], szRebelCommandText[RCT_MISSION_AGENT_REDACTED]); + DrawTextToScreen(sText, x+55, y+150+10, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw location + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_LOCATION], szRebelCommandText[RCT_MISSION_AGENT_REDACTED]); + DrawTextToScreen(sText, x+55, y+150+22, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw assignment + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_ASSIGNMENT], szRebelCommandText[RCT_NONE]); + DrawTextToScreen(sText, x+55, y+150+34, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw contract + DrawTextToScreen(szRebelCommandText[RCT_MISSION_AGENT_CONTRACT_NONE], x+55, y+150+46, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + } + else // one of the player's mercs + { + // draw face + vObjDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; + sprintf(sTemp, "FACES\\%02d.sti", gMercProfiles[mercs[agentIndex[index]]->ubProfile].ubFaceIndex); + FilenameForBPP(sTemp, vObjDesc.ImageFile); + CHECKF(AddVideoObject(&vObjDesc, &image)); + GetVideoObject(&hvObj, image); + BltVideoObject(FRAME_BUFFER, hvObj, 0, x+5, y+150+10, VO_BLT_SRCTRANSPARENCY, NULL); + + // draw name + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_NAME], gMercProfiles[mercs[agentIndex[index]]->ubProfile].zName); + DrawTextToScreen(sText, x+55, y+150+10, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw location + CHAR16 locationStr[128]; + GetSectorIDString(mercs[agentIndex[index]]->sSectorX, mercs[agentIndex[index]]->sSectorY, 0, locationStr, TRUE); + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_LOCATION], locationStr); + DrawTextToScreen(sText, x+55, y+150+22, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw assignment + swprintf( sText, szRebelCommandText[RCT_MISSION_AGENT_ASSIGNMENT], pAssignmentStrings[mercs[agentIndex[index]]->bAssignment]); + DrawTextToScreen(sText, x+55, y+150+34, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw contract + const BOOLEAN fromAim = mercs[agentIndex[index]]->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC; + + if (fromAim) + { + const INT32 endTime = mercs[agentIndex[index]]->iEndofContractTime; + const INT32 worldMin = GetWorldTotalMin(); + const INT32 remaining = endTime - worldMin; + + if (remaining >= 24 * 60) + { + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_CONTRACT_DAYS], remaining / (24 * 60)); + } + else + { + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_CONTRACT_HOURS], remaining / 60); + } + } + else + { + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_CONTRACT_NONE]); + } + DrawTextToScreen(sText, x+55, y+150+46, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + } + + // draw btns under face + btnId = CreateTextButton(L"<<", FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, x+5, y+150+54, 24, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + const INT8 index = MSYS_GetBtnUserData(btn, 0); + ButtonHelper(btn, reason, [btn, index]() { agentIndex[index]--; }); + }); + MSYS_SetBtnUserData(btnId, 0, index); + btnIds.push_back(btnId); + + btnId = CreateTextButton(L">>", FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, x+5+24, y+150+54, 24, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + const INT8 index = MSYS_GetBtnUserData(btn, 0); + ButtonHelper(btn, reason, [btn, index]() { agentIndex[index]++; }); + }); + MSYS_SetBtnUserData(btnId, 0, index); + btnIds.push_back(btnId); + + // draw agent bonus header text + swprintf(sText, szRebelCommandText[RCT_MISSION_AGENT_BONUS]); + DrawTextToScreen(sText, x+5, y+150+54+20+2, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + + // draw agent bonus text + UINT32 durationBonus = 0; + int durationBonusSkill = 0; + std::vector agentBonusText; + if (agentIndex[index] < static_cast(mercs.size())) + { + const MERCPROFILESTRUCT merc = gMercProfiles[mercs[agentIndex[index]]->ubProfile]; + const INT8 successBonus_expLevel = GetMissionSuccessChanceBonus(&merc); + CHAR16 successText[100]; + // stupid string hack to get the percent sign to display correctly + swprintf(successText, szRebelCommandText[RCT_MISSION_BONUS_SUCCESS_CHANCE], successBonus_expLevel, L"%s", pShortAttributeStrings[5]); // "Lvl" + agentBonusText.push_back(successText); + + const STR16* locSkillText = gGameOptions.fNewTraitSystem ? gzMercSkillTextNew : gzMercSkillText; + INT16 intModifier; + int intModifierSkill; + FLOAT floatModifier; + int floatModifierSkill; + UINT16 extraBits; + MissionHelpers::GetMissionInfo(static_cast(rebelCommandSaveInfo.availableMissions[index]), &merc, durationBonus, floatModifier, intModifier, durationBonusSkill, floatModifierSkill, intModifierSkill, extraBits); + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: + { + intModifier = max(intModifier, gRebelCommandSettings.iDeepDeploymentRangeEW); + CHAR16 rangeText[100]; + swprintf(rangeText, szRebelCommandText[RCT_MISSION_BONUS_DEPLOY_RANGE], intModifier, locSkillText[intModifierSkill]); + agentBonusText.push_back(rangeText); + } + break; + + case RCAM_DISRUPT_ASD: + { + CHAR16 text[100]; + floatModifier = max(floatModifier, gRebelCommandSettings.fDisruptAsdIncomeReductionModifier); + floatModifier *= 100.f; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_ASD_INCOME_REDUCTION], floatModifier, L"%s", locSkillText[floatModifierSkill]); + agentBonusText.push_back(text); + + if (gGameOptions.fNewTraitSystem) + { + switch (extraBits) + { + case MissionHelpers::DISRUPT_ASD_STEAL_FUEL: + { + const UINT8 townId = GetTownIdForSector(BOBBYR_SHIPPING_DEST_SECTOR_X, BOBBYR_SHIPPING_DEST_SECTOR_Y); + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_STEAL_FUEL], pTownNames[townId], locSkillText[TECHNICIAN_NT]); + agentBonusText.push_back(text); + } + break; + + case MissionHelpers::DISRUPT_ASD_DESTROY_RESERVES: + { + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_DESTROY_RESERVES], locSkillText[DEMOLITIONS_NT]); + agentBonusText.push_back(text); + } + break; + } + } + } + + case RCAM_FORGE_TRANSPORT_ORDERS: + { + // no special modifiers. included for completeness. + } + break; + + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: + { + // no special modifiers. included for completeness. + } + break; + + case RCAM_IMPROVE_LOCAL_SHOPS: + { + // no special modifiers. included for completeness. + } + break; + + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: + { + floatModifier = max(floatModifier, gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier); + floatModifier -= 1.f; + floatModifier *= 100.f; + CHAR16 rangeText[100]; + swprintf(rangeText, szRebelCommandText[RCT_MISSION_BONUS_DECISION_TIME], floatModifier, L"%s", locSkillText[floatModifierSkill]); + agentBonusText.push_back(rangeText); + } + break; + + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: + { + floatModifier = max(floatModifier, gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier); + floatModifier *= 100.f; + CHAR16 text[100]; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_UNALERTED_VISION_PENALTY], floatModifier, L"%s", locSkillText[floatModifierSkill]); + agentBonusText.push_back(text); + } + break; + + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: + { + intModifier = max(intModifier, gRebelCommandSettings.iSabotageInfantryEquipmentModifier); + CHAR16 text[100]; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_INFANTRY_GEAR_QUALITY], intModifier, locSkillText[intModifierSkill]); + agentBonusText.push_back(text); + } + break; + + case RCAM_SABOTAGE_MECHANICAL_UNITS: + { + intModifier = max(intModifier, gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss); + CHAR16 text[100]; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_MECHANICAL_STAT_LOSS], intModifier, locSkillText[intModifierSkill]); + agentBonusText.push_back(text); + } + break; + + case RCAM_SEND_SUPPLIES_TO_TOWN: + { + // duration here is affected by lvl instead of a specific skill + CHAR16 durationText[100]; + swprintf(durationText, szRebelCommandText[RCT_MISSION_BONUS_DURATION], SendSuppliesToTownDurationBonus(&merc), pShortAttributeStrings[5]); // "Lvl" + agentBonusText.push_back(durationText); + } + break; + + case RCAM_SOLDIER_BOUNTIES_KINGPIN: + { + floatModifier = max(floatModifier, 1.f); + CHAR16 text[100]; + if (floatModifier > 1.f) + { + floatModifier *= 100; + floatModifier -= 100; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_PAYOUT], floatModifier, L"%s", locSkillText[floatModifierSkill]); + agentBonusText.push_back(text); + } + + if (intModifier > 0) + { + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_PAYOUT_LIMIT_INCREASE], intModifier, locSkillText[intModifierSkill]); + agentBonusText.push_back(text); + } + + if (extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_OFFICER_PAYOUTS) + { + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_OFFICER_PAYOUT], locSkillText[floatModifierSkill]); + agentBonusText.push_back(text); + } + else if (extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS) + { + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_VEHICLE_PAYOUT], locSkillText[floatModifierSkill]); + agentBonusText.push_back(text); + } + } + break; + + case RCAM_TRAIN_MILITIA_ANYWHERE: + { + intModifier = max(intModifier, 1); + CHAR16 text[100]; + swprintf(text, szRebelCommandText[RCT_MISSION_BONUS_MAX_TRAINERS], intModifier, locSkillText[intModifierSkill]); + agentBonusText.push_back(text); + } + break; + + default: break; + } + + if (durationBonus > 0) + { + CHAR16 durationText[100]; + swprintf(durationText, szRebelCommandText[RCT_MISSION_BONUS_DURATION], durationBonus, locSkillText[durationBonusSkill]); + agentBonusText.push_back(durationText); + } + } + + if (agentBonusText.size() == 0) + { + DrawTextToScreen(szRebelCommandText[RCT_NONE], x+10, y+150+54+20+2+11, 0, FONT10ARIAL, FONT_MCOLOR_RED, FONT_MCOLOR_BLACK, FALSE, 0); + } + else + { + for (UINT8 i = 0; i < agentBonusText.size(); ++i) + { + // the percent sign here is a hack to get it to display properly for string that need a percent sign + swprintf(sText, agentBonusText[i].c_str(), L"%%"); + DrawTextToScreen(sText, x+10, y+150+54+20+2+11*(i+1), 0, FONT10ARIAL, FONT_GREEN, FONT_MCOLOR_BLACK, FALSE, 0); + } + } + + // draw "start mission" button + BOOLEAN canStartMission = TRUE; + if (agentIndex[index] < static_cast(mercs.size())) + { + const UINT8 townId = GetTownIdForSector(mercs[agentIndex[index]]->sSectorX, mercs[agentIndex[index]]->sSectorY); + const UINT8 townLoyalty = GetRegionLoyalty(townId); + const INT32 endTime = mercs[agentIndex[index]]->iEndofContractTime; + const INT32 worldMin = GetWorldTotalMin(); + const INT32 remaining = endTime - worldMin; + + if (townId < FIRST_TOWN || townId >= NUM_TOWNS || !gfTownUsesLoyalty[townId]) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_START_NOT_IN_TOWN]); + } + else if (townLoyalty < gRebelCommandSettings.iMinLoyaltyForMission && rebelCommandSaveInfo.availableMissions[index] != RCAM_SEND_SUPPLIES_TO_TOWN) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_START_LOW_LOYALTY]); + } + else if (mercs[agentIndex[index]]->bAssignment == ASSIGNMENT_POW || mercs[agentIndex[index]]->bAssignment == ASSIGNMENT_MINIEVENT || mercs[agentIndex[index]]->bAssignment == ASSIGNMENT_REBELCOMMAND) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_START_AGENT_UNAVAILABLE]); + } + else if (mercs[agentIndex[index]]->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC && remaining < 24 * 60) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_START_CONTRACT_EXPIRING]); + } + } + else if (agentIndex[index] == mercs.size() && + ( + rebelCommandSaveInfo.availableMissions[index] == RCAM_SEND_SUPPLIES_TO_TOWN || + rebelCommandSaveInfo.availableMissions[index] == RCAM_FORGE_TRANSPORT_ORDERS + ) + + ) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_USE_REBEL_AGENT]); + } + else if ((gTacticalStatus.uiFlags & INCOMBAT) || gTacticalStatus.fEnemyInSector) + { + canStartMission = FALSE; + swprintf(sText, szRebelCommandText[RCT_MISSION_CANT_START_BATTLE_IN_PROGRESS]); + DrawTextToScreen(sText, x, y+295, 231, FONT10ARIAL, FONT_RED, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED); + } + + if (canStartMission) + { + swprintf(sText, szRebelCommandText[RCT_MISSION_START_BUTTON], GetMissionCost()); + btnId = CreateTextButton(sText, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, x, y+290, 231, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + const INT8 index = MSYS_GetBtnUserData(btn, 0); + ButtonHelper(btn, reason, [btn, index]() { + PrepareMission(index); + }); + }); + MSYS_SetBtnUserData(btnId, 0, index); + btnIds.push_back(btnId); + } + else + { + DrawTextToScreen(sText, x, y+295, 231, FONT10ARIAL, FONT_RED, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED); + } + + return TRUE; +} + +void RenderMissionOverview() +{ + CHAR16 sText[800]; + INT32 btnId; + + // title + RenderHeader(RCT_AGENT_OVERVIEW); + + // display help button + btnId = CreateTextButton(L"?", FONT12ARIAL, FONT_MCOLOR_WHITE, FONT_BLACK, BUTTON_USE_DEFAULT, WEBSITE_LEFT + 15, WEBSITE_TOP + 40, 30, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + ButtonHelper(btn, reason, []() + { + missionOverviewSubview = missionOverviewSubview == MOS_HELP ? MOS_MISSION_LIST : MOS_HELP; + }); + }); + + btnIds.push_back(btnId); + + // toggle between mission picker and active mission effects + switch (missionOverviewSubview) + { + case MOS_MISSION_LIST: + swprintf(sText, szRebelCommandText[RCT_MISSION_VIEW_ACTIVE]); + break; + + case MOS_ACTIVE_MISSION_EFFECTS: + case MOS_HELP: + swprintf(sText, szRebelCommandText[RCT_MISSION_VIEW_LIST]); + break; + } + btnId = CreateTextButton(sText, FONT10ARIAL, FONT_MCOLOR_LTYELLOW, FONT_BLACK, BUTTON_USE_DEFAULT, WEBSITE_LEFT + 50, WEBSITE_TOP + 40, 435, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, [](GUI_BUTTON* btn, INT32 reason) + { + ButtonHelper(btn, reason, []() + { + switch (missionOverviewSubview) + { + case MOS_MISSION_LIST: + missionOverviewSubview = MOS_ACTIVE_MISSION_EFFECTS; + break; + + case MOS_ACTIVE_MISSION_EFFECTS: + case MOS_HELP: + missionOverviewSubview = MOS_MISSION_LIST; + break; + } + }); + }); + + btnIds.push_back(btnId); + + // main body + switch (missionOverviewSubview) + { + case MOS_MISSION_LIST: + if (rebelCommandSaveInfo.availableMissions[0] == RCAM_NONE) + { + UINT32 nextMissionAvailableDay = GetWorldDay(); + const INT8 interval = gRebelCommandSettings.iMissionRefreshTimeDays; + nextMissionAvailableDay += (interval - (nextMissionAvailableDay % interval)); + + if (missionMap.size() > 0) + { + DrawTextToScreen(szRebelCommandText[RCT_MISSION_PREP_IN_PROGRESS], WEBSITE_LEFT + 15, WEBSITE_TOP + 155, WEBSITE_WIDTH - 30, FONT14ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED); + } + + swprintf(sText, szRebelCommandText[RCT_MISSION_NEXT_AVAILABILITY], nextMissionAvailableDay); + DrawTextToScreen(sText, WEBSITE_LEFT + 15, WEBSITE_TOP + 175, WEBSITE_WIDTH - 30, FONT14ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED); + } + else + { + for (int i = 0; i < NUM_ARC_AGENT_SLOTS; ++i) + { + SetupMissionAgentBox(WEBSITE_LEFT + 15 + 240 * i, WEBSITE_TOP + 65, i); + } + } + break; + + case MOS_ACTIVE_MISSION_EFFECTS: + { + DrawTextToScreen(szRebelCommandText[RCT_MISSION_ACTIVE_MISSIONS], WEBSITE_LEFT + 25, WEBSITE_TOP + 75, 0, FONT12ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + if (missionMap.size() == 0) + { + DrawTextToScreen(szRebelCommandText[RCT_NONE], WEBSITE_LEFT + 35, WEBSITE_TOP + 90, 0, FONT12ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); + } + else + { + std::vector evt1Strings; + std::vector evt2Strings; + std::vector> missions = GetAllStrategicEventsOfType(EVENT_REBELCOMMAND); + for (std::vector>::iterator it = missions.begin(); it != missions.end(); ++it) + { + const UINT32 eventTime = it->first; + const UINT32 day = eventTime / 60 / 60 / 24; + const UINT32 hour = (eventTime % (24 * 60 * 60)) / 60 / 60; + const UINT32 minute = (eventTime % (24 * 60 * 60)) % (60 * 60); + MissionFirstEvent evt1; + MissionSecondEvent evt2; + DeserialiseMissionFirstEvent(it->second, evt1); + DeserialiseMissionSecondEvent(it->second, evt2); + + if (evt1.isFirstEvent) + { + CHAR16 prepText[200]; + swprintf(prepText, szRebelCommandText[RCT_MISSION_LIST_PREPARING], szRebelCommandAgentMissionsText[evt1.missionId * 2], day, hour, minute); + evt1Strings.push_back(prepText); + } + else if (evt2.isSecondEvent) + { + CHAR16 missionText[200]; + swprintf(missionText, szRebelCommandText[RCT_MISSION_LIST_ACTIVE], szRebelCommandAgentMissionsText[evt2.missionId * 2], day, hour, minute); + evt2Strings.push_back(missionText); + } + } + + UINT16 y = WEBSITE_TOP + 90; + for (std::vector::size_type i = 0; i < evt1Strings.size(); ++i) + { + DrawTextToScreen(const_cast(evt1Strings[i].c_str()), WEBSITE_LEFT + 35, y, 0, FONT12ARIAL, FONT_DKYELLOW, FONT_MCOLOR_BLACK, FALSE, 0); + y += 15; + } + + for (std::vector::size_type i = 0; i < evt2Strings.size(); ++i) + { + DrawTextToScreen(const_cast(evt2Strings[i].c_str()), WEBSITE_LEFT + 35, y, 0, FONT12ARIAL, FONT_DKGREEN, FONT_MCOLOR_BLACK, FALSE, 0); + y += 15; + } + } + } + break; + + case MOS_HELP: + { + UINT16 y = WEBSITE_TOP + 100; + swprintf(sText, szRebelCommandText[RCT_MISSION_HELP_1], gRebelCommandSettings.iMissionPrepTime); + y += DisplayWrappedString(WEBSITE_LEFT + 35, y, 400, 2, FONT12ARIAL, FONT_MCOLOR_BLACK, sText, FONT_MCOLOR_BLACK, FALSE, 0); + y += 20; + y += DisplayWrappedString(WEBSITE_LEFT + 35, y, 400, 2, FONT12ARIAL, FONT_MCOLOR_BLACK, szRebelCommandText[RCT_MISSION_HELP_2], FONT_MCOLOR_BLACK, FALSE, 0); + y += 20; + DisplayWrappedString(WEBSITE_LEFT + 35, y, 400, 2, FONT12ARIAL, FONT_MCOLOR_BLACK, szRebelCommandText[RCT_MISSION_HELP_3], FONT_MCOLOR_BLACK, FALSE, 0); + } + break; + } + + // "new missions every X hours" text + swprintf(sText, szRebelCommandText[RCT_NEW_MISSIONS_AVAILABLE_TIME], gRebelCommandSettings.iMissionRefreshTimeDays * 24); + DrawTextToScreen(sText, WEBSITE_LEFT + 22, WEBSITE_TOP + WEBSITE_HEIGHT - 14, 0, FONT10ARIAL, FONT_MCOLOR_BLACK, FONT_MCOLOR_BLACK, FALSE, 0); +} + +void PrepareMission(INT8 index) +{ + const INT32 cost = GetMissionCost(); + if (rebelCommandSaveInfo.iSupplies < cost) + { + DoLapTopMessageBox(MSG_BOX_LAPTOP_DEFAULT, szRebelCommandText[RCT_INSUFFICIENT_FUNDS], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL); + return; + } + + // confirmation popup + std::vector mercs; + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + + if (pSoldier && pSoldier->bActive + && !(pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) + ) + { + mercs.push_back(pSoldier); + } + } + + const MERCPROFILESTRUCT* merc = agentIndex[index] == mercs.size() ? nullptr : &gMercProfiles[mercs[agentIndex[index]]->ubProfile]; + CHAR16 text[400]; + RebelCommandAgentMissionsText missionTitle; + INT8 missionSuccessChance; + UINT8 missionDuration; + UINT32 durationBonus; + FLOAT floatModifier; + INT16 intModifier; + int durSkill; + int floatSkill; + int intSkill; + UINT16 extraBits; + + MissionHelpers::GetMissionInfo(static_cast(rebelCommandSaveInfo.availableMissions[index]), merc, durationBonus, floatModifier, intModifier, durSkill, floatSkill, intSkill, extraBits); + switch (rebelCommandSaveInfo.availableMissions[index]) + { + case RCAM_DEEP_DEPLOYMENT: + { + missionTitle = RCAMT_DEEP_DEPLOYMENT_TITLE; + missionSuccessChance = gRebelCommandSettings.iDeepDeploymentSuccessChance; + missionDuration = gRebelCommandSettings.iDeepDeploymentDuration; + } + break; + + case RCAM_DISRUPT_ASD: + { + missionTitle = RCAMT_DISRUPT_ASD_TITLE; + missionSuccessChance = gRebelCommandSettings.iDisruptAsdSuccessChance; + missionDuration = gRebelCommandSettings.iDisruptAsdDuration; + } + break; + + case RCAM_FORGE_TRANSPORT_ORDERS: + { + missionTitle = RCAMT_FORGE_TRANSPORT_ORDERS_TITLE; + missionSuccessChance = gRebelCommandSettings.iForgeTransportOrdersSuccessChance; + missionDuration = 12; + } + break; + + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: + { + missionTitle = RCAMT_GET_ENEMY_MOVEMENT_TARGETS_TITLE; + missionSuccessChance = gRebelCommandSettings.iGetEnemyMovementTargetsSuccessChance; + missionDuration = gRebelCommandSettings.iGetEnemyMovementTargetsDuration; + } + break; + + case RCAM_IMPROVE_LOCAL_SHOPS: + { + missionTitle = RCAMT_IMPROVE_LOCAL_SHOPS_TITLE; + missionSuccessChance = gRebelCommandSettings.iImproveLocalShopsSuccessChance; + missionDuration = gRebelCommandSettings.iImproveLocalShopsDuration; + } + break; + + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: + { + missionTitle = RCAMT_REDUCE_STRATEGIC_DECISION_SPEED_TITLE; + missionSuccessChance = gRebelCommandSettings.iReduceStrategicDecisionSpeedSuccessChance; + missionDuration = gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration; + } + break; + + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: + { + missionTitle = RCAMT_REDUCE_UNALERTED_ENEMY_VISION_TITLE; + missionSuccessChance = gRebelCommandSettings.iReduceUnalertedEnemyVisionSuccessChance; + missionDuration = gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration; + } + break; + + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: + { + missionTitle = RCAMT_SABOTAGE_INFANTRY_EQUIPMENT_TITLE; + missionSuccessChance = gRebelCommandSettings.iSabotageInfantryEquipmentSuccessChance; + missionDuration = gRebelCommandSettings.iSabotageInfantryEquipmentDuration; + } + break; + + case RCAM_SABOTAGE_MECHANICAL_UNITS: + { + missionTitle = RCAMT_SABOTAGE_MECHANICAL_UNITS_TITLE; + missionSuccessChance = gRebelCommandSettings.iSabotageMechanicalUnitsSuccessChance; + missionDuration = gRebelCommandSettings.iSabotageMechanicalUnitsDuration; + } + break; + + case RCAM_SEND_SUPPLIES_TO_TOWN: + { + missionTitle = RCAMT_SEND_SUPPLIES_TO_TOWN_TITLE; + missionSuccessChance = gRebelCommandSettings.iSendSuppliesToTownSuccessChance; + missionDuration = gRebelCommandSettings.iSendSuppliesToTownDuration + SendSuppliesToTownDurationBonus(merc); + extraBits = SECTOR(merc->sSectorX, merc->sSectorY); + } + break; + + case RCAM_SOLDIER_BOUNTIES_KINGPIN: + { + missionTitle = RCAMT_SOLDIER_BOUNTIES_KINGPIN_TITLE; + missionSuccessChance = gRebelCommandSettings.iSoldierBountiesKingpinSuccessChance; + missionDuration = gRebelCommandSettings.iSoldierBountiesKingpinDuration; + } + break; + + case RCAM_TRAIN_MILITIA_ANYWHERE: + { + missionTitle = RCAMT_TRAIN_MILITIA_ANYWHERE_TITLE; + missionSuccessChance = gRebelCommandSettings.iTrainMilitiaAnywhereSuccessChance; + missionDuration = gRebelCommandSettings.iTrainMilitiaAnywhereDuration; + } + break; + + default: break; + } + + missionSuccessChance += GetMissionSuccessChanceBonus(merc); + + if (Random(100) > static_cast(missionSuccessChance)) + { + // mission failed! + missionDuration = 0; + } + else + { + missionDuration += durationBonus; + } + + swprintf(text, szRebelCommandText[RCT_MISSION_POPUP_PART1], szRebelCommandAgentMissionsText[missionTitle], cost); + + if (agentIndex[index] == mercs.size()) + { + // sent a generic rebel + MissionHelpers::missionParam = SerialiseMissionFirstEvent(TRUE, 0 /* no profile needed */, static_cast(rebelCommandSaveInfo.availableMissions[index]), missionDuration, 0 /* no extra data */); + swprintf(text, szRebelCommandText[RCT_MISSION_POPUP_PART2_GENERIC], text); + } + else + { + MissionHelpers::missionParam = SerialiseMissionFirstEvent(FALSE, mercs[agentIndex[index]]->ubProfile, static_cast(rebelCommandSaveInfo.availableMissions[index]), missionDuration, static_cast(extraBits)); + if (merc->bSex == MALE) + swprintf(text, szRebelCommandText[RCT_MISSION_POPUP_PART2_MALE], text, merc->zNickname, gRebelCommandSettings.iMissionPrepTime); + else + swprintf(text, szRebelCommandText[RCT_MISSION_POPUP_PART2_FEMALE], text, merc->zNickname, gRebelCommandSettings.iMissionPrepTime); + } + + DoLapTopMessageBox(MSG_BOX_LAPTOP_DEFAULT, text, LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, [](UINT8 exitValue) { + if (exitValue == MSG_BOX_RETURN_YES) + { + MissionFirstEvent evt; + DeserialiseMissionFirstEvent(MissionHelpers::missionParam, evt); + + if (!evt.sentGenericRebelAgent) + { + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + if (pSoldier->ubProfile == evt.mercProfileId) + { + TakeSoldierOutOfVehicle(pSoldier); + RemoveCharacterFromSquads(pSoldier); + pSoldier->bSectorZ += REBEL_COMMAND_Z_OFFSET; + pSoldier->bBleeding = 0; + SetTimeOfAssignmentChangeForMerc(pSoldier); + ChangeSoldiersAssignment(pSoldier, ASSIGNMENT_REBELCOMMAND); + break; + } + } + } + + // disable missions until next refresh + for (INT8 i = 0; i < NUM_ARC_AGENT_SLOTS; ++i) + { + rebelCommandSaveInfo.availableMissions[i] = RCAM_NONE; + } + + // queue up the mission start event. make sure we use the top of the hour because I'm lazy and we're handling the assignment here instead of Assignments.cpp + const UINT32 time = GetWorldTotalMin(); + AddStrategicEvent(EVENT_REBELCOMMAND, time + (60 - time % 60) + 60 * gRebelCommandSettings.iMissionPrepTime, MissionHelpers::missionParam); + missionMap.insert(std::make_pair(static_cast(evt.missionId), MissionHelpers::missionParam)); + + rebelCommandSaveInfo.iSupplies -= GetMissionCost(); + } + + // update the mission list to show that we've started + redraw = TRUE; + }); +} // end website void ApplyEnemyPenalties(SOLDIERTYPE* pSoldier) @@ -1560,7 +3076,7 @@ void ApplyEnemyPenalties(SOLDIERTYPE* pSoldier) continue; // and that it's not level 0 - const UINT8 level = rebelCommandSaveInfo.regions[a].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[a].GetLevel(index); if (level == 0) continue; @@ -1572,7 +3088,7 @@ void ApplyEnemyPenalties(SOLDIERTYPE* pSoldier) sectors.push_back(std::tuple(x, y, GetRegionLoyalty(a))); // check if soldier is within range of the city - for (const auto tuple : sectors) + for (const auto& tuple : sectors) { const INT16 x = std::get<0>(tuple); const INT16 y = std::get<1>(tuple); @@ -1639,7 +3155,7 @@ FLOAT GetAssignmentBonus(INT16 x, INT16 y) if (index >= 0) { - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); value += info.adminActions[RCAA_MERC_SUPPORT].fValue1 * level; } @@ -1659,7 +3175,7 @@ INT32 GetMiningPolicyBonus(INT16 townId) if (index >= 0) { - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); return static_cast(info.adminActions[RCAA_MINING_POLICY].fValue1 * level); } @@ -1738,7 +3254,7 @@ void GetBonusMilitia(INT16 sx, INT16 sy, UINT8& green, UINT8& regular, UINT8& el continue; // and that it's not level 0 - const UINT8 level = rebelCommandSaveInfo.regions[a].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[a].GetLevel(index); if (level == 0) continue; @@ -1750,7 +3266,7 @@ void GetBonusMilitia(INT16 sx, INT16 sy, UINT8& green, UINT8& regular, UINT8& el sectors.push_back(std::tuple(x, y, GetRegionLoyalty(a))); // check if sector is within range of the city - for (const auto tuple : sectors) + for (const auto& tuple : sectors) { const INT16 x = std::get<0>(tuple); const INT16 y = std::get<1>(tuple); @@ -1801,7 +3317,7 @@ INT16 GetFortificationsBonus(UINT8 sector) return 0; // no levels in region - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); if (level == 0) return 0; @@ -1838,7 +3354,7 @@ FLOAT GetHarriersSpeedPenalty(UINT8 sector) continue; // no levels in region - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); if (level == 0) continue; @@ -1848,7 +3364,7 @@ FLOAT GetHarriersSpeedPenalty(UINT8 sector) // run through townSectors to find the biggest harriers penalty BOOLEAN found = FALSE; - for (const auto trio : townSectors) + for (const auto& trio : townSectors) { const INT16 sx = std::get<0>(trio); const INT16 sy = std::get<1>(trio); @@ -1940,7 +3456,7 @@ void HandleScouting() continue; // no levels in region - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); if (level == 0) continue; @@ -1954,7 +3470,7 @@ void HandleScouting() { for (int y = MINIMUM_VALID_Y_COORDINATE; y <= MAXIMUM_VALID_Y_COORDINATE; ++y) { - for (const auto trio : townSectors) + for (const auto& trio : townSectors) { const INT16 sx = std::get<0>(trio); const INT16 sy = std::get<1>(trio); @@ -2004,7 +3520,7 @@ FLOAT GetPathfindersSpeedBonus(UINT8 sector) continue; // no levels in region - const UINT8 level = rebelCommandSaveInfo.regions[townId].actionLevels[index]; + const UINT8 level = rebelCommandSaveInfo.regions[townId].GetLevel(index); if (level == 0) continue; @@ -2014,7 +3530,7 @@ FLOAT GetPathfindersSpeedBonus(UINT8 sector) // run through townSectors to find the biggest pathfinders bonus BOOLEAN found = FALSE; - for (const auto trio : townSectors) + for (const auto& trio : townSectors) { const INT16 sx = std::get<0>(trio); const INT16 sy = std::get<1>(trio); @@ -2068,7 +3584,9 @@ void RaidMines(INT32 &playerIncome, INT32 &enemyIncome) INT32 stolenIncome = static_cast(enemyIncome * rebelCommandSaveInfo.directives[RCD_RAID_MINES].GetValue1() * Random(100) / 100.f); playerIncome += stolenIncome; - enemyIncome -= stolenIncome; + enemyIncome -= stolenIncome*2; + + if (enemyIncome < 0) enemyIncome = 0; if (stolenIncome > 0) { @@ -2265,15 +3783,15 @@ void DailyUpdate() rebelCommandSaveInfo.iActiveDirective = directive; // increment supplies - const UINT8 progress = CurrentPlayerProgressPercentage(); - iIncomingSuppliesPerDay = static_cast(progress * gRebelCommandSettings.fIncomeModifier + (directive == RCD_GATHER_SUPPLIES ? rebelCommandSaveInfo.directives[RCD_GATHER_SUPPLIES].GetValue1() : 0)); + iIncomingSuppliesPerDay = CalcIncomingSuppliesPerDay(static_cast(directive)); rebelCommandSaveInfo.iSupplies += iIncomingSuppliesPerDay; // get regional bonuses INT16 intelGain = 0; INT16 supplyGain = 0; INT16 moneyGain = 0; - for (int a = FIRST_TOWN; a < NUM_TOWNS; ++a) + CHAR16 text[200]; + for (int a = FIRST_TOWN+1; a < NUM_TOWNS; ++a) { // check to see if the town is lost if (IsTownUnderCompleteControlByEnemy(a) && rebelCommandSaveInfo.regions[a].adminStatus == RAS_ACTIVE) @@ -2302,58 +3820,73 @@ void DailyUpdate() const UINT8 loyalty = GetRegionLoyalty(a); for (int b = 0; b < REBEL_COMMAND_MAX_ACTIONS_PER_REGION; ++b) { - const INT8 level = rebelCommandSaveInfo.regions[a].actionLevels[b]; - switch (static_cast(rebelCommandSaveInfo.regions[a].actions[b])) + const INT8 level = rebelCommandSaveInfo.regions[a].GetLevel(b); + if (level == 0) continue; + + if (!CanAdminActionBeToggled(rebelCommandSaveInfo.regions[a].actions[b]) || !rebelCommandSaveInfo.regions[a].IsActive(b)) continue; + + // toggle admin action off on a negative supply balance + if (rebelCommandSaveInfo.iSupplies <= 0) + rebelCommandSaveInfo.regions[a].SetInactive(b); + + if (rebelCommandSaveInfo.regions[a].IsActive(b)) { - case RCAA_SUPPLY_LINE: - case RCAA_SAFEHOUSES: - case RCAA_SUPPLY_DISRUPTION: - case RCAA_SCOUTS: - case RCAA_MERC_SUPPORT: - case RCAA_MINING_POLICY: - case RCAA_PATHFINDERS: - case RCAA_HARRIERS: - case RCAA_FORTIFICATIONS: - // no daily bonuses - break; + switch (static_cast(rebelCommandSaveInfo.regions[a].actions[b])) + { + case RCAA_SUPPLY_LINE: + case RCAA_SUPPLY_DISRUPTION: + case RCAA_SCOUTS: + case RCAA_MERC_SUPPORT: + case RCAA_PATHFINDERS: + case RCAA_FORTIFICATIONS: + case RCAA_HARRIERS: + case RCAA_MINING_POLICY: + case RCAA_SAFEHOUSES: + // no daily bonuses + break; - case RCAA_REBEL_RADIO: - IncrementTownLoyalty(a, static_cast(info.adminActions[RCAA_REBEL_RADIO].fValue1 * level)); - break; + case RCAA_REBEL_RADIO: + IncrementTownLoyalty(a, static_cast(info.adminActions[RCAA_REBEL_RADIO].fValue1 * level)); + break; - case RCAA_DEAD_DROPS: - intelGain += Random(static_cast(info.adminActions[RCAA_DEAD_DROPS].fValue1 * level * loyalty / 100.f)); - break; - - case RCAA_SMUGGLERS: - supplyGain += Random(static_cast(info.adminActions[RCAA_SMUGGLERS].fValue1 * level * loyalty / 100.f)); - break; + case RCAA_DEAD_DROPS: + intelGain += Random(static_cast(info.adminActions[RCAA_DEAD_DROPS].fValue1 * level * loyalty / 100.f)); + break; + + case RCAA_SMUGGLERS: + supplyGain += Random(static_cast(info.adminActions[RCAA_SMUGGLERS].fValue1 * level * loyalty / 100.f)); + break; - case RCAA_WAREHOUSES: - AddResources( - static_cast(info.adminActions[RCAA_WAREHOUSES].fValue1 * level * Random(100) * loyalty / 10000.f), - static_cast(info.adminActions[RCAA_WAREHOUSES].fValue2 * level * Random(100) * loyalty / 10000.f), - static_cast(info.adminActions[RCAA_WAREHOUSES].fValue3 * level * Random(100) * loyalty / 10000.f)); - break; + case RCAA_WAREHOUSES: + AddResources( + static_cast(info.adminActions[RCAA_WAREHOUSES].fValue1 * level * Random(100) * loyalty / 10000.f), + static_cast(info.adminActions[RCAA_WAREHOUSES].fValue2 * level * Random(100) * loyalty / 10000.f), + static_cast(info.adminActions[RCAA_WAREHOUSES].fValue3 * level * Random(100) * loyalty / 10000.f)); + break; - case RCAA_TAXES: - moneyGain += static_cast(info.adminActions[RCAA_TAXES].fValue1 * coolness * level * loyalty * (75.f + Random(26))/ 10000.f); - DecrementTownLoyalty(a, static_cast(info.adminActions[RCAA_TAXES].fValue2 * level)); - break; + case RCAA_TAXES: + moneyGain += static_cast(info.adminActions[RCAA_TAXES].fValue1 * coolness * level * loyalty * (75.f + Random(26))/ 10000.f); + DecrementTownLoyalty(a, static_cast(info.adminActions[RCAA_TAXES].fValue2 * level)); + break; - case RCAA_ASSIST_CIVILIANS: - AddVolunteers(static_cast(info.adminActions[RCAA_ASSIST_CIVILIANS].fValue1 * level * loyalty / 100.f)); - break; + case RCAA_ASSIST_CIVILIANS: + AddVolunteers(static_cast(info.adminActions[RCAA_ASSIST_CIVILIANS].fValue1 * level * loyalty / 100.f)); + break; - default: - AssertMsg(false, "Unknown Admin Action"); - break; + default: + AssertMsg(false, "Unknown Admin Action"); + break; + } } } } - CHAR16 text[200]; + if (rebelCommandSaveInfo.iSupplies <= 0) + { + ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, szRebelCommandText[RCT_INSUFFICIENT_SUPPLIES_ADMIN_ACTIONS_DISABLED]); + } + if (intelGain > 0) { swprintf(text, szRebelCommandText[RCT_DEAD_DROP_INCOME], intelGain); @@ -2374,12 +3907,73 @@ void DailyUpdate() { AddTransactionToPlayersBook(REBEL_COMMAND, 0, GetWorldTotalMin(), moneyGain); } + + // update missions + if (rebelCommandSaveInfo.cachedBountyPayout > 0) + { + AddTransactionToPlayersBook(REBEL_COMMAND_BOUNTY_PAYOUT, 0, GetWorldTotalMin(), rebelCommandSaveInfo.cachedBountyPayout); + rebelCommandSaveInfo.cachedBountyPayout = 0; + } + + // RCAM_DISRUPT_ASD + ApplyAdditionalASDEffects(); + + if (GetWorldDay() % gRebelCommandSettings.iMissionRefreshTimeDays == 0) + { + std::unordered_set validMissions; + for (int i = 0; i < RCAM_NUM_MISSIONS; ++i) + { + if (i == RCAM_SOLDIER_BOUNTIES_KINGPIN && !(CheckFact(FACT_KINGPIN_INTRODUCED_SELF, 0) == TRUE && CheckFact(FACT_KINGPIN_DEAD, 0) == FALSE && CheckFact(FACT_KINGPIN_IS_ENEMY, 0) == FALSE && CurrentPlayerProgressPercentage() >= 30)) continue; + else if (i == RCAM_DISRUPT_ASD && gGameExternalOptions.fASDActive == FALSE) continue; + else if (i == RCAM_FORGE_TRANSPORT_ORDERS && gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) continue; + + validMissions.insert(static_cast(i)); + } + + for (const auto& pair : missionMap) + { + const RebelCommandAgentMissions mission = pair.first; + validMissions.erase(mission); + } + + if (validMissions.size() >= NUM_ARC_AGENT_SLOTS) + { + for (int i = 0; i < NUM_ARC_AGENT_SLOTS; ++i) + { + const INT8 missionIndex = static_cast(Random(validMissions.size())); + auto iter = validMissions.cbegin(); + for (INT8 j = 0; j < missionIndex; ++j) iter++; + rebelCommandSaveInfo.availableMissions[i] = *iter; + validMissions.erase(static_cast(rebelCommandSaveInfo.availableMissions[i])); + } + } + else // 1 mission available + { + int idx = 0; + for (auto iter = validMissions.cbegin(); iter != validMissions.cend(); ++iter) + { + rebelCommandSaveInfo.availableMissions[idx] = *iter; + idx++; + } + + while (idx < NUM_ARC_AGENT_SLOTS) + { + rebelCommandSaveInfo.availableMissions[idx] = RCAM_NONE; + idx++; + } + } + + ScreenMsg(FONT_MCOLOR_LTGREEN, MSG_INTERFACE, szRebelCommandText[RCT_NEW_MISSIONS_AVAILABLE_NOTIFICATION]); + } } void HourlyUpdate() { HandleScouting(); + // RCAM_SEND_SUPPLIES_TO_TOWN + SendSuppliesToTownMission(); + // it's midnight! do the daily update if (GetWorldHour() == 0) { @@ -2493,6 +4087,12 @@ void Init() rebelCommandSaveInfo.regions[a].actionLevels[b] = 0; } } + + // init missions + for (int i = 0; i < NUM_ARC_AGENT_SLOTS; ++i) + { + rebelCommandSaveInfo.availableMissions[i] = RCAM_NONE; + } } BOOLEAN Load(HWFILE file) @@ -2510,6 +4110,36 @@ BOOLEAN Load(HWFILE file) Init(); } + // missions update check + if (rebelCommandSaveInfo.availableMissions[0] == rebelCommandSaveInfo.availableMissions[1] && rebelCommandSaveInfo.availableMissions[0] != RCAM_NONE) + { + // init missions + for (int i = 0; i < NUM_ARC_AGENT_SLOTS; ++i) + { + rebelCommandSaveInfo.availableMissions[i] = RCAM_NONE; + } + } + + // go through every strategic event to find active agent missions + std::vector> missions = GetAllStrategicEventsOfType(EVENT_REBELCOMMAND); + missionMap.clear(); + for (std::vector>::iterator it = missions.begin(); it != missions.end(); ++it) + { + MissionFirstEvent evt1; + DeserialiseMissionFirstEvent(it->second, evt1); + if (evt1.isFirstEvent) + { + missionMap.insert(std::make_pair(static_cast(evt1.missionId), it->second)); + } + + MissionSecondEvent evt2; + DeserialiseMissionSecondEvent(it->second, evt2); + + if (evt2.isSecondEvent) + { + missionMap.insert(std::make_pair(static_cast(evt2.missionId), it->second)); + } + } return TRUE; } @@ -2667,6 +4297,144 @@ void SetupInfo() aa.fValue3 = 0.f; info.adminActions.insert(info.adminActions.begin() + RCAA_FORTIFICATIONS, aa); + // rftr todo: this should really be a map... but as long as we insert mission info in the same order as the enum then we're good + MissionHelpers::missionInfo.clear(); + // example format + // { + // { new skill traits to check }, + // { old skill traits to check. use -1 to not match against anything }, + // { duration bonus for checked trait }, + // { float modifier for checked trait }, + // { int modifier for checked trait }, + // { value to place in extra bits, used to determine what bonus is applied. } + // } + //RCAM_DEEP_DEPLOYMENT + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, SCOUTING_NT, STEALTHY_NT, SURVIVAL_NT}, + {-1, -1, STEALTHY_OT, CAMOUFLAGED_OT}, + {gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Covert, gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Scouting, gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Stealthy, gRebelCommandSettings.iDeepDeploymentDuration_Bonus_Survival}, + {0.f, 0.f, 0.f, 0.f}, + {gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Covert, gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Scouting, gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Stealthy, gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Survival}, + {MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_COVERT, MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SCOUTING, MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_STEALTHY, MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SURVIVAL} + }); + //RCAM_DISRUPT_ASD + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, TECHNICIAN_NT, DEMOLITIONS_NT, NIGHT_OPS_NT}, + {-1, -1, -1, NIGHTOPS_OT}, + {gRebelCommandSettings.iDisruptAsdDuration_Bonus_Covert, gRebelCommandSettings.iDisruptAsdDuration_Bonus_Technician, gRebelCommandSettings.iDisruptAsdDuration_Bonus_Demolitions, gRebelCommandSettings.iDisruptAsdDuration_Bonus_Nightops}, + {gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Covert, gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Technician, gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Technician, gRebelCommandSettings.fDisruptAsdIncomeReductionModifier_Nightops}, + {0, 0, 0, 0}, + {0, MissionHelpers::DISRUPT_ASD_STEAL_FUEL, MissionHelpers::DISRUPT_ASD_DESTROY_RESERVES, 0} + }); + //RCAM_FORGE_TRANSPORT_ORDERS + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT }, + {-1}, + {0}, + {0.f}, + {0}, + {0} + }); + //RCAM_GET_ENEMY_MOVEMENT_TARGETS + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, RADIO_OPERATOR_NT}, + {-1, -1}, + {gRebelCommandSettings.iGetEnemyMovementTargetsDuration_Bonus_Covert, gRebelCommandSettings.iGetEnemyMovementTargetsDuration_Bonus_Radio}, + {0.f, 0.f}, + {0, 0}, + {0, 0} + }); + //RCAM_IMPROVE_LOCAL_SHOPS + MissionHelpers::missionInfo.push_back({ }); // no entries necessary - no modifiers + //RCAM_REDUCE_STRATEGIC_DECISION_SPEED + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, SQUADLEADER_NT, SNITCH_NT}, + {-1, -1, -1}, + {gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Covert, gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Deputy, gRebelCommandSettings.iReduceStrategicDecisionSpeedDuration_Bonus_Snitch}, + {gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Covert, gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Deputy, gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Snitch}, + {0, 0, 0}, + {MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_COVERT, MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_DEPUTY, MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_SNITCH} + }); + //RCAM_REDUCE_UNALERTED_ENEMY_VISION + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, RADIO_OPERATOR_NT, STEALTHY_NT}, + {-1, -1, STEALTHY_OT}, + {gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration_Bonus_Covert, gRebelCommandSettings.iReduceUnalertedEnemyVisionDuration_Bonus_Radio, 0}, + {gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Covert, gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Radio, gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Stealthy}, + {0, 0, 0}, + {MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_COVERT, MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_RADIO, MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_STEALTHY} + }); + //RCAM_SABOTAGE_INFANTRY_EQUIPMENT + MissionHelpers::missionInfo.push_back({ + {AUTO_WEAPONS_NT, COVERT_NT, DEMOLITIONS_NT, GUNSLINGER_NT, RANGER_NT, SNIPER_NT }, + {AUTO_WEAPS_OT, -1, -1, -1, -1, PROF_SNIPER_OT }, + {gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Auto_Weapons, gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Covert, gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Demolitions, gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Gunslinger, gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Ranger, gRebelCommandSettings.iSabotageInfantryEquipmentDuration_Bonus_Sniper}, + {0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, + {gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Auto_Weapons, gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Covert, gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Demolitions, gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Gunslinger, gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Ranger, gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Sniper}, + {MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_AUTO_WEAPONS, MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_COVERT, MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_DEMOLITIONS, MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_GUNSLINGER, MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_RANGER, MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_SNIPER} + }); + //RCAM_SABOTAGE_MECHANICAL_UNITS + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, DEMOLITIONS_NT, HEAVY_WEAPONS_NT}, + {-1, -1, HEAVY_WEAPS_OT}, + {gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Covert, gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Demolitions, gRebelCommandSettings.iSabotageMechanicalUnitsDuration_Bonus_Heavy_Weapons}, + {0.f, 0.f, 0.f}, + {gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Covert, gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Demolitions, gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Heavy_Weapons}, + {MissionHelpers::SABOTAGE_MECHANICAL_UNITS_COVERT, MissionHelpers::SABOTAGE_MECHANICAL_UNITS_DEMOLITIONS, MissionHelpers::SABOTAGE_MECHANICAL_UNITS_HEAVY_WEAPONS} + }); + //RCAM_SEND_SUPPLIES_TO_TOWN + MissionHelpers::missionInfo.push_back({ }); // no entries necessary - no modifiers + //RCAM_SOLDIER_BOUNTIES_KINGPIN + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, SQUADLEADER_NT, SNITCH_NT, DEMOLITIONS_NT}, + {-1, -1, -1, -1}, + {gRebelCommandSettings.iSoldierBountiesKingpinDuration_Bonus_Covert, 0, 0, gRebelCommandSettings.iSoldierBountiesKingpinDuration_Bonus_Demolitions}, + {gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Covert, gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Deputy, gRebelCommandSettings.fSoldierBountiesKingpinPayout_Bonus_Snitch, 1.f}, + {0, 0, gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit_Snitch, gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit_Demolitions}, + {0, MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_OFFICER_PAYOUTS, 0, MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS} + }); + //RCAM_TRAIN_MILITIA_ANYWHERE + MissionHelpers::missionInfo.push_back( + { + {COVERT_NT, SURVIVAL_NT, TEACHING_NT}, + {-1, CAMOUFLAGED_OT, TEACHING_OT}, + {gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Covert, gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Survival, gRebelCommandSettings.iTrainMilitiaAnywhereDuration_Bonus_Teaching}, + {0.f, 0.f, 0.f}, + {gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers, gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers, gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers_Teaching}, + {0, 0, MissionHelpers::TRAIN_MILITIA_ANYWHERE_TEACHING} + }); + + // cache item IDs + ItemIdCache::Clear(); + // (Item[i].usItemClass & IC_AMMO) && (Magazine[ Item[i].ubClassIndex ].ubMagType == AMMO_BOX or AMMO_CRATE?) + for (UINT16 i = 0; i < MAXITEMS; ++i) + { + if (Item[i].gascan) ItemIdCache::gasCans.push_back(i); + else if (Item[i].firstaidkit) ItemIdCache::firstAidKits.push_back(i); + else if (Item[i].medicalkit) ItemIdCache::medKits.push_back(i); + else if (Item[i].toolkit) ItemIdCache::toolKits.push_back(i); + else if (Item[i].usItemClass & IC_AMMO) + { + if (Magazine[Item[i].ubClassIndex].ubMagType == AMMO_BOX) + { + if ((gGameOptions.fGunNut || !Item[i].biggunlist) + && (gGameOptions.ubGameStyle == STYLE_SCIFI || !Item[i].scifi)) + { + // coolness runs from 1-10, so apply offset + ItemIdCache::ammo[Item[i].ubCoolness-1].push_back(i); + } + } + } + + } } void UpgradeMilitiaStats() @@ -2692,23 +4460,649 @@ void UpgradeMilitiaStats() }); } +void ApplySoldierBounty(const SOLDIERTYPE* pSoldier) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + if (pSoldier->bTeam != ENEMY_TEAM) + return; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_SOLDIER_BOUNTIES_KINGPIN); + + if (iter == missionMap.end()) + return; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (!evt.isSecondEvent) + return; + + UINT16 payout = 0; + + if (TANK(pSoldier) && evt.extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Tank; + else if (COMBAT_JEEP(pSoldier) && evt.extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Jeep; + else if (ENEMYROBOT(pSoldier) && evt.extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_VEHICLE_PAYOUTS) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Robot; + else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ADMINISTRATOR) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Admin; + else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ARMY) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Troop; + else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Elite; + else // unknown kill, bail out! + return; + + // payout per role + if (pSoldier->usSoldierFlagMask & SOLDIER_ENEMY_OFFICER && (evt.extraBits == MissionHelpers::SOLDIER_BOUNTIES_KINGPIN_OFFICER_PAYOUTS)) + payout += gRebelCommandSettings.iSoldierBountiesKingpinPayout_Officer; + + + // apply payout limit + UINT32 durationBonus = 0; + int durationBonusSkill = 0; + INT16 intModifier = 0; + int intModifierSkill = 0; + FLOAT floatModifier = 0.f; + int floatModifierSkill = 0; + UINT16 extraBits = 0; + MissionHelpers::GetMissionInfo(RCAM_SOLDIER_BOUNTIES_KINGPIN, &gMercProfiles[evt.mercProfileId], durationBonus, floatModifier, intModifier, durationBonusSkill, floatModifierSkill, intModifierSkill, extraBits); + + const INT32 payoutLimit = max(gRebelCommandSettings.iSoldierBountiesKingpinPayout_Limit, intModifier); + // clamp payout like this in case the player maxes out payouts in config and we have to deal with a uint overflow + if (payoutLimit - payout < rebelCommandSaveInfo.cachedBountyPayout) + payout = payoutLimit - rebelCommandSaveInfo.cachedBountyPayout; + + rebelCommandSaveInfo.cachedBountyPayout += payout; +} + +void ApplyEnemyMechanicalUnitPenalties(SOLDIERTYPE* pSoldier) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_SABOTAGE_MECHANICAL_UNITS); + + if (iter == missionMap.end()) + return; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + INT8 statLoss = 0; + switch (evt.extraBits) + { + case MissionHelpers::SABOTAGE_MECHANICAL_UNITS_COVERT: statLoss = gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Covert; break; + case MissionHelpers::SABOTAGE_MECHANICAL_UNITS_DEMOLITIONS: statLoss = gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Demolitions; break; + case MissionHelpers::SABOTAGE_MECHANICAL_UNITS_HEAVY_WEAPONS: statLoss = gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss_Heavy_Weapons; break; + default: statLoss = gRebelCommandSettings.iSabotageMechanicalUnitsStatLoss; break; + } + + pSoldier->stats.bLife -= statLoss; + pSoldier->stats.bLifeMax = pSoldier->stats.bLife; + pSoldier->stats.bAgility -= statLoss; + pSoldier->stats.bDexterity -= statLoss; + pSoldier->stats.bStrength -= statLoss; + pSoldier->stats.bMarksmanship -= statLoss; + + pSoldier->stats.bLife = max(33, pSoldier->stats.bLife); + pSoldier->stats.bLifeMax = max(33, pSoldier->stats.bLifeMax); + pSoldier->stats.bAgility = max(33, pSoldier->stats.bAgility); + pSoldier->stats.bDexterity = max(33, pSoldier->stats.bDexterity); + pSoldier->stats.bStrength = max(33, pSoldier->stats.bStrength); + pSoldier->stats.bMarksmanship = max(33, pSoldier->stats.bMarksmanship); + } +} + +void ApplyMilitiaTraits(SOLDIERTYPE* pSoldier) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + // rftr todo: check bitmask for specific possible traits +} + +void ApplyVisionModifier(const SOLDIERTYPE* pSoldier, INT32& sight) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_REDUCE_UNALERTED_ENEMY_VISION); + + if (iter == missionMap.end()) + return; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + FLOAT modifier = 0.f; + switch (evt.extraBits) + { + case MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_COVERT: modifier = gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Covert; break; + case MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_RADIO: modifier = gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Radio; break; + case MissionHelpers::REDUCE_UNALERTED_ENEMY_VISION_MODIFIER_STEALTHY: modifier = gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier_Stealthy; break; + default: modifier = gRebelCommandSettings.fReduceUnlaertedEnemyVisionModifier; break; + } + + if (pSoldier->bTeam == ENEMY_TEAM && pSoldier->aiData.bAlertStatus == STATUS_GREEN) + { + sight = static_cast(sight * (1.f - modifier)); + } + } +} + +BOOLEAN CanAssignTraitsToMilitia() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return FALSE; + + // rftr todo: check bitmask + + return TRUE; +} + +BOOLEAN CanTrainMilitiaAnywhere() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return FALSE; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_TRAIN_MILITIA_ANYWHERE); + + if (iter == missionMap.end()) + return FALSE; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + return evt.isSecondEvent; +} + +UINT8 GetMaxTrainersForTrainMilitiaAnywhere() +{ + const std::unordered_map::iterator iter = missionMap.find(RCAM_TRAIN_MILITIA_ANYWHERE); + + if (iter == missionMap.end()) + return FALSE; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (!evt.isSecondEvent) + return 0; + + switch (evt.extraBits) + { + case MissionHelpers::TRAIN_MILITIA_ANYWHERE_TEACHING: return gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers_Teaching; + default: return gRebelCommandSettings.iTrainMilitiaAnywhereMaxTrainers; + } +} + +INT16 GetAdditionalDeployRange(const UINT8 insertionCode) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return 0; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_DEEP_DEPLOYMENT); + + if (iter == missionMap.end()) + return 0; + + INT16 range = 0; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + // we only get a range bonus if the mission is active! + if (evt.isSecondEvent) + { + switch (insertionCode) + { + case INSERTION_CODE_NORTH: + case INSERTION_CODE_SOUTH: + { + range = gRebelCommandSettings.iDeepDeploymentRangeNS; + + switch (evt.extraBits) + { + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_COVERT: range += gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Covert; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SCOUTING: range += gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Scouting; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_STEALTHY: range += gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Stealthy; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SURVIVAL: range += gRebelCommandSettings.iDeepDeploymentRangeNS_Bonus_Survival; break; + + default: break; + } + + return range; + } + + case INSERTION_CODE_WEST: + case INSERTION_CODE_EAST: + { + range = gRebelCommandSettings.iDeepDeploymentRangeEW; + + switch (evt.extraBits) + { + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_COVERT: range += gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Covert; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SCOUTING: range += gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Scouting; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_STEALTHY: range += gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Stealthy; break; + case MissionHelpers::DEEP_DEPLOYMENT_RANGE_BONUS_SURVIVAL: range += gRebelCommandSettings.iDeepDeploymentRangeEW_Bonus_Survival; break; + + default: break; + } + + return range; + } + } + } + + return 0; +} + +BOOLEAN GetASDCanDeployUnits() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return TRUE; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_DISRUPT_ASD); + + if (iter == missionMap.end()) + return TRUE; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + return evt.isSecondEvent ? FALSE : TRUE; +} + +FLOAT GetASDIncomeModifier() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return 1.f; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_DISRUPT_ASD); + + if (iter == missionMap.end()) + return 1.f; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + const MERCPROFILESTRUCT* merc = &gMercProfiles[evt.mercProfileId]; + UINT32 durationBonus; + FLOAT floatModifier; + INT16 intModifier; + int durSkill; + int floatSkill; + int intSkill; + UINT16 extraBits; + MissionHelpers::GetMissionInfo(RCAM_DISRUPT_ASD, merc, durationBonus, floatModifier, intModifier, durSkill, floatSkill, intSkill, extraBits); + + return 1.f - floatModifier; + } + + return 1.f; +} + +void ApplyAdditionalASDEffects() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_DISRUPT_ASD); + + if (iter == missionMap.end()) + return; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + switch (evt.extraBits) + { + case MissionHelpers::DISRUPT_ASD_STEAL_FUEL: + { + // spawn a gas can + CreateItemAtAirport(ItemIdCache::gasCans.at(ItemIdCache::gasCans.size()), 75 + Random(26)); + + // say it came from the ASD's reserves + AddStrategicAIResources(ASD_FUEL, -(gGameExternalOptions.gASDResource_Fuel_Jeep + Random(gGameExternalOptions.gASDResource_Fuel_Jeep))); + } + break; + + case MissionHelpers::DISRUPT_ASD_DESTROY_RESERVES: + { + // priority: tank > jeep > robots + if (GetStrategicAIResourceCount(ASD_TANK) > 0) + AddStrategicAIResources(ASD_TANK, -(1 + Random(2))); + else if (GetStrategicAIResourceCount(ASD_JEEP) > 0) + AddStrategicAIResources(ASD_JEEP, -(1 + Random(2))); + else if (GetStrategicAIResourceCount(ASD_ROBOT) > 0) + AddStrategicAIResources(ASD_ROBOT, -(2 + Random(3))); + + // let's also try to destroy a good amount of fuel + AddStrategicAIResources(ASD_FUEL, -(gGameExternalOptions.gASDResource_Fuel_Tank + Random(gGameExternalOptions.gASDResource_Fuel_Tank))); + } + break; + } + } +} + +INT8 GetEnemyEquipmentCoolnessModifier() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return 0; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_SABOTAGE_INFANTRY_EQUIPMENT); + + if (iter == missionMap.end()) + return 0; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + return evt.isSecondEvent ? -1 : 0; +} + +INT8 GetEnemyEquipmentStatusModifier(const INT8 initialStatus) +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return initialStatus; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_SABOTAGE_INFANTRY_EQUIPMENT); + + if (iter == missionMap.end()) + return initialStatus; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + INT8 modifier = 0; + switch (evt.extraBits) + { + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_AUTO_WEAPONS: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Auto_Weapons; break; + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_COVERT: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Covert; break; + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_DEMOLITIONS: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Demolitions; break; + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_GUNSLINGER: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Gunslinger; break; + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_RANGER: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Ranger; break; + case MissionHelpers::SABOTAGE_ENEMY_INFANTRY_EQUIPMENT_MODIFIER_SNIPER: modifier = gRebelCommandSettings.iSabotageInfantryEquipmentModifier_Sniper; break; + } + + return max(1, min(initialStatus - modifier, 100)); + } + + return initialStatus; +} + +UINT8 GetMerchantCoolnessBonus() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return 0; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_IMPROVE_LOCAL_SHOPS); + + if (iter == missionMap.end()) + return 0; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + return evt.isSecondEvent ? 1 : 0; +} + +FLOAT GetStrategicDecisionSpeedModifier() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return 1.f; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_REDUCE_STRATEGIC_DECISION_SPEED); + + if (iter == missionMap.end()) + return 1.f; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + FLOAT modifier = 1.f; + + if (evt.isSecondEvent) + { + switch (evt.extraBits) + { + case MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_COVERT: modifier = gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Covert; break; + case MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_DEPUTY: modifier = gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Deputy; break; + case MissionHelpers::REDUCE_STRATEGIC_DECISION_SPEED_MODIFIER_SNITCH: modifier = gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier_Snitch; break; + default: modifier = gRebelCommandSettings.fReduceStrategicDecisionSpeedModifier; break; + } + } + + return modifier; +} + +void HandleStrategicEvent(const UINT32 eventParam) +{ + // this handles the transition from "mission prep" (first event) to "mission active" (second event), which happens 24 hours after the player clicks on "start mission" + MissionFirstEvent evt1; + MissionSecondEvent evt2; + DeserialiseMissionFirstEvent(eventParam, evt1); + DeserialiseMissionSecondEvent(eventParam, evt2); + CHAR16 msgBoxText[200]; + CHAR16 screenMsgText[200]; + + if (evt1.isFirstEvent) + { + // mission prep is over. see if we can activate the mission + missionMap.erase(static_cast(evt1.missionId)); + + // make sure the merc's still on our team + BOOLEAN foundMerc = FALSE; + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + const SOLDIERTYPE* pSoldier = MercPtrs[i]; + + if (pSoldier->ubProfile == evt1.mercProfileId && pSoldier->bActive) + { + foundMerc = TRUE; + break; + } + } + + if (evt1.isMissionSuccess) + { + const RebelCommandAgentMissions mission = static_cast(evt1.missionId); + const MERCPROFILESTRUCT merc = gMercProfiles[evt1.mercProfileId]; + + if (!foundMerc) + goto MissionFailed_MercNoLongerOnTeam; + + // what mission did we do? apply bonuses here, and don't forget to check them later when checking to see if a mission bonus should be applied + UINT32 durationBonus = 0; + int durationBonusSkill = 0; + INT16 intModifier = 0; + int intModifierSkill = 0; + FLOAT floatModifier = 0.f; + int floatModifierSkill = 0; + UINT16 extraBits = 0; + MissionHelpers::GetMissionInfo(mission, &merc, durationBonus, floatModifier, intModifier, durationBonusSkill, floatModifierSkill, intModifierSkill, extraBits); + + BOOLEAN validMission = FALSE; + switch (mission) + { + case RCAM_DEEP_DEPLOYMENT: + case RCAM_DISRUPT_ASD: + case RCAM_FORGE_TRANSPORT_ORDERS: + case RCAM_GET_ENEMY_MOVEMENT_TARGETS: + case RCAM_IMPROVE_LOCAL_SHOPS: + case RCAM_REDUCE_STRATEGIC_DECISION_SPEED: + case RCAM_REDUCE_UNALERTED_ENEMY_VISION: + case RCAM_SABOTAGE_INFANTRY_EQUIPMENT: + case RCAM_SABOTAGE_MECHANICAL_UNITS: + case RCAM_SEND_SUPPLIES_TO_TOWN: + case RCAM_SOLDIER_BOUNTIES_KINGPIN: + case RCAM_TRAIN_MILITIA_ANYWHERE: + { + validMission = TRUE; + } + break; + + default: + { + ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, L"Unrecognised mission ID: %d", mission); + } + break; + } + + if (validMission) + { + const UINT32 activatedMissionParam = SerialiseMissionSecondEvent(evt1.sentGenericRebelAgent, evt1.mercProfileId, mission, extraBits); + if (mission == RCAM_FORGE_TRANSPORT_ORDERS) + { + // don't send a follow-up event for instant-result missions + } + else + { + AddStrategicEvent(EVENT_REBELCOMMAND, GetWorldTotalMin() + 60 * evt1.missionDurationInHours, activatedMissionParam); + missionMap.insert(std::make_pair(mission, activatedMissionParam)); + } + + if (!evt1.sentGenericRebelAgent) + { + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + if (pSoldier->ubProfile == evt1.mercProfileId) + { + if (mission == RCAM_FORGE_TRANSPORT_ORDERS) + { + ForceDeployTransportGroup(SECTOR(pSoldier->sSectorX, pSoldier->sSectorY)); + } + + // mission successful! give some experience pts + StatChange(pSoldier, LDRAMT, 20, FROM_SUCCESS); + StatChange(pSoldier, WISDOMAMT, 15, FROM_SUCCESS); + break; + } + } + } + + swprintf(msgBoxText, szRebelCommandText[RCT_MISSION_SUCCESS], szRebelCommandAgentMissionsText[evt1.missionId * 2]); + swprintf(screenMsgText, szRebelCommandText[RCT_MISSION_SUCCESS], szRebelCommandAgentMissionsText[evt1.missionId * 2]); + ScreenMsg(FONT_MCOLOR_LTGREEN, MSG_INTERFACE, screenMsgText); + } + } + else + { + if (!evt1.sentGenericRebelAgent && foundMerc) + { + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + if (pSoldier->ubProfile == evt1.mercProfileId) + { + // mission failed! we tried, give some pity exp + StatChange(pSoldier, LDRAMT, 20, FROM_FAILURE); + StatChange(pSoldier, WISDOMAMT, 15, FROM_FAILURE); + break; + } + } + } + + MissionFailed_MercNoLongerOnTeam: + swprintf(msgBoxText, szRebelCommandText[RCT_MISSION_FAILURE], szRebelCommandAgentMissionsText[evt1.missionId * 2]); + swprintf(screenMsgText, szRebelCommandText[RCT_MISSION_FAILURE], szRebelCommandAgentMissionsText[evt1.missionId * 2]); + ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, screenMsgText); + StopTimeCompression(); + } + + if (!evt1.sentGenericRebelAgent && foundMerc) + { + for (UINT8 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; ++i) + { + SOLDIERTYPE* pSoldier = MercPtrs[i]; + if (pSoldier->ubProfile == evt1.mercProfileId) + { + // merc ready for reassignment + pSoldier->bSectorZ -= REBEL_COMMAND_Z_OFFSET; + AssignmentDone(pSoldier, TRUE, FALSE); + AddCharacterToAnySquad(pSoldier); + break; + } + } + + } + } + else if (evt2.isSecondEvent) + { + // mission duration is over. deactivate the mission + missionMap.erase(static_cast(evt2.missionId)); + swprintf(msgBoxText, szRebelCommandText[RCT_MISSION_EXPIRED], szRebelCommandAgentMissionsText[evt2.missionId * 2]); + swprintf(screenMsgText, szRebelCommandText[RCT_MISSION_EXPIRED], szRebelCommandAgentMissionsText[evt2.missionId * 2]); + ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, screenMsgText); + StopTimeCompression(); + } + + DoMessageBox(MSG_BOX_BASIC_STYLE, msgBoxText, guiCurrentScreen, MSG_BOX_FLAG_OK, NULL, NULL); +} + +void SendSuppliesToTownMission() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_SEND_SUPPLIES_TO_TOWN); + + if (iter == missionMap.end()) + return; + + if (GetWorldHour() % gRebelCommandSettings.iSendSuppliesToTownInterval != 0) + return; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + if (evt.isSecondEvent) + { + IncrementTownLoyalty(evt.extraBits, gRebelCommandSettings.iSendSuppliesToTownLoyaltyGain); + } +} + +INT16 SendSuppliesToTownDurationBonus(const MERCPROFILESTRUCT* merc) +{ + return merc ? merc->bExpLevel * 8 : 0; +} + +BOOLEAN ShowEnemyMovementTargets() +{ + if (!gGameExternalOptions.fRebelCommandEnabled) + return FALSE; + + const std::unordered_map::iterator iter = missionMap.find(RCAM_GET_ENEMY_MOVEMENT_TARGETS); + + if (iter == missionMap.end()) + return FALSE; + + MissionSecondEvent evt; + DeserialiseMissionSecondEvent(iter->second, evt); + + return evt.isSecondEvent; +} + void DEBUG_DAY() { DailyUpdate(); } -void DEBUG_PRINT() -{ - CHAR16 text[500]; - swprintf(text, L"radio_loyalty[%.0f] safehouse_chance/min/bon[%d, %.0f, %.0f] ", info.adminActions[RCAA_REBEL_RADIO].fValue1, gRebelCommandSettings.iSafehouseReinforceChance, info.adminActions[RCAA_SAFEHOUSES].fValue1, info.adminActions[RCAA_SAFEHOUSES].fValue2); - swprintf(text, L"%s supply_dis[%.0f] deaddrops[%.0f] smugglers[%.0f]", text, info.adminActions[RCAA_SUPPLY_DISRUPTION].fValue1, info.adminActions[RCAA_DEAD_DROPS].fValue1, info.adminActions[RCAA_SMUGGLERS].fValue1); - swprintf(text, L"%s warehouse[%.2f/%.2f/%.2f]", text, info.adminActions[RCAA_WAREHOUSES].fValue1, info.adminActions[RCAA_WAREHOUSES].fValue2, info.adminActions[RCAA_WAREHOUSES].fValue3); - swprintf(text, L"%s tax_inc/loy[%.0f/%.0f]", text, info.adminActions[RCAA_TAXES].fValue1, info.adminActions[RCAA_TAXES].fValue2); - swprintf(text, L"%s volunteers[%.0f] support[%.0f]", text, info.adminActions[RCAA_ASSIST_CIVILIANS].fValue1, info.adminActions[RCAA_MERC_SUPPORT].fValue1); - swprintf(text, L"%s minebonus[%0.1f]", text, info.adminActions[RCAA_MINING_POLICY].fValue1); - DoMessageBox(MSG_BOX_MINIEVENT_STYLE, text, guiCurrentScreen, MSG_BOX_FLAG_OK | MSG_BOX_FLAG_BIGGER, NULL, NULL); -} - } template<> void DropDownTemplate::SetRefresh() @@ -2716,7 +5110,7 @@ template<> void DropDownTemplate::SetRefresh() using namespace RebelCommand; const INT16 newDirective = REBEL_COMMAND_DROPDOWN.GetSelectedEntryKey(); rebelCommandSaveInfo.iSelectedDirective = newDirective; - iIncomingSuppliesPerDay = static_cast(CurrentPlayerProgressPercentage() * gRebelCommandSettings.fIncomeModifier + (newDirective == RCD_GATHER_SUPPLIES ? rebelCommandSaveInfo.directives[RCD_GATHER_SUPPLIES].GetValue1() : 0)); + iIncomingSuppliesPerDay = CalcIncomingSuppliesPerDay(static_cast(newDirective)); redraw = TRUE; } diff --git a/Strategic/Rebel Command.h b/Strategic/Rebel Command.h index 8b4e24f6..22b6fd3b 100644 --- a/Strategic/Rebel Command.h +++ b/Strategic/Rebel Command.h @@ -1,14 +1,38 @@ #ifndef REBEL_COMMAND_H #define REBEL_COMMAND_H +#include "CampaignStats.h" #include "mapscreen.h" #include "Soldier Control.h" #include "Types.h" +#define REBEL_COMMAND_Z_OFFSET 9 #define REBEL_COMMAND_MAX_ACTIONS_PER_REGION 6 +#define NUM_ARC_AGENT_SLOTS 2 namespace RebelCommand { + // applies to RegionSaveInfo.actionLevels: use the MSB as the active flag since I don't expect it to be used otherwise + constexpr UINT8 ADMIN_ACTION_ACTIVE_BIT = 1 << 7; + + // the FIRST and SECOND strategic events share the same type (EVENT_REBELCOMMAND - no need to have multiple types yet, I think...) + // so the 32-bit int will have to block out information for both events + // FIRST EVENT BREAKDOWN + // A######B CCCCCCCC DDDDDDDD EEEEEEEE + // A (1 bit) - always 0 to indicate that this is the FIRST event (ie, keeping a merc busy for a set duration) + // B (1 bit) - 0 if the player sent a generic rebel agent, 1 if the player sent one of their own mercs + // C (8 bit) - the profile number of the merc that was sent. invalid if B == 0 + // D (8 bit) - the mission ID. should match up with RebelCommandAgentMissions enum + // E (8 bit) - the mission duration, in hours. if 0, mission failed. + // extra bits are mission-specific + + // SECOND EVENT BREAKDOWN + // A####### #######B CCCCCCCC DDDDDDDD + // A (1 bit) - always 1 to indicate that this is the SECOND event (ie, this event fires when the mission bonus expires) + // B (1 bit) - 0 if the player sent a generic rebel agent, 1 if the player sent one of their own mercs + // C (8 bit) - the profile number of the merc that was sent. invalid if B == 0 + // D (8 bit) - the mission ID. should match up with RebelCommandAgentMissions enum + // extra bits are mission-specific enum RebelCommandDirectives { @@ -49,6 +73,35 @@ enum RebelCommandAdminActions RCAA_NUM_ACTIONS }; +enum RebelCommandAgentMissions +{ + RCAM_NONE = -1, + RCAM_DEEP_DEPLOYMENT = 0, + RCAM_DISRUPT_ASD, // only available if ASD enabled + RCAM_FORGE_TRANSPORT_ORDERS, + RCAM_GET_ENEMY_MOVEMENT_TARGETS, // aka Strategic Intel + RCAM_IMPROVE_LOCAL_SHOPS, + RCAM_REDUCE_STRATEGIC_DECISION_SPEED, // aka Slower Strategic Decisions + RCAM_REDUCE_UNALERTED_ENEMY_VISION, // aka Lower Readiness + RCAM_SABOTAGE_INFANTRY_EQUIPMENT, // aka Sabotage Equipment + RCAM_SABOTAGE_MECHANICAL_UNITS, // aka Sabotage Vehicles + RCAM_SEND_SUPPLIES_TO_TOWN, // ignores minimum loyalty requirement + RCAM_SOLDIER_BOUNTIES_KINGPIN, + RCAM_TRAIN_MILITIA_ANYWHERE, + + RCAM_NUM_MISSIONS, + + // ideas/unimplemented + RCAM_BOOST_TOWN_ADMIN_ACTIONS, // store agent location townid in extrabits + RCAM_PROCURE_ITEMS, + RCAM_MILITIA_SKILL_TRAITS, // should override militia skill traits ini option - split into multiple (weapon spec, bodybuilding, athletic, night ops) + RCAM_PURCHASE_SUPPLIES, // increase daily supply income, decrease daily $ income + RCAM_REDUCE_ENEMY_POOL, // need to make sure enemy pool is not infinite // giReinforcementPool, also gfUnlimitedTroops = zDiffSetting[gGameOptions.ubDifficultyLevel].bUnlimitedPoolOfTroops; + // militia/mercs get bonus vision (???) + // share vision with civilians? + +}; + enum RegionAdminStatus { RAS_NONE, @@ -97,8 +150,13 @@ typedef struct RegionSaveInfo UINT8 actionLevels[REBEL_COMMAND_MAX_ACTIONS_PER_REGION]; UINT8 ubMaxLoyalty; + BOOLEAN IsActive(UINT8 index) { return (actionLevels[index] & ADMIN_ACTION_ACTIVE_BIT) == 0; } + // rftr: I know these fly in the face of convention, but I'm lazy and this preserves savegame compatibility without needing to add any additional code + void SetActive(UINT8 index) { actionLevels[index] &= ~ADMIN_ACTION_ACTIVE_BIT; } // active bit value = 0 + void SetInactive(UINT8 index) { actionLevels[index] |= ADMIN_ACTION_ACTIVE_BIT; } // inactive bit value = 1 INT32 GetAdminDeployCost(INT16 numAdminTeams) { return 10 * numAdminTeams * numAdminTeams; }; INT32 GetAdminReactivateCost(INT16 numAdminTeams) { return GetAdminDeployCost(numAdminTeams) / 4; }; + UINT8 GetLevel(INT16 index) { return actionLevels[index] & ~ADMIN_ACTION_ACTIVE_BIT; } } RegionSaveInfo; typedef struct SaveInfo @@ -110,9 +168,11 @@ typedef struct SaveInfo INT32 iActiveDirective; INT32 iSelectedDirective; INT8 iMilitiaStatsLevel; - UINT8 uSupplyDropCount; + UINT8 uSupplyDropCount; // keeping this around for compatibility with old saves + INT8 availableMissions[NUM_ARC_AGENT_SLOTS]; + UINT16 cachedBountyPayout; - INT8 filler[19]; + INT8 filler[15]; } SaveInfo; extern SaveInfo rebelCommandSaveInfo; @@ -122,6 +182,7 @@ void ExitWebsite(); void RenderWebsite(); void HandleWebsite(); +// admin actions void ApplyEnemyPenalties(SOLDIERTYPE* pSoldier); void ApplyMilitiaBonuses(SOLDIERTYPE* pMilitia); UINT8 GetApproximateEnemyLocationResolutionIndex(); @@ -139,17 +200,33 @@ FLOAT GetPathfindersSpeedBonus(UINT8 sector); BOOLEAN NeutraliseRole(const SOLDIERTYPE* pSoldier); void RaidMines(INT32 &playerIncome, INT32 &enemyIncome); BOOLEAN ShowApproximateEnemyLocations(); -void ShowWebsiteAvailableMessage(); + +// agent missions +void ApplySoldierBounty(const SOLDIERTYPE* pSoldier); +void ApplyEnemyMechanicalUnitPenalties(SOLDIERTYPE* pSoldier); +void ApplyMilitiaTraits(SOLDIERTYPE* pSoldier); +void ApplyVisionModifier(const SOLDIERTYPE* pSoldier, INT32& sight); +BOOLEAN CanAssignTraitsToMilitia(); +BOOLEAN CanTrainMilitiaAnywhere(); +UINT8 GetMaxTrainersForTrainMilitiaAnywhere(); +INT16 GetAdditionalDeployRange(const UINT8 insertionCode); +BOOLEAN GetASDCanDeployUnits(); +FLOAT GetASDIncomeModifier(); +INT8 GetEnemyEquipmentCoolnessModifier(); +INT8 GetEnemyEquipmentStatusModifier(const INT8 initialStatus); +UINT8 GetMerchantCoolnessBonus(); +FLOAT GetStrategicDecisionSpeedModifier(); +void HandleStrategicEvent(const UINT32 eventParam); +BOOLEAN ShowEnemyMovementTargets(); void DailyUpdate(); void HourlyUpdate(); void Init(); +void ShowWebsiteAvailableMessage(); BOOLEAN Load(HWFILE file); BOOLEAN Save(HWFILE file); } -//BOOLEAN LoadRebelCommand( HWFILE file ) { return RebelCommand::Load( file ); } - #endif diff --git a/Strategic/Reinforcement.cpp b/Strategic/Reinforcement.cpp index 3840769f..2adaa4f9 100644 --- a/Strategic/Reinforcement.cpp +++ b/Strategic/Reinforcement.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Town Militia.h" #include "Militia Control.h" #include "Campaign Types.h" @@ -22,7 +19,6 @@ #include "GameSettings.h" #include "Soldier Init List.h" #include "Inventory Choosing.h" -#endif #include "GameInitOptionsScreen.h" @@ -250,13 +246,13 @@ BOOLEAN ARMoveBestMilitiaManFromAdjacentSector(INT16 sMapX, INT16 sMapY) return TRUE; } -GROUP* GetNonPlayerGroupInSector( INT16 sMapX, INT16 sMapY, UINT8 usTeam ) +GROUP* GetNonPlayerGroupInSectorForReinforcement( INT16 sMapX, INT16 sMapY, UINT8 usTeam ) { GROUP *curr; curr = gpGroupList; while( curr ) { - if ( curr->ubSectorX == sMapX && curr->ubSectorY == sMapY && curr->usGroupTeam == usTeam && curr->ubGroupID ) + if ( curr->ubSectorX == sMapX && curr->ubSectorY == sMapY && curr->usGroupTeam == usTeam && curr->ubGroupID && (curr->usGroupTeam != ENEMY_TEAM || curr->pEnemyGroup->ubIntention != TRANSPORT) ) return curr; curr = curr->next; } @@ -284,7 +280,7 @@ UINT8 DoReinforcementAsPendingNonPlayer( INT16 sMapX, INT16 sMapY, UINT8 usTeam for( ubIndex = 0; ubIndex < ubDirNumber; ++ubIndex ) { - while ( (pGroup = GetNonPlayerGroupInSector( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), usTeam )) != NULL ) + while ( (pGroup = GetNonPlayerGroupInSectorForReinforcement( SECTORX( pusMoveDir[ubIndex][0] ), SECTORY( pusMoveDir[ubIndex][0] ), usTeam )) != NULL ) { pGroup->ubPrevX = pGroup->ubSectorX; pGroup->ubPrevY = pGroup->ubSectorY; diff --git a/Strategic/Reinforcement.h b/Strategic/Reinforcement.h index 543ff041..e6017b51 100644 --- a/Strategic/Reinforcement.h +++ b/Strategic/Reinforcement.h @@ -12,6 +12,6 @@ UINT8 NumEnemiesInFiveSectors( INT16 sMapX, INT16 sMapY ); //For Tactical UINT8 DoReinforcementAsPendingNonPlayer( INT16 sMapX, INT16 sMapY, UINT8 usTeam ); void AddPossiblePendingMilitiaToBattle(); -GROUP* GetNonPlayerGroupInSector( INT16 sMapX, INT16 sMapY, UINT8 usTeam ); +GROUP* GetNonPlayerGroupInSectorForReinforcement( INT16 sMapX, INT16 sMapY, UINT8 usTeam ); #endif \ No newline at end of file diff --git a/Strategic/Scheduling.cpp b/Strategic/Scheduling.cpp index a3f36349..517ef586 100644 --- a/Strategic/Scheduling.cpp +++ b/Strategic/Scheduling.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include #include "Fileman.h" #include "types.h" @@ -28,7 +25,6 @@ #include "Soldier Profile.h" #include "soldier profile type.h" #include "Quests.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Strategic/Strategic AI.cpp b/Strategic/Strategic AI.cpp index 96e0ab4e..c64d85ed 100644 --- a/Strategic/Strategic AI.cpp +++ b/Strategic/Strategic AI.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "builddefines.h" #include #include "types.h" @@ -36,7 +32,10 @@ #include "Map Information.h" #include "interface dialogue.h" #include "ASD.h" // added by Flugente -#endif + #include "Rebel Command.h" + #include "Game Event Hook.h" + #include "Strategic Town Loyalty.h" + #include "Strategic Transport Groups.h" #include "GameInitOptionsScreen.h" @@ -492,7 +491,6 @@ extern INT16 sWorldSectorLocationOfFirstBattle; void ReassignAIGroup( GROUP **pGroup ); void TransferGroupToPool( GROUP **pGroup ); -void SendGroupToPool( GROUP **pGroup ); //Simply orders all garrisons to take troops from the patrol groups and send the closest troops from them. Any garrison, //whom there request isn't fulfilled (due to lack of troops), will recieve their reinforcements from the queen (P3). @@ -1198,6 +1196,8 @@ void InitStrategicAI() dEnemyGeneralsSpeedupFactor = max( 0.5f, dEnemyGeneralsSpeedupFactor - gStrategicStatus.usVIPsLeft * gGameExternalOptions.fEnemyGeneralStrategicDecisionSpeedBonus ); } + dEnemyGeneralsSpeedupFactor *= RebelCommand::GetStrategicDecisionSpeedModifier(); + giReinforcementPool = zDiffSetting[gGameOptions.ubDifficultyLevel].iQueensInitialPoolOfTroops; giForcePercentage = zDiffSetting[gGameOptions.ubDifficultyLevel].iInitialGarrisonPercentages; giArmyAlertness = zDiffSetting[gGameOptions.ubDifficultyLevel].iEnemyStartingAlertLevel; @@ -2420,6 +2420,11 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5"); } } } + else if (pGroup->pEnemyGroup->ubIntention == TRANSPORT) + { + ProcessTransportGroupReachedDestination(pGroup); + return TRUE; + } else { //This is a floating group at his final destination... if( pGroup->pEnemyGroup->ubIntention != STAGING && pGroup->pEnemyGroup->ubIntention != REINFORCEMENTS ) @@ -3456,9 +3461,11 @@ void EvaluateQueenSituation() { dEnemyGeneralsSpeedupFactor = max( 0.5f, dEnemyGeneralsSpeedupFactor - gStrategicStatus.usVIPsLeft * gGameExternalOptions.fEnemyGeneralStrategicDecisionSpeedBonus ); } + + dEnemyGeneralsSpeedupFactor *= RebelCommand::GetStrategicDecisionSpeedModifier(); uiOffset += dEnemyGeneralsSpeedupFactor * (zDiffSetting[gGameOptions.ubDifficultyLevel].iBaseDelayInMinutesBetweenEvaluations + Random( zDiffSetting[gGameOptions.ubDifficultyLevel].iEvaluationDelayVariance )); - + // Check/update reinforcements pool if old behavior is enabled if ( !gfUnlimitedTroops && zDiffSetting[gGameOptions.ubDifficultyLevel].iQueenPoolIncrementDaysPerDifficultyLevel == 0 ) { @@ -3488,88 +3495,88 @@ void EvaluateQueenSituation() // Gradually promote any remaining admins into troops UpgradeAdminsToTroops(); - if( ( giRequestPoints <= 0 ) || ( ( giReinforcementPoints <= 0 ) && ( giReinforcementPool <= 0 ) ) ) - { //we either have no reinforcements or request for reinforcements. - return; - } + // consider deploying a transport group + ExecuteStrategicAIAction( NPC_ACTION_DEPLOY_TRANSPORT_GROUP, 0, 0 ); - // anv: only consider garrisons and patrols that can be reinforced - // otherwise unreinforcable groups will stall the rest, effectively breaking entire system - - Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */ - - for( i = 0; i < giGarrisonArraySize; i++ ) + // we either have reinforcements or a request for reinforcements + if (giRequestPoints > 0 && (giReinforcementPoints > 0 || giReinforcementPool > 0)) { - RecalculateGarrisonWeight( i ); - iWeight = gGarrisonGroup[ i ].bWeight; - if( iWeight > 0 ) + // anv: only consider garrisons and patrols that can be reinforced + // otherwise unreinforcable groups will stall the rest, effectively breaking entire system + + Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */ + + for( i = 0; i < giGarrisonArraySize; i++ ) { - if( !gGarrisonGroup[ i ].ubPendingGroupID && - EnemyPermittedToAttackSector( NULL, gGarrisonGroup[ i ].ubSectorID ) && - GarrisonRequestingMinimumReinforcements( i ) ) + RecalculateGarrisonWeight( i ); + iWeight = gGarrisonGroup[ i ].bWeight; + if( iWeight > 0 ) { - if( ReinforcementsApproved( i, &usDefencePoints ) ) + if( !gGarrisonGroup[ i ].ubPendingGroupID && + EnemyPermittedToAttackSector( NULL, gGarrisonGroup[ i ].ubSectorID ) && + GarrisonRequestingMinimumReinforcements( i ) ) { - iApplicableGarrisonIds[iApplicableGarrisons] = i; - iApplicableGarrisons++; - iApplicableRequestPoints += gGarrisonGroup[ i ].bWeight; + if( ReinforcementsApproved( i, &usDefencePoints ) ) + { + iApplicableGarrisonIds[iApplicableGarrisons] = i; + iApplicableGarrisons++; + iApplicableRequestPoints += gGarrisonGroup[ i ].bWeight; + } } } } - } - for( i = 0; i < giPatrolArraySize; i++ ) - { - RecalculatePatrolWeight( i ); - iWeight = gPatrolGroup[ i ].bWeight; - if( iWeight > 0 ) + for( i = 0; i < giPatrolArraySize; i++ ) { - if( !gPatrolGroup[ i ].ubPendingGroupID && PatrolRequestingMinimumReinforcements( i ) ) + RecalculatePatrolWeight( i ); + iWeight = gPatrolGroup[ i ].bWeight; + if( iWeight > 0 ) { - iApplicablePatrolIds[iApplicablePatrols] = i; - iApplicablePatrols++; - iApplicableRequestPoints += gPatrolGroup[ i ].bWeight; + if( !gPatrolGroup[ i ].ubPendingGroupID && PatrolRequestingMinimumReinforcements( i ) ) + { + iApplicablePatrolIds[iApplicablePatrols] = i; + iApplicablePatrols++; + iApplicableRequestPoints += gPatrolGroup[ i ].bWeight; + } } } - } - if( !iApplicableRequestPoints ) - { - return; - } - - //now randomly choose who gets the reinforcements. - // giRequestPoints is the combined sum of all the individual weights of all garrisons and patrols requesting reinforcements - //iRandom = Random( giRequestPoints ); - iRandom = Random( iApplicableRequestPoints ); - - iOrigRequestPoints = giRequestPoints; // debug only! - - //go through garrisons first - for( i = 0; i < iApplicableGarrisons; i++ ) - { - iSumOfAllWeights += iWeight; // debug only! - iWeight = gGarrisonGroup[ iApplicableGarrisonIds[i] ].bWeight; - if( iRandom < iWeight ) + if( iApplicableRequestPoints ) { - //This is the group that gets the reinforcements! - if ( SendReinforcementsForGarrison( iApplicableGarrisonIds[i] , usDefencePoints, NULL ) ) - return; - } - iRandom -= iWeight; - } + //now randomly choose who gets the reinforcements. + // giRequestPoints is the combined sum of all the individual weights of all garrisons and patrols requesting reinforcements + //iRandom = Random( giRequestPoints ); + iRandom = Random( iApplicableRequestPoints ); - //go through the patrol groups - for( i = 0; i < iApplicablePatrols; i++ ) - { - iSumOfAllWeights += iWeight; // debug only! - iWeight = gPatrolGroup[ iApplicablePatrolIds[i] ].bWeight; - if( iRandom < iWeight ) - { - //This is the group that gets the reinforcements! - if ( SendReinforcementsForPatrol( iApplicablePatrolIds[i], NULL ) ) - return; + iOrigRequestPoints = giRequestPoints; // debug only! + + //go through garrisons first + for( i = 0; i < iApplicableGarrisons; i++ ) + { + iSumOfAllWeights += iWeight; // debug only! + iWeight = gGarrisonGroup[ iApplicableGarrisonIds[i] ].bWeight; + if( iRandom < iWeight ) + { + //This is the group that gets the reinforcements! + if ( SendReinforcementsForGarrison( iApplicableGarrisonIds[i] , usDefencePoints, NULL ) ) + return; + } + iRandom -= iWeight; + } + + //go through the patrol groups + for( i = 0; i < iApplicablePatrols; i++ ) + { + iSumOfAllWeights += iWeight; // debug only! + iWeight = gPatrolGroup[ iApplicablePatrolIds[i] ].bWeight; + if( iRandom < iWeight ) + { + //This is the group that gets the reinforcements! + if ( SendReinforcementsForPatrol( iApplicablePatrolIds[i], NULL ) ) + return; + } + iRandom -= iWeight; + } } - iRandom -= iWeight; } ValidateWeights( 27 ); @@ -5125,7 +5132,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto if ( ubNumSoldiers ) { InitializeGroup(GROUP_TYPE_ATTACK, ubNumSoldiers, grouptroops[0], groupelites[0], grouprobots[0], groupjeeps[0], grouptanks[0], Random(10) < difficultyMod); - totalusedsoldiers += grouptroops[0] + groupelites[0] + grouprobots[0], grouptanks[0] + groupjeeps[0]; + totalusedsoldiers += grouptroops[0] + groupelites[0] + grouprobots[0] + grouptanks[0] + groupjeeps[0]; } pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ), 0, grouptroops[0], groupelites[0], grouprobots[0], grouptanks[0], groupjeeps[0] ); @@ -5386,6 +5393,14 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto gubNumAwareBattles = zDiffSetting[gGameOptions.ubDifficultyLevel].iNumAwareBattles; break; + case NPC_ACTION_DEPLOY_TRANSPORT_GROUP: + DeployTransportGroup(); + break; + + case NPC_ACTION_RETURN_TRANSPORT_GROUP: + ReturnTransportGroup(option1); + break; + default: ScreenMsg( FONT_RED, MSG_DEBUG, L"QueenAI failed to handle action code %d.", usActionCode ); break; @@ -6403,8 +6418,14 @@ void UpgradeAdminsToTroops() // if there are any admins currently in this group if ( pGroup->pEnemyGroup->ubNumAdmins > 0 ) { + // skip transport groups + if (pGroup->pEnemyGroup->ubIntention == TRANSPORT) + { + pGroup = pGroup->next; + continue; + } // if it's a patrol group - if ( pGroup->pEnemyGroup->ubIntention == PATROL ) + else if ( pGroup->pEnemyGroup->ubIntention == PATROL ) { sPatrolIndex = FindPatrolGroupIndexForGroupID( pGroup->ubGroupID ); Assert( sPatrolIndex != -1 ); @@ -6508,9 +6529,17 @@ INT16 FindGarrisonIndexForGroupIDPending( UINT8 ubGroupID ) void TransferGroupToPool( GROUP **pGroup ) { - //Madd: unlimited reinforcements? - if ( !gfUnlimitedTroops ) - giReinforcementPool += (*pGroup)->ubGroupSize; + if ((*pGroup)->usGroupTeam == ENEMY_TEAM) + { + //Madd: unlimited reinforcements? + if ( !gfUnlimitedTroops ) + giReinforcementPool += (*pGroup)->ubGroupSize; + + AddStrategicAIResources(ASD_ROBOT, (*pGroup)->pEnemyGroup->ubNumRobots); + AddStrategicAIResources(ASD_JEEP, (*pGroup)->pEnemyGroup->ubNumJeeps); + AddStrategicAIResources(ASD_TANK, (*pGroup)->pEnemyGroup->ubNumTanks); + } + RemovePGroup( *pGroup ); *pGroup = NULL; diff --git a/Strategic/Strategic AI.h b/Strategic/Strategic AI.h index 77d9c3a6..5c7986af 100644 --- a/Strategic/Strategic AI.h +++ b/Strategic/Strategic AI.h @@ -38,6 +38,7 @@ BOOLEAN StrategicAILookForAdjacentGroups( GROUP *pGroup ); void RemoveGroupFromStrategicAILists( UINT8 ubGroupID ); void RecalculateSectorWeight( UINT8 ubSectorID ); void RecalculateGroupWeight( GROUP *pGroup ); +void SendGroupToPool( GROUP **pGroup ); BOOLEAN OkayForEnemyToMoveThroughSector( UINT8 ubSectorID ); BOOLEAN EnemyPermittedToAttackSector( GROUP **pGroup, UINT8 ubSectorID ); @@ -78,7 +79,8 @@ BOOLEAN PermittedToFillPatrolGroup( INT32 iPatrolID ); enum GROUP_TYPE { GROUP_TYPE_ATTACK, - GROUP_TYPE_PATROL + GROUP_TYPE_PATROL, + GROUP_TYPE_TRANSPORT }; void ASDInitializePatrolGroup(GROUP *pGroup); diff --git a/Strategic/Strategic All.h b/Strategic/Strategic All.h deleted file mode 100644 index f0234cc7..00000000 --- a/Strategic/Strategic All.h +++ /dev/null @@ -1,232 +0,0 @@ -#ifndef __STRATEGIC_ALL_H -#define __STRATEGIC_ALL_H - -#pragma message("GENERATED PCH FOR STRATEGIC PROJECT.") - -#include "builddefines.h" -#include -#include "types.h" -#include "english.h" -#include "Timer Control.h" -#include "vsurface.h" -#include "Button System.h" -#include "Font Control.h" -#include "Simple Render Utils.h" -#include "Editor Taskbar Utils.h" -#include "line.h" -#include "input.h" -#include "vobject_blitters.h" -#include "Text Input.h" -#include "mousesystem.h" -#include "strategicmap.h" -#include "Fileman.h" -#include "Map Information.h" -#include "render dirty.h" -#include "Game Clock.h" -#include "Campaign Types.h" -#include "Campaign Init.h" -#include "cheats.h" -#include "Queen Command.h" -#include "overhead.h" -#include "Strategic Movement.h" -#include "GameSettings.h" -#include "Game Event Hook.h" -#include "Creature Spreading.h" -#include "message.h" -#include "Game Init.h" -#include "Assignments.h" -#include "Soldier Control.h" -#include "Item Types.h" -#include "Strategic.h" -#include "Items.h" -#include -#include "Map Screen Interface.h" -#include "Soldier Profile Type.h" -#include "Soldier Profile.h" -#include "Campaign.h" -#include "Text.h" -#include "dialogue control.h" -#include "NPC.h" -#include "Strategic Town Loyalty.h" -#include "animation control.h" -#include "mapscreen.h" -#include "Squads.h" -#include "Map Screen Helicopter.h" -#include "PopUpBox.h" -#include "Vehicles.h" -#include "Strategic Merc Handler.h" -#include "Merc Contract.h" -#include "Map Screen Interface Map.h" -#include "laptop.h" -#include "Finances.h" -#include "LaptopSave.h" -#include "renderworld.h" -#include "Interface Control.h" -#include "Interface.h" -#include "Soldier Find.h" -#include "ai.h" -#include "utilities.h" -#include "random.h" -#include "Soldier Add.h" -#include "Isometric Utils.h" -#include "Soldier Macros.h" -#include "Explosion Control.h" -#include "SkillCheck.h" -#include "Quests.h" -#include "Town Militia.h" -#include "Map Screen Interface Border.h" -#include "math.h" -#include "Strategic Pathing.h" -#include "Auto Resolve.h" -#include "Music Control.h" -#include "PreBattle Interface.h" -#include "Player Command.h" -#include "gameloop.h" -#include "screenids.h" -#include "vObject.h" -#include "video.h" -#include "gamescreen.h" -#include "sysutil.h" -#include "Soldier Create.h" -#include "Weapons.h" -#include "Sound Control.h" -#include "Tactical Save.h" -#include "Strategic Status.h" -#include "WordWrap.h" -#include "Animation Data.h" -#include "Strategic AI.h" -#include "rt time defines.h" -#include "morale.h" -#include "himage.h" -#include "Soldier Init List.h" -#include "lighting.h" -#include "Strategic Mines.h" -#include "jascreens.h" -#include "Map Edgepoints.h" -#include "opplist.h" -#include "sgp.h" -#include "environment.h" -#include "Game Events.h" -#include "MercTextBox.h" -#include "Event Pump.h" -#include "soundman.h" -#include "Ambient Control.h" -#include "AimMembers.h" -#include "Strategic Event Handler.h" -#include "BobbyR.h" -#include "mercs.h" -#include "email.h" -#include "Merc Hiring.h" -#include "Insurance Contract.h" -#include "Scheduling.h" -#include "BobbyRGuns.h" -#include "Arms Dealer Init.h" -#include "Strategic town reputation.h" -#include "air raid.h" -#include "meanwhile.h" -#include "MemMan.h" -#include "Debug.h" -#include "worlddef.h" -#include "fade screen.h" -#include "history.h" -#include "merc entering.h" -#include -#include "worldman.h" -#include "tiledat.h" -#include "WCheck.h" -#include "Map Screen Interface Map Inventory.h" -#include "Map Screen Interface Bottom.h" -#include "Radar Screen.h" -#include "cursors.h" -#include "Options Screen.h" -#include "Cursor Control.h" -#include "Interface Items.h" -#include "Interface Utils.h" -#include "World Items.h" -#include "Multi Language Graphic Utils.h" -#include "Font.h" -#include "Militia Control.h" -#include "Map Screen Interface TownMine Info.h" -#include "Handle UI.h" -#include "Handle Items.h" -#include -#include -#include "screens.h" -#include -#include -#include "Interface Cursors.h" -#include "Interface Panels.h" -#include "sys globals.h" -#include "faces.h" -#include "strategic turns.h" -#include "Personnel.h" -#include "Animated ProgressBar.h" -#include "GameVersion.h" -#include "SaveLoadScreen.h" -#include "messageboxscreen.h" -#include "rotting corpses.h" -#include "Tactical Placement GUI.h" -#include "Overhead Types.h" -#include "Soldier Ani.h" -#include "Types.h" -#include "Quest Debug System.h" -#include "WCheck.h" -#include "Font Control.h" -#include "Video.h" -#include "Game Clock.h" -#include "Render Dirty.h" -#include "WordWrap.h" -#include "Interface.h" -#include "Cursors.h" -#include "Quests.h" -#include "stdio.h" -#include "QuestText.h" -#include "Soldier Profile.h" -#include "Utilities.h" -#include "Text.h" -#include "Text Input.h" -#include "Soldier Create.h" -#include "strategicmap.h" -#include "soldier add.h" -#include "Opplist.h" -#include "Handle Items.h" -#include "Game Clock.h" -#include "environment.h" -#include "dialogue control.h" -#include "Soldier Control.h" -#include "overhead.h" -#include "AimMembers.h" -#include "MessageBoxScreen.h" -#include "Stdio.h" -#include "english.h" -#include "line.h" -#include "Keys.h" -#include "Interface Dialogue.h" -#include "SysUtil.h" -#include "Message.h" -#include "Interface Dialogue.h" -#include "Render Fun.h" -#include "Boxing.h" -#include -#include "Keys.h" -#include "Structure Wrap.h" -#include "SaveLoadMap.h" -#include "aim.h" -#include -#include "Inventory Choosing.h" -#include "LOS.h" -#include "Tactical Turns.h" -#include -#include "worlddat.h" -#include "Exit Grids.h" -#include "pathai.h" -#include "Shade Table Util.h" -#include "points.h" -#include "Bullets.h" -#include "physics.h" -#include "_JA25EnglishText.h" -#include "Debug Control.h" -#include "expat.h" -#include "MiniEvents.h" -#include "Rebel Command.h" -#endif \ No newline at end of file diff --git a/Strategic/Strategic Event Handler.cpp b/Strategic/Strategic Event Handler.cpp index 266f159a..c17e9797 100644 --- a/Strategic/Strategic Event Handler.cpp +++ b/Strategic/Strategic Event Handler.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Strategic Event Handler.h" #include "MemMan.h" #include "message.h" @@ -31,7 +28,6 @@ #include "Campaign.h" // added by Flugente #include "Strategic AI.h" #include "Rebel Command.h" -#endif #include "Luaglobal.h" #include "connect.h" diff --git a/Strategic/Strategic Merc Handler.cpp b/Strategic/Strategic Merc Handler.cpp index e3541cf5..b3a21464 100644 --- a/Strategic/Strategic Merc Handler.cpp +++ b/Strategic/Strategic Merc Handler.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Types.h" #include "Strategic Merc Handler.h" @@ -47,7 +44,6 @@ // HEADROCK HAM 3.6: And another include, for militia upkeep costs. #include "Town Militia.h" #include "DynamicDialogue.h" // added by Flugente for HandleDynamicOpinionsDailyRefresh() -#endif #ifdef JA2UB #include "ub_config.h" diff --git a/Strategic/Strategic Mines.cpp b/Strategic/Strategic Mines.cpp index 1e9f0f72..501589ab 100644 --- a/Strategic/Strategic Mines.cpp +++ b/Strategic/Strategic Mines.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include #include "Strategic Mines.h" #include "Finances.h" @@ -24,7 +21,6 @@ #include "Facilities.h" #include "ASD.h" // added by Flugente #include "Rebel Command.h" -#endif #include "GameInitOptionsScreen.h" diff --git a/Strategic/Strategic Movement Costs.cpp b/Strategic/Strategic Movement Costs.cpp index ff6c280e..4f45414e 100644 --- a/Strategic/Strategic Movement Costs.cpp +++ b/Strategic/Strategic Movement Costs.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "Campaign Types.h" #include "Queen Command.h" #include "Strategic Movement.h" @@ -10,7 +6,6 @@ #include "Debug.h" #include "Debug Control.h" #include "Tactical Save.h" -#endif #include "Map Screen Interface Map.h" #ifdef JA2UB diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index 64693fc9..2c4f8c6f 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "builddefines.h" #include #include @@ -53,7 +50,7 @@ #include "Creature Spreading.h" // added by Flugente #include "MilitiaIndividual.h" // added by Flugente #include "Rebel Command.h" -#endif + #include "Strategic Transport Groups.h" #include "MilitiaSquads.h" #include "Vehicles.h" @@ -1895,47 +1892,48 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe fExceptionQueue = TRUE; } } - //First check if the group arriving is going to queue another battle. //KM : Aug 11, 1999 -- Patch fix: Added additional checks to prevent a 2nd battle in the case - //NOTE: We can't have more than one battle ongoing at a time. //where the player is involved in a potential battle with bloodcats/civilians - if( fExceptionQueue || (fCheckForBattle && (gTacticalStatus.fEnemyInSector || HostileCiviliansPresent() || HostileBloodcatsPresent()) && - FindMovementGroupInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, OUR_TEAM ) && - (pGroup->ubNextX != gWorldSectorX || pGroup->ubNextY != gWorldSectorY || gbWorldSectorZ > 0 ) && NumHostilesInSector(pGroup->ubNextX, pGroup->ubNextY, pGroup->ubSectorZ) > 0) - #ifdef JA2UB - //Ja25: NO meanwhiles - #else + + // if this group arrival would cause a simultaneous combat, then delay it! + // we can't have more that one battle at a time. + if( fExceptionQueue + || ((fCheckForBattle && (gTacticalStatus.fEnemyInSector || HostileCiviliansPresent() || HostileBloodcatsPresent())) // if there is an active battle + && (pGroup->ubNextX != gWorldSectorX || pGroup->ubNextY != gWorldSectorY || gbWorldSectorZ > 0)) // and the group is arriving at a different sector +#ifndef JA2UB || AreInMeanwhile() - #endif +#endif ) { - //QUEUE BATTLE! - //Delay arrival by a random value ranging from 3-5 minutes, so it doesn't get the player - //too suspicious after it happens to him a few times, which, by the way, is a rare occurrence. -#ifdef JA2UB -/*Ja25: No meanwhiles*/ -#else - if( AreInMeanwhile() ) + if (((pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && NumHostilesInSector(pGroup->ubNextX, pGroup->ubNextY, pGroup->ubSectorZ) > 0) // if a friendly movement group will arrive at an enemy sector + || (pGroup->usGroupTeam == ENEMY_TEAM && (NumPlayerTeamMembersInSector(pGroup->ubNextX, pGroup->ubNextY, pGroup->ubSectorZ) + NumNonPlayerTeamMembersInSector(pGroup->ubNextX, pGroup->ubNextY, MILITIA_TEAM) > 0))) // or an enemy movement group will arrive at a friendly sector { - pGroup->uiArrivalTime ++; //tack on only 1 minute if we are in a meanwhile scene. This effectively - //prevents any battle from occurring while inside a meanwhile scene. - } - else -#endif - { - pGroup->uiArrivalTime += Random(3) + 3; - } - - if( !AddStrategicEvent( EVENT_GROUP_ARRIVAL, pGroup->uiArrivalTime, pGroup->ubGroupID ) ) - AssertMsg( 0, "Failed to add movement event." ); - - if ( pGroup->usGroupTeam == OUR_TEAM ) - { - if( pGroup->uiArrivalTime - ABOUT_TO_ARRIVE_DELAY > GetWorldTotalMin( ) ) + //QUEUE BATTLE! + //Delay arrival by a random value ranging from 3-5 minutes, so it doesn't get the player + //too suspicious after it happens to him a few times, which, by the way, is a rare occurrence. +#ifndef JA2UB + if( AreInMeanwhile() ) { - AddStrategicEvent( EVENT_GROUP_ABOUT_TO_ARRIVE, pGroup->uiArrivalTime - ABOUT_TO_ARRIVE_DELAY, pGroup->ubGroupID ); + pGroup->uiArrivalTime ++; //tack on only 1 minute if we are in a meanwhile scene. This effectively + //prevents any battle from occurring while inside a meanwhile scene. + } + else +#endif + { + pGroup->uiArrivalTime += Random(3) + 3; } - } - return; + if( !AddStrategicEvent( EVENT_GROUP_ARRIVAL, pGroup->uiArrivalTime, pGroup->ubGroupID ) ) + AssertMsg( 0, "Failed to add movement event." ); + + if ( pGroup->usGroupTeam == OUR_TEAM ) + { + if( pGroup->uiArrivalTime - ABOUT_TO_ARRIVE_DELAY > GetWorldTotalMin( ) ) + { + AddStrategicEvent( EVENT_GROUP_ABOUT_TO_ARRIVE, pGroup->uiArrivalTime - ABOUT_TO_ARRIVE_DELAY, pGroup->ubGroupID ); + } + } + + return; + } } //Update the position of the group @@ -3639,7 +3637,10 @@ INT32 GetSectorMvtTimeForGroup( UINT8 ubSector, UINT8 ubDirection, GROUP *pGroup dEnemyGeneralsSpeedupFactor = max( 0.75f, dEnemyGeneralsSpeedupFactor - gStrategicStatus.usVIPsLeft * gGameExternalOptions.fEnemyGeneralStrategicMovementSpeedBonus ); } - iBestTraverseTime = dEnemyGeneralsSpeedupFactor * iBestTraverseTime; + // rftr: transport groups move slower than normal + const FLOAT transportSpeedFactor = pGroup->pEnemyGroup->ubIntention == TRANSPORT ? 2.0f : 1.0f; + + iBestTraverseTime = dEnemyGeneralsSpeedupFactor * transportSpeedFactor * iBestTraverseTime; iBestTraverseTime = iBestTraverseTime * (100 + RebelCommand::GetHarriersSpeedPenalty(ubSector)) / 100; } @@ -3820,6 +3821,13 @@ void HandleArrivalOfReinforcements( GROUP *pGroup ) ResetMortarsOnTeamCount(); ResetNumSquadleadersInArmyGroup(); // added by SANDRO AddPossiblePendingEnemiesToBattle(); + + if (pGroup->pEnemyGroup->ubIntention == TRANSPORT) + { + // normally, transport groups can't reinforce, but this can be hit normally if a battle is occuring in a sector + // where a transport group is moving into. + UpdateTransportGroupInventory(); + } } else if ( pGroup->usGroupTeam == MILITIA_TEAM ) { @@ -4457,7 +4465,7 @@ void CheckMembersOfMvtGroupAndComplainAboutBleeding( SOLDIERTYPE *pSoldier ) return; } - // make sure there are members in the group..if so, then run through and make each bleeder compain + // make sure there are members in the group..if so, then run through and make each bleeder complain pPlayer = pGroup->pPlayerList; // is there a player list? @@ -5475,7 +5483,7 @@ BOOLEAN TestForBloodcatAmbush( GROUP *pGroup ) { if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) ) { - if ( MercPtrs[ i ]->sSectorX == pGroup->ubSectorX && MercPtrs[ i ]->sSectorY == pGroup->ubSectorY && MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW && MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT && MercPtrs[ i ]->stats.bLife >= OKLIFE ) + if ( MercPtrs[ i ]->sSectorX == pGroup->ubSectorX && MercPtrs[ i ]->sSectorY == pGroup->ubSectorY && MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW && MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT && MercPtrs[i]->bAssignment != ASSIGNMENT_REBELCOMMAND && MercPtrs[ i ]->stats.bLife >= OKLIFE ) { if( HAS_SKILL_TRAIT( MercPtrs[ i ], SCOUTING_NT ) && MercPtrs[ i ]->ubProfile != NO_PROFILE ) { @@ -5880,6 +5888,7 @@ BOOLEAN GroupHasInTransitDeadOrPOWMercs( GROUP *pGroup ) if( ( pPlayer->pSoldier->bAssignment == IN_TRANSIT ) || ( pPlayer->pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pPlayer->pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pPlayer->pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) || SPY_LOCATION( pPlayer->pSoldier->bAssignment ) || ( pPlayer->pSoldier->bAssignment == ASSIGNMENT_DEAD ) ) { @@ -6277,4 +6286,4 @@ void GetInfoFromGroupsInSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubTeam, BO } pGroup = pGroup->next; } -} \ No newline at end of file +} diff --git a/Strategic/Strategic Movement.h b/Strategic/Strategic Movement.h index 58f95ade..1b49768a 100644 --- a/Strategic/Strategic Movement.h +++ b/Strategic/Strategic Movement.h @@ -15,6 +15,7 @@ enum //enemy intentions, PATROL, //enemy is moving around determining safe areas. REINFORCEMENTS, //enemy group has intentions to fortify position at final destination. ASSAULT, //enemy is ready to fight anything they encounter. + TRANSPORT, //rftr: enemy is carrying out non-combat tasks, but still has an escort NUM_ENEMY_INTENTIONS }; @@ -109,6 +110,9 @@ typedef struct ENEMYGROUP #define GROUPFLAG_KNOWN_DIRECTION 0x00000080 #define GROUPFLAG_KNOWN_NUMBER 0x00000100 +// rftr: strategic transport group direction flag +#define GROUPFLAG_TRANSPORT_ENROUTE 0x00000200 + typedef struct GROUP { BOOLEAN fDebugGroup; //for testing purposes -- handled differently in certain cases. diff --git a/Strategic/Strategic Pathing.cpp b/Strategic/Strategic Pathing.cpp index bed640ab..f39d47b5 100644 --- a/Strategic/Strategic Pathing.cpp +++ b/Strategic/Strategic Pathing.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include #include #include "types.h" @@ -25,7 +22,6 @@ #include "Game Event Hook.h" #include "Strategic AI.h" #include "Queen Command.h" // added by Flugente -#endif void AddSectorToFrontOfMercPath( PathStPtr *ppMercPath, UINT8 ubSectorX, UINT8 ubSectorY ); diff --git a/Strategic/Strategic Status.cpp b/Strategic/Strategic Status.cpp index e84f9d4a..0d0d571b 100644 --- a/Strategic/Strategic Status.cpp +++ b/Strategic/Strategic Status.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Strategic Status.h" #include "Inventory Choosing.h" #include "FileMan.h" @@ -16,7 +13,6 @@ #include "Game Init.h" // added by Flugente #include "GameVersion.h" // added by Flugente #include "SaveLoadGame.h" // added by Flugente -#endif #include "GameInitOptionsScreen.h" diff --git a/Strategic/Strategic Town Loyalty.cpp b/Strategic/Strategic Town Loyalty.cpp index 802952d2..579155ab 100644 --- a/Strategic/Strategic Town Loyalty.cpp +++ b/Strategic/Strategic Town Loyalty.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Strategic Town Loyalty.h" #include "strategicmap.h" #include "Overhead.h" @@ -39,7 +36,6 @@ #include "CampaignStats.h" // added by Flugente #include "DynamicDialogue.h" // added by Flugente #include "Rebel Command.h" -#endif #include "Luaglobal.h" #include "LuaInitNPCs.h" diff --git a/Strategic/Strategic Transport Groups.cpp b/Strategic/Strategic Transport Groups.cpp new file mode 100644 index 00000000..f8e19dab --- /dev/null +++ b/Strategic/Strategic Transport Groups.cpp @@ -0,0 +1,1041 @@ +//#pragma optimize("",off) +/* +Strategic Transport Groups +by rftr + +Strategic transport groups are a type of enemy strategic group in addition to ATTACK and PATROL groups. The primary purpose +of transport groups is to function as a loot pinata for the player. However, they will generally be behind enemy lines, so +the player will have to seek them out. + +Behaviourally, transport groups will spawn at the AI's HQ and then travel to a friendly town. Once the group reaches its +destination, it will wait for a few hours before returning home, where it despawns. The AI will receive small bonuses +upon the group successfully reaching both its destination and HQ. + +A transport group always flags its members to drop everything they have regardless of the player's DROP_ALL setting. In +addition, transport groups will also be carrying supplies that the player may find useful. + +Transport group compositions will vary based on the player's progress, how many interceptions have been completed recently, +and the difficulty of the game. + +*/ +#include "Strategic Transport Groups.h" + +#include "ASD.h" +#include "Assignments.h" +#include "Campaign.h" +#include "Game Clock.h" +#include "Game Event Hook.h" +#include "GameSettings.h" +#include "Inventory Choosing.h" +#include "Map Screen Interface Map.h" +#include "message.h" +#include "Overhead.h" +#include "Overhead Types.h" +#include "Queen Command.h" +#include "random.h" +#include "Soldier Control.h" +#include "strategic.h" +#include "Strategic AI.h" +#include "strategicmap.h" +#include "Strategic Mines.h" +#include "Strategic Movement.h" +#include "Strategic Town Loyalty.h" + +#define TRANSPORT_GROUP_DEBUG(x, ...) if (gGameExternalOptions.fStrategicTransportGroupsDebug) {ScreenMsg(FONT_RED, MSG_INTERFACE, x, __VA_ARGS__);} + +// how many turncoats are required to monitor a town for transport groups? +#define ELITE_TURNCOAT_MONITOR_REQUIREMENT 1 +#define TROOP_TURNCOAT_MONITOR_REQUIREMENT 3 +#define ADMIN_TURNCOAT_MONITOR_REQUIREMENT 5 + +extern ARMY_GUN_CHOICE_TYPE gExtendedArmyGunChoices[SOLDIER_GUN_CHOICE_SELECTIONS][ARMY_GUN_LEVELS]; +extern ARMY_GUN_CHOICE_TYPE gArmyItemChoices[SOLDIER_GUN_CHOICE_SELECTIONS][MAX_ITEM_TYPES]; +extern BOOLEAN gfTownUsesLoyalty[MAX_TOWNS]; + +std::map> transportGroupIdToSoldierMap; +std::map transportGroupSectorInfo; + +void PopulateTransportGroup(UINT8& admins, UINT8& troops, UINT8& elites, UINT8& jeeps, UINT8& tanks, UINT8& robots, UINT8 progress, int difficulty, BOOLEAN trySpecialCase); + +BOOLEAN DeployTransportGroup() +{ + if (gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) + return FALSE; + + if (giReinforcementPool <= 0) + return FALSE; + + const UINT8 difficulty = gGameOptions.ubDifficultyLevel; + + // is there a mine here? + std::vector mineSectorIds; + for (INT8 i = 0; i < NUM_TOWNS; ++i) + { + // skip towns that have no loyalty + if (!gfTownUsesLoyalty[i]) continue; + + // filter by TOWN ownership - skip contested towns on expert/insane + if (IsTownUnderCompleteControlByPlayer(i)) continue; + if ((difficulty == DIF_LEVEL_HARD || difficulty == DIF_LEVEL_INSANE) && IsTownUnderCompleteControlByEnemy(i) == FALSE) continue; + + // skip towns with a shut down mine + const INT8 mineIndex = GetMineIndexForTown(i); + if (mineIndex == -1) continue; + if (IsMineShutDown(mineIndex) == TRUE) continue; + + // filter by MINE ownership - for novice/experienced, as hard/insane would have ignored this town above + const INT16 mineSector = (GetMineSectorForTown(i)); + if (StrategicMap[mineSector].fEnemyControlled == FALSE) continue; + + mineSectorIds.push_back(STRATEGIC_INDEX_TO_SECTOR_INFO(mineSector)); + } + + for (int a = 0; a < mineSectorIds.size(); ++a) + { + TRANSPORT_GROUP_DEBUG(L"DeployTransportGroup valid town destination: %d (%d/%d)", mineSectorIds[a], SECTORX(mineSectorIds[a]), SECTORY(mineSectorIds[a])); + } + + // no valid destinations + if (mineSectorIds.size() == 0) return FALSE; + + INT8 transportGroupCount = 0; + GROUP* pGroup = gpGroupList; + std::vector> groupIds; + while (pGroup) + { + if (pGroup->usGroupTeam == ENEMY_TEAM && pGroup->pEnemyGroup->ubIntention == TRANSPORT) + { + groupIds.emplace_back(pGroup->ubGroupID, pGroup->ubSectorX, pGroup->ubSectorY); + transportGroupCount++; + } + pGroup = pGroup->next; + } + + for (int a = 0; a < groupIds.size(); ++a) + { + TRANSPORT_GROUP_DEBUG(L"DeployTransportGroup found existing transport groupid: %d at %d/%d", std::get<0>(groupIds[a]), std::get<1>(groupIds[a]), std::get<2>(groupIds[a])); + } + + // track recent transport group interceptions + const INT8 recentLossCount = min(5, GetAllStrategicEventsOfType(EVENT_TRANSPORT_GROUP_DEFEATED).size()); + + // if there are too many active transport groups, don't deploy any more + // maximum number of active groups is the number of valid destinations at queen decision time + const INT8 maxGroups = gGameExternalOptions.iMaxSimultaneousTransportGroups - recentLossCount; + if (transportGroupCount >= min(max(maxGroups, 0), mineSectorIds.size())) return FALSE; + + const UINT8 ubSectorID = (UINT8)mineSectorIds[Random(mineSectorIds.size())]; + + TRANSPORT_GROUP_DEBUG(L"DeployTransportGroup sending group to sectorId: %d (%d/%d)", ubSectorID, SECTORX(ubSectorID), SECTORY(ubSectorID)); + + UINT8 admins, troops, elites, robots, jeeps, tanks; + const UINT8 progress = min(125, HighestPlayerProgressPercentage() + recentLossCount * 5); + PopulateTransportGroup(admins, troops, elites, jeeps, tanks, robots, progress, difficulty, mineSectorIds.size() == 1); + + // varying transport group quality/compositions + pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ), admins, troops, elites, robots, tanks, jeeps ); + + //Madd: unlimited reinforcements? + if ( !gfUnlimitedTroops ) + { + giReinforcementPool -= (admins + troops + elites + robots + jeeps + tanks); + + giReinforcementPool = max( giReinforcementPool, 0 ); + } + + MoveSAIGroupToSector( &pGroup, ubSectorID, EVASIVE, TRANSPORT ); + + pGroup->uiFlags |= GROUPFLAG_TRANSPORT_ENROUTE; + + return TRUE; +} + +BOOLEAN ForceDeployTransportGroup(UINT8 sectorId) +{ + UINT8 admins, troops, elites, robots, jeeps, tanks; + const INT8 recentLossCount = min(5, GetAllStrategicEventsOfType(EVENT_TRANSPORT_GROUP_DEFEATED).size()); + const UINT8 progress = min(125, HighestPlayerProgressPercentage() + recentLossCount * 5); + const UINT8 difficulty = gGameOptions.ubDifficultyLevel; + PopulateTransportGroup(admins, troops, elites, jeeps, tanks, robots, progress, difficulty, FALSE); + + // varying transport group quality/compositions + GROUP* pGroup = CreateNewEnemyGroupDepartingFromSector( SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ), admins, troops, elites, robots, tanks, jeeps ); + + //Madd: unlimited reinforcements? + if ( !gfUnlimitedTroops ) + { + giReinforcementPool -= (admins + troops + elites + robots + jeeps + tanks); + + giReinforcementPool = max( giReinforcementPool, 0 ); + } + + MoveSAIGroupToSector( &pGroup, sectorId, EVASIVE, TRANSPORT ); + + pGroup->uiFlags |= GROUPFLAG_TRANSPORT_ENROUTE; + + return TRUE; +} + +BOOLEAN ReturnTransportGroup(INT32 groupId) +{ + GROUP* pGroup = gpGroupList; + while (pGroup) + { + if (pGroup->ubGroupID == groupId) + { + MoveSAIGroupToSector( &pGroup, SECTOR( gModSettings.ubSAISpawnSectorX, gModSettings.ubSAISpawnSectorY ), EVASIVE, TRANSPORT ); + if (pGroup) + pGroup->uiFlags &= ~GROUPFLAG_TRANSPORT_ENROUTE; + break; + } + pGroup = pGroup->next; + } + + if (pGroup == nullptr) + { + TRANSPORT_GROUP_DEBUG(L"RETURN_TRANSPORT_GROUP failed to find groupid %d", groupId); + return FALSE; + } + + return TRUE; +} + +void FillMapColoursForTransportGroups(INT32(&colorMap)[MAXIMUM_VALID_Y_COORDINATE][MAXIMUM_VALID_X_COORDINATE]) +{ + if (gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) + return; + + const auto debugColor = MAP_SHADE_LT_BLUE; + const auto targetColor = MAP_SHADE_LT_YELLOW; + const INT8 DETECTION_RANGE_SCOUT = 1; + const INT8 DETECTION_RANGE_RADIO = 3; + const INT8 DETECTION_RANGE_COVERT = 0; + GROUP* pGroup = gpGroupList; + transportGroupSectorInfo.clear(); + + enum class MonitoredSectorState { + Unmonitored, + Monitored, + GroupIncoming, + } monitoredSectorState; + + // build map of detection sectors + ranges + std::map, INT8> detectionMap; + std::map monitoredTowns; + for( INT16 i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ ) + { + if( MercPtrs[ i ]->bActive && + MercPtrs[ i ]->stats.bLife >= OKLIFE && + (MercPtrs[ i ]->bAssignment < ON_DUTY || MercPtrs[ i ]->bAssignment == GATHERINTEL) && + !MercPtrs[ i ]->flags.fMercAsleep) + { + if (gGameOptions.fNewTraitSystem) + { + if (HAS_SKILL_TRAIT(MercPtrs[i], SCOUTING_NT)) + { + detectionMap[std::pair(MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY)] = DETECTION_RANGE_SCOUT; + } + else if (HAS_SKILL_TRAIT(MercPtrs[i], RADIO_OPERATOR_NT) && MercPtrs[i]->CanUseRadio(FALSE)) + { + detectionMap[std::pair(MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY)] = DETECTION_RANGE_RADIO; + } + else if (HAS_SKILL_TRAIT(MercPtrs[i], COVERT_NT)) + { + if (MercPtrs[i]->bAssignment == GATHERINTEL) + { + detectionMap[std::pair(MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY)] = DETECTION_RANGE_COVERT; + monitoredTowns[GetTownIdForSector(MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY)] = MonitoredSectorState::Monitored; + } + } + } + } + } + + // turncoats in towns can detect incoming transport groups + for (int x = MINIMUM_VALID_X_COORDINATE; x <= MAXIMUM_VALID_X_COORDINATE; ++x) + { + for (int y = MINIMUM_VALID_Y_COORDINATE; y <= MAXIMUM_VALID_Y_COORDINATE; ++y) + { + const UINT8 townId = GetTownIdForSector(x, y); + if (townId == BLANK_SECTOR) continue; + + CorrectTurncoatCount(x, y); + const UINT16 adminTurncoats = NumTurncoatsOfClassInSector(x, y, SOLDIER_CLASS_ADMINISTRATOR); + const UINT16 troopTurncoats = NumTurncoatsOfClassInSector(x, y, SOLDIER_CLASS_ARMY); + const UINT16 eliteTurncoats = NumTurncoatsOfClassInSector(x, y, SOLDIER_CLASS_ELITE); + + if (gGameExternalOptions.fStrategicTransportGroupsDebug + || (adminTurncoats >= ADMIN_TURNCOAT_MONITOR_REQUIREMENT) + || (troopTurncoats >= TROOP_TURNCOAT_MONITOR_REQUIREMENT) + || (eliteTurncoats >= ELITE_TURNCOAT_MONITOR_REQUIREMENT)) monitoredTowns[townId] = MonitoredSectorState::Monitored; + } + } + + // colour all groups + while (pGroup) + { + if (pGroup->usGroupTeam == ENEMY_TEAM) + { + const UINT8 intention = pGroup->pEnemyGroup->ubIntention; + if (intention == TRANSPORT ) + { + // check if current location is known + const INT16 gx = pGroup->ubSectorX; + const INT16 gy = pGroup->ubSectorY; + for (const auto key : detectionMap) + { + const std::pair sector = key.first; + const INT8 range = key.second; + + const INT8 dist = abs((gx - sector.first)) + abs((gy - sector.second)); + if (dist <= range) + { + colorMap[pGroup->ubSectorY-1][pGroup->ubSectorX-1] = targetColor; + transportGroupSectorInfo[SECTOR(pGroup->ubSectorX, pGroup->ubSectorY)] = TransportGroupSectorInfo::TransportGroupSectorInfo_LocatedGroup; + } + } + + // turncoats reveal their group's location + if (pGroup->pEnemyGroup->ubNumAdmins_Turncoat >= ADMIN_TURNCOAT_MONITOR_REQUIREMENT + || pGroup->pEnemyGroup->ubNumTroops_Turncoat >= TROOP_TURNCOAT_MONITOR_REQUIREMENT + || pGroup->pEnemyGroup->ubNumElites_Turncoat >= ELITE_TURNCOAT_MONITOR_REQUIREMENT) + { + colorMap[pGroup->ubSectorY-1][pGroup->ubSectorX-1] = targetColor; + transportGroupSectorInfo[SECTOR(pGroup->ubSectorX, pGroup->ubSectorY)] = TransportGroupSectorInfo::TransportGroupSectorInfo_LocatedGroup; + } + + // check if target location is monitored + WAYPOINT* wp = pGroup->pWaypoints; + + while (wp) + { + if (wp->next == nullptr) + break; + + wp = wp->next; + } + + if (wp == nullptr) + { + // ignore this group - it doesn't have a waypoint (?) + continue; + } + + const UINT8 townId = GetTownIdForSector(wp->x, wp->y); + if (monitoredTowns.find(townId) != monitoredTowns.end() && monitoredTowns[townId] == MonitoredSectorState::Monitored) + { + monitoredTowns[townId] = MonitoredSectorState::GroupIncoming; + } + + // debug: colour all group locations + if (gGameExternalOptions.fStrategicTransportGroupsDebug) + { + colorMap[pGroup->ubSectorY-1][pGroup->ubSectorX-1] = debugColor; + } + } + } + + pGroup = pGroup->next; + } + + // color all monitored towns if there's a transport group en route + for (int x = MINIMUM_VALID_X_COORDINATE; x <= MAXIMUM_VALID_X_COORDINATE; ++x) + { + for (int y = MINIMUM_VALID_Y_COORDINATE; y <= MAXIMUM_VALID_Y_COORDINATE; ++y) + { + const UINT8 townId = GetTownIdForSector(x, y); + if (monitoredTowns.find(townId) != monitoredTowns.end() && monitoredTowns[townId] == MonitoredSectorState::GroupIncoming) + { + colorMap[y-1][x-1] = targetColor; + transportGroupSectorInfo[SECTOR(x, y)] = TransportGroupSectorInfo::TransportGroupSectorInfo_LocatedDestination; + } + } + } + +} + +void ProcessTransportGroupReachedDestination(GROUP* pGroup) +{ + const UINT8 difficulty = gGameOptions.ubDifficultyLevel; + + // just arrived, let's go home + if (pGroup->ubSectorX != gModSettings.ubSAISpawnSectorX && pGroup->ubSectorY != gModSettings.ubSAISpawnSectorY) + { + pGroup->ubSectorIDOfLastReassignment = (UINT8)SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ); + + // global loyalty loss + INT32 loyaltyLoss = 0; + switch (difficulty) + { + case DIF_LEVEL_EASY: loyaltyLoss = 0; break; + case DIF_LEVEL_MEDIUM: loyaltyLoss = 0; break; + case DIF_LEVEL_HARD: loyaltyLoss = -100; break; + case DIF_LEVEL_INSANE: loyaltyLoss = -250; break; + } + + AffectAllTownsLoyaltyByDistanceFrom(loyaltyLoss, pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubSectorZ); + + // queue up return home order + AddStrategicEvent(EVENT_RETURN_TRANSPORT_GROUP, GetWorldTotalMin() + 60 * 6, pGroup->ubGroupID); + } + else + { + // asd income injection and bonus update + if (gGameExternalOptions.fASDActive) + { + INT32 moneyAmt = 0; + INT32 fuelAmt = 0; + + switch (difficulty) + { + case DIF_LEVEL_EASY: + moneyAmt = 0; + fuelAmt = 0; + break; + + case DIF_LEVEL_MEDIUM: + moneyAmt = gGameExternalOptions.gASDResource_Cost[ASD_JEEP] * 0.25f; + fuelAmt = gGameExternalOptions.gASDResource_Fuel_Jeep * 0.25f; + break; + + case DIF_LEVEL_HARD: + moneyAmt = gGameExternalOptions.gASDResource_Cost[ASD_JEEP] * 0.5f; + fuelAmt = gGameExternalOptions.gASDResource_Fuel_Jeep * 0.5f; + break; + + case DIF_LEVEL_INSANE: + moneyAmt = gGameExternalOptions.gASDResource_Cost[ASD_TANK]; + fuelAmt = gGameExternalOptions.gASDResource_Fuel_Tank; + break; + } + + AddStrategicAIResources(ASD_MONEY, moneyAmt); + AddStrategicAIResources(ASD_FUEL, fuelAmt); + UpdateASD(); + } + + // reinforcement pool increase + if (!gfUnlimitedTroops) + { + INT32 poolAmt = 0; + switch (difficulty) + { + case DIF_LEVEL_EASY: poolAmt = 0; break; + case DIF_LEVEL_MEDIUM: poolAmt = 10; break; + case DIF_LEVEL_HARD: poolAmt = 15; break; + case DIF_LEVEL_INSANE: poolAmt = 40; break; + } + + giReinforcementPool += poolAmt; + } + + // successfully returned home. give the strategic ai some rewards! + SendGroupToPool(&pGroup); + + if (difficulty != DIF_LEVEL_EASY) + { + // immediately do a queen evaluation + DeleteAllStrategicEventsOfType(EVENT_EVALUATE_QUEEN_SITUATION); + EvaluateQueenSituation(); + } + } +} + +void UpdateTransportGroupInventory() +{ + if (gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) + return; + + const int firstSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID; + const int lastSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID; + const UINT8 progress = CurrentPlayerProgressPercentage(); + + enum ItemTypes + { + GAS_CANS, + MEDICAL_FIRSTAIDKITS, + MEDICAL_MEDKITS, + MEDICAL_OTHER, + TOOL_KITS, + BACKPACKS, + RADIOS, + ATTACHMENTS, + CAMO_KITS, + MISC, + GRENADE_THROWN, + GUNS, + AMMO_BOXES, + GRENADELAUNCHERS, + ROCKETLAUNCHERS, + + + TRANSPORT_LOOT_START = GAS_CANS, + TRANSPORT_LOOT_END = ROCKETLAUNCHERS, + }; + + std::map> itemMap; + + // item cache build + { + // let's be nice to the player and only drop ammo for guns their mercs have in inventory + std::set playerCalibres; + for (INT16 i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++) + { + if (MercPtrs[i]->bActive && !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_VEHICLE)) + { + for (int j = 0 ; j < MercPtrs[i]->inv.size(); ++j) + { + OBJECTTYPE& obj = MercPtrs[i]->inv[j]; + if (obj.exists() + && Item[obj.usItem].usItemClass == IC_GUN) + { + playerCalibres.insert(Weapon[Item[obj.usItem].ubClassIndex].ubCalibre); + } + } + } + } + + for (UINT16 i = 0; i < gMAXITEMS_READ; ++i) + { + if (!ItemIsLegal(i, TRUE)) continue; + if ((Item[i].usItemClass & IC_AMMO) == 0 && (Item[i].iTransportGroupMaxProgress == 0 || Item[i].iTransportGroupMinProgress > progress || progress > Item[i].iTransportGroupMaxProgress)) continue; + + if (Item[i].medical) + { + if (Item[i].firstaidkit) itemMap[MEDICAL_FIRSTAIDKITS].push_back(i); + else if (Item[i].medicalkit) itemMap[MEDICAL_MEDKITS].push_back(i); + else itemMap[MEDICAL_OTHER].push_back(i); + } + else if (Item[i].gascan) itemMap[GAS_CANS].push_back(i); + else if (Item[i].toolkit) itemMap[TOOL_KITS].push_back(i); + else if (HasItemFlag(i, RADIO_SET)) itemMap[RADIOS].push_back(i); + else if (Item[i].usItemClass & IC_GRENADE) + { + if (Item[i].glgrenade == 0 + && Item[i].attachmentclass != AC_GRENADE // not for a grenade launcher + && Item[i].attachmentclass != AC_ROCKET) // not for a rocket launcher + itemMap[GRENADE_THROWN].push_back(i); + } + else if (Item[i].usItemClass & IC_LBEGEAR) + { + if (LoadBearingEquipment[Item[i].ubClassIndex].lbeClass == BACKPACK && !HasItemFlag(i, RADIO_SET)) // make sure radios don't get added here + { + itemMap[BACKPACKS].push_back(i); + } + } + else if (Item[i].camouflagekit) itemMap[CAMO_KITS].push_back(i); + else if (Item[i].usItemClass & IC_MISC) + { + switch (Item[i].attachmentclass) + { + case AC_BIPOD: + case AC_MUZZLE: + case AC_LASER: + case AC_SIGHT: + case AC_SCOPE: + case AC_FOREGRIP: + itemMap[ATTACHMENTS].push_back(i); + break; + default: + itemMap[MISC].push_back(i); + break; + } + } + else if (Item[i].usItemClass & IC_AMMO) + { + if (Magazine[Item[i].ubClassIndex].ubMagType == AMMO_BOX && playerCalibres.find(Magazine[Item[i].ubClassIndex].ubCalibre) != playerCalibres.end()) + { + if (Item[i].ubCoolness <= ((progress+5) / 10)+2) + { + itemMap[AMMO_BOXES].push_back(i); + } + } + } + else if (Item[i].usItemClass & IC_GUN) + { + itemMap[GUNS].push_back(i); + } + else if (Item[i].grenadelauncher) + { + itemMap[GRENADELAUNCHERS].push_back(i); + } + else if (Item[i].rocketlauncher) + { + itemMap[ROCKETLAUNCHERS].push_back(i); + } + } + } + + auto addItemToInventory = [](SOLDIERTYPE* pSoldier, UINT16 itemId, UINT8 amount) + { + OBJECTTYPE itemToAdd; + CreateItems(itemId, 100, amount, &itemToAdd); + + itemToAdd.fFlags &= ~OBJECT_UNDROPPABLE; + + if (FitsInSmallPocket(&itemToAdd)) + { + for(INT8 i = SMALLPOCKSTART; i < SMALLPOCKFINAL; i++ ) + { + if( pSoldier->inv[ i ].exists() == false && !(pSoldier->inv[ i ].fFlags & OBJECT_NO_OVERWRITE) ) + { + pSoldier->inv[ i ] = itemToAdd; + break; + } + } + } + else + { + for(INT8 i = BIGPOCKSTART; i < BIGPOCKFINAL; i++ ) + { //no space free in small pockets, so put it into a large pocket. + if( pSoldier->inv[ i ].exists() == false && !(pSoldier->inv[ i ].fFlags & OBJECT_NO_OVERWRITE) ) + { + pSoldier->inv[ i ] = itemToAdd; + break; + } + } + } + }; + + // cache the initial jeep count of every group we find + std::map cachedGroupJeepCount; + for (int slot = firstSlot; (slot <= lastSlot); ++slot) + { + SOLDIERTYPE* pSoldier = &Menptr[slot]; + + const std::map>::iterator groupIter = transportGroupIdToSoldierMap.find(pSoldier->ubGroupID); + if (groupIter != transportGroupIdToSoldierMap.end()) + { + // let's find out if this group is coming home or still outgoing to its target destination + GROUP* pGroup = gpGroupList; + BOOLEAN outgoing = FALSE; + while (pGroup) + { + if (pGroup->ubGroupID == groupIter->first) + { + outgoing = pGroup->uiFlags & GROUPFLAG_TRANSPORT_ENROUTE; + break; + } + pGroup = pGroup->next; + } + + // found a matching transport groupid + std::map::iterator soldierClassIter = groupIter->second.find(SOLDIER_CLASS_JEEP); + if (cachedGroupJeepCount.find(groupIter->first) == cachedGroupJeepCount.end()) + { + cachedGroupJeepCount[groupIter->first] = soldierClassIter == groupIter->second.end() ? 0 : groupIter->second[SOLDIER_CLASS_JEEP]; + } + + if (soldierClassIter != groupIter->second.end() && cachedGroupJeepCount.find(groupIter->first) != cachedGroupJeepCount.end() && cachedGroupJeepCount[groupIter->first] > 0) + { + TRANSPORT_GROUP_DEBUG(L"Found groupid[%d] with admin[%d] troop[%d] elite[%d] jeep[%d]", groupIter->first, groupIter->second[SOLDIER_CLASS_ADMINISTRATOR], groupIter->second[SOLDIER_CLASS_ARMY], groupIter->second[SOLDIER_CLASS_ELITE], groupIter->second[SOLDIER_CLASS_JEEP]); + // this group has a jeep in it! + // only jeeps carry things + // but give a little extra, since the jeep exploding can outright destroy things + if (pSoldier->ubSoldierClass == SOLDIER_CLASS_JEEP) + { + //if (outgoing) + { + // en route to target destination - carrying ammo, supplies, etc + for (int i = TRANSPORT_LOOT_START; i <= TRANSPORT_LOOT_END; ++i) + { + const ItemTypes itemType = static_cast(i); + if (itemMap[itemType].size() > 0) + { + const UINT16 id = itemMap[itemType][Random(itemMap[itemType].size())]; + switch (itemType) + { + case BACKPACKS: + case RADIOS: + case MISC: + case AMMO_BOXES: + // intentionally do nothing + break; + + case GAS_CANS: + addItemToInventory(pSoldier, id, 1); + break; + + case MEDICAL_MEDKITS: + case MEDICAL_OTHER: + case TOOL_KITS: + addItemToInventory(pSoldier, id, 2); + break; + + case MEDICAL_FIRSTAIDKITS: + addItemToInventory(pSoldier, id, 10); + break; + + case GRENADE_THROWN: + addItemToInventory(pSoldier, id, 12); + break; + + case GUNS: + { + for (int loop = 0; loop < 3; ++loop) + { + const UINT16 gunId = itemMap[itemType][Random(itemMap[itemType].size())]; + addItemToInventory(pSoldier, gunId, 1); + + UINT16 ammoId = RandomMagazine(gunId, 0, 100, SOLDIER_CLASS_ELITE); + if (ammoId == 0) continue; // no ammo matches, skip + + BOOLEAN convertedToBox = FALSE; + for (INT32 itemId = 0; itemId < (INT32)gMAXITEMS_READ; ++itemId) + { + if( ItemIsLegal(itemId) + && Item[itemId].usItemClass == IC_AMMO + && Magazine[Item[itemId].ubClassIndex].ubMagType == AMMO_BOX + && Magazine[Item[itemId].ubClassIndex].ubCalibre == Magazine[Item[ammoId].ubClassIndex].ubCalibre + && Magazine[Item[itemId].ubClassIndex].ubAmmoType == Magazine[Item[ammoId].ubClassIndex].ubAmmoType) + { + // replace mag with box + convertedToBox = TRUE; + ammoId = itemId; + break; + } + } + addItemToInventory(pSoldier, ammoId, convertedToBox ? 2 : 10); + } + } + break; + + case GRENADELAUNCHERS: + { + addItemToInventory(pSoldier, id, 1); + + const UINT16 launchableId = PickARandomLaunchable(id); + if (launchableId == 0) continue; // no launchable matches, skip + + addItemToInventory(pSoldier, launchableId, 8); + } + break; + + case ROCKETLAUNCHERS: + { + addItemToInventory(pSoldier, id, Item[id].singleshotrocketlauncher ? 3 : 1); + + const UINT16 launchableId = PickARandomLaunchable(id); + if (launchableId == 0) continue; // no launchable matches, skip + + addItemToInventory(pSoldier, launchableId, 3); + } + break; + + case ATTACHMENTS: + for (int loop = 0; loop < 5; ++loop) + { + const UINT16 attachmentId = itemMap[itemType][Random(itemMap[itemType].size())]; + addItemToInventory(pSoldier, attachmentId, 2); + } + break; + + case CAMO_KITS: + addItemToInventory(pSoldier, id, 6); + break; + + default: + TRANSPORT_GROUP_DEBUG(L"Warning: ignoring unhandled transport group loot type: %d", itemType); + // nothing! + break; + } + } + } + } + //else // returning home + { + // I can't really think of a good different loot set for returning transport groups, so we'll have the same loot + // regardless of whether the group is outgoing or incoming. I'll keep the in/out flag in case that changes + } + + transportGroupIdToSoldierMap[pSoldier->ubGroupID][SOLDIER_CLASS_JEEP]--; + } + else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ADMINISTRATOR + || pSoldier->ubSoldierClass == SOLDIER_CLASS_ARMY + || pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE) + { + // jeep is carrying most things, so soldiers just have ammo + if (itemMap[AMMO_BOXES].size() > 0) + { + const UINT16 ammoId = itemMap[AMMO_BOXES][Random(itemMap[AMMO_BOXES].size())]; + addItemToInventory(pSoldier, ammoId, 1); + } + + if (itemMap[BACKPACKS].size() > 0 && UsingNewInventorySystem()) + { + OBJECTTYPE obj; + CreateItem(itemMap[BACKPACKS][Random(itemMap[BACKPACKS].size())], 100, &obj); + obj.fFlags |= OBJECT_UNDROPPABLE; + pSoldier->inv[BPACKPOCKPOS] = obj; + } + + // force inventory to be dropped! + for (int i = 0; i < pSoldier->inv.size(); ++i) + { + OBJECTTYPE* item = &pSoldier->inv[i]; + if (item->exists() && Item[item->usItem].defaultundroppable == FALSE) + { + item->fFlags &= ~OBJECT_UNDROPPABLE; + } + } + transportGroupIdToSoldierMap[pSoldier->ubGroupID][pSoldier->ubSoldierClass]--; + } + } + else + { + TRANSPORT_GROUP_DEBUG(L"Found jeepless groupid[%d] with admin[%d] troop[%d] elite[%d] jeep[%d]", groupIter->first, groupIter->second[SOLDIER_CLASS_ADMINISTRATOR], groupIter->second[SOLDIER_CLASS_ARMY], groupIter->second[SOLDIER_CLASS_ELITE], groupIter->second[SOLDIER_CLASS_JEEP]); + // no jeep in group, add things normally + soldierClassIter = groupIter->second.find(pSoldier->ubSoldierClass); + if (soldierClassIter != groupIter->second.end()) + { + // found a matching soldierclass + if (soldierClassIter->second > 0) + { + //if (outgoing) + { + for (int i = TRANSPORT_LOOT_START; i <= TRANSPORT_LOOT_END; ++i) + { + const ItemTypes itemType = static_cast(i); + if (itemMap[itemType].size() > 0) + { + const UINT16 id = itemMap[itemType][Random(itemMap[itemType].size())]; + switch (itemType) + { + case GAS_CANS: + case MEDICAL_MEDKITS: + case MEDICAL_OTHER: + case TOOL_KITS: + case GUNS: + case GRENADELAUNCHERS: + case ROCKETLAUNCHERS: + case GRENADE_THROWN: + case MISC: + // skip for foot soldiers! + break; + + case BACKPACKS: + { + if (UsingNewInventorySystem()) + { + OBJECTTYPE obj; + CreateItem(id, 100, &obj); + obj.fFlags |= OBJECT_UNDROPPABLE; + pSoldier->inv[BPACKPOCKPOS] = obj; + } + } + break; + + case MEDICAL_FIRSTAIDKITS: + addItemToInventory(pSoldier, id, 1); + break; + + case AMMO_BOXES: + addItemToInventory(pSoldier, id, 1); + break; + + case CAMO_KITS: + addItemToInventory(pSoldier, id, 1); + break; + + case ATTACHMENTS: + // low chance of attachments + if (Random(100) < 25) + addItemToInventory(pSoldier, id, 1); + break; + + default: + TRANSPORT_GROUP_DEBUG(L"Warning: ignoring unhandled transport group loot type: %d", itemType); + // nothing! + break; + } + } + } + } + //else // returning home + { + // I can't really think of a good different loot set for returning transport groups, so we'll have the same loot + // regardless of whether the group is outgoing or incoming. I'll keep the in/out flag in case that changes + } + + // force inventory to be dropped! + for (int i = 0; i < pSoldier->inv.size(); ++i) + { + OBJECTTYPE* item = &pSoldier->inv[i]; + if (item->exists() && Item[item->usItem].defaultundroppable == FALSE) + { + item->fFlags &= ~OBJECT_UNDROPPABLE; + } + } + transportGroupIdToSoldierMap[pSoldier->ubGroupID][pSoldier->ubSoldierClass]--; + } + } + } + } + } +} + +void AddToTransportGroupMap(UINT8 groupId, int soldierClass, UINT8 amount) +{ + if (gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) + { + ClearTransportGroupMap(); + return; + } + + // only update admins/troops/elites/jeeps + + switch (soldierClass) + { + case SOLDIER_CLASS_ADMINISTRATOR: + case SOLDIER_CLASS_ARMY: + case SOLDIER_CLASS_ELITE: + case SOLDIER_CLASS_JEEP: + transportGroupIdToSoldierMap[groupId][soldierClass] += amount; + break; + default: + // do nothing! + break; + } +} + +void ClearTransportGroupMap() +{ + transportGroupIdToSoldierMap.clear(); +} + +void NotifyTransportGroupDefeated() +{ + if (gGameExternalOptions.fStrategicTransportGroupsEnabled == FALSE) + return; + + const UINT32 hoursToRememberDefeat = 24 * 7; // 7 days + + AddStrategicEvent(EVENT_TRANSPORT_GROUP_DEFEATED, GetWorldTotalMin() + 60 * hoursToRememberDefeat, 0); +} + +void PopulateTransportGroup(UINT8& admins, UINT8& troops, UINT8& elites, UINT8& jeeps, UINT8& tanks, UINT8& robots, UINT8 progress, int difficulty, BOOLEAN trySpecialCase) +{ + admins = troops = elites = robots = jeeps = tanks = 0; + + // special case for only one valid destination - expert/insane only + if (trySpecialCase && (difficulty == DIF_LEVEL_HARD || difficulty == DIF_LEVEL_INSANE)) + { + admins = 1; + elites = difficulty == DIF_LEVEL_HARD ? 14 : 19; + + if (elites > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep()) + { + jeeps++; + elites--; + } + + if (gGameExternalOptions.fASDAssignsTanks) + { + const int numTanks = difficulty == DIF_LEVEL_INSANE ? 2 : 1; + for (int i = 0; i < numTanks; ++i) + { + if (elites > 0 && ASDSoldierUpgradeToTank()) + { + tanks++; + elites--; + } + } + } + + if (gGameExternalOptions.fASDAssignsRobots) + { + const int numRobots = Random(5); + for (int i = 0; i < numRobots; ++i) + { + if (elites > 0 && ASDSoldierUpgradeToRobot()) + { + robots++; + elites--; + } + } + } + } + else // normal case + { + UINT8 difficultyMod = 1; + switch (difficulty) + { + case DIF_LEVEL_EASY: difficultyMod = 1; break; + case DIF_LEVEL_MEDIUM: difficultyMod = 2; break; + case DIF_LEVEL_HARD: difficultyMod = 3; break; + case DIF_LEVEL_INSANE: difficultyMod = 4; break; + default: break; + } + + // default composition + if (progress < 25) + { + admins = 8 - difficultyMod; + troops = difficultyMod; + } + else if (progress < 50) + { + admins = 10 - difficultyMod * 2; + troops = difficultyMod; + elites = difficultyMod; + } + else if (progress < 75) + { + admins = 2; + troops = 10 - difficultyMod * 2; + elites = difficultyMod * 2; + } + else if (progress <= 100) // intentional equality + { + admins = 2; + troops = 13 - difficultyMod * 3; + elites = difficultyMod * 3; + } + else // at least one recent interception at max progress + { + admins = 2; + troops = 18 - difficultyMod * 4; + elites = difficultyMod * 4; + } + + // add some vehicles, if possible + if (progress >= gGameExternalOptions.usJeepMinimumProgress) + { + if (elites > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep()) + { + jeeps++; + elites--; + } + } + + if (progress >= gGameExternalOptions.usTankMinimumProgress && Random(100) < (20 + difficultyMod * 10)) + { + if (elites > 0 && gGameExternalOptions.fASDAssignsTanks && ASDSoldierUpgradeToTank()) + { + tanks++; + elites--; + } + } + + if (progress >= gGameExternalOptions.usRobotMinimumProgress && Random(100) < (20 + difficultyMod * 10)) + { + const int numRobots = Random(difficultyMod + 1); + for (int i = 0; i < numRobots; ++i) + { + if (elites > 0 && gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot()) + { + robots++; + elites--; + } + } + } + } +} + +const std::map GetTransportGroupSectorInfo() +{ + return transportGroupSectorInfo; +} + +#undef TRANSPORT_GROUP_DEBUG + diff --git a/Strategic/Strategic Transport Groups.h b/Strategic/Strategic Transport Groups.h new file mode 100644 index 00000000..3fd873c5 --- /dev/null +++ b/Strategic/Strategic Transport Groups.h @@ -0,0 +1,31 @@ +#ifndef _STRATEGIC_TRANSPORT_GROUPS_H +#define _STRATEGIC_TRANSPORT_GROUPS_H + +#include "Campaign Types.h" +#include "Types.h" +#include + +enum TransportGroupSectorInfo +{ + TransportGroupSectorInfo_LocatedGroup = 0, + TransportGroupSectorInfo_LocatedDestination, +}; + +struct GROUP; + +BOOLEAN DeployTransportGroup(); +BOOLEAN ForceDeployTransportGroup(UINT8 sectorId); +BOOLEAN ReturnTransportGroup(INT32 groupId); +void FillMapColoursForTransportGroups(INT32(&colorMap)[MAXIMUM_VALID_Y_COORDINATE][MAXIMUM_VALID_X_COORDINATE]); +void ProcessTransportGroupReachedDestination(GROUP* pGroup); +void UpdateTransportGroupInventory(); + +const std::map GetTransportGroupSectorInfo(); + +void AddToTransportGroupMap(UINT8 groupId, int soldierClass, UINT8 amount); +void ClearTransportGroupMap(); + +void NotifyTransportGroupDefeated(); + +#endif + diff --git a/Strategic/Strategic Turns.cpp b/Strategic/Strategic Turns.cpp index c708006b..8feb59e6 100644 --- a/Strategic/Strategic Turns.cpp +++ b/Strategic/Strategic Turns.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "sgp.h" #include "Game Clock.h" #include "Font Control.h" @@ -19,7 +16,6 @@ #include "strategic turns.h" #include "rt time defines.h" #include "assignments.h" -#endif diff --git a/Strategic/Strategic_VS2005.vcproj b/Strategic/Strategic_VS2005.vcproj deleted file mode 100644 index 348378c5..00000000 --- a/Strategic/Strategic_VS2005.vcproj +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Strategic/Strategic_VS2008.vcproj b/Strategic/Strategic_VS2008.vcproj deleted file mode 100644 index 5854184c..00000000 --- a/Strategic/Strategic_VS2008.vcproj +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Strategic/Strategic_VS2010.vcxproj b/Strategic/Strategic_VS2010.vcxproj deleted file mode 100644 index 87c89ffe..00000000 --- a/Strategic/Strategic_VS2010.vcxproj +++ /dev/null @@ -1,315 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - Win32Proj - Strategic - Strategic - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Strategic/Strategic_VS2010.vcxproj.filters b/Strategic/Strategic_VS2010.vcxproj.filters deleted file mode 100644 index 31cd0018..00000000 --- a/Strategic/Strategic_VS2010.vcxproj.filters +++ /dev/null @@ -1,366 +0,0 @@ - - - - - {e965b12d-833b-4ed2-b5fe-b519e2d661e3} - - - {7fc727d5-3708-404e-8267-410283203b63} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Strategic/Strategic_VS2013.vcxproj b/Strategic/Strategic_VS2013.vcxproj deleted file mode 100644 index 5f7c1038..00000000 --- a/Strategic/Strategic_VS2013.vcxproj +++ /dev/null @@ -1,335 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - Win32Proj - Strategic - Strategic - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Strategic/Strategic_VS2013.vcxproj.filters b/Strategic/Strategic_VS2013.vcxproj.filters deleted file mode 100644 index f5758499..00000000 --- a/Strategic/Strategic_VS2013.vcxproj.filters +++ /dev/null @@ -1,366 +0,0 @@ - - - - - {e965b12d-833b-4ed2-b5fe-b519e2d661e3} - - - {7fc727d5-3708-404e-8267-410283203b63} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Strategic/Strategic_VS2017.vcxproj b/Strategic/Strategic_VS2017.vcxproj deleted file mode 100644 index 0995eb00..00000000 --- a/Strategic/Strategic_VS2017.vcxproj +++ /dev/null @@ -1,336 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - Win32Proj - Strategic - Strategic - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Strategic/Strategic_VS2019.vcxproj b/Strategic/Strategic_VS2019.vcxproj deleted file mode 100644 index c87d17eb..00000000 --- a/Strategic/Strategic_VS2019.vcxproj +++ /dev/null @@ -1,513 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - Win32Proj - Strategic - Strategic - 10.0 - - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - CppCoreCheckConstRules.ruleset - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Strategic/Town Militia.cpp b/Strategic/Town Militia.cpp index 5ec21b59..feaf4aed 100644 --- a/Strategic/Town Militia.cpp +++ b/Strategic/Town Militia.cpp @@ -1,9 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "GameSettings.h" -#else #include "Town Militia.h" #include "Militia Control.h" #include "Campaign Types.h" @@ -35,7 +31,6 @@ #include "Campaign.h" // added by Flugente #include "message.h" // added by Flugente #include "Rebel Command.h" -#endif // HEADROCK HAM 3: include these files so that a militia trainer's Effective Leadership can be determined. Used // to determine the number of militia trained by this merc per session. In the future may also determine QUALITY @@ -279,7 +274,7 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa if( ubTownId == BLANK_SECTOR ) { - Assert( IsThisSectorASAMSector( sMapX, sMapY, 0 ) ); + Assert( IsThisSectorASAMSector( sMapX, sMapY, 0 ) || RebelCommand::CanTrainMilitiaAnywhere() ); } // force tactical to update militia status @@ -1293,7 +1288,7 @@ BOOLEAN IsSAMSiteFullOfMilitia( INT16 sSectorX, INT16 sSectorY, INT8 iMilitiaTyp INT32 iMaxMilitiaPerSector = gGameExternalOptions.iMaxMilitiaPerSector; DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia5"); // check if SAM site is ours? - fSamSitePresent = IsThisSectorASAMSector( sSectorX, sSectorY, 0 ); + fSamSitePresent = IsThisSectorASAMSector(sSectorX, sSectorY, 0) || RebelCommand::CanTrainMilitiaAnywhere(); if( fSamSitePresent == FALSE ) { diff --git a/Strategic/XML_Army.cpp b/Strategic/XML_Army.cpp index f04dfb2a..4eb96567 100644 --- a/Strategic/XML_Army.cpp +++ b/Strategic/XML_Army.cpp @@ -1,16 +1,11 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include #include "XML.h" #include "Strategic AI.h" #include "expat.h" #include "Campaign Types.h" #include "Debug Control.h" -#endif #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/XML_Bloodcats.cpp b/Strategic/XML_Bloodcats.cpp index d1faa1a7..c0d26715 100644 --- a/Strategic/XML_Bloodcats.cpp +++ b/Strategic/XML_Bloodcats.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "builddefines.h" #include #include "XML.h" @@ -12,7 +8,6 @@ #include "MemMan.h" #include "Debug Control.h" #include "mapscreen.h" -#endif #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/XML_CoolnessBySector.cpp b/Strategic/XML_CoolnessBySector.cpp index a51acb8c..e53b7d8e 100644 --- a/Strategic/XML_CoolnessBySector.cpp +++ b/Strategic/XML_CoolnessBySector.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "builddefines.h" #include #include "XML.h" @@ -12,7 +8,6 @@ #include "MemMan.h" #include "Debug Control.h" #include "mapscreen.h" -#endif #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/XML_Creatures.cpp b/Strategic/XML_Creatures.cpp index 9fb161d4..d0b482f2 100644 --- a/Strategic/XML_Creatures.cpp +++ b/Strategic/XML_Creatures.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - -#else #include "expat.h" #include "string.h" #include "Campaign Types.h" @@ -9,7 +5,6 @@ #include "MemMan.h" #include "Debug Control.h" #include "Creature Spreading.h" -#endif // Buggler: creature XML externalization stuff #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/XML_Facilities.cpp b/Strategic/XML_Facilities.cpp index 630b4e8d..84fcb759 100644 --- a/Strategic/XML_Facilities.cpp +++ b/Strategic/XML_Facilities.cpp @@ -8,9 +8,6 @@ // /////////////////////////////////////////////////////////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -18,7 +15,6 @@ #include "XML.h" #include "FileMan.h" #include "Campaign Types.h" -#endif FACILITYLOCATIONS gFacilityLocations[256][MAX_NUM_FACILITY_TYPES]; UINT16 NUM_FACILITIES; diff --git a/Strategic/XML_FacilityTypes.cpp b/Strategic/XML_FacilityTypes.cpp index 4997aa84..33468d38 100644 --- a/Strategic/XML_FacilityTypes.cpp +++ b/Strategic/XML_FacilityTypes.cpp @@ -9,9 +9,6 @@ // /////////////////////////////////////////////////////////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -20,7 +17,6 @@ #include "FileMan.h" #include "Campaign Types.h" #include "Facilities.h" -#endif FACILITYTYPE gFacilityTypes[ MAX_NUM_FACILITY_TYPES ]; UINT16 NUM_FACILITY_TYPES = 0; diff --git a/Strategic/XML_Minerals.cpp b/Strategic/XML_Minerals.cpp index eb2b101b..70d72c0f 100644 --- a/Strategic/XML_Minerals.cpp +++ b/Strategic/XML_Minerals.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Map Screen Interface Map.h" -#endif struct { diff --git a/Strategic/XML_SectorNames.cpp b/Strategic/XML_SectorNames.cpp index 25e3d385..f44e6a72 100644 --- a/Strategic/XML_SectorNames.cpp +++ b/Strategic/XML_SectorNames.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "builddefines.h" #include #include "XML.h" @@ -12,7 +8,6 @@ #include "MemMan.h" #include "Debug Control.h" #include "mapscreen.h" -#endif #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/XML_SquadNames.cpp b/Strategic/XML_SquadNames.cpp index 1225da6d..d41cd8bc 100644 --- a/Strategic/XML_SquadNames.cpp +++ b/Strategic/XML_SquadNames.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Map Screen Interface.h" #include "overhead.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Strategic/XML_UniformColors.cpp b/Strategic/XML_UniformColors.cpp index 0b1064db..442e1312 100644 --- a/Strategic/XML_UniformColors.cpp +++ b/Strategic/XML_UniformColors.cpp @@ -8,10 +8,6 @@ ////////////////////////////////////////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "XML.h" -#else #include "builddefines.h" #include #include "XML.h" @@ -22,7 +18,6 @@ #include "MemMan.h" #include "Debug Control.h" #include "mapscreen.h" -#endif #define MAX_CHAR_DATA_LENGTH 500 diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 878484be..f9f38729 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" - #include "HelpScreen.h" -#else #include "mapscreen.h" #include #include @@ -115,7 +111,6 @@ #include "Food.h" // added by Flugente #include "Drugs And Alcohol.h" // added by Flugente #include "WordWrap.h" -#endif #include "connect.h" //hayden #include "InterfaceItemImages.h" @@ -2408,7 +2403,8 @@ void DrawCharBars( void ) if( ( pSoldier->stats.bLife == 0 ) || ( pSoldier->bAssignment == ASSIGNMENT_DEAD ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) || - ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) ) + ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { return; } @@ -2826,7 +2822,7 @@ void DrawCharHealth( INT16 sCharNum ) pSoldier = &Menptr[gCharactersList[sCharNum].usSolID]; - if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) + if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) { // find starting X coordinate by centering all 3 substrings together, then print them separately (different colors)! swprintf( sString, L"%d/%d", pSoldier->stats.bLife, pSoldier->stats.bLifeMax ); @@ -4953,7 +4949,7 @@ UINT32 MapScreenHandle(void) VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; if (!is_networked) { - if (iResolution == _1280x720) + if (isWidescreenUI()) { FilenameForBPP("INTERFACE\\newgoldpiece3_1280x720.sti", VObjectDesc.ImageFile); } @@ -4973,7 +4969,7 @@ UINT32 MapScreenHandle(void) else { // OJW - 20081204 - change mapscreen interface for MP games - if (iResolution == _1280x720) + if (isWidescreenUI()) { FilenameForBPP("INTERFACE\\mpgoldpiece3_1280x720.sti", VObjectDesc.ImageFile); } @@ -5716,7 +5712,7 @@ UINT32 MapScreenHandle(void) HandleCharBarRender( ); } - if( fShowInventoryFlag || fDisableDueToBattleRoster ) + if( (fShowInventoryFlag && !isWidescreenUI()) || fDisableDueToBattleRoster ) { for( iCounter = 0; iCounter < MAX_SORT_METHODS; iCounter++ ) { @@ -11332,7 +11328,7 @@ void TeamListInfoRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason ) fPlotForMilitia = FALSE; // if not dead or POW, select his sector - if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ))//&& !SPY_LOCATION( pSoldier->bAssignment ) ) + if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && ( pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) )//&& !SPY_LOCATION( pSoldier->bAssignment ) ) { ChangeSelectedMapSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ); } @@ -11388,7 +11384,7 @@ void TeamListInfoRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason ) fPlotForMilitia = FALSE; // if not dead or POW, select his sector - if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && !SPY_LOCATION( pSoldier->bAssignment ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) ) + if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && !SPY_LOCATION( pSoldier->bAssignment ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { ChangeSelectedMapSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ); } @@ -11571,7 +11567,7 @@ void TeamListAssignmentRegionBtnCallBack(MOUSE_REGION *pRegion, INT32 iReason ) fShownAssignmentMenu = FALSE; // if not dead or POW, select his sector - if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) ) + if( ( pSoldier->stats.bLife > 0 ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { ChangeSelectedMapSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ); } @@ -15119,6 +15115,7 @@ BOOLEAN MapCharacterHasAccessibleInventory( INT16 bCharNumber ) if( ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) || // Kaiden: Vehicle Inventory change - Commented the following line // ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) || // And added this instead: @@ -15307,7 +15304,7 @@ BOOLEAN CanChangeSleepStatusForSoldier( SOLDIERTYPE *pSoldier ) // if a vehicle, robot, in transit, or a POW if( ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) || AM_A_ROBOT( pSoldier ) || - ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) ) + ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) ) { // can't change the sleep status of such mercs return ( FALSE ); @@ -15675,6 +15672,7 @@ void ChangeSelectedInfoChar( INT16 bCharNumber, BOOLEAN fResetSelectedList ) } fCharacterInfoPanelDirty = TRUE; + fResetMapCoords = TRUE; // if showing sector inventory if ( fShowMapInventoryPool ) @@ -15860,7 +15858,7 @@ INT16 CalcLocationValueForChar( INT32 iCounter ) pSoldier = MercPtrs[ gCharactersList[ iCounter ].usSolID ]; // don't reveal location of POWs! - if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) + if( pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) { sLocValue = SECTOR( pSoldier->sSectorX, pSoldier->sSectorY ); // underground: add 1000 per sublevel @@ -15954,6 +15952,7 @@ BOOLEAN AnyMovableCharsInOrBetweenThisSector( INT16 sSectorX, INT16 sSectorY, IN SPY_LOCATION( pSoldier->bAssignment ) || ( pSoldier->bAssignment == ASSIGNMENT_DEAD ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) || ( pSoldier->stats.bLife == 0 ) ) { continue; @@ -16558,6 +16557,11 @@ void GetMapscreenMercLocationString( SOLDIERTYPE *pSoldier, CHAR16 sString[] ) // mini event - unknown location, use the same string as POWs swprintf( sString, L"%s", pPOWStrings[ 1 ] ); } + else if (pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + { + // on a rebel command mission + swprintf( sString, L"%s%s*", pMapVertIndex[pSoldier->sSectorY], pMapHortIndex[pSoldier->sSectorX] ); + } else if ( SPY_LOCATION( pSoldier->bAssignment ) ) { swprintf( pTempString, L"%s%s%s", @@ -16598,6 +16602,7 @@ void GetMapscreenMercDestinationString( SOLDIERTYPE *pSoldier, CHAR16 sString[] if( ( pSoldier->bAssignment == ASSIGNMENT_DEAD ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) || ( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) || + ( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) || SPY_LOCATION( pSoldier->bAssignment ) || ( pSoldier->stats.bLife == 0 ) ) { @@ -17968,4 +17973,4 @@ void initMapViewAndBorderCoordinates(void) UI_MAP.HeliETA.Upper_Popup_Y = (50 + iScreenHeightOffset - 100); UI_MAP.HeliETA.Alternate_Height = 97; } -} \ No newline at end of file +} diff --git a/Strategic/strategic town reputation.cpp b/Strategic/strategic town reputation.cpp index 2b7294c9..06cc6a74 100644 --- a/Strategic/strategic town reputation.cpp +++ b/Strategic/strategic town reputation.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "types.h" #include "strategic town reputation.h" #include "soldier profile type.h" @@ -11,7 +8,6 @@ #include "strategic town loyalty.h" #include "Debug.h" #include "message.h" -#endif // init for town reputation at game start diff --git a/Strategic/strategic.cpp b/Strategic/strategic.cpp index ac89cc8c..09513662 100644 --- a/Strategic/strategic.cpp +++ b/Strategic/strategic.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Strategic All.h" -#else #include "Strategic.h" #include "Types.h" #include "Squads.h" @@ -21,7 +18,6 @@ #include "message.h" // added by Flugente #include "Text.h" // added by Flugente #include "Queen Command.h" // added by Flugente -#endif #ifdef JA2UB #else diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index 47083f91..0b4431e8 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -1,11 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS -#include "Strategic All.h" -#include "Loading Screen.h" -#include "Enemy Soldier Save.h" -#include "points.h" -#else #include "strategicmap.h" #include "strategic.h" #include "Strategic Mines.h" @@ -104,7 +98,6 @@ #include "Auto Resolve.h" #include "cursors.h" #include "GameVersion.h" -#endif #include "LuaInitNPCs.h" #include "Luaglobal.h" @@ -2222,7 +2215,7 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) // GridNo = NOWHERE, which causes this assertion to fail //CHRISL: There's also an issue with vehicles. Soldiers in any vehicle are considered to be in sGridNo = NOWHERE // This will result in an assertion error, so let's skip the assertion if the merc is assigned to a vehicle - if ( !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE && !SPY_LOCATION( MercPtrs[i]->bAssignment ) ) + if (!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE && !SPY_LOCATION(MercPtrs[i]->bAssignment) && MercPtrs[i]->bAssignment != ASSIGNMENT_POW) { //Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || MercPtrs[i]->sGridNo != NOWHERE || MercPtrs[i]->bVehicleID == iHelicopterVehicleId ); Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || !TileIsOutOfBounds( MercPtrs[i]->sGridNo ) || MercPtrs[i]->bVehicleID == iHelicopterVehicleId ); @@ -2272,7 +2265,7 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) // GridNo = NOWHERE, which causes this assertion to fail //CHRISL: There's also an issue with vehicles. Soldiers in any vehicle are considered to be in sGridNo = NOWHERE // This will result in an assertion error, so let's skip the assertion if the merc is assigned to a vehicle - if ( !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE ) + if (!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE && MercPtrs[i]->bAssignment != ASSIGNMENT_POW) { //Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || MercPtrs[i]->sGridNo != NOWHERE || MercPtrs[i]->bVehicleID == iHelicopterVehicleId ); Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || !TileIsOutOfBounds( MercPtrs[i]->sGridNo ) || MercPtrs[i]->bVehicleID == iHelicopterVehicleId ); @@ -3297,23 +3290,9 @@ void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) } // ATE: Call actions based on what POW we are on... - if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTINPROGRESS ) - { - // Complete quest - EndQuest( QUEST_HELD_IN_ALMA, sSectorX, sSectorY ); - - // Do action - HandleNPCDoAction( 0, NPC_ACTION_GRANT_EXPERIENCE_3, 0 ); - } #ifndef JA2UB - else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS) - { - // Complete quest - EndQuest(QUEST_HELD_IN_TIXA, sSectorX, sSectorY); - - // Do action - HandleNPCDoAction(0, NPC_ACTION_GRANT_EXPERIENCE_3, 0); - } + HandlePOWQuestState(Q_END, QUEST_HELD_IN_ALMA, sSectorX, sSectorY, bSectorZ); + HandlePOWQuestState(Q_END, QUEST_HELD_IN_TIXA, sSectorX, sSectorY, bSectorZ); #endif } } @@ -4308,6 +4287,68 @@ void JumpIntoAdjacentSector( UINT8 ubTacticalDirection, UINT8 ubJumpCode, INT32 } } +void JumpIntoEscapedSector(UINT8 ubTacticalDirection) +{ + // Remove any incapacitated mercs from current squads and assign them to new squad + UINT32 i = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 const lastID = gTacticalStatus.Team[gbPlayerNum].bLastID; + INT8 currentSquad = -1; + + for (SOLDIERTYPE* pSoldier = MercPtrs[i]; i <= lastID; ++i, ++pSoldier) + { + // Are we not active in sector + if (!pSoldier->bActive || !pSoldier->bInSector || pSoldier->stats.bLife >= OKLIFE) + { + continue; + } + if (currentSquad == -1) + { + currentSquad = AddCharacterToUniqueSquad(pSoldier); + continue; + } + if (!AddCharacterToSquad(pSoldier, currentSquad)) + { + currentSquad = AddCharacterToUniqueSquad(pSoldier); + } + } + + // Retreat squads that are capable of it + for (size_t i = 0; i < NUMBER_OF_SQUADS; i++) + { + for (size_t j = 0; j < NUMBER_OF_SOLDIERS_PER_SQUAD; j++) + { + SOLDIERTYPE* pSoldier = Squad[i][j]; + if (pSoldier && OK_CONTROLLABLE_MERC(pSoldier)) + { + GROUP* pGroup = GetGroup(pSoldier->ubGroupID); + switch (ubTacticalDirection) + { + case NORTH: + pGroup->ubPrevX = pGroup->ubSectorX; + pGroup->ubPrevY = pGroup->ubSectorY - 1; + break; + case EAST: + pGroup->ubPrevX = pGroup->ubSectorX + 1; + pGroup->ubPrevY = pGroup->ubSectorY; + break; + case SOUTH: + pGroup->ubPrevX = pGroup->ubSectorX; + pGroup->ubPrevY = pGroup->ubSectorY + 1; + break; + case WEST: + pGroup->ubPrevX = pGroup->ubSectorX - 1; + pGroup->ubPrevY = pGroup->ubSectorY; + break; + default: + break; + } + + RetreatGroupToPreviousSector(pGroup); + break; + } + } + } +} void HandleSoldierLeavingSectorByThemSelf( SOLDIERTYPE *pSoldier ) { @@ -4368,17 +4409,7 @@ void AllMercsWalkedToExitGrid( ) (gubAdjacentJumpCode == JUMP_ALL_LOAD_NEW || gubAdjacentJumpCode == JUMP_SINGLE_LOAD_NEW) ) { HandleLoyaltyImplicationsOfMercRetreat( RETREAT_TACTICAL_TRAVERSAL, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ); - - // End inetrrogation quest if we left the sector, but haven't killed all enemies - if ( gWorldSectorX == 7 && gWorldSectorY == 14 && gbWorldSectorZ == 0 && gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS ) - { - // Finish quest, although not give points here... - InternalEndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, FALSE ); - // ... give them manually, but halved - GiveQuestRewardPoint( gWorldSectorX, gWorldSectorY, 4, NO_PROFILE ); - // Also get us know, we finished the quest - ResetHistoryFact( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY ); - } + HandlePOWQuestState(Q_END, QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); } //////////////////////////////////////////////////////////////////////////////////////// @@ -4546,17 +4577,7 @@ void AllMercsHaveWalkedOffSector( ) (gubAdjacentJumpCode == JUMP_ALL_LOAD_NEW || gubAdjacentJumpCode == JUMP_SINGLE_LOAD_NEW) ) { HandleLoyaltyImplicationsOfMercRetreat( RETREAT_TACTICAL_TRAVERSAL, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ); - - // End inetrrogation quest if we left the sector, but haven't killed all enemies - if ( gWorldSectorX == 7 && gWorldSectorY == 14 && gbWorldSectorZ == 0 && gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS ) - { - // Finish quest, although not give points here... - InternalEndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, FALSE ); - // ... give them manually, but halved - GiveQuestRewardPoint( gWorldSectorX, gWorldSectorY, 4, NO_PROFILE ); - // Also get us know, we finished the quest - ResetHistoryFact( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY ); - } + HandlePOWQuestState(Q_END, QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); } //////////////////////////////////////////////////////////////////////////////////////// } @@ -5229,7 +5250,7 @@ BOOLEAN CanGoToTacticalInSector( INT16 sX, INT16 sY, UINT8 ubZ ) { // ARM: now allows loading of sector with all mercs below OKLIFE as long as they're alive if( ( pSoldier->bActive && pSoldier->stats.bLife ) && !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) && - ( pSoldier->bAssignment != IN_TRANSIT ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && + ( pSoldier->bAssignment != IN_TRANSIT ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) && ( pSoldier->bAssignment != ASSIGNMENT_MINIEVENT ) && ( pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND ) && ( pSoldier->bAssignment != ASSIGNMENT_DEAD ) && !SoldierAboardAirborneHeli( pSoldier ) ) @@ -6402,7 +6423,7 @@ void HandleSlayDailyEvent( void ) } // valid soldier? - if ( (pSoldier->bActive == FALSE) || (pSoldier->stats.bLife == 0) || (pSoldier->bAssignment == IN_TRANSIT) || (pSoldier->bAssignment == ASSIGNMENT_POW) || (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT) ) + if ( (pSoldier->bActive == FALSE) || (pSoldier->stats.bLife == 0) || (pSoldier->bAssignment == IN_TRANSIT) || (pSoldier->bAssignment == ASSIGNMENT_POW) || (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT) || (pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) ) { // no return; @@ -6928,6 +6949,47 @@ BOOLEAN EscapeDirectionIsValid( INT8 * pbDirection ) } return(*pbDirection != -1); } + +bool IsEscapeDirectionValid(WorldDirections pbDirection) +{ + bool isValid = false; + UINT8 const ubSectorID = SECTOR(gWorldSectorX, gWorldSectorY); + + switch (pbDirection) + { + case NORTH: + if (!(gWorldSectorY - 1 < MINIMUM_VALID_Y_COORDINATE || gMapInformation.sNorthGridNo == NOWHERE || + SectorInfo[ubSectorID].ubTraversability[NORTH_STRATEGIC_MOVE] == GROUNDBARRIER || SectorInfo[ubSectorID].ubTraversability[NORTH_STRATEGIC_MOVE] == EDGEOFWORLD)) + { + isValid = true; + } + break; + case EAST: + if (!(gWorldSectorX + 1 > MAXIMUM_VALID_X_COORDINATE || gMapInformation.sEastGridNo == NOWHERE || + SectorInfo[ubSectorID].ubTraversability[EAST_STRATEGIC_MOVE] == GROUNDBARRIER || SectorInfo[ubSectorID].ubTraversability[EAST_STRATEGIC_MOVE] == EDGEOFWORLD)) + { + isValid = true; + } + break; + case SOUTH: + if (!(gWorldSectorY + 1 > MAXIMUM_VALID_Y_COORDINATE || gMapInformation.sSouthGridNo == NOWHERE || + SectorInfo[ubSectorID].ubTraversability[SOUTH_STRATEGIC_MOVE] == GROUNDBARRIER || SectorInfo[ubSectorID].ubTraversability[SOUTH_STRATEGIC_MOVE] == EDGEOFWORLD)) + { + isValid = true; + } + break; + case WEST: + if (!(gWorldSectorX - 1 < MINIMUM_VALID_X_COORDINATE || gMapInformation.sWestGridNo == NOWHERE || + SectorInfo[ubSectorID].ubTraversability[WEST_STRATEGIC_MOVE] == GROUNDBARRIER || SectorInfo[ubSectorID].ubTraversability[WEST_STRATEGIC_MOVE] == EDGEOFWORLD)) + { + isValid = true; + } + break; + } + + return isValid; +} + #ifdef JA2UB @@ -7975,4 +8037,4 @@ UINT8 tryToRecoverSquadsAndMovementGroups(SOLDIERTYPE* pCharacter) { } CheckSquadMovementGroups(); return GetSoldierGroupId(pCharacter); -} \ No newline at end of file +} diff --git a/Strategic/strategicmap.h b/Strategic/strategicmap.h index 2bbffc8f..e43191c5 100644 --- a/Strategic/strategicmap.h +++ b/Strategic/strategicmap.h @@ -119,7 +119,7 @@ void GetMapFileName(INT16 sMapX,INT16 sMapY, INT8 bSectorZ, STR8 bString, BOOLEA // Called from within tactical..... void JumpIntoAdjacentSector( UINT8 ubDirection, UINT8 ubJumpCode, INT32 sAdditionalData );//dnl ch56 151009 - +void JumpIntoEscapedSector(UINT8 ubTacticalDirection); BOOLEAN CanGoToTacticalInSector( INT16 sX, INT16 sY, UINT8 ubZ ); @@ -207,6 +207,7 @@ BOOLEAN HandlePotentialBringUpAutoresolveToFinishBattle( int pSectorX, int pSect BOOLEAN MapExists( UINT8 * szFilename ); BOOLEAN EscapeDirectionIsValid( INT8 * pbDirection ); +bool IsEscapeDirectionValid(WorldDirections pbDirection); //Used for determining the type of error message that comes up when you can't traverse to //an adjacent sector. THESE VALUES DO NOT NEED TO BE SAVED! extern BOOLEAN gfInvalidTraversal; @@ -235,4 +236,4 @@ BOOLEAN CanRequestMilitiaReinforcements( INT16 sMapX, INT16 sMapY, INT16 sSrcMap // Bob: check and try to fix issues with squad and group assignment UINT8 tryToRecoverSquadsAndMovementGroups(SOLDIERTYPE* pCharacter); -#endif \ No newline at end of file +#endif diff --git a/Sys Globals.cpp b/Sys Globals.cpp index b2eeca5a..53c710e5 100644 --- a/Sys Globals.cpp +++ b/Sys Globals.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "builddefines.h" #include #include @@ -9,7 +6,6 @@ #include "screenids.h" #include "Sys Globals.h" #include "gameloop.h" -#endif // External globals diff --git a/Tactical/Air Raid.cpp b/Tactical/Air Raid.cpp index 9ecf6bb1..dfbc74fb 100644 --- a/Tactical/Air Raid.cpp +++ b/Tactical/Air Raid.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" -#else #include "sgp.h" #include "air raid.h" #include "game event hook.h" @@ -31,7 +27,6 @@ #include "Map screen helicopter.h" #include "structure wrap.h" #include "meanwhile.h" -#endif #include "GameInitOptionsScreen.h" diff --git a/Tactical/Animation Cache.cpp b/Tactical/Animation Cache.cpp index 8c7bc330..ec30ff95 100644 --- a/Tactical/Animation Cache.cpp +++ b/Tactical/Animation Cache.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include @@ -12,7 +9,6 @@ #include "Animation Data.h" #include "Animation Control.h" #include "Debug Control.h" -#endif #define EMPTY_CACHE_ENTRY 65000 diff --git a/Tactical/Animation Control.cpp b/Tactical/Animation Control.cpp index dfc19982..d24eb88d 100644 --- a/Tactical/Animation Control.cpp +++ b/Tactical/Animation Control.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -18,7 +15,6 @@ #include "Debug Control.h" #include "Random.h" #include "Soldier Control.h" -#endif #include "connect.h" diff --git a/Tactical/Animation Data.cpp b/Tactical/Animation Data.cpp index 63cd8310..7cd94389 100644 --- a/Tactical/Animation Data.cpp +++ b/Tactical/Animation Data.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -17,7 +14,6 @@ #include "utilities.h" #include "worlddef.h" #include "Fileman.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Tactical/Arms Dealer Init.cpp b/Tactical/Arms Dealer Init.cpp index 7c5dd899..4e5341db 100644 --- a/Tactical/Arms Dealer Init.cpp +++ b/Tactical/Arms Dealer Init.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Types.h" #include "stdlib.h" #include "Arms Dealer Init.h" @@ -19,7 +16,6 @@ #include "GameSettings.h" #include "Overhead.h" // added by Flugente for MercPtrs[] #include "LuaInitNPCs.h" // added by Flugente -#endif #ifdef JA2UB #include "Explosion Control.h" @@ -49,58 +45,6 @@ void RemoveNonIntelItems(); UINT8 gubLastSpecialItemAddedAtElement = 255; // Flugente 2012-12-19: merchant data has been externalised - see XML_Merchants.cpp -#if 0 -// THIS STRUCTURE HAS UNCHANGING INFO THAT DOESN'T GET SAVED/RESTORED/RESET -// TODO: externalize -const ARMS_DEALER_INFO DefaultarmsDealerInfo[ NUM_ARMS_DEALERS ] = -{ - //Buying Selling Merc ID# Type Initial Flags - //Price Price Of Cash - //Modifier Modifier Dealer - -/* Tony */ { 0.75f, 1.25f, TONY, ARMS_DEALER_BUYS_SELLS, 15000, ARMS_DEALER_SOME_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE, 15000, 15000, 0, 1, 10, 1, 10, 2, 3, false, false }, -/* Franz Hinkle */ { 1.0f, 1.5f, FRANZ, ARMS_DEALER_BUYS_SELLS, 5000, ARMS_DEALER_SOME_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE, 5000, 5000, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Keith Hemps */ { 0.75f, 1.0f, KEITH, ARMS_DEALER_BUYS_SELLS, 1500, ARMS_DEALER_ONLY_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE, 1500, 1500, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Jake Cameron */ { 0.8f, 1.1f, JAKE, ARMS_DEALER_BUYS_SELLS, 2500, ARMS_DEALER_ONLY_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE, 2500, 2500, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Gabby Mulnick*/ { 1.0f, 1.0f, GABBY, ARMS_DEALER_BUYS_SELLS, 3000, ARMS_DEALER_GIVES_CHANGE , 3000, 3000, 0, 1, 10, 0, 100, 1, 2, false, true }, - -#ifdef JA2UB -/* Devin Connell*/ //ja25 ub Biggins//{ 0.75f, 1.25f, DEVIN, ARMS_DEALER_SELLS_ONLY, 5000, ARMS_DEALER_GIVES_CHANGE , 5000, 5000, 0, 3, 10, 0, 10, 2, 3, false, false }, -#else -/* Devin Connell*/ { 0.75f, 1.25f, DEVIN, ARMS_DEALER_SELLS_ONLY, 5000, ARMS_DEALER_GIVES_CHANGE , 5000, 5000, 0, 3, 10, 0, 10, 2, 3, false, false }, -#endif - -/* Howard Filmore*/ { 1.0f, 1.0f, HOWARD, ARMS_DEALER_SELLS_ONLY, 3000, ARMS_DEALER_GIVES_CHANGE , 3000, 3000, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Sam Rozen */ { 1.0f, 1.0f, SAM, ARMS_DEALER_SELLS_ONLY, 3000, ARMS_DEALER_GIVES_CHANGE , 3000, 3000, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Frank */ { 1.0f, 1.0f, FRANK, ARMS_DEALER_SELLS_ONLY, 500, ARMS_DEALER_ACCEPTS_GIFTS , 500, 500, 0, 1, 10, 0, 100, 1, 2, false, true }, - -/* Bar Bro 1 */ { 1.0f, 1.0f, HERVE, ARMS_DEALER_SELLS_ONLY, 250, ARMS_DEALER_ACCEPTS_GIFTS , 250, 250, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Bar Bro 2 */ { 1.0f, 1.0f, PETER, ARMS_DEALER_SELLS_ONLY, 250, ARMS_DEALER_ACCEPTS_GIFTS , 250, 250, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Bar Bro 3 */ { 1.0f, 1.0f, ALBERTO, ARMS_DEALER_SELLS_ONLY, 250, ARMS_DEALER_ACCEPTS_GIFTS , 250, 250, 0, 1, 10, 0, 100, 1, 2, false, true }, -/* Bar Bro 4 */ { 1.0f, 1.0f, CARLO, ARMS_DEALER_SELLS_ONLY, 250, ARMS_DEALER_ACCEPTS_GIFTS , 250, 250, 0, 1, 10, 0, 100, 1, 2, false, true }, - -/* Micky O'Brien*/ { 1.0f, 1.4f, MICKY, ARMS_DEALER_BUYS_ONLY, 10000, ARMS_DEALER_HAS_NO_INVENTORY | ARMS_DEALER_GIVES_CHANGE, 10000, 10000, 0, 1, 10, 1, 10, 1, 2, false, true }, - - //Repair Repair - //Speed Cost -/* Arnie Brunzwell*/{ 0.1f, 0.8f, ARNIE, ARMS_DEALER_REPAIRS, 1500, ARMS_DEALER_HAS_NO_INVENTORY | ARMS_DEALER_GIVES_CHANGE, 1500, 1500, 0, 1, 10, 1, 10, 1, 2, false, true }, -/* Fredo */ { 0.6f, 0.6f, FREDO, ARMS_DEALER_REPAIRS, 1000, ARMS_DEALER_HAS_NO_INVENTORY | ARMS_DEALER_GIVES_CHANGE, 1000, 1000, 0, 1, 10, 1, 10, 1, 2, false, true }, -#ifdef JA2UB -/* Raul */ { 0.80f, 1.8f, PERKO, ARMS_DEALER_BUYS_SELLS, 20000, ARMS_DEALER_SOME_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE , 1000, 1000, 0, 1, 10, 1, 10, 1, 2, false, true }, -#else -/* Perko */ { 1.0f, 0.4f, PERKO, ARMS_DEALER_REPAIRS, 1000, ARMS_DEALER_HAS_NO_INVENTORY | ARMS_DEALER_GIVES_CHANGE, 1000, 1000, 0, 1, 10, 1, 10, 1, 2, false, true }, -#endif - -/* Elgin */ { 1.0f, 1.0f, DRUGGIST, ARMS_DEALER_SELLS_ONLY, 500, ARMS_DEALER_ACCEPTS_GIFTS , 500, 500, 0, 1, 10, 1, 10, 1, 2, false, true }, -/* Manny */ { 1.0f, 1.0f, MANNY, ARMS_DEALER_SELLS_ONLY, 500, ARMS_DEALER_ACCEPTS_GIFTS , 500, 500, 0, 1, 10, 1, 10, 1, 2, false, true }, - -#ifdef JA2UB -/* Betty */ { 0.75f, 1.25f, 73, ARMS_DEALER_BUYS_SELLS, 10000, ARMS_DEALER_SOME_USED_ITEMS | ARMS_DEALER_GIVES_CHANGE , 1000, 1000, 0, 1, 10, 1, 10, 1, 2, false, true }, -#endif - - -}; -#endif std::vector armsDealerInfo (NUM_ARMS_DEALERS); @@ -507,8 +451,8 @@ void DailyCheckOnItemQuantities() if( armsDealerInfo[ ubArmsDealer ].uiFlags & ARMS_DEALER_HAS_NO_INVENTORY ) continue; - int numTotalItems[MAXITEMS] = { 0 }; - bool itemsAreOnOrder[MAXITEMS] = { false }; + std::map< UINT16, UINT16> numTotalItems; + std::set itemsAreOnOrder; for (DealerItemList::iterator iter = gArmsDealersInventory[ ubArmsDealer ].begin(); iter != gArmsDealersInventory[ ubArmsDealer ].end(); ++iter) { if (iter->object.exists() == true) @@ -519,7 +463,7 @@ void DailyCheckOnItemQuantities() } else { - itemsAreOnOrder[iter->object.usItem] = true; + itemsAreOnOrder.insert(iter->object.usItem); //and today is the day the items come in if( iter->uiOrderArrivalTime >= GetWorldDay() ) @@ -546,18 +490,23 @@ void DailyCheckOnItemQuantities() if( CanDealerTransactItem( ubArmsDealer, usItemIndex, FALSE ) ) { //if there are no items on order - if ( itemsAreOnOrder[ usItemIndex ] == false ) + if ( itemsAreOnOrder.count( usItemIndex ) == 0 ) { ubMaxSupply = GetDealersMaxItemAmount( ubArmsDealer, usItemIndex ); - + UINT16 halfSupply = (UINT16)(ubMaxSupply / 2); + UINT16 itemsInStock = 0; + if ( numTotalItems.count(usItemIndex) > 0 ) + { + itemsInStock = numTotalItems[usItemIndex]; + } //if the qty on hand is half the desired amount or fewer - if( numTotalItems[ usItemIndex ] <= (INT32)( ubMaxSupply / 2 ) ) + if( itemsInStock <= halfSupply ) { //determine if the item can be restocked (assume new, use items aren't checked for until the stuff arrives) if (ItemTransactionOccurs( ubArmsDealer, usItemIndex, DEALER_BUYING, FALSE )) { // figure out how many items to reorder (items are reordered an entire batch at a time) - ubNumItems = HowManyItemsToReorder( ubMaxSupply, numTotalItems[ usItemIndex ] ); + ubNumItems = HowManyItemsToReorder( ubMaxSupply, itemsInStock); #ifdef JA2UB //if the dealer is betty, and we are to ADD the stuff instantly if( ubArmsDealer == ARMS_DEALER_BETTY && fInstallyHaveItemsAppear && @@ -778,10 +727,7 @@ void LimitArmsDealersInventory( UINT8 ubArmsDealer, UINT32 uiDealerItemType, UIN if( gArmsDealerStatus[ ubArmsDealer ].fOutOfBusiness ) return; - //ADB, ya, a whole 1 line of extra code! - // not permitted for repair dealers - would take extra code to avoid counting items under repair! - //Assert( !DoesDealerDoRepairs( ubArmsDealer ) ); - int numTotalItems[MAXITEMS] = { 0 }; + std::map< UINT16, UINT16> numTotalItems; for (DealerItemList::iterator iter = gArmsDealersInventory[ ubArmsDealer ].begin(); iter != gArmsDealersInventory[ ubArmsDealer ].end(); ++iter) { if (iter->ItemIsInInventory() == true && iter->IsUnderRepair() == false) { numTotalItems[iter->object.usItem] += iter->object.ubNumberOfObjects; @@ -798,7 +744,7 @@ void LimitArmsDealersInventory( UINT8 ubArmsDealer, UINT32 uiDealerItemType, UIN for ( usItemIndex = 1; usItemIndex < gMAXITEMS_READ; ++usItemIndex ) { //if there is some items in stock - if( numTotalItems[usItemIndex] > 0) + if (numTotalItems.count(usItemIndex) > 0) { //if the item is of the same dealer item type if( uiDealerItemType & GetArmsDealerItemTypeFromItemNumber( usItemIndex ) ) @@ -862,45 +808,6 @@ void LimitArmsDealersInventory( UINT8 ubArmsDealer, UINT32 uiDealerItemType, UIN } } - /* - //loop through all items of the same type - for( usItemIndex = 1; usItemIndex < MAXITEMS; usItemIndex++ ) - { - //if there are some non-repairing items in stock - if( gOldArmsDealersInventory[ ubArmsDealer ][ usItemIndex ].ubTotalItems ) - { - //if the item is of the same dealer item type - if( uiDealerItemType & GetArmsDealerItemTypeFromItemNumber( usItemIndex ) ) - { - // a random chance that the item will be removed - if( Random( 100 ) < 30 ) - { - //remove the item - - //if the dealer item type is ammo - if( uiDealerItemType == ARMS_DEALER_AMMO ) - { - // remove all of them, since each ammo item counts as only one "item" here - - // create item info describing a perfect item - SetSpecialItemInfoToDefaults( &SpclItemInfo ); - // ammo will always be only condition 100, there's never any in special slots - RemoveItemFromArmsDealerInventory( ubArmsDealer, usItemIndex, gOldArmsDealersInventory[ ubArmsDealer ][ usItemIndex ].ubTotalItems ); - } - else - { - // pick 1 random one, don't care about its condition - RemoveRandomItemFromArmsDealerInventory( ubArmsDealer, usItemIndex, 1 ); - } - - uiItemsToRemove--; - if( uiItemsToRemove == 0) - break; - } - } - } - } - */ } } @@ -914,10 +821,8 @@ void GuaranteeAtLeastOneItemOfType( UINT8 ubArmsDealer, UINT32 uiDealerItemType if( gArmsDealerStatus[ ubArmsDealer ].fOutOfBusiness ) return; - //ADB, ya, a whole 1 line of extra code! - // not permitted for repair dealers - would take extra code to avoid counting items under repair! - //Assert( !DoesDealerDoRepairs( ubArmsDealer ) ); - int numTotalItems[MAXITEMS] = { 0 }; + + std::map< UINT16, UINT16> numTotalItems; for (DealerItemList::iterator iter = gArmsDealersInventory[ ubArmsDealer ].begin(); iter != gArmsDealersInventory[ ubArmsDealer ].end(); ++iter) { if (iter->ItemIsInInventory() == true && iter->IsUnderRepair() == false) @@ -926,6 +831,7 @@ void GuaranteeAtLeastOneItemOfType( UINT8 ubArmsDealer, UINT32 uiDealerItemType } } + std::vector usAvailableItems; std::vector ubChanceForAvailableItem; //loop through all items of the same type @@ -935,7 +841,7 @@ void GuaranteeAtLeastOneItemOfType( UINT8 ubArmsDealer, UINT32 uiDealerItemType if( uiDealerItemType & GetArmsDealerItemTypeFromItemNumber( usItemIndex ) ) { //if there are any of these in stock - if( numTotalItems[usItemIndex] > 0 ) + if( numTotalItems.count(usItemIndex) > 0 ) { //there is already at least 1 item of that type, return return; @@ -1219,7 +1125,7 @@ UINT32 GetArmsDealerItemTypeFromItemNumber( UINT16 usItem ) return( 0 ); break; default: - AssertMsg( FALSE, String( "GetArmsDealerItemTypeFromItemNumber(), invalid class %d for item %d. DF 0.", Item[ usItem ].usItemClass, usItem ) ); + AssertMsg( FALSE, String( "GetArmsDealerItemTypeFromItemNumber(), invalid class %d for item %d. gMAXITEMS_READ = %d.", Item[ usItem ].usItemClass, usItem, gMAXITEMS_READ ) ); break; } return( 0 ); @@ -2507,4 +2413,4 @@ BOOLEAN CanThisItemBeSoldToSimulatedCustomer( UINT8 ubArmsDealerID, UINT16 usIte return( TRUE ); } -#endif \ No newline at end of file +#endif diff --git a/Tactical/ArmsDealerInvInit.cpp b/Tactical/ArmsDealerInvInit.cpp index 9e018066..951f556a 100644 --- a/Tactical/ArmsDealerInvInit.cpp +++ b/Tactical/ArmsDealerInvInit.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Types.h" #include "ArmsDealerInvInit.h" //#include "Item Types.h" @@ -15,7 +12,7 @@ #include "Random.h" #include "Shopkeeper Interface.h" #include "connect.h" -#endif + #include "Rebel Command.h" //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -1008,8 +1005,8 @@ UINT8 GetCurrentSuitabilityForItem( INT8 bArmsDealer, UINT16 usItemIndex, BOOLEA // WDS - Improve Tony's and Devin's inventory like BR's // Tony has the better stuff sooner (than Bobby R's) if (bArmsDealer >= 0) { - ubMinCoolness += armsDealerInfo[bArmsDealer].addToCoolness; - ubMaxCoolness += armsDealerInfo[bArmsDealer].addToCoolness; + ubMinCoolness += armsDealerInfo[bArmsDealer].addToCoolness + RebelCommand::GetMerchantCoolnessBonus(); + ubMaxCoolness += armsDealerInfo[bArmsDealer].addToCoolness + RebelCommand::GetMerchantCoolnessBonus(); ubMinCoolness = max( armsDealerInfo[bArmsDealer].minCoolness, min( 9, ubMinCoolness ) ); // silversurfer: max coolness should never be lower than min coolness! //ubMaxCoolness = max( 2, min( armsDealerInfo[bArmsDealer].maxCoolness, ubMaxCoolness ) ); diff --git a/Tactical/Auto Bandage.cpp b/Tactical/Auto Bandage.cpp index bd5e2309..9a6b659d 100644 --- a/Tactical/Auto Bandage.cpp +++ b/Tactical/Auto Bandage.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "messageboxscreen.h" @@ -28,7 +25,6 @@ #include "cursors.h" #include "English.h" #include "SkillCheck.h" // added by Flugente -#endif #include "Music Control.h" diff --git a/Tactical/Boxing.cpp b/Tactical/Boxing.cpp index 3c79b2d5..bb161ba6 100644 --- a/Tactical/Boxing.cpp +++ b/Tactical/Boxing.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Soldier Control.h" #include "Overhead.h" #include "Boxing.h" @@ -25,7 +22,6 @@ #include "Font Control.h" #include "message.h" #include "GameSettings.h" // added by SANDRO -#endif INT32 gsBoxerGridNo[ NUM_BOXERS ] = { 11393, 11233, 11073 }; UINT16 gubBoxerID[ NUM_BOXERS ] = { NOBODY, NOBODY, NOBODY }; diff --git a/Tactical/CMakeLists.txt b/Tactical/CMakeLists.txt new file mode 100644 index 00000000..ebecb65d --- /dev/null +++ b/Tactical/CMakeLists.txt @@ -0,0 +1,157 @@ +set(TacticalSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Air Raid.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Cache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Data.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Arms Dealer Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ArmsDealerInvInit.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Auto Bandage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Boxing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/bullets.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Campaign.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Civ Quotes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Dialogue Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Disease.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DisplayCover.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Drugs And Alcohol.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DynamicDialogue.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/End Game.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Enemy Soldier Save.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EnemyItemDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Faces.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Food.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/fov.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GAP.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle Doors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle UI Plan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle UI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Dialogue.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Enhanced.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Panels.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/InterfaceItemImages.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Inventory Choosing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Item Types.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja25_Tactical.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Keys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/AbstractXMLLoader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/BodyType.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/BodyTypeDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/EnumeratorDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/Filter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/FilterDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/Layers.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/PaletteDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/PaletteTable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/SurfaceCache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/SurfaceDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/XMLParseException.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LOS.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Information.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Entering.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Hiring.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Militia Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Minigame.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Morale.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/opplist.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Overhead.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PATHAI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Points.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/QARRAY.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/RandomMerc.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Real Time Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rotting Corpses.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ShopKeeper Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SkillCheck.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SkillMenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Add.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Ani.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Create.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Find.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Init List.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Profile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Tile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SoldierTooltips.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Spread Burst.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Squads.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Exit GUI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Structure Wrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Save.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Turns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/TeamTurns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Turn Based Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/UI Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Vehicles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/VehicleMenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Weapons.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/World Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AmmoStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AmmoTypes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Armour.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AttachmentInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Attachments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AttachmentSlots.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Background.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_BurstSounds.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CivGroupNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Clothes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ComboMergeInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CompatibleFaceItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Disease.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Drugs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyAmmoDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyArmourDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyExplosiveDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyItemChoice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyMiscDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyRank.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyWeaponChoice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyWeaponDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Explosive.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Food.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_FoodOpinions.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_HiddenNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPItemChoices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IncompatibleAttachments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_InteractiveTiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ItemAdjustments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Keys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Launchable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LBEPocket.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LBEPocketPopup.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LoadBearingEquipment.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LoadScreenHints.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Locks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Magazine.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Merchants.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_MercStartingGear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Merge.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_MilitiaIndividual.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_NewFaceGear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Opinions.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Profiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Qarray.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RandomItem.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RandomStats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RPCFacesSmall.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SectorLoadscreens.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SoldierProfiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Sounds.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SpreadPatterns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_StructureConstruct.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_StructureDeconstruct.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Structure_Move.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Taunts.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AdditionalTileProperties.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_TonyInventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Vehicles.cpp" +PARENT_SCOPE) diff --git a/Tactical/Campaign.cpp b/Tactical/Campaign.cpp index a31dbd56..46273571 100644 --- a/Tactical/Campaign.cpp +++ b/Tactical/Campaign.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -37,7 +34,6 @@ #include "Strategic AI.h" #include "interface Dialogue.h" #include "DynamicDialogue.h" -#endif #ifdef JA2UB #include "Explosion Control.h" @@ -309,6 +305,16 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh usChance += (usChance * (pProfile->bWisdom + (pProfile->sWisdomGain / SubpointsPerPoint(WISDOMAMT, pProfile->bExpLevel)) - 50)) / 100; } + // rftr: reduced growth rates at 80+ and 90+ (to make mercs with higher base stats more valuable) + if (bCurrentRating >= 90) + { + usChance = min(min(gGameExternalOptions.ubMaxGrowthChanceAt80, gGameExternalOptions.ubMaxGrowthChanceAt90), usChance); + } + else if (bCurrentRating >= 80) + { + usChance = min(gGameExternalOptions.ubMaxGrowthChanceAt80, usChance); + } + /* // if the stat is Marksmanship, and the guy is a hopeless shot if ((ubStat == MARKAMT) && (pProfile->bSpecialTrait == HOPELESS_SHOT)) diff --git a/Tactical/Civ Quotes.cpp b/Tactical/Civ Quotes.cpp index 38b3d2af..5a02d724 100644 --- a/Tactical/Civ Quotes.cpp +++ b/Tactical/Civ Quotes.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include "Types.h" @@ -32,7 +29,6 @@ #include "NPC.h" #include "Strategic Mines.h" #include "Random.h" -#endif #include "connect.h" // for enemy taunts @@ -201,42 +197,12 @@ BOOLEAN GetCivQuoteText(UINT16 ubCivQuoteID, UINT16 ubEntryID, STR16 zQuote ) void SurrenderMessageBoxCallBack( UINT8 ubExitValue ) { - SOLDIERTYPE *pTeamSoldier; - INT32 cnt = 0; - if ( ubExitValue == MSG_BOX_RETURN_YES ) { - // CJC Dec 1 2002: fix multiple captures - BeginCaptureSquence(); - - // Do capture.... - cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; - - for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++,pTeamSoldier++) - { - // Are we active and in sector..... - if ( pTeamSoldier->bActive && pTeamSoldier->bInSector ) - { - if ( pTeamSoldier->stats.bLife != 0 ) - { - EnemyCapturesPlayerSoldier( pTeamSoldier ); - - RemoveSoldierFromTacticalSector( pTeamSoldier, TRUE ); - } - } - } - - EndCaptureSequence( ); - - gfSurrendered = TRUE; - SetCustomizableTimerCallbackAndDelay( 3000, CaptureTimerCallback, FALSE ); - - ActionDone( gCivQuoteData.pCiv ); - } - else - { - ActionDone( gCivQuoteData.pCiv ); + AttemptToCapturePlayerSoldiers(); } + gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER; + ActionDone( gCivQuoteData.pCiv ); } void ShutDownQuoteBox( BOOLEAN fForce ) @@ -2388,4 +2354,4 @@ BOOLEAN PlayVoiceTaunt(SOLDIERTYPE *pCiv, TAUNTTYPE iTauntType, SOLDIERTYPE *pTa } return TRUE; -} \ No newline at end of file +} diff --git a/Tactical/Dialogue Control.cpp b/Tactical/Dialogue Control.cpp index e9c5576f..aa781f11 100644 --- a/Tactical/Dialogue Control.cpp +++ b/Tactical/Dialogue Control.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" -#else #include "sgp.h" //#include "soldier control.h" #include "Encrypted File.h" @@ -55,7 +51,6 @@ #include "los.h" #include "qarray.h" #include "Soldier Profile.h" -#endif #include #include "Auto Resolve.h" @@ -1515,6 +1510,9 @@ BOOLEAN DelayedTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteN if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + return( CharacterDialogue( pSoldier->ubProfile, usQuoteNum, pSoldier->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE, TRUE ) ); } @@ -1574,6 +1572,9 @@ BOOLEAN TacticalCharacterDialogueWithSpecialEventEx( SOLDIERTYPE *pSoldier, UINT if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); } return( CharacterDialogueWithSpecialEventEx( pSoldier->ubProfile, usQuoteNum, pSoldier->iFaceIndex, DIALOGUE_TACTICAL_UI, TRUE, FALSE, uiFlag, uiData1, uiData2, uiData3 ) ); @@ -1625,6 +1626,9 @@ BOOLEAN TacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum ) if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + // OK, let's check if this is the exact one we just played, if so, skip. if ( pSoldier->ubProfile == gTacticalStatus.ubLastQuoteProfileNUm && usQuoteNum == gTacticalStatus.ubLastQuoteSaid ) @@ -1717,6 +1721,9 @@ BOOLEAN SnitchTacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNu if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + // OK, let's check if this is the exact one we just played, if so, skip. //if ( pSoldier->ubProfile == gTacticalStatus.ubLastQuoteProfileNUm && // usQuoteNum == gTacticalStatus.ubLastQuoteSaid ) @@ -1774,6 +1781,9 @@ BOOLEAN AdditionalTacticalCharacterDialogue_CallsLua( SOLDIERTYPE *pSoldier, UIN if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + if ( AM_AN_EPC( pSoldier ) && !( gMercProfiles[pSoldier->ubProfile].ubMiscFlags & PROFILE_MISC_FLAG_FORCENPCQUOTE ) ) return( FALSE ); @@ -1802,7 +1812,7 @@ void AdditionalTacticalCharacterDialogue_AllInSector(INT16 aSectorX, INT16 aSect if ( pSoldier->stats.bLife >= OKLIFE && pSoldier->bActive && pSoldier->ubProfile != ausIgnoreProfile && pSoldier->sSectorX == aSectorX && pSoldier->sSectorY == aSectorY && pSoldier->bSectorZ == aSectorZ && - pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && + pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && (aAroundGridno == NOWHERE || PythSpacesAway( pSoldier->sGridNo, aAroundGridno ) <= aRadius ) && !pSoldier->flags.fBetweenSectors ) { @@ -2105,6 +2115,9 @@ BOOLEAN ExecuteCharacterDialogue( UINT8 ubCharacterNum, UINT16 usQuoteNum, INT32 if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + // sleeping guys don't talk.. go to standby to talk if( pSoldier->flags.fMercAsleep == TRUE ) { diff --git a/Tactical/DisplayCover.cpp b/Tactical/DisplayCover.cpp index 82a42c0d..3d35841d 100644 --- a/Tactical/DisplayCover.cpp +++ b/Tactical/DisplayCover.cpp @@ -1,11 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" - #include "DisplayCover.h" - #include "Interface.h" - #include "opplist.h" - #include "_Ja25Englishtext.h" - //#include "Ja25 Strategic Ai.h" -#else #include "builddefines.h" #include "Types.h" #include "Isometric Utils.h" @@ -34,7 +26,7 @@ #include "UI Cursors.h" #include "soldier profile type.h" #include "Interface Cursors.h" // added by Flugente for UICursorDefines -#endif +#include "Rebel Command.h" //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -759,7 +751,7 @@ void CalculateCoverFromSoldier( SOLDIERTYPE* pFromSoldier, const INT32& sTargetG { const UINT8& ubStance = animArr[i]; - INT32 usAdjustedSight; + INT32 usAdjustedSight = 0; if (pToSoldier == NULL) { usAdjustedSight = usSightLimit; @@ -767,6 +759,8 @@ void CalculateCoverFromSoldier( SOLDIERTYPE* pFromSoldier, const INT32& sTargetG usAdjustedSight = usSightLimit + usSightLimit * GetSightAdjustment( pToSoldier, GetStealth(pToSoldier), GetSightAdjustmentBasedOnLBE(pToSoldier), sTargetGridNo, (INT8) fRoof, ubStance ) /100; } + RebelCommand::ApplyVisionModifier(pFromSoldier, usAdjustedSight); + if ( SoldierToVirtualSoldierLineOfSightTest( pFromSoldier, sTargetGridNo, (INT8) fRoof, ubStance, FALSE, usAdjustedSight ) != 0 ) { if ( bOverlayType > i ) bOverlayType = i; @@ -784,7 +778,7 @@ static void CalculateCoverFromEnemySoldier(SOLDIERTYPE* pFromSoldier, const INT3 { const UINT8& ubStance = animArr[i]; - INT32 usAdjustedSight; + INT32 usAdjustedSight = 0; if (pToSoldier == nullptr) { usAdjustedSight = usSightLimit; @@ -793,6 +787,8 @@ static void CalculateCoverFromEnemySoldier(SOLDIERTYPE* pFromSoldier, const INT3 usAdjustedSight = usSightLimit + usSightLimit * GetSightAdjustment(pToSoldier, ToSoldierStealth, ToSoldierLBeSightAdjustment, sTargetGridNo, (INT8)fRoof, ubStance) / 100; } + RebelCommand::ApplyVisionModifier(pFromSoldier, usAdjustedSight); + if (SoldierToVirtualSoldierLineOfSightTest(pFromSoldier, sTargetGridNo, (INT8)fRoof, ubStance, FALSE, usAdjustedSight) != 0) { if (bOverlayType > i) bOverlayType = i; @@ -1827,8 +1823,8 @@ void CalculateWeapondata() pObjUsed = pObjPlatform; } - gunrange = GunRange( pObjUsed, pSoldier ) / 10; - laserrange = GetBestLaserRange( pObjPlatform ) / 10; + gunrange = GunRange( pObjUsed, pSoldier ) / CELL_X_SIZE; + laserrange = GetBestLaserRange( pObjPlatform ) / CELL_X_SIZE; if ( Item[pObjUsed->usItem].usItemClass & IC_LAUNCHER ) { diff --git a/Tactical/Drugs And Alcohol.cpp b/Tactical/Drugs And Alcohol.cpp index b16a42ef..cec2974c 100644 --- a/Tactical/Drugs And Alcohol.cpp +++ b/Tactical/Drugs And Alcohol.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "soldier control.h" #include "soldier profile.h" @@ -17,7 +14,6 @@ #include "Animation data.h" // added by Flugente for SoldierBodyTypes #include "CampaignStats.h" // added by Flugente #include "DynamicDialogue.h"// added by Flugente -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Tactical/DynamicDialogue.cpp b/Tactical/DynamicDialogue.cpp index dd363506..2767bed8 100644 --- a/Tactical/DynamicDialogue.cpp +++ b/Tactical/DynamicDialogue.cpp @@ -960,6 +960,9 @@ BOOLEAN DynamicOpinionTacticalCharacterDialogue( DynamicOpinionSpeechEvent& aEve if( pSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) return( FALSE ); + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + return( FALSE ); + CHAR16 gzQuoteStr[500]; // remove old box, in case that still exists @@ -2019,7 +2022,7 @@ UINT8 GetFittingInterjectorProfile( UINT8 usEvent, UINT8 usProfileVictim, UINT8 for ( pTeamSoldier = MercPtrs[bMercID]; bMercID <= bLastTeamID; ++bMercID, pTeamSoldier++ ) { // only people that are here - if ( !pTeamSoldier->bActive || pTeamSoldier->bAssignment == IN_TRANSIT || pTeamSoldier->bAssignment == ASSIGNMENT_DEAD || pTeamSoldier->bAssignment == ASSIGNMENT_POW || pTeamSoldier->bAssignment == ASSIGNMENT_MINIEVENT ) + if ( !pTeamSoldier->bActive || pTeamSoldier->bAssignment == IN_TRANSIT || pTeamSoldier->bAssignment == ASSIGNMENT_DEAD || pTeamSoldier->bAssignment == ASSIGNMENT_POW || pTeamSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pTeamSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND ) continue; // if fSameSector is TRUE then the teammate must be in the same sector diff --git a/Tactical/End Game.cpp b/Tactical/End Game.cpp index cc95371f..d937d62e 100644 --- a/Tactical/End Game.cpp +++ b/Tactical/End Game.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" - #include "Intro.h" -#else #include "Overhead.h" #include "Render Fun.h" @@ -38,7 +33,6 @@ #include "Campaign Types.h" #include "Tactical Save.h" #include "screenids.h" -#endif #ifdef JA2UB #include "email.h" diff --git a/Tactical/Enemy Soldier Save.cpp b/Tactical/Enemy Soldier Save.cpp index b5de4fce..0d11d98a 100644 --- a/Tactical/Enemy Soldier Save.cpp +++ b/Tactical/Enemy Soldier Save.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Enemy Soldier Save.h" -#else #include "builddefines.h" #include "GameSettings.h" #include @@ -33,7 +29,6 @@ #include "Queen Command.h" #include "Scheduling.h" #include "Soldier macros.h" // added by Flugente -#endif #include "GameVersion.h" //ADB When a savegame is loaded, the enemy and civ stuff needs to be loaded and updated, but this can only happen diff --git a/Tactical/EnemyItemDrops.cpp b/Tactical/EnemyItemDrops.cpp index 8ef5ba5b..30e61581 100644 --- a/Tactical/EnemyItemDrops.cpp +++ b/Tactical/EnemyItemDrops.cpp @@ -1,10 +1,6 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Types.h" #include "DEbug.h" #include "EnemyItemDrops.h" -#endif WEAPON_DROPS gEnemyWeaponDrops[MAX_DROP_ITEMS]; AMMO_DROPS gEnemyAmmoDrops[MAX_DROP_ITEMS]; diff --git a/Tactical/Faces.cpp b/Tactical/Faces.cpp index 28f01135..f8e422fe 100644 --- a/Tactical/Faces.cpp +++ b/Tactical/Faces.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include "math.h" #include @@ -43,7 +40,6 @@ #include "Food.h" // added by Flugente #include "Queen Command.h" // added by Flugente for FindUnderGroundSector(...) #include "strategic.h" // added by Flugente -#endif #ifdef JA2UB #include "Ja25_Tactical.h" diff --git a/Tactical/Food.cpp b/Tactical/Food.cpp index 7f7a995e..c33eeaac 100644 --- a/Tactical/Food.cpp +++ b/Tactical/Food.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include "sgp.h" #include "soldier profile.h" @@ -26,7 +23,6 @@ #include "Soldier macros.h" #include "strategicmap.h" #include "DynamicDialogue.h" // added by Flugente -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -606,7 +602,7 @@ void HourlyFoodAutoDigestion( SOLDIERTYPE *pSoldier ) AddFoodpoints(pSoldier->bFoodLevel, powfoodadd); } // while on a minievent, assume that we can feed ourselves.. somehow - else if (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT) + else if (pSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) { const INT16 water = gGameExternalOptions.usFoodDigestionHourlyBaseDrink * gGameExternalOptions.sFoodDigestionAssignment; const INT16 foodadd = water * gGameExternalOptions.usFoodDigestionHourlyBaseFood / max(1, gGameExternalOptions.usFoodDigestionHourlyBaseDrink); diff --git a/Tactical/GAP.cpp b/Tactical/GAP.cpp index 8a84b648..5478734a 100644 --- a/Tactical/GAP.cpp +++ b/Tactical/GAP.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include "debug.h" #include "types.h" @@ -10,39 +7,9 @@ #include "soundman.h" #include #include "FileMan.h" -#endif SUBSEQUENTSOUNDS subsequentsounds; -#if 0 -static void AILCALLBACK timer_func( UINT32 user ) -{ - AudioGapList *pGapList; - - pGapList = (AudioGapList*)user; - - pGapList->gap_monitor_timer += GAP_TIMER_INTERVAL; - - if ( pGapList->audio_gap_active ) - { - if ( (pGapList->gap_monitor_timer / 1000) > pGapList->end[ pGapList->gap_monitor_current] ) - { - pGapList->audio_gap_active = 0; - pGapList->gap_monitor_current++; - } - } - else - { - if ( pGapList->gap_monitor_current < pGapList->count ) - { - if ( ( pGapList->gap_monitor_timer / 1000) >= pGapList->start[ pGapList->gap_monitor_current ]) - { - pGapList->audio_gap_active = 1; - } - } - } -} -#endif void AudioGapListInit( CHAR8 *zSoundFile, AudioGapList *pGapList ) diff --git a/Tactical/Handle Doors.cpp b/Tactical/Handle Doors.cpp index 34e7f81c..c5b74bb1 100644 --- a/Tactical/Handle Doors.cpp +++ b/Tactical/Handle Doors.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "language defines.h" -#else #include "builddefines.h" #include #include @@ -35,7 +31,6 @@ #include "Soldier macros.h" #include "Event Pump.h" #include "GameSettings.h" -#endif #include "fresh_header.h" #include "connect.h" diff --git a/Tactical/Handle Items.cpp b/Tactical/Handle Items.cpp index 2cf29c80..4e9e6775 100644 --- a/Tactical/Handle Items.cpp +++ b/Tactical/Handle Items.cpp @@ -1,7 +1,4 @@ #include "connect.h" -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "items.h" #include "Action Items.h" #include "handle Items.h" @@ -81,7 +78,6 @@ #include "MessageBoxScreen.h" // added by Flugente #include "Map Screen Interface.h" // added by Flugente #include "Map Screen Interface Map.h" // added by Flugente -#endif #ifdef JA2UB #include "Ja25_Tactical.h" diff --git a/Tactical/Handle UI Plan.cpp b/Tactical/Handle UI Plan.cpp index 11afac49..33b0708d 100644 --- a/Tactical/Handle UI Plan.cpp +++ b/Tactical/Handle UI Plan.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Handle UI Plan.h" #include "overhead.h" #include "Isometric Utils.h" @@ -13,7 +10,6 @@ #include "message.h" #include "soldier create.h" #include "interface.h" -#endif UINT8 gubNumUIPlannedMoves = 0; SOLDIERTYPE *gpUIPlannedSoldier = NULL; diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 287496cf..3dc40e4f 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -1,9 +1,4 @@ #include "connect.h" -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#include "BuildDefines.h" - -#else #include "builddefines.h" #include #include @@ -86,7 +81,6 @@ #include "Soldier Control.h" #include "DisplayCover.h" #include "english.h" // sevenfm: this is needed for _keydown(SHIFT) to work -#endif #include "teamturns.h" #include "Options Screen.h" @@ -94,6 +88,11 @@ #include "Map Screen Interface.h" // added by Flugente for SquadNames #include "Keys.h" // added by silversurfer for door handling from the side +#include "AIInternals.h" +extern BOOLEAN gubWorldTileInLight[MAX_ALLOWED_WORLD_MAX]; +extern BOOLEAN gubIsCorpseThere[MAX_ALLOWED_WORLD_MAX]; +extern INT32 gubMerkCanSeeThisTile[MAX_ALLOWED_WORLD_MAX]; + ////////////////////////////////////////////////////////////////////////////// // SANDRO - In this file, all APBPConstants[AP_CROUCH] and APBPConstants[AP_PRONE] were changed to GetAPsCrouch() and GetAPsProne() // On the bottom here, there are these functions made @@ -1371,74 +1370,74 @@ UINT32 UIHandleEndTurn( UI_EVENT *pUIEvent ) SaveGame(SAVE__END_TURN_NUM, zString ); } - // Flugente: this stuff is only ever used in AStar pathing and is a unnecessary waste of resources otherwise, so I'm putting an end to this -#ifdef USE_ASTAR_PATHS ////ddd enemy turn optimization - if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT ) ) + if (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING]) { - memset( gubWorldTileInLight, FALSE, sizeof( gubWorldTileInLight ) ); - memset( gubIsCorpseThere, FALSE, sizeof( gubIsCorpseThere ) ); - memset( gubMerkCanSeeThisTile, FALSE, sizeof( gubMerkCanSeeThisTile ) ); + if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT ) ) + { + memset( gubWorldTileInLight, FALSE, sizeof( gubWorldTileInLight ) ); + memset( gubIsCorpseThere, FALSE, sizeof( gubIsCorpseThere ) ); + memset( gubMerkCanSeeThisTile, FALSE, sizeof( gubMerkCanSeeThisTile ) ); - //sevenfm translated: unwinding of loop. When changing WORLD_MAX to another value will need some cleaning! dangerous code! ;) + //sevenfm translated: unwinding of loop. When changing WORLD_MAX to another value will need some cleaning! dangerous code! ;) - // WANNE: We had a custom user map (Tixa, J9), where the following loop caused an unhandled exception. - // The crash occurd at ~index 16000 when calling the method IsCorpseAtGridNo() ... - // I don't know what causes it ... - // Just try/catch (ugly, but works). - __try - { - for(UINT32 i=0; i<(UINT32)WORLD_MAX; i+=4) - { - gubWorldTileInLight[i] = InLightAtNight(i, gpWorldLevelData[ i ].sHeight); - gubIsCorpseThere[i] = IsCorpseAtGridNo( i, gpWorldLevelData[ i ].sHeight ); - gubWorldTileInLight[i+1] = InLightAtNight(i+1, gpWorldLevelData[ i+1 ].sHeight); - gubIsCorpseThere[i+1] = IsCorpseAtGridNo( i+1, gpWorldLevelData[ i+1 ].sHeight ); - gubWorldTileInLight[i+2] = InLightAtNight(i+2, gpWorldLevelData[ i+2 ].sHeight); - gubIsCorpseThere[i+2] = IsCorpseAtGridNo( i+2, gpWorldLevelData[ i+2 ].sHeight ); - gubWorldTileInLight[i+3] = InLightAtNight(i+3, gpWorldLevelData[ i+3 ].sHeight); - gubIsCorpseThere[i+3] = IsCorpseAtGridNo( i+3, gpWorldLevelData[ i+3 ].sHeight ); - } - } - __except( EXCEPTION_EXECUTE_HANDLER ) - { - // WANNE: Ignore, so the game can continue ... - } - - INT32 tcnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; - SOLDIERTYPE *tS; - - INT16 sXOffset, sYOffset; - INT32 sGridNo; - UINT16 usSightLimit=0; - - for ( tS = MercPtrs[ tcnt ]; tcnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; ++tcnt, tS++ ) - { - if ( tS->stats.bLife >= OKLIFE && tS->sGridNo != NOWHERE && tS->bInSector ) + // WANNE: We had a custom user map (Tixa, J9), where the following loop caused an unhandled exception. + // The crash occurd at ~index 16000 when calling the method IsCorpseAtGridNo() ... + // I don't know what causes it ... + // Just try/catch (ugly, but works). + __try + { + for(UINT32 i=0; i<(UINT32)WORLD_MAX; i+=4) + { + gubWorldTileInLight[i] = InLightAtNight(i, gpWorldLevelData[ i ].sHeight); + gubIsCorpseThere[i] = IsCorpseAtGridNo( i, gpWorldLevelData[ i ].sHeight ); + gubWorldTileInLight[i+1] = InLightAtNight(i+1, gpWorldLevelData[ i+1 ].sHeight); + gubIsCorpseThere[i+1] = IsCorpseAtGridNo( i+1, gpWorldLevelData[ i+1 ].sHeight ); + gubWorldTileInLight[i+2] = InLightAtNight(i+2, gpWorldLevelData[ i+2 ].sHeight); + gubIsCorpseThere[i+2] = IsCorpseAtGridNo( i+2, gpWorldLevelData[ i+2 ].sHeight ); + gubWorldTileInLight[i+3] = InLightAtNight(i+3, gpWorldLevelData[ i+3 ].sHeight); + gubIsCorpseThere[i+3] = IsCorpseAtGridNo( i+3, gpWorldLevelData[ i+3 ].sHeight ); + } + } + __except( EXCEPTION_EXECUTE_HANDLER ) { - //loop through all the gridnos that we are interested in - for (sYOffset = -30; sYOffset <= 30; ++sYOffset) + // WANNE: Ignore, so the game can continue ... + } + + INT32 tcnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; + SOLDIERTYPE *tS; + + INT16 sXOffset, sYOffset; + INT32 sGridNo; + UINT16 usSightLimit=0; + + for ( tS = MercPtrs[ tcnt ]; tcnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; ++tcnt, tS++ ) + { + if ( tS->stats.bLife >= OKLIFE && tS->sGridNo != NOWHERE && tS->bInSector ) { - for (sXOffset = -30; sXOffset <= 30; ++sXOffset) + //loop through all the gridnos that we are interested in + for (sYOffset = -30; sYOffset <= 30; ++sYOffset) { - sGridNo = tS->sGridNo + sXOffset + (MAXCOL * sYOffset); - - if ( sGridNo <= 0 || sGridNo >= WORLD_MAX ) - continue; - - //usSightLimit = tS->GetMaxDistanceVisible(sGridNo, FALSE, CALC_FROM_WANTED_DIR); - if(gubMerkCanSeeThisTile[sGridNo]==0) + for (sXOffset = -30; sXOffset <= 30; ++sXOffset) { - gubMerkCanSeeThisTile[sGridNo]=//SoldierToVirtualSoldierLineOfSightTest( tS, sGridNo, FALSE, ANIM_STAND, TRUE, usSightLimit ); - SoldierToVirtualSoldierLineOfSightTest( tS, sGridNo, tS->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_WANTED_DIR); - } - }//fo - } - }//if + sGridNo = tS->sGridNo + sXOffset + (MAXCOL * sYOffset); + + if ( sGridNo <= 0 || sGridNo >= WORLD_MAX ) + continue; + + //usSightLimit = tS->GetMaxDistanceVisible(sGridNo, FALSE, CALC_FROM_WANTED_DIR); + if(gubMerkCanSeeThisTile[sGridNo]==0) + { + gubMerkCanSeeThisTile[sGridNo]=//SoldierToVirtualSoldierLineOfSightTest( tS, sGridNo, FALSE, ANIM_STAND, TRUE, usSightLimit ); + SoldierToVirtualSoldierLineOfSightTest( tS, sGridNo, tS->pathing.bLevel, ANIM_STAND, TRUE, CALC_FROM_WANTED_DIR); + } + }//fo + } + }//if + } } } //ddd enemy turn optimization** -#endif // End our turn! if (is_server || !is_client) @@ -3926,14 +3925,6 @@ void UIHandleSoldierStanceChange( UINT16 ubSoldierID, INT8 bNewStance ) pSoldier->usUIMovementMode = pSoldier->GetMoveStateBasedOnStance( bNewStance ); pSoldier->ubDesiredHeight = NO_DESIRED_HEIGHT; -#if 0 - if ( pSoldier->usUIMovementMode == CRAWLING && gAnimControl[ pSoldier->usAnimState ].ubEndHeight != ANIM_PRONE ) - { - pSoldier->usDontUpdateNewGridNoOnMoveAnimChange = LOCKED_NO_NEWGRIDNO; - pSoldier->pathing.bPathStored = FALSE; - } - else -#endif { pSoldier->usDontUpdateNewGridNoOnMoveAnimChange = 1; } @@ -7440,9 +7431,7 @@ BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fChec } // This ain't gonna happen with backpack - if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pSoldier->CanClimbWithCurrentBackpack()) { return( FALSE ); } diff --git a/Tactical/Interface Control.cpp b/Tactical/Interface Control.cpp index e1c93628..1d733042 100644 --- a/Tactical/Interface Control.cpp +++ b/Tactical/Interface Control.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include @@ -48,7 +45,6 @@ #include "civ quotes.h" #include "GameSettings.h" #include "Explosion Control.h" // added by Flugente -#endif #include "connect.h" #include "Text.h" diff --git a/Tactical/Interface Cursors.cpp b/Tactical/Interface Cursors.cpp index ae647580..aaae395b 100644 --- a/Tactical/Interface Cursors.cpp +++ b/Tactical/Interface Cursors.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "sgp.h" @@ -19,7 +16,6 @@ #include "overhead.h" #include "interface items.h" #include "GameSettings.h" -#endif #define DISPLAY_AP_INDEX MOCKFLOOR1 diff --git a/Tactical/Interface Dialogue.cpp b/Tactical/Interface Dialogue.cpp index 7e9ef7d6..40e18227 100644 --- a/Tactical/Interface Dialogue.cpp +++ b/Tactical/Interface Dialogue.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" -#else #include "builddefines.h" #include #include "sgp.h" @@ -75,7 +71,6 @@ #include "Cheats.h" #include "Overhead.h" #include "Soldier Control.h" -#endif #include "LuaInitNPCs.h" #include "Text.h" @@ -3595,6 +3590,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum case NPC_ACTION_SEND_SOLDIERS_TO_BALIME: case NPC_ACTION_GLOBAL_OFFENSIVE_1: case NPC_ACTION_GLOBAL_OFFENSIVE_2: + case NPC_ACTION_DEPLOY_TRANSPORT_GROUP: break; case NPC_ACTION_TRIGGER_QUEEN_BY_SAM_SITES_CONTROLLED: diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 5554fb9a..91f052d3 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "language defines.h" -#else #include "builddefines.h" #include #include @@ -57,7 +53,6 @@ #include "los.h" #include "Map Screen Interface Map.h" #include "Food.h" // added by Flugente -#endif #include "Multi Language Graphic Utils.h" @@ -1368,8 +1363,8 @@ BOOLEAN InternalInitEnhancedDescBox() // HEADROCK HAM 4: Advanced Icons VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; - GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language - //strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); + //GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language + strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); CHECKF( AddVideoObject( &VObjectDesc, &guiItemInfoAdvancedIcon ) ); // Flugente: added icons for WH40K @@ -1626,8 +1621,8 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr /////////////////// PROJECTION FACTOR / NCTH BEST LASER RANGE // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor but we still need the mouse region - if (UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || GetBestLaserRange( gpItemDescObject ) > 0 - && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) + if (UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || (GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE > 0 + && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0)) ) ) { ubRegionOffset = 6; MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + ubRegionOffset ] ); @@ -1642,7 +1637,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr } /////////////////// OCTH BEST LASER RANGE - if (!UsingNewCTHSystem() && (Item[gpItemDescObject->usItem].bestlaserrange > 0 || GetAverageBestLaserRange( gpItemDescObject ) > 0 ) ) + if ( UsingNewCTHSystem() == false && (GetAverageBestLaserRange(gpItemDescObject) / CELL_X_SIZE) > 0 ) { ubRegionOffset = 7; MSYS_EnableRegion( &gUDBFasthelpRegions[ iFirstDataRegion + ubRegionOffset ] ); @@ -2645,7 +2640,14 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr //////////////////// EXTERNAL FEEDING if ( gGameExternalOptions.ubExternalFeeding ) { - if ( HasItemFlag(gpItemDescObject->usItem, AMMO_BELT) ) + if (HasItemFlag(gpItemDescObject->usItem, BELT_FED)) + { + swprintf(pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[51], szUDBGenSecondaryStatsExplanationsTooltipText[51]); + SetRegionFastHelpText(&(gUDBFasthelpRegions[iFirstDataRegion + cnt]), pStr); + MSYS_EnableRegion(&gUDBFasthelpRegions[iFirstDataRegion + cnt]); + cnt++; + } + else if ( HasItemFlag(gpItemDescObject->usItem, AMMO_BELT) ) { swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[ 28 ], szUDBGenSecondaryStatsExplanationsTooltipText[ 28 ]); SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + cnt ]), pStr ); @@ -2733,7 +2735,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] ); cnt++; } - else if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) ) + if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) ) { swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[39], szUDBGenSecondaryStatsExplanationsTooltipText[39] ); SetRegionFastHelpText( &(gUDBFasthelpRegions[iFirstDataRegion + cnt]), pStr ); @@ -2879,10 +2881,10 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr ///////////////////// ACCURACY MODIFIER if (GetAccuracyModifier( gpItemDescObject ) != 0 ) { - if (cnt >= sFirstLine && cnt < sLastLine) - { - if( UsingNewCTHSystem() == true ) + if (UsingNewCTHSystem() == true) { + if (cnt >= sFirstLine && cnt < sLastLine) + { if (Item[ gpItemDescObject->usItem ].usItemClass & (IC_WEAPON|IC_PUNCH)) { swprintf( pStr, L"%s%s", szUDBAdvStatsTooltipText[ 0 ], szUDBAdvStatsExplanationsTooltipTextForWeapons[ 0 ]); @@ -3260,9 +3262,9 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr ///////////////////// PROJECTION FACTOR / BEST LASER RANGE // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor - if ( ( UsingNewCTHSystem() && GetBestLaserRange( gpItemDescObject ) > 0 + if ( ( UsingNewCTHSystem() && (GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE) > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) - || ( !UsingNewCTHSystem() && GetBestLaserRange( gpItemDescObject ) > 0 ) ) + || ( !UsingNewCTHSystem() && (GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE) > 0 ) ) { if (cnt >= sFirstLine && cnt < sLastLine) { @@ -4439,10 +4441,12 @@ void DrawWeaponStats( OBJECTTYPE * gpItemDescObject ) //////////////////// PROJECTION FACTOR / NCTH BEST LASER RANGE // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor but we use the same icon - if ( (UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || ( GetBestLaserRange( gpItemDescObject ) > 0 + INT16 itemLaserRangeTiles = GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE; + INT16 comparedLaserRangeTiles = fComparisonMode ? GetBestLaserRange(gpComparedItemDescObject) / CELL_X_SIZE : 0; + if ( (UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || ( itemLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) || ( fComparisonMode && UsingNewCTHSystem() && ( (GetProjectionFactor( gpItemDescObject ) > 1.0 || GetProjectionFactor( gpComparedItemDescObject ) > 1.0) || - ( GetBestLaserRange( gpComparedItemDescObject ) > 0 + ( comparedLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) ) { ubNumLine = 6; @@ -4460,8 +4464,8 @@ void DrawWeaponStats( OBJECTTYPE * gpItemDescObject ) } //////////////////// OCTH BEST LASER RANGE - if ( !UsingNewCTHSystem() && ( GetBestLaserRange( gpItemDescObject ) || - ( fComparisonMode && GetBestLaserRange( gpComparedItemDescObject ) ) ) ) + if ( UsingNewCTHSystem() == false && + (itemLaserRangeTiles != 0 || (fComparisonMode && comparedLaserRangeTiles != 0)) ) { ubNumLine = 7; BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoWeaponIcon, 14, gItemDescGenRegions[ubNumLine][0].sLeft+sOffsetX, gItemDescGenRegions[ubNumLine][0].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); @@ -5352,11 +5356,13 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject ) ///////////////////// PROJECTION FACTOR / BEST LASER RANGE // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor but we use the same icon - if ( ( UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || ( GetBestLaserRange( gpItemDescObject ) > 0 + INT16 itemLaserRangeTiles = GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE; + INT16 comparedLaserRangeTiles = fComparisonMode ? GetBestLaserRange(gpComparedItemDescObject) / CELL_X_SIZE : 0; + if ( ( UsingNewCTHSystem() && ( GetProjectionFactor( gpItemDescObject ) > 1.0 || ( itemLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) || - ( fComparisonMode && ( GetProjectionFactor( gpComparedItemDescObject ) > 1.0 || ( GetBestLaserRange( gpComparedItemDescObject ) > 0 + ( fComparisonMode && ( GetProjectionFactor( gpComparedItemDescObject ) > 1.0 || ( comparedLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) ) || - ( !UsingNewCTHSystem() && ( GetBestLaserRange( gpItemDescObject ) > 0 || ( fComparisonMode && GetBestLaserRange( gpComparedItemDescObject ) > 0 ) ) ) ) + ( !UsingNewCTHSystem() && ( itemLaserRangeTiles > 0 || ( fComparisonMode && comparedLaserRangeTiles > 0 ) ) ) ) { if (cnt >= sFirstLine && cnt < sLastLine) { @@ -6345,7 +6351,13 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject ) //////////////////// EXTERNAL FEEDING if ( gGameExternalOptions.ubExternalFeeding ) { - if ( ( HasItemFlag(gpItemDescObject->usItem, AMMO_BELT) && !fComparisonMode ) || + if ((HasItemFlag(gpItemDescObject->usItem, BELT_FED) && !fComparisonMode) || + (fComparisonMode && HasItemFlag(gpComparedItemDescObject->usItem, BELT_FED))) + { + BltVideoObjectFromIndex(guiSAVEBUFFER, guiItemInfoSecondaryIcon, 28, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL); + cnt++; + } + else if ( ( HasItemFlag(gpItemDescObject->usItem, AMMO_BELT) && !fComparisonMode ) || ( fComparisonMode && HasItemFlag(gpComparedItemDescObject->usItem, AMMO_BELT) ) ) { BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 28, gItemDescGenSecondaryRegions[cnt].sLeft+sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); @@ -6425,7 +6437,7 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject ) BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); ++cnt; } - else if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) && !fComparisonMode) || + if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) && !fComparisonMode) || (fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_2 )) ) { BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL ); @@ -7537,9 +7549,11 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) ///////////////// (LASER) PROJECTION FACTOR // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor + INT16 itemLaserRangeTiles = GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE; + INT16 comparedLaserRangeTiles = fComparisonMode ? GetBestLaserRange(gpComparedItemDescObject) / CELL_X_SIZE : 0; if (UsingNewCTHSystem() == true && ( (Item[gpItemDescObject->usItem].projectionfactor > 1.0 || GetProjectionFactor( gpItemDescObject ) > 1.0) || - ( GetBestLaserRange( gpItemDescObject ) > 0 + ( itemLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) { // Set line to draw into @@ -7550,13 +7564,13 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) FLOAT iFinalProjectionValue = 0; BOOLEAN bNewCode = FALSE; - if ( GetBestLaserRange( gpItemDescObject ) > 0 - && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) + if ( itemLaserRangeTiles > 0 && + (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) { // Get base laser range iProjectionValue = __max(0, Item[ gpItemDescObject->usItem ].bestlaserrange * gItemSettings.fBestLaserRangeModifier / CELL_X_SIZE); // Get best laser range - iProjectionModifier = ((FLOAT)GetBestLaserRange( gpItemDescObject ) / CELL_X_SIZE); + iProjectionModifier = (FLOAT)itemLaserRangeTiles; // Get final laser range iFinalProjectionValue = __max( iProjectionValue, iProjectionModifier ); bNewCode = TRUE; @@ -7614,7 +7628,7 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) // Get base laser range iComparedProjectionValue = __max(0, Item[ gpComparedItemDescObject->usItem ].bestlaserrange * gItemSettings.fBestLaserRangeModifier / CELL_X_SIZE); // Get best laser range - iComparedProjectionModifier = ((FLOAT)GetBestLaserRange( gpComparedItemDescObject ) / CELL_X_SIZE); + iComparedProjectionModifier = (FLOAT)comparedLaserRangeTiles; // Get final laser range iComparedFinalProjectionValue = __max( iComparedProjectionValue, iComparedProjectionModifier ); } @@ -7637,7 +7651,7 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) } else if( fComparisonMode && UsingNewCTHSystem() == true && ( (Item[gpComparedItemDescObject->usItem].projectionfactor > 1.0 || GetProjectionFactor( gpComparedItemDescObject ) > 1.0) || - ( GetBestLaserRange( gpItemDescObject ) > 0 + ( itemLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) { ubNumLine = 6; @@ -7647,13 +7661,13 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) FLOAT iFinalProjectionValue = 0; BOOLEAN bNewCode = FALSE; - if ( GetBestLaserRange( gpComparedItemDescObject ) > 0 + if ( comparedLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) { // Get base laser range iProjectionValue = __max(0, Item[ gpComparedItemDescObject->usItem ].bestlaserrange * gItemSettings.fBestLaserRangeModifier / CELL_X_SIZE); // Get best laser range - iProjectionModifier = ((FLOAT)GetBestLaserRange( gpComparedItemDescObject ) / CELL_X_SIZE); + iProjectionModifier = (FLOAT)comparedLaserRangeTiles; // Get final laser range iFinalProjectionValue = __max( iProjectionValue, iProjectionModifier ); bNewCode = TRUE; @@ -7757,7 +7771,7 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) } ///////////////// OCTH BEST LASER RANGE - if ( !UsingNewCTHSystem() && GetBestLaserRange( gpItemDescObject ) > 0 ) + if ( !UsingNewCTHSystem() && itemLaserRangeTiles > 0 ) { // Set line to draw into ubNumLine = 7; @@ -7794,7 +7808,7 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject ) DrawPropertyValueInColour( iComparedFinalBestLaserRangeValue - iFinalBestLaserRangeValue, ubNumLine, 3, fComparisonMode, FALSE, TRUE ); } } - else if( !UsingNewCTHSystem() && ( fComparisonMode && GetBestLaserRange( gpComparedItemDescObject ) > 0 ) ) + else if( !UsingNewCTHSystem() && ( fComparisonMode && comparedLaserRangeTiles > 0 ) ) { // Set line to draw into ubNumLine = 7; @@ -11371,14 +11385,16 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject ) cnt++; } - BOOLEAN bNewCode = FALSE; ///////////////////// PROJECTION FACTOR / BEST LASER RANGE // with the reworked NCTH code and the laser performance factor we will display BestLaserRange instead of ProjectionFactor - if ( ( UsingNewCTHSystem() && ( GetBestLaserRange( gpItemDescObject ) > 0 || ( fComparisonMode && GetBestLaserRange( gpComparedItemDescObject ) > 0 + BOOLEAN bNewCode = FALSE; + INT16 itemLaserRangeTiles = GetBestLaserRange(gpItemDescObject) / CELL_X_SIZE; + INT16 comparedLaserRangeTiles = fComparisonMode ? GetBestLaserRange(gpComparedItemDescObject) / CELL_X_SIZE : 0; + if ( ( UsingNewCTHSystem() && (itemLaserRangeTiles > 0 || ( fComparisonMode && comparedLaserRangeTiles > 0 && (gGameCTHConstants.LASER_PERFORMANCE_BONUS_HIP + gGameCTHConstants.LASER_PERFORMANCE_BONUS_IRON + gGameCTHConstants.LASER_PERFORMANCE_BONUS_SCOPE != 0) ) ) ) - || ( !UsingNewCTHSystem() && ( GetBestLaserRange( gpItemDescObject ) > 0 || ( fComparisonMode && GetBestLaserRange( gpComparedItemDescObject ) > 0 ) ) ) ) + || ( !UsingNewCTHSystem() && (itemLaserRangeTiles > 0 || ( fComparisonMode && comparedLaserRangeTiles > 0 ) ) ) ) { - iFloatModifier[0] = ((FLOAT)GetBestLaserRange( gpItemDescObject ) / CELL_X_SIZE); + iFloatModifier[0] = (FLOAT)itemLaserRangeTiles; bNewCode = TRUE; } else @@ -11389,7 +11405,7 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject ) if( fComparisonMode ) { if ( bNewCode ) - iComparedFloatModifier[0] = ((FLOAT)GetBestLaserRange( gpComparedItemDescObject ) / CELL_X_SIZE); + iComparedFloatModifier[0] = (FLOAT)comparedLaserRangeTiles; else iComparedFloatModifier[0] = GetProjectionFactor( gpComparedItemDescObject ); iComparedFloatModifier[1] = iComparedFloatModifier[0]; diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 53d6ebb2..214227d9 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "language defines.h" -#else #include "builddefines.h" #include "mapscreen.h" #include @@ -85,7 +81,6 @@ // sevenfm: #include "Soldier Control.h" #include "Sound Control.h" -#endif #include "Multi Language Graphic Utils.h" @@ -1498,8 +1493,8 @@ BOOLEAN InitInvSlotInterface( INV_REGION_DESC *pRegionDesc , INV_REGION_DESC *pC if ( gGameExternalOptions.fScopeModes ) { VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; - GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language - //strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); + //GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language + strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); CHECKF( AddVideoObject( &VObjectDesc, &guiItemInfoAdvancedIcon) ); } @@ -2766,19 +2761,6 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe } } -#if 0 - if ( gbInvalidPlacementSlot[ sPocket ] ) - { - if ( sPocket != SECONDHANDPOS ) - { - // If we are in inv panel and our guy is not = cursor guy... - if ( !gfSMDisableForItems ) - { - fHatchItOut = TRUE; - } - } - } -#endif if (AM_A_ROBOT(pSoldier) && sPocket == HANDPOS) fHatchItOut = FALSE; @@ -3813,7 +3795,6 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec { SetFontBackground( FONT_MCOLOR_BLACK ); SetFontForeground( FONT_MCOLOR_DKGRAY ); -#if 1 //CHRISL: Moved this condition to the start so that stacked guns will show number in stack if ( ubStatusIndex != RENDER_ITEM_NOSTATUS ) { @@ -3838,7 +3819,6 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec gprintfinvalidate( sNewX, sNewY, pStr ); } } -#endif if ( pItem->usItemClass == IC_GUN && !Item[pObject->usItem].rocketlauncher ) { @@ -3946,35 +3926,6 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec } } } -#if 0 - else - { - if ( ubStatusIndex != RENDER_ITEM_NOSTATUS ) - { - // Now display # of items - if ( pObject->ubNumberOfObjects > 1 ) - { - SetFontForeground( FONT_GRAY4 ); - - sNewY = sY + sHeight - 10; - swprintf( pStr, L"%d", pObject->ubNumberOfObjects ); - - // Get length of string - uiStringLength=StringPixLength(pStr, ITEM_FONT ); - - sNewX = sX + sWidth - uiStringLength - 4; - - if ( uiBuffer == guiSAVEBUFFER ) - { - RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 ); - } - mprintf( sNewX, sNewY, pStr ); - gprintfinvalidate( sNewX, sNewY, pStr ); - } - - } - } -#endif if ( ItemHasAttachments( pObject, pSoldier, iter ) ) { if ( !IsGrenadeLauncherAttached( pObject, iter ) ) @@ -4093,8 +4044,8 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec // HEADROCK HAM 4: Advanced Icons VOBJECT_DESC VObjectDesc; VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; - //strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); - GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language + strcpy( VObjectDesc.ImageFile, "INTERFACE\\ItemInfoAdvancedIcons.STI" ); + //GetMLGFilename( VObjectDesc.ImageFile, MLG_ITEMINFOADVANCEDICONS ); // WANNE: Now the icons are for multi-language AddVideoObject( &VObjectDesc, &guiItemInfoAdvancedIcon); } @@ -12697,28 +12648,39 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier // Add attachment string.... CHAR16 attachString[ 300 ]; + CHAR16 tempString[ 120 ]; memset(attachString,0,sizeof(attachString)); - for (attachmentList::iterator iter = (*pObject)[subObject]->attachments.begin(); iter != (*pObject)[subObject]->attachments.end(); ++iter) { - if(iter->exists()){ - - //Break off if it's too long. - if(wcslen(attachString)>270){ - wcscat( attachString, L"\n...." ); - break; - } + for (attachmentList::iterator iter = (*pObject)[subObject]->attachments.begin(); iter != (*pObject)[subObject]->attachments.end(); ++iter) + { + if(iter->exists()) + { + memset(tempString, 0, sizeof(tempString)); iNumAttachments++; - - if ( iNumAttachments == 1 ) + if (iNumAttachments == 1) { - swprintf( attachString, L"\n \n%s:\n", Message[ STR_ATTACHMENTS ] ); + swprintf(tempString, L"\n \n%s:\n", Message[STR_ATTACHMENTS]); } else { - wcscat( attachString, L"\n" ); + swprintf(tempString, L"\n"); } + wcscat(tempString, ItemNames[iter->usItem]); - wcscat( attachString, ItemNames[ iter->usItem ] ); + auto attachStringLength = wcslen(attachString); + auto tempStringLength = wcslen(tempString); + auto totalLength = attachStringLength + tempStringLength; + // Break off if the string to be added does not fit. + // attachStringLength[300] - L"\n...." -> 294 + if (totalLength > 294) + { + wcscat(attachString, L"\n...."); + break; + } + else + { + wcscat(attachString, tempString); + } } } diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index ddc3ada5..5184a270 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -73,7 +70,6 @@ // HEADROCK HAM 3.6: This is required for Stat Progress Bars #include "Campaign.h" #include "Food.h" // added by Flugente -#endif //legion by Jazz #include "Interface Utils.h" @@ -4636,10 +4632,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason) if ( fNearLowerLevel ) { - if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack()) { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]); return; @@ -4650,10 +4643,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason) if ( fNearHeigherLevel ) { - if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack()) { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]); return; @@ -4666,10 +4656,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason) if (gGameExternalOptions.fCanClimbOnWalls == TRUE) { - if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack()) { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]); return; @@ -4685,10 +4672,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason) if ( FindFenceJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) ) { - if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack()) { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]); return; @@ -5215,7 +5199,7 @@ BOOLEAN InitializeTEAMPanel( ) if (iResolution >= _640x480 && iResolution < _800x600) FilenameForBPP("INTERFACE\\bottom_bar.sti", VObjectDesc.ImageFile); - else if (iResolution < _1024x768) + else if (iResolution < _1280x720) { if (gGameOptions.ubSquadSize > 6) { @@ -5256,6 +5240,16 @@ BOOLEAN InitializeTEAMPanel( ) memset( gfTEAM_HandInvDispText, 0, sizeof( gfTEAM_HandInvDispText ) ); + // Offset button coordinates to correct positions if squadsize is 10 + if (iResolution == _1280x720) + { + UINT16 offset = 223; + TM_ENDTURN_X = xResOffset + (xResSize - 131) + offset; + TM_ROSTERMODE_X = xResOffset + (xResSize - 131) + offset; + TM_DISK_X = xResOffset + (xResSize - 131) + offset; + INTERFACE_CLOCK_TM_X = xResOffset + (xResSize - 86) + offset; + LOCATION_NAME_TM_X = xResOffset + (xResSize - 92) + offset; + } // Create buttons CHECKF( CreateTEAMPanelButtons( ) ); @@ -5374,7 +5368,7 @@ BOOLEAN ShutdownTEAMPanel( ) if( fRenderRadarScreen == FALSE ) { // start rendering radar region again, - fRenderRadarScreen = TRUE; + fRenderRadarScreen = TRUE; // remove squad panel CreateDestroyMouseRegionsForSquadList( ); diff --git a/Tactical/Interface Utils.cpp b/Tactical/Interface Utils.cpp index 2031ba35..b0bbfae5 100644 --- a/Tactical/Interface Utils.cpp +++ b/Tactical/Interface Utils.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include "sgp.h" @@ -20,7 +17,6 @@ #include "Vehicles.h" #include "GameSettings.h" #include "Utilities.h" // added by Flugente -#endif #define LIFE_BAR_SHADOW FROMRGB( 108, 12, 12 ) #define LIFE_BAR FROMRGB( 200, 0, 0 ) diff --git a/Tactical/Interface.cpp b/Tactical/Interface.cpp index 5bd9d75e..faabedf2 100644 --- a/Tactical/Interface.cpp +++ b/Tactical/Interface.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -65,7 +62,6 @@ #include "SkillCheck.h" // added by Flugente #include "Drugs And Alcohol.h" // sevenfm #include "english.h" // sevenfm -#endif #include "InterfaceItemImages.h" #ifdef JA2UB diff --git a/Tactical/Interface.h b/Tactical/Interface.h index adbd2f21..4c9ead18 100644 --- a/Tactical/Interface.h +++ b/Tactical/Interface.h @@ -5,6 +5,7 @@ #include "mousesystem.h" #include "structure.h" #include "Assignments.h" // added by Flugente for the stat-enums +#include #define MAX_UICOMPOSITES 4 diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp index f552825e..e6c1220e 100644 --- a/Tactical/Inventory Choosing.cpp +++ b/Tactical/Inventory Choosing.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include "Inventory Choosing.h" #include "animation data.h" @@ -20,7 +17,7 @@ #include "message.h" #include "Tactical Save.h" // added by Flugente #include "Soldier macros.h" // added by Flugente -#endif + #include "Rebel Command.h" extern WorldItems gAllWorldItems; /* @@ -276,6 +273,10 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8 // SANDRO - new behaviour of progress setting bEquipmentModifier = bEquipmentRating + ( ( CalcDifficultyModifier( bSoldierClass ) / 10 ) - 5 ); + + if (bSoldierClass >= SOLDIER_CLASS_ADMINISTRATOR && bSoldierClass <= SOLDIER_CLASS_ARMY) + bEquipmentModifier += RebelCommand::GetEnemyEquipmentCoolnessModifier(); + switch( gGameOptions.ubProgressSpeedOfItemsChoices ) { case ITEM_PROGRESS_VERY_SLOW: @@ -943,6 +944,8 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC // don't allow it to be lower than marksmanship, we don't want it to affect their chances of hitting bStatus = (INT8)max( pp->bMarksmanship, bStatus ); + // ... unless we've done something to ruin their gear + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(bStatus); CreateItem( usGunIndex, bStatus, &(pp->Inv[ HANDPOS ]) ); pp->Inv[ HANDPOS ].fFlags |= OBJECT_UNDROPPABLE; @@ -1457,6 +1460,7 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC //INVTYPE *pItem; //UINT16 usRandom; UINT16 usItem = 0, usHelmetItem = 0, usVestItem = 0, usLeggingsItem = 0; + INT8 bStatus = 0; //UINT16 usNumMatches; //INT8 bOrigVestClass = bVestClass; @@ -1466,24 +1470,43 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC // So we are going to try to pick something other than nothing but not guarantee it. if (gGameExternalOptions.fSoldiersWearAnyArmour) { - if (bHelmetClass < MIN_EQUIPMENT_CLASS) bHelmetClass = MIN_EQUIPMENT_CLASS; - if (bVestClass < MIN_EQUIPMENT_CLASS) bVestClass = MIN_EQUIPMENT_CLASS; - if (bLeggingsClass < MIN_EQUIPMENT_CLASS) bLeggingsClass = MIN_EQUIPMENT_CLASS; - - // Make the first attempt for each item type - usHelmetItem = PickARandomItem(HELMET, pp->ubSoldierClass, bHelmetClass, TRUE); - usVestItem = PickARandomItem(VEST, pp->ubSoldierClass, bVestClass, TRUE); - usLeggingsItem = PickARandomItem(LEGS, pp->ubSoldierClass, bLeggingsClass, TRUE); - - // PickARandomItem(getMatchingCoolness = TRUE) must have a strong reason to return 0 disregarding wantedCoolness - // we pass, e.g. itemChoices is empty or filled with improper items. So let's make another attempt to ensure we did - // all what we can. Unlikely it will help, though. - if (usHelmetItem == 0) - usHelmetItem = PickARandomItem(HELMET, pp->ubSoldierClass, bHelmetClass, TRUE); - if (usVestItem == 0) - usVestItem = PickARandomItem(VEST, pp->ubSoldierClass, bVestClass, TRUE); - if (usLeggingsItem == 0) - usLeggingsItem = PickARandomItem(LEGS, pp->ubSoldierClass, bLeggingsClass, TRUE); + INT8 i = 0; + if (bHelmetClass < 1) bHelmetClass = 1; + //search for a non-empty class with items we need + for (i = bHelmetClass;i <= 10;i++) + { + usHelmetItem = PickARandomItem(HELMET, pp->ubSoldierClass, i); + //if we find a non-empty class change to that and break + if (usHelmetItem > 0) + { + bHelmetClass = i; + break; + } + } + if (bVestClass < 1) bVestClass = 1; + //search for a non-empty class with items we need + for (i = bVestClass;i <= 10;i++) + { + usVestItem = PickARandomItem(VEST, pp->ubSoldierClass, i); + //if we find a non-empty class change to that and break + if (usVestItem > 0) + { + bVestClass = i; + break; + } + } + if (bLeggingsClass < 1) bLeggingsClass = 1; + //search for a non-empty class with items we need + for (i = bLeggingsClass;i <= 10;i++) + { + usLeggingsItem = PickARandomItem(LEGS, pp->ubSoldierClass, i); + //if we find a non-empty class change to that and break + if (usLeggingsItem > 0) + { + bLeggingsClass = i; + break; + } + } } //Madd: added minimum protection of 10 for armours to be used by enemies @@ -1494,7 +1517,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC if(!gGameExternalOptions.fSoldiersWearAnyArmour) usHelmetItem = PickARandomItem(HELMET, pp->ubSoldierClass, bHelmetClass ); if ( usHelmetItem > 0 && Item[usHelmetItem].usItemClass == IC_ARMOUR && !(pp->Inv[ HELMETPOS ].fFlags & OBJECT_NO_OVERWRITE) && Armour[ Item[usHelmetItem].ubClassIndex ].ubArmourClass == ARMOURCLASS_HELMET ) { - CreateItem( usHelmetItem, (INT8)(70+Random(31)), &(pp->Inv[ HELMETPOS ]) ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usHelmetItem, bStatus, &(pp->Inv[ HELMETPOS ]) ); pp->Inv[ HELMETPOS ].fFlags |= OBJECT_UNDROPPABLE; // roll to see if he gets an attachment, too. Higher chance the higher his entitled helmet class is @@ -1503,7 +1527,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC UINT16 usAttachment = PickARandomAttachment(ARMOURATTACHMENT, pp->ubSoldierClass, usHelmetItem, bHelmetClass, FALSE); if ( usAttachment > 0 ) { - CreateItem( usAttachment, (INT8)(70+Random(31)), &gTempObject ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usAttachment, bStatus, &gTempObject ); gTempObject.fFlags |= OBJECT_UNDROPPABLE; pp->Inv[ HELMETPOS ].AttachObject( NULL, &gTempObject, FALSE ); } @@ -1567,7 +1592,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC if(!gGameExternalOptions.fSoldiersWearAnyArmour) usVestItem = PickARandomItem(VEST, pp->ubSoldierClass, bVestClass ); if ( usVestItem > 0 && Item[usVestItem].usItemClass == IC_ARMOUR && !(pp->Inv[ VESTPOS ].fFlags & OBJECT_NO_OVERWRITE) && Armour[ Item[usVestItem].ubClassIndex ].ubArmourClass == ARMOURCLASS_VEST ) { - CreateItem( usVestItem, (INT8)(70+Random(31)), &(pp->Inv[ VESTPOS ]) ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usVestItem, bStatus, &(pp->Inv[ VESTPOS ]) ); pp->Inv[ VESTPOS ].fFlags |= OBJECT_UNDROPPABLE; // roll to see if he gets a CERAMIC PLATES, too. Higher chance the higher his entitled vest class is @@ -1576,7 +1602,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC UINT16 usAttachment = PickARandomAttachment(ARMOURATTACHMENT, pp->ubSoldierClass, usVestItem, bVestClass, FALSE); if ( usAttachment > 0 ) { - CreateItem( usAttachment, (INT8)(70+Random(31)), &gTempObject ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usAttachment, bStatus, &gTempObject ); gTempObject.fFlags |= OBJECT_UNDROPPABLE; pp->Inv[ VESTPOS ].AttachObject( NULL, &gTempObject, FALSE ); } @@ -1661,7 +1688,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC if(!gGameExternalOptions.fSoldiersWearAnyArmour) usLeggingsItem = PickARandomItem(LEGS, pp->ubSoldierClass, bLeggingsClass ); if ( usLeggingsItem > 0 && Item[usLeggingsItem].usItemClass == IC_ARMOUR && !(pp->Inv[ LEGPOS ].fFlags & OBJECT_NO_OVERWRITE) && Armour[ Item[usLeggingsItem].ubClassIndex ].ubArmourClass == ARMOURCLASS_LEGGINGS ) { - CreateItem( usLeggingsItem, (INT8)(70+Random(31)), &(pp->Inv[ LEGPOS ]) ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usLeggingsItem, bStatus, &(pp->Inv[ LEGPOS ]) ); pp->Inv[ LEGPOS ].fFlags |= OBJECT_UNDROPPABLE; // roll to see if he gets an attachment, too. Higher chance the higher his entitled Leggings class is @@ -1670,7 +1698,8 @@ void ChooseArmourForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bHelmetC UINT16 usAttachment = PickARandomAttachment(ARMOURATTACHMENT, pp->ubSoldierClass, usLeggingsItem, bLeggingsClass, FALSE); if ( usAttachment > 0 ) { - CreateItem( usAttachment, (INT8)(70+Random(31)), &gTempObject ); + bStatus = RebelCommand::GetEnemyEquipmentStatusModifier(70 + Random(31)); + CreateItem( usAttachment, bStatus, &gTempObject ); gTempObject.fFlags |= OBJECT_UNDROPPABLE; pp->Inv[ LEGPOS ].AttachObject( NULL, &gTempObject, FALSE); } @@ -2231,7 +2260,15 @@ void ChooseLBEsForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bLBEClass { CreateItem( usItem, (INT8)(80 + Random( 21 )), &gTempObject ); gTempObject.fFlags |= OBJECT_UNDROPPABLE; - PlaceObjectInSoldierCreateStruct( pp, &gTempObject ); + // put backpacks into the backpack slot for LOBOT + if ((UsingNewInventorySystem()) && (Item[usItem].usItemClass & IC_LBEGEAR) && (LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass == BACKPACK)) + { + pp->Inv[BPACKPOCKPOS] = gTempObject; + } + else + { + PlaceObjectInSoldierCreateStruct( pp, &gTempObject ); + } } } @@ -3325,10 +3362,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness if ( i > gArmyItemChoices[bSoldierClass][ typeIndex ].ubChoices ) break; - if (getMatchingCoolness == TRUE) - uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices); - else // otherwise there is a chance to pick nothing! - uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices + (int)(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices / 3)); + uiChoice = Random(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices + (int)(gArmyItemChoices[bSoldierClass][typeIndex].ubChoices / 3)); if ( uiChoice >= gArmyItemChoices[bSoldierClass][ typeIndex ].ubChoices ) { @@ -3350,7 +3384,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness pickItem = FALSE; - if (usItem > 0 && Item[usItem].randomitem == 0 && ItemIsLegal(usItem)) + if (usItem >= 0 && Item[usItem].ubCoolness <= wantedCoolness && ItemIsLegal(usItem)) { // On day if (DayTime() == TRUE) @@ -3372,6 +3406,9 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness pickItem = TRUE; } } + + if (Item[usItem].randomitem > 0) + pickItem = FALSE; } @@ -3381,8 +3418,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, INT8 bSoldierClass, UINT8 wantedCoolness if (pickItem == TRUE) { // pick a default item in case we don't find anything with a matching coolness, but pick the most matching (by coolness) item - if ( defaultItem == 0 || - abs((int)wantedCoolness - (int)Item[usItem].ubCoolness) < abs((int)wantedCoolness - (int)Item[defaultItem].ubCoolness)) + if (defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness) { defaultItem = usItem; } @@ -4085,7 +4121,7 @@ void TakeMilitiaEquipmentfromSector( INT16 sMapX, INT16 sMapY, INT8 sMapZ, SOLDI if ( uiTotalNumberOfRealItems == 0 ) { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Militia found no items to equip, uses harsh langugage instead!" ); + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Militia found no items to equip, uses harsh language instead!" ); return; } diff --git a/Tactical/Item Types.cpp b/Tactical/Item Types.cpp index 2c213d9e..0c899e08 100644 --- a/Tactical/Item Types.cpp +++ b/Tactical/Item Types.cpp @@ -594,13 +594,7 @@ LBENODE* OBJECTTYPE::GetLBEPointer(unsigned int index) bool OBJECTTYPE::exists() { -#if 0//dnl ch75 011113 - if(this == NULL) - return(FALSE); - return (ubNumberOfObjects > 0 && usItem != NOTHING); -#else return(this && ubNumberOfObjects && usItem); -#endif } void OBJECTTYPE::SpliceData(OBJECTTYPE& sourceObject, unsigned int numToSplice, StackedObjects::iterator beginIter) diff --git a/Tactical/Item Types.h b/Tactical/Item Types.h index fac26280..fb78fe59 100644 --- a/Tactical/Item Types.h +++ b/Tactical/Item Types.h @@ -1220,6 +1220,10 @@ typedef struct BOOLEAN fProvidesRobotLaserBonus; //shadooow: bitflag controlling what system needs to be in play for item to appear UINT8 usLimitedToSystem; + + // rftr: the progress bounds that allow a transport group to drop an item + INT8 iTransportGroupMinProgress; + INT8 iTransportGroupMaxProgress; } INVTYPE; diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 01e07f7a..eb4cfeb9 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "items.h" #include "Action Items.h" #include "weapons.h" @@ -61,7 +58,6 @@ #include "DisplayCover.h" // added by Flugente #include "Map Information.h" #include "ai.h" // added by Flugente -#endif #ifdef JA2UB #include "Ja25_Tactical.h" @@ -3035,49 +3031,6 @@ UINT16 CalculateItemSize( OBJECTTYPE *pObject ) currentSize = __max(iSize + testSize, currentSize); currentSize = __min(currentSize, maxSize); } -#if 0 -//old method - UINT16 newSize, testSize, maxSize; - UINT8 cnt=0; - newSize = 0; - maxSize = max(iSize, LoadBearingEquipment[Item[pObject->usItem].ubClassIndex].lbeFilledSize); - // Look for the ItemSize of the largest item in this LBENODE - for(UINT16 x = 0; x < invsize; ++x) - { - if(pLBE->inv[x].exists() == true) - { - testSize = CalculateItemSize(&(pLBE->inv[x])); - //Now that we have the size of one item, we want to factor in the number of items since two - // items take up more space then one. - testSize = testSize + pLBE->inv[x].ubNumberOfObjects - 1; - testSize = min(testSize,34); - //We also need to increase the size of guns so they'll fit with the rest of our calculations. - if(testSize < 5) - testSize += 10; - if(testSize < 10) - testSize += 18; - //Finally, we want to factor in multiple pockets. We'll do this by counting the number of filled - // pockets, then add this count total to our newSize when everything is finished. - cnt++; - newSize = max(testSize, newSize); - } - } - //Add the total number of filled pockets to our NewSize to account for multiple pockets being used - newSize += cnt; - newSize = min(newSize,34); - // If largest item is smaller then LBE, don't change ItemSize - if(newSize > 0 && newSize < iSize) { - iSize = iSize; - } - // if largest item is larget then LBE but smaller then max size, partially increase ItemSize - else if(newSize >= iSize && newSize < maxSize) { - iSize = newSize; - } - // if largest item is larger then max size, reset ItemSize to max size - else if(newSize >= maxSize) { - iSize = maxSize; - } -#endif } } } @@ -8462,19 +8415,7 @@ BOOLEAN CreateItem( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj ) { (*pObj).fFlags |= OBJECT_UNDROPPABLE; } -#if 0//dnl ch74 201013 create default attachments rather at gun status instead of 100% - for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){ - if(Item [ usItem ].defaultattachments[cnt] == 0) - break; - - //cannot use gTempObject - OBJECTTYPE defaultAttachment; - CreateItem(Item [ usItem ].defaultattachments[cnt],100,&defaultAttachment); - pObj->AttachObject(NULL,&defaultAttachment, FALSE); - } -#else AttachDefaultAttachments(pObj);//dnl ch75 261013 -#endif } DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("CreateItem: return %d",fRet)); @@ -12648,44 +12589,7 @@ UINT16 PickARandomLaunchable(UINT16 itemIndex) UINT16 usNumMatches = 0; UINT16 usRandom = 0; UINT16 lowestCoolness = LowestLaunchableCoolness(itemIndex); -#if 0 - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomLaunchable: itemIndex = %d", itemIndex)); - // WANNE: This should fix the hang on the merc positioning screen (fix by Razer) - //while( !usNumMatches ) - { //Count the number of valid launchables - for( i = 0; i < MAXITEMS; ++i ) - { - if ( Item[i].usItemClass == 0 ) - break; - //Madd: quickfix: make it not choose best grenades right away. - if( ValidLaunchable( i, itemIndex ) && ItemIsLegal(i) && Item[i].ubCoolness <= max(HighestPlayerProgressPercentage()/10,lowestCoolness) ) - usNumMatches++; - } - } - - if( usNumMatches ) - { - usRandom = (UINT16)Random( usNumMatches ); - for( i = 0; i < MAXITEMS; ++i ) - { - if ( Item[i].usItemClass == 0 ) - break; - - if( ValidLaunchable( i, itemIndex ) && ItemIsLegal(i) && Item[i].ubCoolness <= max(HighestPlayerProgressPercentage()/10,lowestCoolness) ) - { - if( usRandom ) - usRandom--; - else - { - return i; - } - } - } - } -#endif - - // Flugente: the above code is highly dubious.. why do we loop over all items 2 times, and why that obscure usRandom--; business? This can cause an underflow! BOOLEAN isnight = NightTime(); UINT16 maxcoolness = max( HighestPlayerProgressPercentage() / 10, lowestCoolness ); @@ -14174,29 +14078,29 @@ INT16 GetFlatToHitBonus( OBJECTTYPE * pObj ) // HEADROCK: Function to get average of all "best laser range" attributes from weapon and attachments INT16 GetAverageBestLaserRange( OBJECTTYPE * pObj ) { - INT16 bonus=0; + FLOAT bonus = 0.0; INT16 numModifiers=0; if (Item[pObj->usItem].bestlaserrange > 0) { numModifiers++; - bonus += Item[pObj->usItem].bestlaserrange; + bonus += (FLOAT) Item[pObj->usItem].bestlaserrange; } for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) { if (Item[iter->usItem].bestlaserrange > 0 && iter->exists()) { numModifiers++; - bonus += Item[iter->usItem].bestlaserrange; + bonus += (FLOAT) Item[iter->usItem].bestlaserrange; } } - if (numModifiers>0) + if (numModifiers > 1) { bonus = bonus / numModifiers; } - return( bonus * gItemSettings.fBestLaserRangeModifier ); + return (INT16)(bonus * gItemSettings.fBestLaserRangeModifier); } // get the best laser range from the weapon and attachments @@ -14216,7 +14120,7 @@ INT16 GetBestLaserRange( OBJECTTYPE * pObj ) } } - return( range * gItemSettings.fBestLaserRangeModifier ); + return (INT16) ((FLOAT)range * gItemSettings.fBestLaserRangeModifier); } // HEADROCK: This function determines the bipod bonii of the gun or its attachments @@ -15738,14 +15642,9 @@ BOOLEAN GetItemFromRandomItem( UINT16 usRandomItem, UINT16* pusNewItem ) // as it is also possible to reference to other random items, we also have to check for them // clear the random item arrays and reset the counters - for ( int i = 0; i < RANDOM_ITEM_MAX_NUMBER; ++i) - randomitemarray[i] = 0; - - for ( int i = 0; i < RANDOM_TABOO_MAX; ++i) - { - randomitemtabooarray[i] = 0; - randomitemclasstabooarray[i] = 0; - } + memset(randomitemarray, 0, sizeof(randomitemarray)); + memset(randomitemtabooarray, 0, sizeof(randomitemtabooarray)); + memset(randomitemclasstabooarray, 0, sizeof(randomitemclasstabooarray)); itemcnt = 0; rdtaboocnt = 0; @@ -16111,3 +16010,21 @@ bool HasScopeMagFactorForGun( UINT16 ausItemGun, FLOAT aFactor ) return false; } + +UINT16 GetLaunchableOfExplosionType(UINT16 launcher, UINT8 explosionType) +{ + for (int i = 0; i < MAXITEMS; i++) + { + UINT16 launchable = Launchable[i][0]; + + if (launchable == 0) // if reached end of Launchable list, then stop + break; + + if (Launchable[i][1] == launcher) + { + if (Explosive[Item[launchable].ubClassIndex].ubType == explosionType) + return launchable; + } + } + return NOTHING; +} diff --git a/Tactical/Items.h b/Tactical/Items.h index f25b10e4..b494c434 100644 --- a/Tactical/Items.h +++ b/Tactical/Items.h @@ -576,5 +576,6 @@ FLOAT GetAttackAPTraitMultiplier( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, UINT8 // sevenfm: check if this type of grenade can use delayed mode BOOLEAN CanDelayGrenadeExplosion( UINT16 usItem ); +UINT16 GetLaunchableOfExplosionType(UINT16 launcher, UINT8 explosionType); #endif diff --git a/Tactical/Ja25_Tactical.cpp b/Tactical/Ja25_Tactical.cpp index 850c4161..4893ce49 100644 --- a/Tactical/Ja25_Tactical.cpp +++ b/Tactical/Ja25_Tactical.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "items.h" #include "weapons.h" #include "Soldier Control.h" @@ -36,7 +33,6 @@ #include "utilities.h" #include "english.h" #include "debug control.h" -#endif #ifdef JA2UB #include "worldman.h" diff --git a/Tactical/Keys.cpp b/Tactical/Keys.cpp index 33539dc0..b5e9c0c3 100644 --- a/Tactical/Keys.cpp +++ b/Tactical/Keys.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -40,7 +37,6 @@ #include "Map Screen Interface.h" #include "GameSettings.h" // added by SANDRO #include "Dialogue Control.h" // added by Flugente -#endif #include "GameVersion.h" @@ -1171,6 +1167,11 @@ BOOLEAN LoadDoorTableFromDoorTableTempFile( ) +static auto ComplainAboutMissingDoorStructure(const INT32 GridNo) { +#if JA2TESTVERSION + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", GridNo); +#endif +} // fOpen is True if the door is open, false if it is closed BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen ) @@ -1194,9 +1195,7 @@ BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen ) if ( pBaseStructure == NULL ) { -#if 0 - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", sGridNo ); -#endif + ComplainAboutMissingDoorStructure(sGridNo); return( FALSE ); } @@ -1318,9 +1317,7 @@ BOOLEAN IsDoorOpen( INT32 sGridNo ) if ( pBaseStructure == NULL ) { -#if 0 - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", sGridNo ); -#endif + ComplainAboutMissingDoorStructure(sGridNo); return( FALSE ); } @@ -1371,6 +1368,7 @@ DOOR_STATUS *GetDoorStatus( INT32 sGridNo ) if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(sGridNo); return( NULL ); } @@ -1531,9 +1529,7 @@ void SyncronizeDoorStatusToStructureData( DOOR_STATUS *pDoorStatus ) if ( pBaseStructure == NULL ) { -#if 0 - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", pDoorStatus->sGridNo ); -#endif + ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo); return; } @@ -1615,9 +1611,7 @@ void InternalUpdateDoorGraphicFromStatus( DOOR_STATUS *pDoorStatus, BOOLEAN fUse if ( pBaseStructure == NULL ) { -#if 0 - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", pDoorStatus->sGridNo ); -#endif + ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo); return; } diff --git a/Tactical/LOS.cpp b/Tactical/LOS.cpp index 25318a2a..6da81f5d 100644 --- a/Tactical/LOS.cpp +++ b/Tactical/LOS.cpp @@ -1,7 +1,4 @@ #include "connect.h" -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "builddefines.h" #include @@ -44,7 +41,6 @@ #include "items.h" #include "Item Types.h" #include "Vehicles.h" -#endif #include "fresh_header.h" #include "WorldDat.h" // HEADROCK HAM 3.6: This must be included, for testing whether Bloodcats and Enemies can see one another. @@ -3022,7 +3018,7 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend // Determine damage, checking guy's armour, etc sRange = GetRangeInCellCoordsFromGridNoDiff( pBullet->sOrigGridNo, pTarget->sGridNo ); - if ( gTacticalStatus.uiFlags & GODMODE && pBullet->ubFirerID != NOBODY && !(pFirer->flags.uiStatusFlags & SOLDIER_PC)) + if ( gTacticalStatus.uiFlags & GODMODE && pTarget->bTeam == OUR_TEAM && pBullet->ubFirerID != NOBODY && !(pFirer->flags.uiStatusFlags & SOLDIER_PC)) { // in god mode, and firer is computer controlled iImpact = 0; @@ -4809,15 +4805,7 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, dDeltaX = dEndX - dStartX; dDeltaY = dEndY - dStartY; dDeltaZ = dEndZ - dStartZ; -#if 0//dnl ch60 020913 isn't true see reason in FireBulletGivenTarget - //lal bugfix - if( dDeltaZ > 0 ) - d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ ); - else - d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#else d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#endif iDistance = (INT32) d2DDistance; if ( d2DDistance != iDistance ) @@ -5308,15 +5296,9 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA dDeltaX = dEndX - dStartX; dDeltaY = dEndY - dStartY; dDeltaZ = dEndZ - dStartZ; -#if 0//dnl ch60 311009 this isn't correct, e.g. if you try head shot from prone to standing target at 1 tile, Distance3D will calculate 7,8 tile distance, this means that you will always hit target regard of CTH calculation, correct usage will be Distance3D(dDeltaX, dDeltaY, CONVERT_HEIGHTUNITS_TO_DISTANCE(dDeltaZ)) but we need here 2D distance as was in original v1.12 - //lal bugfix - if( dDeltaZ > 0 ) - d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ ); - else - d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#else + /* see previous commit for historically interesting comment on the reason Distance2D instead + of Distance3D is used here */ d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#endif iDistance = (INT32) d2DDistance; if ( d2DDistance != iDistance ) @@ -5817,15 +5799,7 @@ INT8 FireFragmentGivenTarget( UINT16 ubOwner, FLOAT dStartX, FLOAT dStartY, FLOA dDeltaX = dEndX - dStartX; dDeltaY = dEndY - dStartY; dDeltaZ = dEndZ - dStartZ; -#if 0//dnl ch60 030913 - //lal bugfix - if( dDeltaZ > 0 ) - d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ ); - else - d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#else d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#endif iDistance = (INT32) d2DDistance; if ( d2DDistance != iDistance ) @@ -5994,15 +5968,7 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT dDeltaX = dEndX - dStartX; dDeltaY = dEndY - dStartY; dDeltaZ = dEndZ - dStartZ; -#if 0//dnl ch60 030913 - //lal bugfix - if( dDeltaZ > 0 ) - d2DDistance = Distance3D( dDeltaX, dDeltaY, dDeltaZ ); - else - d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#else d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#endif iDistance = (INT32) d2DDistance; if ( d2DDistance != iDistance ) @@ -8588,11 +8554,7 @@ void AdjustTargetCenterPoint( SOLDIERTYPE *pShooter, INT32 iTargetGridNo, FLOAT /////////////////////////////////////////////////////////////////////// // Find distance between shooter and target, in points. FLOAT d2DDistance=0; -#if 0//dnl ch60 030913 - d2DDistance = Distance3D( dDeltaX, dDeltaY, CONVERT_HEIGHTUNITS_TO_DISTANCE( dDeltaZ ) ); -#else d2DDistance = Distance2D( dDeltaX, dDeltaY ); -#endif // Round it upwards. INT32 iDistance = (INT32) d2DDistance; if ( d2DDistance != iDistance ) diff --git a/Tactical/LogicalBodyTypes/Filter.cpp b/Tactical/LogicalBodyTypes/Filter.cpp index 1c303a03..648105bf 100644 --- a/Tactical/LogicalBodyTypes/Filter.cpp +++ b/Tactical/LogicalBodyTypes/Filter.cpp @@ -2,6 +2,21 @@ namespace LogicalBodyTypes { +INT32 CompareAttachment(SOLDIERTYPE* pSoldier, INVENTORY_SLOT slot, UINT8 index) +{ + INT32 cmp_val = 0; + + if (pSoldier->inv[slot].objectStack.size() > 0) + { + OBJECTTYPE* const attachment = pSoldier->inv[slot].objectStack.front().GetAttachmentAtIndex(index); + if (attachment) { cmp_val = attachment->usItem; } + else { cmp_val = 0; } + } + else { cmp_val = 0; } + + return cmp_val; +} + Filter::Filter(void) { } @@ -186,6 +201,9 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) { case REQ_WEAPON_CLASS: cmp_val = Weapon[pSoldier->inv[HANDPOS].usItem].ubWeaponClass; break; + case REQ_LEFT_WEAPON_CLASS: + cmp_val = Weapon[pSoldier->inv[SECONDHANDPOS].usItem].ubWeaponClass; + break; case REQ_WEAPON_TYPE: cmp_val = Weapon[pSoldier->inv[HANDPOS].usItem].ubWeaponType; break; @@ -195,6 +213,12 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) { case REQ_CALIBRE: cmp_val = Weapon[pSoldier->inv[HANDPOS].usItem].ubCalibre; break; + case REQ_WEAPON_TWOHANDED: + cmp_val = TwoHandedItem(pSoldier->inv[HANDPOS].usItem); + break; + case REQ_LEFT_WEAPON_TWOHANDED: + cmp_val = TwoHandedItem(pSoldier->inv[SECONDHANDPOS].usItem); + break; case REQ_VEST_AMOR_PROTECTION: cmp_val = Armour[Item[pSoldier->inv[VESTPOS].usItem].ubClassIndex].ubProtection; break; @@ -210,6 +234,30 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) { case REQ_WEARING_BACKPACK: cmp_val = pSoldier->inv[BPACKPOCKPOS].exists(); break; + case REQ_HELMETPOSATTACHMENT0: + cmp_val = CompareAttachment(pSoldier, HELMETPOS, 0); + break; + case REQ_HELMETPOSATTACHMENT1: + cmp_val = CompareAttachment(pSoldier, HELMETPOS, 1); + break; + case REQ_HELMETPOSATTACHMENT2: + cmp_val = CompareAttachment(pSoldier, HELMETPOS, 2); + break; + case REQ_HELMETPOSATTACHMENT3: + cmp_val = CompareAttachment(pSoldier, HELMETPOS, 3); + break; + case REQ_LEGPOSATTACHMENT0: + cmp_val = CompareAttachment(pSoldier, LEGPOS, 0); + break; + case REQ_LEGPOSATTACHMENT1: + cmp_val = CompareAttachment(pSoldier, LEGPOS, 1); + break; + case REQ_LEGPOSATTACHMENT2: + cmp_val = CompareAttachment(pSoldier, LEGPOS, 2); + break; + case REQ_LEGPOSATTACHMENT3: + cmp_val = CompareAttachment(pSoldier, LEGPOS, 3); + break; default: if (q < NUM_REQTYPESINV) { cmp_val = pSoldier->inv[q].usItem; diff --git a/Tactical/LogicalBodyTypes/Filter.h b/Tactical/LogicalBodyTypes/Filter.h index ac687087..b8a865d2 100644 --- a/Tactical/LogicalBodyTypes/Filter.h +++ b/Tactical/LogicalBodyTypes/Filter.h @@ -56,14 +56,25 @@ public: REQ_NICKNAME, REQ_WEAPON_IN_HAND, REQ_WEAPON_CLASS, + REQ_LEFT_WEAPON_CLASS, REQ_WEAPON_TYPE, REQ_LEFT_WEAPON_TYPE, REQ_CALIBRE, + REQ_WEAPON_TWOHANDED, + REQ_LEFT_WEAPON_TWOHANDED, REQ_VEST_AMOR_PROTECTION, REQ_VEST_AMOR_COVERAGE, REQ_HELMET_AMOR_PROTECTION, REQ_HELMET_AMOR_COVERAGE, REQ_WEARING_BACKPACK, + REQ_HELMETPOSATTACHMENT0, + REQ_HELMETPOSATTACHMENT1, + REQ_HELMETPOSATTACHMENT2, + REQ_HELMETPOSATTACHMENT3, + REQ_LEGPOSATTACHMENT0, + REQ_LEGPOSATTACHMENT1, + REQ_LEGPOSATTACHMENT2, + REQ_LEGPOSATTACHMENT3, NUM_REQTYPES, // 3rd byte is for operator flags _REQ_BTWN = 0x20000, @@ -86,7 +97,7 @@ public: }; typedef std::pair NumberPair; typedef std::list StringList; - typedef std::list NumberList; + typedef std::vector NumberList; union criterionVariant { INT32 number; std::wstring* string; diff --git a/Tactical/LogicalBodyTypes/FilterDB.cpp b/Tactical/LogicalBodyTypes/FilterDB.cpp index 4cb3030e..747d19f1 100644 --- a/Tactical/LogicalBodyTypes/FilterDB.cpp +++ b/Tactical/LogicalBodyTypes/FilterDB.cpp @@ -270,7 +270,7 @@ namespace LogicalBodyTypes { /***************************************** Filter enum criterion types ******************************************/ - LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 33, + LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 43, Filter::REQ_HELMETPOS, Filter::REQ_VESTPOS, Filter::REQ_LEGPOS, @@ -299,23 +299,34 @@ namespace LogicalBodyTypes { Filter::REQ_FACEINDEX, Filter::REQ_WEAPON_IN_HAND, Filter::REQ_CALIBRE, + Filter::REQ_WEAPON_TWOHANDED, + Filter::REQ_LEFT_WEAPON_TWOHANDED, Filter::REQ_VEST_AMOR_PROTECTION, Filter::REQ_VEST_AMOR_COVERAGE, Filter::REQ_HELMET_AMOR_PROTECTION, Filter::REQ_HELMET_AMOR_COVERAGE, - Filter::REQ_WEARING_BACKPACK + Filter::REQ_WEARING_BACKPACK, + Filter::REQ_HELMETPOSATTACHMENT0, + Filter::REQ_HELMETPOSATTACHMENT1, + Filter::REQ_HELMETPOSATTACHMENT2, + Filter::REQ_HELMETPOSATTACHMENT3, + Filter::REQ_LEGPOSATTACHMENT0, + Filter::REQ_LEGPOSATTACHMENT1, + Filter::REQ_LEGPOSATTACHMENT2, + Filter::REQ_LEGPOSATTACHMENT3 ); /***************************************** Filter enum criterion types ******************************************/ - LOGBT_ENUMDB_ADD("EnumFilterCriterionTypes", 8, + LOGBT_ENUMDB_ADD("EnumFilterCriterionTypes", 9, Filter::REQ_SEX, Filter::REQ_MERC_TYPE, Filter::REQ_SOLDIER_CLASS, Filter::REQ_CIVILIANGROUP, Filter::REQ_BODYTYPE, Filter::REQ_WEAPON_CLASS, + Filter::REQ_LEFT_WEAPON_CLASS, Filter::REQ_WEAPON_TYPE, Filter::REQ_LEFT_WEAPON_TYPE ); @@ -671,6 +682,17 @@ namespace LogicalBodyTypes { MONSTERCLASS ); + LOGBT_ENUMDB_ADD("LEFT_WEAPON_CLASS", NUM_WEAPON_CLASSES, + NOGUNCLASS, + HANDGUNCLASS, + SMGCLASS, + RIFLECLASS, + MGCLASS, + SHOTGUNCLASS, + KNIFECLASS, + MONSTERCLASS + ); + /***************************************** Weapon Type ******************************************/ diff --git a/Tactical/LogicalBodyTypes/SurfaceDB.cpp b/Tactical/LogicalBodyTypes/SurfaceDB.cpp index 1cef23ee..2d1fdf72 100644 Binary files a/Tactical/LogicalBodyTypes/SurfaceDB.cpp and b/Tactical/LogicalBodyTypes/SurfaceDB.cpp differ diff --git a/Tactical/Map Information.cpp b/Tactical/Map Information.cpp index ad4a0bda..0ff75813 100644 --- a/Tactical/Map Information.cpp +++ b/Tactical/Map Information.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "edit_sys.h" -#else #include #include "fileMan.h" #include "types.h" @@ -20,7 +16,6 @@ #include "environment.h" #include "lighting.h" #include "Animated ProgressBar.h" -#endif //CHRISL: MAJOR_MAP_VERSION information moved to worlddef.h by ADB. We're using these values elsewhere and need them // in the header file @@ -204,327 +199,6 @@ void SaveMapInformation(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMinorMapVe //loading and won't be permanently updated until the map is saved, regardless of changes. void UpdateOldVersionMap() { -#if 0 //This code is no longer needed since the major version update from 1.0 to 4.0 - //However, I am keeping it in for reference. - SOLDIERINITNODE *curr; - INT32 i; - LEVELNODE *pStruct; - //VERSION 0 -- obsolete November 14, 1997 - if( gMapInformation.ubMapVersion == 0 ) - { - //Soldier information contained two fixable bugs. - gMapInformation.ubMapVersion++; - curr = gSoldierInitHead; - while( curr ) - { - //Bug #01) Nodes without detailed slots weren't initialized. - if( !curr->pBasicPlacement->fDetailedPlacement ) - curr->pDetailedPlacement = NULL; - //Bug #02) The attitude variable was accidentally being generated like attributes - // which put it completely out of range. - if( curr->pBasicPlacement->bAttitude > 7 ) - curr->pBasicPlacement->bAttitude = (INT8)Random(8); - //go to next node - curr = curr->next; - } - } - //VERSION 1 -- obsolete January 7, 1998 - if( gMapInformation.ubMapVersion == 1 ) - { - gMapInformation.ubMapVersion++; - //Bug #03) Removing all wall decals from map, because of new changes to the slots - // as well as certain decals found commonly in illegal places. - for( i = 0; i < WORLD_MAX; i++ ) - { - RemoveAllStructsOfTypeRange( i, FIRSTWALLDECAL, LASTWALLDECAL ); - RemoveAllStructsOfTypeRange( i, FIFTHWALLDECAL, SIXTHWALLDECAL ); - } - } - //VERSION 2 -- obsolete February 3, 1998 - if( gMapInformation.ubMapVersion == 2 ) - { - gMapInformation.ubMapVersion++; - curr = gSoldierInitHead; - while( curr ) - { - //Bug #04) Assign enemy mercs default army color code if applicable - if( curr->pBasicPlacement->bTeam == ENEMY_TEAM && !curr->pBasicPlacement->ubSoldierClass ) - { - if( !curr->pDetailedPlacement ) - { - curr->pBasicPlacement->ubSoldierClass = SOLDIER_CLASS_ARMY; - } - else if( curr->pDetailedPlacement && curr->pDetailedPlacement->ubProfile == NO_PROFILE ) - { - curr->pBasicPlacement->ubSoldierClass = SOLDIER_CLASS_ARMY; - curr->pDetailedPlacement->ubSoldierClass = SOLDIER_CLASS_ARMY; - } - } - curr = curr->next; - } - } - //VERSION 3 -- obsolete February 9, 1998 - if( gMapInformation.ubMapVersion == 3 ) - { - gMapInformation.ubMapVersion++; - //Bug #05) Move entry points down if necessary. - ValidateEntryPointGridNo( &gMapInformation.sNorthGridNo ); - ValidateEntryPointGridNo( &gMapInformation.sEastGridNo ); - ValidateEntryPointGridNo( &gMapInformation.sSouthGridNo ); - ValidateEntryPointGridNo( &gMapInformation.sWestGridNo ); - } - //VERSION 4 -- obsolete February 25, 1998 - if( gMapInformation.ubMapVersion == 4 ) - { - gMapInformation.ubMapVersion++; - //6) Change all doors to FIRSTDOOR - for( i = 0; i < WORLD_MAX; ++i ) - { - //NOTE: Here are the index values for the various doors - //DOOR OPEN CLOSED - //FIRST 916 912 - //SECOND 936 932 - //THIRD 956 952 - //FOURTH 976 972 - pStruct = gpWorldLevelData[ i ].pStructHead; - while( pStruct ) - { - //outside topleft - if( pStruct->usIndex == 932 || pStruct->usIndex == 952 || pStruct->usIndex == 972 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 912 ); - break; - } - else if( pStruct->usIndex == 936 || pStruct->usIndex == 956 || pStruct->usIndex == 976 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 916 ); - break; - } - //outside topright - else if( pStruct->usIndex == 927 || pStruct->usIndex == 947 || pStruct->usIndex == 967 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 907 ); - break; - } - else if( pStruct->usIndex == 931 || pStruct->usIndex == 951 || pStruct->usIndex == 971 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 911 ); - break; - } - //inside topleft - else if( pStruct->usIndex == 942 || pStruct->usIndex == 962 || pStruct->usIndex == 982 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 922 ); - break; - } - else if( pStruct->usIndex == 946 || pStruct->usIndex == 966 || pStruct->usIndex == 986 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 926 ); - break; - } - //inside topright - else if( pStruct->usIndex == 937 || pStruct->usIndex == 957 || pStruct->usIndex == 977 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 917 ); - break; - } - else if( pStruct->usIndex == 941 || pStruct->usIndex == 961 || pStruct->usIndex == 981 ) - { - ReplaceStructIndex( i, pStruct->usIndex, 921 ); - break; - } - pStruct = pStruct->pNext; - } - } - } - //VERSION 5 -- obsolete March 4, 1998 - if( gMapInformation.ubMapVersion == 5 ) - { - gMapInformation.ubMapVersion++; - //Bug 7) Remove all exit grids (the format has changed) - for( i = 0; i < WORLD_MAX; i++ ) - RemoveExitGridFromWorld( i ); - } - //VERSION 6 -- obsolete March 9, 1998 - if( gMapInformation.ubMapVersion == 6 ) - { //Bug 8) Change droppable status of merc items so that they are all undroppable. - gMapInformation.ubMapVersion++; - curr = gSoldierInitHead; - while( curr ) - { - //Bug #04) Assign enemy mercs default army color code if applicable - if( curr->pDetailedPlacement ) - { - INT32 invsize = (INT32)curr->pDetailedPlacement->Inv.size(); - for( i = 0; i < invsize; ++i ) - { //make all items undroppable, even if it is empty. This will allow for - //random item generation, while empty, droppable slots are locked as empty - //during random item generation. - curr->pDetailedPlacement->Inv[ i ].fFlags |= OBJECT_UNDROPPABLE; - } - } - curr = curr->next; - } - } - //VERSION 7 -- obsolete April 14, 1998 - if( gMapInformation.ubMapVersion == 7 ) - { - gMapInformation.ubMapVersion++; - //Bug 9) Priority placements have been dropped in favor of splitting it into two categories. - // The first is Detailed placements, and the second is priority existance. So, all - // current detailed placements will also have priority existance. - curr = gSoldierInitHead; - while( curr ) - { - if( curr->pDetailedPlacement ) - { - curr->pBasicPlacement->fPriorityExistance = TRUE; - } - curr = curr->next; - } - } - - if( gMapInformation.ubMapVersion == 14 ) - { //Toast all of the ambiguous road pieces that ended up wrapping the byte. - LEVELNODE *pStruct, *pStruct2; - INT32 i; - for( i = 0; i < WORLD_MAX; i++ ) - { - pStruct = gpWorldLevelData[ i ].pObjectHead; - if( pStruct && pStruct->usIndex == 1078 && i < WORLD_MAX-2 && i >= 320 ) - { //This is the only detectable road piece that we can repair. - pStruct2 = gpWorldLevelData[ i+1 ].pObjectHead; - if( pStruct2 && pStruct2->usIndex == 1081 ) - { - RemoveObject( i, pStruct->usIndex ); - RemoveObject( i+1, pStruct->usIndex+1 ); - RemoveObject( i+2, pStruct->usIndex+2 ); - RemoveObject( i-160, pStruct->usIndex-160 ); - RemoveObject( i-159, pStruct->usIndex-159 ); - RemoveObject( i-158, pStruct->usIndex-158 ); - RemoveObject( i-320, pStruct->usIndex-320 ); - RemoveObject( i-319, pStruct->usIndex-319 ); - RemoveObject( i-318, pStruct->usIndex-318 ); - AddObjectToTail( i, 1334 ); - AddObjectToTail( i-160, 1335 ); - AddObjectToTail( i-320, 1336 ); - AddObjectToTail( i+1, 1337 ); - AddObjectToTail( i-159, 1338 ); - AddObjectToTail( i-319, 1339 ); - AddObjectToTail( i+2, 1340 ); - AddObjectToTail( i-158, 1341 ); - AddObjectToTail( i-318, 1342 ); - } - } - else if( pStruct && pStruct->usIndex >= 1079 && pStruct->usIndex < 1115 ) - { - RemoveObject( i, pStruct->usIndex ); - } - } - } - - if( gMapInformation.ubMapVersion <= 7 ) - { - if( gfEditMode ) - { - #ifdef JA2TESTVERSION - ScreenMsg( FONT_MCOLOR_RED, MSG_ERROR, L"Currently loaded map is corrupt! Allowing the map to load anyway!" ); - #endif - } - else - { - if( gbWorldSectorZ ) - { - AssertMsg( 0, String( "Currently loaded map (%c%d_b%d.dat) is invalid -- less than the minimum supported version.", gWorldSectorY + 'A' - 1, gWorldSectorX, gbWorldSectorZ ) ); - } - else if( !gbWorldSectorZ ) - { - AssertMsg( 0, String( "Currently loaded map (%c%d.dat) is invalid -- less than the minimum supported version.", gWorldSectorY + 'A' - 1, gWorldSectorX ) ); - } - } - } - //VERSION 8 -- obsolete April 18, 1998 - if( gMapInformation.ubMapVersion == 8 ) - { - gMapInformation.ubMapVersion++; - //Bug 10) Padding on detailed placements is uninitialized. Clear all data starting at - // fKillSlotIfOwnerDies. - curr = gSoldierInitHead; - while( curr ) - { - if( curr->pDetailedPlacement ) - { - //The size 120 was hand calculated. The remaining padding was 118 bytes - //and there were two one byte fields cleared, fKillSlotIfOwnerDies and ubScheduleID - memset( &curr->pDetailedPlacement->fKillSlotIfOwnerDies, 0, 120 ); - } - curr = curr->next; - } - } - //Version 9 -- Kris -- obsolete April 27, 1998 - if( gMapInformation.ubMapVersion == 9 ) - { - gMapInformation.ubMapVersion++; - curr = gSoldierInitHead; - while( curr ) - { - //Bug 11) Convert all wheelchaired placement bodytypes to cows. Result of change in the animation database. - if( curr->pDetailedPlacement && curr->pDetailedPlacement->ubBodyType == CRIPPLECIV ) - { - curr->pDetailedPlacement->ubBodyType = COW; - curr->pBasicPlacement->ubBodyType = COW; - } - curr = curr->next; - } - } - if( gMapInformation.ubMapVersion < 12 ) - { - gMapInformation.ubMapVersion = 12; - gMapInformation.sCenterGridNo = -1; - } - if( gMapInformation.ubMapVersion < 13 ) - { //replace all merc ammo inventory slots status value with the max ammo that the clip can hold. - INT32 cnt; - OBJECTTYPE *pItem; - gMapInformation.ubMapVersion++; - //Bug 10) Padding on detailed placements is uninitialized. Clear all data starting at - // fKillSlotIfOwnerDies. - curr = gSoldierInitHead; - while( curr ) - { - if( curr->pDetailedPlacement ) - { - UINT32 invsize = curr->pDetailedPlacement->Inv.size(); - for ( UINT32 i = 0; i < invsize; ++i ) - { - pItem = &curr->pDetailedPlacement->Inv[ i ]; - if( Item[ pItem->usItem ].usItemClass & IC_AMMO ) - { - for( cnt = 0; cnt < pItem->ubNumberOfObjects; ++cnt ) - { - pItem->shots.ubShotsLeft[ cnt ] = Magazine[ Item[ pItem->usItem ].ubClassIndex ].ubMagSize; - } - } - } - } - curr = curr->next; - } - } - if( gMapInformation.ubMapVersion < 14 ) - { - gMapInformation.ubMapVersion++; - if( !gfCaves && !gfBasement ) - { - ReplaceObsoleteRoads(); - } - } - if( gMapInformation.ubMapVersion < 15 ) - { //Do nothing. The object layer was expanded from 1 byte to 2 bytes, effecting the - //size of the maps. This was due to the fact that the ROADPIECES tileset contains - //over 300 pieces, hence requiring a size increase of the tileset subindex for this - //layer only. - } -#endif //end of MAJOR VERSION 3.0 obsolete code if( gMapInformation.ubMapVersion < 15 ) { AssertMsg( 0, "Map is less than minimum supported version." ); diff --git a/Tactical/Merc Entering.cpp b/Tactical/Merc Entering.cpp index aaffbf2f..755ce62a 100644 --- a/Tactical/Merc Entering.cpp +++ b/Tactical/Merc Entering.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -41,7 +38,6 @@ // HEADROCK HAM 3.5: Need this to see if enemies present at starting sector #include "Overhead.h" #include "Map Information.h" // added by Flugente -#endif #ifdef JA2UB #include "ub_config.h" diff --git a/Tactical/Merc Hiring.cpp b/Tactical/Merc Hiring.cpp index c61e1ae1..acc9a409 100644 --- a/Tactical/Merc Hiring.cpp +++ b/Tactical/Merc Hiring.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "strategic.h" -#else #include "builddefines.h" #include #include @@ -53,7 +49,6 @@ #include "GameSettings.h" #include "DynamicDialogue.h"// added by Flugente #include "Dialogue Control.h" // added by Flugente -#endif #include "connect.h" #ifdef JA2UB diff --git a/Tactical/Militia Control.cpp b/Tactical/Militia Control.cpp index f03aa926..715db535 100644 --- a/Tactical/Militia Control.cpp +++ b/Tactical/Militia Control.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" -#else #include "Militia Control.h" #include "Town Militia.h" @@ -33,7 +29,6 @@ #include "MilitiaSquads.h" #include "MilitiaIndividual.h" // added by Flugente #include "CampaignStats.h" // added by Flugente -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -304,21 +299,6 @@ void PrepareMilitiaForTactical( BOOLEAN fPrepareAll) // If the sector is already loaded, don't add the existing militia for( x = 1; x < guiDirNumber ; ++x ) { -#if 0 - // ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%ld,%ld,%ld,%ld", gpAttackDirs[ x ][ 0 ], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2], gpAttackDirs[ x ][3] ); - if( gfMSResetMilitia ) - { - if( gpAttackDirs[ x ][ 3 ] != INSERTION_CODE_CENTER ) - { - AddSoldierInitListMilitiaOnEdge( gpAttackDirs[ x ][ 3 ], gpAttackDirs[ x ][0], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2] ); - ubGreen -= gpAttackDirs[ x ][0]; - ubRegs -= gpAttackDirs[ x ][1]; - ubElites -= gpAttackDirs[ x ][2]; - } - } - //else - //{ -#endif AddSoldierInitListMilitiaOnEdge( gpAttackDirs[ x ][ 3 ], gpAttackDirs[ x ][0], gpAttackDirs[ x ][1], gpAttackDirs[ x ][2] ); } diff --git a/Tactical/Morale.cpp b/Tactical/Morale.cpp index 2a41793f..9ff5e12f 100644 --- a/Tactical/Morale.cpp +++ b/Tactical/Morale.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include "Morale.h" #include "Overhead.h" @@ -32,7 +29,6 @@ #include "Soldier Add.h" // added by Flugente for MERC_TYPE__AIM_MERC #include "CampaignStats.h" // added by Flugente for gCurrentIncident #include "DynamicDialogue.h" // added by Flugente -#endif #include "connect.h" #include "fresh_header.h" diff --git a/Tactical/Overhead Types.h b/Tactical/Overhead Types.h index f321b9bb..3a86994b 100644 --- a/Tactical/Overhead Types.h +++ b/Tactical/Overhead Types.h @@ -2,6 +2,7 @@ #define __OVERHEAD_TYPES_H // GLOBAL HEADER FOR DATA, TYPES FOR TACTICAL ENGINE +#include "Types.h" #define REFINE_AIM_1 0 #define REFINE_AIM_MID1 1 @@ -335,280 +336,6 @@ extern UINT16 giMAXIMUM_NUMBER_OF_CIVS; #define LAN_TEAM_FOUR 9 //hayden -//----------------------------------------------- -// -// civilian "sub teams": -enum -{ - NON_CIV_GROUP = 0, - REBEL_CIV_GROUP, - KINGPIN_CIV_GROUP, - SANMONA_ARMS_GROUP, - ANGELS_GROUP, - BEGGARS_CIV_GROUP, - TOURISTS_CIV_GROUP, - ALMA_MILITARY_CIV_GROUP, - DOCTORS_CIV_GROUP, - COUPLE1_CIV_GROUP, - HICKS_CIV_GROUP, - WARDEN_CIV_GROUP, - JUNKYARD_CIV_GROUP, - FACTORY_KIDS_GROUP, - QUEENS_CIV_GROUP, - UNNAMED_CIV_GROUP_15, - UNNAMED_CIV_GROUP_16, - UNNAMED_CIV_GROUP_17, - UNNAMED_CIV_GROUP_18, - UNNAMED_CIV_GROUP_19, - ASSASSIN_CIV_GROUP, // Flugente: enemy assassins belong to this group - POW_PRISON_CIV_GROUP, // Flugente: prisoners of war the player caught are in this group - UNNAMED_CIV_GROUP_22, - UNNAMED_CIV_GROUP_23, - VOLUNTEER_CIV_GROUP, // Flugente: civilians that the player recruited - BOUNTYHUNTER_CIV_GROUP, // Flugente: hostile bounty hunters - DOWNEDPILOT_CIV_GROUP, // Flugente: downed pilots - SCIENTIST_GROUP, // Flugente: enemy civilian personnel - RADAR_TECHNICIAN_GROUP, - AIRPORT_STAFF_GROUP, - BARRACK_STAFF_GROUP, - FACTORY_GROUP, - ADMINISTRATIVE_STAFF_GROUP, - LOYAL_CIV_GROUP, // civil population deeply loyal to the queen - BLACKMARKET_GROUP, // black market dealer and bodyguards - UNNAMED_CIV_GROUP_35, - UNNAMED_CIV_GROUP_36, - UNNAMED_CIV_GROUP_37, - UNNAMED_CIV_GROUP_38, - UNNAMED_CIV_GROUP_39, - UNNAMED_CIV_GROUP_40, - UNNAMED_CIV_GROUP_41, - UNNAMED_CIV_GROUP_42, - UNNAMED_CIV_GROUP_43, - UNNAMED_CIV_GROUP_44, - UNNAMED_CIV_GROUP_45, - UNNAMED_CIV_GROUP_46, - UNNAMED_CIV_GROUP_47, - UNNAMED_CIV_GROUP_48, - UNNAMED_CIV_GROUP_49, - UNNAMED_CIV_GROUP_50, - UNNAMED_CIV_GROUP_51, - UNNAMED_CIV_GROUP_52, - UNNAMED_CIV_GROUP_53, - UNNAMED_CIV_GROUP_54, - UNNAMED_CIV_GROUP_55, - UNNAMED_CIV_GROUP_56, - UNNAMED_CIV_GROUP_57, - UNNAMED_CIV_GROUP_58, - UNNAMED_CIV_GROUP_59, - UNNAMED_CIV_GROUP_60, - UNNAMED_CIV_GROUP_61, - UNNAMED_CIV_GROUP_62, - UNNAMED_CIV_GROUP_63, - UNNAMED_CIV_GROUP_64, - UNNAMED_CIV_GROUP_65, - UNNAMED_CIV_GROUP_66, - UNNAMED_CIV_GROUP_67, - UNNAMED_CIV_GROUP_68, - UNNAMED_CIV_GROUP_69, - UNNAMED_CIV_GROUP_70, - UNNAMED_CIV_GROUP_71, - UNNAMED_CIV_GROUP_72, - UNNAMED_CIV_GROUP_73, - UNNAMED_CIV_GROUP_74, - UNNAMED_CIV_GROUP_75, - UNNAMED_CIV_GROUP_76, - UNNAMED_CIV_GROUP_77, - UNNAMED_CIV_GROUP_78, - UNNAMED_CIV_GROUP_79, - UNNAMED_CIV_GROUP_80, - UNNAMED_CIV_GROUP_81, - UNNAMED_CIV_GROUP_82, - UNNAMED_CIV_GROUP_83, - UNNAMED_CIV_GROUP_84, - UNNAMED_CIV_GROUP_85, - UNNAMED_CIV_GROUP_86, - UNNAMED_CIV_GROUP_87, - UNNAMED_CIV_GROUP_88, - UNNAMED_CIV_GROUP_89, - UNNAMED_CIV_GROUP_90, - UNNAMED_CIV_GROUP_91, - UNNAMED_CIV_GROUP_92, - UNNAMED_CIV_GROUP_93, - UNNAMED_CIV_GROUP_94, - UNNAMED_CIV_GROUP_95, - UNNAMED_CIV_GROUP_96, - UNNAMED_CIV_GROUP_97, - UNNAMED_CIV_GROUP_98, - UNNAMED_CIV_GROUP_99, - UNNAMED_CIV_GROUP_100, - UNNAMED_CIV_GROUP_101, - UNNAMED_CIV_GROUP_102, - UNNAMED_CIV_GROUP_103, - UNNAMED_CIV_GROUP_104, - UNNAMED_CIV_GROUP_105, - UNNAMED_CIV_GROUP_106, - UNNAMED_CIV_GROUP_107, - UNNAMED_CIV_GROUP_108, - UNNAMED_CIV_GROUP_109, - UNNAMED_CIV_GROUP_110, - UNNAMED_CIV_GROUP_111, - UNNAMED_CIV_GROUP_112, - UNNAMED_CIV_GROUP_113, - UNNAMED_CIV_GROUP_114, - UNNAMED_CIV_GROUP_115, - UNNAMED_CIV_GROUP_116, - UNNAMED_CIV_GROUP_117, - UNNAMED_CIV_GROUP_118, - UNNAMED_CIV_GROUP_119, - UNNAMED_CIV_GROUP_120, - UNNAMED_CIV_GROUP_121, - UNNAMED_CIV_GROUP_122, - UNNAMED_CIV_GROUP_123, - UNNAMED_CIV_GROUP_124, - UNNAMED_CIV_GROUP_125, - UNNAMED_CIV_GROUP_126, - UNNAMED_CIV_GROUP_127, - UNNAMED_CIV_GROUP_128, - UNNAMED_CIV_GROUP_129, - UNNAMED_CIV_GROUP_130, - UNNAMED_CIV_GROUP_131, - UNNAMED_CIV_GROUP_132, - UNNAMED_CIV_GROUP_133, - UNNAMED_CIV_GROUP_134, - UNNAMED_CIV_GROUP_135, - UNNAMED_CIV_GROUP_136, - UNNAMED_CIV_GROUP_137, - UNNAMED_CIV_GROUP_138, - UNNAMED_CIV_GROUP_139, - UNNAMED_CIV_GROUP_140, - - UNNAMED_CIV_GROUP_141, - UNNAMED_CIV_GROUP_142, - UNNAMED_CIV_GROUP_143, - UNNAMED_CIV_GROUP_144, - UNNAMED_CIV_GROUP_145, - UNNAMED_CIV_GROUP_146, - UNNAMED_CIV_GROUP_147, - UNNAMED_CIV_GROUP_148, - UNNAMED_CIV_GROUP_149, - UNNAMED_CIV_GROUP_150, - UNNAMED_CIV_GROUP_151, - UNNAMED_CIV_GROUP_152, - UNNAMED_CIV_GROUP_153, - UNNAMED_CIV_GROUP_154, - UNNAMED_CIV_GROUP_155, - UNNAMED_CIV_GROUP_156, - UNNAMED_CIV_GROUP_157, - UNNAMED_CIV_GROUP_158, - UNNAMED_CIV_GROUP_159, - UNNAMED_CIV_GROUP_160, - UNNAMED_CIV_GROUP_161, - UNNAMED_CIV_GROUP_162, - UNNAMED_CIV_GROUP_163, - UNNAMED_CIV_GROUP_164, - UNNAMED_CIV_GROUP_165, - UNNAMED_CIV_GROUP_166, - UNNAMED_CIV_GROUP_167, - UNNAMED_CIV_GROUP_168, - UNNAMED_CIV_GROUP_169, - UNNAMED_CIV_GROUP_170, - - UNNAMED_CIV_GROUP_171, - UNNAMED_CIV_GROUP_172, - UNNAMED_CIV_GROUP_173, - UNNAMED_CIV_GROUP_174, - UNNAMED_CIV_GROUP_175, - UNNAMED_CIV_GROUP_176, - UNNAMED_CIV_GROUP_177, - UNNAMED_CIV_GROUP_178, - UNNAMED_CIV_GROUP_179, - UNNAMED_CIV_GROUP_180, - UNNAMED_CIV_GROUP_181, - UNNAMED_CIV_GROUP_182, - UNNAMED_CIV_GROUP_183, - UNNAMED_CIV_GROUP_184, - UNNAMED_CIV_GROUP_185, - UNNAMED_CIV_GROUP_186, - UNNAMED_CIV_GROUP_187, - UNNAMED_CIV_GROUP_188, - UNNAMED_CIV_GROUP_189, - UNNAMED_CIV_GROUP_190, - UNNAMED_CIV_GROUP_191, - UNNAMED_CIV_GROUP_192, - UNNAMED_CIV_GROUP_193, - UNNAMED_CIV_GROUP_194, - UNNAMED_CIV_GROUP_195, - UNNAMED_CIV_GROUP_196, - UNNAMED_CIV_GROUP_197, - UNNAMED_CIV_GROUP_198, - UNNAMED_CIV_GROUP_199, - UNNAMED_CIV_GROUP_200, - - UNNAMED_CIV_GROUP_201, - UNNAMED_CIV_GROUP_202, - UNNAMED_CIV_GROUP_203, - UNNAMED_CIV_GROUP_204, - UNNAMED_CIV_GROUP_205, - UNNAMED_CIV_GROUP_206, - UNNAMED_CIV_GROUP_207, - UNNAMED_CIV_GROUP_208, - UNNAMED_CIV_GROUP_209, - UNNAMED_CIV_GROUP_210, - UNNAMED_CIV_GROUP_211, - UNNAMED_CIV_GROUP_212, - UNNAMED_CIV_GROUP_213, - UNNAMED_CIV_GROUP_214, - UNNAMED_CIV_GROUP_215, - UNNAMED_CIV_GROUP_216, - UNNAMED_CIV_GROUP_217, - UNNAMED_CIV_GROUP_218, - UNNAMED_CIV_GROUP_219, - UNNAMED_CIV_GROUP_220, - UNNAMED_CIV_GROUP_221, - UNNAMED_CIV_GROUP_222, - UNNAMED_CIV_GROUP_223, - UNNAMED_CIV_GROUP_224, - UNNAMED_CIV_GROUP_225, - UNNAMED_CIV_GROUP_226, - UNNAMED_CIV_GROUP_227, - UNNAMED_CIV_GROUP_228, - UNNAMED_CIV_GROUP_229, - UNNAMED_CIV_GROUP_230, - - UNNAMED_CIV_GROUP_231, - UNNAMED_CIV_GROUP_232, - UNNAMED_CIV_GROUP_233, - UNNAMED_CIV_GROUP_234, - UNNAMED_CIV_GROUP_235, - UNNAMED_CIV_GROUP_236, - UNNAMED_CIV_GROUP_237, - UNNAMED_CIV_GROUP_238, - UNNAMED_CIV_GROUP_239, - UNNAMED_CIV_GROUP_240, - UNNAMED_CIV_GROUP_241, - UNNAMED_CIV_GROUP_242, - UNNAMED_CIV_GROUP_243, - UNNAMED_CIV_GROUP_244, - UNNAMED_CIV_GROUP_245, - UNNAMED_CIV_GROUP_246, - UNNAMED_CIV_GROUP_247, - UNNAMED_CIV_GROUP_248, - UNNAMED_CIV_GROUP_249, - UNNAMED_CIV_GROUP_250, - - UNNAMED_CIV_GROUP_251, - UNNAMED_CIV_GROUP_252, - UNNAMED_CIV_GROUP_253, - UNNAMED_CIV_GROUP_254, - NUM_CIV_GROUPS -}; - -#define CIV_GROUP_NEUTRAL 0 -#define CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE 1 -#define CIV_GROUP_WILL_BECOME_HOSTILE 2 -#define CIV_GROUP_HOSTILE 3 - - // boxing state enum BoxingStates { @@ -621,15 +348,6 @@ enum BoxingStates LOST_ROUND } ; -//NOTE: The editor uses these enumerations, so please update the text as well if you modify or -// add new groups. Try to abbreviate the team name as much as possible. The text is in -// EditorMercs.c -#ifdef JA2EDITOR - extern CHAR16 gszCivGroupNames[ NUM_CIV_GROUPS ][ 128 ]; -#endif -// -//----------------------------------------------- - // PALETTE SUBSITUTION TYPES typedef struct { diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 8dca851e..315ec56c 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -1,11 +1,7 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#include "PreBattle Interface.h" -#include "creature spreading.h" -#include "Lua Interpreter.h" -#else #include #include +#include +#include #include "wcheck.h" #include "stdlib.h" #include "debug.h" @@ -118,7 +114,6 @@ #include "MilitiaIndividual.h" // added by Flugente #include "Rebel Command.h" #include "MilitiaSquads.h" -#endif #include "connect.h" #include "Luaglobal.h" @@ -1185,12 +1180,6 @@ BOOLEAN ExecuteOverhead( ) pSoldier->flags.fSoldierWasMoving = FALSE; HandlePlacingRoofMarker( pSoldier, pSoldier->sGridNo, TRUE, FALSE ); - - if ( !gGameSettings.fOptions[ TOPTION_MERC_ALWAYS_LIGHT_UP ] ) - { - pSoldier->DeleteSoldierLight( ); - pSoldier->SetCheckSoldierLightFlag( ); - } } } else @@ -7603,35 +7592,11 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) HandleGlobalLoyaltyEvent(GLOBAL_LOYALTY_BATTLE_LOST, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); } - // SANDRO - end quest if cleared the sector after interrogation (sector N7 by Meduna) - if ( gWorldSectorX == gModSettings.ubMeanwhileInterrogatePOWSectorX && gWorldSectorY == gModSettings.ubMeanwhileInterrogatePOWSectorY && - gbWorldSectorZ == 0) - { - if (gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS) - { - // Quest failed - InternalEndQuest(QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, FALSE); - } - else if (gubQuest[QUEST_INTERROGATION] == QUESTCANNOTSTART) - { - //shadooow: re-enable quest if player loses control of the N7 prison and quest was disabled previously - gubQuest[QUEST_INTERROGATION] = QUESTNOTSTARTED; - } - } - //shadooow: re-enable quest if player loses control of the Alma prison and quest was disabled previously - if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY && - gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_ALMA] == QUESTCANNOTSTART) - { - gubQuest[QUEST_HELD_IN_ALMA] = QUESTNOTSTARTED; - } #ifndef JA2UB - //shadooow: re-enable quest if player loses control of the Tixa prison and quest was disabled previously - if (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY && - gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_TIXA] == QUESTCANNOTSTART) - { - gubQuest[QUEST_HELD_IN_TIXA] = QUESTNOTSTARTED; - } - #endif + HandlePOWQuestState(Q_FAIL, QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + HandlePOWQuestState(Q_FAIL, QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + HandlePOWQuestState(Q_FAIL, QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + #endif // Play death music #ifdef NEWMUSIC @@ -7827,51 +7792,12 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated ) if (!is_networked) ShouldBeginAutoBandage( ); } - // SANDRO - end quest if cleared the sector after interrogation (sector N7 by Meduna) - if ( gWorldSectorX == gModSettings.ubMeanwhileInterrogatePOWSectorX && gWorldSectorY == gModSettings.ubMeanwhileInterrogatePOWSectorY && - gbWorldSectorZ == 0) - { - if (gubQuest[QUEST_INTERROGATION] == QUESTINPROGRESS) - { - // Complete quest - EndQuest( QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY ); - } - else if(gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) - { - //shadooow: disable quest if player takes control of the N7 prison - gubQuest[QUEST_INTERROGATION] = QUESTCANNOTSTART; - } - } - //shadooow: disable quest if player takes control of the Alma prison - if (gWorldSectorX == gModSettings.ubInitialPOWSectorX && gWorldSectorY == gModSettings.ubInitialPOWSectorY && - gbWorldSectorZ == 0) - { - if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTINPROGRESS) - { - // Complete quest - EndQuest(QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY); - } - else if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED) - { - gubQuest[QUEST_HELD_IN_ALMA] = QUESTCANNOTSTART; - } - } - #ifndef JA2UB - //shadooow: disable quest if player takes control of the Tixa prison - if (gWorldSectorX == gModSettings.ubTixaPrisonSectorX && gWorldSectorY == gModSettings.ubTixaPrisonSectorY && - gbWorldSectorZ == 0 && gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) - { - if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTINPROGRESS) - { - // Complete quest - EndQuest(QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY); - } - else if (gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED) - { - gubQuest[QUEST_HELD_IN_TIXA] = QUESTCANNOTSTART; - } - } - #endif + + #ifndef JA2UB + HandlePOWQuestState(Q_SUCCESS, QUEST_INTERROGATION, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + HandlePOWQuestState(Q_SUCCESS, QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + HandlePOWQuestState(Q_SUCCESS, QUEST_HELD_IN_TIXA, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); + #endif // Say battle end quote.... if (fAnEnemyRetreated) @@ -8599,16 +8525,14 @@ BOOLEAN CheckForLosingEndOfBattle( ) { //if( GetWorldDay() > STARTDAY_ALLOW_PLAYER_CAPTURE_FOR_RESCUE && !( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE )) { - #ifdef JA2UB - if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) - #else - if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) ) - #endif + #ifndef JA2UB + if ( gubQuest[ QUEST_HELD_IN_ALMA ] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[ QUEST_INTERROGATION ] == QUESTNOTSTARTED ) { fDoCapture = TRUE; // CJC Dec 1 2002: fix capture sequences BeginCaptureSquence(); } + #endif } } } @@ -8644,8 +8568,6 @@ BOOLEAN CheckForLosingEndOfBattle( ) if ( pTeamSoldier->stats.bLife != 0 && fDoCapture ) { EnemyCapturesPlayerSoldier( pTeamSoldier ); - - RemoveSoldierFromTacticalSector( pTeamSoldier, TRUE ); } } @@ -9308,11 +9230,6 @@ void HandleSuppressionFire( UINT16 ubTargetedMerc, UINT16 ubCausedAttacker ) { DebugAI(AI_MSG_INFO, pSoldier, String("CancelAIAction: suppression: change stance/cower")); CancelAIAction( pSoldier, TRUE ); -#if 0 - pSoldier->aiData.bAction = AI_ACTION_CHANGE_STANCE; - pSoldier->aiData.usActionData = ubNewStance; - pSoldier->aiData.bActionInProgress = TRUE; -#endif } // go for it! @@ -9654,38 +9571,6 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) UINT32 cnt; UINT16 ubID; -#if 0 - // 0verhaul: None of this is necessary anymore with the new attack busy system - if (ubID == NOBODY) - { - pSoldier = NULL; - pTarget = NULL; - } - else - { - pSoldier = MercPtrs[ ubID ]; - if ( ubTargetID != NOBODY) - { - pTarget = MercPtrs[ ubTargetID ]; - } - else - { - pTarget = NULL; - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String(">>Target ptr is null!" ) ); - } - } - - if (fCalledByAttacker) - { - if (pSoldier && Item[pSoldier->inv[HANDPOS].usItem].usItemClass & IC_GUN) - { - if (pSoldier->bBulletsLeft > 0) - { - return( pTarget ); - } - } - } -#endif // if ((gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT)) // { @@ -9726,7 +9611,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) pSoldier = NULL; - if (gTacticalStatus.ubCurrentTeam == gbPlayerNum) + if (gTacticalStatus.ubCurrentTeam == gbPlayerNum && gusSelectedSoldier < TOTAL_SOLDIERS) { pSoldier = MercPtrs[ gusSelectedSoldier ]; } @@ -9747,7 +9632,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) // If we still haven't figured out who last acted, it could be that the team number changed during the attack. Unfortunately this // can happen during a switch from real-time. For now we will assume the last actor was a PC, but a real "Who started this?" pointer // would work quite well. If only I could close all the holes that the UI opens so that one routine could handle everything. - if (!pSoldier) + if (!pSoldier && gusSelectedSoldier < TOTAL_SOLDIERS) { if (is_networked) { @@ -9810,15 +9695,6 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) return( NULL ); } #endif -#if 0 - // 0verhaul: This is moved to the end loop where everybody's state is reset for the next action - if (pTarget) - { - // reset # of shotgun pellets hit by - pTarget->bNumPelletsHitBy = 0; - // reset flag for making "ow" sound on being shot - } -#endif if (pSoldier) { @@ -10111,17 +9987,6 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( ) SOLDIERTYPE * ReduceAttackBusyCount( ) { -#if 0 - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("ReduceAttackBusyCount") ); - if ( ubID == NOBODY ) - { - return( InternalReduceAttackBusyCount( ubID, fCalledByAttacker, NOBODY ) ); - } - else - { - return( InternalReduceAttackBusyCount( ubID, fCalledByAttacker, MercPtrs[ ubID ]->ubTargetID ) ); - } -#endif // 0verhaul: This is now a simple subroutine. return InternalReduceAttackBusyCount( ); } @@ -10138,26 +10003,6 @@ SOLDIERTYPE * FreeUpAttacker( ) return( ReduceAttackBusyCount( ) ); } -#if 0 -// 0verhaul: These routines are declared obsolete. Call ReduceAttackBusyCount instead. -SOLDIERTYPE * FreeUpAttackerGivenTarget( UINT8 ubID, UINT8 ubTargetID ) -{ - // Strange as this may seem, this function returns a pointer to - // the *target* in case the target has changed sides as a result - // of being attacked - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("FreeUpAttackerGivenTarget") ); - return( InternalReduceAttackBusyCount( ubID, TRUE, ubTargetID ) ); -} - -SOLDIERTYPE * ReduceAttackBusyGivenTarget( UINT8 ubID, UINT8 ubTargetID ) -{ - // Strange as this may seem, this function returns a pointer to - // the *target* in case the target has changed sides as a result - // of being attacked - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("ReduceAttackBusyGivenTarget") ); - return( InternalReduceAttackBusyCount( ubID, FALSE, ubTargetID ) ); -} -#endif void StopMercAnimation( BOOLEAN fStop ) @@ -10387,7 +10232,10 @@ void DoneFadeOutDueToDeath( ) void EndBattleWithUnconsciousGuysCallback( UINT8 bExitValue ) { // Enter mapscreen..... - if(!is_client)CheckAndHandleUnloadingOfCurrentWorld(); + if (!is_client) + { + CheckAndHandleUnloadingOfCurrentWorld(); + } else { ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[40] ); @@ -10531,6 +10379,12 @@ void DoPOWPathChecks( ) pSoldier->aiData.bNeutral = FALSE; AddCharacterToAnySquad( pSoldier ); pSoldier->DoMercBattleSound( BATTLE_SOUND_COOL1 ); + + // Decrement amount of prisoners + if (gStrategicStatus.ubNumCapturedForRescue > 0) + { + gStrategicStatus.ubNumCapturedForRescue--; + } } } } @@ -11181,6 +11035,107 @@ void HandleTurncoatAttempt( SOLDIERTYPE* pSoldier ) } } +void EscapeTimerCallback() +{ + const bool chanceToEscape = Chance(75); + bool escaped = false; + // Look for an escape direction for remaining mercs + std::array possibleEscapeDirections{ NORTH, EAST, SOUTH, WEST }; + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(possibleEscapeDirections.begin(), possibleEscapeDirections.end(), g); + + for (const auto direction : possibleEscapeDirections) + { + if (IsEscapeDirectionValid(direction) && chanceToEscape && gbWorldSectorZ == 0) // There is no escaping underground! For now.. + { + escaped = true; + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_ESCAPE]); + + JumpIntoEscapedSector(direction); + break; + } + } + + if (!escaped) + { + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_NO_ESCAPE]); + } +} + +void AttemptToCapturePlayerSoldiers() +{ +#ifdef JA2UB + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_REFUSE_TAKE_PRISONERS]); +#else + // in order for this to work, there must be no militia present, the enemy must not already have offered asked you to surrender, and certain quests may not be active + if (!(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0) + { + gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER; + + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) + { + BeginCaptureSquence(); + const UINT8 currentPOWs = gStrategicStatus.ubNumCapturedForRescue; + // Do capture + UINT32 i = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 const lastID = gTacticalStatus.Team[gbPlayerNum].bLastID; + for (SOLDIERTYPE* pSoldier = MercPtrs[i]; i <= lastID; ++i, ++pSoldier) + { + // Are we active and in sector + if (pSoldier->bActive && pSoldier->bInSector && pSoldier->bAssignment != ASSIGNMENT_POW) + { + if (pSoldier->stats.bLife != 0) + { + EnemyCapturesPlayerSoldier(pSoldier); + } + } + } + EndCaptureSequence(); + + if (currentPOWs < gStrategicStatus.ubNumCapturedForRescue) + { + gfSurrendered = TRUE; + } + else + { + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_REFUSE_TAKE_PRISONERS]); + } + } + } + else + { + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_REFUSE_TAKE_PRISONERS]); + } + + if (gfSurrendered == TRUE) + { + // If we have any remaining active mercs in sector after capture, give them a chance to escape from the clutches of Deidranna's soldiers! + bool activeMercs = false; + + UINT32 i = gTacticalStatus.Team[gbPlayerNum].bFirstID; + UINT32 lastId = gTacticalStatus.Team[gbPlayerNum].bLastID; + for (SOLDIERTYPE* pSoldier = MercPtrs[i]; i <= lastId; ++i, ++pSoldier) + { + // Are we active and in sector + const bool inSector = (pSoldier->sSectorX == gWorldSectorX && pSoldier->sSectorY == gWorldSectorY && pSoldier->bSectorZ == gbWorldSectorZ); + if (pSoldier->bActive && inSector && pSoldier->stats.bLife >= OKLIFE && pSoldier->bAssignment != ASSIGNMENT_POW) + { + activeMercs = true; + break; + } + } + + if (activeMercs) + { + SetCustomizableTimerCallbackAndDelay(500, EscapeTimerCallback, FALSE); + } + SetCustomizableTimerCallbackAndDelay(500, CaptureTimerCallback, FALSE); + CheckForEndOfBattle(FALSE); + } +#endif +} + void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue ) { SOLDIERTYPE *pSoldier = NULL; @@ -11345,49 +11300,7 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue ) return; } - // in order for this to work, there must be no militia present, the enemy must not already have offered asked you to surrender, and certain quests may not be active - if ( !( gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER ) && gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 ) - { - #ifdef JA2UB - if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) - #else - if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) - #endif - { - gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER; - - // CJC Dec 1 2002: fix multiple captures - BeginCaptureSquence(); - - // Do capture.... - uiCnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; - for ( pSoldier = MercPtrs[ uiCnt ]; uiCnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; ++uiCnt, ++pSoldier) - { - // Are we active and in sector..... - if ( pSoldier->bActive && pSoldier->bInSector ) - { - if ( pSoldier->stats.bLife != 0 ) - { - EnemyCapturesPlayerSoldier( pSoldier ); - - RemoveSoldierFromTacticalSector( pSoldier, TRUE ); - } - } - } - - EndCaptureSequence( ); - - gfSurrendered = TRUE; - SetCustomizableTimerCallbackAndDelay( 3000, CaptureTimerCallback, FALSE ); - - success = TRUE; - } - } - - if ( !success ) - { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[ STR_PRISONER_REFUSE_TAKE_PRISONERS ] ); - } + SetCustomizableTimerCallbackAndDelay(500, AttemptToCapturePlayerSoldiers, FALSE); } // we distract the enemy by essentially talking them to death else if ( ubExitValue == 3 ) diff --git a/Tactical/Overhead.h b/Tactical/Overhead.h index 96f92eaa..4d2ba7d9 100644 --- a/Tactical/Overhead.h +++ b/Tactical/Overhead.h @@ -4,7 +4,7 @@ #include #include #include "Soldier Control.h" -#include "overhead types.h" +#include #include "soldier find.h" #include "Campaign Types.h" // added by Flugente for SECTORINFO and UNDERGROUND_SECTORINFO #define ADD_SOLDIER_NO_PROFILE_ID 200 @@ -432,6 +432,6 @@ void VIPFleesToMeduna(); BOOLEAN IsCivFactionMemberAliveInSector( UINT8 usCivilianGroup ); BOOLEAN IsFreeSlotAvailable( int aTeam ); - +void AttemptToCapturePlayerSoldiers(); #endif diff --git a/Tactical/PATHAI.H b/Tactical/PATHAI.H index 2f0f949c..c48a06a3 100644 --- a/Tactical/PATHAI.H +++ b/Tactical/PATHAI.H @@ -10,12 +10,6 @@ #define _PATHAI_H #include "isometric utils.h" -// WANNE: Please do not use ASTAR pathing, -// because it is a HUGH PERFORMANCE KILLER on big maps!! -//#define USE_ASTAR_PATHS - -#ifdef USE_ASTAR_PATHS - namespace ASTAR { #include "BinaryHeap.hpp" #include @@ -188,8 +182,6 @@ private: };//end namespace ASTAR -#endif// USE_ASTAR_PATHS - BOOLEAN InitPathAI( void ); void ShutDownPathAI( void ); diff --git a/Tactical/PATHAI.cpp b/Tactical/PATHAI.cpp index 1409f396..25cebecf 100644 --- a/Tactical/PATHAI.cpp +++ b/Tactical/PATHAI.cpp @@ -8,9 +8,6 @@ Date : 1997-NOV */ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -44,7 +41,6 @@ #include "AIinternals.h" #include "Rotting Corpses.h" #include "Meanwhile.h" -#endif #include "connect.h" #include "LOS.h" //ddd @@ -53,12 +49,12 @@ class OBJECTTYPE; class SOLDIERTYPE; -#ifdef USE_ASTAR_PATHS #include "BinaryHeap.hpp" -#include "AIInternals.h" #include "opplist.h" #include "weapons.h" -#endif +extern BOOLEAN gubWorldTileInLight[MAX_ALLOWED_WORLD_MAX]; +extern BOOLEAN gubIsCorpseThere[MAX_ALLOWED_WORLD_MAX]; +extern INT32 gubMerkCanSeeThisTile[MAX_ALLOWED_WORLD_MAX]; //#include "dnlprocesstalk.h"//dnl??? extern UINT16 gubAnimSurfaceIndex[ TOTALBODYTYPES ][ NUMANIMATIONSTATES ]; @@ -458,9 +454,6 @@ UINT32 guiFailedPathChecks = 0; UINT32 guiUnsuccessfulPathChecks = 0; #endif -#ifdef USE_ASTAR_PATHS - - //ADB the extra cover feature is supposed to pick a path of the same distance as one calculated with the feature off, //but a safer path, usually farther away from an enemy or following behind some cover. //however it has not been tested and it may need some work, I haven't touched it in a while @@ -651,7 +644,7 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , fCloseGoodEnough = ( (fFlags & PATH_CLOSE_GOOD_ENOUGH) != 0); fConsiderPersonAtDestAsObstacle = (BOOLEAN)( fPathingForPlayer && fPathAroundPeople && !(fFlags & PATH_IGNORE_PERSON_AT_DEST) ); - if ( fNonSwimmer && Water( dest ) ) + if ( fNonSwimmer && Water( dest, 0 ) ) { DebugMsg( TOPIC_JA2, DBG_LEVEL_0, String( "ASTAR: path failed, water" ) ); return( 0 ); @@ -712,7 +705,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , guiTotalPathChecks++; #endif -#ifdef VEHICLE fMultiTile = ((pSoldier->flags.uiStatusFlags & SOLDIER_MULTITILE) != 0); if ( fMultiTile == false) @@ -762,7 +754,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , fContinuousTurnNeeded = FALSE; } } -#endif if (fContinuousTurnNeeded == false) { @@ -806,17 +797,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , if (gfDisplayCoverValues && gfDrawPathPoints) { SetRenderFlags( RENDER_FLAG_FULL ); -// The RenderCoverDebugInfo call is now made by RenderWorld. So don't try to call it here -#if 0 - if ( guiCurrentScreen == GAME_SCREEN ) - { - RenderWorld(); - RenderCoverDebug( ); - InvalidateScreen( ); - EndFrameBufferRender(); - RefreshScreen( NULL ); - } -#endif } #endif @@ -905,13 +885,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s , if (gfDisplayCoverValues && gfDrawPathPoints) { SetRenderFlags( RENDER_FLAG_FULL ); -#if 0 - RenderWorld(); - RenderCoverDebug( ); - InvalidateScreen( ); - EndFrameBufferRender(); - RefreshScreen( NULL ); -#endif } #endif @@ -1092,7 +1065,6 @@ void AStarPathfinder::ExecuteAStarLogic() continue; } -#ifdef VEHICLE //has side effects, including setting loop counters int retVal = VehicleObstacleCheck(); if (retVal == 1) @@ -1103,7 +1075,6 @@ void AStarPathfinder::ExecuteAStarLogic() { return; } -#endif //calc the cost to move from the current node to here INT16 terrainCost = EstimateActionPointCost( pSoldier, CurrentNode, direction, movementMode, 0, 3 ); @@ -1416,7 +1387,7 @@ INT16 AStarPathfinder::CalcAP(int const terrainCost, UINT8 const direction) } // Flugente: dragging someone - if ( pSoldier->IsDraggingSomeone( ) ) + if ( pSoldier->IsDragging( false ) ) { movementAPCost *= gItemSettings.fDragAPCostModifier; } @@ -1483,268 +1454,6 @@ INT16 AStarPathfinder::CalcAP(int const terrainCost, UINT8 const direction) return movementAPCost; } -int AStarPathfinder::CalcG(int* pPrevCost) -{ - //how much is admission to the next tile - if ( gfPathAroundObstacles == false) - { - return TRAVELCOST_FLAT; - } - - - int nextCost = gubWorldMovementCosts[ CurrentNode ][ direction ][ onRooftop ]; - *pPrevCost = nextCost; - - //if we are holding down shift and finding a direct path, count non obstacles as flat terrain - if (gfPlotDirectPath && nextCost < NOPASS && nextCost != 0) - { - return TRAVELCOST_FLAT; - } - - //performance: if nextCost is low then do not do many many if == checks - if ( nextCost >= TRAVELCOST_FENCE ) - { - //ATE: Check for differences from reality - // Is next cost an obstcale - if ( nextCost == TRAVELCOST_HIDDENOBSTACLE ) - { - if ( fPathingForPlayer ) - { - // Is this obstacle a hidden tile that has not been revealed yet? - BOOLEAN fHiddenStructVisible; - if( DoesGridNoContainHiddenStruct( CurrentNode, &fHiddenStructVisible ) ) - { - // Are we not visible, if so use terrain costs! - if ( !fHiddenStructVisible ) - { - // Set cost of terrain! - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - } - } - else if ( nextCost == TRAVELCOST_NOT_STANDING ) - { - // for path plotting purposes, use the terrain value - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - else if ( nextCost == TRAVELCOST_EXITGRID ) - { - if (gfPlotPathToExitGrid) - { - // replace with terrain cost so that we can plot path, otherwise is obstacle - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - - //ddd: window. { check 2 conditions: 1. if next tile is a window and we will have to hump through it - //2. if current tile is a window and we should jump through the window to reach another tile - else if ( nextCost == TRAVELCOST_JUMPABLEWINDOW - || nextCost == TRAVELCOST_JUMPABLEWINDOW_N - || nextCost == TRAVELCOST_JUMPABLEWINDOW_W) - { - - // don't let anyone path diagonally through doors! - if (IsDiagonal(direction) == true) - { - return -1; - } - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ];//? - - } - //ddd: window } - - else if ( nextCost == TRAVELCOST_FENCE && fNonFenceJumper ) - { - return -1; - } - else if ( IS_TRAVELCOST_DOOR( nextCost ) ) - { - // don't let anyone path diagonally through doors! - if (IsDiagonal(direction) == true) - { - return -1; - } - - INT32 iDoorGridNo = CurrentNode; - bool fDoorIsObstacleIfClosed = FALSE; - bool fDoorIsOpen = false; - switch( nextCost ) - { - case TRAVELCOST_DOOR_CLOSED_HERE: - fDoorIsObstacleIfClosed = TRUE; - iDoorGridNo = CurrentNode; - break; - case TRAVELCOST_DOOR_CLOSED_N: - fDoorIsObstacleIfClosed = TRUE; - iDoorGridNo = CurrentNode + dirDelta[ NORTH ]; - break; - case TRAVELCOST_DOOR_CLOSED_W: - fDoorIsObstacleIfClosed = TRUE; - iDoorGridNo = CurrentNode + dirDelta[ WEST ]; - break; - case TRAVELCOST_DOOR_OPEN_HERE: - iDoorGridNo = CurrentNode; - break; - case TRAVELCOST_DOOR_OPEN_N: - iDoorGridNo = CurrentNode + dirDelta[ NORTH ]; - break; - case TRAVELCOST_DOOR_OPEN_NE: - iDoorGridNo = CurrentNode + dirDelta[ NORTHEAST ]; - break; - case TRAVELCOST_DOOR_OPEN_E: - iDoorGridNo = CurrentNode + dirDelta[ EAST ]; - break; - case TRAVELCOST_DOOR_OPEN_SE: - iDoorGridNo = CurrentNode + dirDelta[ SOUTHEAST ]; - break; - case TRAVELCOST_DOOR_OPEN_S: - iDoorGridNo = CurrentNode + dirDelta[ SOUTH ]; - break; - case TRAVELCOST_DOOR_OPEN_SW: - iDoorGridNo = CurrentNode + dirDelta[ SOUTHWEST ]; - break; - case TRAVELCOST_DOOR_OPEN_W: - iDoorGridNo = CurrentNode + dirDelta[ WEST ]; - break; - case TRAVELCOST_DOOR_OPEN_NW: - iDoorGridNo = CurrentNode + dirDelta[ NORTHWEST ]; - break; - case TRAVELCOST_DOOR_OPEN_N_N: - iDoorGridNo = CurrentNode + dirDelta[ NORTH ] + dirDelta[ NORTH ]; - break; - case TRAVELCOST_DOOR_OPEN_NW_N: - iDoorGridNo = CurrentNode + dirDelta[ NORTHWEST ] + dirDelta[ NORTH ]; - break; - case TRAVELCOST_DOOR_OPEN_NE_N: - iDoorGridNo = CurrentNode + dirDelta[ NORTHEAST ] + dirDelta[ NORTH ]; - break; - case TRAVELCOST_DOOR_OPEN_W_W: - iDoorGridNo = CurrentNode + dirDelta[ WEST ] + dirDelta[ WEST ]; - break; - case TRAVELCOST_DOOR_OPEN_SW_W: - iDoorGridNo = CurrentNode + dirDelta[ SOUTHWEST ] + dirDelta[ WEST ]; - break; - case TRAVELCOST_DOOR_OPEN_NW_W: - iDoorGridNo = CurrentNode + dirDelta[ NORTHWEST ] + dirDelta[ WEST ]; - break; - default: - break; - } - - if ( fPathingForPlayer && gpWorldLevelData[ iDoorGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_DOOR_STATUS_PRESENT ) - { - // check door status - DOOR_STATUS* pDoorStatus = GetDoorStatus( iDoorGridNo ); - if (pDoorStatus) - { - fDoorIsOpen = (pDoorStatus->ubFlags & DOOR_PERCEIVED_OPEN) != 0; - } - else - { - // door destroyed? - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - else - { - // check door structure - STRUCTURE* pDoorStructure = FindStructure( iDoorGridNo, STRUCTURE_ANYDOOR ); - if (pDoorStructure) - { - fDoorIsOpen = (pDoorStructure->fFlags & STRUCTURE_OPEN) != 0; - } - else - { - // door destroyed? - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - - // now determine movement cost... if it hasn't been changed already - if ( IS_TRAVELCOST_DOOR( nextCost ) ) - { - if (fDoorIsOpen) - { - if (fDoorIsObstacleIfClosed) - { - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - else - { - nextCost = TRAVELCOST_OBSTACLE; - } - } - else - { - if (fDoorIsObstacleIfClosed) - { - // door is closed and this should be an obstacle, EXCEPT if we are calculating - // a path for an enemy or NPC with keys - if ( fPathingForPlayer || ( pSoldier && (pSoldier->flags.uiStatusFlags & (SOLDIER_MONSTER | SOLDIER_ANIMAL) ) ) ) - { - nextCost = TRAVELCOST_OBSTACLE; - } - else - { - // have to check if door is locked and NPC does not have keys! - // This function has an inaccurate name. It is actually checking if the door has LOCK info. - DOOR* pDoor = FindDoorInfoAtGridNo( iDoorGridNo ); - if (pDoor) - { - if (!pDoor->fLocked || pSoldier->flags.bHasKeys) - { - // add to AP cost - //if (maxAPBudget) - { - fGoingThroughDoor = TRUE; - } - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - else - { - nextCost = TRAVELCOST_OBSTACLE; - } - } - else - { - // The door is closed, so we still have to open it - fGoingThroughDoor = TRUE; - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - } - else - { - nextCost = gTileTypeMovementCost[ gpWorldLevelData[ CurrentNode ].ubTerrainID ]; - } - } - } - } - else if ( fNonSwimmer && ISWATER( gpWorldLevelData[ CurrentNode ].ubTerrainID)) - { - // creatures and animals can't go in water - nextCost = TRAVELCOST_OBSTACLE; - } - } - - // Apr. '96 - moved up be ahead of AP_Budget stuff - if ( nextCost >= NOPASS ) // || ( nextCost == TRAVELCOST_DOOR ) ) - { - return -1; - } - - // make water cost attractive for water to water paths - // Why? If a path through water gets you there sooner, you shouldn't need - // artificial inflation to figure that out. And if not, then get out of the water! - //if (bWaterToWater && ISWATER(nextCost) ) - //{ - // nextCost = EASYWATERCOST; - //} - - return nextCost; -}//end CalcG - int AStarPathfinder::CalcH() { if ( fCopyReachable ) @@ -1773,7 +1482,6 @@ int AStarPathfinder::CalcH() int x = abs(n1->x - n2->x); int y = abs(n1->y - n2->y); -#if 1 if (x >= y) { return this->travelcostDiag * y + this->travelcostOrth * (x-y); @@ -1782,35 +1490,6 @@ int AStarPathfinder::CalcH() { return this->travelcostDiag * x + this->travelcostOrth * (y-x); } -#else - // Try a real distance method. This should underestimate in some cases - // However, the distances need to be increased for the moment because running orthogonal is 1AP while running diagonal is 2AP - // so the total to reach a diagonal tile is identical for 2 moves. So we have to trick the pathing calc into thinking it's - // a longer distance and also calculate the other costs accordingly. - - x *= 100; - y *= 100; - - int d = x*x + y*y; - int r = 1200; // Just a guess - - if (d == 0) - { - return d; - } - - while (1) - { - int gr = (r + (d/r)) / 2; - if (gr == r || gr == r+1) - { - break; - } - r = gr; - } - - return r * travelcostOrth; -#endif } #ifdef ASTAR_USING_EXTRACOVER @@ -2120,7 +1799,6 @@ int AStarPathfinder::CalcCoverValue(INT32 sMyGridNo, INT32 iMyThreat, INT32 iMyA } #endif //#ifdef ASTAR_USING_EXTRACOVER -#ifdef VEHICLE void AStarPathfinder::InitVehicle() { fMultiTile = ((pSoldier->flags.uiStatusFlags & SOLDIER_MULTITILE) != 0); @@ -2267,7 +1945,6 @@ int AStarPathfinder::VehicleObstacleCheck() } return 0; } -#endif bool AStarPathfinder::WantToTraverse() { @@ -2415,7 +2092,6 @@ bool AStarPathfinder::IsSomeoneInTheWay() return false; } -#endif//end ifdef USE_ASTAR_PATHS INT8 RandomSkipListLevel( void ) { @@ -2488,27 +2164,29 @@ INT32 FindBestPath(SOLDIERTYPE *s , INT32 sDestination, INT8 bLevel, INT16 usMov { s->sPlotSrcGrid = s->sGridNo; -#ifdef USE_ASTAR_PATHS -//ddd -CHAR8 errorBuf[511]; UINT32 b,e; -b=GetJA2Clock();//return s->sGridNo+6; - - int retVal = ASTAR::AStarPathfinder::GetInstance().GetPath(s, sDestination, bLevel, usMovementMode, bCopy, fFlags); - - e=GetJA2Clock();sprintf(errorBuf, "timefind bestpath= %d",e-b );LiveMessage(errorBuf); - - if (retVal || TileIsOutOfBounds(sDestination)) { - return retVal; - } - else { - DebugMsg( TOPIC_JA2, DBG_LEVEL_0, String( "ASTAR path failed!" ) ); - } - - // if (TileIsOutOfBounds(sDestination)) + if (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING]) { - return 0; + CHAR8 errorBuf[511]; UINT32 b,e; + b=GetJA2Clock();//return s->sGridNo+6; + + int retVal = ASTAR::AStarPathfinder::GetInstance().GetPath(s, sDestination, bLevel, usMovementMode, bCopy, fFlags); + + e=GetJA2Clock();sprintf(errorBuf, "timefind bestpath= %d",e-b );LiveMessage(errorBuf); + + if (retVal || TileIsOutOfBounds(sDestination)) { + return retVal; + } + else { + DebugMsg( TOPIC_JA2, DBG_LEVEL_0, String( "ASTAR path failed!" ) ); + } + + // if (TileIsOutOfBounds(sDestination)) + { + return 0; + } } -#else + else + { //__try //{ INT32 iDestination = sDestination, iOrigination; @@ -2527,7 +2205,6 @@ b=GetJA2Clock();//return s->sGridNo+6; INT32 iWaterToWater; INT16 ubCurAPCost,ubAPCost; INT16 ubNewAPCost=0; - #ifdef VEHICLE //BOOLEAN fTurnSlow = FALSE; //BOOLEAN fReverse = FALSE; // stuff for vehicles turning BOOLEAN fMultiTile, fVehicle; @@ -2538,7 +2215,6 @@ b=GetJA2Clock();//return s->sGridNo+6; UINT16 usAnimSurface; //INT32 iCnt2, iCnt3; BOOLEAN fVehicleIgnoreObstacles = FALSE; - #endif INT32 iLastDir = 0; @@ -2640,9 +2316,7 @@ if(!GridNoOnVisibleWorldTile(iDestination)) fTurnBased = ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) ); fPathingForPlayer = ( (s->bTeam == gbPlayerNum) && (!gTacticalStatus.fAutoBandageMode) && !(s->flags.uiStatusFlags & SOLDIER_PCUNDERAICONTROL) ); - fNonFenceJumper = !( IS_MERC_BODY_TYPE( s ) ) || (UsingNewInventorySystem() == true && s->inv[BPACKPOCKPOS].exists() == true - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)s->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[s->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[s->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)));//Moa: added backpack check + fNonFenceJumper = !( IS_MERC_BODY_TYPE( s ) ) || (!s->CanClimbWithCurrentBackpack());//Moa: added backpack check // Flugente: nonswimmers are those who are not mercs and not boats fNonSwimmer = !(IS_MERC_BODY_TYPE( s ) ); @@ -2763,7 +2437,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) guiTotalPathChecks++; #endif -#ifdef VEHICLE fMultiTile = ((s->flags.uiStatusFlags & SOLDIER_MULTITILE) != 0); if (fMultiTile) @@ -2823,7 +2496,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) fContinuousTurnNeeded = FALSE; } -#endif if (!fContinuousTurnNeeded) { @@ -2966,7 +2638,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) } #endif -#ifdef VEHICLE /* if (fTurnSlow) { @@ -2991,7 +2662,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) } */ -#endif if (gubNPCAPBudget) { @@ -3052,7 +2722,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) //for ( iCnt = iLoopStart; iCnt != iLoopEnd; iCnt = (iCnt + iLoopIncrement) % MAXDIR ) for ( iCnt = iLoopStart; ; ) { -#ifdef VEHICLE /* if (fTurnSlow) { @@ -3134,7 +2803,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) } } -#endif newLoc = curLoc + dirDelta[iCnt]; @@ -3483,7 +3151,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) } } -#ifdef VEHICLE if (fMultiTile) { // vehicle test for obstacles: prevent movement to next tile if @@ -3522,7 +3189,6 @@ if(!GridNoOnVisibleWorldTile(iDestination)) } */ } -#endif // NEW Apr 21 by Ian: abort if cost exceeds budget if (gubNPCAPBudget) @@ -4280,7 +3946,7 @@ ENDOFLOOP: //{ // return (0); //} -#endif + } } void GlobalReachableTest( INT32 sStartGridNo ) diff --git a/Tactical/Points.cpp b/Tactical/Points.cpp index 0ca8302b..020d8df1 100644 --- a/Tactical/Points.cpp +++ b/Tactical/Points.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "worlddef.h" #include "points.h" @@ -39,7 +36,6 @@ #include "Food.h" // added by Flugente #include "AIInternals.h" //dnl ch69 150913 #include "CampaignStats.h" // added by Flugente -#endif #include "connect.h" #include "GameInitOptionsScreen.h" @@ -122,9 +118,7 @@ INT16 TerrainActionPoints( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, INT8 //CHRISL: We can't jump a fence while wearing a backpack, to consider fences as impassible // SANDRO - Headrocks change to backpack check implemented - if(sSwitchValue == TRAVELCOST_FENCE && UsingNewInventorySystem() == true && pSoldier->inv[BPACKPOCKPOS].exists() == true - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if(sSwitchValue == TRAVELCOST_FENCE && !pSoldier->CanClimbWithCurrentBackpack()) { return(-1); } @@ -683,7 +677,6 @@ INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, // Get switch value... sSwitchValue = gubWorldMovementCosts[ sGridNo ][ bDir ][ pSoldier->pathing.bLevel ]; -#if 1 //Moa: set to 0 to use original copy and paste code from ActionPointCost() if ( sSwitchValue == TRAVELCOST_FENCE ) { // If we are changeing stance ( either before or after getting there.... @@ -741,191 +734,6 @@ INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, sPoints += ActionPointCost( pSoldier, sGridNo, bDir, usMovementMode ); return (sPoints); -#else - // Tile cost should not be reduced based on movement mode... - if ( sSwitchValue == TRAVELCOST_FENCE ) - { - return( sTileCost ); - } - - - // WANNE.WATER: If our soldier is not on the ground level and the tile is a "water" tile, then simply set the tile to "FLAT_GROUND" - // This should fix "problems" for special modified maps - UINT8 ubTerrainID = gpWorldLevelData[ sGridNo ].ubTerrainID; - - if ( TERRAIN_IS_WATER( ubTerrainID) && pSoldier->pathing.bLevel > 0 ) - ubTerrainID = FLAT_GROUND; - - // ATE - MAKE MOVEMENT ALWAYS WALK IF IN WATER - if ( TERRAIN_IS_WATER( ubTerrainID) ) - { - usMovementMode = WALKING; - } - - // so, then we must modify it for other movement styles and accumulate - // CHRISL: Adjusted system to use different move costs while wearing a backpack - if (sTileCost > 0) - { - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - // SANDRO - This part have been modified "a bit" - // Check movement modifiers - switch( usMovementMode ) - { - case RUNNING: - case ADULTMONSTER_WALKING: - case BLOODCAT_RUN: - sPoints = sTileCost + APBPConstants[AP_MODIFIER_RUN]; - break; - case CROW_FLY: - case SIDE_STEP: - case WALK_BACKWARDS: - case ROBOT_WALK: - case BLOODCAT_WALK_BACKWARDS: - case MONSTER_WALK_BACKWARDS: - case LARVAE_WALK: - case WALKING : - case WALKING_ALTERNATIVE_RDY : - case SIDE_STEP_ALTERNATIVE_RDY : - sPoints = sTileCost + APBPConstants[AP_MODIFIER_WALK]; - if (!(pSoldier->MercInWater()) && ( (gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_FIREREADY ) || (gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_FIRE ) ) && !(gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_ALT_WEAPON_HOLDING ) ) - { - sPoints += APBPConstants[AP_MODIFIER_READY]; - } - break; - case SIDE_STEP_WEAPON_RDY: - case SIDE_STEP_DUAL_RDY: - case WALKING_WEAPON_RDY: - case WALKING_DUAL_RDY: - sPoints = sTileCost + APBPConstants[AP_MODIFIER_WALK] + APBPConstants[AP_MODIFIER_READY]; - break; - case START_SWAT: - case SWAT_BACKWARDS: - case SWATTING: - sPoints = sTileCost + APBPConstants[AP_MODIFIER_SWAT]; - break; - case CRAWLING: - sPoints = sTileCost + APBPConstants[AP_MODIFIER_CRAWL]; - break; - - default: - - // Invalid movement mode - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Invalid movement mode %d used in ActionPointCost", usMovementMode ) ); - sPoints = sTileCost; - break; - } - - // Check for reverse mode - if ( pSoldier->bReverse || gUIUseReverse ) - sPoints += APBPConstants[AP_REVERSE_MODIFIER]; - - // STOMP traits - Athletics trait decreases movement cost - if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, ATHLETICS_NT )) - { - sPoints = max(1, (INT16)((sPoints * (100 - gSkillTraitValues.ubATAPsMovementReduction) / 100) + 0.5)); - } - - // Flugente: riot shields lower movement speed - if ( pSoldier->IsRiotShieldEquipped( ) ) - sPoints *= gItemSettings.fShieldMovementAPCostModifier; - - // Flugente: dragging someone - if ( pSoldier->IsDraggingSomeone( ) ) - sPoints *= gItemSettings.fDragAPCostModifier; - - // Check if doors if not player's merc (they have to open them manually) - if ( sSwitchValue == TRAVELCOST_DOOR && pSoldier->bTeam != gbPlayerNum ) - { - sPoints += GetAPsToOpenDoor( pSoldier ) + GetAPsToOpenDoor( pSoldier ); // Include open and close costs! - } - // Check for stealth mode - if ( pSoldier->bStealthMode ) - { - // STOMP traits - Stealthy trait decreases stealth AP modifier - if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, STEALTHY_NT )) - { - sPoints += (max(0, (INT16)((APBPConstants[AP_STEALTH_MODIFIER] * (100 - gSkillTraitValues.ubSTStealthModeSpeedBonus) / 100) + 0.5))); - } - else - { - sPoints += APBPConstants[AP_STEALTH_MODIFIER]; - } - } - // Check for backpack - if((UsingNewInventorySystem() == true) && FindBackpackOnSoldier( pSoldier ) != ITEM_NOT_FOUND ) - sPoints += APBPConstants[AP_MODIFIER_PACK]; - - /////////////////////////////////////////////////////////////////////////////////////////////////////////// - } - - // Get switch value... - sSwitchValue = gubWorldMovementCosts[ sGridNo ][ bDir ][ pSoldier->pathing.bLevel ]; - - // ATE: If we have a 'special cost, like jump fence... - if ( sSwitchValue == TRAVELCOST_FENCE ) - { - // If we are changeing stance ( either before or after getting there.... - // We need to reflect that... - switch(usMovementMode) - { - case SIDE_STEP: - case SIDE_STEP_WEAPON_RDY: - case SIDE_STEP_DUAL_RDY: - case WALK_BACKWARDS: - case RUNNING: - case WALKING : - case WALKING_WEAPON_RDY: - case WALKING_DUAL_RDY: - case WALKING_ALTERNATIVE_RDY : - case SIDE_STEP_ALTERNATIVE_RDY: - - // Add here cost to go from crouch to stand AFTER fence hop.... - // Since it's AFTER.. make sure we will be moving after jump... - if ( ( bPathIndex + 2 ) < bPathLength ) - { - sPoints += GetAPsCrouch(pSoldier, TRUE); // SANDRO changed.. - } - break; - - case SWATTING: - case START_SWAT: - case SWAT_BACKWARDS: - - // Add cost to stand once there BEFORE.... - sPoints += GetAPsCrouch(pSoldier, TRUE); // SANDRO changed.. - break; - - case CRAWLING: - - // Can't do it here..... - break; - } - } - else if (sSwitchValue == TRAVELCOST_NOT_STANDING) - { - switch(usMovementMode) - { - case RUNNING: - case WALKING : - case WALKING_WEAPON_RDY: - case WALKING_DUAL_RDY: - case SIDE_STEP: - case SIDE_STEP_WEAPON_RDY: - case SIDE_STEP_DUAL_RDY: - case WALK_BACKWARDS: - case WALKING_ALTERNATIVE_RDY : - case SIDE_STEP_ALTERNATIVE_RDY: - // charge crouch APs for ducking head! - sPoints += GetAPsCrouch(pSoldier, TRUE); // SANDRO changed.. - break; - - default: - break; - } - } - - return( sPoints ); -#endif } @@ -2567,20 +2375,6 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime, // Do we need to stand up? bAPCost += GetAPsToChangeStance( pSoldier, ANIM_STAND ); } -#if 0//dnl ch73 021013 relocate this to MinAPsToPunch - // blunt weapons & blades - else if ( Item[ usUBItem ].usItemClass == IC_PUNCH || Item[ usUBItem ].usItemClass == IC_BLADE ) - { - if ( usTargID != NOBODY ) - { - // Check if target is prone, if so, calc cost... - if ( gAnimControl[ MercPtrs[ usTargID ]->usAnimState ].ubEndHeight == ANIM_PRONE ) - bAPCost += GetAPsToChangeStance( pSoldier, ANIM_CROUCH ); - else - bAPCost += GetAPsToChangeStance( pSoldier, ANIM_STAND ); - } - } -#endif else if(Item[usItem].rocketlauncher || Item[usItem].grenadelauncher || Item[usItem].mortar)//dnl ch72 260913 move this here from bottom, need to change as rocketlaucher could be fired from crouch too { if(gAnimControl[pSoldier->usAnimState].ubEndHeight == ANIM_PRONE || Item[usItem].mortar && gAnimControl[pSoldier->usAnimState].ubEndHeight == ANIM_STAND) @@ -2598,10 +2392,6 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime, //Calculate usTurningCost if (!TileIsOutOfBounds(sGridNo)) { -#if 0//dnl ch73 021013 relocate this to MinAPsToPunch - // Buggler: actual melee ap deduction for turning applies only when target is 1 tile away - if ( !( ( Item[ usUBItem ].usItemClass == IC_PUNCH || Item[ usUBItem ].usItemClass == IC_BLADE ) && usRange > 1 ) ) -#endif { if(Item[usItem].rocketlauncher || Item[usItem].grenadelauncher || Item[usItem].mortar)//dnl ch72 260913 { @@ -2656,11 +2446,6 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime, bAPCost += APBPConstants[AP_UNJAM]; } -#if 0//dnl ch63 240813 this seems very wrong, in most case (pSoldier->bActionPoints > bFullAps) and this will return less points then is actually required and could cancel some AI actions, like throwing grenades - // the minimum AP cost of ANY shot can NEVER be more than merc's maximum APs! - if ( bAPCost > bFullAPs ) - bAPCost = bFullAPs; -#endif // this SHOULD be impossible, but nevertheless... if ( bAPCost < 1 ) bAPCost = 1; @@ -3816,73 +3601,8 @@ INT16 MinAPsToThrow( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubAddTurningCos INT32 iFullAPs; INT32 iAPCost = APBPConstants[AP_MIN_AIM_ATTACK]; UINT16 usInHand; -#if 0//dnl ch72 180913 - UINT16 usTargID; - UINT32 uiMercFlags; - UINT8 ubDirection; - - if(pSoldier->bWeaponMode == WM_ATTACHED_GL || pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO)//dnl ch63 240813 - usInHand = GetAttachedGrenadeLauncher(&pSoldier->inv[HANDPOS]); - else -#endif // make sure the guy's actually got a throwable item in his hand! usInHand = pSoldier->inv[HANDPOS].usItem; -#if 0//dnl ch72 180913 this goes down because of new trait system - if ( ( !(Item[ usInHand ].usItemClass & IC_GRENADE) && - !(Item[ usInHand ].usItemClass & IC_LAUNCHER)) ) - { - //AXP 25.03.2007: See if we are about to throw grenade (grenade was not in hand, but in temp object) - if ( pSoldier->pTempObject != NULL && pSoldier->pThrowParams != NULL && - pSoldier->pThrowParams->ubActionCode == THROW_ARM_ITEM && (Item[ pSoldier->pTempObject->usItem ].usItemClass & IC_GRENADE) ) - { - //nothing here - } - else - { -#ifdef JA2TESTVERSION - ScreenMsg( MSG_FONT_YELLOW, MSG_DEBUG, L"MinAPsToThrow - Called when in-hand item is %d", usInHand ); -#endif - return(0); - } - } - - if (!TileIsOutOfBounds(sGridNo)) - { - // Given a gridno here, check if we are on a guy - if so - get his gridno - if ( FindSoldier( sGridNo, &usTargID, &uiMercFlags, FIND_SOLDIER_GRIDNO ) ) - { - sGridNo = MercPtrs[ usTargID ]->sGridNo; - } - - /*// OK, get a direction and see if we need to turn... - if (ubAddTurningCost) - { - ubDirection = (UINT8)GetDirectionFromGridNo( sGridNo, pSoldier ); - - // Is it the same as he's facing? - if ( ubDirection != pSoldier->ubDirection ) - { - //Lalien: disabled it again - //AXP 25.03.2007: Reenabled look cost - //iAPCost += GetAPsToLook( pSoldier ); - } - }*/ - } - /*else - { - // Assume we need to add cost! - //iAPCost += GetAPsToLook( pSoldier ); - }*/ - - // if attacking a new target (or if the specific target is uncertain) - //AXP 25.03.2007: Aim-at-same-tile AP cost/bonus doesn't make any sense for thrown objects - //if ( ( sGridNo != pSoldier->sLastTarget ) ) - //{ - // iAPCost += APBPConstants[AP_CHANGE_TARGET]; - //} - - //iAPCost += GetAPsToChangeStance( pSoldier, ANIM_STAND ); // moved lower - SANDRO -#endif // Calculate default top & bottom of the magic "aiming" formula) diff --git a/Tactical/QARRAY.cpp b/Tactical/QARRAY.cpp index 3331e140..b2b17853 100644 --- a/Tactical/QARRAY.cpp +++ b/Tactical/QARRAY.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "qarray.h" -#endif QARRAY_VALUES QuoteExp[NUM_PROFILES]; diff --git a/Tactical/Rain.cpp b/Tactical/Rain.cpp index b417bb8d..fbb80d34 100644 --- a/Tactical/Rain.cpp +++ b/Tactical/Rain.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "types.h" //#include "soldier control.h" #include "overhead.h" @@ -41,7 +38,6 @@ #include "line.h" #include "overhead map.h" #include "interface dialogue.h" -#endif #include "Rain.h" diff --git a/Tactical/RandomMerc.cpp b/Tactical/RandomMerc.cpp index 885a04ac..bbb323f0 100644 --- a/Tactical/RandomMerc.cpp +++ b/Tactical/RandomMerc.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -11,7 +8,6 @@ #include "Random.h" #include "Campaign.h" -#endif #include "XML.h" diff --git a/Tactical/Real Time Input.cpp b/Tactical/Real Time Input.cpp index d0684864..b8c21c52 100644 --- a/Tactical/Real Time Input.cpp +++ b/Tactical/Real Time Input.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -65,7 +62,6 @@ #include "Vehicles.h" // anv: for switching from soldier to vehicle #include "VehicleMenu.h" -#endif //forward declarations of common classes to eliminate includes @@ -802,28 +798,6 @@ void QueryRTLeftButton( UINT32 *puiNewEvent ) { // ATE: Select everybody in squad and make move! { -#if 0 - SOLDIERTYPE * pTeamSoldier; - INT32 cnt; - SOLDIERTYPE *pFirstSoldier = NULL; - - // OK, loop through all guys who are 'multi-selected' and - // check if our currently selected guy is amoung the - // lucky few.. if not, change to a guy who is... - cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; - for ( pTeamSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pTeamSoldier++ ) - { - // Default turn off - pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_MULTI_SELECTED ); - - // If controllable - if ( OK_CONTROLLABLE_MERC( pTeamSoldier ) && pTeamSoldier->bAssignment == MercPtrs[ gusSelectedSoldier ]->bAssignment ) - { - pTeamSoldier->flags.uiStatusFlags |= SOLDIER_MULTI_SELECTED; - } - } - EndMultiSoldierSelection( FALSE ); -#endif // Make move! *puiNewEvent = C_MOVE_MERC; @@ -892,36 +866,6 @@ void QueryRTLeftButton( UINT32 *puiNewEvent ) } -#if 0 - fDone = FALSE; - if( GetSoldier( &pSoldier, gusUIFullTargetID ) && gpItemPointer == NULL ) - { - if( ( guiUIFullTargetFlags & OWNED_MERC ) && ( guiUIFullTargetFlags & VISIBLE_MERC ) && !( guiUIFullTargetFlags & DEAD_MERC ) &&( pSoldier->bAssignment >= ON_DUTY )&&!( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) ) - { - fShowAssignmentMenu = TRUE; - gfRTClickLeftHoldIntercepted = TRUE; - CreateDestroyAssignmentPopUpBoxes( ); - SetTacticalPopUpAssignmentBoxXY( ); - DetermineBoxPositions( ); - DetermineWhichAssignmentMenusCanBeShown( ); - fFirstClickInAssignmentScreenMask = TRUE; - gfIgnoreScrolling = TRUE; - - fDone = TRUE; - } - else - { - fShowAssignmentMenu = FALSE; - CreateDestroyAssignmentPopUpBoxes( ); - DetermineWhichAssignmentMenusCanBeShown( ); - } - } - - if( fDone == TRUE ) - { - break; - } -#endif break; @@ -2166,12 +2110,9 @@ void HandleMouseRTX1Button( UINT32 *puiNewEvent ) BOOLEAN fNearHeigherLevel; BOOLEAN fNearLowerLevel; INT8 bDirection; - // CHRISL: Turn off manual jumping while wearing a backpack - if (UsingNewInventorySystem() == true && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + // CHRISL: Turn off manual jumping while wearing a backpack + if (!pjSoldier->CanClimbWithCurrentBackpack()) return; // Make sure the merc is not collapsed! @@ -2263,12 +2204,9 @@ void HandleRTJump( void ) BOOLEAN fNearHeigherLevel; BOOLEAN fNearLowerLevel; INT8 bDirection; - // CHRISL: Turn off manual jumping while wearing a backpack - if (UsingNewInventorySystem() == true && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + // CHRISL: Turn off manual jumping while wearing a backpack + if (!pjSoldier->CanClimbWithCurrentBackpack()) return; // Make sure the merc is not collapsed! diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index bc3348dd..0380d061 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -50,7 +47,6 @@ #include "ai.h" // added by Flugente #include "PreBattle Interface.h" // added by Flugente #include "Strategic Town Loyalty.h" // added by Flugente -#endif #include "Animation Control.h" @@ -664,11 +660,7 @@ INT32 AddRottingCorpse( ROTTING_CORPSE_DEFINITION *pCorpseDef ) for (ubLoop = 0; ubLoop < pDBStructureRef->pDBStructure->ubNumberOfTiles; ubLoop++) { ppTile = pDBStructureRef->ppTile; -#if 0//dnl ch83 080114 - sTileGridNo = pCorpseDef->sGridNo + ppTile[ ubLoop ]->sPosRelToBase; -#else sTileGridNo = AddPosRelToBase(pCorpseDef->sGridNo, ppTile[ubLoop]); -#endif //Remove blood RemoveBlood( sTileGridNo, pCorpseDef->bLevel ); } @@ -1548,52 +1540,6 @@ ROTTING_CORPSE *FindCorpseBasedOnStructure( INT32 sGridNo, INT8 asLevel, STRUCT void CorpseHit( INT32 sGridNo, INT8 asLevel, UINT16 usStructureID ) { -#if 0 - STRUCTURE *pStructure, *pBaseStructure; - ROTTING_CORPSE *pCorpse = NULL; - INT32 sBaseGridNo; - - pStructure = FindStructureByID( sGridNo, usStructureID ); - - // Get base.... - pBaseStructure = FindBaseStructure( pStructure ); - - // Find base gridno... - sBaseGridNo = pBaseStructure->sGridNo; - - // Get corpse ID..... - pCorpse = FindCorpseBasedOnStructure( sBaseGridNo, asLevel, pBaseStructure ); - - if ( pCorpse == NULL ) - { - #ifdef JA2TESTVERSION - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Bullet hit corpse but corpse cannot be found at: %d", sBaseGridNo ); - #endif - return; - } - - // Twitch the bugger... - #ifdef JA2BETAVERSION - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Corpse hit" ); - #endif - - if ( GridNoOnScreen( sBaseGridNo ) ) - { - // Twitch.... - // Set frame... - SetAniTileFrame( pCorpse->pAniTile, 1 ); - - // Go reverse... - pCorpse->pAniTile->uiFlags |= ( ANITILE_BACKWARD | ANITILE_PAUSE_AFTER_LOOP ); - - // Turn off pause... - pCorpse->pAniTile->uiFlags &= (~ANITILE_PAUSED); - } - - // PLay a sound.... - PlayJA2Sample( (UINT32)( BULLET_IMPACT_2 ), RATE_11025, SoundVolume( MIDVOLUME, sGridNo ), 1, SoundDir( sGridNo ) ); - -#endif } void VaporizeCorpse( INT32 sGridNo, INT8 asLevel, UINT16 usStructureID ) @@ -2523,7 +2469,9 @@ void ReduceAmmoDroppedByNonPlayerSoldiers( SOLDIERTYPE *pSoldier, INT32 iInvSlot OBJECTTYPE *pObj = &( pSoldier->inv[ iInvSlot ] ); // if it's ammo - if ( Item[ pObj->usItem ].usItemClass == IC_AMMO ) + if ( Item[ pObj->usItem ].usItemClass == IC_AMMO + && Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_BOX + && Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_CRATE) { //don't drop all the clips, just a random # of them between 1 and how many there are pObj->ubNumberOfObjects = ( UINT8 ) ( 1 + Random( pObj->ubNumberOfObjects ) ); diff --git a/Tactical/ShopKeeper Interface.cpp b/Tactical/ShopKeeper Interface.cpp index 58c12d0e..707959a6 100644 --- a/Tactical/ShopKeeper Interface.cpp +++ b/Tactical/ShopKeeper Interface.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Types.h" #include "ShopKeeper Interface.h" #include "Utilities.h" @@ -55,7 +52,6 @@ #include "Encyclopedia_new.h" #include "Animation Control.h" // added by Flugente #include "Town Militia.h" // added by Flugente -#endif #ifdef JA2UB #include "Explosion Control.h" diff --git a/Tactical/SkillCheck.cpp b/Tactical/SkillCheck.cpp index e367aaba..cff7ad4e 100644 --- a/Tactical/SkillCheck.cpp +++ b/Tactical/SkillCheck.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "SkillCheck.h" #include "Soldier Profile.h" #include "Random.h" @@ -18,7 +15,6 @@ #include "Soldier Control.h" #include "Interface.h" // added by Flugente for zBackground #include "DynamicDialogue.h" // added by Flugente -#endif extern void ReducePointsForHunger( SOLDIERTYPE *pSoldier, UINT32 *pusPoints ); diff --git a/Tactical/Soldier Add.cpp b/Tactical/Soldier Add.cpp index 7d13ceef..aa9d549e 100644 --- a/Tactical/Soldier Add.cpp +++ b/Tactical/Soldier Add.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" @@ -26,7 +23,6 @@ #include "Vehicles.h" // added by Flugente #include "CampaignStats.h" // added by Flugente #include "worldman.h" // added by Flugente for Water(...) -#endif #ifdef JA2UB #include "Ja25 Strategic Ai.h" diff --git a/Tactical/Soldier Ani.cpp b/Tactical/Soldier Ani.cpp index f5774ae6..b7dc25b7 100644 --- a/Tactical/Soldier Ani.cpp +++ b/Tactical/Soldier Ani.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -66,7 +63,7 @@ #include "MilitiaIndividual.h" // added by Flugente #include "Town Militia.h" // added by Flugente #include "PreBattle Interface.h" // added by Flugente -#endif +#include "Rebel Command.h" // anv: for enemy taunts #include "Civ Quotes.h" @@ -3209,14 +3206,14 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier ) case 762: { // CODE: Set off Trigger - INT8 bPanicTrigger; - - bPanicTrigger = ClosestPanicTrigger( pSoldier ); - SetOffPanicBombs( pSoldier->ubID, bPanicTrigger ); + INT8 bPanicTrigger = ClosestPanicTrigger( pSoldier ); + if (bPanicTrigger != -1) + { + SetOffPanicBombs( pSoldier->ubID, bPanicTrigger ); + } // any AI guy has been specially given keys for this, now take them // away pSoldier->flags.bHasKeys = pSoldier->flags.bHasKeys >> 1; - } break; @@ -4197,6 +4194,9 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse ) } } + // rftr: soldier bounty payout + RebelCommand::ApplySoldierBounty(pSoldier); + // Flugente: campaign stats gCurrentIncident.AddStat( pSoldier, CAMPAIGNHISTORY_TYPE_KILL ); @@ -4856,48 +4856,6 @@ BOOLEAN HandleUnjamAnimation( SOLDIERTYPE *pSoldier ) -#if 0 -//OK, if here, if our health is still good, but we took a lot of damage, try to fall down! -if ( pSoldier->stats.bLife >= OKLIFE ) -{ - // Randomly fall back or forward, if we are in the standing hit animation - if ( pSoldier->usAnimState == GENERIC_HIT_STAND || pSoldier->usAnimState == RIFLE_STAND_HIT ) - { - INT8 bTestDirection = pSoldier->ubDirection; - BOOLEAN fForceDirection = FALSE; - BOOLEAN fDoFallback = FALSE; - - // As the damage pretty brutal? - - // TRY FALLING BACKWARDS, ( ONLY IF WE ARE A MERC! ) - if ( Random( 1000 ) > 40 && IS_MERC_BODY_TYPE( pSoldier ) ) - { - // CHECK IF WE HAVE AN ATTACKER, TAKE OPPOSITE DIRECTION! - if ( pSoldier->ubAttackerID != NOBODY ) - { - // Find direction! - bTestDirection = (INT8)GetDirectionFromGridNo( MercPtrs[ pSoldier->ubAttackerID ]->sGridNo, pSoldier ); - fForceDirection = TRUE; - } - - sNewGridNo = NewGridNo( pSoldier->sGridNo, (UINT16)(-1 * DirectionInc( bTestDirection ) ) ); - - if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, pSoldier->pathing.bLevel ) && OKHeightDest( pSoldier, sNewGridNo ) ) - { - // ALL'S OK HERE..... IF WE FORCED DIRECTION, SET! - if ( fForceDirection ) - { - pSoldier->EVENT_SetSoldierDirection( bTestDirection ); - pSoldier->EVENT_SetSoldierDesiredDirection( bTestDirection ); - } - pSoldier->ChangeSoldierState( FALLBACK_HIT_STAND, 0, FALSE ); - return; - } - } - } -} - -#endif BOOLEAN OKFallDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT8 ubTestDirection, UINT16 usAnimState ) { diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 9a6ff96d..d4c39d48 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -16,6 +13,7 @@ #include "Animation Data.h" #include "Animation Control.h" #include "container.h" +#define _USE_MATH_DEFINES // for C #include #include "pathai.h" #include "Random.h" @@ -103,7 +101,6 @@ #include "LuaInitNPCs.h" // added by Flugente #include "SaveLoadMap.h" // added by Flugente #include "qarray.h" // added by Flugente -#endif #include "ub_config.h" #include "../ModularizedTacticalAI/include/Plan.h" // for plan destructor call @@ -3636,29 +3633,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart // Unset paused for no APs..... this->AdjustNoAPToFinishMove( FALSE ); -#if 0 - // 0verhaul: This is a test. The only time I have been able to make this code hit is when - // the player goes prone while moving. And that is not what this part is intended for. I - // have seen the soldier in the middle of crawling, get up, turn, and then go prone again to - // continue along his path. But this code was not hit for that part. And this code seems - // to be made for that part. So apparently they found another way to deal with it. So - // I disabled the "locked" code for usDontUpdateNewGridNoOnMoveAnimChange since it can cause - // problems of its own. Now we see if we can do without this part too. - if ( usNewState == CRAWLING && this->usDontUpdateNewGridNoOnMoveAnimChange == 1 ) - { - if ( this->flags.bTurningFromPronePosition != TURNING_FROM_PRONE_ENDING_UP_FROM_MOVE ) - { - this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_START_UP_FROM_MOVE; - } - - // ATE: IF we are starting to crawl, but have to getup to turn first...... - if ( this->flags.bTurningFromPronePosition == TURNING_FROM_PRONE_START_UP_FROM_MOVE ) - { - usNewState = PRONE_UP; - this->flags.bTurningFromPronePosition = TURNING_FROM_PRONE_ENDING_UP_FROM_MOVE; - } - } -#endif // We are about to start moving // Handle buddy beginning to move... @@ -3798,20 +3772,8 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart // 0verhaul: Okay, here is a question: Is the "non-interrupt" supposed to be transferrable to other anims? // That is, if one anim is not interruptable but it chains to another anim, should the "not interruptable" flag // remain? I'm going to try out the theory that new animations should reset the "don't interrupt" flag. -#if 0 - if ( uiNewAnimFlags & ANIM_NONINTERRUPT ) - { - this->flags.fInNonintAnim = TRUE; - } - - if ( uiNewAnimFlags & ANIM_RT_NONINTERRUPT ) - { - this->flags.fRTInNonintAnim = TRUE; - } -#else this->flags.fInNonintAnim = (uiNewAnimFlags & ANIM_NONINTERRUPT) != 0; this->flags.fRTInNonintAnim = (uiNewAnimFlags & ANIM_RT_NONINTERRUPT) != 0; -#endif // CHECK IF WE ARE NOT AIMING, IF NOT, RESET LAST TAGRET! if ( !(gAnimControl[this->usAnimState].uiFlags & ANIM_FIREREADY) && !(gAnimControl[usNewState].uiFlags & ANIM_FIREREADY) ) @@ -3957,33 +3919,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart if ( !this->flags.fDontChargeAPsForStanceChange ) { - // CHRISL - // SANDRO - APBPConstants[AP_CROUCH] changed to GetAPsCrouch() -#if 0//dnl ch70 160913 this is wrong we cannot just add constants to sAPCost this must be done in GetAPsCrouch and GetAPsProne because all preactions calculation will show incorrect values under cursor - if ( (UsingNewInventorySystem( ) == true) && FindBackpackOnSoldier( this ) != ITEM_NOT_FOUND && !this->flags.ZipperFlag ) - { - if ( usNewState == KNEEL_UP || usNewState == BIGMERC_CROUCH_TRANS_OUTOF ) - { - sAPCost = GetAPsCrouch( this, FALSE ) + 2; - sBPCost = APBPConstants[BP_CROUCH] + 2; - } - else if ( usNewState == KNEEL_DOWN || usNewState == BIGMERC_CROUCH_TRANS_INTO ) - { - sAPCost = GetAPsCrouch( this, FALSE ) + 1; - sBPCost = APBPConstants[BP_CROUCH] + 1; - } - else - { - sAPCost = GetAPsCrouch( this, FALSE ); - sBPCost = APBPConstants[BP_CROUCH]; - } - } - else - { - sAPCost = GetAPsCrouch( this, FALSE ); - sBPCost = APBPConstants[BP_CROUCH]; - } -#else if ( UsingNewInventorySystem( ) ) { if ( usNewState == KNEEL_UP || usNewState == BIGMERC_CROUCH_TRANS_OUTOF ) @@ -4002,7 +3937,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart sAPCost = GetAPsCrouch( this, FALSE ); sBPCost = APBPConstants[BP_CROUCH]; } -#endif DeductPoints( this, sAPCost, sBPCost ); } this->flags.fDontChargeAPsForStanceChange = FALSE; @@ -4014,53 +3948,25 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart // ATE: If we are NOT waiting for prone down... if ( this->flags.bTurningFromPronePosition < TURNING_FROM_PRONE_START_UP_FROM_MOVE && !this->flags.fDontChargeAPsForStanceChange ) { - // silversurfer: of course we deduct points for stance changes! - // ATE: Don't do this if we are still 'moving'.... - // SANDRO - APBPConstants[AP_PRONE] changed to GetAPsProne() - //if ( this->sGridNo == this->pathing.sFinalDestination || this->pathing.usPathIndex == 0 ) - //{ - // CHRISL -#if 0//dnl ch70 160913 this is wrong we cannot just add constants to sAPCost this must be done in GetAPsCrouch and GetAPsProne because all preactions calculation will show incorrect values under cursor - if ( (UsingNewInventorySystem( ) == true) && FindBackpackOnSoldier( this ) != ITEM_NOT_FOUND && !this->flags.ZipperFlag ) + if ( UsingNewInventorySystem( ) ) + { + if ( usNewState == PRONE_UP ) { - if ( usNewState == PRONE_UP ) - { - sAPCost = GetAPsProne( this, FALSE ) + 2; - sBPCost = APBPConstants[BP_PRONE] + 2; - } - else - { - sAPCost = GetAPsProne( this, FALSE ) + 1; - sBPCost = APBPConstants[BP_PRONE] + 1; - } + sAPCost = GetAPsProne( this, TRUE * 2 ); + sBPCost = APBPConstants[BP_PRONE] + 2; } else { - sAPCost = GetAPsProne( this, FALSE ); - sBPCost = APBPConstants[BP_PRONE]; + sAPCost = GetAPsProne( this, TRUE ); + sBPCost = APBPConstants[BP_PRONE] + 1; } -#else - if ( UsingNewInventorySystem( ) ) - { - if ( usNewState == PRONE_UP ) - { - sAPCost = GetAPsProne( this, TRUE * 2 ); - sBPCost = APBPConstants[BP_PRONE] + 2; - } - else - { - sAPCost = GetAPsProne( this, TRUE ); - sBPCost = APBPConstants[BP_PRONE] + 1; - } - } - else - { - sAPCost = GetAPsProne( this, FALSE ); - sBPCost = APBPConstants[BP_PRONE]; - } -#endif - DeductPoints( this, sAPCost, sBPCost ); - //} + } + else + { + sAPCost = GetAPsProne( this, FALSE ); + sBPCost = APBPConstants[BP_PRONE]; + } + DeductPoints( this, sAPCost, sBPCost ); } this->flags.fDontChargeAPsForStanceChange = FALSE; break; @@ -4396,18 +4302,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart // Reset some animation values this->flags.fForceShade = FALSE; - // CHECK IF WE ARE AT AN IDLE ACTION -#if 0 - if ( gAnimControl[usNewState].uiFlags & ANIM_IDLE ) - { - this->aiData.bAction = ACTION_DONE; - } - else - { - this->aiData.bAction = ACTION_BUSY; - } -#endif - // ATE; For some animations that could use some variations, do so.... if ( usNewState == CHARIOTS_OF_FIRE || usNewState == BODYEXPLODING ) { @@ -4582,10 +4476,7 @@ void SOLDIERTYPE::EVENT_InternalSetSoldierPosition( FLOAT dNewXPos, FLOAT dNewYP if ( !(this->flags.uiStatusFlags & (SOLDIER_DRIVER | SOLDIER_PASSENGER)) ) { - if ( gGameSettings.fOptions[TOPTION_MERC_ALWAYS_LIGHT_UP] ) - { - this->SetCheckSoldierLightFlag( ); - } + this->SetCheckSoldierLightFlag( ); } // ATE: Mirror calls if we are a vehicle ( for all our passengers ) @@ -5036,18 +4927,6 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo ) // break; //} -#if 0 - // 0verhaul: This does not go here! In spite of this function's name, it is not the actual "fire" function. - // In fact this sets the muzzle flash even while the soldier may be turning to shoot, which can cause - // problems for real-time shooting. - - // The correct place for this is UseGun, which already has code to set or reset the flash. - - if ( IsFlashSuppressor( &this->inv[this->ubAttackingHand], this ) ) - this->flags.fMuzzleFlash = FALSE; - else - this->flags.fMuzzleFlash = TRUE; -#endif DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "EVENT_FireSoldierWeapon: Muzzle flash = %d", this->flags.fMuzzleFlash ) ); @@ -5067,42 +4946,6 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo ) //this->sLastTarget = sTargetGridNo; this->ubTargetID = WhoIsThere2( sTargetGridNo, this->bTargetLevel ); -#if 0 - // if (Item[this->inv[HANDPOS].usItem].usItemClass & IC_GUN) - { - if ( this->bDoBurst ) - { - // This is NOT the bullets to fire. That is done as a check of bDoBurst against the weapon burst count or - // bDoAutofire, or single-fire. So let the bullet count be managed by the firing code. - // Set the TOTAL number of bullets to be fired - // Can't shoot more bullets than we have in our magazine! - if ( this->bDoAutofire ) - this->bBulletsLeft = __min( this->bDoAutofire, this->inv[this->ubAttackingHand][0]->data.gun.ubGunShotsLeft ); - else - { - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "EVENT_FireSoldierWeapon: do burst" ); - if ( this->bWeaponMode == WM_ATTACHED_GL_BURST ) - this->bBulletsLeft = __min( Weapon[GetAttachedGrenadeLauncher( &this->inv[this->ubAttackingHand] )].ubShotsPerBurst, this->inv[this->ubAttackingHand][0]->data.gun.ubGunShotsLeft ); - else - this->bBulletsLeft = __min( GetShotsPerBurst( &this->inv[this->ubAttackingHand] ), this->inv[this->ubAttackingHand][0]->data.gun.ubGunShotsLeft ); - } - } - else if ( IsValidSecondHandShot( this ) ) - { - // two-pistol attack - two bullets! - this->bBulletsLeft = 2; - } - else - { - this->bBulletsLeft = 1; - } - - if ( AmmoTypes[this->inv[this->ubAttackingHand][0]->data.gun.ubGunAmmoType].numberOfBullets > 1 ) - { - this->bBulletsLeft *= AmmoTypes[this->inv[this->ubAttackingHand][0]->data.gun.ubGunAmmoType].numberOfBullets; - } - } -#endif DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "!!!!!!! Starting attack, bullets left %d", this->bBulletsLeft ) ); // Convert our grid-not into an XY @@ -5172,26 +5015,6 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo ) } else { -#if 0//dnl ch72 250913 move this above as need to be done before calling SoldierReadyWeapon - // IF WE ARE IN REAl-TIME, FIRE IMMEDIATELY! - if ( ((gTacticalStatus.uiFlags & REALTIME) || !(gTacticalStatus.uiFlags & INCOMBAT)) ) - { - //fDoFireRightAway = TRUE; - } - - // Check if our weapon has no intermediate anim... - if ( Item[this->inv[HANDPOS].usItem].rocketlauncher || Item[this->inv[HANDPOS].usItem].grenadelauncher || Item[this->inv[HANDPOS].usItem].mortar ) - ///* switch( this->inv[ HANDPOS ].usItem ) - // { - //case RPG7: - //case ROCKET_LAUNCHER: - //case MORTAR: - //case GLAUNCHER:*/ - - fDoFireRightAway = TRUE; - // break; - //} -#endif if ( fDoFireRightAway ) { // Set to true so we don't get toasted twice for APs.. @@ -5887,24 +5710,6 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "EVENT_SoldierGotHit" ); -#if 0 - // 0verhaul: Under the new ABC system this is no longer necessary. - // ATE: If we have gotten hit, but are still in our attack animation, reduce count! - switch ( this->usAnimState ) - { - case SHOOT_ROCKET: - case SHOOT_MORTAR: - case THROW_ITEM: - // crouch throwing - case THROW_ITEM_CROUCHED: - // crouch throwing - case LOB_ITEM: - - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "@@@@@@@ Freeing up attacker - ATTACK ANIMATION %s ENDED BY HIT ANIMATION, Now %d", gAnimControl[this->usAnimState].zAnimStr, gTacticalStatus.ubAttackBusyCount ) ); - ReduceAttackBusyCount( this->ubID, FALSE ); - break; - } -#endif // DO STUFF COMMON FOR ALL TYPES if ( ubAttackerID != NOBODY ) @@ -5915,22 +5720,6 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 // Set attacker's ID this->ubAttackerID = ubAttackerID; -#if 0 - // 0verhaul: Slashing out more unnecessary and reworked code - if ( !(this->flags.uiStatusFlags & SOLDIER_VEHICLE) ) - { - // Increment being attacked count - this->bBeingAttackedCount++; - } - - // if defender is a vehicle, there will be no hit animation played! - if ( !(this->flags.uiStatusFlags & SOLDIER_VEHICLE) ) - { - // Increment the number of people busy doing stuff because of an attack (busy doing hit anim!) - gTacticalStatus.ubAttackBusyCount++; - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "!!!!!!! Person got hit, attack count now %d", gTacticalStatus.ubAttackBusyCount ) ); - } -#endif // ATE; Save hit location info...( for later anim determination stuff ) this->ubHitLocation = ubHitLocation; @@ -6181,7 +5970,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 } } // marke added one 'or' for explosive ammo. variation of: AmmoTypes[this->inv[this->ubAttackingHand ][0]->data.gun.ubGunAmmoType].explosionSize > 1 - // extracting attackers ammo type + // extracting attacker�s ammo type else if ( Item[usWeaponIndex].usItemClass & IC_EXPLOSV || AmmoTypes[MercPtrs[ubAttackerID]->inv[MercPtrs[ubAttackerID]->ubAttackingHand][0]->data.gun.ubGunAmmoType].explosionSize > 1 ) { INT8 bDeafValue; @@ -6254,34 +6043,6 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 } -#if 0 - // 0verhaul: None of this hairyness is necessary anymore! Hazaa! - // CJC: moved to after SoldierTakeDamage so that any quotes from the defender - // will not be said if they are knocked out or killed - if ( ubReason != TAKE_DAMAGE_TENTACLES && ubReason != TAKE_DAMAGE_OBJECT ) - { - // OK, OK: THis is hairy, however, it's ness. because the normal freeup call uses the - // attckers intended target, and here we want to use thier actual target.... - - // ATE: If it's from GUNFIRE damage, keep in mind bullets... - if ( Item[usWeaponIndex].usItemClass & IC_GUN ) - { - pNewSoldier = FreeUpAttackerGivenTarget( this->ubAttackerID, this->ubID ); - } - else - { - pNewSoldier = ReduceAttackBusyGivenTarget( this->ubAttackerID, this->ubID ); - } - - if ( pNewSoldier != NULL ) - { - //warning, if this code is ever uncommented, rename all this - //to this in this function, then init this to this - this = pNewSoldier; - } - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "!!!!!!! Tried to free up attacker, attack count now %d", gTacticalStatus.ubAttackBusyCount ) ); - } -#endif // Flugente: moved the damage calculation into a separate function sBreathLoss = max( 1, (INT16)(sBreathLoss * (100 - this->GetDamageResistance( FALSE, TRUE )) / 100) ); @@ -6311,7 +6072,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 // If anything other than on a squad or guard, make them guard.... if ( this->bTeam == gbPlayerNum ) { - if ( this->bAssignment >= ON_DUTY && this->bAssignment != ASSIGNMENT_POW && this->bAssignment != ASSIGNMENT_MINIEVENT ) + if ( this->bAssignment >= ON_DUTY && this->bAssignment != ASSIGNMENT_POW && this->bAssignment != ASSIGNMENT_MINIEVENT && this->bAssignment != ASSIGNMENT_REBELCOMMAND) { if ( this->flags.fMercAsleep ) { @@ -6605,7 +6366,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1 PossiblyStartEnemyTaunt( this, TAUNT_GOT_HIT_GUNFIRE, ubAttackerID ); if (ubAttackerID != NOBODY) { - PossiblyStartEnemyTaunt(MercPtrs[ubAttackerID], TAUNT_HIT_GUNFIRE, this->ubID); + PossiblyStartEnemyTaunt( MercPtrs[ubAttackerID], TAUNT_HIT_GUNFIRE, this->ubID ); } } else @@ -7342,15 +7103,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InternalGetNewSoldierPath( INT32 sDestGridNo, UINT16 return(FALSE); } - // we can use the soldier's level here because we don't have pathing across levels right now... -#if 0 - // Uhhmmmm, the name of this function has "NEWPath" in it. - if ( this->pathing.bPathStored ) - { - fContinue = TRUE; - } - else -#endif { iDest = FindBestPath( this, sDestGridNo, this->pathing.bLevel, usMovementAnim, COPYROUTE, fFlags ); fContinue = (iDest != 0); @@ -8794,32 +8546,6 @@ UINT8 gRedGlowR[] = }; -#if 0 -UINT8 gOrangeGlowR[] = -{ - 0, // Normal shades - 20, - 40, - 60, - 80, - 100, - 120, - 140, - 160, - 180, - - 0, // For gray palettes - 20, - 40, - 60, - 80, - 100, - 120, - 140, - 160, - 180, -}; -#endif UINT8 gOrangeGlowR[] = { @@ -8848,32 +8574,6 @@ UINT8 gOrangeGlowR[] = }; -#if 0 -UINT8 gOrangeGlowG[] = -{ - 0, // Normal shades - 5, - 10, - 25, - 30, - 35, - 40, - 45, - 50, - 55, - - 0, // For gray palettes - 5, - 10, - 25, - 30, - 35, - 40, - 45, - 50, - 55, -}; -#endif UINT8 gOrangeGlowG[] = { @@ -9730,10 +9430,7 @@ void MoveMercFacingDirection( SOLDIERTYPE *pSoldier, BOOLEAN fReverse, FLOAT dMo void SOLDIERTYPE::BeginSoldierClimbUpRoof(void) { //CHRISL: Disable climbing up to a roof while wearing a backpack - if ((UsingNewInventorySystem() == true) && this->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)this->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[this->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[this->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!this->CanClimbWithCurrentBackpack()) { ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]); return; @@ -10027,6 +9724,17 @@ UINT32 SleepDartSuccumbChance( SOLDIERTYPE * pSoldier ) return(uiChance); } +BOOLEAN SOLDIERTYPE::CanClimbWithCurrentBackpack() +{ + // only apply backpack climbing limitations to player mercs + if (UsingNewInventorySystem() == true && this->inv[BPACKPOCKPOS].exists() == true && this->bTeam == OUR_TEAM + && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)this->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[this->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) + && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[this->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + return FALSE; + + return TRUE; +} + void SOLDIERTYPE::BeginSoldierGetup( void ) { // RETURN IF WE ARE BEING SERVICED @@ -12042,28 +11750,6 @@ UINT8 GetDirectionFromXY( INT16 sXPos, INT16 sYPos, SOLDIERTYPE *pSoldier ) return(atan8( sXPos2, sYPos2, sXPos, sYPos )); } -#if 0 -UINT8 atan8( INT16 x1, INT16 y1, INT16 x2, INT16 y2 ) -{ - static int trig[8] = {2, 3, 4, 5, 6, 7, 8, 1}; - // returned values are N=1, NE=2, E=3, SE=4, S=5, SW=6, W=7, NW=8 - double dx = (x2 - x1); - double dy = (y2 - y1); - double a; - int i, k; - if ( dx == 0 ) - dx = 0.00390625; // 1/256th -#define PISLICES (8) - a = (atan2( dy, dx ) + PI / PISLICES) / (PI / (PISLICES / 2)); - i = (int)a; - if ( a>0 ) - k = i; else - if ( a<0 ) - k = i + (PISLICES - 1); else - k = 0; - return(trig[k]); -} -#endif //#if 0 UINT8 atan8( INT16 sXPos, INT16 sYPos, INT16 sXPos2, INT16 sYPos2 ) @@ -12426,22 +12112,6 @@ void SendGetNewSoldierPathEvent( SOLDIERTYPE *pSoldier, INT32 sDestGridNo, UINT1 void SendChangeSoldierStanceEvent( SOLDIERTYPE *pSoldier, UINT8 ubNewStance ) { -#if 0 - EV_S_CHANGESTANCE SChangeStance; - -#ifdef NETWORKED - if ( !IsTheSolderUnderMyControl( pSoldier->ubID ) ) - return; -#endif - - SChangeStance.ubNewStance = ubNewStance; - SChangeStance.usSoldierID = pSoldier->ubID; - SChangeStance.sXPos = pSoldier->sX; - SChangeStance.sYPos = pSoldier->sY; - SChangeStance.uiUniqueId = pSoldier->uiUniqueSoldierIdValue; - - AddGameEvent( S_CHANGESTANCE, 0, &SChangeStance ); -#endif if ( ((pSoldier->ubID > 19 && !is_server) || (pSoldier->ubID > 119 && is_server)) && is_networked )return; @@ -12464,51 +12134,6 @@ void SendBeginFireWeaponEvent( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo ) AddGameEvent( S_BEGINFIREWEAPON, 0, &SBeginFireWeapon ); } -#if 0 -// This function is now obsolete. Just call ReduceAttackBusyCount. - -// This function just encapolates the check for turnbased and having an attacker in the first place -void ReleaseSoldiersAttacker( SOLDIERTYPE *pSoldier ) -{ - INT32 cnt; - UINT8 ubNumToFree; - - //if ( gTacticalStatus.uiFlags & TURNBASED && (gTacticalStatus.uiFlags & INCOMBAT) ) - { - // ATE: Removed... - //if ( pSoldier->ubAttackerID != NOBODY ) - { - // JA2 Gold - // set next-to-previous attacker, so long as this isn't a repeat attack - if ( pSoldier->ubPreviousAttackerID != pSoldier->ubAttackerID ) - { - pSoldier->ubNextToPreviousAttackerID = pSoldier->ubPreviousAttackerID; - } - - // get previous attacker id - pSoldier->ubPreviousAttackerID = pSoldier->ubAttackerID; - - // Copy BeingAttackedCount here.... - ubNumToFree = pSoldier->bBeingAttackedCount; - // Zero it out BEFORE, as supression may increase it again... - pSoldier->bBeingAttackedCount = 0; - - for ( cnt = 0; cnt < ubNumToFree; cnt++ ) - { - DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "@@@@@@@ Freeing up attacker of %d (attacker is %d) - releasesoldierattacker num to free is %d", pSoldier->ubID, pSoldier->ubAttackerID, ubNumToFree ) ); - ReduceAttackBusyCount( pSoldier->ubAttackerID, FALSE ); - } - - // ATE: Set to NOBODY if this person is NOT dead - // otherise, we keep it so the kill can be awarded! - if ( pSoldier->stats.bLife != 0 && pSoldier->ubBodyType != QUEENMONSTER ) - { - pSoldier->ubAttackerID = NOBODY; - } - } - } -} -#endif BOOLEAN SOLDIERTYPE::MercInWater( void ) { @@ -17692,78 +17317,13 @@ void SOLDIERTYPE::HandleFlashLights( ) fLightChanged = TRUE; } - // not possible to get this bonus on a roof, due to our lighting system - if ( !this->pathing.bLevel ) - { - UINT8 flashlightrange = this->GetBestEquippedFlashLightRange( ); + if ( AddBestFlashLight() ) + { + // take note: we own a light source + this->usSoldierFlagMask |= SOLDIER_LIGHT_OWNER; - // if no flashlight is found, this will be 0 - if ( flashlightrange ) - { - // the range at which we create additional light sources to the side - UINT8 firstexpand = 8; - UINT8 secondexpand = 12; - - // depending on our direction, alter range - if ( this->ubDirection == NORTHEAST || this->ubDirection == NORTHWEST || this->ubDirection == SOUTHEAST || this->ubDirection == SOUTHWEST ) - { - flashlightrange = sqrt( (FLOAT)flashlightrange*(FLOAT)flashlightrange / 2.0f ); - firstexpand = sqrt( (FLOAT)firstexpand*(FLOAT)firstexpand / 2.0f ); - secondexpand = sqrt( (FLOAT)secondexpand*(FLOAT)secondexpand / 2.0f ); - } - - // we determine the height of the next tile in our direction. Because of the way structures are handled, we sometimes have to take the very tile we're occupying right now - INT32 nextGridNoinSight = this->sGridNo; - - for ( UINT8 i = 0; i < flashlightrange; ++i ) - { - nextGridNoinSight = NewGridNo( nextGridNoinSight, DirectionInc( this->ubDirection ) ); - - if ( SoldierToVirtualSoldierLineOfSightTest( this, nextGridNoinSight, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, FALSE ) ) - CreatePersonalLight( nextGridNoinSight, this->ubID ); - - // after a certain range, add new lights to the side to simulate a light cone - if ( i > firstexpand ) - { - INT8 sidedir1 = (this->ubDirection + 2) % NUM_WORLD_DIRECTIONS; - INT8 sidedir2 = (this->ubDirection - 2) % NUM_WORLD_DIRECTIONS; - - INT32 sideGridNo1 = NewGridNo( nextGridNoinSight, DirectionInc( sidedir1 ) ); - sideGridNo1 = NewGridNo( sideGridNo1, DirectionInc( sidedir1 ) ); - - if ( SoldierToVirtualSoldierLineOfSightTest( this, sideGridNo1, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, FALSE, NO_DISTANCE_LIMIT ) ) - CreatePersonalLight( sideGridNo1, this->ubID ); - - if ( i > secondexpand ) - { - sideGridNo1 = NewGridNo( sideGridNo1, DirectionInc( sidedir1 ) ); - - if ( SoldierToVirtualSoldierLineOfSightTest( this, sideGridNo1, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, FALSE, NO_DISTANCE_LIMIT ) ) - CreatePersonalLight( sideGridNo1, this->ubID ); - } - - INT32 sideGridNo2 = NewGridNo( nextGridNoinSight, DirectionInc( sidedir2 ) ); - sideGridNo2 = NewGridNo( sideGridNo2, DirectionInc( sidedir2 ) ); - - if ( SoldierToVirtualSoldierLineOfSightTest( this, sideGridNo2, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, FALSE, NO_DISTANCE_LIMIT ) ) - CreatePersonalLight( sideGridNo2, this->ubID ); - - if ( i > secondexpand ) - { - sideGridNo2 = NewGridNo( sideGridNo2, DirectionInc( sidedir2 ) ); - - if ( SoldierToVirtualSoldierLineOfSightTest( this, sideGridNo2, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, FALSE, NO_DISTANCE_LIMIT ) ) - CreatePersonalLight( sideGridNo2, this->ubID ); - } - } - } - - // take note: we own a light source - this->usSoldierFlagMask |= SOLDIER_LIGHT_OWNER; - - fLightChanged = TRUE; - } - } + fLightChanged = TRUE; + } if ( fLightChanged ) { @@ -17809,6 +17369,162 @@ UINT8 SOLDIERTYPE::GetBestEquippedFlashLightRange( ) return(bestrange); } +bool SOLDIERTYPE::AddBestFlashLight() +{ + // not possible to get this bonus on a roof, due to our lighting system + if ( this->pathing.bLevel != 0 ) + { + return false; + } + + UINT8 maxRange = this->GetBestEquippedFlashLightRange(); + if ( maxRange < 1 ) + { + return false; + } + + // we don't use the flashlight to run better at night (light up our shoes), we use it to find enemies! + UINT8 minRange = 4; + if ( minRange > maxRange ) + { + minRange = maxRange; + } + + float maxAngle = 45; + maxAngle *= PI / 180 / 2; // convert to rad and halven + + auto forward = DirectionInc(this->ubDirection); + auto left = DirectionInc(DirectionIfTurnedClockwise(this->ubDirection, 6)); + auto leftLeft = DirectionInc(DirectionIfTurnedClockwise(this->ubDirection, 5)); + auto right = DirectionInc(DirectionIfTurnedClockwise(this->ubDirection, 2)); + auto rightRight = DirectionInc(DirectionIfTurnedClockwise(this->ubDirection, 3)); + + bool isDiagonal = this->ubDirection == NORTHEAST || this->ubDirection == NORTHWEST || this->ubDirection == SOUTHEAST || this->ubDirection == SOUTHWEST; + + struct position_2d + { + INT16 x, y; + + position_2d(INT32 gridNo) + { + ConvertGridNoToXY(gridNo, &x, &y); + } + position_2d(INT16 _x, INT16 _y) : x{_x}, y{_y} + { + } + }; + struct vector_2d + { + INT16 dx, dy; + float length; + + vector_2d(INT8 direction) + { + ConvertDirectionToVectorInXY(direction, &dx, &dy); + length = CalcLength(dx, dy); + } + vector_2d(position_2d from, position_2d to) + { + dx = to.x - from.x; + dy = to.y - from.y; + length = CalcLength(dx, dy); + } + vector_2d(INT16 _dx, INT16 _dy) : dx{_dx}, dy{_dy} + { + length = CalcLength(dx, dy); + } + + float GetAngle( vector_2d other ) + { + auto dot = dx * other.dx + dy * other.dy; + return acos(dot / (length * other.length)); + } + + static float CalcLength(float dx, float dy) + { + return sqrt(powf(dx, 2) + powf(dy, 2)); + } + }; + + position_2d soldierPos(this->sGridNo); + vector_2d soldierDir(this->ubDirection); + + auto is_in_area = [&](INT32 sGridNoToTest) -> bool + { + vector_2d v(soldierPos, position_2d(sGridNoToTest)); + + if (v.length > maxRange) + { + return false; + } + + if (v.length < minRange) + { + return false; + } + + auto coneAngle = soldierDir.GetAngle( v ); + if (coneAngle > maxAngle) + { + return false; + } + + return true; + }; + + auto add_light_if_in_line_of_sight = [&, this]( INT32 sGridNoToTest, bool allowSkip ) -> void + { + if (allowSkip) // improve performance by skipping 3/4 of the lights + { + INT16 sXPos, sYPos; + ConvertGridNoToXY( sGridNoToTest, &sXPos, &sYPos ); + if (!(sXPos % 2 == 0 && sYPos % 2 == 0)) + { + return; + } + } + + if ( SoldierToVirtualSoldierLineOfSightTest( this, sGridNoToTest, this->pathing.bLevel, gAnimControl[this->usAnimState].ubEndHeight, false, NO_DISTANCE_LIMIT ) ) + { + CreatePersonalLight( sGridNoToTest, this->ubID ); + } + }; + + auto travel_direction_to_add_light = [&]( INT32 startingGridNo, INT16 directionIncrementer ) + { + for ( auto currentGridNo = startingGridNo; !OutOfBounds( currentGridNo, -1 ) && is_in_area( currentGridNo ); currentGridNo += directionIncrementer ) + { + add_light_if_in_line_of_sight( currentGridNo, true); + } + }; + + for ( auto currentGridNo = this->sGridNo; !OutOfBounds( currentGridNo, -1 ); currentGridNo += forward ) + { + vector_2d v(soldierPos, position_2d(currentGridNo)); + if ( v.length < minRange ) + { + continue; + } + else if (v.length > maxRange) + { + break; + } + + add_light_if_in_line_of_sight( currentGridNo, false ); + + travel_direction_to_add_light( currentGridNo, left ); + travel_direction_to_add_light( currentGridNo, right ); + + if ( isDiagonal ) + { + travel_direction_to_add_light( NewGridNo( currentGridNo, leftLeft ), left ); + travel_direction_to_add_light( NewGridNo( currentGridNo, rightRight ), right ); + } + } + + return true; +} + // Flugente: soldier profiles // retrieves the correct sub-array INT8 SOLDIERTYPE::GetSoldierProfileType( UINT8 usTeam ) @@ -18927,14 +18643,42 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN return FALSE; } + // Locate item indices for Signal and HE shells defined by the active MOD. Evade usage of hard-code values. + static UINT16 usSignalShellIndex = NOTHING; + static UINT16 usHeShellIndex = NOTHING; + if (usSignalShellIndex == NOTHING || usHeShellIndex == NOTHING) + { + UINT16 findSignalShellIndex = 1700; // try default Signal Shell item in 1.13 + UINT16 findHeShellIndex = 140; // try default HE Shell item in 1.13 + if (HasItemFlag(findSignalShellIndex, SIGNAL_SHELL) == FALSE && GetFirstItemWithFlag(&findSignalShellIndex, SIGNAL_SHELL) == FALSE) + { + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_SIGNAL_SHELL]); + return FALSE; + } + UINT16 mortarIndex = GetLauncherFromLaunchable(findSignalShellIndex); + if (mortarIndex != GetLauncherFromLaunchable(findHeShellIndex)) + { + findHeShellIndex = GetLaunchableOfExplosionType(mortarIndex, EXPLOSV_NORMAL); + } + if (findHeShellIndex == NOTHING) + { + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_DEFAULT_SHELL]); + return FALSE; + } + // at this point both shells were found and are OK, so set it to static variables and never touch anymore: + usSignalShellIndex = findSignalShellIndex; + usHeShellIndex = findHeShellIndex; + } + // if a strike is ordered from the ENEMY_TEAM or MILITIA_TEAM, the number of mortars depends on the number of enemies/militia in that sector // number of waves depends on the number and quality of enemies/soldiers // only HE shells will be fired this way if ( bTeam == ENEMY_TEAM || bTeam == MILITIA_TEAM ) { - INT16 nummortars = 0; // number of mortars determines size of wave (1 - 4) - INT16 numwaves = 0; // number of waves - INT16 numshells = 0; // number of shells + INT16 nummortars = 0; // number of mortars determines size of wave (1 - 4) + INT16 numwaves = 0; // number of waves + INT16 numshells = 0; // number of shells + INT16 numwavesMax = (INT16) Explosive[Item[usSignalShellIndex].ubClassIndex].ubDuration; SECTORINFO *pSector = &SectorInfo[SECTOR( sSectorX, sSectorY )]; @@ -18966,35 +18710,36 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN numshells = gSkillTraitValues.usVOMortarPointsAdmin * militia_green + gSkillTraitValues.usVOMortarPointsTroop * militia_troop + gSkillTraitValues.usVOMortarPointsElite * militia_elite; } - if ( gSkillTraitValues.usVOMortarShellDivisor * nummortars < 1 ) + // turn number of mortar points into number of shells; in case of "militia use sector ammo" option, numshells + // represents max potential shells militia can shot for this artillery strike. + numshells = numshells / gSkillTraitValues.usVOMortarShellDivisor; + + if (numshells <= 0) { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NOT_ENOUGH_MORTAR_SHELLS] ); + if (bTeam == MILITIA_TEAM) // player does not care if enemy team has not enough points to strike + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NOT_ENOUGH_MORTAR_SHELLS] ); return FALSE; } - numwaves = numshells / (gSkillTraitValues.usVOMortarShellDivisor * nummortars); - - if ( !numwaves ) + if (nummortars <= 0) { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NOT_ENOUGH_MORTAR_SHELLS] ); + if (bTeam == MILITIA_TEAM) // player does not care if enemy team has not enough men to strike + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_MORTARS]); return FALSE; } + numwaves = max(1, numshells / nummortars); + if (gSkillTraitValues.fROArtilleryDistributedOverTurns) // if delay between waves is enabled, we shouldn't overextend, so trim to + numwaves = min(numwaves, numwavesMax); // signal duration; it doesn't matter if delay is disabled. + // send a signal shell at first. This marks the area that the shells will come in - static UINT16 usSignalShellIndex = 1700; - if ( HasItemFlag( usSignalShellIndex, SIGNAL_SHELL ) || GetFirstItemWithFlag( &usSignalShellIndex, SIGNAL_SHELL ) ) - ArtilleryStrike( usSignalShellIndex, this->ubID + 2, sStartingGridNo, sTargetGridNo ); - else - { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_SIGNAL_SHELL] ); - return FALSE; - } + ArtilleryStrike(usSignalShellIndex, this->ubID + 2, sStartingGridNo, sTargetGridNo); // we just 'plant' the mortar shells as bombs. We time them so that they will be fired at the beginning of the next turn // for every 'wave' of shells, we just plant one and then clone them when firing // create mortar shell item OBJECTTYPE shellobj; - CreateItem( 140, 100, &shellobj ); // 140 is mortar HE shell + CreateItem(usHeShellIndex, 100, &shellobj ); shellobj.fFlags |= OBJECT_ARMED_BOMB; shellobj[0]->data.misc.bDetonatorType = BOMB_TIMED; @@ -19056,17 +18801,16 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN // as of 2013-09-25, I say it is no longer necessary to fire a signal shell first. The player can fire a signal shell (by mortar or hand) manually to mark one or more targets if he wants // if he does not do so, active vox operators will be targetted. Who knows, the vox operator might be doing a heroic last stand for all we know... - UINT16 radiooperatorID = 0; //BOOLEAN signalshellfired = FALSE; + const UINT8 maxFiringMortarsAmount = 5; + UINT16 radiooperatorID = 0; UINT8 mortaritemcnt = 0; - UINT16 mortararray[5]; - for ( UINT8 i = 0; i < 5; ++i ) - mortararray[i] = 0; + UINT16 mortararray[maxFiringMortarsAmount] = { 0 }; SOLDIERTYPE* pSoldier = NULL; INT32 cnt = gTacticalStatus.Team[bTeam].bFirstID; INT32 lastid = gTacticalStatus.Team[bTeam].bLastID; - for ( pSoldier = MercPtrs[cnt]; cnt < lastid; ++cnt, ++pSoldier ) + for ( pSoldier = MercPtrs[cnt]; (cnt < lastid) && (mortaritemcnt < maxFiringMortarsAmount); ++cnt, ++pSoldier ) { // check if soldier exists in this sector if ( !pSoldier || !pSoldier->bActive || pSoldier->sSectorX != sSectorX || pSoldier->sSectorY != sSectorY || pSoldier->bSectorZ != bSectorZ || pSoldier->bAssignment > ON_DUTY ) @@ -19075,70 +18819,25 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN if ( pSoldier->CanUseRadio( ) ) radiooperatorID = cnt; - /*if ( !signalshellfired ) - { - UINT8 bSlot = 0; - if ( pSoldier->GetSlotOfSignalShellIfMortar(&bSlot) ) - { - OBJECTTYPE* pSlotObj = &(pSoldier->inv[bSlot]); + INT8 invsize = (INT8)pSoldier->inv.size( ); // remember inventorysize, so we don't call size() repeatedly - if ( Item[pSlotObj->usItem].mortar ) - { - pSlotObj = FindAttachmentByClass( &(pSoldier->inv[bSlot]), IC_BOMB ); - - if ( pSlotObj ) - { - ArtilleryStrike(pSlotObj->usItem, sStartingGridNo, sTargetGridNo); - - DeductAmmo( pSoldier, bSlot ); - - signalshellfired = TRUE; - } - } - else if ( HasItemFlag(pSoldier->inv[bSlot].usItem, SIGNAL_SHELL) ) - { - ArtilleryStrike(pSlotObj->usItem, sStartingGridNo, sTargetGridNo); - - pSlotObj->ubNumberOfObjects--; - - if ( !pSlotObj->exists() ) - { - // Delete object - DeleteObj( pSlotObj ); - } - - signalshellfired = TRUE; - } - else - { - // somethings wrong... we were promised either a signal shell or a mortar with one loaded, but there is none... betrayal! - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"No signal shell found even though there should be one, cannot commence barrage!"); - return FALSE; - } - } - }*/ - - INT8 invsize = (INT8)pSoldier->inv.size( ); // remember inventorysize, so we don't call size() repeatedly - - for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop ) + for ( INT8 bLoop = 0; (bLoop < invsize) && (mortaritemcnt < maxFiringMortarsAmount); ++bLoop ) { if ( pSoldier->inv[bLoop].exists( ) == true && Item[pSoldier->inv[bLoop].usItem].mortar ) { // if not already in list, remember this mortar - if ( mortararray[0] != pSoldier->inv[bLoop].usItem && - mortararray[1] != pSoldier->inv[bLoop].usItem && - mortararray[2] != pSoldier->inv[bLoop].usItem && - mortararray[3] != pSoldier->inv[bLoop].usItem && - mortararray[4] != pSoldier->inv[bLoop].usItem ) - mortararray[mortaritemcnt++] = pSoldier->inv[bLoop].usItem; + bool alreadyInList = false; + for (INT8 i = 0; i < mortaritemcnt; i++) + if (mortararray[i] == pSoldier->inv[bLoop].usItem) + { + alreadyInList = true; + break; + } + + if (alreadyInList == false) + mortararray[mortaritemcnt++] = pSoldier->inv[bLoop].usItem; } - - if ( mortaritemcnt >= 5 ) - break; } - - if ( mortaritemcnt >= 5 ) - break; } // safety check, this shouldn't be happening @@ -19148,16 +18847,6 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN return FALSE; } - // no signal shell -> no barrage - /*if ( !signalshellfired ) - { - if ( radiooperatorID ) - DelayedTacticalCharacterDialogue( MercPtrs[ radiooperatorID ], QUOTE_OUT_OF_AMMO ); - - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"No signal shell object found, cannot commence barrage!"); - return FALSE; - }*/ - // depending on wether the mortars have ammunition, a radio operator will give a different dialogue BOOLEAN shellsfired = FALSE; @@ -19185,7 +18874,7 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN // as of 2013-09-25, also fire these, as they are no longer necessary for a barrage // only fire if not signal shell, we already fired one, no need to do so again - if ( pAttObj )//&& !HasItemFlag(pAttObj->usItem, SIGNAL_SHELL) ) + if ( pAttObj && HasItemFlag(pAttObj->usItem, SIGNAL_SHELL) == FALSE ) { // if option is set, delay each wave by one turn if ( gSkillTraitValues.fROArtilleryDistributedOverTurns ) @@ -20207,7 +19896,7 @@ FLOAT SOLDIERTYPE::GetDiseaseContactProtection( ) { bestfacegear = max( bestfacegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) ); } - else if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_2 ) ) + if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_2 ) ) { bestprotectivegear = max( bestprotectivegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) ); } @@ -22200,13 +21889,15 @@ void SoldierCollapse( SOLDIERTYPE *pSoldier ) if ( pSoldier->flags.uiStatusFlags & SOLDIER_ENEMY ) { - // sevenfm: bPanicTriggerIsAlarm is always not NULL pointer - //if ( !(gTacticalStatus.bPanicTriggerIsAlarm) && (gTacticalStatus.ubTheChosenOne == pSoldier->ubID) ) if ( gTacticalStatus.ubTheChosenOne == pSoldier->ubID ) { - // replace this guy as the chosen one! - gTacticalStatus.ubTheChosenOne = NOBODY; - MakeClosestEnemyChosenOne( ); + auto bPanicTrigger = ClosestPanicTrigger(pSoldier); + if (bPanicTrigger != -1 && !(gTacticalStatus.bPanicTriggerIsAlarm[bPanicTrigger])) + { + // replace this guy as the chosen one! + gTacticalStatus.ubTheChosenOne = NOBODY; + MakeClosestEnemyChosenOne( ); + } } if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) && (pSoldier->flags.uiStatusFlags & SOLDIER_UNDERAICONTROL) ) diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index 024f635b..4fd55e8a 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -1771,6 +1771,7 @@ public: void DoNinjaAttack( void ); void PickDropItemAnimation( void ); + BOOLEAN CanClimbWithCurrentBackpack(); void BeginSoldierGetup( void ); void BeginSoldierClimbUpRoof( void ); @@ -1934,7 +1935,8 @@ public: //void AddDrugValues(UINT8 uDrugType, UINT8 usEffect, UINT8 usTravelRate, UINT8 usSideEffect ); void HandleFlashLights(); - UINT8 GetBestEquippedFlashLightRange(); + bool AddBestFlashLight(); + UINT8 GetBestEquippedFlashLightRange(); // Flugente: soldier profiles INT8 GetSoldierProfileType(UINT8 usTeam); // retrieves the correct sub-array diff --git a/Tactical/Soldier Create.cpp b/Tactical/Soldier Create.cpp index eb87056f..32c3d9ab 100644 --- a/Tactical/Soldier Create.cpp +++ b/Tactical/Soldier Create.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" -#include "saveloadgame.h" -#else #include "sgp.h" #include "Soldier Create.h" #include "overhead.h" @@ -48,7 +43,6 @@ #include "Soldier macros.h" // added by Flugente #include "MilitiaIndividual.h" // added by Flugente #include "Rebel Command.h" -#endif #include "connect.h" #include "message.h" @@ -1838,6 +1832,8 @@ BOOLEAN TacticalCopySoldierFromCreateStruct( SOLDIERTYPE *pSoldier, SOLDIERCREAT RebelCommand::ApplyMilitiaBonuses(pSoldier); if ((SOLDIER_CLASS_ENEMY(pSoldier->ubSoldierClass) || pSoldier->ubSoldierClass == SOLDIER_CLASS_BANDIT)) RebelCommand::ApplyEnemyPenalties(pSoldier); + if (pCreateStruct->bTeam == ENEMY_TEAM && (ENEMYROBOT(pCreateStruct) || ARMED_VEHICLE(pCreateStruct))) + RebelCommand::ApplyEnemyMechanicalUnitPenalties(pSoldier); // Flugente: enemy roles if ( gGameExternalOptions.fEnemyRoles && gGameExternalOptions.fEnemyOfficers && SOLDIER_CLASS_ENEMY( pSoldier->ubSoldierClass ) ) @@ -3224,6 +3220,8 @@ SOLDIERTYPE* TacticalCreateEnemyTank() // Flugente: why would a vehicle's armour depend on game progress? Always give them 100 HP pSoldier->stats.bLifeMax = 100; pSoldier->stats.bLife = pSoldier->stats.bLifeMax; + + RebelCommand::ApplyEnemyMechanicalUnitPenalties(pSoldier); } return( pSoldier ); @@ -3264,6 +3262,8 @@ SOLDIERTYPE* TacticalCreateEnemyJeep( ) // Flugente: why would a vehicle's armour depend on game progress? Always give them 100 HP pSoldier->stats.bLifeMax = 100; pSoldier->stats.bLife = pSoldier->stats.bLifeMax; + + RebelCommand::ApplyEnemyMechanicalUnitPenalties(pSoldier); } return(pSoldier); @@ -3304,6 +3304,8 @@ SOLDIERTYPE* TacticalCreateEnemyRobot() pSoldier->stats.bLifeMax = 80; pSoldier->stats.bLife = pSoldier->stats.bLifeMax; + + RebelCommand::ApplyEnemyMechanicalUnitPenalties(pSoldier); } return(pSoldier); diff --git a/Tactical/Soldier Find.cpp b/Tactical/Soldier Find.cpp index 0e688cfa..0f624aea 100644 --- a/Tactical/Soldier Find.cpp +++ b/Tactical/Soldier Find.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -43,7 +40,6 @@ #include "Vehicles.h" #include "GameSettings.h" #include "ui cursors.h" -#endif BOOLEAN IsGridNoInScreenRect( INT32 sGridNo, SGPRect *pRect ); diff --git a/Tactical/Soldier Init List.cpp b/Tactical/Soldier Init List.cpp index 847629c3..7cb99a45 100644 --- a/Tactical/Soldier Init List.cpp +++ b/Tactical/Soldier Init List.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "builddefines.h" #include #include @@ -46,7 +43,6 @@ #include "screenids.h" #include "SaveLoadScreen.h" #include "Rotting Corpses.h" -#endif #include "connect.h" #include "Map Edgepoints.h" @@ -1853,7 +1849,7 @@ void AddSoldierInitListMilitia( UINT8 ubNumGreen, UINT8 ubNumRegs, UINT8 ubNumEl else Assert(0); curr->pBasicPlacement->bTeam = MILITIA_TEAM; - curr->pBasicPlacement->bOrders = STATIONARY; + curr->pBasicPlacement->bOrders = ONGUARD; curr->pBasicPlacement->bAttitude = (INT8) Random( MAXATTITUDES ); // silversurfer: Replace body type. Militia tanks are not allowed. diff --git a/Tactical/Soldier Profile.cpp b/Tactical/Soldier Profile.cpp index b18b23fb..766a80f2 100644 --- a/Tactical/Soldier Profile.cpp +++ b/Tactical/Soldier Profile.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -52,7 +49,6 @@ #include "drugs and alcohol.h" // added by Flugente #include "Campaign.h" #include "LuaInitNPCs.h" // added by Flugente -#endif #include "aim.h" #include "AimFacialIndex.h" diff --git a/Tactical/Soldier Tile.cpp b/Tactical/Soldier Tile.cpp index ec7e0da2..5e9f1824 100644 --- a/Tactical/Soldier Tile.cpp +++ b/Tactical/Soldier Tile.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include @@ -49,7 +46,6 @@ #include "Text.h" #include "NPC.h" #include "Soldier macros.h" -#endif extern UINT8 gubWaitingForAllMercsToExitCode; @@ -359,21 +355,6 @@ INT8 TileIsClear( SOLDIERTYPE *pSoldier, INT8 bDirection, INT32 sGridNo, INT8 b pSoldier->flags.fBlockedByAnotherMerc = FALSE; return( MOVE_TILE_STATIONARY_BLOCKED ); } - else - { -#if 0 - // Check if there is a reserved marker here at least.... - sNewGridNo = NewGridNo( sGridNo, DirectionInc( bDirection ) ); - - if ( ( gpWorldLevelData[ sNewGridNo ].uiFlags & MAPELEMENT_MOVEMENT_RESERVED ) ) - { - if ( gpWorldLevelData[ sNewGridNo ].ubReservedSoldierID != pSoldier->ubID ) - { - return( MOVE_TILE_TEMP_BLOCKED ); - } - } -#endif - } } // Unset flag for blocked by soldier... diff --git a/Tactical/SoldierTooltips.cpp b/Tactical/SoldierTooltips.cpp index 565e727f..b1b08ccf 100644 --- a/Tactical/SoldierTooltips.cpp +++ b/Tactical/SoldierTooltips.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "Types.h" #include "Windows.h" //#include "Soldier Control.h" @@ -33,7 +30,6 @@ #include "Map Screen Interface.h" #include "cheats.h" #include "Drugs and Alcohol.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -747,6 +743,7 @@ void DrawMouseTooltip() UINT32 uiDestPitchBYTES; static INT32 iX, iY, iW, iH; + extern bool isTooltipScalingEnabled(); extern INT16 GetWidthOfString(const STR16); extern INT16 GetNumberOfLinesInHeight(const STR16); extern void DisplayHelpTokenizedString(const STR16,INT16,INT16); @@ -756,29 +753,23 @@ void DrawMouseTooltip() extern void DisplayTooltipString( const STR16 pStringA, INT16 sX, INT16 sY ); extern void j_log(PTR,...); + UINT16 fontHeight = isTooltipScalingEnabled() + ? GetWinFontHeight(TOOLTIP_IFONT) + : GetFontHeight(FONT10ARIAL); + iX = mouseTT.iX;iY = mouseTT.iY; - iW = (INT32)GetWidthOfString( mouseTT.FastHelpText ) + 10; - iH = (INT32)( GetNumberOfLinesInHeight( mouseTT.FastHelpText ) * (GetFontHeight(FONT10ARIAL)+1) + 8 ); + iW = (INT32)(GetWidthOfString(mouseTT.FastHelpText) + 10 * fTooltipScaleFactor); + iH = (INT32)(GetNumberOfLinesInHeight(mouseTT.FastHelpText) * (fontHeight + 1) + 8 * fTooltipScaleFactor); - if(1)//draw at cursor - { - iY -= (iH / 2); - if (gusMouseXPos > (SCREEN_WIDTH / 2)) - iX = gusMouseXPos - iW - 24; - else - iX = gusMouseXPos + 24; - //if (gusMouseYPos > (SCREEN_HEIGHT / 2)) - // iY -= 32; - - if (iY <= 0) iY += 32; - } + iY -= (iH / 2); + if (gusMouseXPos > (SCREEN_WIDTH / 2)) + iX = gusMouseXPos - iW - 24; else - { //draw in panel - //502,485 658,596 160*110 580,540 - iX = 580 - (iW / 2); - iY = 540 - (iH/2); - if (iY + iH > SCREEN_HEIGHT) iY = SCREEN_HEIGHT - iH - 3 ; - } + iX = gusMouseXPos + 24; + //if (gusMouseYPos > (SCREEN_HEIGHT / 2)) + // iY -= 32; + + if (iY <= 0) iY += 32; pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); @@ -788,10 +779,12 @@ void DrawMouseTooltip() ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); ShadowVideoSurfaceRect( FRAME_BUFFER, iX + 2, iY + 2, iX + iW - 3, iY + iH - 3 ); - SetFont( FONT10ARIAL ); - SetFontShadow( FONT_NEARBLACK ); - DisplayHelpTokenizedString( mouseTT.FastHelpText ,( INT16 )( iX + 5 ), ( INT16 )( iY + 5 ) ); + DisplayHelpTokenizedString( + mouseTT.FastHelpText, + (INT16)(iX + (isTooltipScalingEnabled() ? 5 * fTooltipScaleFactor : 5)), + (INT16)(iY + (isTooltipScalingEnabled() ? 4 * fTooltipScaleFactor : 5)) + ); InvalidateRegion( iX, iY, (iX + iW) , (iY + iH) ); //InvalidateScreen(); -} \ No newline at end of file +} diff --git a/Tactical/Spread Burst.cpp b/Tactical/Spread Burst.cpp index 5c82e40c..1f8ae857 100644 --- a/Tactical/Spread Burst.cpp +++ b/Tactical/Spread Burst.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include #include "stdlib.h" @@ -15,7 +12,6 @@ #include "interface.h" #include "spread burst.h" #include "points.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Tactical/Squads.cpp b/Tactical/Squads.cpp index 9c3c5734..4d1b3183 100644 --- a/Tactical/Squads.cpp +++ b/Tactical/Squads.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Types.h" #include "Squads.h" #include "Strategic Pathing.h" @@ -18,7 +15,6 @@ #include "screenids.h" #include "Soldier macros.h" #include "GameSettings.h" -#endif #include @@ -1389,6 +1385,11 @@ BOOLEAN IsSquadInSector( SOLDIERTYPE *pSoldier, UINT8 ubSquad ) return( FALSE ); } + if( pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) + { + return( FALSE ); + } + if( SquadIsEmpty( ubSquad ) == TRUE ) { return( TRUE ); diff --git a/Tactical/Strategic Exit GUI.cpp b/Tactical/Strategic Exit GUI.cpp index 4f101117..58d4459c 100644 --- a/Tactical/Strategic Exit GUI.cpp +++ b/Tactical/Strategic Exit GUI.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "PreBattle Interface.h" - #include "creature spreading.h" -#else #include "builddefines.h" #include #include "Button System.h" @@ -35,7 +30,6 @@ #include "Quests.h" #include "Creature Spreading.h" #include "Queen Command.h" // added by Flugente -#endif #ifdef JA2UB #include "Explosion Control.h" @@ -238,7 +232,7 @@ BOOLEAN InternalInitSectorExitMenu( UINT8 ubDirection, INT32 sAdditionalData )// pSoldier->stats.bLife >= OKLIFE && ( pSoldier->bAssignment != MercPtrs[ gusSelectedSoldier ]->bAssignment || ( pSoldier->bAssignment == VEHICLE && pSoldier->iVehicleId != MercPtrs[ gusSelectedSoldier ]->iVehicleId ) ) && - pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_DEAD && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT + pSoldier->bAssignment != ASSIGNMENT_POW && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_DEAD && pSoldier->bAssignment != ASSIGNMENT_MINIEVENT && pSoldier->bAssignment != ASSIGNMENT_REBELCOMMAND && !(pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) ) { //KM: We need to determine if there are more than one squad (meaning other concious mercs in a different squad or assignment) // These conditions were done to the best of my knowledge, so if there are other situations that require modification, diff --git a/Tactical/Structure Wrap.cpp b/Tactical/Structure Wrap.cpp index 2123504f..60cf9a61 100644 --- a/Tactical/Structure Wrap.cpp +++ b/Tactical/Structure Wrap.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include #include "debug.h" #include "worlddef.h" @@ -13,7 +10,6 @@ #include "strategicmap.h" #include "rotting corpses.h" #include "WorldDat.h" // added by Flugente -#endif extern BOOLEAN DoesSAMExistHere( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, INT32 sGridNo ); diff --git a/Tactical/Tactical All.h b/Tactical/Tactical All.h deleted file mode 100644 index 0f53a310..00000000 --- a/Tactical/Tactical All.h +++ /dev/null @@ -1,232 +0,0 @@ -#ifndef __TACTICAL_ALL_H -#define __TACTICAL_ALL_H - -#pragma message("GENERATED PCH FOR TACTICAL PROJECT.") - -#include "sgp.h" -#include "air raid.h" -#include "game event hook.h" -#include "game clock.h" -#include "auto bandage.h" -#include "strategicmap.h" -#include "screenids.h" -#include "jascreens.h" -#include "random.h" -#include "overhead types.h" -#include "sound control.h" -#include "timer control.h" -#include "dialogue control.h" -#include "overhead.h" -#include "message.h" -#include "isometric utils.h" -#include "soldier macros.h" -#include "worldman.h" -#include "los.h" -#include "math.h" -#include "explosion control.h" -#include "interface.h" -#include "music control.h" -#include "Campaign Types.h" -#include "GameSettings.h" -#include "text.h" -#include "Morale.h" -#include "Map screen helicopter.h" -#include -#include -#include "types.h" -#include "wcheck.h" -#include -#include "Animation Cache.h" -#include "Animation Data.h" -#include "Animation Control.h" -#include "sys globals.h" -#include "Debug Control.h" -#include "FileMan.h" -#include "weapons.h" -#include "structure.h" -#include "worlddef.h" -#include "rotting corpses.h" -#include "points.h" -#include "Soldier Control.h" -#include "tiledef.h" -#include "utilities.h" -#include "Arms Dealer Init.h" -#include "ArmsDealerInvInit.h" -#include "soldier profile.h" -#include "Handle Items.h" -#include "Item Types.h" -#include "messageboxscreen.h" -#include "Handle UI.h" -#include "items.h" -#include "MercTextBox.h" -#include "renderworld.h" -#include "strategic turns.h" -#include "Event Pump.h" -#include "ai.h" -#include "interface control.h" -#include "Map Screen Interface.h" -#include "Map Screen Interface Bottom.h" -#include "Assignments.h" -#include "WordWrap.h" -#include "cursors.h" -#include "English.h" -#include "Boxing.h" -#include "Render Fun.h" -#include "NPC.h" -#include "Opplist.h" -#include -#include "vsurface.h" -#include "Render Dirty.h" -#include "sysutil.h" -#include "container.h" -#include "video.h" -#include "vobject_blitters.h" -#include "faces.h" -#include "gap.h" -#include "Bullets.h" -#include -#include "MemMan.h" -#include "campaign.h" -#include "Strategic Mines.h" -#include "Strategic Status.h" -#include "Encrypted File.h" -#include "mercs.h" -#include "interface dialogue.h" -#include "squads.h" -#include "interface utils.h" -#include "Quests.h" -#include "gamescreen.h" -#include "ShopKeeper Interface.h" -#include "Merc Contract.h" -#include "history.h" -#include "Town Militia.h" -#include "meanwhile.h" -#include "SkillCheck.h" -#include "finances.h" -#include "drugs and alcohol.h" -#include "teamturns.h" -#include "font control.h" -#include "line.h" -#include "structure wrap.h" -#include "pathai.h" -#include "smell.h" -#include "fov.h" -#include "keys.h" -#include "input.h" -#include "exit grids.h" -#include "environment.h" -#include "Fog Of War.h" -#include "soundman.h" -#include -#include -#include "tile animation.h" -#include "Interactive Tiles.h" -#include "handle doors.h" -#include "Action Items.h" -#include "World items.h" -#include "interface items.h" -#include "physics.h" -#include "interface panels.h" -#include "Strategic Town Loyalty.h" -#include "soldier functions.h" -#include "SaveLoadMap.h" -#include "soldier add.h" -#include "soldier ani.h" -#include "qarray.h" -#include "Handle UI Plan.h" -#include "soldier create.h" -#include "mousesystem.h" -#include "cursor control.h" -#include "interface cursors.h" -#include "UI cursors.h" -#include "Strategic Pathing.h" -#include "strategic movement.h" -#include "strategic.h" -#include "vehicles.h" -#include "gameloop.h" -#include "himage.h" -#include "vobject.h" -#include "Button System.h" -#include "radar screen.h" -#include "lighting.h" -#include "Strategic Exit GUI.h" -#include "PopUpBox.h" -#include "spread burst.h" -#include "Tactical Save.h" -#include "fade screen.h" -#include "Strategic AI.h" -#include "mapscreen.h" -#include "LaptopSave.h" -#include "Map Screen Interface Map.h" -#include "Map Screen Interface Map Inventory.h" -#include "overhead map.h" -#include "Options Screen.h" -#include -#include "Inventory Choosing.h" -#include "Smoothing Utils.h" -#include "tiledat.h" -#include -#include "phys math.h" -#include "Map Information.h" -#include "Soldier Init List.h" -#include "EditorMercs.h" -#include "ja2.h" -#include "Road Smoothing.h" -#include "tile cache.h" -#include "merc entering.h" -#include "Merc Hiring.h" -#include "Strategic Merc Handler.h" -#include "Militia Control.h" -#include "Queen Command.h" -#include "editscreen.h" -#include "soldier tile.h" -#ifdef NETWORKED - #include "Networking.h" - #include "NetworkEvent.h" -#endif -#include "Player Command.h" -#include "Game Init.h" -#include "Buildings.h" -#include "rt time defines.h" -#include "GameSettings.h" -#include "Text Input.h" -#include "ShopKeeper Quotes.h" -#include "Personnel.h" -#include "pits.h" -#include "Win util.h" -#include "smokeeffects.h" -#include "SaveLoadGame.h" -#include "Scheduling.h" -#include "Auto Resolve.h" -#include "soldier find.h" -#include "aim.h" -#include "strategic town reputation.h" -#include "Tactical Turns.h" -#include "lighteffects.h" -#include "timer.h" -#include "Soldier Profile Type.h" -#include "AIList.h" -#include "QuestDebug.h" -#include "Game Events.h" -#include "BobbyR.h" - -#include "EnemyItemDrops.h" - -#ifdef JA2BETAVERSION - #include "Quest Debug System.h" -#endif - -#include "GameVersion.h" -#include "SaveLoadScreen.h" -#include "Cheats.h" -#include "Animated ProgressBar.h" -#include "civ quotes.h" -#include "AimMembers.h" -#include "BobbyRMailOrder.h" -#include "end game.h" -#include "DisplayCover.h" -#include "expat.h" -#include "spread burst.h" -#include "XML.h" - -#endif \ No newline at end of file diff --git a/Tactical/Tactical Save.cpp b/Tactical/Tactical Save.cpp index 5c70a612..a54af70f 100644 --- a/Tactical/Tactical Save.cpp +++ b/Tactical/Tactical Save.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Enemy Soldier Save.h" -#else #include "Types.h" #include "MemMan.h" #include "message.h" @@ -46,7 +42,6 @@ #include "screenids.h" #include "Queen Command.h" #include "Map Screen Interface Map Inventory.h" -#endif #include "Animation Control.h" #include BOOLEAN gfWasInMeanwhile = FALSE; diff --git a/Tactical/Tactical Turns.cpp b/Tactical/Tactical Turns.cpp index 9ae4a7d2..98f33558 100644 --- a/Tactical/Tactical Turns.cpp +++ b/Tactical/Tactical Turns.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Game Clock.h" #include "Font Control.h" @@ -28,7 +25,6 @@ #include "Random.h" #include "Explosion Control.h" #include "Dialogue Control.h" // added by Flugente -#endif #include "Reinforcement.h" diff --git a/Tactical/Tactical_VS2005.vcproj b/Tactical/Tactical_VS2005.vcproj deleted file mode 100644 index f80ffd15..00000000 --- a/Tactical/Tactical_VS2005.vcproj +++ /dev/null @@ -1,1283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tactical/Tactical_VS2008.vcproj b/Tactical/Tactical_VS2008.vcproj deleted file mode 100644 index 9e5bcdac..00000000 --- a/Tactical/Tactical_VS2008.vcproj +++ /dev/null @@ -1,1285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tactical/Tactical_VS2010.vcxproj b/Tactical/Tactical_VS2010.vcxproj deleted file mode 100644 index 39d827ac..00000000 --- a/Tactical/Tactical_VS2010.vcxproj +++ /dev/null @@ -1,455 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - Win32Proj - Tactical - Tactical - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2010.vcxproj.filters b/Tactical/Tactical_VS2010.vcxproj.filters deleted file mode 100644 index 58cbd2da..00000000 --- a/Tactical/Tactical_VS2010.vcxproj.filters +++ /dev/null @@ -1,789 +0,0 @@ - - - - - {b76e83a9-042b-4267-96e0-ffd42052b5d5} - - - {c1880088-a976-405e-919e-9f1e97ad6701} - - - {7ccf82e9-8713-4351-af1f-218106a69555} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2013.vcxproj b/Tactical/Tactical_VS2013.vcxproj deleted file mode 100644 index 0740bc05..00000000 --- a/Tactical/Tactical_VS2013.vcxproj +++ /dev/null @@ -1,476 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - Win32Proj - Tactical - Tactical - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2013.vcxproj.filters b/Tactical/Tactical_VS2013.vcxproj.filters deleted file mode 100644 index 649d9c80..00000000 --- a/Tactical/Tactical_VS2013.vcxproj.filters +++ /dev/null @@ -1,792 +0,0 @@ - - - - - {b76e83a9-042b-4267-96e0-ffd42052b5d5} - - - {c1880088-a976-405e-919e-9f1e97ad6701} - - - {7ccf82e9-8713-4351-af1f-218106a69555} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2017.vcxproj b/Tactical/Tactical_VS2017.vcxproj deleted file mode 100644 index 43193273..00000000 --- a/Tactical/Tactical_VS2017.vcxproj +++ /dev/null @@ -1,477 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - Win32Proj - Tactical - Tactical - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2017.vcxproj.filters b/Tactical/Tactical_VS2017.vcxproj.filters deleted file mode 100644 index 50989116..00000000 --- a/Tactical/Tactical_VS2017.vcxproj.filters +++ /dev/null @@ -1,792 +0,0 @@ - - - - - {b76e83a9-042b-4267-96e0-ffd42052b5d5} - - - {c1880088-a976-405e-919e-9f1e97ad6701} - - - {7ccf82e9-8713-4351-af1f-218106a69555} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2019.vcxproj b/Tactical/Tactical_VS2019.vcxproj deleted file mode 100644 index 9b6f2874..00000000 --- a/Tactical/Tactical_VS2019.vcxproj +++ /dev/null @@ -1,485 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - Win32Proj - Tactical - Tactical - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - CppCoreCheckConstRules.ruleset - false - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - AllRules.ruleset - false - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - false - true - Speed - true - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Tactical/Tactical_VS2019.vcxproj.filters b/Tactical/Tactical_VS2019.vcxproj.filters deleted file mode 100644 index 649d9c80..00000000 --- a/Tactical/Tactical_VS2019.vcxproj.filters +++ /dev/null @@ -1,792 +0,0 @@ - - - - - {b76e83a9-042b-4267-96e0-ffd42052b5d5} - - - {c1880088-a976-405e-919e-9f1e97ad6701} - - - {7ccf82e9-8713-4351-af1f-218106a69555} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - Logical Bodytypes - - - \ No newline at end of file diff --git a/Tactical/TeamTurns.cpp b/Tactical/TeamTurns.cpp index b9d6c0d8..6173458d 100644 --- a/Tactical/TeamTurns.cpp +++ b/Tactical/TeamTurns.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "types.h" #include "overhead.h" #include "animation control.h" @@ -45,7 +42,6 @@ #include "Soldier Profile.h" #include "NPC.h" #include "drugs and alcohol.h" // added by Flugente -#endif #ifdef JA2UB #include "Ja25_Tactical.h" diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 3c963248..ac8dad97 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -1,12 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#include "Language Defines.h" -#include "HelpScreen.h" -#include "Prebattle Interface.h" -#include "ambient control.h" -#include "DisplayCover.h" -#include "_Ja25Englishtext.h" -#else #include "builddefines.h" #include #include @@ -108,7 +99,6 @@ #include "Ambient Control.h" #include "Strategic AI.h" #include "VehicleMenu.h" -#endif #include "Quest Debug System.h" #include "connect.h" @@ -265,7 +255,6 @@ void CreatePlayerControlledMonster(); void ChangeCurrentSquad( INT32 iSquad ); void HandleSelectMercSlot( UINT8 ubPanelSlot, INT8 bCode ); void EscapeUILock( ); -void TestCapture( ); #ifdef JA2BETAVERSION void ToggleMapEdgepoints(); @@ -351,6 +340,7 @@ void HandleTBLocateNextMerc( void ); void HandleTBLocatePrevMerc( void ); void HandleTBLevelDown(void); void HandleTBLevelUp(void); +void HandleTBBackpacks(void); void HandleTBDropBackpacks( void ); void HandleTBPickUpBackpacks( void ); void HandleTBSoldierRun( void ); @@ -2984,14 +2974,6 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) } break; -#if 0//dnl ch75 021113 - case '\"': - Testing(1); - break; - case '\'': - Testing(2); - break; -#endif case '`': @@ -3386,8 +3368,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) break; case 'B': - //Drop pack for all mercs on current map - HandleTBDropBackpacks(); + //Drop/Pick up backpack for all mercs on current map + HandleTBBackpacks(); break; case 'c': @@ -3881,10 +3863,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) if ( fNearLowerLevel ) { // No climbing when wearing a backpack! - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pjSoldier->CanClimbWithCurrentBackpack()) { ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB] ); return; @@ -3900,10 +3879,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) if ( fNearHeigherLevel ) { // No climbing when wearing a backpack! - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pjSoldier->CanClimbWithCurrentBackpack()) { ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB] ); return; @@ -3919,10 +3895,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) // Jump over fence if ( FindFenceJumpDirection( pjSoldier, pjSoldier->sGridNo, pjSoldier->ubDirection, &bDirection ) ) { - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pjSoldier->CanClimbWithCurrentBackpack()) { //Moa: no jumping whith backpack //sAPCost = GetAPsToJumpFence( pjSoldier, TRUE ); @@ -3947,10 +3920,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) if (gGameExternalOptions.fCanClimbOnWalls == TRUE) { // No climbing when wearing a backpack! - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pjSoldier->CanClimbWithCurrentBackpack()) { ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB] ); return; @@ -3986,10 +3956,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) if ( FindWindowJumpDirection( lSoldier, lSoldier->sGridNo, lSoldier->ubDirection, &bDirection ) ) { - if ((UsingNewInventorySystem() == true) && lSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)lSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[lSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[lSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!lSoldier->CanClimbWithCurrentBackpack()) { //Moa: no jumping with backpack //sAPCost = GetAPsToJumpThroughWindows( lSoldier, TRUE ); @@ -4241,21 +4208,6 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) } else if ( fCtrl ) { -#if 0 - if ( INFORMATION_CHEAT_LEVEL() ) - { - if ( gfUIShowCurIntTile ^= TRUE ) - { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Turning Enhanced mouse detection ON." ); - gubIntTileCheckFlags = INTILE_CHECK_FULL; - } - else - { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Turning Enhanced mouse detection OFF." ); - gubIntTileCheckFlags = INTILE_CHECK_SELECTIVE; - } - } -#endif } else { @@ -4508,9 +4460,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) { if ( CHEATER_CHEAT_LEVEL( ) ) { - TestCapture( ); - - //EnterCombatMode( gbPlayerNum ); + // Test Capturing Mercs as POW + AttemptToCapturePlayerSoldiers(); } } else if ( fCtrl && fShift ) @@ -6565,42 +6516,6 @@ void HandleStealthChangeFromUIKeys( ) } } - - -void TestCapture( ) -{ - INT32 cnt; - SOLDIERTYPE *pSoldier; - UINT32 uiNumChosen = 0; - - //StartQuest( QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY ); - //EndQuest( QUEST_HELD_IN_ALMA, gWorldSectorX, gWorldSectorY ); - - BeginCaptureSquence( ); - - gStrategicStatus.uiFlags &= (~STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ); - - // loop through soldiers and pick 3 lucky ones.... - for ( cnt = gTacticalStatus.Team[gbPlayerNum].bFirstID, pSoldier=MercPtrs[cnt]; cnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; cnt++, pSoldier++ ) - { - if ( pSoldier->stats.bLife >= OKLIFE && pSoldier->bActive && pSoldier->bInSector ) - { - if ( uiNumChosen < 3 ) - { - EnemyCapturesPlayerSoldier( pSoldier ); - - // Remove them from tectical.... - pSoldier->RemoveSoldierFromGridNo( ); - - uiNumChosen++; - } - } - } - - EndCaptureSequence( ); -} - - void PopupAssignmentMenuInTactical( SOLDIERTYPE *pSoldier ) { // do something @@ -7673,11 +7588,7 @@ void HandleTBJump( void ) if ( fNearLowerLevel ) { // CHRISL: Turn off manual jumping while wearing a backpack - if (UsingNewInventorySystem() == true && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) - + if (!pjSoldier->CanClimbWithCurrentBackpack()) return; if ( EnoughPoints( pjSoldier, GetAPsToClimbRoof( pjSoldier, TRUE ), GetBPsToClimbRoof( pjSoldier, TRUE ), FALSE ) ) @@ -7689,11 +7600,7 @@ void HandleTBJump( void ) if ( fNearHeigherLevel ) { // No climbing when wearing a backpack! - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) - + if (!pjSoldier->CanClimbWithCurrentBackpack()) return; if ( EnoughPoints( pjSoldier, GetAPsToClimbRoof( pjSoldier, FALSE ), GetBPsToClimbRoof( pjSoldier, FALSE ), FALSE ) ) @@ -7705,11 +7612,7 @@ void HandleTBJump( void ) // Jump over fence if ( FindFenceJumpDirection( pjSoldier, pjSoldier->sGridNo, pjSoldier->ubDirection, &bDirection ) ) { - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) - + if (!pjSoldier->CanClimbWithCurrentBackpack()) { sAPCost = GetAPsToJumpFence( pjSoldier, TRUE ); sBPCost = GetBPsToJumpFence( pjSoldier, TRUE ); @@ -7732,11 +7635,7 @@ void HandleTBJump( void ) if ( FindWallJumpDirection( pjSoldier, pjSoldier->sGridNo, pjSoldier->ubDirection, &bDirection ) ) { // No climbing when wearing a backpack! - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) - + if (!pjSoldier->CanClimbWithCurrentBackpack()) return; if ( EnoughPoints( pjSoldier, GetAPsToJumpWall( pjSoldier, FALSE ), GetBPsToJumpWall( pjSoldier, FALSE ), FALSE ) ) @@ -7760,11 +7659,7 @@ void HandleTBJumpThroughWindow( void ){ { if ( FindWindowJumpDirection( pjSoldier, pjSoldier->sGridNo, pjSoldier->ubDirection, &bDirection ) ) { - if ((UsingNewInventorySystem() == true) && pjSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pjSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pjSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pjSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) - + if (!pjSoldier->CanClimbWithCurrentBackpack()) { sAPCost = GetAPsToJumpThroughWindows( pjSoldier, TRUE ); sBPCost = GetBPsToJumpThroughWindows( pjSoldier, TRUE ); @@ -8409,6 +8304,35 @@ void HandleTBLevelUp(void) } } +void HandleTBBackpacks(void) +{ + if (UsingNewInventorySystem) + { + bool backpackDropped = false; + SOLDIERTYPE* pTeamSoldier; + + for (UINT8 ubLoop = gTacticalStatus.Team[gbPlayerNum].bFirstID; ubLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; ubLoop++) + { + pTeamSoldier = MercPtrs[ubLoop]; + + if (pTeamSoldier->flags.DropPackFlag) + { + backpackDropped = true; + break; + } + } + + if (backpackDropped) + { + HandleTBPickUpBackpacks(); + } + else + { + HandleTBDropBackpacks(); + } + } +} + void HandleTBDropBackpacks( void ) { //if( UsingNewInventorySystem() && gusSelectedSoldier != NOBODY ) diff --git a/Tactical/UI Cursors.cpp b/Tactical/UI Cursors.cpp index d6f1dd6b..d0243298 100644 --- a/Tactical/UI Cursors.cpp +++ b/Tactical/UI Cursors.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "items.h" #include "weapons.h" #include "Interface Cursors.h" @@ -32,7 +29,6 @@ #include "SkillCheck.h" // added by SANDRO #include "message.H" //ddd #include "english.h" // added by Flugente -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -140,13 +136,13 @@ BOOLEAN GetMouseRecalcAndShowAPFlags( UINT32 *puiCursorFlags, BOOLEAN *pfShowAPs // FUNCTIONS FOR CURSOR DETERMINATION! UINT8 GetProperItemCursor( UINT16 ubSoldierID, UINT16 ubItemIndex, INT32 usMapPos, BOOLEAN fActivated ) { - SOLDIERTYPE *pSoldier; - UINT32 uiCursorFlags; - BOOLEAN fShowAPs = FALSE; - BOOLEAN fRecalc = FALSE; + SOLDIERTYPE *pSoldier; + UINT32 uiCursorFlags; + BOOLEAN fShowAPs = FALSE; + BOOLEAN fRecalc = FALSE; INT32 sTargetGridNo = usMapPos; - UINT8 ubCursorID=0; - UINT8 ubItemCursor; + UINT8 ubCursorID=0; + UINT8 ubItemCursor = 0; pSoldier = MercPtrs[ ubSoldierID ]; @@ -354,6 +350,7 @@ UINT8 HandleActivatedTargetCursor( SOLDIERTYPE *pSoldier, INT32 usMapPos, BOOLEA UINT16 usCursor=0; BOOLEAN fMaxPointLimitHit = FALSE; UINT16 usInHand; + extern UINT32 guiNewUICursor; UINT16 reverse = 0; @@ -461,6 +458,30 @@ UINT8 HandleActivatedTargetCursor( SOLDIERTYPE *pSoldier, INT32 usMapPos, BOOLEA gsCurrentActionPoints = CalcTotalAPsToAttack( pSoldier, usMapPos, TRUE, (INT8)(pSoldier->aiData.bShownAimTime ) ); } + const bool isCursorOnTarget = ( + guiNewUICursor == ACTION_SHOOT_UICURSOR || guiNewUICursor == ACTION_TARGETBURST_UICURSOR || + guiNewUICursor == ACTION_FLASH_SHOOT_UICURSOR || guiNewUICursor == ACTION_FLASH_BURST_UICURSOR || + guiNewUICursor == ACTION_NOCHANCE_SHOOT_UICURSOR || guiNewUICursor == ACTION_NOCHANCE_BURST_UICURSOR + ); + // Start at maximum aiming levels if the option is toggled + if (gGameSettings.fOptions[TOPTION_ALT_START_AIM] && isCursorOnTarget) + { + pSoldier->aiData.bShownAimTime = maxAimLevels; + sAPCosts = CalcTotalAPsToAttack(pSoldier, usMapPos, TRUE, pSoldier->aiData.bShownAimTime); + // Determine if we can afford! + while (!EnoughPoints(pSoldier, sAPCosts, 0, FALSE)) + { + pSoldier->aiData.bShownAimTime -= 1; + if (pSoldier->aiData.bShownAimTime < 0) + { + pSoldier->aiData.bShownAimTime = REFINE_AIM_1; + break; + } + sAPCosts = CalcTotalAPsToAttack(pSoldier, usMapPos, TRUE, pSoldier->aiData.bShownAimTime); + } + gsCurrentActionPoints = sAPCosts; + } + // If we don't have any points and we are at the first refine, do nothing but warn! if ( !EnoughPoints( pSoldier, gsCurrentActionPoints, 0 , FALSE ) && (pSoldier->aiData.bShownAimTime == 0)) { @@ -4008,4 +4029,4 @@ UINT8 DefaultAutofireBulletsByGunClass( SOLDIERTYPE* pSoldier ) } return ubBullets; -} \ No newline at end of file +} diff --git a/Tactical/Vehicles.cpp b/Tactical/Vehicles.cpp index c3542022..d1e276be 100644 --- a/Tactical/Vehicles.cpp +++ b/Tactical/Vehicles.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "Vehicles.h" #include "String.h" #include "Strategic Pathing.h" @@ -39,7 +36,6 @@ #include "Soldier ani.h" #include "GameSettings.h" #include "Queen Command.h" -#endif #include "Points.h" #include "Init.h" @@ -2022,20 +2018,6 @@ void HandleCriticalHitForVehicleInLocation( UINT8 ubID, INT16 sDmg, INT32 sGridN SOLDIERTYPE *pSoldier; BOOLEAN fMadeCorpse = FALSE; -#if 0 - { - // injure someone inside - iRand = Random( gNewVehicle[ pVehicleList[ ubID ].ubVehicleType ].iNewSeatingCapacities ); - if( pVehicleList[ ubID ].pPassengers[ iRand ] ) - { - // hurt this person - InjurePersonInVehicle( ( INT16 )ubID, pVehicleList[ ubID ].pPassengers[ iRand ], ( UINT8 )( sDmg / 2 ) ); - } - } - - ScreenMsg( FONT_BLACK, MSG_INTERFACE, sCritLocationStrings[ iCrit ] ); - } -#endif pSoldier = GetSoldierStructureForVehicle( ubID ); Assert(pSoldier); diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index 06ced271..a07832d7 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "Sound Control.h" @@ -54,7 +51,6 @@ #include "environment.h" // added by silversurfer // sevenfm #include "buildings.h" // SameBuilding -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/Tactical/World Items.cpp b/Tactical/World Items.cpp index 0b0e1a50..c0159068 100644 --- a/Tactical/World Items.cpp +++ b/Tactical/World Items.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "items.h" #include "handle Items.h" #include "overhead.h" @@ -27,7 +24,6 @@ #include "message.h" #include "map screen interface map inventory.h" // added by Flugente #include "connect.h" -#endif #ifdef JA2EDITOR//dnl ch84 290114 #include "Item Statistics.h" #endif @@ -879,19 +875,6 @@ void LoadWorldItemsFromMap( INT8 **hBuffer, float dMajorMapVersion, int ubMinorM { //all armed bombs are buried dummyItem.bVisible = BURIED; } -#if 0//dnl ch74 201013 this is already done in OBJECTTYPE::Load() - //Madd: ok, so this drives me nuts -- why bother with default attachments if the map isn't going to load them for you? - //this should fix that... - for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++) - { - if(Item [ dummyItem.object.usItem ].defaultattachments[cnt] == 0) - break; - - OBJECTTYPE defaultAttachment; - CreateItem(Item [ dummyItem.object.usItem ].defaultattachments[cnt],100,&defaultAttachment); - dummyItem.object.AttachObject(NULL,&defaultAttachment, FALSE); - } -#endif // sevenfm: don't allow max repair threshold less than current object status dummyItem.object[0]->data.sRepairThreshold = __max(dummyItem.object[0]->data.sRepairThreshold, dummyItem.object[0]->data.objectStatus); AddItemToPoolAndGetIndex( dummyItem.sGridNo, &dummyItem.object, dummyItem.bVisible, dummyItem.ubLevel, dummyItem.usFlags, dummyItem.bRenderZHeightAboveLevel, dummyItem.soldierID, &iItemIndex ); diff --git a/Tactical/XML_AdditionalTileProperties.cpp b/Tactical/XML_AdditionalTileProperties.cpp index 3100f259..dc0e9ab3 100644 --- a/Tactical/XML_AdditionalTileProperties.cpp +++ b/Tactical/XML_AdditionalTileProperties.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif #include "tiledef.h" diff --git a/Tactical/XML_AmmoStrings.cpp b/Tactical/XML_AmmoStrings.cpp index e93aabaf..65ea633b 100644 --- a/Tactical/XML_AmmoStrings.cpp +++ b/Tactical/XML_AmmoStrings.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "overhead.h" @@ -8,7 +5,6 @@ #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_AmmoTypes.cpp b/Tactical/XML_AmmoTypes.cpp index aafa417f..04dfa754 100644 --- a/Tactical/XML_AmmoTypes.cpp +++ b/Tactical/XML_AmmoTypes.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "weapons.h" #include "overhead.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif // Flugente: remember how many ammotypes we read UINT32 gMAXAMMOTYPES_READ = 0; diff --git a/Tactical/XML_Armour.cpp b/Tactical/XML_Armour.cpp index 7d444d51..316b517a 100644 --- a/Tactical/XML_Armour.cpp +++ b/Tactical/XML_Armour.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "weapons.h" #include "overhead.h" @@ -8,7 +5,6 @@ #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_AttachmentInfo.cpp b/Tactical/XML_AttachmentInfo.cpp index abe948b3..7bd8a0bf 100644 --- a/Tactical/XML_AttachmentInfo.cpp +++ b/Tactical/XML_AttachmentInfo.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_AttachmentSlots.cpp b/Tactical/XML_AttachmentSlots.cpp index fa03b472..80e76a49 100644 --- a/Tactical/XML_AttachmentSlots.cpp +++ b/Tactical/XML_AttachmentSlots.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif UINT16 LAST_SLOT_INDEX = 0; diff --git a/Tactical/XML_Attachments.cpp b/Tactical/XML_Attachments.cpp index edda40d1..7eaa8936 100644 --- a/Tactical/XML_Attachments.cpp +++ b/Tactical/XML_Attachments.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "gamesettings.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Background.cpp b/Tactical/XML_Background.cpp index 001d3d17..347f1442 100644 --- a/Tactical/XML_Background.cpp +++ b/Tactical/XML_Background.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_BurstSounds.cpp b/Tactical/XML_BurstSounds.cpp index e532dd4e..8e140deb 100644 --- a/Tactical/XML_BurstSounds.cpp +++ b/Tactical/XML_BurstSounds.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "Sound Control.h" @@ -36,7 +33,6 @@ #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_CivGroupNames.cpp b/Tactical/XML_CivGroupNames.cpp index 79a86081..97926ae4 100644 --- a/Tactical/XML_CivGroupNames.cpp +++ b/Tactical/XML_CivGroupNames.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_Clothes.cpp b/Tactical/XML_Clothes.cpp index b051effc..319aa9a3 100644 --- a/Tactical/XML_Clothes.cpp +++ b/Tactical/XML_Clothes.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_ComboMergeInfo.cpp b/Tactical/XML_ComboMergeInfo.cpp index e907e8fe..52e4d7b2 100644 --- a/Tactical/XML_ComboMergeInfo.cpp +++ b/Tactical/XML_ComboMergeInfo.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_CompatibleFaceItems.cpp b/Tactical/XML_CompatibleFaceItems.cpp index fc1d6bd2..195749fc 100644 --- a/Tactical/XML_CompatibleFaceItems.cpp +++ b/Tactical/XML_CompatibleFaceItems.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Disease.cpp b/Tactical/XML_Disease.cpp index 921809ce..a64f75a1 100644 --- a/Tactical/XML_Disease.cpp +++ b/Tactical/XML_Disease.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Disease.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Drugs.cpp b/Tactical/XML_Drugs.cpp index c7011315..2f59756a 100644 --- a/Tactical/XML_Drugs.cpp +++ b/Tactical/XML_Drugs.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Drugs And Alcohol.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_EnemyAmmoDrops.cpp b/Tactical/XML_EnemyAmmoDrops.cpp index 4da8facb..7642dd9b 100644 --- a/Tactical/XML_EnemyAmmoDrops.cpp +++ b/Tactical/XML_EnemyAmmoDrops.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_EnemyArmourDrops.cpp b/Tactical/XML_EnemyArmourDrops.cpp index 402c9c12..0e5fc490 100644 --- a/Tactical/XML_EnemyArmourDrops.cpp +++ b/Tactical/XML_EnemyArmourDrops.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_EnemyExplosiveDrops.cpp b/Tactical/XML_EnemyExplosiveDrops.cpp index 564b96c4..206ffd8c 100644 --- a/Tactical/XML_EnemyExplosiveDrops.cpp +++ b/Tactical/XML_EnemyExplosiveDrops.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_EnemyItemChoice.cpp b/Tactical/XML_EnemyItemChoice.cpp index 193ad0ab..df4ed87d 100644 --- a/Tactical/XML_EnemyItemChoice.cpp +++ b/Tactical/XML_EnemyItemChoice.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "Inventory Choosing.h" -#endif struct { diff --git a/Tactical/XML_EnemyMiscDrops.cpp b/Tactical/XML_EnemyMiscDrops.cpp index 83066dbe..b9fff0d8 100644 --- a/Tactical/XML_EnemyMiscDrops.cpp +++ b/Tactical/XML_EnemyMiscDrops.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "EnemyItemDrops.h" -#endif struct { diff --git a/Tactical/XML_EnemyNames.cpp b/Tactical/XML_EnemyNames.cpp index 8eb16beb..f9859665 100644 --- a/Tactical/XML_EnemyNames.cpp +++ b/Tactical/XML_EnemyNames.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_EnemyRank.cpp b/Tactical/XML_EnemyRank.cpp index b72d412d..b5dde366 100644 --- a/Tactical/XML_EnemyRank.cpp +++ b/Tactical/XML_EnemyRank.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_EnemyWeaponChoice.cpp b/Tactical/XML_EnemyWeaponChoice.cpp index 861c9b89..241b4d0a 100644 --- a/Tactical/XML_EnemyWeaponChoice.cpp +++ b/Tactical/XML_EnemyWeaponChoice.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "Inventory Choosing.h" -#endif struct { diff --git a/Tactical/XML_EnemyWeaponDrops.cpp b/Tactical/XML_EnemyWeaponDrops.cpp index d0fe4448..1ac0d6ad 100644 --- a/Tactical/XML_EnemyWeaponDrops.cpp +++ b/Tactical/XML_EnemyWeaponDrops.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "overhead.h" @@ -34,7 +31,6 @@ #include "expat.h" #include "XML.h" #include "EnemyItemDrops.h" -#endif struct { diff --git a/Tactical/XML_Explosive.cpp b/Tactical/XML_Explosive.cpp index ff097431..eed42225 100644 --- a/Tactical/XML_Explosive.cpp +++ b/Tactical/XML_Explosive.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Food.cpp b/Tactical/XML_Food.cpp index 92eb00e7..fac80524 100644 --- a/Tactical/XML_Food.cpp +++ b/Tactical/XML_Food.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Food.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_FoodOpinions.cpp b/Tactical/XML_FoodOpinions.cpp index 2480267d..8846743b 100644 --- a/Tactical/XML_FoodOpinions.cpp +++ b/Tactical/XML_FoodOpinions.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Food.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_HiddenNames.cpp b/Tactical/XML_HiddenNames.cpp index b072905b..a3382066 100644 --- a/Tactical/XML_HiddenNames.cpp +++ b/Tactical/XML_HiddenNames.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_IMPItemChoices.cpp b/Tactical/XML_IMPItemChoices.cpp index 210c7658..fe639f17 100644 --- a/Tactical/XML_IMPItemChoices.cpp +++ b/Tactical/XML_IMPItemChoices.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_IncompatibleAttachments.cpp b/Tactical/XML_IncompatibleAttachments.cpp index e888a660..65103d78 100644 --- a/Tactical/XML_IncompatibleAttachments.cpp +++ b/Tactical/XML_IncompatibleAttachments.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif // Flugente: in order not to loop over MAXATTACHMENTS entries in IncompatibleAttachments[] if we only have a few thousand, remember the actual number read in UINT32 gINCOMPATIBLEATTACHMENTS_READ = 0; diff --git a/Tactical/XML_InteractiveTiles.cpp b/Tactical/XML_InteractiveTiles.cpp index 088e3e2d..e7145446 100644 --- a/Tactical/XML_InteractiveTiles.cpp +++ b/Tactical/XML_InteractiveTiles.cpp @@ -3,9 +3,6 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -13,7 +10,6 @@ #include "XML.h" #include "FileMan.h" #include "Handle Items.h" -#endif INTERACTIVE_STRUCTURE gInteractiveStructure[INTERACTIVE_STRUCTURE_MAX]; UINT32 gMaxInteractiveStructureRead = 0; diff --git a/Tactical/XML_ItemAdjustments.cpp b/Tactical/XML_ItemAdjustments.cpp index 7eef606c..82ba287a 100644 --- a/Tactical/XML_ItemAdjustments.cpp +++ b/Tactical/XML_ItemAdjustments.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -9,7 +6,6 @@ #include "gamesettings.h" #include "XML.h" #include "Item Types.h" -#endif struct { diff --git a/Tactical/XML_Keys.cpp b/Tactical/XML_Keys.cpp index 281dade4..dcaeb715 100644 --- a/Tactical/XML_Keys.cpp +++ b/Tactical/XML_Keys.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Keys.h" -#endif struct diff --git a/Tactical/XML_LBEPocket.cpp b/Tactical/XML_LBEPocket.cpp index 30202c60..e4a6cadc 100644 --- a/Tactical/XML_LBEPocket.cpp +++ b/Tactical/XML_LBEPocket.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "GameSettings.h" -#endif struct { @@ -193,18 +189,8 @@ lbepocketParseData * pData = (lbepocketParseData *)userData; else if(strcmp(name, "pName") == 0) { pData->curElement = ELEMENT; -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - strcpy(pData->curLBEPocket.pName,pData->szCharData); - else - { - strncpy(pData->curLBEPocket.pName,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curLBEPocket.pName[MAX_CHAR_DATA_LENGTH] = '\0'; - } -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curLBEPocket.pName, sizeof(pData->curLBEPocket.pName)/sizeof(pData->curLBEPocket.pName[0]) ); pData->curLBEPocket.pName[sizeof(pData->curLBEPocket.pName)/sizeof(pData->curLBEPocket.pName[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "pSilhouette") == 0) { diff --git a/Tactical/XML_LBEPocketPopup.cpp b/Tactical/XML_LBEPocketPopup.cpp index a9462abe..bcf2ed49 100644 --- a/Tactical/XML_LBEPocketPopup.cpp +++ b/Tactical/XML_LBEPocketPopup.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "popup_class.h" #include "popup_definition.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "GameSettings.h" -#endif // namespace'd because of name collision with POPUP class def namespace POPUP_PARSE { diff --git a/Tactical/XML_Launchable.cpp b/Tactical/XML_Launchable.cpp index 80bef4c1..bec05f33 100644 --- a/Tactical/XML_Launchable.cpp +++ b/Tactical/XML_Launchable.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_LoadBearingEquipment.cpp b/Tactical/XML_LoadBearingEquipment.cpp index c2f6a96e..f89cb67b 100644 --- a/Tactical/XML_LoadBearingEquipment.cpp +++ b/Tactical/XML_LoadBearingEquipment.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_LoadScreenHints.cpp b/Tactical/XML_LoadScreenHints.cpp index f3c2297b..8393d639 100644 --- a/Tactical/XML_LoadScreenHints.cpp +++ b/Tactical/XML_LoadScreenHints.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Animated ProgressBar.h" -#endif struct { diff --git a/Tactical/XML_Locks.cpp b/Tactical/XML_Locks.cpp index cf181061..ff252fd0 100644 --- a/Tactical/XML_Locks.cpp +++ b/Tactical/XML_Locks.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Keys.h" -#endif struct diff --git a/Tactical/XML_Magazine.cpp b/Tactical/XML_Magazine.cpp index 73d29892..5c989920 100644 --- a/Tactical/XML_Magazine.cpp +++ b/Tactical/XML_Magazine.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_MercStartingGear.cpp b/Tactical/XML_MercStartingGear.cpp index 35c8b420..e2430171 100644 --- a/Tactical/XML_MercStartingGear.cpp +++ b/Tactical/XML_MercStartingGear.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" #include "Soldier Profile.h" -#endif struct { diff --git a/Tactical/XML_Merchants.cpp b/Tactical/XML_Merchants.cpp index 7eda77fd..b43c32b4 100644 --- a/Tactical/XML_Merchants.cpp +++ b/Tactical/XML_Merchants.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Arms Dealer Init.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Merge.cpp b/Tactical/XML_Merge.cpp index 192dc54e..eee7b404 100644 --- a/Tactical/XML_Merge.cpp +++ b/Tactical/XML_Merge.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "gamesettings.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_MilitiaIndividual.cpp b/Tactical/XML_MilitiaIndividual.cpp index 877762a3..c00201cc 100644 --- a/Tactical/XML_MilitiaIndividual.cpp +++ b/Tactical/XML_MilitiaIndividual.cpp @@ -3,15 +3,11 @@ * @author Flugente (bears-pit.com) */ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "MilitiaIndividual.h" -#endif struct { diff --git a/Tactical/XML_NewFaceGear.cpp b/Tactical/XML_NewFaceGear.cpp index 467c8149..b941e746 100644 --- a/Tactical/XML_NewFaceGear.cpp +++ b/Tactical/XML_NewFaceGear.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Faces.h" -#endif struct { diff --git a/Tactical/XML_Opinions.cpp b/Tactical/XML_Opinions.cpp index 74768a05..5c808441 100644 --- a/Tactical/XML_Opinions.cpp +++ b/Tactical/XML_Opinions.cpp @@ -10,16 +10,12 @@ // in this file, following my example. /////////////////////////////////////////////////////////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "gamesettings.h" #include "XML.h" #include "Soldier Profile.h" -#endif //#define MAX_PROFILE_NAME_LENGTH 30 diff --git a/Tactical/XML_Profiles.cpp b/Tactical/XML_Profiles.cpp index da975301..ba3aafbb 100644 --- a/Tactical/XML_Profiles.cpp +++ b/Tactical/XML_Profiles.cpp @@ -10,16 +10,12 @@ // in this file, following my example. /////////////////////////////////////////////////////////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "gamesettings.h" #include "XML.h" #include "Soldier Profile.h" -#endif #include "Soldier Profile.h" //#define MAX_PROFILE_NAME_LENGTH 30 diff --git a/Tactical/XML_Qarray.cpp b/Tactical/XML_Qarray.cpp index f6c06a0a..da806bcb 100644 --- a/Tactical/XML_Qarray.cpp +++ b/Tactical/XML_Qarray.cpp @@ -1,14 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "qarray.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "qarray.h" -#endif struct diff --git a/Tactical/XML_RPCFacesSmall.cpp b/Tactical/XML_RPCFacesSmall.cpp index b0b3946b..0ff4d3c4 100644 --- a/Tactical/XML_RPCFacesSmall.cpp +++ b/Tactical/XML_RPCFacesSmall.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "faces.h" -#endif struct { diff --git a/Tactical/XML_RandomItem.cpp b/Tactical/XML_RandomItem.cpp index 2cdee198..335d1096 100644 --- a/Tactical/XML_RandomItem.cpp +++ b/Tactical/XML_RandomItem.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Item Types.h" -#endif RANDOM_ITEM_CHOICE_TYPE gRandomItemClass[RANDOM_ITEM_MAX_CATEGORIES]; diff --git a/Tactical/XML_RandomStats.cpp b/Tactical/XML_RandomStats.cpp index ba11da10..b1531b23 100644 --- a/Tactical/XML_RandomStats.cpp +++ b/Tactical/XML_RandomStats.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif #include "soldier profile type.h" #include "Soldier Profile.h" diff --git a/Tactical/XML_SectorLoadscreens.cpp b/Tactical/XML_SectorLoadscreens.cpp index 74b376c7..99a11c1b 100644 --- a/Tactical/XML_SectorLoadscreens.cpp +++ b/Tactical/XML_SectorLoadscreens.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -8,7 +5,6 @@ #include "expat.h" #include "XML.h" // #include "SectorLoadscreens.h" -#endif struct { diff --git a/Tactical/XML_SoldierProfiles.cpp b/Tactical/XML_SoldierProfiles.cpp index a6ec7ff8..4b2a6c5e 100644 --- a/Tactical/XML_SoldierProfiles.cpp +++ b/Tactical/XML_SoldierProfiles.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_Sounds.cpp b/Tactical/XML_Sounds.cpp index 26150aa4..23cf868b 100644 --- a/Tactical/XML_Sounds.cpp +++ b/Tactical/XML_Sounds.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include #include "sgp.h" #include "Sound Control.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif extern char szSoundEffects[MAX_SAMPLES][255]; diff --git a/Tactical/XML_SpreadPatterns.cpp b/Tactical/XML_SpreadPatterns.cpp index fec41143..5d5732aa 100644 --- a/Tactical/XML_SpreadPatterns.cpp +++ b/Tactical/XML_SpreadPatterns.cpp @@ -1,7 +1,4 @@ //zilpin: pellet spread patterns externalized in XML -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "Soldier Control.h" @@ -36,7 +33,6 @@ #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif #define LIST_BUFFER_LEN (32) #define LIST_BUFFER_SIZE (LIST_BUFFER_LEN * sizeof(t_SpreadPattern)) diff --git a/Tactical/XML_StructureConstruct.cpp b/Tactical/XML_StructureConstruct.cpp index f9bd42c3..4a8b3188 100644 --- a/Tactical/XML_StructureConstruct.cpp +++ b/Tactical/XML_StructureConstruct.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Handle Items.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_StructureDeconstruct.cpp b/Tactical/XML_StructureDeconstruct.cpp index 8412a06c..d1128481 100644 --- a/Tactical/XML_StructureDeconstruct.cpp +++ b/Tactical/XML_StructureDeconstruct.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Handle Items.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif struct { diff --git a/Tactical/XML_Structure_Move.cpp b/Tactical/XML_Structure_Move.cpp index dd2d2d4d..9d06e558 100644 --- a/Tactical/XML_Structure_Move.cpp +++ b/Tactical/XML_Structure_Move.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS -#include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "Handle Items.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" -#endif STRUCTURE_MOVEPOSSIBLE gStructureMovePossible[STRUCTURE_MOVEPOSSIBLE_MAX]; diff --git a/Tactical/XML_Taunts.cpp b/Tactical/XML_Taunts.cpp index bd59aa95..329f945a 100644 --- a/Tactical/XML_Taunts.cpp +++ b/Tactical/XML_Taunts.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" -#endif struct { diff --git a/Tactical/XML_TonyInventory.cpp b/Tactical/XML_TonyInventory.cpp index f9160522..60336809 100644 --- a/Tactical/XML_TonyInventory.cpp +++ b/Tactical/XML_TonyInventory.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead.h" #include "weapons.h" @@ -11,7 +8,6 @@ #include "Font Control.h" #include "WordWrap.h" #include "soldier profile type.h" -#endif struct { diff --git a/Tactical/XML_Vehicles.cpp b/Tactical/XML_Vehicles.cpp index dff98eee..73236aec 100644 --- a/Tactical/XML_Vehicles.cpp +++ b/Tactical/XML_Vehicles.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Vehicles.h" -#endif struct { diff --git a/Tactical/bullets.cpp b/Tactical/bullets.cpp index d04ee742..b8ca5bd5 100644 --- a/Tactical/bullets.cpp +++ b/Tactical/bullets.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "builddefines.h" #include "math.h" #include @@ -26,7 +23,6 @@ #include "FileMan.h" #include "lighting.h" #include "Buildings.h" -#endif // Defines // HEADROCK HAM 5: Increasing... with the hope of making spectacular fragmenting explosives. @@ -558,15 +554,6 @@ void AddMissileTrail( BULLET *pBullet, FIXEDPT qCurrX, FIXEDPT qCurrY, FIXEDPT q ConvertGridNoToCenterCellXY( pBullet->sGridNo, &sXPos, &sYPos ); LightSpritePosition( pBullet->pAniTile->lightSprite, (INT16)(sXPos/CELL_X_SIZE), (INT16)(sYPos/CELL_Y_SIZE)); -#if 0 - if ( pBullet->pFirer->pathing.bLevel > 0 ) // if firer on roof then - { - if ( FindBuilding(AniParams.sGridNo) != NULL ) // if this spot is still within the building's grid area - { - LightSpritePower( pBullet->pAniTile->lightSprite, FALSE); - } - } -#endif return; } diff --git a/Tactical/fov.cpp b/Tactical/fov.cpp index 79812c23..ea893476 100644 --- a/Tactical/fov.cpp +++ b/Tactical/fov.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Isometric Utils.h" #include "worlddef.h" @@ -27,7 +24,6 @@ #include "opplist.h" #include "lighting.h" #include "Soldier macros.h" -#endif #include "connect.h" #include "GameSettings.h" diff --git a/Tactical/interface Dialogue.h b/Tactical/interface Dialogue.h index 2ddc0605..9ca78408 100644 --- a/Tactical/interface Dialogue.h +++ b/Tactical/interface Dialogue.h @@ -387,6 +387,10 @@ enum NPC_ACTION_GLOBAL_OFFENSIVE_1, NPC_ACTION_GLOBAL_OFFENSIVE_2, + + // rftr: transport groups + NPC_ACTION_DEPLOY_TRANSPORT_GROUP, + NPC_ACTION_RETURN_TRANSPORT_GROUP, NPC_ACTION_RECRUIT_PROFILE_TO_EPC = 700, NPC_ACTION_UNRECRUIT_EPC = 701, diff --git a/Tactical/opplist.cpp b/Tactical/opplist.cpp index 85a5a752..517b91a1 100644 --- a/Tactical/opplist.cpp +++ b/Tactical/opplist.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" //#include "ai.h" #include "Isometric Utils.h" @@ -49,7 +46,6 @@ #include "Interface.h" #include "Explosion Control.h"//dnl ch40 200909 #include "Vehicles.h" -#endif #ifdef JA2UB #include "Ja25_Tactical.h" @@ -1387,19 +1383,6 @@ INT16 DistanceVisible(SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, // let tanks see and be seen further (at night) if ( (ARMED_VEHICLE( pSoldier ) && sDistVisible > 0) || (pSubject && ARMED_VEHICLE( pSubject )) ) { -#if 0 - if ( ARMED_VEHICLE(pSoldier) && sDistVisible > 0 && pSubject) - { - sDistVisible = __max( sDistVisible + 5, pSubject->GetMaxDistanceVisible(pSoldier->sGridNo, pSoldier->pathing.bLevel) ); - } - else - { - sDistVisible = __max( sDistVisible + 5, pSoldier->GetMaxDistanceVisible() ); - } -#endif - // 0verhaul: This bit of code 1) seems to have no real reason to exist (MaxDistVisible just calls this function anyway), - // and 2) causes infinite recursion because MaxDistVisible just calls this function, which comes right back here. Just - // add 5 to sDistVisible and go on. sDistVisible = sDistVisible + 5; } @@ -6005,7 +5988,7 @@ void ProcessNoise(UINT16 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrT continue; // skip } - if ( bTeam == gbPlayerNum && (pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT) ) + if ( bTeam == gbPlayerNum && (pSoldier->bAssignment == ASSIGNMENT_POW || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT || pSoldier->bAssignment == ASSIGNMENT_REBELCOMMAND) ) { // POWs should not be processed for noise continue; diff --git a/TacticalAI/AI All.h b/TacticalAI/AI All.h deleted file mode 100644 index ce939c80..00000000 --- a/TacticalAI/AI All.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef __AI_ALL_H -#define __AI_ALL_H - -#pragma message("GENERATED PCH FOR TACTICAL AI PROJECT.") - -#include "AIList.h" -#include "Overhead.h" -#include "debug.h" -#include "AIInternals.h" -#include "wcheck.h" -#include "sgp.h" -#include "ai.h" -#include "Isometric Utils.h" -#include "math.h" -#include "Event Pump.h" -#include "Overhead Types.h" -#include "sys globals.h" -#include "opplist.h" -#include "animation control.h" -#include "font control.h" -#include "interface.h" -#include "screenids.h" -#include "worldman.h" -#include "pathai.h" -#include "points.h" -#include "weapons.h" -#include "items.h" -#include "Handle Items.h" -#include "animation data.h" -#include "los.h" -#include "message.h" -#include "TeamTurns.h" -#include "NPC.h" -#include "Dialogue Control.h" -#include "Soldier Profile.h" -#include "strategicmap.h" -#include "Tactical Save.h" -#include "Soldier Create.h" -#include "Explosion Control.h" -#include "Interactive Tiles.h" -#include "interface dialogue.h" -#include "Vehicles.h" -#include "renderworld.h" -#include "assignments.h" -#include "Soldier Functions.h" -#include "GameSettings.h" -#include "Buildings.h" -#include "Physics.h" -#include "Bullets.h" -#include "Spread Burst.h" -#include "SkillCheck.h" -#include "types.h" -#include "soldier control.h" -#include "Rotting Corpses.h" -#include "soldier add.h" -#include "Scheduling.h" -#include "Structure Wrap.h" -#include "Keys.h" -#include "Render Fun.h" -#include "Boxing.h" -#include -#include "World Items.h" -#include "Map Edgepoints.h" -#include "Text.h" -#include "video.h" -#include "Smell.h" -#include "mapscreen.h" -#include "strategic.h" -#include "Strategic Pathing.h" -#include "Quests.h" -#include "Game Clock.h" -#include "FileMan.h" -#include "Random.h" -#include "QuestDebug.h" -#include "soldier macros.h" -#include "Strategic Town Loyalty.h" -#include "Timer Control.h" -#include "Soldier Tile.h" -#include "meanwhile.h" -#include "Campaign Types.h" -#ifdef JA2TESTVERSION - #include "Quest Debug System.h" - #include "QuestText.h" -#endif - -#include "stdarg.h" -#include -#include "Soldier Profile Type.h" -#include "finances.h" -#include "Civ Quotes.h" -#include "Arms Dealer Init.h" -#include "Interface Panels.h" -#include "Soldier Ani.h" -#include "Queen Command.h" -#include "Lighting.h" -#include "environment.h" -#include "Sound Control.h" - -#endif \ No newline at end of file diff --git a/TacticalAI/AIInternals.h b/TacticalAI/AIInternals.h index 4373a496..b732cb5e 100644 --- a/TacticalAI/AIInternals.h +++ b/TacticalAI/AIInternals.h @@ -174,7 +174,6 @@ extern THREATTYPE Threat[MAXMERCS]; extern int ThreatPercent[10]; extern UINT8 SkipCoverCheck; extern INT8 GameOption[MAXGAMEOPTIONS]; -extern UINT32 guiThreatCnt; typedef enum { @@ -322,4 +321,4 @@ BOOLEAN GetBestAoEGridNo(SOLDIERTYPE *pSoldier, INT32* pGridNo, INT16 aRadius, U BOOLEAN GetFarthestOpponent(SOLDIERTYPE *pSoldier, UINT16 * puID, INT16 sRange); // are there more allies than friends in adjacent sectors? -BOOLEAN MoreFriendsThanEnemiesinNearbysectors(UINT8 ausTeam, INT16 aX, INT16 aY, INT8 aZ); \ No newline at end of file +BOOLEAN MoreFriendsThanEnemiesinNearbysectors(UINT8 ausTeam, INT16 aX, INT16 aY, INT8 aZ); diff --git a/TacticalAI/AIList.cpp b/TacticalAI/AIList.cpp index 85d12220..618c643d 100644 --- a/TacticalAI/AIList.cpp +++ b/TacticalAI/AIList.cpp @@ -10,9 +10,6 @@ * */ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "AIList.h" #include "Overhead.h" #include "debug.h" @@ -21,7 +18,6 @@ #include "opplist.h" #include "Interface.h" #include "Tactical Save.h" -#endif #define AI_LIST_SIZE TOTAL_SOLDIERS diff --git a/TacticalAI/AIMain.cpp b/TacticalAI/AIMain.cpp index 075021ef..fbf481a7 100644 --- a/TacticalAI/AIMain.cpp +++ b/TacticalAI/AIMain.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "AI All.h" -#include "sound control.h" -#include "Debug Control.h" -#else #include "sgp.h" #include "ai.h" #include "Isometric Utils.h" @@ -54,7 +49,6 @@ #include "Soldier Functions.h" // added by SANDRO #include "Text.h" // sevenfm #include "english.h" // sevenfm: for ESC key -#endif #include "connect.h" // needed to use the modularized tactical AI: @@ -1436,7 +1430,6 @@ void ActionDone(SOLDIERTYPE *pSoldier) UINT8 SkipCoverCheck = FALSE; THREATTYPE Threat[MAXMERCS]; -UINT32 guiThreatCnt = 0; // threat percentage is based on the certainty of opponent knowledge: // opplist value: -4 -3 -2 -1 SEEN 1 2 3 4 5 @@ -1927,25 +1920,6 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier) UINT16 usHandItem = pSoldier->inv[HANDPOS].usItem; INT8 bSlot; -#if 0//dnl ch64 260813 decision to use machinegun or cannon is done in DecideAction, this here will just lead into burst with cannon if decision was use machinegun - if (TANK(pSoldier)) - { - // No cannon selected to fire - if (!Item[pSoldier->inv[HANDPOS].usItem].cannon) - { - // 50 % chance, that the tank fires with the explosive cannon - UINT32 fireWithCannon = GetRndNum(2); - if (fireWithCannon) - { - UINT32 tankCannonIndex = GetTankCannonIndex(); - if (tankCannonIndex > 0) - { - usHandItem = tankCannonIndex; - } - } - } - } -#endif UINT16 usSoldierIndex; // added by SANDRO #ifdef TESTAICONTROL diff --git a/TacticalAI/AIUtils.cpp b/TacticalAI/AIUtils.cpp index ff6ceda0..12fa3144 100644 --- a/TacticalAI/AIUtils.cpp +++ b/TacticalAI/AIUtils.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "ai.h" #include "Weapons.h" #include "opplist.h" @@ -28,7 +25,6 @@ #include "Rotting Corpses.h" // sevenfm #include "wcheck.h" // sevenfm #include "SmokeEffects.h" // sevenfm -#endif #include "GameInitOptionsScreen.h" @@ -788,10 +784,7 @@ BOOLEAN IsActionAffordable(SOLDIERTYPE *pSoldier, INT8 bAction) break; case AI_ACTION_JUMP_WINDOW: - if((UsingNewInventorySystem() == true) && pSoldier->inv[BPACKPOCKPOS].exists() == true - //JMich.BackpackClimb - && ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb ) - && ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE))) + if (!pSoldier->CanClimbWithCurrentBackpack()) bMinPointsNeeded = GetAPsToJumpThroughWindows( pSoldier, TRUE ); else bMinPointsNeeded = GetAPsToJumpFence( pSoldier, FALSE ); @@ -5945,7 +5938,7 @@ INT32 RandomizeOpponentLocation(INT32 sSpot, SOLDIERTYPE *pOpponent, INT16 sMaxD } // first call PrepareThreatlist to make threat list -UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier) +UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier, UINT32 uiThreatCnt) { CHECKF(pSoldier); @@ -5955,7 +5948,7 @@ UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier) UINT16 ubClosestOpponentID = NOBODY; // use global defined threat list - for (uiLoop = 0; uiLoop < guiThreatCnt; uiLoop++) + for (uiLoop = 0; uiLoop < uiThreatCnt; uiLoop++) { // if for some reason we have incorrect location if (TileIsOutOfBounds(Threat[uiLoop].sGridNo)) @@ -5975,7 +5968,7 @@ UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier) } // first call PrepareThreatlist to make threat list -UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT8 ubMax) +UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT32 uiThreatCnt, UINT8 ubMax) { CHECKF(pSoldier); @@ -5985,7 +5978,7 @@ UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT8 ubMax) UINT16 ubClosestOpponentID = NOBODY; // use global defined threat list - for (uiLoop = 0; uiLoop < guiThreatCnt; uiLoop++) + for (uiLoop = 0; uiLoop < uiThreatCnt; uiLoop++) { // if for some reason we have incorrect location if (TileIsOutOfBounds(Threat[uiLoop].sGridNo)) @@ -6008,7 +6001,7 @@ UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT8 ubMax) return(ubClosestOpponentID); } -void PrepareThreatlist(SOLDIERTYPE *pSoldier) +UINT32 PrepareThreatlist(SOLDIERTYPE *pSoldier) { SOLDIERTYPE *pOpponent; INT32 iThreatRange, iClosestThreatRange = 1500; @@ -6021,10 +6014,10 @@ void PrepareThreatlist(SOLDIERTYPE *pSoldier) INT32 iThreatCertainty; INT32 iMaxThreatRange = MAX_THREAT_RANGE + AI_PATHCOST_RADIUS; - guiThreatCnt = 0; + UINT32 uiThreatCnt = 0; if (!pSoldier) - return; + return 0; // look through all opponents for those we know of for (uiLoop = 0; uiLoop < guiNumMercSlots; uiLoop++) @@ -6072,35 +6065,37 @@ void PrepareThreatlist(SOLDIERTYPE *pSoldier) } // remember this opponent as a current threat, but DON'T REDUCE FOR COVER! - Threat[guiThreatCnt].iValue = CalcManThreatValue(pOpponent, pSoldier->sGridNo, FALSE, pSoldier); + Threat[uiThreatCnt].iValue = CalcManThreatValue(pOpponent, pSoldier->sGridNo, FALSE, pSoldier); // if the opponent is no threat at all for some reason - if (Threat[guiThreatCnt].iValue == -999) + if (Threat[uiThreatCnt].iValue == -999) { continue; // check next opponent } - Threat[guiThreatCnt].pOpponent = pOpponent; - Threat[guiThreatCnt].sGridNo = sThreatLoc; - Threat[guiThreatCnt].iCertainty = iThreatCertainty; - Threat[guiThreatCnt].iOrigRange = iThreatRange; + Threat[uiThreatCnt].pOpponent = pOpponent; + Threat[uiThreatCnt].sGridNo = sThreatLoc; + Threat[uiThreatCnt].iCertainty = iThreatCertainty; + Threat[uiThreatCnt].iOrigRange = iThreatRange; // calculate how many APs he will have at the start of the next turn - Threat[guiThreatCnt].iAPs = pOpponent->CalcActionPoints(); + Threat[uiThreatCnt].iAPs = pOpponent->CalcActionPoints(); // sevenfm: more information - Threat[guiThreatCnt].bLevel = bThreatLevel; - Threat[guiThreatCnt].bKnowledge = bKnowledge; - Threat[guiThreatCnt].bPersonalKnowledge = bPersonalKnowledge; - Threat[guiThreatCnt].bPublicKnowledge = bPublicKnowledge; + Threat[uiThreatCnt].bLevel = bThreatLevel; + Threat[uiThreatCnt].bKnowledge = bKnowledge; + Threat[uiThreatCnt].bPersonalKnowledge = bPersonalKnowledge; + Threat[uiThreatCnt].bPublicKnowledge = bPublicKnowledge; if (iThreatRange < iClosestThreatRange) { iClosestThreatRange = iThreatRange; } - guiThreatCnt++; + uiThreatCnt++; } + + return uiThreatCnt; } UINT16 CountPublicKnownEnemies(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 sDistance) diff --git a/TacticalAI/Attacks.cpp b/TacticalAI/Attacks.cpp index fb7df79f..61502d6b 100644 --- a/TacticalAI/Attacks.cpp +++ b/TacticalAI/Attacks.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "AI All.h" -#else #include "ai.h" #include "Weapons.h" #include "opplist.h" @@ -34,7 +31,6 @@ #include "Render Fun.h" #include "worldman.h" #include "WCheck.h" -#endif // anv: for enemy taunts #include "Civ Quotes.h" @@ -3312,6 +3308,10 @@ BOOLEAN AIDetermineStealingWeaponAttempt( SOLDIERTYPE * pSoldier, SOLDIERTYPE * UINT16 dfgvdfv = Item[pOpponent->inv[HANDPOS].usItem].usItemClass; return( FALSE ); } + if (HasAttachmentOfClass(&(pOpponent->inv[HANDPOS]), AC_SLING)) + { + return FALSE; + } uiSuccessChance = CalcChanceToSteal(pSoldier, pOpponent, 0); if ( uiSuccessChance >= 100 ) @@ -3759,6 +3759,7 @@ void CheckTossSelfSmoke(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow) { INT16 ubMinAPcost; INT8 bGrenadeIn = NO_SLOT; + UINT32 uiThreatCnt = 0; // initialize pBestThrow->ubPossible = FALSE; @@ -3775,7 +3776,7 @@ void CheckTossSelfSmoke(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow) bGrenadeIn = FindThrowableGrenade(pSoldier, EXPLOSV_SMOKE); // prepare threat list for ClosestSeenThreatID(), ClosestKnownThreatID() - PrepareThreatlist(pSoldier); + uiThreatCnt = PrepareThreatlist(pSoldier); if (bGrenadeIn != NO_SLOT) { @@ -3814,7 +3815,7 @@ void CheckTossSelfSmoke(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow) if (TileIsOutOfBounds(sTargetSpot)) { - ubClosestThreatID = ClosestSeenThreatID(pSoldier, SEEN_LAST_TURN); + ubClosestThreatID = ClosestSeenThreatID(pSoldier, uiThreatCnt, SEEN_LAST_TURN); if (ubClosestThreatID != NOBODY && MercPtrs[ubClosestThreatID] && @@ -3828,7 +3829,7 @@ void CheckTossSelfSmoke(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow) if (TileIsOutOfBounds(sTargetSpot)) { - ubClosestThreatID = ClosestKnownThreatID(pSoldier); + ubClosestThreatID = ClosestKnownThreatID(pSoldier, uiThreatCnt); if (ubClosestThreatID != NOBODY && MercPtrs[ubClosestThreatID] && diff --git a/TacticalAI/CMakeLists.txt b/TacticalAI/CMakeLists.txt new file mode 100644 index 00000000..53ef7ec0 --- /dev/null +++ b/TacticalAI/CMakeLists.txt @@ -0,0 +1,17 @@ +set(TacticalAISrc +"${CMAKE_CURRENT_SOURCE_DIR}/AIList.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AIMain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AIUtils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Attacks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CreatureDecideAction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DecideAction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FindLocations.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Knowledge.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Medical.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Movement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/NPC.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PanicButtons.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/QuestDebug.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Realtime.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ZombieDecideAction.cpp" +PARENT_SCOPE) diff --git a/TacticalAI/CreatureDecideAction.cpp b/TacticalAI/CreatureDecideAction.cpp index 4cdf9380..490c967f 100644 --- a/TacticalAI/CreatureDecideAction.cpp +++ b/TacticalAI/CreatureDecideAction.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "types.h" //#include "soldier control.h" #include "ai.h" @@ -9,7 +6,6 @@ #include "Items.h" #include "Rotting Corpses.h" #include "soldier add.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index 2aaa460b..335ff83a 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "AI All.h" -#else #include "ai.h" #include "AIInternals.h" #include "Isometric utils.h" @@ -32,7 +29,6 @@ #include "rotting corpses.h" #include "GameSettings.h" #include "Dialogue Control.h" -#endif #include "connect.h" #include "Text.h" #include "Exit Grids.h" // added by Flugente @@ -4978,7 +4974,7 @@ INT16 ubMinAPCost; bPanicTrigger = ClosestPanicTrigger( pSoldier ); // if it's an alarm trigger and team is alerted, ignore it - if ( !(gTacticalStatus.bPanicTriggerIsAlarm[ bPanicTrigger ] && gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition) && PythSpacesAway( pSoldier->sGridNo, gTacticalStatus.sPanicTriggerGridNo[ bPanicTrigger ] ) < 10) + if ( bPanicTrigger != -1 && !(gTacticalStatus.bPanicTriggerIsAlarm[ bPanicTrigger ] && gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition) && PythSpacesAway( pSoldier->sGridNo, gTacticalStatus.sPanicTriggerGridNo[ bPanicTrigger ] ) < 10) { PossiblyMakeThisEnemyChosenOne( pSoldier ); } @@ -5165,19 +5161,14 @@ INT16 ubMinAPCost; } // offer surrender? -#ifdef JA2UB -#else +#ifndef JA2UB if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) ) { if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 ) { - //if( GetWorldDay() > STARTDAY_ALLOW_PLAYER_CAPTURE_FOR_RESCUE && !( gStrategicStatus.uiFlags & STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ) ) + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) { - if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] != QUESTINPROGRESS && gubQuest[QUEST_HELD_IN_TIXA] != QUESTINPROGRESS && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)) - { - gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER; - return( AI_ACTION_OFFER_SURRENDER ); - } + return( AI_ACTION_OFFER_SURRENDER ); } } } @@ -9590,15 +9581,13 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier ) } // offer surrender? -#ifdef JA2UB -#else +#ifndef JA2UB if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) ) { if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector( ) < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector( ) * 3 ) { - if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || (gubQuest[QUEST_HELD_IN_ALMA] == QUESTDONE && gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) ) + if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED) { - gTacticalStatus.fEnemyFlags |= ENEMY_OFFERED_SURRENDER; return(AI_ACTION_OFFER_SURRENDER); } } @@ -10417,4 +10406,4 @@ void LogKnowledgeInfo(SOLDIERTYPE *pSoldier) //swprintf( pStrInfo, L"%s[%d] %s %s\n", pStrInfo, oppID, MercPtrs[oppID]->GetName(), SeenStr(pSoldier->aiData.bOppList[oppID]) ); } } -} \ No newline at end of file +} diff --git a/TacticalAI/FindLocations.cpp b/TacticalAI/FindLocations.cpp index 4ed9142d..cdf7f4e9 100644 --- a/TacticalAI/FindLocations.cpp +++ b/TacticalAI/FindLocations.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include #include "Isometric Utils.h" #include "ai.h" @@ -30,7 +27,6 @@ #include "GameSettings.h" #include "Soldier Profile.h" #include "rotting corpses.h" // sevenfm -#endif //////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -758,7 +754,7 @@ INT32 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB iMyThreatValue = CalcManThreatValue(pSoldier, NOWHERE, FALSE, pSoldier); // prepare threat list from known enemies - PrepareThreatlist(pSoldier); + uiThreatCnt = PrepareThreatlist(pSoldier); // if no known opponents were found to threaten us, can't worry about cover if (!uiThreatCnt) @@ -2951,85 +2947,7 @@ INT32 FindClosestClimbPoint (SOLDIERTYPE *pSoldier, BOOLEAN fClimbUp ) BOOLEAN CanClimbFromHere (SOLDIERTYPE * pSoldier, BOOLEAN fUp ) { -#if 1 return FindDirectionForClimbing( pSoldier, pSoldier->sGridNo, pSoldier->pathing.bLevel) != DIRECTION_IRRELEVANT; -#else - BUILDING * pBuilding; - INT32 i; - INT32 iSearchRange = 1; - INT16 sMaxLeft, sMaxRight, sMaxUp, sMaxDown, sXOffset, sYOffset; - - //DebugMsg( TOPIC_JA2AI , DBG_LEVEL_3 , "CanClimbFromHere"); - - - // determine maximum horizontal limits - sMaxLeft = min( iSearchRange, (pSoldier->sGridNo % MAXCOL)); - sMaxRight = min( iSearchRange, MAXCOL - ((pSoldier->sGridNo % MAXCOL) + 1)); - - // determine maximum vertical limits - sMaxUp = min( iSearchRange, (pSoldier->sGridNo / MAXROW)); - sMaxDown = min( iSearchRange, MAXROW - ((pSoldier->sGridNo / MAXROW) + 1)); - - INT32 sGridNo=NOWHERE; - - for (sYOffset = -sMaxUp; sYOffset <= sMaxDown; sYOffset++) - { - for (sXOffset = -sMaxLeft; sXOffset <= sMaxRight; sXOffset++) - { - // calculate the next potential gridno - sGridNo = pSoldier->sGridNo + sXOffset + (MAXCOL * sYOffset); - //DebugMsg( TOPIC_JA2AI , DBG_LEVEL_3 , String("Checking grid %d" , sGridNo )); - - //NumMessage("Testing gridno #",gridno); - if ( !(sGridNo >=0 && sGridNo < WORLD_MAX) ) - { - continue; - } - - - if ( sGridNo == pSoldier->pathing.sBlackList ) - { - continue; - } - - - // OK, this place shows potential. How useful is it as cover? - //NumMessage("Promising seems gridno #",gridno); - - // Kaiden: From this point down I've removed an unneccessary call to - // FindBuilding, The original code that was from this point till the - // end of the function is now commented out AFTER the function. - - pBuilding = FindBuilding ( sGridNo ); - - if ( pBuilding != NULL) - { - if ( fUp ) - { - - for (i = 0 ; i < pBuilding->ubNumClimbSpots; i++) - { - if (pBuilding->sUpClimbSpots[ i ] == pSoldier->sGridNo && - (WhoIsThere2( pBuilding->sUpClimbSpots[ i ], 0 ) == NOBODY) - && (WhoIsThere2( pBuilding->sDownClimbSpots[ i ], 1 ) == NOBODY) ) - return TRUE; - } - } - else - { - for (i = 0 ; i < pBuilding->ubNumClimbSpots; i++) - { - if (pBuilding->sDownClimbSpots[ i ] == pSoldier->sGridNo && - (WhoIsThere2( pBuilding->sUpClimbSpots[ i ], 0 ) == NOBODY) - && (WhoIsThere2( pBuilding->sDownClimbSpots[ i ], 1 ) == NOBODY) ) - return TRUE; - } - } - } - } - } - return FALSE; -#endif } // OK, this place shows potential. How useful is it as cover? //NumMessage("Promising seems gridno #",gridno); diff --git a/TacticalAI/Knowledge.cpp b/TacticalAI/Knowledge.cpp index f6c34fa5..c6e93a1f 100644 --- a/TacticalAI/Knowledge.cpp +++ b/TacticalAI/Knowledge.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "ai.h" #include "AIInternals.h" #include "opplist.h" @@ -10,7 +7,6 @@ #include "Quests.h" #include "Render Fun.h" #include "Soldier macros.h" -#endif extern SECTOR_EXT_DATA SectorExternalData[256][4]; diff --git a/TacticalAI/Medical.cpp b/TacticalAI/Medical.cpp index 4d38e791..5a46f6ee 100644 --- a/TacticalAI/Medical.cpp +++ b/TacticalAI/Medical.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "types.h" #include "Soldier Functions.h" @@ -17,7 +14,6 @@ // added by SANDRO #include "Soldier Profile.h" #include "GameSettings.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/TacticalAI/Movement.cpp b/TacticalAI/Movement.cpp index aeb2bbfe..ec5daaaf 100644 --- a/TacticalAI/Movement.cpp +++ b/TacticalAI/Movement.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "ai.h" #include "AIInternals.h" #include "Isometric Utils.h" @@ -17,7 +14,6 @@ #include "Soldier macros.h" #include "Render Fun.h" #include "Soldier Functions.h" // added by Flugente -#endif #include "connect.h" //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/TacticalAI/NPC.cpp b/TacticalAI/NPC.cpp index c7d08178..5e151323 100644 --- a/TacticalAI/NPC.cpp +++ b/TacticalAI/NPC.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" - #include "interface items.h" - -#else #include "types.h" #include "wcheck.h" #include "overhead.h" @@ -48,7 +43,6 @@ #include "GameSettings.h" // added by SANDRO #include "Soldier Profile.h" #include "GameVersion.h" -#endif #include "Soldier Profile.h" #include "BriefingRoom_Data.h" diff --git a/TacticalAI/PanicButtons.cpp b/TacticalAI/PanicButtons.cpp index 64471ef4..fef21d14 100644 --- a/TacticalAI/PanicButtons.cpp +++ b/TacticalAI/PanicButtons.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "AIInternals.h" #include "ai.h" #include "pathai.h" @@ -10,7 +7,6 @@ #include "Map Screen Interface Map.h" #include "Soldier Profile.h" #include "Quests.h" -#endif #include "Queen Command.h" diff --git a/TacticalAI/QuestDebug.cpp b/TacticalAI/QuestDebug.cpp index 82ce571b..046991f3 100644 --- a/TacticalAI/QuestDebug.cpp +++ b/TacticalAI/QuestDebug.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "FileMan.h" #include "QuestDebug.h" #include "stdarg.h" #include "stdio.h" #include "Debug.h" #include "Message.h" -#endif #define QUEST_DEBUG_FILE "QuestDebug.txt" diff --git a/TacticalAI/Realtime.cpp b/TacticalAI/Realtime.cpp index 4898bb2c..aba2b524 100644 --- a/TacticalAI/Realtime.cpp +++ b/TacticalAI/Realtime.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "AI All.h" -#else #include "ai.h" #include "AIInternals.h" #include "Isometric utils.h" @@ -15,7 +12,6 @@ #include "Render Fun.h" #include "Quests.h" #include "GameSettings.h" -#endif // needed to use the modularized tactical AI: #include "ModularizedTacticalAI/include/Plan.h" #include "ModularizedTacticalAI/include/PlanFactoryLibrary.h" diff --git a/TacticalAI/TacticalAI_VS2005.vcproj b/TacticalAI/TacticalAI_VS2005.vcproj deleted file mode 100644 index aa9100f9..00000000 --- a/TacticalAI/TacticalAI_VS2005.vcproj +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TacticalAI/TacticalAI_VS2008.vcproj b/TacticalAI/TacticalAI_VS2008.vcproj deleted file mode 100644 index d0ea4376..00000000 --- a/TacticalAI/TacticalAI_VS2008.vcproj +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TacticalAI/TacticalAI_VS2010.vcxproj b/TacticalAI/TacticalAI_VS2010.vcxproj deleted file mode 100644 index 6d85a403..00000000 --- a/TacticalAI/TacticalAI_VS2010.vcxproj +++ /dev/null @@ -1,219 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B369A125-E62E-46AE-9285-58003D688301} - Win32Proj - TacticalAI - TacticalAI - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TacticalAI/TacticalAI_VS2010.vcxproj.filters b/TacticalAI/TacticalAI_VS2010.vcxproj.filters deleted file mode 100644 index 2e680ac7..00000000 --- a/TacticalAI/TacticalAI_VS2010.vcxproj.filters +++ /dev/null @@ -1,78 +0,0 @@ - - - - - {2552d0a1-b3ed-43af-a06c-d0737ce6a63f} - - - {0f98d0d9-dbab-4dc2-8aa6-ee517a6ceab6} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/TacticalAI/TacticalAI_VS2013.vcxproj b/TacticalAI/TacticalAI_VS2013.vcxproj deleted file mode 100644 index 7de0cbd7..00000000 --- a/TacticalAI/TacticalAI_VS2013.vcxproj +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B369A125-E62E-46AE-9285-58003D688301} - Win32Proj - TacticalAI - TacticalAI - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TacticalAI/TacticalAI_VS2013.vcxproj.filters b/TacticalAI/TacticalAI_VS2013.vcxproj.filters deleted file mode 100644 index 2e680ac7..00000000 --- a/TacticalAI/TacticalAI_VS2013.vcxproj.filters +++ /dev/null @@ -1,78 +0,0 @@ - - - - - {2552d0a1-b3ed-43af-a06c-d0737ce6a63f} - - - {0f98d0d9-dbab-4dc2-8aa6-ee517a6ceab6} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/TacticalAI/TacticalAI_VS2017.vcxproj b/TacticalAI/TacticalAI_VS2017.vcxproj deleted file mode 100644 index 65b962ce..00000000 --- a/TacticalAI/TacticalAI_VS2017.vcxproj +++ /dev/null @@ -1,240 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B369A125-E62E-46AE-9285-58003D688301} - Win32Proj - TacticalAI - TacticalAI - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TacticalAI/TacticalAI_VS2019.vcxproj b/TacticalAI/TacticalAI_VS2019.vcxproj deleted file mode 100644 index bea469a7..00000000 --- a/TacticalAI/TacticalAI_VS2019.vcxproj +++ /dev/null @@ -1,416 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B369A125-E62E-46AE-9285-58003D688301} - Win32Proj - TacticalAI - TacticalAI - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - - - MultiThreaded - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TacticalAI/ZombieDecideAction.cpp b/TacticalAI/ZombieDecideAction.cpp index c21c50a7..3c183dd8 100644 --- a/TacticalAI/ZombieDecideAction.cpp +++ b/TacticalAI/ZombieDecideAction.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "AI All.h" -#else #include "ai.h" #include "AIInternals.h" #include "Isometric utils.h" @@ -32,7 +29,6 @@ #include "rotting corpses.h" #include "GameSettings.h" #include "Dialogue Control.h" -#endif #include "connect.h" #include "Text.h" diff --git a/TacticalAI/ai.h b/TacticalAI/ai.h index 41508367..5f1da394 100644 --- a/TacticalAI/ai.h +++ b/TacticalAI/ai.h @@ -314,9 +314,9 @@ BOOLEAN AICheckFriendsNoContact( SOLDIERTYPE *pSoldier ); BOOLEAN AICheckIsFlanking( SOLDIERTYPE *pSoldier ); INT8 CalcMoraleNew(SOLDIERTYPE *pSoldier); -void PrepareThreatlist(SOLDIERTYPE *pSoldier); -UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT8 ubMax = SEEN_CURRENTLY); // first call PrepareThreatlist to make threat list -UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier); // first call PrepareThreatlist to make threat list +UINT32 PrepareThreatlist(SOLDIERTYPE *pSoldier); +UINT16 ClosestSeenThreatID(SOLDIERTYPE *pSoldier, UINT32 uiThreatCnt, UINT8 ubMax = SEEN_CURRENTLY); // first call PrepareThreatlist to make threat list +UINT16 ClosestKnownThreatID(SOLDIERTYPE *pSoldier, UINT32 uiThreatCnt); // first call PrepareThreatlist to make threat list BOOLEAN ProneSightCoverAtSpot(SOLDIERTYPE *pSoldier, INT32 sSpot, BOOLEAN fUnlimited); BOOLEAN SightCoverAtSpot(SOLDIERTYPE *pSoldier, INT32 sSpot, BOOLEAN fUnlimited); diff --git a/TileEngine/Ambient Control.cpp b/TileEngine/Ambient Control.cpp index 3014ca3a..321ebcdc 100644 --- a/TileEngine/Ambient Control.cpp +++ b/TileEngine/Ambient Control.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "Ambient Control.h" #include "Sound Control.h" #include "Game Events.h" @@ -14,7 +11,6 @@ #include "Strategic Movement.h" #include "Game Clock.h" #include "strategic mines.h" -#endif AMBIENTDATA_STRUCT gAmbData[ MAX_AMBIENT_SOUNDS ]; INT16 gsNumAmbData = 0; diff --git a/TileEngine/Buildings.cpp b/TileEngine/Buildings.cpp index 096f2801..dfcaa7c8 100644 --- a/TileEngine/Buildings.cpp +++ b/TileEngine/Buildings.cpp @@ -1,21 +1,17 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "Types.h" #include "Buildings.h" #include "Pathai.h" #include "Structure Wrap.h" #include "Render Fun.h" #include "worldman.h" -#endif #include "AIInternals.h" #define ROOF_LOCATION_CHANCE 8 -UINT8* gubBuildingInfo = NULL; -BUILDING gBuildings[ MAX_BUILDINGS ]; -UINT8 gubNumberOfBuildings; +UINT8* gubBuildingInfo = NULL; +BUILDING gBuildings[ MAX_BUILDINGS ]; +UINT8 gubNumberOfBuildings; #ifdef ROOF_DEBUG extern INT16 gsCoverValue[WORLD_MAX]; @@ -23,544 +19,32 @@ UINT8 gubNumberOfBuildings; #include "renderworld.h" #endif -// WANNE: Overhauls new building climbing only works with A* enabled -// ------------------------- -// A* building climbing - BEGIN -// ------------------------- -#ifdef USE_ASTAR_PATHS - BUILDING * CreateNewBuilding( UINT8 * pubBuilding ) { - if (gubNumberOfBuildings >= MAX_BUILDINGS) + if (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING]) { - return( NULL ); - } - - // increment # of buildings - gubNumberOfBuildings++; - - // clear entry - gBuildings[ gubNumberOfBuildings ].ubNumClimbSpots = 0; - *pubBuilding = gubNumberOfBuildings; - - // return pointer (have to subtract 1 since we just added 1 - return( &(gBuildings[ gubNumberOfBuildings ]) ); -} - -BUILDING * FindBuilding( INT32 sGridNo ) -{ - UINT8 ubBuildingID; - - if ( TileIsOutOfBounds( sGridNo ) ) - { - return( NULL ); - } - - // id 0 indicates no building - ubBuildingID = gubBuildingInfo[ sGridNo ]; - - if ( ubBuildingID == NO_BUILDING ) - { - return( NULL ); - - /* - // need extra checks to see if is valid spot... - // must have valid room information and be a flat-roofed - // building - if ( InARoom( sGridNo, &ubRoomNo ) && (FindStructure( sGridNo, STRUCTURE_NORMAL_ROOF ) != NULL) ) - { - return( GenerateBuilding( sGridNo ) ); - } - else + if (gubNumberOfBuildings >= MAX_BUILDINGS) { return( NULL ); } - */ - } - else if ( ubBuildingID > gubNumberOfBuildings ) // huh? - { - return( NULL ); - } - - return( &(gBuildings[ ubBuildingID ]) ); -} - -BOOLEAN InBuilding( INT32 sGridNo ) -{ - if ( FindBuilding( sGridNo ) == NULL ) - { - return( FALSE ); - } - return( TRUE ); -} - -BOOLEAN SameBuilding( INT32 sGridNo1, INT32 sGridNo2 ) -{ - if ( gubBuildingInfo[ sGridNo1 ] == NO_BUILDING ) - { - return( FALSE ); - } - if ( gubBuildingInfo[ sGridNo2 ] == NO_BUILDING ) - { - return( FALSE ); - } - return( (BOOLEAN) (gubBuildingInfo[ sGridNo1] == gubBuildingInfo[ sGridNo2 ]) ); -} - -BUILDING * GenerateBuilding( INT32 sDesiredSpot ) -{ - BUILDING * pBuilding; - UINT8 ubBuildingID = 0; - - pBuilding = CreateNewBuilding( &ubBuildingID ); - if (!pBuilding) - { - return( NULL ); - } - - // Set reachable - RoofReachableTest( sDesiredSpot, ubBuildingID ); - - // 0verhaul: The RoofReachableTest now finds ALL of the climb points for each climbable building, instead of a max of - // 21 climb points (and a min of 0) for each building. It claims an extended map flag to mark a tile as a climb point. - // So the array of up-climbs and down-climbs is now obsolete. FindClosestClimbPoint is now updated to search the map - // for these flags. - return( pBuilding ); -} - -void GenerateBuildings( void ) -{ - INT32 uiLoop; - - // init building structures and variables - memset( gubBuildingInfo, 0, WORLD_MAX * sizeof( UINT8 ) ); - memset( &gBuildings, 0, MAX_BUILDINGS * sizeof( BUILDING ) ); - gubNumberOfBuildings = 0; - - if ( (gbWorldSectorZ > 0) || gfEditMode) - { - return; - } - -#ifdef ROOF_DEBUG - memset( gsCoverValue, 0x7F, sizeof( INT16 ) * WORLD_MAX ); -#endif - - // reset ALL reachable flags - // do once before we start building generation for - // whole map - for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) - { - gpWorldLevelData[ uiLoop ].uiFlags &= ~(MAPELEMENT_REACHABLE); - gpWorldLevelData[ uiLoop ].ubExtFlags[0] &= ~(MAPELEMENT_EXT_ROOFCODE_VISITED); - } - - // search through world - // for each location in a room try to find building info - for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) - { - if ( (gusWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) ) - { - GenerateBuilding( uiLoop ); - } - } -} - -INT32 FindClosestClimbPoint( SOLDIERTYPE *pSoldier, INT32 sStartGridNo, INT32 sDesiredGridNo, BOOLEAN fClimbUp ) -{ - BUILDING * pBuilding; - INT32 sGridNo; - INT32 sTestGridNo; - UINT8 ubTestDir; - INT32 sDistance, sClosestDistance = 1000, sClosestSpot= NOWHERE; - - pBuilding = FindBuilding( sDesiredGridNo ); - if (!pBuilding) - { - return( NOWHERE ); - } - - for (sGridNo = 0; sGridNo < WORLD_MAX; sGridNo++) - { - if (gubBuildingInfo[ sGridNo ] == gubBuildingInfo[ sDesiredGridNo ] && - gpWorldLevelData[ sGridNo ].ubExtFlags[1] & MAPELEMENT_EXT_CLIMBPOINT) - { - // Found a climb point for this building - if (fClimbUp) - { - for (ubTestDir = 0; ubTestDir < NUM_WORLD_DIRECTIONS; ubTestDir += 2) - { - sTestGridNo = NewGridNo( sGridNo, DirectionInc( ubTestDir)); - if (gpWorldLevelData[ sTestGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_CLIMBPOINT) - { - // Found a matching climb point - if ( (WhoIsThere2( sTestGridNo, 0 ) == NOBODY || sTestGridNo == pSoldier->sGridNo) - && (WhoIsThere2( sGridNo, 1 ) == NOBODY) && - (!pSoldier || !InGas( pSoldier, sTestGridNo ) ) ) - { - // And it's open - sDistance = PythSpacesAway( sStartGridNo, sTestGridNo ); - if (sDistance < sClosestDistance ) - { - sClosestDistance = sDistance; - sClosestSpot = sTestGridNo; - } - } - } - } - } - else - { - for (ubTestDir = 0; ubTestDir < NUM_WORLD_DIRECTIONS; ubTestDir += 2) - { - sTestGridNo = NewGridNo( sGridNo, DirectionInc( ubTestDir)); - if (gpWorldLevelData[ sTestGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_CLIMBPOINT) - { - // Found a matching climb point - if ( (WhoIsThere2( sTestGridNo, 0 ) == NOBODY) && - (WhoIsThere2( sGridNo, 1 ) == NOBODY || sGridNo == pSoldier->sGridNo) && - (!pSoldier || !InGas( pSoldier, sTestGridNo ) ) ) - { - // And it's open - sDistance = PythSpacesAway( sStartGridNo, sGridNo ); - if (sDistance < sClosestDistance ) - { - sClosestDistance = sDistance; - sClosestSpot = sGridNo; - } - } - } - } - } - } - } - - return( sClosestSpot ); -} - -// ------------------------- -// A* building climbing - END -// ------------------------- - -// ------------------------- -// JA2 vanilla building climbing - BEGIN -// ------------------------- -#else - -BUILDING * CreateNewBuilding( UINT8 * pubBuilding ) -{ - if (gubNumberOfBuildings >= MAX_BUILDINGS-1) - { - return( NULL ); - } - // increment # of buildings - gubNumberOfBuildings++; - - // clear entry - gBuildings[ gubNumberOfBuildings ].ubNumClimbSpots = 0; - *pubBuilding = gubNumberOfBuildings; - - // return pointer (have to subtract 1 since we just added 1 - return( &(gBuildings[ gubNumberOfBuildings ]) ); -} - -BUILDING * GenerateBuilding( INT32 sDesiredSpot ) -{ - INT32 uiLoop; - INT32 uiLoop2; - INT32 sTempGridNo, sNextTempGridNo, sVeryTemporaryGridNo; - INT32 sStartGridNo, sCurrGridNo, sPrevGridNo = NOWHERE, sRightGridNo; - UINT8 ubDirection, ubTempDirection; - BOOLEAN fFoundDir, fFoundWall; - UINT32 uiChanceIn = ROOF_LOCATION_CHANCE; // chance of a location being considered - INT32 sWallGridNo; - INT8 bDesiredOrientation; - INT8 bSkipSpots = 0; - SOLDIERTYPE FakeSoldier; - BUILDING * pBuilding; - UINT8 ubBuildingID = 0; - INT32 iLoopCount = 0; - - pBuilding = CreateNewBuilding( &ubBuildingID ); - if (!pBuilding) - { - return( NULL ); - } - - FakeSoldier.sGridNo = sDesiredSpot; - FakeSoldier.pathing.bLevel = 1; - FakeSoldier.bTeam = 1; - - // Set reachable - RoofReachableTest( sDesiredSpot, ubBuildingID ); - - // From sGridNo, search until we find a spot that isn't part of the building - ubDirection = NORTHWEST; - sTempGridNo = sDesiredSpot; - // using diagonal directions to hopefully prevent picking a - // spot that - while( (gpWorldLevelData[ sTempGridNo ].uiFlags & MAPELEMENT_REACHABLE ) ) - { - sNextTempGridNo = NewGridNo( sTempGridNo, DirectionInc( ubDirection ) ); - if ( sTempGridNo == sNextTempGridNo ) - { - // hit edge of map!??! - return( NULL ); - } - else - { - sTempGridNo = sNextTempGridNo; - } - } - - // we've got our spot - sStartGridNo = sTempGridNo; - - sCurrGridNo = sStartGridNo; - sVeryTemporaryGridNo = NewGridNo( sCurrGridNo, DirectionInc( EAST ) ); - if ( gpWorldLevelData[ sVeryTemporaryGridNo ].uiFlags & MAPELEMENT_REACHABLE ) - { - // go north first - ubDirection = NORTH; } else { - // go that way (east) - ubDirection = EAST; + if (gubNumberOfBuildings >= MAX_BUILDINGS - 1) + { + return(NULL); + } } - - gpWorldLevelData[ sStartGridNo ].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED; - - uiLoop2 = 0; - while(uiLoop2 < WORLD_MAX) - { - // if point to (2 clockwise) is not part of building and is not visited, - // or is starting point, turn! - sRightGridNo = NewGridNo( sCurrGridNo, DirectionInc( gTwoCDirection[ ubDirection ] ) ); - sTempGridNo = sRightGridNo; - if ( ( ( !(gpWorldLevelData[ sTempGridNo ].uiFlags & MAPELEMENT_REACHABLE) && !(gpWorldLevelData[ sTempGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED) ) || (sTempGridNo == sStartGridNo) ) && (sCurrGridNo != sStartGridNo) ) - { - iLoopCount++; - - if ( iLoopCount >= 10 ) - { - return( NULL ); - } - ubDirection = gTwoCDirection[ ubDirection ]; - // try in that direction - continue; - } - iLoopCount = 0; - - // if spot ahead is part of building, turn - sTempGridNo = NewGridNo( sCurrGridNo, DirectionInc( ubDirection ) ); - if ( gpWorldLevelData[ sTempGridNo ].uiFlags & MAPELEMENT_REACHABLE ) - { - // first search for a spot that is neither part of the building or visited - - // we KNOW that the spot in the original direction is blocked, so only loop 3 times - ubTempDirection = gTwoCDirection[ ubDirection ]; - fFoundDir = FALSE; - for ( uiLoop = 0; uiLoop < 3; uiLoop++ ) - { - sTempGridNo = NewGridNo( sCurrGridNo, DirectionInc( ubTempDirection ) ); - if ( !(gpWorldLevelData[ sTempGridNo ].uiFlags & MAPELEMENT_REACHABLE) && !(gpWorldLevelData[ sTempGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED) ) - { - // this is the way to go! - fFoundDir = TRUE; - break; - } - ubTempDirection = gTwoCDirection[ ubTempDirection ]; - } - if (!fFoundDir) - { - // now search for a spot that is just not part of the building - ubTempDirection = gTwoCDirection[ ubDirection ]; - fFoundDir = FALSE; - for ( uiLoop = 0; uiLoop < 3; uiLoop++ ) - { - sTempGridNo = NewGridNo( sCurrGridNo, DirectionInc( ubTempDirection ) ); - if ( !(gpWorldLevelData[ sTempGridNo ].uiFlags & MAPELEMENT_REACHABLE) ) - { - // this is the way to go! - fFoundDir = TRUE; - break; - } - ubTempDirection = gTwoCDirection[ ubTempDirection ]; - } - if (!fFoundDir) - { - // WTF is going on? - return( NULL ); - } - } - ubDirection = ubTempDirection; - // try in that direction - continue; - } - - // move ahead - sPrevGridNo = sCurrGridNo; - sCurrGridNo = sTempGridNo; - sRightGridNo = NewGridNo( sCurrGridNo, DirectionInc( gTwoCDirection[ ubDirection ] ) ); - -#ifdef ROOF_DEBUG - if (gsCoverValue[sCurrGridNo] == 0x7F7F) - { - gsCoverValue[sCurrGridNo] = 1; - } - else if (gsCoverValue[sCurrGridNo] >= 0) - { - gsCoverValue[sCurrGridNo]++; - } - - DebugAI( String( "Roof code visits %d", sCurrGridNo ) ); -#endif - - if (sCurrGridNo == sStartGridNo) - { - // done - break; - } - - if ( !(gpWorldLevelData[ sCurrGridNo ].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED) ) - { - gpWorldLevelData[ sCurrGridNo ].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED; - - if( InARoom(sCurrGridNo, NULL) ) - gubBuildingInfo[ sCurrGridNo ] = ubBuildingID; - - // consider this location as possible climb gridno - // there must be a regular wall adjacent to this for us to consider it a - // climb gridno - - // if the direction is east or north, the wall would be in our gridno; - // if south or west, the wall would be in the gridno two clockwise - fFoundWall = FALSE; - - // There must not be roof here either. There are places where a pitched roof butts up against a flat roof. - // Don't mark such a border as a climb point. Otherwise AI units will get stuck. - if (FindStructure( sCurrGridNo, STRUCTURE_ROOF ) == NULL && - NewOKDestination( &FakeSoldier, sCurrGridNo, FALSE, 0 ) ) - { - switch( ubDirection ) - { - case NORTH: - sWallGridNo = sCurrGridNo; - bDesiredOrientation = OUTSIDE_TOP_RIGHT; - break; - case EAST: - sWallGridNo = sCurrGridNo; - bDesiredOrientation = OUTSIDE_TOP_LEFT; - break; - case SOUTH: - sWallGridNo = ( sCurrGridNo + DirectionInc( gTwoCDirection[ ubDirection ] ) ); - bDesiredOrientation = OUTSIDE_TOP_RIGHT; - break; - case WEST: - sWallGridNo = ( sCurrGridNo + DirectionInc( gTwoCDirection[ ubDirection ] ) ); - bDesiredOrientation = OUTSIDE_TOP_LEFT; - break; - default: - // what the heck? - return( NULL ); - } - - if (bDesiredOrientation == OUTSIDE_TOP_LEFT) - { - if (WallExistsOfTopLeftOrientation( sWallGridNo )) - { - fFoundWall = TRUE; - } - } - else - { - if (WallExistsOfTopRightOrientation( sWallGridNo )) - { - fFoundWall = TRUE; - } - } - } - if (fFoundWall) - { -#ifdef ROOF_DEBUG - gsCoverValue[sCurrGridNo] = 50; -#endif - if (bSkipSpots > 0) - { - bSkipSpots--; - } - else if ( Random( uiChanceIn ) == 0 ) - { - pBuilding->sUpClimbSpots[ pBuilding->ubNumClimbSpots ] = sCurrGridNo; - pBuilding->sDownClimbSpots[ pBuilding->ubNumClimbSpots ] = sRightGridNo; - pBuilding->ubNumClimbSpots++; - - if ( pBuilding->ubNumClimbSpots == MAX_CLIMBSPOTS_PER_BUILDING) - { - // gotta stop! - return( pBuilding ); - } - - // if location is added as a spot, reset uiChanceIn - uiChanceIn = ROOF_LOCATION_CHANCE; -#ifdef ROOF_DEBUG - gsCoverValue[sCurrGridNo] = 99; -#endif - // skip the next spot - bSkipSpots = 1; - } - else - { - // didn't pick this location, so increase chance that next location - // will be considered - if (uiChanceIn > 2) - { - uiChanceIn--; - } - } - } - else - { - // can't select this spot - if ( ( !TileIsOutOfBounds(sPrevGridNo)) && (pBuilding->ubNumClimbSpots > 0) ) - { - if ( pBuilding->sDownClimbSpots[ pBuilding->ubNumClimbSpots - 1 ] == sCurrGridNo ) - { - // unselect previous spot - pBuilding->ubNumClimbSpots--; - // overwrote a selected spot so go into automatic selection for later - uiChanceIn = 1; -#ifdef ROOF_DEBUG - // reset marker - gsCoverValue[sPrevGridNo] = 1; -#endif - } - } - - // skip the next gridno - bSkipSpots = 1; - } - } - uiLoop2++; - } - // If we've run out of loop before we've run out of building, then there is - // something that has gone pear shaped - if(uiLoop2 >= WORLD_MAX) - { - INT32 x = 0; - INT32 y = 0; - while((sDesiredSpot - ((y + 1) * WORLD_COLS)) >= 0) - { - ++y; - } - x = sDesiredSpot - (y * WORLD_COLS); - DebugMsg (TOPIC_JA2,DBG_LEVEL_2,String( "113/UC Warning! Building Walk Algorithm has covered the entire map! Building %d located at [%d,%d] must be bogus.", ubBuildingID, x, y )); - } - - // at end could prune # of locations if there are too many - - return( pBuilding ); + + // increment # of buildings + gubNumberOfBuildings++; + + // clear entry + gBuildings[ gubNumberOfBuildings ].ubNumClimbSpots = 0; + *pubBuilding = gubNumberOfBuildings; + + // return pointer (have to subtract 1 since we just added 1 + return( &(gBuildings[ gubNumberOfBuildings ]) ); } BUILDING * FindBuilding( INT32 sGridNo ) @@ -608,16 +92,339 @@ BOOLEAN InBuilding( INT32 sGridNo ) //if ( FindBuilding( sGridNo ) == NULL ) if (FindBuilding(sGridNo) || InARoom(sGridNo, NULL) && FindStructure(sGridNo, STRUCTURE_ROOF)) { - return( FALSE ); + return(FALSE); } - return( TRUE ); + return(TRUE); } +BOOLEAN SameBuilding( INT32 sGridNo1, INT32 sGridNo2 ) +{ + if ( gubBuildingInfo[ sGridNo1 ] == NO_BUILDING ) + { + return( FALSE ); + } + if ( gubBuildingInfo[ sGridNo2 ] == NO_BUILDING ) + { + return( FALSE ); + } + return( (BOOLEAN) (gubBuildingInfo[ sGridNo1] == gubBuildingInfo[ sGridNo2 ]) ); +} + +BUILDING * GenerateBuilding( INT32 sDesiredSpot ) +{ + UINT8 ubBuildingID = 0; + BUILDING* pBuilding = CreateNewBuilding(&ubBuildingID); + if (!pBuilding) + { + return(NULL); + } + + // RoofReachableTest() is called in the original codepath so this if conditional is commented out for now. + // TODO: Convert original pathfinding code to use the same climbing spot flag as A* so we can get rid of the whole else clause + //if (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING]) + //{ + + // // Set reachable + // RoofReachableTest(sDesiredSpot, ubBuildingID); + + // // 0verhaul: The RoofReachableTest now finds ALL of the climb points for each climbable building, instead of a max of + // // 21 climb points (and a min of 0) for each building. It claims an extended map flag to mark a tile as a climb point. + // // So the array of up-climbs and down-climbs is now obsolete. FindClosestClimbPoint is now updated to search the map + // // for these flags. + // return(pBuilding); + //} + //else + { + INT32 uiLoop; + INT32 uiLoop2; + INT32 sTempGridNo, sNextTempGridNo, sVeryTemporaryGridNo; + INT32 sStartGridNo, sCurrGridNo, sPrevGridNo = NOWHERE, sRightGridNo; + UINT8 ubDirection, ubTempDirection; + BOOLEAN fFoundDir, fFoundWall; + UINT32 uiChanceIn = ROOF_LOCATION_CHANCE; // chance of a location being considered + INT32 sWallGridNo; + INT8 bDesiredOrientation; + INT8 bSkipSpots = 0; + SOLDIERTYPE FakeSoldier; + INT32 iLoopCount = 0; + + FakeSoldier.sGridNo = sDesiredSpot; + FakeSoldier.pathing.bLevel = 1; + FakeSoldier.bTeam = 1; + + // Set reachable + RoofReachableTest(sDesiredSpot, ubBuildingID); + + // From sGridNo, search until we find a spot that isn't part of the building + ubDirection = NORTHWEST; + sTempGridNo = sDesiredSpot; + // using diagonal directions to hopefully prevent picking a + // spot that + while ((gpWorldLevelData[sTempGridNo].uiFlags & MAPELEMENT_REACHABLE)) + { + sNextTempGridNo = NewGridNo(sTempGridNo, DirectionInc(ubDirection)); + if (sTempGridNo == sNextTempGridNo) + { + // hit edge of map!??! + return(NULL); + } + else + { + sTempGridNo = sNextTempGridNo; + } + } + + // we've got our spot + sStartGridNo = sTempGridNo; + + sCurrGridNo = sStartGridNo; + sVeryTemporaryGridNo = NewGridNo(sCurrGridNo, DirectionInc(EAST)); + if (gpWorldLevelData[sVeryTemporaryGridNo].uiFlags & MAPELEMENT_REACHABLE) + { + // go north first + ubDirection = NORTH; + } + else + { + // go that way (east) + ubDirection = EAST; + } + + gpWorldLevelData[sStartGridNo].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED; + + uiLoop2 = 0; + while (uiLoop2 < WORLD_MAX) + { + // if point to (2 clockwise) is not part of building and is not visited, + // or is starting point, turn! + sRightGridNo = NewGridNo(sCurrGridNo, DirectionInc(gTwoCDirection[ubDirection])); + sTempGridNo = sRightGridNo; + if (((!(gpWorldLevelData[sTempGridNo].uiFlags & MAPELEMENT_REACHABLE) && !(gpWorldLevelData[sTempGridNo].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED)) || (sTempGridNo == sStartGridNo)) && (sCurrGridNo != sStartGridNo)) + { + iLoopCount++; + + if (iLoopCount >= 10) + { + return(NULL); + } + ubDirection = gTwoCDirection[ubDirection]; + // try in that direction + continue; + } + iLoopCount = 0; + + // if spot ahead is part of building, turn + sTempGridNo = NewGridNo(sCurrGridNo, DirectionInc(ubDirection)); + if (gpWorldLevelData[sTempGridNo].uiFlags & MAPELEMENT_REACHABLE) + { + // first search for a spot that is neither part of the building or visited + + // we KNOW that the spot in the original direction is blocked, so only loop 3 times + ubTempDirection = gTwoCDirection[ubDirection]; + fFoundDir = FALSE; + for (uiLoop = 0; uiLoop < 3; uiLoop++) + { + sTempGridNo = NewGridNo(sCurrGridNo, DirectionInc(ubTempDirection)); + if (!(gpWorldLevelData[sTempGridNo].uiFlags & MAPELEMENT_REACHABLE) && !(gpWorldLevelData[sTempGridNo].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED)) + { + // this is the way to go! + fFoundDir = TRUE; + break; + } + ubTempDirection = gTwoCDirection[ubTempDirection]; + } + if (!fFoundDir) + { + // now search for a spot that is just not part of the building + ubTempDirection = gTwoCDirection[ubDirection]; + fFoundDir = FALSE; + for (uiLoop = 0; uiLoop < 3; uiLoop++) + { + sTempGridNo = NewGridNo(sCurrGridNo, DirectionInc(ubTempDirection)); + if (!(gpWorldLevelData[sTempGridNo].uiFlags & MAPELEMENT_REACHABLE)) + { + // this is the way to go! + fFoundDir = TRUE; + break; + } + ubTempDirection = gTwoCDirection[ubTempDirection]; + } + if (!fFoundDir) + { + // WTF is going on? + return(NULL); + } + } + ubDirection = ubTempDirection; + // try in that direction + continue; + } + + // move ahead + sPrevGridNo = sCurrGridNo; + sCurrGridNo = sTempGridNo; + sRightGridNo = NewGridNo(sCurrGridNo, DirectionInc(gTwoCDirection[ubDirection])); + +#ifdef ROOF_DEBUG + if (gsCoverValue[sCurrGridNo] == 0x7F7F) + { + gsCoverValue[sCurrGridNo] = 1; + } + else if (gsCoverValue[sCurrGridNo] >= 0) + { + gsCoverValue[sCurrGridNo]++; + } + + DebugAI(String("Roof code visits %d", sCurrGridNo)); +#endif + + if (sCurrGridNo == sStartGridNo) + { + // done + break; + } + + if (!(gpWorldLevelData[sCurrGridNo].ubExtFlags[0] & MAPELEMENT_EXT_ROOFCODE_VISITED)) + { + gpWorldLevelData[sCurrGridNo].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED; + + if (InARoom(sCurrGridNo, NULL)) + gubBuildingInfo[sCurrGridNo] = ubBuildingID; + + // consider this location as possible climb gridno + // there must be a regular wall adjacent to this for us to consider it a + // climb gridno + + // if the direction is east or north, the wall would be in our gridno; + // if south or west, the wall would be in the gridno two clockwise + fFoundWall = FALSE; + + // There must not be roof here either. There are places where a pitched roof butts up against a flat roof. + // Don't mark such a border as a climb point. Otherwise AI units will get stuck. + if (FindStructure(sCurrGridNo, STRUCTURE_ROOF) == NULL && + NewOKDestination(&FakeSoldier, sCurrGridNo, FALSE, 0)) + { + switch (ubDirection) + { + case NORTH: + sWallGridNo = sCurrGridNo; + bDesiredOrientation = OUTSIDE_TOP_RIGHT; + break; + case EAST: + sWallGridNo = sCurrGridNo; + bDesiredOrientation = OUTSIDE_TOP_LEFT; + break; + case SOUTH: + sWallGridNo = (sCurrGridNo + DirectionInc(gTwoCDirection[ubDirection])); + bDesiredOrientation = OUTSIDE_TOP_RIGHT; + break; + case WEST: + sWallGridNo = (sCurrGridNo + DirectionInc(gTwoCDirection[ubDirection])); + bDesiredOrientation = OUTSIDE_TOP_LEFT; + break; + default: + // what the heck? + return(NULL); + } + + if (bDesiredOrientation == OUTSIDE_TOP_LEFT) + { + if (WallExistsOfTopLeftOrientation(sWallGridNo)) + { + fFoundWall = TRUE; + } + } + else + { + if (WallExistsOfTopRightOrientation(sWallGridNo)) + { + fFoundWall = TRUE; + } + } + } + if (fFoundWall) + { +#ifdef ROOF_DEBUG + gsCoverValue[sCurrGridNo] = 50; +#endif + if (bSkipSpots > 0) + { + bSkipSpots--; + } + else if (Random(uiChanceIn) == 0) + { + pBuilding->sUpClimbSpots[pBuilding->ubNumClimbSpots] = sCurrGridNo; + pBuilding->sDownClimbSpots[pBuilding->ubNumClimbSpots] = sRightGridNo; + pBuilding->ubNumClimbSpots++; + + if (pBuilding->ubNumClimbSpots == MAX_CLIMBSPOTS_PER_BUILDING) + { + // gotta stop! + return(pBuilding); + } + + // if location is added as a spot, reset uiChanceIn + uiChanceIn = ROOF_LOCATION_CHANCE; +#ifdef ROOF_DEBUG + gsCoverValue[sCurrGridNo] = 99; +#endif + // skip the next spot + bSkipSpots = 1; + } + else + { + // didn't pick this location, so increase chance that next location + // will be considered + if (uiChanceIn > 2) + { + uiChanceIn--; + } + } + } + else + { + // can't select this spot + if ((!TileIsOutOfBounds(sPrevGridNo)) && (pBuilding->ubNumClimbSpots > 0)) + { + if (pBuilding->sDownClimbSpots[pBuilding->ubNumClimbSpots - 1] == sCurrGridNo) + { + // unselect previous spot + pBuilding->ubNumClimbSpots--; + // overwrote a selected spot so go into automatic selection for later + uiChanceIn = 1; +#ifdef ROOF_DEBUG + // reset marker + gsCoverValue[sPrevGridNo] = 1; +#endif + } + } + + // skip the next gridno + bSkipSpots = 1; + } + } + uiLoop2++; + } + // If we've run out of loop before we've run out of building, then there is + // something that has gone pear shaped + if (uiLoop2 >= WORLD_MAX) + { + INT32 x = 0; + INT32 y = 0; + while ((sDesiredSpot - ((y + 1) * WORLD_COLS)) >= 0) + { + ++y; + } + x = sDesiredSpot - (y * WORLD_COLS); + DebugMsg(TOPIC_JA2, DBG_LEVEL_2, String("113/UC Warning! Building Walk Algorithm has covered the entire map! Building %d located at [%d,%d] must be bogus.", ubBuildingID, x, y)); + } + // at end could prune # of locations if there are too many + return(pBuilding); + } +} void GenerateBuildings( void ) { - INT32 uiLoop; - // init building structures and variables memset( gubBuildingInfo, 0, WORLD_MAX * sizeof( UINT8 ) ); memset( &gBuildings, 0, MAX_BUILDINGS * sizeof( BUILDING ) ); @@ -635,7 +442,7 @@ void GenerateBuildings( void ) // reset ALL reachable flags // do once before we start building generation for // whole map - for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) + for (INT32 uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) { gpWorldLevelData[ uiLoop ].uiFlags &= ~(MAPELEMENT_REACHABLE); gpWorldLevelData[ uiLoop ].ubExtFlags[0] &= ~(MAPELEMENT_EXT_ROOFCODE_VISITED); @@ -643,7 +450,7 @@ void GenerateBuildings( void ) // search through world // for each location in a room try to find building info - for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) + for (INT32 uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ ) { if ( (gusWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) ) { @@ -654,66 +461,103 @@ void GenerateBuildings( void ) INT32 FindClosestClimbPoint( SOLDIERTYPE *pSoldier, INT32 sStartGridNo, INT32 sDesiredGridNo, BOOLEAN fClimbUp ) { - BUILDING * pBuilding; - INT32 sDistance, sClosestDistance = 1000, sClosestSpot= NOWHERE; - - pBuilding = FindBuilding( sDesiredGridNo ); + BUILDING* pBuilding = FindBuilding( sDesiredGridNo ); if (!pBuilding) { return( NOWHERE ); } - - // WANNE: Reworked climbing code from sevenfm - UINT8 ubNumClimbSpots; - INT32 * psClimbSpots; - UINT8 ubLoop; - ubNumClimbSpots = pBuilding->ubNumClimbSpots; - - if (fClimbUp) + INT32 sDistance, sClosestDistance = 1000, sClosestSpot = NOWHERE; + if (gGameSettings.fOptions[TOPTION_ALT_PATHFINDING]) { - psClimbSpots = pBuilding->sUpClimbSpots; - } - else - { - psClimbSpots = pBuilding->sDownClimbSpots; - } - - for ( ubLoop = 0; ubLoop < ubNumClimbSpots; ubLoop++ ) - { - if( (WhoIsThere2( pBuilding->sUpClimbSpots[ ubLoop ], 0 ) == NOBODY || - WhoIsThere2( pBuilding->sUpClimbSpots[ ubLoop ], 0 ) == pSoldier->ubID ) && - (WhoIsThere2( pBuilding->sDownClimbSpots[ ubLoop ], 1 ) == NOBODY || - WhoIsThere2( pBuilding->sDownClimbSpots[ ubLoop ], 1 ) == pSoldier->ubID) && - !InGas( pSoldier, psClimbSpots[ ubLoop] ) && - !Water( psClimbSpots[ ubLoop], pSoldier->pathing.bLevel) ) + for (INT32 sGridNo = 0; sGridNo < WORLD_MAX; sGridNo++) { - sDistance = PythSpacesAway( sStartGridNo, psClimbSpots[ ubLoop ] ); - if (sDistance < sClosestDistance ) + if (gubBuildingInfo[sGridNo] == gubBuildingInfo[sDesiredGridNo] && + gpWorldLevelData[sGridNo].ubExtFlags[1] & MAPELEMENT_EXT_CLIMBPOINT) { - sClosestDistance = sDistance; - sClosestSpot = psClimbSpots[ ubLoop ]; + // Found a climb point for this building + if (fClimbUp) + { + for (UINT8 ubTestDir = 0; ubTestDir < NUM_WORLD_DIRECTIONS; ubTestDir += 2) + { + INT32 sTestGridNo = NewGridNo(sGridNo, DirectionInc(ubTestDir)); + if (gpWorldLevelData[sTestGridNo].ubExtFlags[0] & MAPELEMENT_EXT_CLIMBPOINT) + { + // Found a matching climb point + if ((WhoIsThere2(sTestGridNo, 0) == NOBODY || sTestGridNo == pSoldier->sGridNo) + && (WhoIsThere2(sGridNo, 1) == NOBODY) && + (!pSoldier || !InGas(pSoldier, sTestGridNo))) + { + // And it's open + sDistance = PythSpacesAway(sStartGridNo, sTestGridNo); + if (sDistance < sClosestDistance) + { + sClosestDistance = sDistance; + sClosestSpot = sTestGridNo; + } + } + } + } + } + else + { + for (UINT8 ubTestDir = 0; ubTestDir < NUM_WORLD_DIRECTIONS; ubTestDir += 2) + { + INT32 sTestGridNo = NewGridNo(sGridNo, DirectionInc(ubTestDir)); + if (gpWorldLevelData[sTestGridNo].ubExtFlags[0] & MAPELEMENT_EXT_CLIMBPOINT) + { + // Found a matching climb point + if ((WhoIsThere2(sTestGridNo, 0) == NOBODY) && + (WhoIsThere2(sGridNo, 1) == NOBODY || sGridNo == pSoldier->sGridNo) && + (!pSoldier || !InGas(pSoldier, sTestGridNo))) + { + // And it's open + sDistance = PythSpacesAway(sStartGridNo, sGridNo); + if (sDistance < sClosestDistance) + { + sClosestDistance = sDistance; + sClosestSpot = sGridNo; + } + } + } + } + } } } } - + else + { + // WANNE: Reworked climbing code from sevenfm + INT32* psClimbSpots; + UINT8 ubNumClimbSpots = pBuilding->ubNumClimbSpots; + + if (fClimbUp) + { + psClimbSpots = pBuilding->sUpClimbSpots; + } + else + { + psClimbSpots = pBuilding->sDownClimbSpots; + } + + for (UINT8 ubLoop = 0; ubLoop < ubNumClimbSpots; ubLoop++) + { + if ((WhoIsThere2(pBuilding->sUpClimbSpots[ubLoop], 0) == NOBODY || + WhoIsThere2(pBuilding->sUpClimbSpots[ubLoop], 0) == pSoldier->ubID) && + (WhoIsThere2(pBuilding->sDownClimbSpots[ubLoop], 1) == NOBODY || + WhoIsThere2(pBuilding->sDownClimbSpots[ubLoop], 1) == pSoldier->ubID) && + !InGas(pSoldier, psClimbSpots[ubLoop]) && + !Water(psClimbSpots[ubLoop], pSoldier->pathing.bLevel)) + { + sDistance = PythSpacesAway(sStartGridNo, psClimbSpots[ubLoop]); + if (sDistance < sClosestDistance) + { + sClosestDistance = sDistance; + sClosestSpot = psClimbSpots[ubLoop]; + } + } + } + } + return( sClosestSpot ); } - -BOOLEAN SameBuilding( INT32 sGridNo1, INT32 sGridNo2 ) -{ - if ( gubBuildingInfo[ sGridNo1 ] == NO_BUILDING ) - { - return( FALSE ); - } - if ( gubBuildingInfo[ sGridNo2 ] == NO_BUILDING ) - { - return( FALSE ); - } - return( (BOOLEAN) (gubBuildingInfo[ sGridNo1] == gubBuildingInfo[ sGridNo2 ]) ); -} - -#endif -// ------------------------- -// JA2 vanilla building climbing - END -// ------------------------- diff --git a/TileEngine/CMakeLists.txt b/TileEngine/CMakeLists.txt new file mode 100644 index 00000000..a8b6e4d3 --- /dev/null +++ b/TileEngine/CMakeLists.txt @@ -0,0 +1,39 @@ +set(TileEngineSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Ambient Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Buildings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/environment.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Exit Grids.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Explosion Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Fog Of War.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interactive Tiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Isometric Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LightEffects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/lighting.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Edgepoints.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/overhead map.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/phys math.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/physics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/pits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Radar Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Dirty.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Fun.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Z.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/renderworld.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadMap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Shade Table Util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Simple Render Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Smell.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SmokeEffects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/structure.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sysutil.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Placement GUI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Animation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Cache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Surface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/TileDat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/tiledef.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WorldDat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/worlddef.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/worldman.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ExplosionData.cpp" +PARENT_SCOPE) diff --git a/TileEngine/Exit Grids.cpp b/TileEngine/Exit Grids.cpp index 28355f18..036b48d5 100644 --- a/TileEngine/Exit Grids.cpp +++ b/TileEngine/Exit Grids.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "debug.h" #include "worlddef.h" #include "worldman.h" @@ -14,70 +11,15 @@ #include "Sys Globals.h" #include "SaveLoadMap.h" #include "Text.h" -#endif -#if 0//dnl ch86 180214 -BOOLEAN gfLoadingExitGrids = FALSE; - -//used by editor. -EXITGRID gExitGrid = {0,1,1,0}; - -BOOLEAN gfOverrideInsertionWithExitGrid = FALSE; - -// - -#define MAX_EXITGRIDS 4096 - -EXITGRID gpExitGrids[MAX_EXITGRIDS]; -UINT guiExitGridsCount = 0; - - -//INT32 ConvertExitGridToINT32( EXITGRID *pExitGrid ) -//{ -// INT32 iExitGridInfo; -// iExitGridInfo = (pExitGrid->ubGotoSectorX-1)<< 28; -// iExitGridInfo += (pExitGrid->ubGotoSectorY-1)<< 24; -// iExitGridInfo += pExitGrid->ubGotoSectorZ << 20; -// iExitGridInfo += pExitGrid->usGridNo & 0x0000ffff; -// return iExitGridInfo; -//} -// -//void ConvertINT32ToExitGrid( INT32 iExitGridInfo, EXITGRID *pExitGrid ) -//{ -// //convert the int into 4 unsigned bytes. -// pExitGrid->ubGotoSectorX = (UINT8)(((iExitGridInfo & 0xf0000000)>>28)+1); -// pExitGrid->ubGotoSectorY = (UINT8)(((iExitGridInfo & 0x0f000000)>>24)+1); -// pExitGrid->ubGotoSectorZ = (UINT8)((iExitGridInfo & 0x00f00000)>>20); -// pExitGrid->usGridNo = (UINT16)(iExitGridInfo & 0x0000ffff); -//} -#else BOOLEAN gfLoadingExitGrids = FALSE; BOOLEAN gfOverrideInsertionWithExitGrid = FALSE; EXITGRID gExitGrid; EXITGRID *ExitGridTable = NULL; UINT16 gusNumExitGrids = 0; -#endif BOOLEAN GetExitGrid( UINT32 usMapIndex, EXITGRID *pExitGrid ) { -#if 0//dnl ch86 170214 - LEVELNODE *pShadow; - pShadow = gpWorldLevelData[ usMapIndex ].pShadowHead; - //Search through object layer for an exitgrid - while( pShadow ) - { - if ( pShadow->uiFlags & LEVELNODE_EXITGRID ) - { -// -// ConvertINT32ToExitGrid( pShadow->iExitGridInfo, pExitGrid ); - memcpy(pExitGrid, pShadow->pExitGridInfo, sizeof(EXITGRID)); -// - return TRUE; - } - pShadow = pShadow->pNext; - } - return FALSE; -#else INT32 i = 0; while(i < gusNumExitGrids) { @@ -89,7 +31,6 @@ BOOLEAN GetExitGrid( UINT32 usMapIndex, EXITGRID *pExitGrid ) i++; } return(FALSE); -#endif } BOOLEAN ExitGridAtGridNo( UINT32 usMapIndex ) @@ -127,42 +68,6 @@ BOOLEAN GetExitGridLevelNode( UINT32 usMapIndex, LEVELNODE **ppLevelNode ) void AddExitGridToWorld( INT32 iMapIndex, EXITGRID *pExitGrid ) { -#if 0//dnl ch86 180214 - LEVELNODE *pShadow, *tail; - pShadow = gpWorldLevelData[ iMapIndex ].pShadowHead; - - //Search through object layer for an exitgrid - while( pShadow ) - { - tail = pShadow; - if( pShadow->uiFlags & LEVELNODE_EXITGRID ) - { //we have found an existing exitgrid in this node, so replace it with the new information. - memcpy(pShadow->pExitGridInfo, pExitGrid, sizeof(EXITGRID));//dnl ch80 011213 - return; - } - pShadow = pShadow->pNext; - } - - // Add levelnode - AddShadowToHead( iMapIndex, MOCKFLOOR1 ); - // Get new node - pShadow = gpWorldLevelData[ iMapIndex ].pShadowHead; - - //fill in the information for the new exitgrid levelnode. -// -// pShadow->iExitGridInfo = ConvertExitGridToINT32( pExitGrid ); - memcpy(gpExitGrids + guiExitGridsCount, pExitGrid, sizeof(EXITGRID)); - pShadow->pExitGridInfo = gpExitGrids + guiExitGridsCount; - guiExitGridsCount++; -// - pShadow->uiFlags |= ( LEVELNODE_EXITGRID | LEVELNODE_HIDDEN ); - - //Add the exit grid to the sector, only if we call ApplyMapChangesToMapTempFile() first. - if( !gfEditMode && !gfLoadingExitGrids ) - { - AddExitGridToMapTempFile( iMapIndex, pExitGrid, gWorldSectorX, gWorldSectorY, gbWorldSectorZ ); - } -#else pExitGrid->iMapIndex = iMapIndex; INT32 i = 0, j = -1; while(i < gusNumExitGrids) @@ -200,18 +105,10 @@ void AddExitGridToWorld( INT32 iMapIndex, EXITGRID *pExitGrid ) if(!gfEditMode && !gfLoadingExitGrids) AddExitGridToMapTempFile(iMapIndex, pExitGrid, gWorldSectorX, gWorldSectorY, gbWorldSectorZ); } -#endif } void RemoveExitGridFromWorld( INT32 iMapIndex ) { -#if 0//dnl ch86 180214 - UINT16 usDummy; - if( TypeExistsInShadowLayer( iMapIndex, MOCKFLOOR, &usDummy ) ) - { - RemoveAllShadowsOfTypeRange( iMapIndex, MOCKFLOOR, MOCKFLOOR ); - } -#else INT32 i = 0; while(i < gusNumExitGrids) { @@ -223,7 +120,6 @@ void RemoveExitGridFromWorld( INT32 iMapIndex ) } i++; } -#endif } void TrashExitGridTable(void)//dnl ch86 170214 @@ -288,37 +184,15 @@ void LoadExitGrids(INT8** hBuffer, FLOAT dMajorMapVersion) UINT16 usNumExitGrids; INT32 usMapIndex; EXITGRID ExitGrid; -#if 0//dnl ch86 170214 - // New world is loading so trash all old EXITGRID's - memset(gpExitGrids, 0, sizeof(gpExitGrids)); - guiExitGridsCount = 0; -#else TrashExitGridTable(); -#endif gfLoadingExitGrids = TRUE; LOADDATA(&usNumExitGrids, *hBuffer, sizeof(usNumExitGrids)); for(int i=0; ifFlags & TILE_ON_ROOF ) ) { -#if 0//dnl ch83 080114 - sStructGridNo = pBase->sGridNo + ppTile[ubLoop]->sPosRelToBase; -#else sStructGridNo = AddPosRelToBase(pBase->sGridNo, ppTile[ubLoop]); -#endif // there might be two structures in this tile, one on each level, but we just want to // delete one on each pass @@ -1465,11 +1455,7 @@ void ExplosiveDamageGridNo( INT32 sGridNo, INT16 sWoundAmt, UINT32 uiDist, for ( ubLoop = BASE_TILE; ubLoop < ubNumberOfTiles; ubLoop++) { -#if 0//dnl ch83 080114 - sNewGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase; -#else sNewGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]); -#endif // look in adjacent tiles for ( ubLoop2 = 0; ubLoop2 < NUM_WORLD_DIRECTIONS; ubLoop2++ ) { diff --git a/TileEngine/Fog Of War.cpp b/TileEngine/Fog Of War.cpp index d3cb512f..63d9580e 100644 --- a/TileEngine/Fog Of War.cpp +++ b/TileEngine/Fog Of War.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "types.h" #include "Fog Of War.h" #include "Isometric Utils.h" #include "Simple Render Utils.h" #include "lighting.h" -#endif //When line of sight reaches a gridno, and there is a light there, it turns it on. //This is only done in the cave levels. diff --git a/TileEngine/Interactive Tiles.cpp b/TileEngine/Interactive Tiles.cpp index 71a445e3..550df2ae 100644 --- a/TileEngine/Interactive Tiles.cpp +++ b/TileEngine/Interactive Tiles.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "sysutil.h" #include "renderworld.h" #include "Sound Control.h" @@ -19,7 +16,6 @@ #include "NPC.h" #include "Explosion Control.h" #include "Text.h" -#endif #ifdef JA2TESTVERSION #include "message.h" diff --git a/TileEngine/Isometric Utils.cpp b/TileEngine/Isometric Utils.cpp index 6decb800..5f68cf49 100644 --- a/TileEngine/Isometric Utils.cpp +++ b/TileEngine/Isometric Utils.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "debug.h" #include "renderworld.h" #include "interface.h" @@ -10,7 +7,6 @@ #include "overhead.h" #include "Random.h" #include "Pathai.h" -#endif #include "Map Information.h" #include "meanwhile.h" #include "strategicmap.h" @@ -95,6 +91,11 @@ UINT8 gOneCCDirection[ NUM_WORLD_DIRECTIONS ] = WEST }; +UINT8 DirectionIfTurnedClockwise(UINT8 facing, UINT8 times) +{ + return (facing + times) % NUM_WORLD_DIRECTIONS; +} + // DIRECTION FACING DIRECTION WE WANT TO GOTO UINT8 gPurpendicularDirection[ NUM_WORLD_DIRECTIONS ][ NUM_WORLD_DIRECTIONS ] = { @@ -668,16 +669,6 @@ BOOLEAN GetMouseWorldCoordsInCenter( INT16 *psMouseX, INT16 *psMouseY ) return( TRUE ); } -#if 0 -// 0verhaul -// I did that (or actually uncasted a bunch of stuff and re-typed others to correct them), so -// no worries -// (jonathanl) to save me having to cast all the previous code -BOOLEAN GetMouseMapPos( UINT32 *psMapPos ) -{ - return GetMouseMapPos( (INT32 *)psMapPos ); -} -#endif BOOLEAN GetMouseMapPos( INT32 *psMapPos ) { @@ -916,6 +907,15 @@ INT16 sDeltaScreenX, sDeltaScreenY; } +INT16 DirectionToVectorX[NUM_WORLD_DIRECTIONS] = {0, 1, 1, 1, 0, -1, -1, -1}; +INT16 DirectionToVectorY[NUM_WORLD_DIRECTIONS] = {-1, -1, 0, 1, 1, 1, 0, -1}; +void ConvertDirectionToVectorInXY( UINT8 ubDirection, INT16* sXDir, INT16* sYDir ) +{ + Assert(ubDirection >= 0 && ubDirection < NUM_WORLD_DIRECTIONS); + *sXDir = DirectionToVectorX[ubDirection]; + *sYDir = DirectionToVectorY[ubDirection]; +} + void ConvertGridNoToXY( INT32 sGridNo, INT16 *sXPos, INT16 *sYPos ) { *sYPos = sGridNo / WORLD_COLS; @@ -1299,11 +1299,7 @@ BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo ) // Get screen coordinates for current position of soldier GetWorldXYAbsoluteScreenXY( sXMapPos, sYMapPos, &sWorldX, &sWorldY); -#if 0//dnl ch53 151009 - if ( sWorldX > 0 && sWorldX < ( gsTRX - gsTLX - 20 ) && sWorldY > 20 && sWorldY < ( gsBLY - gsTLY - 20 ) ) -#else if ( sWorldX >= 30 && sWorldX <= (gsTRX - gsTLX - 30) && sWorldY >= 20 && sWorldY <= (gsBLY - gsTLY - 10) ) -#endif { return GridNoOnWalkableWorldTile(sGridNo); } @@ -1311,31 +1307,6 @@ BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo ) return( FALSE ); } -#if 0//dnl ch53 101009 -// This function is used when we care about astetics with the top Y portion of the -// gma eplay area -// mostly due to UI bar that comes down.... -BOOLEAN GridNoOnVisibleWorldTileGivenYLimits( INT32 sGridNo ) -{ - INT16 sWorldX; - INT16 sWorldY; - INT16 sXMapPos, sYMapPos; - - // Check for valid gridno... - ConvertGridNoToXY( sGridNo, &sXMapPos, &sYMapPos ); - - // Get screen coordinates for current position of soldier - GetWorldXYAbsoluteScreenXY( sXMapPos, sYMapPos, &sWorldX, &sWorldY); - - if ( sWorldX > 0 && sWorldX < ( gsTRX - gsTLX - 20 ) && - sWorldY > 40 && sWorldY < ( gsBLY - gsTLY - 20 ) ) - { - return( TRUE ); - } - - return( FALSE ); -} -#endif BOOLEAN GridNoOnEdgeOfMap( INT32 sGridNo, INT8 * pbDirection ) { diff --git a/TileEngine/Isometric Utils.h b/TileEngine/Isometric Utils.h index eaa5f2b3..7da2f67e 100644 --- a/TileEngine/Isometric Utils.h +++ b/TileEngine/Isometric Utils.h @@ -30,6 +30,8 @@ extern UINT8 gTwoCDirection[ NUM_WORLD_DIRECTIONS ]; extern UINT8 gOneCDirection[ NUM_WORLD_DIRECTIONS ]; extern UINT8 gOneCCDirection[ NUM_WORLD_DIRECTIONS ]; +UINT8 DirectionIfTurnedClockwise(UINT8 facing, UINT8 times); + extern UINT8 gPurpendicularDirection[ NUM_WORLD_DIRECTIONS ][ NUM_WORLD_DIRECTIONS ]; // Macros @@ -40,6 +42,7 @@ extern UINT8 gPurpendicularDirection[ NUM_WORLD_DIRECTIONS ][ NUM_WORLD_DIRECTIO #define GETWORLDINDEXFROMWORLDCOORDS( y, x ) ( (INT32) ( x / CELL_X_SIZE ) ) + WORLD_COLS * ( (INT32) ( y / CELL_Y_SIZE ) ) +void ConvertDirectionToVectorInXY(UINT8 ubDirection, INT16* sXDir, INT16* sYDir); void ConvertGridNoToXY( INT32 sGridNo, INT16 *sXPos, INT16 *sYPos ); void ConvertGridNoToCellXY( INT32 sGridNo, INT16 *sXPos, INT16 *sYPos ); void ConvertGridNoToCenterCellXY( INT32 sGridNo, INT16 *sXPos, INT16 *sYPos ); diff --git a/TileEngine/LightEffects.cpp b/TileEngine/LightEffects.cpp index d11e7fe7..fe39894e 100644 --- a/TileEngine/LightEffects.cpp +++ b/TileEngine/LightEffects.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "debug.h" #include "animation control.h" #include "lighteffects.h" @@ -11,7 +8,6 @@ #include "Game Clock.h" #include "opplist.h" #include "Tactical Save.h" -#endif #include "SaveLoadGame.h" #include "GameVersion.h" // added by Flugente diff --git a/TileEngine/Map Edgepoints.cpp b/TileEngine/Map Edgepoints.cpp index f2ef426b..42106638 100644 --- a/TileEngine/Map Edgepoints.cpp +++ b/TileEngine/Map Edgepoints.cpp @@ -1,7 +1,4 @@ //#include // added by Flugente -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "Map Edgepoints.h" #include "pathai.h" @@ -14,7 +11,7 @@ #include "strategicmap.h" #include "worldman.h" #include "PreBattle Interface.h" // added by Flugente -#endif + #include "Rebel Command.h" #include "connect.h" @@ -1401,7 +1398,7 @@ INT32 SearchForClosestPrimaryMapEdgepoint(INT32 sGridNo, UINT8 ubInsertionCode, break; } // WANNE - MP: Center - if ( ( (is_networked || GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE ) && ubInsertionCode == INSERTION_CODE_CENTER) || ubInsertionCode == INSERTION_CODE_CHOPPER ) + if ( ( (is_networked || GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE ) && ubInsertionCode == INSERTION_CODE_CENTER) || ubInsertionCode == INSERTION_CODE_CHOPPER || (RebelCommand::GetAdditionalDeployRange(ubInsertionCode) > 0) ) { InitCenterEdgepoint( ubInsertionCode == INSERTION_CODE_CENTER ); psArray = gps1stCenterEdgepointArray; diff --git a/TileEngine/Radar Screen.cpp b/TileEngine/Radar Screen.cpp index c949f029..6146818e 100644 --- a/TileEngine/Radar Screen.cpp +++ b/TileEngine/Radar Screen.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "sgp.h" #include "Radar Screen.h" #include "sysutil.h" @@ -19,7 +16,6 @@ #include "Game Clock.h" #include "Map Screen Interface Map Inventory.h" #include "Animation Data.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; @@ -86,14 +82,16 @@ void InitRadarScreenCoords( ) { RADAR_WINDOW_STRAT_X = UI_BOTTOM_X + 1182; RADAR_WINDOW_STRAT_Y = UI_BOTTOM_Y + 9; + RADAR_WINDOW_TM_X = xResOffset + (xResSize - 97) + 223; + RADAR_WINDOW_SM_X = xResOffset + (xResSize - 97); } else { RADAR_WINDOW_STRAT_X = xResOffset + (xResSize - 97); RADAR_WINDOW_STRAT_Y = (SCREEN_HEIGHT - 107); + RADAR_WINDOW_TM_X = xResOffset + (xResSize - 97); + RADAR_WINDOW_SM_X = xResOffset + (xResSize - 97); } - RADAR_WINDOW_TM_X = xResOffset + (xResSize - 97); - RADAR_WINDOW_SM_X = xResOffset + (xResSize - 97); RADAR_WINDOW_TM_Y = (INTERFACE_START_Y + 13); RADAR_WINDOW_SM_Y = ((UsingNewInventorySystem() == false)) ? (INV_INTERFACE_START_Y + 33) : (INV_INTERFACE_START_Y + 116); @@ -439,8 +437,8 @@ void RenderRadarScreen( ) sWidth = ( RADAR_WINDOW_WIDTH ); sHeight = ( RADAR_WINDOW_HEIGHT ); - sX = RADAR_WINDOW_TM_X; - sY = gsRadarY; + sX = gsRadarX; + sY = gsRadarY; sRadarTLX = (INT16)( ( sTopLeftWorldX * gdScaleX ) - sRadarCX + sX + ( sWidth /2 ) ); @@ -605,7 +603,7 @@ void RenderRadarScreen( ) } // Add starting relative to interface - sXSoldRadar += RADAR_WINDOW_TM_X; + sXSoldRadar += gsRadarX; sYSoldRadar += gsRadarY; if(gbPixelDepth==16) @@ -771,9 +769,13 @@ BOOLEAN CreateDestroyMouseRegionsForSquadList( void ) CHECKF(AddVideoObject(&VObjectDesc, &uiHandle)); GetVideoObject(&hHandle, uiHandle); - - BltVideoObject( guiSAVEBUFFER , hHandle, 0,(xResOffset + xResSize - 102 - 1), gsVIEWPORT_END_Y, VO_BLT_SRCTRANSPARENCY,NULL ); - RestoreExternBackgroundRect ((xResOffset + xResSize - 102 - 1), gsVIEWPORT_END_Y, 102,( INT16 ) ( SCREEN_HEIGHT - gsVIEWPORT_END_Y ) ); + INT32 xCoord = (xResOffset + xResSize - 102 - 1); + if (isWidescreenUI()) + { + xCoord += 224; + } + BltVideoObject( guiSAVEBUFFER, hHandle, 0, xCoord, gsVIEWPORT_END_Y, VO_BLT_SRCTRANSPARENCY,NULL ); + RestoreExternBackgroundRect(xCoord, gsVIEWPORT_END_Y, 102,( INT16 ) ( SCREEN_HEIGHT - gsVIEWPORT_END_Y ) ); for( sCounter = 0; sCounter < NUMBER_OF_SQUADS; sCounter++ ) { diff --git a/TileEngine/Render Dirty.cpp b/TileEngine/Render Dirty.cpp index a35f7099..f90b3d25 100644 --- a/TileEngine/Render Dirty.cpp +++ b/TileEngine/Render Dirty.cpp @@ -1,15 +1,9 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" - #include "winfont.h" - -#else #include "worlddef.h" #include "Render Dirty.h" #include "sysutil.h" #include "vobject_blitters.h" -#endif #ifdef JA2BETAVERSION #include "Message.h" diff --git a/TileEngine/Render Fun.cpp b/TileEngine/Render Fun.cpp index f2e198b2..e2ecd20c 100644 --- a/TileEngine/Render Fun.cpp +++ b/TileEngine/Render Fun.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "Render Fun.h" #include "sysutil.h" #include "debug.h" @@ -11,7 +8,6 @@ #include "Fog Of War.h" #include "dialogue control.h" #include "Random.h" -#endif // Room Information //UINT8 gubWorldRoomInfo[ WORLD_MAX ]; @@ -212,11 +208,7 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT32 sCheckGridNo ) for ( ubLoop = 0; ubLoop < pBase->pDBStructureRef->pDBStructure->ubNumberOfTiles; ubLoop++ ) { ppTile = pBase->pDBStructureRef->ppTile; -#if 0//dnl ch83 080114 - sGridNo = pBase->sGridNo + ppTile[ ubLoop ]->sPosRelToBase; -#else sGridNo = AddPosRelToBase(pBase->sGridNo, ppTile[ubLoop]); -#endif if (sGridNo < 0 || sGridNo > WORLD_MAX) { continue; diff --git a/TileEngine/SaveLoadMap.cpp b/TileEngine/SaveLoadMap.cpp index 0379157c..0931fe91 100644 --- a/TileEngine/SaveLoadMap.cpp +++ b/TileEngine/SaveLoadMap.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "Types.h" #include "SaveLoadMap.h" #include "OverHead.h" @@ -18,7 +15,6 @@ #include "Message.h" #include "GameSettings.h" #include "Smell.h" -#endif #include //SB: make size of gpRevealedMap dependable from variable tactical map dimensions diff --git a/TileEngine/Shade Table Util.cpp b/TileEngine/Shade Table Util.cpp index 2956a5ef..f802fa44 100644 --- a/TileEngine/Shade Table Util.cpp +++ b/TileEngine/Shade Table Util.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include #include "types.h" #include "lighting.h" @@ -10,7 +7,6 @@ #include "video.h" #include "WorldDat.h" #include "Fileman.h" -#endif #include diff --git a/TileEngine/Simple Render Utils.cpp b/TileEngine/Simple Render Utils.cpp index d7d3e862..d58e62e7 100644 --- a/TileEngine/Simple Render Utils.cpp +++ b/TileEngine/Simple Render Utils.cpp @@ -1,10 +1,6 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "types.h" #include "Isometric Utils.h" #include "renderworld.h" -#endif void MarkMapIndexDirty( INT32 iMapIndex ) { diff --git a/TileEngine/Smell.cpp b/TileEngine/Smell.cpp index c52e8df5..45f75140 100644 --- a/TileEngine/Smell.cpp +++ b/TileEngine/Smell.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "worlddef.h" #include "Random.h" #include "Smell.h" @@ -14,7 +11,6 @@ #include "Game Clock.h" #include "Overhead.h" #include "debug control.h" -#endif /* * Smell & Blood system diff --git a/TileEngine/SmokeEffects.cpp b/TileEngine/SmokeEffects.cpp index 78213ddc..613b5535 100644 --- a/TileEngine/SmokeEffects.cpp +++ b/TileEngine/SmokeEffects.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include #include #include "stdlib.h" @@ -28,7 +25,6 @@ // sevenfm #include "environment.h" #include "Render Fun.h" -#endif #include "SaveLoadGame.h" #include "debug control.h" diff --git a/TileEngine/Tactical Placement GUI.cpp b/TileEngine/Tactical Placement GUI.cpp index a14b27dd..7b6c1daa 100644 --- a/TileEngine/Tactical Placement GUI.cpp +++ b/TileEngine/Tactical Placement GUI.cpp @@ -2,11 +2,6 @@ // WANNE 2 -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" - #include "PreBattle Interface.h" - #include "vehicles.h" -#else //sgp #include "english.h" #include "debug.h" @@ -36,11 +31,11 @@ #include "WordWrap.h" #include "Game Clock.h" #include "Isometric Utils.h" -#endif #include "connect.h" #include "renderworld.h"//dnl ch45 051009 #include "merc entering.h" #include "CampaignStats.h" // added by Flugente +#include "Rebel Command.h" typedef struct MERCPLACEMENT { @@ -338,6 +333,7 @@ void InitTacticalPlacementGUI() !( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) && // ATE Ignore vehicles MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW && MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT && + MercPtrs[ i ]->bAssignment != ASSIGNMENT_REBELCOMMAND && !( MercPtrs[i]->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) && MercPtrs[ i ]->bAssignment != IN_TRANSIT ) { @@ -355,6 +351,7 @@ void InitTacticalPlacementGUI() CurrentBattleSectorIs( MercPtrs[i]->sSectorX, MercPtrs[i]->sSectorY, MercPtrs[i]->bSectorZ ) && MercPtrs[ i ]->bAssignment != ASSIGNMENT_POW && MercPtrs[ i ]->bAssignment != ASSIGNMENT_MINIEVENT && + MercPtrs[ i ]->bAssignment != ASSIGNMENT_REBELCOMMAND && !( MercPtrs[i]->usSoldierFlagMask2 & SOLDIER_CONCEALINSERTION ) && MercPtrs[ i ]->bAssignment != IN_TRANSIT && !( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) ) // ATE Ignore vehicles @@ -910,6 +907,7 @@ void RenderTacticalPlacementGUI() if(sWorldScreenY <= PLACEMENT_OFFSET) { sY = (PLACEMENT_OFFSET - sWorldScreenY) / 5; + sY += RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_NORTH)/5; gTPClipRect.iTop += sY; } break; @@ -917,6 +915,7 @@ void RenderTacticalPlacementGUI() if((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) >= (MAPWIDTH - PLACEMENT_OFFSET)) { sX = ((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) - (MAPWIDTH - PLACEMENT_OFFSET)) / 5; + sX += RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_EAST)/5; gTPClipRect.iRight -= sX; } break; @@ -924,6 +923,7 @@ void RenderTacticalPlacementGUI() if((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) >= (MAPHEIGHT - PLACEMENT_OFFSET)) { sY = ((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) - (MAPHEIGHT - PLACEMENT_OFFSET)) / 5; + sY += RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_SOUTH)/5; gTPClipRect.iBottom -= sY; } break; @@ -931,6 +931,7 @@ void RenderTacticalPlacementGUI() if(sWorldScreenX <= PLACEMENT_OFFSET) { sX = (PLACEMENT_OFFSET - sWorldScreenX) / 5; + sX += RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_WEST)/5; gTPClipRect.iLeft += sX; } break; @@ -1234,19 +1235,19 @@ void TacticalPlacementHandle() switch(gMercPlacement[gbCursorMercID].ubStrategicInsertionCode) { case INSERTION_CODE_NORTH: - if(sWorldScreenY <= PLACEMENT_OFFSET) + if(sWorldScreenY <= (PLACEMENT_OFFSET + RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_NORTH))) gfValidCursor = TRUE; break; case INSERTION_CODE_EAST: - if(sWorldScreenX >= (MAPWIDTH - PLACEMENT_OFFSET)) + if(sWorldScreenX >= ((MAPWIDTH - PLACEMENT_OFFSET - RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_EAST)))) gfValidCursor = TRUE; break; case INSERTION_CODE_SOUTH: - if(sWorldScreenY >= (MAPHEIGHT - PLACEMENT_OFFSET)) + if(sWorldScreenY >= ((MAPHEIGHT - PLACEMENT_OFFSET - RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_SOUTH)))) gfValidCursor = TRUE; break; case INSERTION_CODE_WEST: - if(sWorldScreenX <= PLACEMENT_OFFSET) + if(sWorldScreenX <= (PLACEMENT_OFFSET + RebelCommand::GetAdditionalDeployRange(INSERTION_CODE_WEST))) gfValidCursor = TRUE; break; } diff --git a/TileEngine/Tile Animation.cpp b/TileEngine/Tile Animation.cpp index 7bc6a31d..266bd856 100644 --- a/TileEngine/Tile Animation.cpp +++ b/TileEngine/Tile Animation.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS -#include "TileEngine All.h" -#else #include "worlddef.h" #include "tile animation.h" #include "debug.h" @@ -16,7 +13,6 @@ #include "bullets.h" #include "LightEffects.h" #include "SmokeEffects.h" -#endif ANITILE *pAniTileHead = NULL; diff --git a/TileEngine/Tile Cache.cpp b/TileEngine/Tile Cache.cpp index 69cc42c5..ae94e395 100644 --- a/TileEngine/Tile Cache.cpp +++ b/TileEngine/Tile Cache.cpp @@ -1,13 +1,9 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "debug.h" #include "Debug Control.h" #include "tile surface.h" #include "tile cache.h" -#endif #ifdef JA2TESTVERSION #include "sys globals.h" #endif diff --git a/TileEngine/Tile Surface.cpp b/TileEngine/Tile Surface.cpp index 2b86332f..9f14fcec 100644 --- a/TileEngine/Tile Surface.cpp +++ b/TileEngine/Tile Surface.cpp @@ -1,11 +1,7 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "debug.h" #include "sys globals.h" -#endif #include "XML.h" diff --git a/TileEngine/TileDat.cpp b/TileEngine/TileDat.cpp index 5673e045..d46e8a2c 100644 --- a/TileEngine/TileDat.cpp +++ b/TileEngine/TileDat.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "tiledef.h" #include "worlddef.h" -#endif #include "GameSettings.h" diff --git a/TileEngine/TileEngine All.h b/TileEngine/TileEngine All.h deleted file mode 100644 index 86b3557c..00000000 --- a/TileEngine/TileEngine All.h +++ /dev/null @@ -1,158 +0,0 @@ -#ifndef __TILEENGINE_ALL_H -#define __TILEENGINE_ALL_H - -#pragma message("GENERATED PCH FOR TILEENGINE PROJECT.") - -#include -#include "sgp.h" -#include "Ambient types.h" -#include "fileman.h" -#include "environment.h" -#include "Sound Control.h" -#include "Game Events.h" -#include "Types.h" -#include "Buildings.h" -#include "Isometric Utils.h" -#include "Pathai.h" -#include "Structure Wrap.h" -#include "Random.h" -#include "Overhead.h" -#include "Render Fun.h" -#include "Strategicmap.h" -#include "Sys Globals.h" -#include "lighting.h" -#include "renderworld.h" -#include "Game Clock.h" -#include "quests.h" -#include "Ambient Control.h" -#include "AimMembers.h" -#include "Strategic Event Handler.h" -#include "BobbyR.h" -#include "mercs.h" -#include "email.h" -#include "Merc Hiring.h" -#include "insurance Contract.h" -#include "Strategic Merc Handler.h" -#include "message.h" -#include "opplist.h" -#include "debug.h" -#include "worlddef.h" -#include "worldman.h" -#include "smooth.h" -#include "Exit Grids.h" -#include "Editor Undo.h" -#include "Strategic Movement.h" -#include "Font Control.h" -#include "SaveLoadMap.h" -#include -#include "wcheck.h" -#include "soldier control.h" -#include "weapons.h" -#include "handle items.h" -#include "rotting corpses.h" -#include "tile cache.h" -#include "animation control.h" -#include "utilities.h" -#include "soldier create.h" -#include "soldier add.h" -#include "explosion control.h" -#include "tile animation.h" -#include "world items.h" -#include "tiledef.h" -#include "tiledat.h" -#include "interactive tiles.h" -#include "Handle Doors.h" -#include "smokeeffects.h" -#include "handle ui.h" -#include "pits.h" -#include "campaign Types.h" -#include "strategic.h" -#include "Action Items.h" -#include "Soldier Profile.h" -#include "Interface Dialogue.h" -#include "LightEffects.h" -#include "AI.h" -#include "Soldier tile.h" -#include "smell.h" -#include "GameSettings.h" -#include "Fog Of War.h" -#include "Simple Render Utils.h" -#include -#include -#include "himage.h" -#include "vsurface.h" -#include "vsurface_private.h" -#include "sysutil.h" -#include "interface.h" -#include "interface cursors.h" -#include "structure.h" -#include "points.h" -#include "Dialogue Control.h" -#include "english.h" -#include "mousesystem.h" -#include "jascreens.h" -#include "math.h" -#include -#include -#include "input.h" -#include "video.h" -#include "vobject_blitters.h" -#include "edit_sys.h" -#include "line.h" -#include "Animation Data.h" -#include "Timer Control.h" -#include "Radar Screen.h" -#include "Render Dirty.h" -#include "Structure Internals.h" -#include "Shade Table Util.h" -#include -#include "Map Edgepoints.h" -#include "Map Information.h" -#include "vobject.h" -#include "worlddat.h" -#include "overhead map.h" -#include "interface control.h" -#include "cursors.h" -#include "soldier find.h" -#include "interface panels.h" -#include "Tactical Placement GUI.h" -#include "phys math.h" -#include "physics.h" -#include "los.h" -#include "event pump.h" -#include "interface items.h" -#include "Debug Control.h" -#include "text.h" -#include "Squads.h" -#include "Map Screen Interface Map Inventory.h" -//#include "container.h" -#include "fov.h" -#include "Overhead types.h" -#include "Tactical Save.h" -#include "MemMan.h" -#include "font.h" -#include "Button System.h" -#include "gameloop.h" -#include "Cursor Control.h" -#include "MessageBoxScreen.h" -#include "assignments.h" -#include "WordWrap.h" -#include "time.h" -#include "Keys.h" -#include "bullets.h" -#include "Animation Cache.h" -#include "tile surface.h" -#include -#include "screenids.h" -#include "shading.h" -#include "Soldier Init List.h" -#include "Summary Info.h" -#include "Animated ProgressBar.h" -#include "EditorBuildings.h" -#include "music control.h" -#include "Scheduling.h" -#include "EditorMapInfo.h" -#include "Smoothing Utils.h" -#include "Meanwhile.h" - -#endif \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2005.vcproj b/TileEngine/TileEngine_VS2005.vcproj deleted file mode 100644 index 69af221c..00000000 --- a/TileEngine/TileEngine_VS2005.vcproj +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TileEngine/TileEngine_VS2008.vcproj b/TileEngine/TileEngine_VS2008.vcproj deleted file mode 100644 index 04da8b1b..00000000 --- a/TileEngine/TileEngine_VS2008.vcproj +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TileEngine/TileEngine_VS2010.vcxproj b/TileEngine/TileEngine_VS2010.vcxproj deleted file mode 100644 index 90df87c7..00000000 --- a/TileEngine/TileEngine_VS2010.vcxproj +++ /dev/null @@ -1,277 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - Win32Proj - TileEngine - TileEngine - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2010.vcxproj.filters b/TileEngine/TileEngine_VS2010.vcxproj.filters deleted file mode 100644 index 838f0b83..00000000 --- a/TileEngine/TileEngine_VS2010.vcxproj.filters +++ /dev/null @@ -1,252 +0,0 @@ - - - - - {74f02e9a-2a7e-4654-8228-90ca0ba88a66} - - - {878cd328-bcac-4171-a25a-60953e8550e3} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2013.vcxproj b/TileEngine/TileEngine_VS2013.vcxproj deleted file mode 100644 index 595991b8..00000000 --- a/TileEngine/TileEngine_VS2013.vcxproj +++ /dev/null @@ -1,297 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - Win32Proj - TileEngine - TileEngine - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2013.vcxproj.filters b/TileEngine/TileEngine_VS2013.vcxproj.filters deleted file mode 100644 index 838f0b83..00000000 --- a/TileEngine/TileEngine_VS2013.vcxproj.filters +++ /dev/null @@ -1,252 +0,0 @@ - - - - - {74f02e9a-2a7e-4654-8228-90ca0ba88a66} - - - {878cd328-bcac-4171-a25a-60953e8550e3} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2017.vcxproj b/TileEngine/TileEngine_VS2017.vcxproj deleted file mode 100644 index efb54e8a..00000000 --- a/TileEngine/TileEngine_VS2017.vcxproj +++ /dev/null @@ -1,298 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - Win32Proj - TileEngine - TileEngine - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TileEngine/TileEngine_VS2019.vcxproj b/TileEngine/TileEngine_VS2019.vcxproj deleted file mode 100644 index 0bd7088f..00000000 --- a/TileEngine/TileEngine_VS2019.vcxproj +++ /dev/null @@ -1,298 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - Win32Proj - TileEngine - TileEngine - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/TileEngine/WorldDat.cpp b/TileEngine/WorldDat.cpp index eda152e0..5e9a1580 100644 --- a/TileEngine/WorldDat.cpp +++ b/TileEngine/WorldDat.cpp @@ -1,13 +1,9 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "worlddat.h" #include "sys globals.h" #include "tile surface.h" #include "Debug.h" -#endif #include #include diff --git a/TileEngine/XML_ExplosionData.cpp b/TileEngine/XML_ExplosionData.cpp index 06079109..5d3218df 100644 --- a/TileEngine/XML_ExplosionData.cpp +++ b/TileEngine/XML_ExplosionData.cpp @@ -1,16 +1,12 @@ // Lesh: #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include #include #include "explosion control.h" #include "Debug.h" #include "FileMan.h" #include "Debug Control.h" -#endif #include "expat.h" #include "XML.h" diff --git a/TileEngine/environment.cpp b/TileEngine/environment.cpp index b3650af6..54aff33d 100644 --- a/TileEngine/environment.cpp +++ b/TileEngine/environment.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "sgp.h" #include "environment.h" #include "renderworld.h" @@ -17,7 +14,6 @@ #include "Isometric Utils.h" // added by Flugente #include "worldman.h" // added by Flugente #include "Dialogue Control.h" // added by Flugente -#endif #include "Text.h" #include "connect.h" diff --git a/TileEngine/lighting.cpp b/TileEngine/lighting.cpp index 691003f6..f873eaf1 100644 --- a/TileEngine/lighting.cpp +++ b/TileEngine/lighting.cpp @@ -16,9 +16,6 @@ * Written by Derek Beland, April 14, 1997 * ***************************************************************************************/ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "worlddef.h" #include "renderworld.h" #include "sysutil.h" @@ -31,7 +28,6 @@ #include "Shade Table Util.h" #include "rotting corpses.h" #include "PATHAI.H" -#endif #define LVL1_L1_PER (50) #define LVL1_L2_PER (50) @@ -544,12 +540,6 @@ UINT8 ubTravelCost; //bDirection = atan8( iX, iY, iSrcX, iSrcY ); bDirection = atan8( iSrcX, iSrcY, iX, iY ); -#if 0 - if ( usTileNo == 20415 && bDirection == 3 ) - { - int i = 0; - } -#endif ubTravelCost = gubWorldMovementCosts[ usTileNo ][ bDirection ][ 0 ]; @@ -568,50 +558,6 @@ UINT8 ubTravelCost; } } -#if 0 - pStruct = gpWorldLevelData[ usTileNo ].pStructHead; - while ( pStruct != NULL ) - { - if ( pStruct->usIndex < giNumberOfTiles ) - { - GetTileType( pStruct->usIndex, &uiType ); - - // ATE: Changed to use last decordations rather than last decal - // Could maybe check orientation value? Depends on our - // use of the orientation value flags.. - if((uiType >= FIRSTWALL) && (uiType <=LASTDECORATIONS )) - { - GetWallOrientation(pStruct->usIndex, &usWallOrientation); - - bWallCount++; - } - } - - pStruct=pStruct->pNext; - } - - if ( bWallCount ) - { - // ATE: If TWO or more - assume it's BLOCKED and return TRUE - if ( bWallCount != 1 ) - { - return( TRUE ); - } - - switch(usWallOrientation) - { - case INSIDE_TOP_RIGHT: - case OUTSIDE_TOP_RIGHT: - return( iSrcX < iX ); - - case INSIDE_TOP_LEFT: - case OUTSIDE_TOP_LEFT: - return( iSrcY < iY ); - - } - } - -#endif return(FALSE); } @@ -2156,28 +2102,6 @@ BOOLEAN LightIlluminateWall(INT16 iSourceX, INT16 iSourceY, INT16 iTileX, INT16 // return( LightTileHasWall( iSourceX, iSourceY, iTileX, iTileY ) ); -#if 0 -UINT16 usWallOrientation; - - GetWallOrientation(pStruct->usIndex, &usWallOrientation); - - switch(usWallOrientation) - { - case NO_ORIENTATION: - return(TRUE); - - case INSIDE_TOP_RIGHT: - case OUTSIDE_TOP_RIGHT: - return(iSourceX >= iTileX); - - case INSIDE_TOP_LEFT: - case OUTSIDE_TOP_LEFT: - return(iSourceY >= iTileY); - - } - return(FALSE); - -#endif return( TRUE ); } diff --git a/TileEngine/overhead map.cpp b/TileEngine/overhead map.cpp index 134f0d65..f74bc4b6 100644 --- a/TileEngine/overhead map.cpp +++ b/TileEngine/overhead map.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "sysutil.h" #include "utilities.h" #include "renderworld.h" @@ -24,7 +21,6 @@ #include "gameloop.h" #include "Action Items.h" // added by Flugente #include "Rebel Command.h" -#endif #include "connect.h" @@ -999,15 +995,8 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart // Black color for the background! //ColorFillVideoSurfaceArea( FRAME_BUFFER, sStartPointX_S, sStartPointY_S, sEndXS, sEndYS, 0 ); -#if 0//dnl ch79 291113 - if(gfTacticalPlacementGUIActive)//dnl ch45 021009 Skip overwrite buttons area which is not refresh during scroll //dnl ch77 211113 - ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-160, 0); - else - ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-120, 0); -#else if(uiVSurface == FRAME_BUFFER)//dnl ch82 090114 ColorFillVideoSurfaceArea(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-(gfTacticalPlacementGUIActive?160:120), 0); -#endif fInterfacePanelDirty = DIRTYLEVEL2; InvalidateScreen(); diff --git a/TileEngine/phys math.cpp b/TileEngine/phys math.cpp index d362e252..4cfd0665 100644 --- a/TileEngine/phys math.cpp +++ b/TileEngine/phys math.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "phys math.h" #include -#endif vector_3 VSetEqual( vector_3 *a ) { diff --git a/TileEngine/physics.cpp b/TileEngine/physics.cpp index d9b8dfff..d7d9eae4 100644 --- a/TileEngine/physics.cpp +++ b/TileEngine/physics.cpp @@ -1,8 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "physics.h" #include "wcheck.h" #include "isometric utils.h" @@ -22,7 +19,6 @@ #include "Buildings.h" #include "Dialogue Control.h" // added by Flugente #include "Map Information.h" // added by Shadooow -#endif #include "connect.h" #include "PATHAI.H" @@ -1461,43 +1457,6 @@ BOOLEAN PhysicsMoveObject( REAL_OBJECT *pObject ) -#if 0 -{ - LEVELNODE *pNode; - INT32 sNewGridNo; - - //Determine new gridno - sNewGridNo = MAPROWCOLTOPOS( ( pObject->Position.y / CELL_Y_SIZE ), ( pObject->Position.x / CELL_X_SIZE ) ); - - // Look at old gridno - if ( sNewGridNo != pObject->sGridNo ) - { - // We're at a new gridno! - - // First find levelnode of our object and delete - pNode = gpWorldLevelData[ pObject->sGridNo ].pStructHead; - - // LOOP THORUGH OBJECT LAYER - while( pNode != NULL ) - { - if ( pNode->uiFlags & LEVELNODE_PHYSICSOBJECT ) - { - if ( pNode->iPhysicsObjectID == pObject->iID ) - { - RemoveStruct( pObject->sGridNo, pNode->usIndex ); - break; - } - } - - pNode = ppNode->pNext; - } - - // Set new gridno, add - } - // Add new object / update position - -} -#endif void ObjectHitWindow( INT32 sGridNo, UINT16 usStructureID, BOOLEAN fBlowWindowSouth, BOOLEAN fLargeForce ) { diff --git a/TileEngine/pits.cpp b/TileEngine/pits.cpp index fc875bb9..a789e660 100644 --- a/TileEngine/pits.cpp +++ b/TileEngine/pits.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "types.h" #include "pits.h" #include "worlddef.h" @@ -14,7 +11,6 @@ #include "animation control.h" #include "strategic.h" #include "Action Items.h" -#endif //used by editor BOOLEAN gfShowPits = FALSE; diff --git a/TileEngine/renderworld.cpp b/TileEngine/renderworld.cpp index a69835fe..5258b73a 100644 --- a/TileEngine/renderworld.cpp +++ b/TileEngine/renderworld.cpp @@ -4,9 +4,6 @@ #include "Render Z.h" /////////////////////////// -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "renderworld.h" #include "sysutil.h" #include "vobject_blitters.h" @@ -24,7 +21,6 @@ #include "Sound Control.h" #include "LogicalBodyTypes/Layers.h" #include "LogicalBodyTypes/BodyTypeDB.h" -#endif #include "Utilities.h" @@ -358,14 +354,6 @@ UINT32 uiAdditiveLayerUsedFlags = 0xffffffff; // Array of shade values to use..... #define NUM_GLOW_FRAMES 30 -#if 0 -INT16 gsGlowFrames[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -}; -#endif INT16 gsGlowFrames[] = { @@ -1046,6 +1034,11 @@ inline UINT16 * GetShadeTable(LEVELNODE * pNode, SOLDIERTYPE * pSoldier, SOLDIER // Shade guy always lighter than scene default! { const auto GridNo = pSoldier->sGridNo; + if (GridNo == NOWHERE) + { + pShadeTable = pPaletteTable->pCurrentShade = pPaletteTable->pShades[DEFAULT_SHADE_LEVEL]; + return pShadeTable; + } UINT8 ubShadeLevel = gpWorldLevelData[GridNo].pLandHead->ubShadeLevel; // If merc is on a roof, shade according to roof brightness if (pSoldier->pathing.bLevel > 0 && gpWorldLevelData[GridNo].pRoofHead != NULL) @@ -1607,36 +1600,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT fRenderTile = TRUE; } - // If we are on the struct layer, check for if it's hidden! - if (uiRowFlags & (TILES_STATIC_STRUCTURES | TILES_DYNAMIC_STRUCTURES | TILES_STATIC_SHADOWS | TILES_DYNAMIC_SHADOWS)) - { - if (fUseTileElem) - { -#if 0 - // DONOT RENDER IF IT'S A HIDDEN STRUCT AND TILE IS NOT REVEALED - if (uiTileElemFlags & HIDDEN_TILE) - { - // IF WORLD IS NOT REVEALED, QUIT -#ifdef JA2EDITOR - if (!gfEditMode) -#endif - { - if (!(gpWorldLevelData[uiTileIndex].uiFlags & MAPELEMENT_REVEALED) && !(gTacticalStatus.uiFlags&SHOW_ALL_MERCS)) - { - //CONTINUE, DONOT RENDER - if (!fLinkedListDirection) - pNode = pNode->pPrevNode; - else - pNode = pNode->pNext; - - continue; - } - } - } -#endif - } - } - if (fRenderTile) { // Set flag to set layer as used @@ -9088,33 +9051,6 @@ void SetMercGlowNormal( ) -#if 0 - if ( gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_MOVING ) - { - if ( sZOffsetY > 0 ) - { - sZOffsetY++; - } - if ( sZOffsetX > 0 ) - { - sZOffsetX++; - } - } - - sZOffsetX = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetX;\ - sZOffsetY = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetY;\ - - - if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_MULTITILE ) )\ - {\ - sZOffsetX = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetX;\ - sZOffsetY = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetY;\ -\ - sWorldY = GetMapXYWorldY( sMapX + sZOffsetX, sMapY + sZOffsetY );\ - }\ - else - -#endif void SetRenderCenter( INT16 sNewX, INT16 sNewY ) diff --git a/TileEngine/structure.cpp b/TileEngine/structure.cpp index 3af1798c..a31c7c48 100644 --- a/TileEngine/structure.cpp +++ b/TileEngine/structure.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include #include "types.h" #include "wcheck.h" @@ -50,7 +47,6 @@ #include "Soldier Ani.h" #include "ASD.h" // added by Flugente #include "renderworld.h" // added by Flugente for SetRenderFlags( RENDER_FLAG_FULL ); -#endif #ifdef COUNT_PATHS extern UINT32 guiSuccessfulPathChecks; @@ -664,11 +660,7 @@ BOOLEAN OkayToAddStructureToTile( INT32 sBaseGridNo, INT16 sCubeOffset, DB_STRUC } ppTile = pDBStructureRef->ppTile; -#if 0//dnl ch83 080114 - sGridNo = sBaseGridNo + ppTile[ubTileIndex]->sPosRelToBase; -#else sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubTileIndex]); -#endif if (sGridNo < 0 || sGridNo > WORLD_MAX) { return( FALSE ); @@ -839,16 +831,8 @@ BOOLEAN OkayToAddStructureToTile( INT32 sBaseGridNo, INT16 sCubeOffset, DB_STRUC } for (bLoop2 = 0; bLoop2 < pDBStructure->ubNumberOfTiles; bLoop2++) { -#if 0//dnl ch83 080114 - if ( sBaseGridNo + ppTile[bLoop2]->sPosRelToBase == sOtherGridNo) - { - // obstacle will straddle wall! - return( FALSE ); - } -#else if(AddPosRelToBase(sBaseGridNo, ppTile[bLoop2]) == sOtherGridNo) return(FALSE);// obstacle will straddle wall! -#endif } } } @@ -1111,11 +1095,7 @@ STRUCTURE * InternalAddStructureToWorld( INT32 sBaseGridNo, INT8 bLevel, DB_STRU MemFree( ppStructure ); return( NULL ); } -#if 0//dnl ch83 080114 - ppStructure[ubLoop]->sGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase; -#else ppStructure[ubLoop]->sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]); -#endif if (ubLoop != BASE_TILE) { #ifdef JA2EDITOR @@ -1323,11 +1303,7 @@ BOOLEAN DeleteStructureFromWorld( STRUCTURE * pStructure ) // Free all the tiles for (ubLoop = BASE_TILE; ubLoop < ubNumberOfTiles; ubLoop++) { -#if 0//dnl ch83 080114 - sGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase; -#else sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]); -#endif // there might be two structures in this tile, one on each level, but we just want to // delete one on each pass pCurrent = FindStructureByID( sGridNo, usStructureID ); diff --git a/TileEngine/sysutil.cpp b/TileEngine/sysutil.cpp index 10774757..e3090125 100644 --- a/TileEngine/sysutil.cpp +++ b/TileEngine/sysutil.cpp @@ -1,10 +1,6 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "sgp.h" #include "wcheck.h" #include "sysutil.h" -#endif UINT32 guiBOTTOMPANEL = 0; UINT32 guiRIGHTPANEL = 0; diff --git a/TileEngine/tiledef.cpp b/TileEngine/tiledef.cpp index 0af32752..26ca0d4c 100644 --- a/TileEngine/tiledef.cpp +++ b/TileEngine/tiledef.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "tiledef.h" #include "worlddef.h" #include "wcheck.h" @@ -10,7 +7,6 @@ #include "pathai.h" #include "tile surface.h" #include "Tactical Save.h" -#endif //#include "editscreen.h" @@ -598,23 +594,6 @@ UINT8 gubEncryptionArray2[ BASE_NUMBER_OF_ROTATION_ARRAYS * 3 ][ NEW_ROTATION_AR }, }; -#if 0 -// These values coorespond to TerrainTypeDefines order -UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] = -{ - TRAVELCOST_FLAT, // NO_TERRAIN - TRAVELCOST_FLAT, // FLAT GROUND - TRAVELCOST_FLATFLOOR, // FLAT FLOOR - TRAVELCOST_PAVEDROAD, // PAVED ROAD - TRAVELCOST_DIRTROAD, // DIRT ROAD - TRAVELCOST_GRASS, // LOW_GRASS - TRAVELCOST_THICK, // HIGH GRASS - TRAVELCOST_TRAINTRACKS, // TRAIN TRACKS - TRAVELCOST_SHORE, // LOW WATER - TRAVELCOST_KNEEDEEP, // MED WATER - TRAVELCOST_DEEPWATER, // DEEP WATER -}; -#else // These values coorespond to TerrainTypeDefines order UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] = { @@ -630,7 +609,6 @@ UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] = TRAVELCOST_SHORE, // MED WATER TRAVELCOST_SHORE, // DEEP WATER }; -#endif ADDITIONAL_TILE_PROPERTIES_VALUES zAdditionalTileProperties; diff --git a/TileEngine/worlddef.cpp b/TileEngine/worlddef.cpp index bd0bc3c5..bf616f58 100644 --- a/TileEngine/worlddef.cpp +++ b/TileEngine/worlddef.cpp @@ -1,9 +1,5 @@ #include "builddefines.h" -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" - #include "PreBattle Interface.h" -#else #include "worlddef.h" #include "worlddat.h" #include "wcheck.h" @@ -47,7 +43,6 @@ #include "gamesettings.h" #include "editscreen.h" #include "Editor Taskbar Utils.h" -#endif #ifdef JA2EDITOR #include "Summary Info.h" @@ -150,14 +145,11 @@ UINT32 gSurfaceMemUsage; //UINT8 gubWorldMovementCosts[ WORLD_MAX ][MAXDIR][2]; UINT8 (*gubWorldMovementCosts)[MAXDIR][2] = NULL;//dnl ch43 260909 -// Flugente: this stuff is only ever used in AStar pathing and is a unnecessary waste of resources otherwise, so I'm putting an end to this -#ifdef USE_ASTAR_PATHS //ddd to speed up search of illuminated tiles in PATH AI -BOOLEAN gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ]; -BOOLEAN gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ]; -INT32 gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ]; +BOOLEAN gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ]; +BOOLEAN gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ]; +INT32 gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ]; //ddd -#endif // set to nonzero (locs of base gridno of structure are good) to have it defined by structure code INT16 gsRecompileAreaTop = 0; @@ -2281,15 +2273,6 @@ BOOLEAN SaveWorld(const STR8 puiFilename, FLOAT dMajorMapVersion, UINT8 ubMinorM { SaveMapLights( hfile ); } -#if 0//dnl ch74 191013 from 050611 Scheinworld reported problem with basement levels and similar maps which doesn't need entry points so decide to remove this check completely - if(gMapInformation.sCenterGridNo == -1 || gMapInformation.ubEditorSmoothingType == SMOOTHING_NORMAL && (gMapInformation.sNorthGridNo == -1 && gMapInformation.sEastGridNo == -1 && gMapInformation.sSouthGridNo == -1 && gMapInformation.sWestGridNo == -1))//dnl ch17 290909 - { - swprintf(gzErrorCatchString, L"SAVE ABORTED! Center and at least one of (N,S,E,W) entry point should be set."); - gfErrorCatch = TRUE; - FileClose(hfile); - return(FALSE); - } -#endif gMapInformation.ubMapVersion = ubMinorMapVersion;//dnl ch74 241013 all this years MapInfo saves incorrect version :-( SaveMapInformation(hfile, dMajorMapVersion, ubMinorMapVersion);//dnl ch33 150909 diff --git a/TileEngine/worlddef.h b/TileEngine/worlddef.h index acac1b00..394f6a4a 100644 --- a/TileEngine/worlddef.h +++ b/TileEngine/worlddef.h @@ -281,18 +281,6 @@ typedef struct // World Data extern MAP_ELEMENT *gpWorldLevelData; - -// Flugente: this stuff is only ever used in AStar pathing and is a unnecessary waste of resources otherwise, so I'm putting an end to this -#ifdef USE_ASTAR_PATHS -// World Movement Costs -//UINT8 gubWorldMovementCosts[ WORLD_MAX ][MAXDIR][2]; -//ddd Tables to track tactical value of grid tiles -extern BOOLEAN gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ]; -extern BOOLEAN gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ]; //Tracks position of corpses for AI avoidance -extern INT32 gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ]; //Tracks visibility my mercs -//ddd -#endif - extern UINT8 (*gubWorldMovementCosts)[MAXDIR][2];//dnl ch43 260909 //dnl ch44 290909 Translation routine diff --git a/TileEngine/worldman.cpp b/TileEngine/worldman.cpp index 0526775f..1a91a147 100644 --- a/TileEngine/worldman.cpp +++ b/TileEngine/worldman.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "TileEngine All.h" -#else #include "worlddef.h" #include "worldman.h" #include "wcheck.h" @@ -15,7 +12,6 @@ #include "random.h" // sevenfm #include "PATHAI.H" -#endif extern BOOLEAN gfBasement; @@ -2297,10 +2293,6 @@ BOOLEAN RemoveShadow( INT32 iMapIndex, UINT16 usIndex ) { pOldShadow->pNext = pShadow->pNext; } -#if 0//#ifdef JA2EDITOR//dnl ch80 011213 //dnl ch86 190214 - if(pShadow->uiFlags & LEVELNODE_EXITGRID && pShadow->pExitGridInfo) - memset(pShadow->pExitGridInfo, 0, sizeof(EXITGRID)); -#endif // Delete memory assosiated with item MemFree( pShadow ); guiLevelNodes--; diff --git a/Utils/Animated ProgressBar.cpp b/Utils/Animated ProgressBar.cpp index 923bb72e..652d5f05 100644 --- a/Utils/Animated ProgressBar.cpp +++ b/Utils/Animated ProgressBar.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "types.h" #include "Animated ProgressBar.h" #include "MemMan.h" @@ -17,7 +14,6 @@ #include "WordWrap.h" #include "Message.h" #include "Text.h" -#endif double rStart, rEnd; double rActual; diff --git a/Utils/CMakeLists.txt b/Utils/CMakeLists.txt new file mode 100644 index 00000000..0a11b8bb --- /dev/null +++ b/Utils/CMakeLists.txt @@ -0,0 +1,57 @@ +set(UtilsSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Animated ProgressBar.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cinematics Bink.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cinematics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Debug Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Event Manager.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Event Pump.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ExportStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Font Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ImportStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/INIReader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/KeyMap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LocalizedStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MapUtility.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MercTextBox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/message.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Multi Language Graphic Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Multilingual Text Code Generator.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Music Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PopUpBox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popup_class.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popup_definition.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quantize Wrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quantize.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Slider.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Sound Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/STIConvert.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Text Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Text Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Timer Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Utilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WordWrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XMLProperties.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XMLWriter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Language.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SenderNameList.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_ChineseText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_DutchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_EnglishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_FrenchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_GermanText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_ItalianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ChineseText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25DutchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25EnglishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25FrenchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25GermanText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ItalianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25PolishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25RussianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_PolishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_RussianText.cpp" +PARENT_SCOPE) diff --git a/Utils/Cinematics.cpp b/Utils/Cinematics.cpp index a72cfab5..8dc05604 100644 --- a/Utils/Cinematics.cpp +++ b/Utils/Cinematics.cpp @@ -32,11 +32,7 @@ #include #include -#ifdef JA2 #include "video.h" -#else - #include "video2.h" -#endif #include "vsurface_private.h" diff --git a/Utils/Cursors.cpp b/Utils/Cursors.cpp index 2fccde31..2338d366 100644 --- a/Utils/Cursors.cpp +++ b/Utils/Cursors.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "interface items.h" -#else #include "builddefines.h" #include #include "sgp.h" @@ -18,7 +14,6 @@ #include "Sound Control.h" // HEADROCK HAM B2.6: included this here to allow toggling the CTH bars. #include "GameSettings.h" -#endif //aim extern UINT8 gubShowActionPointsInRed; @@ -1659,8 +1654,6 @@ void DrawMouseText( ) static BOOLEAN fShow = FALSE; static BOOLEAN fHoldInvalid = TRUE; - //EnterMutex(MOUSE_BUFFER_MUTEX, __LINE__, __FILE__); - if ( gfUIBodyHitLocation ) { // Set dest for gprintf to be different @@ -1856,8 +1849,6 @@ void DrawMouseText( ) mprintf( sX, sY, L"%d", gsCurrentActionPoints ); //mprintf( sX, sY, L"%d %d", sX, sY ); - //LeaveMutex(MOUSE_BUFFER_MUTEX, __LINE__, __FILE__); - SetFontShadow( DEFAULT_SHADOW ); // reset @@ -1866,32 +1857,6 @@ void DrawMouseText( ) } //if ( gpItemPointer != NULL ) -#if 0 - { - if ( gpItemPointer->ubNumberOfObjects > 1 ) - { - SetFontDestBuffer( MOUSE_BUFFER , 0, 0, 64, 64, FALSE ); - - swprintf( pStr, L"x%d", gpItemPointer->ubNumberOfObjects ); - - FindFontCenterCoordinates( 0, 0, gsCurMouseWidth, gsCurMouseHeight, pStr, TINYFONT1, &sX, &sY ); - - SetFont( TINYFONT1 ); - - SetFontBackground( FONT_MCOLOR_BLACK ); - SetFontForeground( FONT_MCOLOR_WHITE ); - SetFontShadow( DEFAULT_SHADOW ); - - if ( !( gViewportRegion.uiFlags & MSYS_MOUSE_IN_AREA ) ) - { - mprintf( sX + 10, sY - 10, L"x%d", gpItemPointer->ubNumberOfObjects ); - } - - // reset - SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE ); - } - } -#endif } void UpdateAnimatedCursorFrames( UINT32 uiCursorIndex ) @@ -2013,51 +1978,3 @@ HVOBJECT GetCursorFileVideoObject( UINT32 uiCursorFile ) { return( CursorFileDatabase[ uiCursorFile ].hVObject ); } - - -void SyncPairedCursorFrames( UINT32 uiSrcIndex, UINT32 uiDestIndex ) -{ -#if 0 - CursorData *pSrcCurData, *pDestCurData; - CursorImage *pSrcCurImage, *pDestCurImage; - UINT32 cnt; - INT32 iCurFrame = -1; - - if ( uiSrcIndex == VIDEO_NO_CURSOR || uiDestIndex == VIDEO_NO_CURSOR ) - { - return; - } - - pSrcCurData = &( CursorDatabase[ uiSrcIndex ] ); - pDestCurData = &( CursorDatabase[ uiDestIndex ] ); - - // Get Current frame from src - for ( cnt = 0; cnt < pSrcCurData->usNumComposites; cnt++ ) - { - pSrcCurImage = &( pSrcCurData->Composites[ cnt ] ); - - if ( CursorFileDatabase[ pSrcCurImage->uiFileIndex ].fFlags & ANIMATED_CURSOR ) - { - iCurFrame = pSrcCurImage->uiCurrentFrame; - break; - } - } - - // If we are not an animated cursor, return now - if ( iCurFrame == -1 ) - { - return; - } - - // Update dest - for ( cnt = 0; cnt < pDestCurData->usNumComposites; cnt++ ) - { - pDestCurImage = &( pDestCurData->Composites[ cnt ] ); - - if ( CursorFileDatabase[ pDestCurImage->uiFileIndex ].fFlags & ANIMATED_CURSOR ) - { - pDestCurImage->uiCurrentFrame = iCurFrame; - } - } -#endif -} diff --git a/Utils/Cursors.h b/Utils/Cursors.h index 988da59c..0a763a15 100644 --- a/Utils/Cursors.h +++ b/Utils/Cursors.h @@ -311,8 +311,6 @@ void HandleAnimatedCursors( ); void DrawMouseActionPoints( ); void UpdateAnimatedCursorFrames( UINT32 uiCursorIndex ); -void SyncPairedCursorFrames( UINT32 uiSrcCursor, UINT32 uiDestCursor ); - void SetCursorSpecialFrame( UINT32 uiCursor, UINT8 ubFrame ); void SetCursorFlags( UINT32 uiCursor, UINT8 ubFlags ); diff --git a/Utils/Debug Control.cpp b/Utils/Debug Control.cpp index 3b0e8771..b1fa6fa7 100644 --- a/Utils/Debug Control.cpp +++ b/Utils/Debug Control.cpp @@ -1,10 +1,6 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "types.h" #include "Debug Control.h" #include "stdio.h" -#endif #include "sgp_logger.h" diff --git a/Utils/Encrypted File.cpp b/Utils/Encrypted File.cpp index fcfd0612..4238886b 100644 --- a/Utils/Encrypted File.cpp +++ b/Utils/Encrypted File.cpp @@ -1,10 +1,6 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Encrypted File.h" #include "FileMan.h" #include "Debug.h" -#endif #include "Language Defines.h" // anv: for selecting random line diff --git a/Utils/Event Manager.cpp b/Utils/Event Manager.cpp index 1de04b5f..edd39c59 100644 --- a/Utils/Event Manager.cpp +++ b/Utils/Event Manager.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include #include #include "sgp.h" @@ -8,7 +5,6 @@ #include "wcheck.h" #include "Event Manager.h" #include "Timer Control.h" -#endif HLIST hEventQueue = NULL; HLIST hDelayEventQueue = NULL; diff --git a/Utils/Event Pump.cpp b/Utils/Event Pump.cpp index c3ef4943..da01372d 100644 --- a/Utils/Event Pump.cpp +++ b/Utils/Event Pump.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include #include #include "sgp.h" @@ -14,7 +11,6 @@ #include "Animation Control.h" #include "opplist.h" #include "Tactical Save.h" -#endif #ifdef NETWORKED #include "Networking.h" diff --git a/Utils/Font Control.cpp b/Utils/Font Control.cpp index c1d7cf9f..87c140f5 100644 --- a/Utils/Font Control.cpp +++ b/Utils/Font Control.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "winfont.h" -#else #include #include #include "sgp.h" @@ -9,7 +5,6 @@ #include "vsurface.h" #include "wcheck.h" #include "Font Control.h" -#endif INT32 giCurWinFont = 0; //BOOLEAN gfUseWinFonts = FALSE; @@ -98,6 +93,14 @@ UINT16 CreateFontPaletteTables(HVOBJECT pObj ); extern UINT16 gzFontName[32]; +auto GetHugeFont() -> INT32 { +#if defined(JA2EDITOR) && defined(ENGLISH) + return gpHugeFont; +#else + return gp16PointArial; +#endif +} + BOOLEAN InitializeFonts( ) { //INT16 zWinFontName[128]; // unused (jonathanl) @@ -228,6 +231,7 @@ BOOLEAN InitializeFonts( ) if ( iUseWinFonts ) { InitWinFonts( ); } + InitTooltipFonts(); return( TRUE ); } @@ -258,6 +262,7 @@ void ShutdownFonts( ) if ( iUseWinFonts ) { ShutdownWinFonts(); } + ShutdownTooltipFonts(); } // Set shades for fonts diff --git a/Utils/Font Control.h b/Utils/Font Control.h index f0c1a6bc..db5856cd 100644 --- a/Utils/Font Control.h +++ b/Utils/Font Control.h @@ -89,11 +89,6 @@ extern HVOBJECT gvoBlockFontNarrow; extern INT32 gp14PointHumanist; extern HVOBJECT gvo14PointHumanist; -#ifdef JA2EDITOR -extern INT32 gpHugeFont; -extern HVOBJECT gvoHugeFont; -#endif - //extern INT32 giSubTitleWinFont; @@ -124,12 +119,7 @@ extern BOOLEAN gfFontsInit; #define BLOCKFONTNARROW gpBlockFontNarrow #define FONT14HUMANIST gp14PointHumanist -#if defined( JA2EDITOR ) && defined( ENGLISH ) - #define HUGEFONT gpHugeFont -#else - #define HUGEFONT gp16PointArial -#endif - +auto GetHugeFont() -> INT32; #define FONT_SHADE_RED 6 #define FONT_SHADE_BLUE 1 diff --git a/Utils/KeyMap.cpp b/Utils/KeyMap.cpp index 4a835c7a..5f040276 100644 --- a/Utils/KeyMap.cpp +++ b/Utils/KeyMap.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS -#include "Utils All.h" -#else #include "KeyMap.h" #include -#endif #include "text.h" static Str8EnumLookupType gKeyTable[] = diff --git a/Utils/MapUtility.cpp b/Utils/MapUtility.cpp index d4af42af..baf030a8 100644 --- a/Utils/MapUtility.cpp +++ b/Utils/MapUtility.cpp @@ -1,8 +1,4 @@ -#ifdef PRECOMPILEDHEADERS -#include "Utils All.h" -#else #include "sgp.h" -#endif #ifdef JA2EDITOR #include "Screens.h" diff --git a/Utils/MercTextBox.cpp b/Utils/MercTextBox.cpp index 9102816e..39537615 100644 --- a/Utils/MercTextBox.cpp +++ b/Utils/MercTextBox.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "MercTextBox.h" #include "WCheck.h" #include "renderworld.h" @@ -9,7 +6,6 @@ #include "WordWrap.h" #include "vobject_blitters.h" #include "Message.h" -#endif #define TEXT_POPUP_WINDOW_TEXT_OFFSET_X 8 diff --git a/Utils/Multi Language Graphic Utils.cpp b/Utils/Multi Language Graphic Utils.cpp index 4de91843..0371e72e 100644 --- a/Utils/Multi Language Graphic Utils.cpp +++ b/Utils/Multi Language Graphic Utils.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS -#include "Utils All.h" -#else #include "builddefines.h" #include "stdio.h" #include "Windows.h" #include "Types.h" #include "Multi Language Graphic Utils.h" -#endif #include "Language Defines.h" //SB diff --git a/Utils/Music Control.cpp b/Utils/Music Control.cpp index e436ff89..c657f62b 100644 --- a/Utils/Music Control.cpp +++ b/Utils/Music Control.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "types.h" #include "Music Control.h" #include "soundman.h" @@ -9,7 +6,6 @@ #include "overhead.h" #include "timer control.h" #include "strategicmap.h" -#endif #include "Overhead Types.h" //extern int iScreenMode; diff --git a/Utils/PopUpBox.cpp b/Utils/PopUpBox.cpp index f0bfc3c8..cc1225cd 100644 --- a/Utils/PopUpBox.cpp +++ b/Utils/PopUpBox.cpp @@ -1,9 +1,5 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "PopUpBox.h" #include "sysutil.h" -#endif #define BORDER_WIDTH 16 diff --git a/Utils/STIConvert.cpp b/Utils/STIConvert.cpp index 49e9acf5..09018200 100644 --- a/Utils/STIConvert.cpp +++ b/Utils/STIConvert.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "builddefines.h" #include #include @@ -14,7 +11,6 @@ #include "pcx.h" #include "impTGA.h" #include "wcheck.h" -#endif //CONVERT_TO_16_BIT BOOLEAN ConvertToETRLE( UINT8 ** ppDest, UINT32 * puiDestLen, UINT8 ** ppSubImageBuffer, UINT16 * pusNumberOfSubImages, UINT8 * p8BPPBuffer, UINT16 usWidth, UINT16 usHeight, UINT32 fFlags ); diff --git a/Utils/Slider.cpp b/Utils/Slider.cpp index 817c2edf..5b7383b8 100644 --- a/Utils/Slider.cpp +++ b/Utils/Slider.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Types.h" #include "WordWrap.h" #include "Render Dirty.h" @@ -9,7 +6,6 @@ #include "Slider.h" #include "SysUtil.h" #include "Line.h" -#endif diff --git a/Utils/Sound Control.cpp b/Utils/Sound Control.cpp index 3c7f549d..2598dc28 100644 --- a/Utils/Sound Control.cpp +++ b/Utils/Sound Control.cpp @@ -1,8 +1,5 @@ // MODULE FOR SOUND SYSTEM -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "sgp.h" #include "Sound Control.h" #include "soundman.h" @@ -11,7 +8,6 @@ #include "renderworld.h" #include "GameSettings.h" #include "math.h" -#endif #define SOUND_FAR_VOLUME_MOD 25 @@ -635,40 +631,6 @@ UINT32 CalculateSoundEffectsVolume( UINT32 uiVolume ) } -#if 0 -int x,dif,absDif; - - // This function calculates the general LEFT / RIGHT direction of a gridno - // based on the middle of your screen. - - x = Gridx(gridno); - - dif = ScreenMiddleX - x; - - if ( (absDif=abs(dif)) > 32) - { - // OK, NOT the middle. - - // Is it outside the screen? - if (absDif > HalfWindowWidth) - { - // yes, outside... - if (dif > 0) - return(25); - else - return(102); - } - else // inside screen - if (dif > 0) - return(LEFTSIDE); - else - return(RIGHTSIDE); - } - else // hardly any difference, so sound should be played from middle - return(MIDDLE); - -} -#endif // == Lesh slightly changed this function ============ INT32 SoundDir( INT32 sGridNo ) diff --git a/Utils/Text Input.cpp b/Utils/Text Input.cpp index 8784ade9..3efcb415 100644 --- a/Utils/Text Input.cpp +++ b/Utils/Text Input.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "builddefines.h" #include #include @@ -18,7 +15,6 @@ #include "vobject_blitters.h" #include "Font Control.h" #include "Sound Control.h" -#endif STR16 szClipboard; @@ -755,7 +751,6 @@ BOOLEAN HandleTextInput( InputAtom *Event ) } //For any number of reasons, these ALT and CTRL combination key presses //will be processed externally -#if 1 if( Event->usKeyState & CTRL_DOWN ) { if( Event->usParam == 'c' || Event->usParam == 'C' ) @@ -790,7 +785,6 @@ BOOLEAN HandleTextInput( InputAtom *Event ) return FALSE; } } -#endif if( Event->usKeyState & ALT_DOWN || Event->usKeyState & CTRL_DOWN && Event->usParam != DEL ) return FALSE; //F1-F12 regardless of state are processed externally as well. diff --git a/Utils/Text Utils.cpp b/Utils/Text Utils.cpp index 93bb693c..757a20c7 100644 --- a/Utils/Text Utils.cpp +++ b/Utils/Text Utils.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "text.h" #include "Fileman.h" #include "GameSettings.h" // sevenfm #include #include -#endif BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString ) { @@ -15,382 +11,14 @@ BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString ) if (pNameString != NULL) { -#if 0 - j = -1; - for (int i=0;i<80;i++) - { - j++; - if ( j<(int)strlen(Item[ubIndex].szLongItemName )) - { - pNameString[i] = Item[ubIndex].szLongItemName [j]; - - #ifdef GERMAN - // We have a german special character - if (Item[ubIndex].szLongItemName [j] == -61) - { - // This character determines the special character - switch (Item[ubIndex].szLongItemName [j + 1]) - { - // - case -68: - pNameString[i] = 252; - // Skip next character, because "umlaute" have 2 chars - j++; - break; - // - case -100: - pNameString[i] = 220; - j++; - break; - // - case -92: - pNameString[i] = 228; - j++; - break; - // - case -124: - pNameString[i] = 196; - j++; - break; - // - case -74: - pNameString[i] = 246; - j++; - break; - // - case -106: - pNameString[i] = 214; - j++; - break; - // - case -97: - pNameString[i] = 223; - j++; - break; - } - } - #endif - - #ifdef POLISH - switch( pNameString[ i ] ) - { - case 260: pNameString[ i ] = 165; break; - case 262: pNameString[ i ] = 198; break; - case 280: pNameString[ i ] = 202; break; - case 321: pNameString[ i ] = 163; break; - case 323: pNameString[ i ] = 209; break; - case 211: pNameString[ i ] = 211; break; - - case 346: pNameString[ i ] = 338; break; - case 379: pNameString[ i ] = 175; break; - case 377: pNameString[ i ] = 143; break; - case 261: pNameString[ i ] = 185; break; - case 263: pNameString[ i ] = 230; break; - case 281: pNameString[ i ] = 234; break; - - case 322: pNameString[ i ] = 179; break; - case 324: pNameString[ i ] = 241; break; - case 243: pNameString[ i ] = 243; break; - case 347: pNameString[ i ] = 339; break; - case 380: pNameString[ i ] = 191; break; - case 378: pNameString[ i ] = 376; break; - } - #endif - - #ifdef RUSSIAN - if ((unsigned char)Item[ubIndex].szLongItemName [j] == 208) //d0 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szLongItemName [j + 1] ) - { - //capital letters - case 129: pNameString[ i ] = 197; j++; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - - case 144: pNameString[ i ] = 192; j++; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 145: pNameString[ i ] = 193; j++; break; - case 146: pNameString[ i ] = 194; j++; break; - case 147: pNameString[ i ] = 195; j++; break; - case 148: pNameString[ i ] = 196; j++; break; - case 149: pNameString[ i ] = 197; j++; break; - case 150: pNameString[ i ] = 198; j++; break; - case 151: pNameString[ i ] = 199; j++; break; - case 152: pNameString[ i ] = 200; j++; break; - case 153: pNameString[ i ] = 201; j++; break; - case 154: pNameString[ i ] = 202; j++; break; - case 155: pNameString[ i ] = 203; j++; break; - case 156: pNameString[ i ] = 204; j++; break; - case 157: pNameString[ i ] = 205; j++; break; - case 158: pNameString[ i ] = 206; j++; break; - case 159: pNameString[ i ] = 207; j++; break; - case 160: pNameString[ i ] = 208; j++; break; - case 161: pNameString[ i ] = 209; j++; break; - case 162: pNameString[ i ] = 210; j++; break; - case 163: pNameString[ i ] = 211; j++; break; - case 164: pNameString[ i ] = 212; j++; break; - case 165: pNameString[ i ] = 213; j++; break; - case 166: pNameString[ i ] = 214; j++; break; - case 167: pNameString[ i ] = 215; j++; break; - case 168: pNameString[ i ] = 216; j++; break; - case 169: pNameString[ i ] = 217; j++; break; - case 170: pNameString[ i ] = 218; j++; break; - case 171: pNameString[ i ] = 219; j++; break; - case 172: pNameString[ i ] = 220; j++; break; - case 173: pNameString[ i ] = 221; j++; break; - case 174: pNameString[ i ] = 222; j++; break; - case 175: pNameString[ i ] = 223; j++; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 176: pNameString[ i ] = 224; j++; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 177: pNameString[ i ] = 225; j++; break; - case 178: pNameString[ i ] = 226; j++; break; - case 179: pNameString[ i ] = 227; j++; break; - case 180: pNameString[ i ] = 228; j++; break; - case 181: pNameString[ i ] = 229; j++; break; - case 182: pNameString[ i ] = 230; j++; break; - case 183: pNameString[ i ] = 231; j++; break; - case 184: pNameString[ i ] = 232; j++; break; - case 185: pNameString[ i ] = 233; j++; break; - case 186: pNameString[ i ] = 234; j++; break; - case 187: pNameString[ i ] = 235; j++; break; - case 188: pNameString[ i ] = 236; j++; break; - case 189: pNameString[ i ] = 237; j++; break; - case 190: pNameString[ i ] = 238; j++; break; - case 191: pNameString[ i ] = 239; j++; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - } - } - - if ( ((unsigned char)Item[ubIndex].szLongItemName [j] == 209) ) //d1 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szLongItemName [j + 1] ) - { - case 128: pNameString[ i ] = 240; j++; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 129: pNameString[ i ] = 241; j++; break; - case 130: pNameString[ i ] = 242; j++; break; - case 131: pNameString[ i ] = 243; j++; break; - case 132: pNameString[ i ] = 244; j++; break; - case 133: pNameString[ i ] = 245; j++; break; - case 134: pNameString[ i ] = 246; j++; break; - case 135: pNameString[ i ] = 247; j++; break; - case 136: pNameString[ i ] = 248; j++; break; - case 137: pNameString[ i ] = 249; j++; break; - case 138: pNameString[ i ] = 250; j++; break; - case 139: pNameString[ i ] = 251; j++; break; - case 140: pNameString[ i ] = 252; j++; break; - case 141: pNameString[ i ] = 253; j++; break; - case 142: pNameString[ i ] = 254; j++; break; - case 143: pNameString[ i ] = 255; j++; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - case 145: pNameString[ i ] = 229; j++; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - } - } - #endif - - } - else - { - pNameString[i] ='\0'; - } - } -#else wcsncpy( pNameString, Item[ubIndex].szLongItemName, 80); pNameString[79] ='\0'; -#endif } if(pInfoString != NULL) { -#if 0 - j = -1; - for (int i=0;i<400;i++) - { - j++; - if ( j<(int)strlen(Item[ubIndex].szItemDesc )) - { - pInfoString[i] = Item[ubIndex].szItemDesc [j]; - - #ifdef GERMAN - // We have a german special character - if (Item[ubIndex].szItemDesc [j] == -61) - { - // This character determines the special character - switch (Item[ubIndex].szItemDesc [j + 1]) - { - // - case -68: - pInfoString[i] = 252; - // Skip next character, because "umlaute" have 2 chars - j++; - break; - // - case -100: - pInfoString[i] = 220; - j++; - break; - // - case -92: - pInfoString[i] = 228; - j++; - break; - // - case -124: - pInfoString[i] = 196; - j++; - break; - // - case -74: - pInfoString[i] = 246; - j++; - break; - // - case -106: - pInfoString[i] = 214; - j++; - break; - // - case -97: - pInfoString[i] = 223; - j++; - break; - } - } - #endif - - #ifdef POLISH - switch( pNameString[ i ] ) - { - case 260: pInfoString[ i ] = 165; break; - case 262: pInfoString[ i ] = 198; break; - case 280: pInfoString[ i ] = 202; break; - case 321: pInfoString[ i ] = 163; break; - case 323: pInfoString[ i ] = 209; break; - case 211: pInfoString[ i ] = 211; break; - - case 346: pInfoString[ i ] = 338; break; - case 379: pInfoString[ i ] = 175; break; - case 377: pInfoString[ i ] = 143; break; - case 261: pInfoString[ i ] = 185; break; - case 263: pInfoString[ i ] = 230; break; - case 281: pInfoString[ i ] = 234; break; - - case 322: pInfoString[ i ] = 179; break; - case 324: pInfoString[ i ] = 241; break; - case 243: pInfoString[ i ] = 243; break; - case 347: pInfoString[ i ] = 339; break; - case 380: pInfoString[ i ] = 191; break; - case 378: pInfoString[ i ] = 376; break; - } - #endif - - - #ifdef RUSSIAN - if ((unsigned char)Item[ubIndex].szItemDesc [j] == 208) //d0 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szItemDesc [j + 1] ) - { - //capital letters - case 129: pInfoString[ i ] = 197; j++; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - - case 144: pInfoString[ i ] = 192; j++; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 145: pInfoString[ i ] = 193; j++; break; - case 146: pInfoString[ i ] = 194; j++; break; - case 147: pInfoString[ i ] = 195; j++; break; - case 148: pInfoString[ i ] = 196; j++; break; - case 149: pInfoString[ i ] = 197; j++; break; - case 150: pInfoString[ i ] = 198; j++; break; - case 151: pInfoString[ i ] = 199; j++; break; - case 152: pInfoString[ i ] = 200; j++; break; - case 153: pInfoString[ i ] = 201; j++; break; - case 154: pInfoString[ i ] = 202; j++; break; - case 155: pInfoString[ i ] = 203; j++; break; - case 156: pInfoString[ i ] = 204; j++; break; - case 157: pInfoString[ i ] = 205; j++; break; - case 158: pInfoString[ i ] = 206; j++; break; - case 159: pInfoString[ i ] = 207; j++; break; - case 160: pInfoString[ i ] = 208; j++; break; - case 161: pInfoString[ i ] = 209; j++; break; - case 162: pInfoString[ i ] = 210; j++; break; - case 163: pInfoString[ i ] = 211; j++; break; - case 164: pInfoString[ i ] = 212; j++; break; - case 165: pInfoString[ i ] = 213; j++; break; - case 166: pInfoString[ i ] = 214; j++; break; - case 167: pInfoString[ i ] = 215; j++; break; - case 168: pInfoString[ i ] = 216; j++; break; - case 169: pInfoString[ i ] = 217; j++; break; - case 170: pInfoString[ i ] = 218; j++; break; - case 171: pInfoString[ i ] = 219; j++; break; - case 172: pInfoString[ i ] = 220; j++; break; - case 173: pInfoString[ i ] = 221; j++; break; - case 174: pInfoString[ i ] = 222; j++; break; - case 175: pInfoString[ i ] = 223; j++; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 176: pInfoString[ i ] = 224; j++; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 177: pInfoString[ i ] = 225; j++; break; - case 178: pInfoString[ i ] = 226; j++; break; - case 179: pInfoString[ i ] = 227; j++; break; - case 180: pInfoString[ i ] = 228; j++; break; - case 181: pInfoString[ i ] = 229; j++; break; - case 182: pInfoString[ i ] = 230; j++; break; - case 183: pInfoString[ i ] = 231; j++; break; - case 184: pInfoString[ i ] = 232; j++; break; - case 185: pInfoString[ i ] = 233; j++; break; - case 186: pInfoString[ i ] = 234; j++; break; - case 187: pInfoString[ i ] = 235; j++; break; - case 188: pInfoString[ i ] = 236; j++; break; - case 189: pInfoString[ i ] = 237; j++; break; - case 190: pInfoString[ i ] = 238; j++; break; - case 191: pInfoString[ i ] = 239; j++; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - } - } - - if ( ((unsigned char)Item[ubIndex].szItemDesc [j] == 209) ) //d1 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szItemDesc [j + 1] ) - { - case 128: pInfoString[ i ] = 240; j++; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 129: pInfoString[ i ] = 241; j++; break; - case 130: pInfoString[ i ] = 242; j++; break; - case 131: pInfoString[ i ] = 243; j++; break; - case 132: pInfoString[ i ] = 244; j++; break; - case 133: pInfoString[ i ] = 245; j++; break; - case 134: pInfoString[ i ] = 246; j++; break; - case 135: pInfoString[ i ] = 247; j++; break; - case 136: pInfoString[ i ] = 248; j++; break; - case 137: pInfoString[ i ] = 249; j++; break; - case 138: pInfoString[ i ] = 250; j++; break; - case 139: pInfoString[ i ] = 251; j++; break; - case 140: pInfoString[ i ] = 252; j++; break; - case 141: pInfoString[ i ] = 253; j++; break; - case 142: pInfoString[ i ] = 254; j++; break; - case 143: pInfoString[ i ] = 255; j++; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - case 145: pInfoString[ i ] = 229; j++; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - } - } - - //if ( ((unsigned char)Item[ubIndex].szItemDesc [j] == 211) ) //d3 - //{ - // // This character determines the special character - // switch ( (unsigned char)Item[ubIndex].szItemDesc [j + 1] ) - // { - // case 162: pInfoString[ i ] = 20; j++; break;//U+04E2 d3a2 CYRILLIC CAPITAL LETTER I WITH MACRON - // case 163: pInfoString[ i ] = 20; j++; break;//U+04E3 d3a3 CYRILLIC SMALL LETTER I WITH MACRON - // } - //} - #endif - } - else - { - pInfoString[i] ='\0'; - } - } -#else wcsncpy( pInfoString, Item[ubIndex].szItemDesc, 400); pInfoString[399] ='\0'; -#endif } return(TRUE); @@ -400,187 +28,8 @@ BOOLEAN LoadBRName(UINT16 ubIndex, STR16 pNameString ) { if (pNameString != NULL) { -#if 0 - int j = -1; - - for (int i=0;i<80;i++) - { - j++; - if ( j<(int)strlen(Item[ubIndex].szBRName)) - { - pNameString[i] = Item[ubIndex].szBRName [j]; - - #ifdef GERMAN - // We have a german special character - if (Item[ubIndex].szBRName [j] == -61) - { - // This character determines the special character - switch (Item[ubIndex].szBRName [j + 1]) - { - // - case -68: - pNameString[i] = 252; - // Skip next character, because "umlaute" have 2 chars - j++; - break; - // - case -100: - pNameString[i] = 220; - j++; - break; - // - case -92: - pNameString[i] = 228; - j++; - break; - // - case -124: - pNameString[i] = 196; - j++; - break; - // - case -74: - pNameString[i] = 246; - j++; - break; - // - case -106: - pNameString[i] = 214; - j++; - break; - // - case -97: - pNameString[i] = 223; - j++; - break; - } - } - #endif - - #ifdef POLISH - switch( pNameString[ i ] ) - { - case 260: pNameString[ i ] = 165; break; - case 262: pNameString[ i ] = 198; break; - case 280: pNameString[ i ] = 202; break; - case 321: pNameString[ i ] = 163; break; - case 323: pNameString[ i ] = 209; break; - case 211: pNameString[ i ] = 211; break; - - case 346: pNameString[ i ] = 338; break; - case 379: pNameString[ i ] = 175; break; - case 377: pNameString[ i ] = 143; break; - case 261: pNameString[ i ] = 185; break; - case 263: pNameString[ i ] = 230; break; - case 281: pNameString[ i ] = 234; break; - - case 322: pNameString[ i ] = 179; break; - case 324: pNameString[ i ] = 241; break; - case 243: pNameString[ i ] = 243; break; - case 347: pNameString[ i ] = 339; break; - case 380: pNameString[ i ] = 191; break; - case 378: pNameString[ i ] = 376; break; - } - #endif - - #ifdef RUSSIAN - if ((unsigned char)Item[ubIndex].szBRName [j] == 208) //d0 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szBRName [j + 1] ) - { - //capital letters - case 129: pNameString[ i ] = 197; j++; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - - case 144: pNameString[ i ] = 192; j++; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 145: pNameString[ i ] = 193; j++; break; - case 146: pNameString[ i ] = 194; j++; break; - case 147: pNameString[ i ] = 195; j++; break; - case 148: pNameString[ i ] = 196; j++; break; - case 149: pNameString[ i ] = 197; j++; break; - case 150: pNameString[ i ] = 198; j++; break; - case 151: pNameString[ i ] = 199; j++; break; - case 152: pNameString[ i ] = 200; j++; break; - case 153: pNameString[ i ] = 201; j++; break; - case 154: pNameString[ i ] = 202; j++; break; - case 155: pNameString[ i ] = 203; j++; break; - case 156: pNameString[ i ] = 204; j++; break; - case 157: pNameString[ i ] = 205; j++; break; - case 158: pNameString[ i ] = 206; j++; break; - case 159: pNameString[ i ] = 207; j++; break; - case 160: pNameString[ i ] = 208; j++; break; - case 161: pNameString[ i ] = 209; j++; break; - case 162: pNameString[ i ] = 210; j++; break; - case 163: pNameString[ i ] = 211; j++; break; - case 164: pNameString[ i ] = 212; j++; break; - case 165: pNameString[ i ] = 213; j++; break; - case 166: pNameString[ i ] = 214; j++; break; - case 167: pNameString[ i ] = 215; j++; break; - case 168: pNameString[ i ] = 216; j++; break; - case 169: pNameString[ i ] = 217; j++; break; - case 170: pNameString[ i ] = 218; j++; break; - case 171: pNameString[ i ] = 219; j++; break; - case 172: pNameString[ i ] = 220; j++; break; - case 173: pNameString[ i ] = 221; j++; break; - case 174: pNameString[ i ] = 222; j++; break; - case 175: pNameString[ i ] = 223; j++; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 176: pNameString[ i ] = 224; j++; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 177: pNameString[ i ] = 225; j++; break; - case 178: pNameString[ i ] = 226; j++; break; - case 179: pNameString[ i ] = 227; j++; break; - case 180: pNameString[ i ] = 228; j++; break; - case 181: pNameString[ i ] = 229; j++; break; - case 182: pNameString[ i ] = 230; j++; break; - case 183: pNameString[ i ] = 231; j++; break; - case 184: pNameString[ i ] = 232; j++; break; - case 185: pNameString[ i ] = 233; j++; break; - case 186: pNameString[ i ] = 234; j++; break; - case 187: pNameString[ i ] = 235; j++; break; - case 188: pNameString[ i ] = 236; j++; break; - case 189: pNameString[ i ] = 237; j++; break; - case 190: pNameString[ i ] = 238; j++; break; - case 191: pNameString[ i ] = 239; j++; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - } - } - - if ( ((unsigned char)Item[ubIndex].szBRName [j] == 209) ) //d1 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szBRName [j + 1] ) - { - case 128: pNameString[ i ] = 240; j++; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 129: pNameString[ i ] = 241; j++; break; - case 130: pNameString[ i ] = 242; j++; break; - case 131: pNameString[ i ] = 243; j++; break; - case 132: pNameString[ i ] = 244; j++; break; - case 133: pNameString[ i ] = 245; j++; break; - case 134: pNameString[ i ] = 246; j++; break; - case 135: pNameString[ i ] = 247; j++; break; - case 136: pNameString[ i ] = 248; j++; break; - case 137: pNameString[ i ] = 249; j++; break; - case 138: pNameString[ i ] = 250; j++; break; - case 139: pNameString[ i ] = 251; j++; break; - case 140: pNameString[ i ] = 252; j++; break; - case 141: pNameString[ i ] = 253; j++; break; - case 142: pNameString[ i ] = 254; j++; break; - case 143: pNameString[ i ] = 255; j++; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - case 145: pNameString[ i ] = 229; j++; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - } - } - #endif - } - else - { - pNameString[i] ='\0'; - } - } -#else wcsncpy( pNameString, Item[ubIndex].szBRName, 80); pNameString[79] ='\0'; -#endif } return TRUE; } @@ -589,188 +38,8 @@ BOOLEAN LoadBRDesc(UINT16 ubIndex, STR16 pDescString ) { if (pDescString != NULL) { -#if 0 - int j = -1; - - for (int i=0;i<400;i++) - { - j++; - if ( j<(int)strlen(Item[ubIndex].szBRDesc)) - { - pDescString[i] = Item[ubIndex].szBRDesc [j]; - - // WANNE: German specific characters - #ifdef GERMAN - // We have a german special character - if (Item[ubIndex].szBRDesc [j] == -61) - { - // This character determines the special character - switch (Item[ubIndex].szBRDesc [j + 1]) - { - // - case -68: - pDescString[i] = 252; - // Skip next character, because "umlaute" have 2 chars - j++; - break; - // - case -100: - pDescString[i] = 220; - j++; - break; - // - case -92: - pDescString[i] = 228; - j++; - break; - // - case -124: - pDescString[i] = 196; - j++; - break; - // - case -74: - pDescString[i] = 246; - j++; - break; - // - case -106: - pDescString[i] = 214; - j++; - break; - // - case -97: - pDescString[i] = 223; - j++; - break; - } - } - #endif - - #ifdef POLISH - switch( pDescString[ i ] ) - { - case 260: pDescString[ i ] = 165; break; - case 262: pDescString[ i ] = 198; break; - case 280: pDescString[ i ] = 202; break; - case 321: pDescString[ i ] = 163; break; - case 323: pDescString[ i ] = 209; break; - case 211: pDescString[ i ] = 211; break; - - case 346: pDescString[ i ] = 338; break; - case 379: pDescString[ i ] = 175; break; - case 377: pDescString[ i ] = 143; break; - case 261: pDescString[ i ] = 185; break; - case 263: pDescString[ i ] = 230; break; - case 281: pDescString[ i ] = 234; break; - - case 322: pDescString[ i ] = 179; break; - case 324: pDescString[ i ] = 241; break; - case 243: pDescString[ i ] = 243; break; - case 347: pDescString[ i ] = 339; break; - case 380: pDescString[ i ] = 191; break; - case 378: pDescString[ i ] = 376; break; - } - #endif - - #ifdef RUSSIAN - if ((unsigned char)Item[ubIndex].szBRDesc [j] == 208) //d0 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szBRDesc [j + 1] ) - { - //capital letters - case 129: pDescString[ i ] = 197; j++; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - - case 144: pDescString[ i ] = 192; j++; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 145: pDescString[ i ] = 193; j++; break; - case 146: pDescString[ i ] = 194; j++; break; - case 147: pDescString[ i ] = 195; j++; break; - case 148: pDescString[ i ] = 196; j++; break; - case 149: pDescString[ i ] = 197; j++; break; - case 150: pDescString[ i ] = 198; j++; break; - case 151: pDescString[ i ] = 199; j++; break; - case 152: pDescString[ i ] = 200; j++; break; - case 153: pDescString[ i ] = 201; j++; break; - case 154: pDescString[ i ] = 202; j++; break; - case 155: pDescString[ i ] = 203; j++; break; - case 156: pDescString[ i ] = 204; j++; break; - case 157: pDescString[ i ] = 205; j++; break; - case 158: pDescString[ i ] = 206; j++; break; - case 159: pDescString[ i ] = 207; j++; break; - case 160: pDescString[ i ] = 208; j++; break; - case 161: pDescString[ i ] = 209; j++; break; - case 162: pDescString[ i ] = 210; j++; break; - case 163: pDescString[ i ] = 211; j++; break; - case 164: pDescString[ i ] = 212; j++; break; - case 165: pDescString[ i ] = 213; j++; break; - case 166: pDescString[ i ] = 214; j++; break; - case 167: pDescString[ i ] = 215; j++; break; - case 168: pDescString[ i ] = 216; j++; break; - case 169: pDescString[ i ] = 217; j++; break; - case 170: pDescString[ i ] = 218; j++; break; - case 171: pDescString[ i ] = 219; j++; break; - case 172: pDescString[ i ] = 220; j++; break; - case 173: pDescString[ i ] = 221; j++; break; - case 174: pDescString[ i ] = 222; j++; break; - case 175: pDescString[ i ] = 223; j++; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 176: pDescString[ i ] = 224; j++; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 177: pDescString[ i ] = 225; j++; break; - case 178: pDescString[ i ] = 226; j++; break; - case 179: pDescString[ i ] = 227; j++; break; - case 180: pDescString[ i ] = 228; j++; break; - case 181: pDescString[ i ] = 229; j++; break; - case 182: pDescString[ i ] = 230; j++; break; - case 183: pDescString[ i ] = 231; j++; break; - case 184: pDescString[ i ] = 232; j++; break; - case 185: pDescString[ i ] = 233; j++; break; - case 186: pDescString[ i ] = 234; j++; break; - case 187: pDescString[ i ] = 235; j++; break; - case 188: pDescString[ i ] = 236; j++; break; - case 189: pDescString[ i ] = 237; j++; break; - case 190: pDescString[ i ] = 238; j++; break; - case 191: pDescString[ i ] = 239; j++; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - } - } - - if ( ((unsigned char)Item[ubIndex].szBRDesc [j] == 209) ) //d1 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szBRDesc [j + 1] ) - { - case 128: pDescString[ i ] = 240; j++; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 129: pDescString[ i ] = 241; j++; break; - case 130: pDescString[ i ] = 242; j++; break; - case 131: pDescString[ i ] = 243; j++; break; - case 132: pDescString[ i ] = 244; j++; break; - case 133: pDescString[ i ] = 245; j++; break; - case 134: pDescString[ i ] = 246; j++; break; - case 135: pDescString[ i ] = 247; j++; break; - case 136: pDescString[ i ] = 248; j++; break; - case 137: pDescString[ i ] = 249; j++; break; - case 138: pDescString[ i ] = 250; j++; break; - case 139: pDescString[ i ] = 251; j++; break; - case 140: pDescString[ i ] = 252; j++; break; - case 141: pDescString[ i ] = 253; j++; break; - case 142: pDescString[ i ] = 254; j++; break; - case 143: pDescString[ i ] = 255; j++; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - case 145: pDescString[ i ] = 229; j++; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - } - } - #endif - } - else - { - pDescString[i] ='\0'; - } - } -#else wcsncpy( pDescString, Item[ubIndex].szBRDesc, 400); pDescString[399] ='\0'; -#endif } return TRUE; @@ -780,192 +49,8 @@ BOOLEAN LoadShortNameItemInfo(UINT16 ubIndex, STR16 pNameString ) { if(pNameString != NULL) { -#if 0 - int j = -1; - - for (int i=0;i<80;i++) - { - j++; - - if ( i<(int)wcslen(Item[ubIndex].szItemName)) - { - pNameString[i] = Item[ubIndex].szItemName [j]; - - // WANNE: German specific characters - #ifdef GERMAN - // We have a german special character - if (Item[ubIndex].szItemName [j] == -61) - { - // This character determines the special character - switch (Item[ubIndex].szItemName [j + 1]) - { - // - case -68: - pNameString[i] = 252; - // Skip next character, because "umlaute" have 2 chars - j++; - break; - // - case -100: - pNameString[i] = 220; - j++; - break; - // - case -92: - pNameString[i] = 228; - j++; - break; - // - case -124: - pNameString[i] = 196; - j++; - break; - // - case -74: - pNameString[i] = 246; - j++; - break; - // - case -106: - pNameString[i] = 214; - j++; - break; - // - case -97: - pNameString[i] = 223; - j++; - break; - } - } - #endif - - #ifdef POLISH - switch( pNameString[ i ] ) - { - case 260: pNameString[ i ] = 165; break; - case 262: pNameString[ i ] = 198; break; - case 280: pNameString[ i ] = 202; break; - case 321: pNameString[ i ] = 163; break; - case 323: pNameString[ i ] = 209; break; - case 211: pNameString[ i ] = 211; break; - - case 346: pNameString[ i ] = 338; break; - case 379: pNameString[ i ] = 175; break; - case 377: pNameString[ i ] = 143; break; - case 261: pNameString[ i ] = 185; break; - case 263: pNameString[ i ] = 230; break; - case 281: pNameString[ i ] = 234; break; - - case 322: pNameString[ i ] = 179; break; - case 324: pNameString[ i ] = 241; break; - case 243: pNameString[ i ] = 243; break; - case 347: pNameString[ i ] = 339; break; - case 380: pNameString[ i ] = 191; break; - case 378: pNameString[ i ] = 376; break; - } - #endif - - - - #ifdef RUSSIAN - if ((unsigned char)Item[ubIndex].szItemName [j] == 208) //d0 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szItemName [j + 1] ) - { - //capital letters - case 129: pNameString[ i ] = 197; j++; break; //U+0401 d0 81 CYRILLIC CAPITAL LETTER IO - - case 144: pNameString[ i ] = 192; j++; break; //U+0410 A d0 90 CYRILLIC CAPITAL LETTER A - case 145: pNameString[ i ] = 193; j++; break; - case 146: pNameString[ i ] = 194; j++; break; - case 147: pNameString[ i ] = 195; j++; break; - case 148: pNameString[ i ] = 196; j++; break; - case 149: pNameString[ i ] = 197; j++; break; - case 150: pNameString[ i ] = 198; j++; break; - case 151: pNameString[ i ] = 199; j++; break; - case 152: pNameString[ i ] = 200; j++; break; - case 153: pNameString[ i ] = 201; j++; break; - case 154: pNameString[ i ] = 202; j++; break; - case 155: pNameString[ i ] = 203; j++; break; - case 156: pNameString[ i ] = 204; j++; break; - case 157: pNameString[ i ] = 205; j++; break; - case 158: pNameString[ i ] = 206; j++; break; - case 159: pNameString[ i ] = 207; j++; break; - case 160: pNameString[ i ] = 208; j++; break; - case 161: pNameString[ i ] = 209; j++; break; - case 162: pNameString[ i ] = 210; j++; break; - case 163: pNameString[ i ] = 211; j++; break; - case 164: pNameString[ i ] = 212; j++; break; - case 165: pNameString[ i ] = 213; j++; break; - case 166: pNameString[ i ] = 214; j++; break; - case 167: pNameString[ i ] = 215; j++; break; - case 168: pNameString[ i ] = 216; j++; break; - case 169: pNameString[ i ] = 217; j++; break; - case 170: pNameString[ i ] = 218; j++; break; - case 171: pNameString[ i ] = 219; j++; break; - case 172: pNameString[ i ] = 220; j++; break; - case 173: pNameString[ i ] = 221; j++; break; - case 174: pNameString[ i ] = 222; j++; break; - case 175: pNameString[ i ] = 223; j++; break; //U+042F d0 af CYRILLIC CAPITAL LETTER YA - - //small letters - case 176: pNameString[ i ] = 224; j++; break; //U+0430 a d0 b0 CYRILLIC SMALL LETTER A - case 177: pNameString[ i ] = 225; j++; break; - case 178: pNameString[ i ] = 226; j++; break; - case 179: pNameString[ i ] = 227; j++; break; - case 180: pNameString[ i ] = 228; j++; break; - case 181: pNameString[ i ] = 229; j++; break; - case 182: pNameString[ i ] = 230; j++; break; - case 183: pNameString[ i ] = 231; j++; break; - case 184: pNameString[ i ] = 232; j++; break; - case 185: pNameString[ i ] = 233; j++; break; - case 186: pNameString[ i ] = 234; j++; break; - case 187: pNameString[ i ] = 235; j++; break; - case 188: pNameString[ i ] = 236; j++; break; - case 189: pNameString[ i ] = 237; j++; break; - case 190: pNameString[ i ] = 238; j++; break; - case 191: pNameString[ i ] = 239; j++; break; //U+043F d0 bf CYRILLIC SMALL LETTER PE - } - } - - if ( ((unsigned char)Item[ubIndex].szItemName [j] == 209) ) //d1 - { - // This character determines the special character - switch ( (unsigned char)Item[ubIndex].szItemName [j + 1] ) - { - case 128: pNameString[ i ] = 240; j++; break; //U+0440 p d1 80 CYRILLIC SMALL LETTER ER - case 129: pNameString[ i ] = 241; j++; break; - case 130: pNameString[ i ] = 242; j++; break; - case 131: pNameString[ i ] = 243; j++; break; - case 132: pNameString[ i ] = 244; j++; break; - case 133: pNameString[ i ] = 245; j++; break; - case 134: pNameString[ i ] = 246; j++; break; - case 135: pNameString[ i ] = 247; j++; break; - case 136: pNameString[ i ] = 248; j++; break; - case 137: pNameString[ i ] = 249; j++; break; - case 138: pNameString[ i ] = 250; j++; break; - case 139: pNameString[ i ] = 251; j++; break; - case 140: pNameString[ i ] = 252; j++; break; - case 141: pNameString[ i ] = 253; j++; break; - case 142: pNameString[ i ] = 254; j++; break; - case 143: pNameString[ i ] = 255; j++; break; //U+044F d1 8f CYRILLIC SMALL LETTER YA - - case 145: pNameString[ i ] = 229; j++; break; //U+0451 d1 91 CYRILLIC SMALL LETTER IO - } - } - #endif - - } - else - { - pNameString[i] ='\0'; - } - } -#else wcsncpy( pNameString, Item[ubIndex].szItemName, 80 ); pNameString[79] ='\0'; -#endif } return(TRUE); diff --git a/Utils/Text.h b/Utils/Text.h index b5fcd1e9..21037737 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -886,6 +886,8 @@ enum STR_PRISONER_DETECTION_VIP, STR_PRISONER_REFUSE_SURRENDER_LEADER, STR_PRISONER_TURN_VOLUNTEER, + STR_PRISONER_ESCAPE, + STR_PRISONER_NO_ESCAPE, TEXT_NUM_PRISONER_STR }; @@ -1910,6 +1912,8 @@ enum STR_PB_ZOMBIE, STR_PB_BANDIT, STR_PB_BANDIT_KILLCIVS_IN_SECTOR, + STR_PB_TRANSPORT_GROUP, + STR_PB_TRANSPORT_GROUP_EN_ROUTE, TEXT_NUM_STRATEGIC_TEXT }; @@ -2547,6 +2551,7 @@ enum MSG113_RADIO_ACTION_FAILED, MSG113_NOT_ENOUGH_MORTAR_SHELLS, MSG113_NO_SIGNAL_SHELL, + MSG113_NO_DEFAULT_SHELL, MSG113_NO_MORTARS, MSG113_ALREADY_JAMMING, MSG113_ALREADY_LISTENING, @@ -3138,6 +3143,7 @@ extern STR16 szRebelCommandText[]; extern STR16 szRebelCommandHelpText[]; extern STR16 szRebelCommandAdminActionsText[]; extern STR16 szRebelCommandDirectivesText[]; +extern STR16 szRebelCommandAgentMissionsText[]; extern STR16 szRobotText[]; enum { diff --git a/Utils/Timer Control.cpp b/Utils/Timer Control.cpp index 06617cbd..ae6ee36c 100644 --- a/Utils/Timer Control.cpp +++ b/Utils/Timer Control.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "interface control.h" -#else #include #include #include @@ -14,7 +10,6 @@ #include "renderworld.h" #include "interface control.h" #include "keymap.h" -#endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN diff --git a/Utils/Utilities.cpp b/Utils/Utilities.cpp index 8183aca9..a2634b5f 100644 --- a/Utils/Utilities.cpp +++ b/Utils/Utilities.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "types.h" #include #include @@ -14,7 +11,6 @@ #include "overhead types.h" #include "wcheck.h" #include "sys globals.h" -#endif extern BOOLEAN GetCDromDriveLetter( STR8 pString ); @@ -397,115 +393,18 @@ BOOLEAN HandleJA2CDCheck( ) #endif -#ifdef NOCDCHECK return( TRUE ); -#else - BOOLEAN fFailed = FALSE; - CHAR8 zCdLocation[ SGPFILENAME_LEN ]; - CHAR8 zCdFile[ SGPFILENAME_LEN ]; - INT32 cnt; - HWFILE hFile; - - // Check for a file on CD.... - if( GetCDromDriveLetter( zCdLocation ) ) - { - for ( cnt = 0; cnt < 5; cnt++ ) - { - // OK, build filename - sprintf( zCdFile, "%s%s", zCdLocation, gCheckFilenames[ cnt ] ); - - hFile = FileOpen( zCdFile, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE ); - - // Check if it exists... - if ( !hFile ) - { - fFailed = TRUE; - FileClose( hFile ); - break; - } - - // Check min size -//#ifndef GERMAN -// if ( FileGetSize( hFile ) < gCheckFileMinSizes[ cnt ] ) -// { -// fFailed = TRUE; -// FileClose( hFile ); -// break; -// } -//#endif - - FileClose( hFile ); - - } - } - else - { - fFailed = TRUE; - } - - if ( fFailed ) - { - CHAR8 zErrorMessage[256]; - - sprintf( zErrorMessage, "%S", gzLateLocalizedString[ 56 ] ); - // Pop up message boc and get answer.... - if ( MessageBox( NULL, zErrorMessage, "Jagged Alliance 2 v1.13", MB_OK ) == IDOK ) - { - return( FALSE ); - } - } - - return( TRUE ); - -#endif } BOOLEAN HandleJA2CDCheckTwo( ) { -#ifdef NOCDCHECK return( TRUE ); -#else - BOOLEAN fFailed = TRUE; - CHAR8 zCdLocation[ SGPFILENAME_LEN ]; - CHAR8 zCdFile[ SGPFILENAME_LEN ]; - - // Check for a file on CD.... - if( GetCDromDriveLetter( zCdLocation ) ) - { - // OK, build filename - sprintf( zCdFile, "%s%s", zCdLocation, gCheckFilenames[ Random( 2 ) ] ); - - // Check if it exists... - if ( FileExists( zCdFile ) ) - { - fFailed = FALSE; - } - } - - if ( fFailed ) - { - CHAR8 zErrorMessage[256]; - - sprintf( zErrorMessage, "%S", gzLateLocalizedString[ 56 ] ); - // Pop up message boc and get answer.... - if ( MessageBox( NULL, zErrorMessage, "Jagged Alliance 2 v1.13", MB_OK ) == IDOK ) - { - return( FALSE ); - } - } - else - { - return( TRUE ); - } - - return( FALSE ); -#endif } diff --git a/Utils/Utils All.h b/Utils/Utils All.h index fe283b03..dd77c717 100644 --- a/Utils/Utils All.h +++ b/Utils/Utils All.h @@ -63,7 +63,6 @@ #include "Message.h" #include #include "mbstring.h" -#include "Mutex Manager.h" #include "local.h" #include "Map Screen Interface Bottom.h" #include "Soundman.h" diff --git a/Utils/Utils_VS2005.vcproj b/Utils/Utils_VS2005.vcproj deleted file mode 100644 index ec8b66ec..00000000 --- a/Utils/Utils_VS2005.vcproj +++ /dev/null @@ -1,776 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Utils/Utils_VS2008.vcproj b/Utils/Utils_VS2008.vcproj deleted file mode 100644 index e06e8af4..00000000 --- a/Utils/Utils_VS2008.vcproj +++ /dev/null @@ -1,776 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Utils/Utils_VS2010.vcxproj b/Utils/Utils_VS2010.vcxproj deleted file mode 100644 index 25cd06ca..00000000 --- a/Utils/Utils_VS2010.vcxproj +++ /dev/null @@ -1,304 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {082F6E91-D049-4314-BE9D-D9509E853B01} - Win32Proj - Utils - Utils - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Utils/Utils_VS2010.vcxproj.filters b/Utils/Utils_VS2010.vcxproj.filters deleted file mode 100644 index e7e715a3..00000000 --- a/Utils/Utils_VS2010.vcxproj.filters +++ /dev/null @@ -1,333 +0,0 @@ - - - - - {85134125-f317-490e-9a9d-d210267ff98b} - - - {2c5f371b-8372-46d7-8b88-8c1885ddf7ef} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Utils/Utils_VS2013.vcxproj b/Utils/Utils_VS2013.vcxproj deleted file mode 100644 index b6b8f954..00000000 --- a/Utils/Utils_VS2013.vcxproj +++ /dev/null @@ -1,324 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {082F6E91-D049-4314-BE9D-D9509E853B01} - Win32Proj - Utils - Utils - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Utils/Utils_VS2013.vcxproj.filters b/Utils/Utils_VS2013.vcxproj.filters deleted file mode 100644 index e7e715a3..00000000 --- a/Utils/Utils_VS2013.vcxproj.filters +++ /dev/null @@ -1,333 +0,0 @@ - - - - - {85134125-f317-490e-9a9d-d210267ff98b} - - - {2c5f371b-8372-46d7-8b88-8c1885ddf7ef} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Utils/Utils_VS2017.vcxproj b/Utils/Utils_VS2017.vcxproj deleted file mode 100644 index 5abfce81..00000000 --- a/Utils/Utils_VS2017.vcxproj +++ /dev/null @@ -1,325 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {082F6E91-D049-4314-BE9D-D9509E853B01} - Win32Proj - Utils - Utils - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Utils/Utils_VS2019.vcxproj b/Utils/Utils_VS2019.vcxproj deleted file mode 100644 index 837a2c3a..00000000 --- a/Utils/Utils_VS2019.vcxproj +++ /dev/null @@ -1,501 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {082F6E91-D049-4314-BE9D-D9509E853B01} - Win32Proj - Utils - Utils - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/Utils/WordWrap.cpp b/Utils/WordWrap.cpp index cc039b85..3368c2f9 100644 Binary files a/Utils/WordWrap.cpp and b/Utils/WordWrap.cpp differ diff --git a/Utils/XML_Items.cpp b/Utils/XML_Items.cpp index 39b92f3f..c48b2cb2 100644 --- a/Utils/XML_Items.cpp +++ b/Utils/XML_Items.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "overhead types.h" #include "Soldier Control.h" @@ -36,7 +33,6 @@ #include "XML.h" #include "utilities.h" #include "store inventory.h" -#endif // Flugente: in order not to loop over MAXITEMS items if we only have a few thousand, remember the actual number of items in the xml UINT32 gMAXITEMS_READ = 0; @@ -311,7 +307,9 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at strcmp(name, "ProvidesRobotNightVision") == 0 || strcmp(name, "ProvidesRobotLaserBonus") == 0 || strcmp(name, "FoodSystemExclusive") == 0 || - strcmp(name, "DiseaseSystemExclusive") == 0 + strcmp(name, "DiseaseSystemExclusive") == 0 || + strcmp(name, "TransportGroupMinProgress") == 0 || + strcmp(name, "TransportGroupMaxProgress") == 0 ) { pData->curElement = ELEMENT_PROPERTY; @@ -388,9 +386,6 @@ static void XMLCALL itemEndElementHandle(void *userData, const XML_Char *name) { itemParseData * pData = (itemParseData *)userData; -#if 0 - char temp; -#endif if(pData->currentDepth <= pData->maxReadDepth) //we're at the end of an element that we've been reading { @@ -442,136 +437,40 @@ itemEndElementHandle(void *userData, const XML_Char *name) // pData->curItem.szItemName[MAX_CHAR_DATA_LENGTH] = '\0'; //} -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - strcpy(pData->curItem.szItemName,pData->szCharData); - else - { - strncpy(pData->curItem.szItemName,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curItem.szItemName[MAX_CHAR_DATA_LENGTH] = '\0'; - } - - for(int i=0;iszCharData),MAX_CHAR_DATA_LENGTH);i++) - { - temp = pData->szCharData[i]; - pData->curItem.szItemName[i] = temp; - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("itemEndElementHandle: itemname[%d] = %s, temp = %s",i,&pData->curItem.szItemName[i],&temp)); - } -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curItem.szItemName, sizeof(pData->curItem.szItemName)/sizeof(pData->curItem.szItemName[0]) ); pData->curItem.szItemName[sizeof(pData->curItem.szItemName)/sizeof(pData->curItem.szItemName[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "szLongItemName") == 0) { //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"itemEndElementHandle: longitemname"); pData->curElement = ELEMENT; -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - { - strcpy(pData->curItem.szLongItemName,pData->szCharData); - } - else - { - strncpy(pData->curItem.szLongItemName,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curItem.szLongItemName[MAX_CHAR_DATA_LENGTH] = '\0'; - } - - for(int i=0;iszCharData),MAX_CHAR_DATA_LENGTH);i++) - { - temp = pData->szCharData[i]; - pData->curItem.szLongItemName[i] = temp; - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("itemEndElementHandle: longitemname[%d] = %s, temp = %s",i,&pData->curItem.szLongItemName[i],&temp)); - } - //if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - //{ - // strcpy(pData->curItem.szLongItemName,pData->szCharData); - //} - //else - //{ - // strncpy(pData->curItem.szLongItemName,pData->szCharData,MAX_CHAR_DATA_LENGTH); - // pData->curItem.szLongItemName[MAX_CHAR_DATA_LENGTH] = '\0'; - //} -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curItem.szLongItemName, sizeof(pData->curItem.szLongItemName)/sizeof(pData->curItem.szLongItemName[0]) ); pData->curItem.szLongItemName[sizeof(pData->curItem.szLongItemName)/sizeof(pData->curItem.szLongItemName[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "szItemDesc") == 0) { //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"itemEndElementHandle: itemdesc"); pData->curElement = ELEMENT; -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - strcpy(pData->curItem.szItemDesc,pData->szCharData); - else - { - strncpy(pData->curItem.szItemDesc,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curItem.szItemDesc[MAX_CHAR_DATA_LENGTH] = '\0'; - } - - for(int i=0;iszCharData),MAX_CHAR_DATA_LENGTH);i++) - { - temp = pData->szCharData[i]; - pData->curItem.szItemDesc[i] = temp; - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("itemEndElementHandle: itemdesc[%d] = %s, temp = %s",i,&pData->curItem.szItemDesc[i],&temp)); - } -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curItem.szItemDesc, sizeof(pData->curItem.szItemDesc)/sizeof(pData->curItem.szItemDesc[0]) ); pData->curItem.szItemDesc[sizeof(pData->curItem.szItemDesc)/sizeof(pData->curItem.szItemDesc[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "szBRName") == 0) { //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"itemEndElementHandle: brname"); pData->curElement = ELEMENT; -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - strcpy(pData->curItem.szBRName,pData->szCharData); - else - { - strncpy(pData->curItem.szBRName,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curItem.szBRName[MAX_CHAR_DATA_LENGTH] = '\0'; - } - - for(int i=0;iszCharData),MAX_CHAR_DATA_LENGTH);i++) - { - temp = pData->szCharData[i]; - pData->curItem.szBRName[i] = temp; - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("itemEndElementHandle: BRname[%d] = %s, temp = %s",i,&pData->curItem.szBRName[i],&temp)); - } -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curItem.szBRName, sizeof(pData->curItem.szBRName)/sizeof(pData->curItem.szBRName[0]) ); pData->curItem.szBRName[sizeof(pData->curItem.szBRName)/sizeof(pData->curItem.szBRName[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "szBRDesc") == 0) { //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"itemEndElementHandle: brdesc"); pData->curElement = ELEMENT; -#if 0 - if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData)) - strcpy(pData->curItem.szBRDesc,pData->szCharData); - else - { - strncpy(pData->curItem.szBRDesc,pData->szCharData,MAX_CHAR_DATA_LENGTH); - pData->curItem.szBRDesc[MAX_CHAR_DATA_LENGTH] = '\0'; - } - - for(int i=0;iszCharData),MAX_CHAR_DATA_LENGTH);i++) - { - temp = pData->szCharData[i]; - pData->curItem.szBRDesc[i] = temp; - //DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("itemEndElementHandle: BRdesc[%d] = %s, temp = %s",i,&pData->curItem.szBRDesc[i],&temp)); - } -#else MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curItem.szBRDesc, sizeof(pData->curItem.szBRDesc)/sizeof(pData->curItem.szBRDesc[0]) ); pData->curItem.szBRDesc[sizeof(pData->curItem.szBRDesc)/sizeof(pData->curItem.szBRDesc[0]) - 1] = '\0'; -#endif } else if(strcmp(name, "usItemClass") == 0) { @@ -1608,26 +1507,36 @@ itemEndElementHandle(void *userData, const XML_Char *name) } else if (strcmp(name, "ProvidesRobotNightVision") == 0) { - pData->curElement == ELEMENT; + pData->curElement = ELEMENT; pData->curItem.fProvidesRobotNightVision = (BOOLEAN)atol(pData->szCharData); } else if (strcmp(name, "ProvidesRobotLaserBonus") == 0) { - pData->curElement == ELEMENT; + pData->curElement = ELEMENT; pData->curItem.fProvidesRobotLaserBonus = (BOOLEAN)atol(pData->szCharData); } else if (strcmp(name, "FoodSystemExclusive") == 0) { - pData->curElement == ELEMENT; + pData->curElement = ELEMENT; if (atol(pData->szCharData)) pData->curItem.usLimitedToSystem|= FOOD_SYSTEM_FLAG; } else if (strcmp(name, "DiseaseSystemExclusive") == 0) { - pData->curElement == ELEMENT; + pData->curElement = ELEMENT; if (atol(pData->szCharData)) pData->curItem.usLimitedToSystem|= DISEASE_SYSTEM_FLAG; } + else if (strcmp(name, "TransportGroupMinProgress") == 0) + { + pData->curElement = ELEMENT; + pData->curItem.iTransportGroupMinProgress = (INT8)atoi(pData->szCharData); + } + else if (strcmp(name, "TransportGroupMaxProgress") == 0) + { + pData->curElement = ELEMENT; + pData->curItem.iTransportGroupMaxProgress = (INT8)atoi(pData->szCharData); + } --pData->maxReadDepth; } diff --git a/Utils/XML_Language.cpp b/Utils/XML_Language.cpp index dc787c6c..0c79cfc5 100644 --- a/Utils/XML_Language.cpp +++ b/Utils/XML_Language.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" - #include "Editor All.h" - #include "LuaInitNPCs.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -16,7 +11,6 @@ #include "Encrypted File.h" #include "GameSettings.h" #include "Text.h" -#endif #include "XML_Language.h" diff --git a/Utils/XML_SenderNameList.cpp b/Utils/XML_SenderNameList.cpp index f181ca7d..e0bedaee 100644 --- a/Utils/XML_SenderNameList.cpp +++ b/Utils/XML_SenderNameList.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Text.h" -#endif struct { diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 0a730a33..2a943df5 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("CHINESE") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( CHINESE ) #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_ChineseText_public_symbol(void){;} @@ -2480,7 +2476,8 @@ STR16 pAssignmentStrings[] = L"掩埋尸体", //L"Burial", L"管理", //L"Admin", L"探索", //L"Explore" - L"事件" //L"Event" rftr: merc is on a mini event + L"事件", //L"Event", rftr: merc is on a mini event + L"任务", //L"Mission", rftr: rebel command }; @@ -3229,11 +3226,11 @@ STR16 gzMercSkillTextNew[] = // new minor traits L"无线电操作员", // 21 L"告发", // 22 - L"生还者", //L"Survival" + L"向导", //L"Survival" // second names for major skills L"机枪手", // 24 - L"掷弹兵", + L"枪炮专家", //L"Bombardier", L"狙击手", L"游骑兵", L"枪斗术", @@ -3255,7 +3252,7 @@ STR16 gzMercSkillTextNew[] = L"间谍", // 43 L"Placeholder", // for radio operator (minor trait) L"Placeholder", // for snitch (minor trait) - L"生还者", // for survival (minor trait) + L"向导", // for survival (minor trait) L"更多...", // 47 L"情报", //L"Intel", for INTEL L"伪装", //L"Disguise", for DISGUISE @@ -3571,6 +3568,8 @@ STR16 gpStrategicString[] = L"僵尸", //L"Zombie", L"土匪", //L"Bandit", L"土匪杀死了%d名平民,在%s分区。", //注:这里的%d和%s不可以随意放前面或后面,一定要按英文顺序,不然会出错。(%d和%s 在中文中不能反过来。) L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4662,6 +4661,7 @@ STR16 pTransactionText[] = L"微型事件", //L"Mini event", rftr: mini events L"从反抗军司令部转移资金", //L"Funds transferred from rebel command", rftr: rebel command L"资金转移到反抗军司令部", //L"Funds transferred to rebel command", rftr: rebel command + L"支付赏金", //L"Bounty payout", rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6215,7 +6215,7 @@ STR16 zOptionsText[] = STR16 z113FeaturesScreenText[] = { L"1.13 特征功能", //L"1.13 FEATURE TOGGLES", - L"在游戏中更改这些选项将影响您的游戏体验。", //L"Changing these settings during a campaign will affect your experience.", + L"在游戏中更改这些选项将影响您的游戏体验。(更改后必须重新开始新游戏)", //L"Changing these settings during a campaign will affect your experience.", L"将鼠标悬停在功能按钮上以获得更多信息。某些功能需要在JA2_Options.ini(或其他文件)中设置。", //L"Hover over a feature to display more information. Some features may be configurable in JA2_Options.ini (or other specified file).", }; @@ -6264,6 +6264,7 @@ STR16 z113FeaturesToggleText[] = L"天气功能:暴风雪", //L"Weather: Snow", L"随机事件功能", //L"Mini Events", L"反抗军司令部功能", //L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6311,6 +6312,7 @@ STR16 z113FeaturesHelpText[] = L"|天|气|功|能|:|暴|风|雪\n \n覆盖 [Tactical Weather Settings] ALLOW_SNOW\n \n暴风雪降低了能见度。\n \n配置选项:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW\n \n", //L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|随|机|事|件|功|能\n \n覆盖 [Mini Events Settings] MINI_EVENTS_ENABLED\n \n可能发生一些随机互动事件。\n \n配置选项:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \n详细信息请查看MiniEvents.lua。\n \n", //L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|反|抗|军|司|令|部|功|能\n \n覆盖 [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \n允许你升级占领的城镇,控制反抗军在战略层面上运作。\n \n详细的内容设定请查看RebelCommand_Settings.ini。\n \n", //L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6358,6 +6360,7 @@ STR16 z113FeaturesPanelText[] = L"启用暴风雪功能。在暴风雪中,更难被看到,武器退化更快,呼吸也更困难。", //L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"在游戏过程中,可能会弹出简短的事件。您可以从两个选项中选择一个,这可能会产生积极或消极的影响。事件可以影响各种各样的事情,但主要是你的佣兵。", //L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"在完成反抗军食物运送任务后,你可以访问他们的(A.R.C)指挥部网站。在这里你可以设定反抗军的政策,也可以为占领区单独设置地方政策。这将带来丰厚的奖励。作为代价,城镇的民忠会上升得更慢,所以你需要更加努力地让当地人信任你。", //L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6534,7 +6537,7 @@ STR16 zOptionsToggleText[] = L"实时确认", //"Real Time Confirmation", L"显示睡觉/醒来时的提示", //"Display sleep/wake notifications", L"使用公制系统", //"Use Metric System", - L"佣兵移动时高亮显示", //"Merc Lights during Movement", + L"高亮显示佣兵", //"Highlight Mercs", L"锁定佣兵", //"Snap Cursor to Mercs", L"锁定门", //"Snap Cursor to Doors", L"物品闪亮", //"Make Items Glow", @@ -6576,6 +6579,8 @@ STR16 zOptionsToggleText[] = L"反转鼠标滚轮", //L"Invert mouse wheel", L"保持佣兵间距", // when multiple mercs are selected, they will try to keep their relative distances L"显示已知敌人位置", //L"Show enemy location", show locator on last known enemy location + L"准心开始时为最大", // L"Start at maximum aim", + L"替换新的寻路方式", // L"Alternative pathfinding", L"--作弊模式选项--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"强制 Bobby Ray 送货", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6636,8 +6641,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"打开时,使用公制系统,否则使用英制系统。", - //Merc Lighted movement - L"打开时,佣兵移动时会照亮地表,切换虚拟佣兵光照。(|G)\n(关闭这个选项会使游戏的显示速度变快)", + //Highlight Mercs + L"打开时,虚拟灯光会照亮佣兵周围。(|G)", //L"When ON, highlights the mercenary (Not visible to enemies).\nToggle in-game with (|G)", //Smart cursor L"打开时,光标移动到佣兵身上时会高亮显示佣兵。", @@ -6693,8 +6698,10 @@ STR16 zOptionsScreenHelpText[] = L"打开时,会直接显示该区域最后一个敌人的大致位置。", L"打开时,在区域物品栏界面,右键点击装有物品的携行具时可直接显示包含的物品。", L"打开时,反转鼠标滚轮方向。", - L"打开时,当选择多个佣兵,在前进时会保持彼此的间距。|C|t|r|l+|A|l|t+|G \n(按|S|h|i|f|t+点击人物头像可以加入或移出队伍)", //L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", TODO.Translate - L"打开时,会显示已知敌人最后移动的位置。", //L"When ON, shows last known enemy location.", TODO.Translate + L"打开时,当选择多个佣兵,在前进时会保持彼此的间距。|C|t|r|l+|A|l|t+|G \n(按|S|h|i|f|t+点击人物头像可以加入或移出队伍)", //L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", + L"打开时,会显示已知敌人最后移动的位置。", //L"When ON, shows last known enemy location.", + L"打开时,默认瞄准值为最大,而不是无。", //L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"打开时,使用A*寻路算法,而不是原始算法。", //L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"强制 Bobby Ray 出货", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7030,7 +7037,7 @@ STR16 pMessageStrings[] = L"磁盘空间不足。只有%sMB可用空间,《铁血联盟2》需要%sMB。", L"从AIM雇佣了%s。", //"Hired %s from AIM", L"%s抓住了%s。", //"%s has caught %s.", //'Merc name' has caught 'item' -- let SirTech know if name comes after item. - L"%s使用了(拾取)%s。", //L"%s has taken %s。", + L"%s(使用了、拾取了、中了)%s。", //L"%s has taken %s。", L"%s没有医疗技能", //"%s has no medical skill",//'Merc name' has no medical skill. //CDRom errors (such as ejecting CD while attempting to read the CD) @@ -7129,7 +7136,7 @@ STR16 pMessageStrings[] = L"虚拟佣兵光照开启", L"虚拟佣兵光照关闭", L"军队%s活动。", //L"Squad %s active.", - L"%s作弊者%s。", //L"%s smoked %s.", + L"%s抽了只%s。", //L"%s smoked %s.", L"激活作弊?", //L"Activate cheats?", L"关闭作弊?", //L"Deactivate cheats?", }; @@ -7665,6 +7672,7 @@ STR16 New113Message[] = L"无线电操作失败!", L"迫击炮弹不足,无法在分区发动密集轰炸!", L"Items.xml里没有定义信号弹物品!", + L"No High-Explosive shell item found in Items.xml!", L"未发现迫击炮,无法执行密集轰炸!", L"干扰信号成功,不需要重复操作!", L"正在监听周围声音,无需重复操作!", @@ -7828,7 +7836,7 @@ STR16 MissingIMPSkillsDescriptions[] = // Radio Operator L"无线电操作员:你通过使用通讯设备让队伍的战略和战术水平得到了提升。 ± ", //L"Radio Operator: Your usage of communication devices broaden your team's tactical and strategic skills. ± ", // Survival - L"生还者: 大自然是你第二个家。 ± ", //L"Survival: Nature is a second home to you. ± ", + L"向导: 大自然是你第二个家。 ± ", //L"Survival: Nature is a second home to you. ± ", }; STR16 NewInvMessage[] = @@ -8131,7 +8139,7 @@ STR16 gzIMPDisabilityTraitText[]= L"身心健全", L"怕热", L"神经质", - L"幽闭恐慌症", + L"幽闭恐惧症", L"旱鸭子", L"怕虫", L"健忘", @@ -8685,6 +8693,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|医|用|夹|板", //L"|M|e|d|i|c|a|l |S|p|l|i|n|t", L"|阻|燃|弹|药", //L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", L"|燃|烧|弹|药", //L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8728,7 +8737,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \n这个物品会挡住准心,你无法再使\n用准心瞄准。", //L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \n这种弹药可以破坏发光的墙。\n或者其它不同种类的物品。", //L"\n \nThis ammo can destroy light walls\nand various other objects.", L"\n \n如果你脸上带了这个,这就将降低\n传播给其他人的几率。", //L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \n如果保存在物品栏\n降低\n传染给其他人的几率。", //L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \n如果保存在物品栏降低\n传染给其他人的几率。", //L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", L"\n \n拿在手里,就可以抵挡前方的伤害。", //L"\n \nIf equipped in a hand, this will block incoming damage.", L"\n \n你可以使用它拍照。", //L"\n \nYou can take photos with this.", L"\n \n这个物品能让你更有效地掩埋尸体。", //L"\n \nThis item makes you more effective at burying corpses.", @@ -8740,6 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \n一旦应用, 这个物品可以提高对你的手臂\n或者腿部重伤的治疗速率。", //L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", L"\n \n这种弹药可以灭火。", //L"\n \nThis ammo can extinguish fire.", L"\n \n这种弹药会引起燃烧(火灾)。", //L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9196,6 +9206,8 @@ STR16 szPrisonerTextStr[]= L"一个高阶军官%s被发现!", //L"A high-ranking army officer in %s has been revealed!", L"敌方领袖拒绝考虑投降!", //L"The enemy leader refuses to even consider surrender!", L"%d名囚犯自愿加入我军。", //L"%d prisoners volunteered to join our forces.", + L"你的佣兵成功逃脱了敌人的追捕。", //L"Some of your mercs managed to escape the enemy capture!", + L"没有逃跑与投降,只有死战到底!", //L"No possible escape is seen, it's a fight to the death!", }; STR16 szMTATextStr[]= @@ -11864,12 +11876,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = { - L"Arulco反抗军司令部 - 国家总览", //L"Arulco Rebel Command - National Overview", - L"Arulco反抗军司令部 - 地区总览", //L"Arulco Rebel Command - Regional Overview", - L"点击地区总览", //L"Switch to Regional Overview", - L"点击国家总览", //L"Switch to National Overview", + L"国家总览", //L"National Overview", + L"地区总览", //L"Regional Overview", + L"任务总览", //L"Mission Overview", + L"选择区域:", //L"Select View:", + L"地区总览 (2)", //L"Regional (2)", + L"国家总览 (1)", //L"National (1)", + L"任务(3)", //L"Mission (3)", L"物资:", //L"Supplies:", L"后勤物资", //L"Incoming Supplies", + L"情报:", //L"Intel:", L" /天", //L"/day", L"当前项目", //L"Current Directive", L"升级项目($%d)", //L"Improve Directive ($%d)", @@ -11927,18 +11943,69 @@ STR16 szRebelCommandText[] = L"<", //L"<", L">", //L">", L"更改此指令操作将花费$%d并重置。确认支出?", //L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"补给不足!管理操作已禁用。", //L"Insufficient supplies! Admin Actions have been DISABLED.", + L"每过%d小时可获得新任务。", //L"New missions will be available every %d hours.", + L"A.R.C网站上已有新任务可以获取。", //L"New missions are available at the A.R.C. website.", + L"任务准备工作进行中。", //L"Mission preparations in progress.", + L"任务持续时间:%d天", //L"Mission duration: %d days", + L"成功率:%d%s", //L"Chance of success: %d%s", + L"[编辑]", //L"[REDACTED]", + L"姓名:%s", //L"Name: %s", + L"地址:%s", //L"Location: %s", + L"分配任务:%s", //L"Assignment: %s", + L"合同:%d天", //L"Contract: %d days", + L"合同:%d小时", //L"Contract: %d hours", + L"合同:---", //L"Contract: ---", + L"代理奖金:", //L"Agent bonus:", + L"成功率+%d%s (%s)", //L"Chance of success +%d%s (%s)", + L"部署范围+%d (%s)", //L"Deployment range +%d (%s)", + L"ASD收入-%2.0f%s (%s)", //L"ASD Income -%2.0f%s (%s)", + L"偷窃燃料;发送至%s (%s)", //L"Steal fuel; send to %s (%s)", + L"销毁储存单位(%s)", //L"Destroy reserve units (%s)", + L"时间+%2.0f%s (%s)", //L"Time +%2.0f%s (%s)", + L"视野-%2.0f%s (%s)", //L"Vision -%2.0f%s (%s)", + L"装备质量-%d (%s)", //L"Gear quality -%d (%s)", + L"总体统计-%d (%s)", //L"Overall stats -%d (%s)", + L"训练人数上限:%d (%s)", //L"Max trainers: %d (%s)", + L"支付+%2.0f%s (%s)", //L"Payout +%2.0f%s (%s)", + L"支付限额增加到$%d (%s)", //L"Payout limit increased to $%d (%s)", + L"军官奖励(%s)", //L"Bonus for officers (%s)", + L"车辆奖励(%s)", //L"Bonus for vehicles (%s)", + L"持续时间+%d小时(%s)", //L"Duration +%d hours (%s)", + L"特工不在城镇", //L"Agent not in town", + L"城镇忠诚度太低", //L"Town loyalty too low", + L"特工不可用", //L"Agent unavailable", + L"特工合同到期", //L"Agent contract expiring", + L"无法使用反抗军特工", //L"Can't use rebel agent", + L"战斗进行中", //L"Battle in progress", + L"准备任务(%d补给)", //L"Prepare Mission (%d supplies)", + L"查看当前任务结果", //L"View active mission effects", + L"查看可用任务列表", //L"View available mission list", + L"你可以做准备展示的两个任务之一,一旦派遣特工成功,他们将在大约%d小时内不可用,然后再次可用。任务准备完成时,会有弹窗提醒,任务效果将变为有效。", //L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"一名抵抗军特工可以前去准备这个任务,但是使用佣兵的话效果会更好。他们的等级和技能可以带来额外的任务奖励。", //L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"任务准备的花销将根据同时准备或激活的其它任务数量有所增加。", //L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"新的任务将在%d日00:00可用。", //L"New missions will be available on Day %d at 00:00.", + L"激活的任务:", //L"Active missions:", + L"%s - 准备中 - 就绪时间:%d日,%02d:%02d", //L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - 生效 - 过期时间:%d日,%02d:%02d", //L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d补给)]", //L"[%s (%d supplies)]", + L"%s派遣一名反抗军特工去准备这个任务?", //L"%s Send a rebel agent to prepare this mission?", + L"%s派遣%s去准备这个任务?他将会在大致%d小时后返回。", //L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s派遣%s去准备这个任务?她将会在大致%d小时后返回。", //L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"任务\"%s\"生效中。", //L"Mission \"%s\" is now in effect.", + L"任务\"%s\"准备失败。", //L"Preparations for mission \"%s\" failed.", + L"任务\"%s\"已经过期,不再生效。", //L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = { L"|物|资\n \n食物、水、医疗用品、武器以及任何\n反抗军认为有用的物资。反抗军会自动收集。", //L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|后|勤|物|资\n \n反抗军每天都会自动收集物资。当你\n占领更多的城镇时,他们每天能够\n找到的物资补给量将会增加。", //L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|后|勤|物|资\n \n反抗军每天都会自动收集物资。当你\n占领更多的城镇时,他们每天能够\n找到的物资补给量将会增加。\n \n+%d (基础收入)", //L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|当|前|项|目\n \n你可以选择反抗军优先进行的战略目标。\n当你选定好战略目标时,新的项目指令将生效。", //L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|指|挥|部\n \n指挥部一旦部署,就会负责处理\n该区域内的日常事务。包括支持当地人,制造\n反抗宣传,制定地区政策等等。", //L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|忠|诚|度\n \n许多行政命令的有效性取决于\n该地区的忠诚度,提高忠诚度\n能得到最大利益化。", //L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|最|高|忠|诚|度\n \n你需要说服当地人完全信任你。这可以\n通过为他们建立物资供应来实现,表明\n你打算改善他们的生活质量。", //L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|援|助|物|资\n \n将物资送到此处的反抗军手里,并允许\n他们根据需要使用。这将少量增加\n该地区的忠诚度,但是会略微增加制定\n该地区政策的成本。", //L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", - L"该管理行动只会作用到城镇区域。", //L"This Admin Action applies its bonus to town sectors only.", TODO.Translate + L"该管理行动只会作用到城镇区域。", //L"This Admin Action applies its bonus to town sectors only.", L"该管理行动会作用到城镇区域。\n和直接相邻的区域。", //L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"该管理行动会作用到城镇区域。\n1级覆盖周边1个区域。\n2级覆盖周边2个区域。", //L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", L"该管理行动会作用到城镇区域。\n1级覆盖周边2个区域。\n2级覆盖周边3个区域。", //L"This Admin Action applies its bonus to town sectors, up to\ntwo sectors away at Tier 1, and up to three sectors away at Tier 2.", @@ -11966,7 +12033,7 @@ STR16 szRebelCommandAdminActionsText[] = L"民兵武器库", //L"Militia Warehouses", L"在偏远地区建造仓库,让反抗军为民兵储备武器。提供每日民兵资源。", //L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"税务局", //L"Regional Taxes", - L"从当地人那里筹集资金来帮助你。这是一种永久的行为。增加每日收入,但地区忠诚度会逐日下降。", //L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"从当地人那里筹集资金来帮助你。增加每日收入,但地区忠诚度会逐日下降。", //L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"民间援助", //L"Civilian Aid", L"指派一些反抗军直接协助和支持该地区的平民。增加每天志愿者的总数。", //L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"私人佣兵团", //L"Merc Support", @@ -12030,6 +12097,34 @@ STR16 szRebelCommandDirectivesText[] = L"升级此项将会增加每天志愿者人数。", //L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"深入部署", //L"Deep Deployment", + L"协同行动,悄悄地抵进敌军,但是要小心:这可能会让你部署在劣势区域。当进攻敌军部队时,部署区会更大。", //L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"扰乱ASD", //L"Disrupt ASD", + L"破坏Arulco特种部门(ASD)的日常行动。临时阻止ASD部署更多的机械化单位,并且大幅度降低他们的每日收入。", //L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"战略情报", //L"Strategic Intel", + L"侦听敌人,发现敌军的攻击目标。当在战略地图上观察队伍时,敌军优先进攻的目标区域会被标红。", //L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"强化本地商店", //L"Improve Local Shops", + L"为商人们建立横跨国家的渠道,让他们更方便进到好货。商店将会出售更好的物资。", //L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"减缓战略决策", //L"Slow Strategic Decisions", + L"在敌人的高级指挥层中散布迷惑性和误导性消息。使得敌人会花更长时间进行战略层面的决策。", //L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"降低战备程度", //L"Lower Readiness", + L"戏弄敌军士兵,让他们的警惕性下降。在因为佣兵行动进入警戒前,敌军士兵的视距下降。", //L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"破坏装备", //L"Sabotage Equipment", + L"袭扰敌军的补给线,阻止敌军维护他们的装备。敌军士兵将会使用比平时更糟的装备。", //L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"破坏载具", //L"Sabotage Vehicles", + L"破坏敌军的载具维护中心,削弱他们的战斗效能和战备度。遭遇到的敌军载具状态下降。", //L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"输送补给", //L"Send Supplies", + L"临时增加对这个城镇的直接援助。城镇忠诚度会在任务期间被动提升。", //L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"士兵悬赏(Kingpin)", //L"Soldier Bounties (Kingpin)", + L"杀敌以获得资金奖励。和Kingpin谈谈,他感觉可以利用你的存在来削弱女王的权威。奖金会在午夜存入你的账户,每天最多$%d。", //L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"在城镇外任意地区训练民兵", //L"Train Militia Anywhere", + L"野外训练区是可以快速设立和拆毁的。民兵可以在城镇外的非交战区接受训练。", //L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = { L"已经安装在机器人身上的武器不能替换。", //L"The robot's installed weapon cannot be changed.", @@ -12070,4 +12165,4 @@ STR16 ChineseSpecString10 = L"%s [%d%%(%d%%)]\n%s %d%% (%d/%d)\n%s %d%%\ STR16 ChineseSpecString11 = L"%s (%s) [%d%%(%d%%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s"; // added by Flugente STR16 ChineseSpecString12 = L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s\n%s %.2f%%"; // added by Flugente -#endif //CHINESE \ No newline at end of file +#endif //CHINESE diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index f842d661..00abf9fc 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("DUTCH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( DUTCH ) #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_DutchText_public_symbol(void){;} @@ -2479,7 +2475,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; @@ -3571,6 +3568,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4665,6 +4664,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6267,6 +6267,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6314,6 +6315,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6361,6 +6363,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6536,7 +6539,7 @@ STR16 zOptionsToggleText[] = L"Bevestiging Real-Time", L"Slaap/wakker-berichten", L"Metrieke Stelsel", - L"Huurling Oplichten", + L"Licht Huurlingen Op", L"Auto-Cursor naar Huurling", L"Auto-Cursor naar Deuren", L"Items Oplichten", @@ -6578,6 +6581,8 @@ STR16 zOptionsToggleText[] = L"Invert mouse wheel", // TODO.Translate L"Formation Movement", // when multiple mercs are selected, they will try to keep their relative distances // TODO.Translate L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6638,8 +6643,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Wanneer INGESCHAKELD wordt het metrieke stelsel gebruikt, anders het Imperiale stelsel.", - //Merc Lighted movement - L"Wanneer INGESCHAKELD, de huurling verlicht de grond tijdens het lopen. Schakel UIT voor sneller spelen.\nToggle artificial merc light. (|G)", // TODO.Translate + //Highlight Mercs + L"Wanneer INGESCHAKELD, wordt de huurling gemarkeerd (niet zichtbaar voor vijanden).\nSchakel in het spel met (|G)", //Smart cursor L"Wanneer INGESCHAKELD zullen huurlingen dichtbij de cursor automatisch oplichten.", @@ -6697,6 +6702,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, inverts mouse wheel directions.", // TODO.Translate L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", //TODO.Translate L"When ON, shows last known enemy location.", //TODO.Translate + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7671,6 +7678,7 @@ STR16 New113Message[] = L"Radio action failed!", L"Not enough mortar shells in sector to start a barrage!", L"No signal shell item found in Items.xml!", + L"No High-Explosive shell item found in Items.xml!", L"No mortars found, cannot commence barrage!", L"Already jamming signal, no need to do so again!", L"Already listening for nearby sounds, no need to do so again!", @@ -8695,6 +8703,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8738,7 +8747,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", @@ -8750,6 +8759,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9207,6 +9217,8 @@ STR16 szPrisonerTextStr[]= L"A high-ranking army officer in %s has been revealed!", // TODO.Translate L"The enemy leader refuses to even consider surrender!", L"%d prisoners volunteered to join our forces.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= // TODO.Translate @@ -11874,12 +11886,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11937,17 +11953,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11976,7 +12043,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12040,6 +12107,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 9f37ce44..5f4b9f5e 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("ENGLISH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( ENGLISH ) #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_EnglishText_public_symbol(void); @@ -2480,7 +2476,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", L"Explore", - L"Event"// rftr: merc is on a mini event + L"Event", // rftr: merc is on a mini event + L"Mission", // rftr: rebel command }; @@ -3571,6 +3568,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4662,6 +4661,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6264,6 +6264,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6311,6 +6312,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6358,6 +6360,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6534,7 +6537,7 @@ STR16 zOptionsToggleText[] = L"Real Time Confirmation", L"Sleep/Wake Notifications", L"Use Metric System", - L"Merc Lights during Movement", + L"Highlight Mercs", L"Snap Cursor to Mercs", L"Snap Cursor to Doors", L"Make Items Glow", @@ -6576,6 +6579,8 @@ STR16 zOptionsToggleText[] = L"Invert Mouse Wheel", L"Formation Movement", // when multiple mercs are selected, they will try to keep their relative distances L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray Shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6636,8 +6641,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"When ON, uses the metric system for measurements; otherwise it uses the Imperial system.", - //Merc Lighted movement - L"When ON, the merc will light the ground while walking. Turn OFF for faster frame rate.\nToggle artificial merc light. (|G)", + //Highlight Mercs + L"When ON, highlights the mercenary (Not visible to enemies).\nToggle in-game with (|G)", //Smart cursor L"When ON, moving the cursor near your mercs will automatically highlight them.", @@ -6695,6 +6700,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, inverts mouse wheel directions.", L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", L"When ON, shows last known enemy location.", + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7665,6 +7672,7 @@ STR16 New113Message[] = L"Radio action failed!", L"Not enough mortar shells in sector to start a barrage!", L"No signal shell item found in Items.xml!", + L"No High-Explosive shell item found in Items.xml!", L"No mortars found, cannot commence barrage!", L"Already jamming signal, no need to do so again!", L"Already listening for nearby sounds, no need to do so again!", @@ -8685,6 +8693,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8728,7 +8737,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", L"\n \nYou can take photos with this.", L"\n \nThis item makes you more effective at burying corpses.", @@ -8740,6 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", L"\n \nThis ammo can extinguish fire.", // 49 L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9196,6 +9206,8 @@ STR16 szPrisonerTextStr[]= L"A high-ranking army officer in %s has been revealed!", L"The enemy leader refuses to even consider surrender!", L"%d prisoners volunteered to join our forces.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= @@ -11864,12 +11876,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11927,17 +11943,68 @@ STR16 szRebelCommandText[] = L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11966,7 +12033,7 @@ STR16 szRebelCommandAdminActionsText[] = L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12030,6 +12097,34 @@ STR16 szRebelCommandDirectivesText[] = L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index b645769e..f97f68de 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("FRENCH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #ifdef FRENCH #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_FrenchText_public_symbol(void){;} @@ -1782,7 +1778,7 @@ STR16 pShowHighGroundText[] = }; //Item Statistics.cpp -CHAR16 gszActionItemDesc[ 34 ][ 30 ] = // NUM_ACTIONITEMS = 34 +/*CHAR16 gszActionItemDesc[34][30] = // NUM_ACTIONITEMS = 34 { L"Mine klaxon", L"Mine Flash", @@ -1819,9 +1815,9 @@ CHAR16 gszActionItemDesc[ 34 ][ 30 ] = // NUM_ACTIONITEMS = 34 L"Alarme chtsvg", L"Grd lacrymo", }; +*/ + -//Item Statistics.cpp -/* STR16 pUpdateItemStatsPanelText[] = { L"Drapeaux M./A.", //0 @@ -1853,7 +1849,7 @@ STR16 pUpdateItemStatsPanelText[] = L"R", L"S", }; -*/ + STR16 pSetupGameTypeFlagsText[] = { @@ -2488,7 +2484,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; @@ -3579,6 +3576,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4669,6 +4668,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6272,6 +6272,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6319,6 +6320,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6366,6 +6368,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6541,7 +6544,7 @@ STR16 zOptionsToggleText[] = L"Confirmation temps réel", L"Notifications sommeil/réveil", L"Système métrique", - L"Mouvemts mercenaires éclairés", + L"Mettez en surbrillance les mercenaires", L"Figer curseur sur mercenaires", L"Figer curseur sur les portes", L"Objets en surbrillance", @@ -6583,6 +6586,8 @@ STR16 zOptionsToggleText[] = L"Inverser molette/souris", L"Déplacement tactique", // when multiple mercs are selected, they will try to keep their relative distances L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Options mode triche--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Forcer envois Bobby Ray", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6643,8 +6648,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Activez cette option pour que le jeu utilise le système métrique.", - //Merc Lighted movement - L"Activez cette option pour éclairer les environs des mercenaires.Désactivez-la, si votre machine n'est pas suffisamment puissante.\nBasculera éclairage du mercenaire. (|G)", + //Highlight Mercs + L"Lorsqu'il est activé, le mercenaire est mis en surbrillance (invisible pour les ennemis).\nBasculer dans le jeu avec (|G)", //Smart cursor L"Activez cette option pour que le curseur se positionne directement sur un mercenaire quand il est à proximité.", @@ -6701,6 +6706,8 @@ STR16 zOptionsScreenHelpText[] = L"Si activé, inverse le sens de la molette de la souris.", L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", //TODO.Translate L"When ON, shows last known enemy location.", //TODO.Translate + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Forcer tous les envois en attente de Bobby Ray", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7668,6 +7675,7 @@ STR16 New113Message[] = L"L'action radio a échoué !", L"Pas assez d'obus de mortier dans le secteur pour un tir de barrage !", L"Aucun obus éclairant trouvé dans Items.xml !", + L"No High-Explosive shell item found in Items.xml!", L"Aucun mortier trouvé, tir de barrage impossible !", L"Brouillage radio déjà en cours, inutile d'en lancer un autre !", L"Écoute des sons alentour déjà en cours, inutile d'en lancer une autre !", @@ -8682,6 +8690,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8725,7 +8734,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nCet Objet bloquera votre viseur\nde ce fait vous ne pouvez pas l'utiliser.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", @@ -8737,6 +8746,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9189,6 +9199,8 @@ STR16 szPrisonerTextStr[]= L"A high-ranking army officer in %s has been revealed!", // TODO.Translate L"The enemy leader refuses to even consider surrender!", L"%d prisoners volunteered to join our forces.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= @@ -11856,12 +11868,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11919,17 +11935,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11958,7 +12025,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12022,6 +12089,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index fe934da1..0e86f7f6 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("GERMAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #ifdef GERMAN #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_GermanText_public_symbol(void){;} @@ -2519,7 +2515,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; STR16 pMilitiaString[] = @@ -3608,6 +3605,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4667,6 +4666,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6135,6 +6135,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6182,6 +6183,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6229,6 +6231,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6407,7 +6410,7 @@ STR16 zOptionsToggleText[] = L"Bestätigung bei Echtzeit", L"Schlaf-/Wachmeldung anzeigen", L"Metrisches System benutzen", - L"Boden beleuchten", + L"Markieren Sie Söldner", L"Cursor autom. auf Söldner", L"Cursor autom. auf Türen", L"Gegenstände leuchten", @@ -6449,6 +6452,8 @@ STR16 zOptionsToggleText[] = L"Mausradrichtung umkehren", L"Bewegung in Formation", // when multiple mercs are selected, they will try to keep their relative distances L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Erzwinge BR Lieferung", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6509,8 +6514,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Mit dieser Option wird im Spiel das metrische anstelle des imperialen Maßsystems verwendet (z.B. Meter und Kilogramm).", - //Merc Lighted movement - L"Diese Funktion beleuchtet für den Spieler die Umgebung des Söldners - auch beim Bewegen. AUSgeschaltet erhöht sich die Bildwiederholrate.\nToggle artificial merc light. (|G)", // TODO.Translate + //Highlight Mercs + L"Wenn AN, wird der Söldner hervorgehoben (für Feinde nicht sichtbar).\nIm Spiel umschalten mit (|G)", //Smart cursor L"Wenn diese Funktion aktiviert ist, springt der Cursor immer automatisch auf Söldner in seiner direkten Nähe.", @@ -6568,6 +6573,8 @@ STR16 zOptionsScreenHelpText[] = L"Wenn diese Funktion aktiviert ist, wird die Mausradrichtung umgekehrt", L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", //TODO.Translate L"When ON, shows last known enemy location.", //TODO.Translate + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7522,6 +7529,7 @@ STR16 New113Message[] = L"Radio action failed!", L"Not enough mortar shells in sector to start a barrage!", L"No signal shell item found in Items.xml!", + L"No High-Explosive shell item found in Items.xml!", L"No mortars found, cannot commence barrage!", L"Already jamming signal, no need to do so again!", L"Already listening for nearby sounds, no need to do so again!", @@ -8538,6 +8546,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8581,7 +8590,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nDieser Gegenstand verhindert die Verwendung von Kimme und Korn.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", @@ -8593,6 +8602,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9049,6 +9059,8 @@ STR16 szPrisonerTextStr[]= L"Ein ranghoher Offizier in %s wurde enttarnt!", L"Der feindliche Anführer denkt nicht mal an Kapitulation!", L"%d Gefangene sind uns als Freiwillige beigetreten.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= @@ -11778,12 +11790,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11841,17 +11857,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11880,7 +11947,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -11944,6 +12011,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 8dd97fc0..272ff9da 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("ITALIAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( ITALIAN ) #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_ItalianText_public_symbol(void){;} @@ -2474,7 +2470,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; @@ -3566,6 +3563,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4659,6 +4658,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6253,6 +6253,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6300,6 +6301,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6347,6 +6349,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6519,7 +6522,7 @@ STR16 zOptionsToggleText[] = L"Conferma in tempo reale", L"Visualizza gli avvertimenti sveglio/addormentato", L"Utilizza il sistema metrico", - L"Tragitto illuminato durante gli spostamenti", + L"Evidenzia Merc", L"Sposta il cursore sui mercenari", L"Sposta il cursore sulle porte", L"Evidenzia gli oggetti", @@ -6561,6 +6564,8 @@ STR16 zOptionsToggleText[] = L"Invert mouse wheel", // TODO.Translate L"Formation Movement", // when multiple mercs are selected, they will try to keep their relative distances // TODO.Translate L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6621,8 +6626,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Se attivata, utilizza il sistema metrico di misurazione; altrimenti ricorre al sistema britannico.", - //Merc Lighted movement - L"Se attivata, il mercenario mostrerà il terreno su cui cammina. Disattivatela per un aggiornamento più veloce.\nToggle artificial merc light. (|G)", // TODO.Translate + //Highlight Mercs + L"Quando attivato, evidenzia il mercenario (non visibile ai nemici).\nAttiva/disattiva nel gioco con (|G)", //Smart cursor L"Se attivata, muovendo il cursore vicino ai vostri mercenari li evidenzierà automaticamente.", @@ -6680,6 +6685,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, inverts mouse wheel directions.", // TODO.Translate L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", //TODO.Translate L"When ON, shows last known enemy location.", //TODO.Translate + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Force all pending Bobby Ray shipments", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7662,6 +7669,7 @@ STR16 New113Message[] = L"Radio action failed!", L"Not enough mortar shells in sector to start a barrage!", L"No signal shell item found in Items.xml!", + L"No High-Explosive shell item found in Items.xml!", L"No mortars found, cannot commence barrage!", L"Already jamming signal, no need to do so again!", L"Already listening for nearby sounds, no need to do so again!", @@ -8685,6 +8693,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8728,7 +8737,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", @@ -8740,6 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9197,6 +9207,8 @@ STR16 szPrisonerTextStr[]= L"A high-ranking army officer in %s has been revealed!", // TODO.Translate L"The enemy leader refuses to even consider surrender!", L"%d prisoners volunteered to join our forces.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= // TODO.Translate @@ -11865,12 +11877,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11928,17 +11944,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11967,7 +12034,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12031,6 +12098,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_Ja25ChineseText.cpp b/Utils/_Ja25ChineseText.cpp index 8c3cf689..1a6feedd 100644 --- a/Utils/_Ja25ChineseText.cpp +++ b/Utils/_Ja25ChineseText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("CHINESE") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Englishtext.h" -#else #include "Language Defines.h" #ifdef CHINESE #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25ChineseText_public_symbol(void){;} @@ -64,7 +59,7 @@ STR16 gzIMPSkillTraitsTextNewMajor[]= L"I.M.P 主要特殊技能",// L"I.M.P. Major Traits", // second names L"机枪手",// L"Machinegunner", - L"掷弹兵",// L"Bombardier", + L"枪炮专家",// L"Bombardier", L"狙击手",// L"Sniper", L"游骑兵",// L"Ranger", L"枪斗术",// L"Gunfighter", @@ -79,7 +74,7 @@ STR16 gzIMPSkillTraitsTextNewMajor[]= STR16 gzIMPSkillTraitsTextNewMinor[]= { L"双持",// L"Ambidextrous", - L"格斗",// L"Melee", + L"近战",// L"Melee", L"投掷",// L"Throwing", L"夜战",// L"Night Ops", L"潜行",// L"Stealthy", @@ -89,7 +84,7 @@ STR16 gzIMPSkillTraitsTextNewMinor[]= L"教学",// L"Teaching", L"侦察",// L"Scouting", L"无线电操作员", //L"Radio Operator", - L"生还者", //L"Survival", + L"向导", //L"Survival", L"无",// L"None", L"I.M.P 副技能",// L"I.M.P. Minor Traits", @@ -455,35 +450,35 @@ STR16 gzIMPOldSkillTraitsHelpTexts[]= STR16 gzIMPNewCharacterTraitsHelpTexts[]= { L"优点:无。\n缺点:无。",// L"A: No advantage.\nD: No disadvantage.", - L"优点:身边有多个雇佣兵时表现最佳。\n缺点:孤单一人时士气不会上升。",// L"A: Has better performance when couple of mercs are nearby.\nD: Gains no morale when no other merc is nearby.", + L"优点:身边有多个佣兵时表现最佳。\n缺点:孤单一人时士气不会上升。",// L"A: Has better performance when couple of mercs are nearby.\nD: Gains no morale when no other merc is nearby.", L"优点:独自行动时表现最好。\n缺点:在团队中士气不会上升。",// L"A: Has better performance when no other merc is nearby.\nD: Gains no morale when in a group.", L"优点:士气上升得快,下降得慢。\n缺点:发现地雷和陷阱的几率降低了。",// L"A: His morale sinks a little slower and grows faster than normal.\nD: Has lesser chance to detect traps and mines.", L"优点:更善于训练民兵和跟别人交流。\n缺点:士气不会因为其他队员的行为而上升。",// L"A: Has bonus on training militia and is better at communication with people.\nD: Gains no morale for actions of other mercs.", - L"优点:自我锻炼或学习效率略高。\n缺点:减少对恐惧和火力压制的承受力。",// L"A: Slightly faster learning when assigned on practicing or as a student.\nD: Has lesser suppression and fear resistance.", + L"优点:自我锻炼或学习效率略微提高。\n缺点:减少对恐惧和火力压制的承受力。",// L"A: Slightly faster learning when assigned on practicing or as a student.\nD: Has lesser suppression and fear resistance.", L"优点:减少一切行动的体能消耗(除了医疗、修理、训练民兵和学习某种技能)。\n缺点:智力、领导能力、爆破、修理和医疗技术提高得慢一些。",// L"A: His energy goes down a bit slower except on assignments as doctor, repairman, militia trainer or if learning certain skills.\nD: His wisdom, leadership, explosives, mechanical and medical skills improve slightly slower.", - L"优点:点射/自动模式下命中率,近战杀伤力和消灭敌人所得的时期更高。\n缺点:需要耐心的行为会得到效率惩罚,比如修理、开锁、解除陷阱、医治和训练民兵。",// L"A: Has slightly better chance to hit on burst/autofire and inflicts slightly bigger damage in close combat\n Gains a little more morale for killing.\nD: Has penalty for actions which needs patience like repairing items, picking locks, removing traps, doctoring, training militia.", + L"优点:点射/自动模式下命中率,近战杀伤力和消灭敌人所得的期望更高。\n缺点:需要耐心的行为会得到效率惩罚,比如修理、开锁、解除陷阱、医治和训练民兵。",// L"A: Has slightly better chance to hit on burst/autofire and inflicts slightly bigger damage in close combat\n Gains a little more morale for killing.\nD: Has penalty for actions which needs patience like repairing items, picking locks, removing traps, doctoring, training militia.", L"优点:需要耐心的工作会得到效率奖励,比如修理、撬锁、解除陷阱、医治和训练民兵。\n缺点:略微降低中断率。",// L"A: Has bonus for actions which needs patience like repairing items, picking locks, removing traps, doctoring and training militia.\nD: His interrupts chance is slightly lowered.", - L"优点:增加对火力压制和恐惧的承受力,\n负伤其他雇佣兵阵亡对他的士气影响的也比较小。\n缺点:容易成为敌人的移动靶。",// L"A: Incresed resistance to suppression and fear.\n Morale loss for taking damage and companions deaths is lower for him.\nD: Can be hit easier and enemy penalty for moving target is lesser in his case.", + L"优点:增加对火力压制和恐惧的承受力。\n负伤其他佣兵阵亡对他的士气影响的也比较小。\n缺点:容易成为敌人的移动靶。",// L"A: Incresed resistance to suppression and fear.\n Morale loss for taking damage and companions deaths is lower for him.\nD: Can be hit easier and enemy penalty for moving target is lesser in his case.", L"优点:进行非战斗任务时士气会提升(除了训练民兵)。\n缺点:杀人不增加士气。",// L"A: He gains morale when on non-combat assignments (except training militia).\nD: Gains no morale for killing.", L"优点:攻击有更高的几率能造成受害者属性值降低,和更严重的创伤,同时提高自己的士气。\n缺点:与其他人交流是个问题,脱离战斗后士气也会快速下沉。",// L"A: Has bigger chance for inflicting stat loss and can inflict special painful wounds when able to\n Gains bonus morale for inflicting stat loss.\nD: Has penalty for communication with people and his morale sinks faster if not fighting.", - L"优点:附近有异性雇佣兵时表现更佳。\n缺点:附近所有同性雇佣兵士气提升得慢。",// L"A: Has better performance when there are some mercs of opposite gender nearby.\nD: Morale of other mercs of the same gender grows slower if nearby.", + L"优点:附近有异性佣兵时表现更佳。\n缺点:附近所有同性佣兵士气提升得慢。",// L"A: Has better performance when there are some mercs of opposite gender nearby.\nD: Morale of other mercs of the same gender grows slower if nearby.", L"优点:撤退时士气增加。\n缺点:敌众我寡时,会降低士气。", //L"A: Gains morale when retreating.\nD: Loses morale when encountering numerically superior enemy forces.", }; STR16 gzIMPDisabilitiesHelpTexts[]= { - L"没有其他附加效果。",// L"No effects.", - L"可能会在热带和沙漠地区呼吸困难,降低综合表现。",// L"Has problems with breathing and reduced overall performance if in tropical or desert sectors.", - L"可能会孤单一人在某些情况下感到恐慌。",// L"Can suffer panic attack if left alone in certain situations.", - L"可能会进入地下后降低综合表现。",// L"His overall performance is reduced if underground.", - L"可能会在游泳时轻易的溺水。",// L"If trying to swim he can easily drown.", - L"可能会在看到大虫子后六神无主,也会在热带地区降低综合表现。",// L"A look at large insects can make a big problems\nand being in tropical sectors also reduce his performance a bit.", - L"可能会偶尔忘记手头的任务,也会在战斗中损失行动点。",// L"Sometimes forgets what orders he got and therefore loses some APs if in combat.", - L"可能会偶尔发疯并把手里武器设在自动后乱喷。\n如果武器不能自动射击将会打击自身士气。",// L"He can go psycho and shoot like mad once per a while\nand can lose morale if unable to do that with given weapon.", + L"没有其它附加效果。",// L"No effects.", + L"在热带或沙漠区域,会出现呼吸问题降低综合表现。",// L"Has problems with breathing and reduced overall performance if in tropical or desert sectors.", + L"独自一人时可能会感到恐慌。",// L"Can suffer panic attack if left alone in certain situations.", + L"在封闭空间或地下时会降低综合表现。",// L"His overall performance is reduced if underground.", + L"在游泳时会轻易的溺水。",// L"If trying to swim he can easily drown.", + L"看到大虫子后会六神无主,也会在热带地区降低综合表现。",// L"A look at large insects can make a big problems\nand being in tropical sectors also reduce his performance a bit.", + L"偶尔会忘记手头的任务,也会在战斗中损失些行动点。",// L"Sometimes forgets what orders he got and therefore loses some APs if in combat.", + L"偶尔会发疯并把手里的武器设为自动乱喷。\n如果武器不能自动射击将会打击自身士气。",// L"He can go psycho and shoot like mad once per a while\nand can lose morale if unable to do that with given weapon.", L"大大减少听力范围。", // L"Drastically reduced hearing.", L"减少视力范围。", // L"Reduced sight range.", - L"大大增加的流血速度。", //L"Drastically increased bleeding.", - L"在房顶上会降低战斗力。", //L"Performance suffers while on a rooftop.", + L"大大增加流血速度。", //L"Drastically increased bleeding.", + L"在房顶作战时会降低战斗力。", //L"Performance suffers while on a rooftop.", L"时不时自残。", //L"Occasionally harms self.", }; diff --git a/Utils/_Ja25DutchText.cpp b/Utils/_Ja25DutchText.cpp index 91e54248..4548c46e 100644 --- a/Utils/_Ja25DutchText.cpp +++ b/Utils/_Ja25DutchText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("DUTCH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Dutchtext.h" -#else #include "Language Defines.h" #ifdef DUTCH #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25DutchText_public_symbol(void){;} diff --git a/Utils/_Ja25EnglishText.cpp b/Utils/_Ja25EnglishText.cpp index fac56fb6..63eb232a 100644 --- a/Utils/_Ja25EnglishText.cpp +++ b/Utils/_Ja25EnglishText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("ENGLISH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Englishtext.h" -#else #include "Language Defines.h" #ifdef ENGLISH #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25EnglishText_public_symbol(void); diff --git a/Utils/_Ja25FrenchText.cpp b/Utils/_Ja25FrenchText.cpp index 0707be3b..290158fc 100644 --- a/Utils/_Ja25FrenchText.cpp +++ b/Utils/_Ja25FrenchText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("FRENCH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Frenchtext.h" -#else #include "Language Defines.h" #ifdef FRENCH #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25FrenchText_public_symbol(void){;} diff --git a/Utils/_Ja25GermanText.cpp b/Utils/_Ja25GermanText.cpp index d5a4474c..c1e9666e 100644 --- a/Utils/_Ja25GermanText.cpp +++ b/Utils/_Ja25GermanText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("GERMAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25GermanText.h" -#else #include "Language Defines.h" #ifdef GERMAN #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25GermanText_public_symbol(void){;} diff --git a/Utils/_Ja25ItalianText.cpp b/Utils/_Ja25ItalianText.cpp index 2ab565f1..5bd9c790 100644 --- a/Utils/_Ja25ItalianText.cpp +++ b/Utils/_Ja25ItalianText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("ITALIAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Italiantext.h" -#else #include "Language Defines.h" #ifdef ITALIAN #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25ItalianText_public_symbol(void){;} diff --git a/Utils/_Ja25PolishText.cpp b/Utils/_Ja25PolishText.cpp index 32c8f6a6..506e37c1 100644 --- a/Utils/_Ja25PolishText.cpp +++ b/Utils/_Ja25PolishText.cpp @@ -2,16 +2,11 @@ // WANNE: Yes we need this here exclusivly in Polish version, because we do not have a codepage in the code like for other versions. //#pragma setlocale("POLISH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25Polishtext.h" -#else #include "Language Defines.h" #ifdef POLISH #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25PolishText_public_symbol(void){;} diff --git a/Utils/_Ja25RussianText.cpp b/Utils/_Ja25RussianText.cpp index 4ae1adcb..022b1f59 100644 --- a/Utils/_Ja25RussianText.cpp +++ b/Utils/_Ja25RussianText.cpp @@ -1,16 +1,11 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("RUSSIAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "_Ja25RussianText.h" -#else #include "Language Defines.h" #ifdef RUSSIAN #include "text.h" #include "Fileman.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_Ja25RussianText_public_symbol(void){;} diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index b66a93eb..35548ba1 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -2,9 +2,6 @@ // WANNE: Yes we need this here exclusivly in Polish version, because we do not have a codepage in the code like for other versions. //#pragma setlocale("POLISH") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( POLISH ) #include "text.h" @@ -13,7 +10,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_PolishText_public_symbol(void){;} @@ -2486,7 +2482,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; @@ -3577,6 +3574,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4670,6 +4669,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6268,6 +6268,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6315,6 +6316,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6362,6 +6364,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6537,7 +6540,7 @@ STR16 zOptionsToggleText[] = L"Potwierdzenia Real-Time", L"Najemnik śpi/budzi się", L"Używaj systemu metrycznego", - L"Oświetlenie podczas ruchu", + L"Wyróżnij najemników", L"Przyciągaj kursor do najemników", L"Przyciągaj kursor do drzwi", L"Pulsujące przedmioty", @@ -6580,6 +6583,8 @@ STR16 zOptionsToggleText[] = L"Invert mouse wheel", // TODO.Translate L"Formation Movement", // when multiple mercs are selected, they will try to keep their relative distances // TODO.Translate L"Show enemy location", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6640,8 +6645,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Jeśli WŁĄCZONE, gra będzie używała systemu metrycznego.", - //Merc Lighted movement - L"Jeśli WŁĄCZONE, teren wokół najemnika będzie oświetlony podczas ruchu. Może spowolnić działanie gry.\nToggle artificial merc light. (|G)", // TODO.Translate + //Highlight Mercs + L"Gdy jest włączony, podświetla najemnika (niewidoczny dla wrogów).\nPrzełącz w grze za pomocą (|G)", //Smart cursor L"Jeśli WŁĄCZONE, kursor będzie automatycznie ustawiał się na najemnikach gdy znajdzie się w ich pobliżu.", @@ -6699,6 +6704,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, inverts mouse wheel directions.", // TODO.Translate L"When ON and multiple mercs are selected, they will try to keep their relative distances while moving.\n(press |C|t|r|l+|A|l|t+|G to toggle mode or |S|h|i|f|t + click to move in formation)", //TODO.Translate L"When ON, shows last known enemy location.", //TODO.Translate + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Wymuś wszystkie oczekiwane dostawy od Bobby Ray's.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7671,6 +7678,7 @@ STR16 New113Message[] = L"Radio action failed!", L"Not enough mortar shells in sector to start a barrage!", L"No signal shell item found in Items.xml!", + L"No High-Explosive shell item found in Items.xml!", L"No mortars found, cannot commence barrage!", L"Already jamming signal, no need to do so again!", L"Already listening for nearby sounds, no need to do so again!", @@ -8697,6 +8705,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8740,7 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nThis item will block your iron sights\nso you cannot use them.", L"\n \nThis ammo can destroy light walls\nand various other objects.", // TODO.Translate L"\n \nIf worn on your face, this will lower\nthe chance to be infected by other people.", - L"\n \nIf kept in your inventory, this will\nlower\nthe chance to be infected by other people.", + L"\n \nIf kept in your inventory, this will lower\nthe chance to be infected by other people.", L"\n \nIf equipped in a hand, this will block incoming damage.", // TODO.Translate L"\n \nYou can take photos with this.", // TODO.Translate L"\n \nThis item makes you more effective at burying corpses.", @@ -8752,6 +8761,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9211,6 +9221,8 @@ STR16 szPrisonerTextStr[]= L"A high-ranking army officer in %s has been revealed!", // TODO.Translate L"The enemy leader refuses to even consider surrender!", L"%d prisoners volunteered to join our forces.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= // TODO.Translate @@ -11878,12 +11890,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11941,17 +11957,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11980,7 +12047,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12044,6 +12111,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 92a8e8ab..0345b830 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -1,9 +1,6 @@ // WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build! //#pragma setlocale("RUSSIAN") -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" -#else #include "Language Defines.h" #if defined( RUSSIAN ) #include "text.h" @@ -12,7 +9,6 @@ #include "EditorMercs.h" #include "Item Statistics.h" #endif -#endif //suppress : warning LNK4221: no public symbols found; archive member will be inaccessible void this_is_the_RussianText_public_symbol(void){;} @@ -2480,7 +2476,8 @@ STR16 pAssignmentStrings[] = L"Burial", L"Admin", // TODO.Translate L"Explore", // TODO.Translate - L"Event"// rftr: merc is on a mini event // TODO: translate + L"Event",// rftr: merc is on a mini event // TODO: translate + L"Mission", // rftr: rebel command }; @@ -3571,6 +3568,8 @@ STR16 gpStrategicString[] = L"Zombie", L"Bandit", L"Bandits attack and kill %d civilians in sector %s.", + L"Transport group", + L"Transport group en route", }; STR16 gpGameClockString[] = @@ -4662,6 +4661,7 @@ STR16 pTransactionText[] = L"Mini event", // rftr: mini events // TODO: translate L"Funds transferred from rebel command", // rftr: rebel command L"Funds transferred to rebel command", // rftr: rebel command + L"Bounty payout", // rftr: rebel command soldier bounties }; STR16 pTransactionAlternateText[] = @@ -6260,6 +6260,7 @@ STR16 z113FeaturesToggleText[] = L"Weather: Snow", L"Mini Events", L"Arulco Rebel Command", + L"Strategic Transport Groups", }; STR16 z113FeaturesHelpText[] = @@ -6307,6 +6308,7 @@ STR16 z113FeaturesHelpText[] = L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW", L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.", L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.", + L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", }; STR16 z113FeaturesPanelText[] = @@ -6354,6 +6356,7 @@ STR16 z113FeaturesPanelText[] = L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.", L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.", L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.", + L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.", }; @@ -6530,7 +6533,7 @@ STR16 zOptionsToggleText[] = L"Игра в реальном времени", L"Подтверждение сна/подъема", L"Метрическая система", - L"Движущаяся подсветка бойца", + L"Выделите наемников", L"Курсор на бойцов", L"Курсор на дверь", L"Мерцание вещей", @@ -6572,6 +6575,8 @@ STR16 zOptionsToggleText[] = L"Инвертировать колесо мыши", L"Боевой порядок", // when multiple mercs are selected, they will try to keep their relative distances L"Показывать расположение", // show locator on last known enemy location + L"Start at maximum aim", + L"Alternative pathfinding", L"--Читерские настройки--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER, L"Ускорить доставку Бобби Рэя", // force all pending Bobby Ray shipments L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END @@ -6632,8 +6637,8 @@ STR16 zOptionsScreenHelpText[] = //Use the metric system L"Если включено, то используется метрическая система мер,\nиначе будет британская.", - //Merc Lighted movement - L"При ходьбе карта подсвечивается вокруг бойца.\nОтключите эту настройку для повышения\nпроизводительности системы (|G).", + //Highlight Mercs + L"При включении выделяет наемника (не виден врагам).\nПереключиться в игре с помощью (|G)", //Smart cursor L"Если включено, то перемещение курсора возле наёмника\nавтоматически выбирает его.", @@ -6691,6 +6696,8 @@ STR16 zOptionsScreenHelpText[] = L"Если включено, инвертирует направление\nпрокрутки колеса мыши.", L"Если выбрано несколько наёмников,\nони будут пытаться сохранять взаимное расположение\nи дистанцию при движении\n(нажмите |C|t|r|l+|A|l|t+|G для переключения или |S|h|i|f|t + клик для движения).", L"Если включено, показывает известное расположение противника\n(нажмите |S|h|i|f|t, чтобы показать источник шума).", + L"When ON, aiming at enemy will start at maximum aiming instead of default no aim", + L"When ON, Use A* pathfinding algorithm, instead of original", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER", L"Выберите этот пункт,\nчтобы груз Бобби Рэя прибыл немедленно.", L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END", @@ -7660,6 +7667,7 @@ STR16 New113Message[] = L"Не удалось использовать радиостанцию!", L"Недостаточно миномётных снарядов в секторе для постановки огня!", L"Не обнаружены сигнальные мины в Items.xml!", + L"Не обнаружены осколочно-фугасные мины в Items.xml!", L"Нет миномётов, невозможно организовать артналет!", L"Режим радиопомех уже включен, нет необходимости делать это снова!", L"Режим прослушивания звуков уже включен, нет необходимости делать это снова!", @@ -8680,6 +8688,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]= L"|M|e|d|i|c|a|l |S|p|l|i|n|t", // TODO.Translate L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o", // 49 TODO.Translate L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o", + L"|B|e|l|t| |F|e|d", }; STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= @@ -8735,6 +8744,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]= L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.", // TODO.Translate L"\n \nThis ammo can extinguish fire.", // 49 TODO.Translate L"\n \nThis ammo can cause fire.", + L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.", }; STR16 szUDBAdvStatsTooltipText[]= @@ -9191,6 +9201,8 @@ STR16 szPrisonerTextStr[]= L"В %s был раскрыт высокопоставленный офицер!", L"Вражеский командир отказывается даже подумать о сдаче!", L"%d заключенных добровольно присоединились к нашим силам.", + L"Some of your mercs managed to escape the enemy capture!", + L"No possible escape is seen, it's a fight to the death!" }; STR16 szMTATextStr[]= @@ -11859,12 +11871,16 @@ STR16 gLbeStatsDesc[14] = STR16 szRebelCommandText[] = // TODO.Translate { - L"Arulco Rebel Command - National Overview", - L"Arulco Rebel Command - Regional Overview", - L"Switch to Regional Overview", - L"Switch to National Overview", + L"National Overview", + L"Regional Overview", + L"Mission Overview", + L"Select View:", + L"Regional (2)", + L"National (1)", + L"Mission (3)", L"Supplies:", L"Incoming Supplies", + L"Intel:", L"/day", L"Current Directive", L"Improve Directive ($%d)", @@ -11922,17 +11938,68 @@ STR16 szRebelCommandText[] = // TODO.Translate L"<", L">", L"Changing this Admin Action will cost $%d and reset its tier. Confirm expenditure?", + L"Insufficient supplies! Admin Actions have been DISABLED.", + L"New missions will be available every %d hours.", + L"New missions are available at the A.R.C. website.", + L"Mission preparations in progress.", + L"Mission duration: %d days", + L"Chance of success: %d%s", + L"[REDACTED]", + L"Name: %s", + L"Location: %s", + L"Assignment: %s", + L"Contract: %d days", + L"Contract: %d hours", + L"Contract: ---", + L"Agent bonus:", + L"Chance of success +%d%s (%s)", + L"Deployment range +%d (%s)", + L"ASD Income -%2.0f%s (%s)", + L"Steal fuel; send to %s (%s)", + L"Destroy reserve units (%s)", + L"Time +%2.0f%s (%s)", + L"Vision -%2.0f%s (%s)", + L"Gear quality -%d (%s)", + L"Overall stats -%d (%s)", + L"Max trainers: %d (%s)", + L"Payout +%2.0f%s (%s)", + L"Payout limit increased to $%d (%s)", + L"Bonus for officers (%s)", + L"Bonus for vehicles (%s)", + L"Duration +%d hours (%s)", + L"Agent not in town", + L"Town loyalty too low", + L"Agent unavailable", + L"Agent contract expiring", + L"Can't use rebel agent", + L"Battle in progress", + L"Prepare Mission (%d supplies)", + L"View active mission effects", + L"View available mission list", + L"You are able to prepare one of the two missions presented. Once an agent is dispatched, they will be unavailable for approximately %d hours before becoming available again. A popup will notify you when preparations are complete. If preparations succeed, the mission's effects become active.", + L"A rebel agent can be sent to prepare a mission, but your mercenaries will be far more effective. Their experience level and skills can provide additional bonuses to missions.", + L"The cost of preparing a mission increases based on the number other missions either active or being prepared.", + L"New missions will be available on Day %d at 00:00.", + L"Active missions:", + L"%s - Preparing - Ready on Day %d, %02d:%02d", + L"%s - Active - Expires on Day %d, %02d:%02d", + L"[%s (%d supplies)]", + L"%s Send a rebel agent to prepare this mission?", + L"%s Send %s to prepare this mission? He will return in approximately %d hours.", + L"%s Send %s to prepare this mission? She will return in approximately %d hours.", + L"Mission \"%s\" is now in effect.", + L"Preparations for mission \"%s\" failed.", + L"Mission \"%s\" has expired and is no longer in effect.", }; STR16 szRebelCommandHelpText[] = // TODO.Translate { L"|S|u|p|p|l|i|e|s\n \nFood, water, medical supplies, weapons, and anything else that\nthe rebels might find useful. Supplies are obtained automatically\nby the rebels.", - L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.", + L"|I|n|c|o|m|i|n|g |S|u|p|p|l|i|e|s\n \nEach day, the rebels will gather supplies on their own. As you\ntake over more towns, the amount of supplies they will be\nable to find per day will increase.\n \n+%d (Base income)", L"|C|u|r|r|e|n|t |D|i|r|e|c|t|i|v|e\n \nYou can choose how the rebels will prioritise their strategic\nobjectives. New directives will become available as you make\nprogress.", L"|A|d|m|i|n|i|s|t|r|a|t|i|o|n |T|e|a|m\n \nOnce deployed, an admin team is responsible for handling the\nday-to-day affairs of the region. This includes supporting\nlocals, creating rebel propaganda, establishing regional\npolicies, and more.", L"|L|o|y|a|l|t|y\n \nThe effectiveness of many Administrative Actions depends on\nthe region's loyalty to your cause. It is in your best interest\nto raise loyalty as high as possible.", L"|M|a|x|i|m|u|m |L|o|y|a|l|t|y\n \nYou will need to convince the locals to fully trust you. This\ncan be done by creating a supply line to them, showing that\nyou intend to improve their quality of life.", - L"|G|r|a|n|t |S|u|p|p|l|i|e|s\n \nSend supplies to the admin team here and allow them to use them\nas needed. This will increase the region's loyalty by a small amount\neach time you do this. However, doing this will slightly increase\nthe cost of enacting regional policies.", L"This Admin Action applies its bonus to town sectors only.", //TODO.Translate L"This Admin Action applies its bonus to town sectors, and\nsectors immediately adjacent to them.", L"This Admin Action applies its bonus to town sectors, one\nsector away at Tier 1, and up to two sectors away at Tier 2.", @@ -11961,7 +12028,7 @@ STR16 szRebelCommandAdminActionsText[] = // TODO.Translate L"Militia Warehouses", L"Construct warehouses in remote areas, allowing the rebels to stockpile weapons for the militia. Provides daily militia resources.", L"Regional Taxes", - L"Collect money from the locals to assist your efforts. This is a permanent action. Increases daily income, but regional loyalty falls daily.", + L"Collect money from the locals to assist your efforts. Increases daily income, but regional loyalty falls daily.", L"Civilian Aid", L"Assign some rebels to directly assist and support civilians in the area. Increases daily volunteer pool growth.", L"Merc Support", @@ -12025,6 +12092,34 @@ STR16 szRebelCommandDirectivesText[] = // TODO.Translate L"Improving this directive will increase the number of volunteers gained per day.", }; +STR16 szRebelCommandAgentMissionsText[] = +{ + L"Deep Deployment", + L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.", + L"Disrupt ASD", + L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.", + L"Forge Transport Orders", + L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.", + L"Strategic Intel", + L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.", + L"Improve Local Shops", + L"Set up ways for merchants across the country to acquire better goods more easily. Shopkeepers will have better than usual inventories.", + L"Slow Strategic Decisions", + L"Sow confusion and misdirection at the highest levels of enemy command. The enemy takes longer to make decisions at a strategic level.", + L"Lower Readiness", + L"Trick enemy soldiers into letting their guard down. Enemy soldiers have reduced vision range until they are alerted to your mercs' presence.", + L"Sabotage Equipment", + L"Disrupt enemy supply chains and prevent the enemy from maintaining their gear properly. Enemy soldiers use equipment that is worse than normal.", + L"Sabotage Vehicles", + L"Sabotage vehicle maintenance hubs to reduce their combat effectiveness and readiness. Enemy vehicles encountered have reduced stats.", + L"Send Supplies", + L"Temporarily increase direct support to this town. Town loyalty passively increases for the duration of the mission.", + L"Soldier Bounties (Kingpin)", + L"Get a payout for enemy kills. Negotiate with Kingpin, who feels he can use your presence here to indirectly weaken the Queen's power. Bounties are deposited into your account at midnight and are limited to $%d per day.", + L"Train Militia Anywhere", + L"Create training areas in the wilderness that can be quickly set up and torn down. Militia can be trained in uncontested sectors outside of town.", +}; + STR16 szRobotText[] = // TODO: Translate { L"The robot's installed weapon cannot be changed.", diff --git a/Utils/dsutil.cpp b/Utils/dsutil.cpp index efa89fb7..d4a4ecee 100644 --- a/Utils/dsutil.cpp +++ b/Utils/dsutil.cpp @@ -1,17 +1,10 @@ // THIS MODULE IS TEMPORARY - USED FOR OUR SOUND SYSTEM INTIL IT IS IMPLEMENTED FOR THE SGP // TAKEN FROM MS SAMPLES FOR DirectSound -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include - #include - #include -#else #include "types.h" #include #include #include -#endif #define WIN32_LEAN_AND_MEAN diff --git a/Utils/message.cpp b/Utils/message.cpp index 6616aa07..4c6163c4 100644 --- a/Utils/message.cpp +++ b/Utils/message.cpp @@ -1,7 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Utils All.h" - #include "Game Clock.h" -#else #include "sgp.h" #include "font.h" #include "types.h" @@ -12,9 +8,9 @@ #include "Timer Control.h" #include "render dirty.h" #include "renderworld.h" - #include "Mutex Manager.h" #include "local.h" #include "interface.h" + #include "mapscreen.h" #include "Map Screen Interface Bottom.h" #include "WordWrap.h" #include "Sound Control.h" @@ -25,7 +21,6 @@ #include "Game Clock.h" #include "GameSettings.h" #include "sgp_logger.h" -#endif typedef struct { @@ -806,8 +801,6 @@ void TacticalScreenMsg( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) // Init display array! memset( gpDisplayList, 0, sizeof( gpDisplayList ) ); fFirstTimeInMessageSystem = FALSE; - //if(!(InitializeMutex(SCROLL_MESSAGE_MUTEX,"ScrollMessageMutex" ))) - // return; } @@ -891,7 +884,6 @@ void TacticalScreenMsg( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) // clear up list of wrapped strings ClearWrappedStrings( pStringWrapperHead ); - //LeaveMutex(SCROLL_MESSAGE_MUTEX, __LINE__, __FILE__); return; } @@ -1010,8 +1002,6 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) // Init display array! memset( gpDisplayList, 0, sizeof( gpDisplayList ) ); fFirstTimeInMessageSystem = FALSE; - //if(!(InitializeMutex(SCROLL_MESSAGE_MUTEX,"ScrollMessageMutex" ))) - // return; } @@ -1047,7 +1037,7 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) // HEADROCK HAM 3.6: Allow for longer lines. // Lejardo ARSProject MAP_LINE_WIDTH = (INTERFACE_WIDTH - 330); - if (iResolution == _1280x720) + if (isWidescreenUI()) { MAP_LINE_WIDTH = 685; } @@ -1079,7 +1069,6 @@ void MapScreenMessage( UINT16 usColor, UINT8 ubPriority, STR16 pStringA, ... ) MoveToEndOfMapScreenMessageList( ); - //LeaveMutex(SCROLL_MESSAGE_MUTEX, __LINE__, __FILE__); } @@ -1141,7 +1130,7 @@ void DisplayStringsInMapScreenMessageList( void ) UINT16 usSpacing; UINT16 MessageStartX = (SCREEN_WIDTH - INTERFACE_WIDTH) / 2; UINT16 MessageEndX = MessageStartX + (INTERFACE_WIDTH - 330); - if (iResolution == _1280x720) + if (isWidescreenUI()) { MessageStartX = 0; MessageEndX = 705; diff --git a/XML_DifficultySettings.cpp b/XML_DifficultySettings.cpp index 02a68ab3..bc562064 100644 --- a/XML_DifficultySettings.cpp +++ b/XML_DifficultySettings.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" @@ -8,7 +5,6 @@ #include "Interface.h" #include "Text.h" #include "GameInitOptionsScreen.h" -#endif struct { diff --git a/XML_IntroFiles.cpp b/XML_IntroFiles.cpp index 967d03a9..605bb1aa 100644 --- a/XML_IntroFiles.cpp +++ b/XML_IntroFiles.cpp @@ -1,13 +1,9 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "Interface.h" #include "Intro.h" -#endif struct { diff --git a/XML_Layout_MainMenu.cpp b/XML_Layout_MainMenu.cpp index 8d7d4451..2e80f524 100644 --- a/XML_Layout_MainMenu.cpp +++ b/XML_Layout_MainMenu.cpp @@ -1,12 +1,8 @@ -#ifdef PRECOMPILEDHEADERS - #include "Tactical All.h" -#else #include "sgp.h" #include "Debug Control.h" #include "expat.h" #include "XML.h" #include "mainmenuscreen.h" -#endif struct { diff --git a/aniviewscreen.cpp b/aniviewscreen.cpp index 63ce7309..8f05104d 100644 --- a/aniviewscreen.cpp +++ b/aniviewscreen.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "builddefines.h" #include #include @@ -29,7 +26,6 @@ #include "english.h" #include "Fileman.h" #include "messageboxscreen.h" -#endif //forward declarations of common classes to eliminate includes class OBJECTTYPE; diff --git a/cmake/CopyUserPresetTemplate.cmake b/cmake/CopyUserPresetTemplate.cmake new file mode 100644 index 00000000..484f7ec8 --- /dev/null +++ b/cmake/CopyUserPresetTemplate.cmake @@ -0,0 +1,11 @@ +function(CopyUserPresetTemplate) + if( + NOT DEFINED Languages AND + NOT DEFINED Applications AND + NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakePresets.json" AND + NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakeUserPresets.json" + ) + file(COPY "${CMAKE_SOURCE_DIR}/cmake/presets/CMakeUserPresets.json" DESTINATION "${CMAKE_SOURCE_DIR}") + message(FATAL_ERROR "No existing preset was found, copied a preset template to ${CMAKE_SOURCE_DIR}/CMakeUserPresets.json.") + endif() +endfunction() diff --git a/cmake/ValidateOptions.cmake b/cmake/ValidateOptions.cmake new file mode 100644 index 00000000..3085695d --- /dev/null +++ b/cmake/ValidateOptions.cmake @@ -0,0 +1,15 @@ +function(ValidateOptions ValidOptions ChoiceName Choice RetVal) + if(Choice) + foreach(x IN LISTS Choice) + if(NOT x IN_LIST ValidOptions) + message(FATAL_ERROR "${ChoiceName}=\"${x}\" is not supported. Valid options are: ${ValidOptions}.") + endif() + endforeach() + else() + set(isDefault "by default.") + set(Choice ${ValidOptions}) + endif() + message(STATUS "Configuring ${ChoiceName}=\"${Choice}\" ${isDefault}") + + set(${RetVal} ${Choice} PARENT_SCOPE) +endfunction() diff --git a/cmake/presets/CMakeUserPresets.json b/cmake/presets/CMakeUserPresets.json new file mode 100644 index 00000000..ffbc4788 --- /dev/null +++ b/cmake/presets/CMakeUserPresets.json @@ -0,0 +1,44 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "__userBase", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + // Valid choices: ENGLISH;GERMAN;FRENCH;ITALIAN;POLISH;DUTCH;RUSSIAN;CHINESE. If empty (""), will configure all. + "Languages": "ENGLISH", + // Valid choices: JA2;JA2MAPEDITOR;JA2UB;JA2UBMAPEDITOR. If empty (""), will configure all. + "Applications": "JA2", + // For debugging: enter your desired gamedir. e.g. C:/Games/JA2 + "CMAKE_RUNTIME_OUTPUT_DIRECTORY": "." + }, + "architecture": { + "value": "x86", + "strategy": "external" + } + }, + { + "name": "1dot13 RelWithDebInfo", + "inherits": "__userBase", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, + { + "name": "1dot13 Release", + "inherits": "__userBase", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "1dot13 Debug", + "inherits": "__userBase", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + } + ] +} diff --git a/ext/VFS/build/7z_VS2005.vcproj b/ext/VFS/build/7z_VS2005.vcproj deleted file mode 100644 index 7ab79db1..00000000 --- a/ext/VFS/build/7z_VS2005.vcproj +++ /dev/null @@ -1,657 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/VFS/build/7z_VS2008.vcproj b/ext/VFS/build/7z_VS2008.vcproj deleted file mode 100644 index 986638a4..00000000 --- a/ext/VFS/build/7z_VS2008.vcproj +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/VFS/build/7z_VS2010.vcxproj b/ext/VFS/build/7z_VS2010.vcxproj deleted file mode 100644 index 70b03244..00000000 --- a/ext/VFS/build/7z_VS2010.vcxproj +++ /dev/null @@ -1,274 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - Win32Proj - My7z - 7z - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2010.vcxproj.filters b/ext/VFS/build/7z_VS2010.vcxproj.filters deleted file mode 100644 index 7777b4ec..00000000 --- a/ext/VFS/build/7z_VS2010.vcxproj.filters +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2013.vcxproj b/ext/VFS/build/7z_VS2013.vcxproj deleted file mode 100644 index f80b70e4..00000000 --- a/ext/VFS/build/7z_VS2013.vcxproj +++ /dev/null @@ -1,279 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - Win32Proj - My7z - 7z - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2013.vcxproj.filters b/ext/VFS/build/7z_VS2013.vcxproj.filters deleted file mode 100644 index 7777b4ec..00000000 --- a/ext/VFS/build/7z_VS2013.vcxproj.filters +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2017.vcxproj b/ext/VFS/build/7z_VS2017.vcxproj deleted file mode 100644 index 3939d176..00000000 --- a/ext/VFS/build/7z_VS2017.vcxproj +++ /dev/null @@ -1,280 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - Win32Proj - My7z - 7z - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2019.vcxproj b/ext/VFS/build/7z_VS2019.vcxproj deleted file mode 100644 index 743e48b4..00000000 --- a/ext/VFS/build/7z_VS2019.vcxproj +++ /dev/null @@ -1,447 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - Win32Proj - My7z - 7z - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/7z_VS2019.vcxproj.user b/ext/VFS/build/7z_VS2019.vcxproj.user deleted file mode 100644 index 6e2aec7a..00000000 --- a/ext/VFS/build/7z_VS2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2005.vcproj b/ext/VFS/build/VFS_VS2005.vcproj deleted file mode 100644 index b3239beb..00000000 --- a/ext/VFS/build/VFS_VS2005.vcproj +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/VFS/build/VFS_VS2008.vcproj b/ext/VFS/build/VFS_VS2008.vcproj deleted file mode 100644 index 9332ba92..00000000 --- a/ext/VFS/build/VFS_VS2008.vcproj +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/VFS/build/VFS_VS2010.vcxproj b/ext/VFS/build/VFS_VS2010.vcxproj deleted file mode 100644 index 67d877a9..00000000 --- a/ext/VFS/build/VFS_VS2010.vcxproj +++ /dev/null @@ -1,284 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {463CB476-2798-493F-9CE8-CEAC5ECE5664} - Win32Proj - VFS - VFS - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2010.vcxproj.filters b/ext/VFS/build/VFS_VS2010.vcxproj.filters deleted file mode 100644 index adb659eb..00000000 --- a/ext/VFS/build/VFS_VS2010.vcxproj.filters +++ /dev/null @@ -1,241 +0,0 @@ - - - - - {6c3b13e6-1de1-49b1-a220-9fd9490119ee} - - - {e906ed36-fcb5-449d-9038-bd238d1583f3} - - - {275b4cf2-0a06-4627-b4cc-f5ce7d2d46a7} - - - {4831f68f-56bb-4e7e-8d77-ab21a1a8031f} - - - {93770afd-298c-46b1-95fe-5884cb101700} - - - {db5b3ae9-28da-4e02-a106-662f2cd0b483} - - - {1f6aa1a4-2764-46bf-83d0-de215f92b26a} - - - - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Ext - - - Ext - - - Ext - - - Aspects - - - Aspects - - - Aspects - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core\File - - - Core\File - - - Core\File - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Location - - - Core\Location - - - Core\Location - - - Core - - - Core\File - - - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Ext - - - Ext - - - Ext - - - Aspects - - - Aspects - - - Aspects - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core\Location - - - Core\Location - - - Core\Location - - - Core\Interface - - - Core\File - - - Core\File - - - Core\File - - - Core - - - Core\File - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2013.vcxproj b/ext/VFS/build/VFS_VS2013.vcxproj deleted file mode 100644 index faf0b807..00000000 --- a/ext/VFS/build/VFS_VS2013.vcxproj +++ /dev/null @@ -1,289 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {463CB476-2798-493F-9CE8-CEAC5ECE5664} - Win32Proj - VFS - VFS - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2013.vcxproj.filters b/ext/VFS/build/VFS_VS2013.vcxproj.filters deleted file mode 100644 index adb659eb..00000000 --- a/ext/VFS/build/VFS_VS2013.vcxproj.filters +++ /dev/null @@ -1,241 +0,0 @@ - - - - - {6c3b13e6-1de1-49b1-a220-9fd9490119ee} - - - {e906ed36-fcb5-449d-9038-bd238d1583f3} - - - {275b4cf2-0a06-4627-b4cc-f5ce7d2d46a7} - - - {4831f68f-56bb-4e7e-8d77-ab21a1a8031f} - - - {93770afd-298c-46b1-95fe-5884cb101700} - - - {db5b3ae9-28da-4e02-a106-662f2cd0b483} - - - {1f6aa1a4-2764-46bf-83d0-de215f92b26a} - - - - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Ext - - - Ext - - - Ext - - - Aspects - - - Aspects - - - Aspects - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core\File - - - Core\File - - - Core\File - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Interface - - - Core\Location - - - Core\Location - - - Core\Location - - - Core - - - Core\File - - - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Tools - - - Ext - - - Ext - - - Ext - - - Aspects - - - Aspects - - - Aspects - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core - - - Core\Location - - - Core\Location - - - Core\Location - - - Core\Interface - - - Core\File - - - Core\File - - - Core\File - - - Core - - - Core\File - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2017.vcxproj b/ext/VFS/build/VFS_VS2017.vcxproj deleted file mode 100644 index 04ec5e3e..00000000 --- a/ext/VFS/build/VFS_VS2017.vcxproj +++ /dev/null @@ -1,290 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {463CB476-2798-493F-9CE8-CEAC5ECE5664} - Win32Proj - VFS - VFS - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2019.vcxproj b/ext/VFS/build/VFS_VS2019.vcxproj deleted file mode 100644 index 5a0b7132..00000000 --- a/ext/VFS/build/VFS_VS2019.vcxproj +++ /dev/null @@ -1,462 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {463CB476-2798-493F-9CE8-CEAC5ECE5664} - Win32Proj - VFS - VFS - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - - ..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ..\include;..\ext\7z\src;..\ext\utfcpp\source - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;SZIP_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - MultiThreaded - ..\include;..\ext\7z\src;..\ext\utfcpp\source - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/VFS/build/VFS_VS2019.vcxproj.user b/ext/VFS/build/VFS_VS2019.vcxproj.user deleted file mode 100644 index e4c0d17a..00000000 --- a/ext/VFS/build/VFS_VS2019.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - H:\JA2 Dev - WindowsLocalDebugger - - - H:\JA2 Dev - WindowsLocalDebugger - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2005.vcproj b/ext/export/ja2export_VS2005.vcproj deleted file mode 100644 index 9d1b55e6..00000000 --- a/ext/export/ja2export_VS2005.vcproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/export/ja2export_VS2008.vcproj b/ext/export/ja2export_VS2008.vcproj deleted file mode 100644 index 44d5bcbf..00000000 --- a/ext/export/ja2export_VS2008.vcproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/export/ja2export_VS2010.vcxproj b/ext/export/ja2export_VS2010.vcxproj deleted file mode 100644 index d516fdcf..00000000 --- a/ext/export/ja2export_VS2010.vcxproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - {802552D2-B514-42E5-A169-F1E108527678} - Win32Proj - ja2export - ja2export - - - - Application - true - NotSet - - - Application - false - true - NotSet - - - Application - false - true - NotSet - - - - - - - - - - - - - - - - true - ..\..\bin\VS2010\$(Configuration)\ - ..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2010\$(Configuration)\ - ..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2010\$(Configuration)\ - ..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib;src;src/ja2 - MultiThreadedDebug - - - - - - - Console - true - $(OutDir)$(TargetName)$(TargetExt) - ..\..\lib\VS2010\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - false - true - true - ..\..\lib\VS2010\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - true - true - true - ..\..\lib\VS2010\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2010.vcxproj.filters b/ext/export/ja2export_VS2010.vcxproj.filters deleted file mode 100644 index ccc6fbf9..00000000 --- a/ext/export/ja2export_VS2010.vcxproj.filters +++ /dev/null @@ -1,96 +0,0 @@ - - - - - {c97349a4-a55e-4206-ae81-5705c2f84ea5} - - - {6c1d591a-a1ba-48d9-a218-050f76b94603} - - - {f8947e60-d69b-4862-94fc-2d8750d2f206} - - - {0c1248dc-45f0-4ce5-91ea-f3ac46c3b380} - - - {5a926fd2-7e29-44ff-8025-475e78e86fe7} - - - - - - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - export\jsd - - - export\jsd - - - export\slf - - - export\sti - - - export\sti - - - export\sti - - - export\sti - - - - - - - - ja2 - - - ja2 - - - export\jsd - - - export\jsd - - - export\slf - - - export\sti - - - export\sti - - - export\sti - - - export\sti - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2013.vcxproj b/ext/export/ja2export_VS2013.vcxproj deleted file mode 100644 index bd4e7554..00000000 --- a/ext/export/ja2export_VS2013.vcxproj +++ /dev/null @@ -1,181 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - {802552D2-B514-42E5-A169-F1E108527678} - Win32Proj - ja2export - ja2export - - - - Application - true - NotSet - v120 - - - Application - false - true - NotSet - v120 - - - Application - false - true - NotSet - v120 - - - - - - - - - - - - - - - - true - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib;src;src/ja2 - MultiThreadedDebug - - - - - - - Console - true - $(OutDir)$(TargetName)$(TargetExt) - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - false - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - true - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2013.vcxproj.filters b/ext/export/ja2export_VS2013.vcxproj.filters deleted file mode 100644 index ccc6fbf9..00000000 --- a/ext/export/ja2export_VS2013.vcxproj.filters +++ /dev/null @@ -1,96 +0,0 @@ - - - - - {c97349a4-a55e-4206-ae81-5705c2f84ea5} - - - {6c1d591a-a1ba-48d9-a218-050f76b94603} - - - {f8947e60-d69b-4862-94fc-2d8750d2f206} - - - {0c1248dc-45f0-4ce5-91ea-f3ac46c3b380} - - - {5a926fd2-7e29-44ff-8025-475e78e86fe7} - - - - - - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - ja2 - - - export\jsd - - - export\jsd - - - export\slf - - - export\sti - - - export\sti - - - export\sti - - - export\sti - - - - - - - - ja2 - - - ja2 - - - export\jsd - - - export\jsd - - - export\slf - - - export\sti - - - export\sti - - - export\sti - - - export\sti - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2017.vcxproj b/ext/export/ja2export_VS2017.vcxproj deleted file mode 100644 index f57a2a61..00000000 --- a/ext/export/ja2export_VS2017.vcxproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - {802552D2-B514-42E5-A169-F1E108527678} - Win32Proj - ja2export - ja2export - 10.0.15063.0 - - - - Application - true - NotSet - v141 - - - Application - false - true - NotSet - v141 - - - Application - false - true - NotSet - v141 - - - - - - - - - - - - - - - - true - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib;src;src/ja2 - MultiThreadedDebug - - - - - - - Console - true - $(OutDir)$(TargetName)$(TargetExt) - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - false - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - true - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2019.vcxproj b/ext/export/ja2export_VS2019.vcxproj deleted file mode 100644 index 1a0f76c7..00000000 --- a/ext/export/ja2export_VS2019.vcxproj +++ /dev/null @@ -1,306 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - {802552D2-B514-42E5-A169-F1E108527678} - Win32Proj - ja2export - ja2export - 10.0 - - - - Application - true - NotSet - v142 - - - Application - true - NotSet - v142 - - - Application - false - true - NotSet - v142 - - - Application - false - true - NotSet - v142 - - - Application - false - true - NotSet - v142 - - - Application - false - true - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - true - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - - - false - ..\..\bin\VS2013\$(Configuration)\ - ..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - false - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib;src;src/ja2 - MultiThreadedDebug - - - - - - - Console - true - $(OutDir)$(TargetName)$(TargetExt) - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib;src;src/ja2 - MultiThreadedDebug - - - - - - - Console - true - $(OutDir)$(TargetName)$(TargetExt) - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - false - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - false - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - true - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;%(PreprocessorDefinitions) - ../VFS/include;../libpng;../zlib; src; src/ja2 - MultiThreaded - - - - - - - Console - true - true - true - ..\..\lib\VS2013\$(Configuration) - VFS.lib;libpng.lib;zlib.lib;7z.lib;%(AdditionalDependencies) - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ext/export/ja2export_VS2019.vcxproj.user b/ext/export/ja2export_VS2019.vcxproj.user deleted file mode 100644 index 6e2aec7a..00000000 --- a/ext/export/ja2export_VS2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ext/export/src/CMakeLists.txt b/ext/export/src/CMakeLists.txt new file mode 100644 index 00000000..fb750d05 --- /dev/null +++ b/ext/export/src/CMakeLists.txt @@ -0,0 +1,29 @@ +option(BUILD_JA2EXPORT "Build the Ja2Export tool." OFF) + +if(BUILD_JA2EXPORT) + message(STATUS "Configuring Ja2Export") + + add_executable(Ja2Export + init_vfs.cpp + main.cpp + progress_bar.cpp + ja2/himage.cpp + ja2/XMLWriter.cpp + export/jsd/export_jsd.cpp + export/jsd/structure.cpp + export/slf/export_slf.cpp + export/sti/export_sti.cpp + export/sti/Image.cpp + export/sti/stci_image_utils.cpp + export/sti/STCI_lib.cpp + ) + target_include_directories(Ja2Export PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}" + ) + target_link_libraries(Ja2Export PUBLIC bfVFS libpng) + set_target_properties(Ja2Export PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} + ) +else() + message(STATUS "BUILD_JA2EXPORT set to \"OFF\", not configuring Ja2Export by default") +endif() diff --git a/ext/export/src/main.cpp b/ext/export/src/main.cpp index 7a6902ac..013af721 100644 --- a/ext/export/src/main.cpp +++ b/ext/export/src/main.cpp @@ -81,16 +81,16 @@ int wmain(int argc, wchar_t **argv) param_list.push_back(*argv++); }; - std::auto_ptr cmd_help(new HelpCommand()); + auto cmd_help{ std::make_unique() }; g_command_map[HelpCommand::commandString] = cmd_help.get(); - std::auto_ptr cmd_sti(new ja2xp::CExportSTI()); + auto cmd_sti{ std::make_unique() }; g_command_map[ja2xp::CExportSTI::commandString] = cmd_sti.get(); - std::auto_ptr cmd_slf(new ja2xp::CExportSLF()); + auto cmd_slf{ std::make_unique() }; g_command_map[ja2xp::CExportSLF::commandString] = cmd_slf.get(); - std::auto_ptr cmd_jsd(new ja2xp::CExportJSD()); + auto cmd_jsd{ std::make_unique() }; g_command_map[ja2xp::CExportJSD::commandString] = cmd_jsd.get(); if(!param_list.empty()) diff --git a/ext/libpng/CMakeLists.txt b/ext/libpng/CMakeLists.txt new file mode 100644 index 00000000..7380c1a4 --- /dev/null +++ b/ext/libpng/CMakeLists.txt @@ -0,0 +1,20 @@ +add_library(libpng +"png.c" +"pngerror.c" +"pnggccrd.c" +"pngget.c" +"pngmem.c" +"pngpread.c" +"pngread.c" +"pngrio.c" +"pngrtran.c" +"pngrutil.c" +"pngset.c" +"pngtrans.c" +"pngwio.c" +"pngwrite.c" +"pngwtran.c" +"pngwutil.c" +) +target_include_directories(libpng PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(libpng PUBLIC zlib) diff --git a/ext/libpng/projects/visualc71/libpng_VS2005.vcproj b/ext/libpng/projects/visualc71/libpng_VS2005.vcproj deleted file mode 100644 index 9863166d..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2005.vcproj +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/libpng/projects/visualc71/libpng_VS2008.vcproj b/ext/libpng/projects/visualc71/libpng_VS2008.vcproj deleted file mode 100644 index 3800ee63..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2008.vcproj +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj b/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj deleted file mode 100644 index bc132786..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {735F8DBF-6646-4713-BE36-394F33E69B57} - Win32Proj - libpng - libpng - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - - - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj.filters b/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj.filters deleted file mode 100644 index a84818e8..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2010.vcxproj.filters +++ /dev/null @@ -1,77 +0,0 @@ - - - - - {f974ac0b-3646-4b90-8e5f-51a46256df06} - - - {31a7bc63-311b-4c58-9584-0f94180249db} - - - {f272cbf7-9683-4e0f-bd9b-90ca48d9ed13} - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj b/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj deleted file mode 100644 index c086e091..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {735F8DBF-6646-4713-BE36-394F33E69B57} - Win32Proj - libpng - libpng - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj.filters b/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj.filters deleted file mode 100644 index a84818e8..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2013.vcxproj.filters +++ /dev/null @@ -1,77 +0,0 @@ - - - - - {f974ac0b-3646-4b90-8e5f-51a46256df06} - - - {31a7bc63-311b-4c58-9584-0f94180249db} - - - {f272cbf7-9683-4e0f-bd9b-90ca48d9ed13} - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2017.vcxproj b/ext/libpng/projects/visualc71/libpng_VS2017.vcxproj deleted file mode 100644 index c767aea9..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2017.vcxproj +++ /dev/null @@ -1,240 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {735F8DBF-6646-4713-BE36-394F33E69B57} - Win32Proj - libpng - libpng - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj b/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj deleted file mode 100644 index 5cf66349..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj +++ /dev/null @@ -1,412 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {735F8DBF-6646-4713-BE36-394F33E69B57} - Win32Proj - libpng - libpng - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\..;..\..\..\zlib - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;PNG_NO_MMX_CODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - ..\..;..\..\..\zlib - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj.user b/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj.user deleted file mode 100644 index 6e2aec7a..00000000 --- a/ext/libpng/projects/visualc71/libpng_VS2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2005.vcproj b/ext/libpng/projects/visualc71/zlib_VS2005.vcproj deleted file mode 100644 index e02a1897..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2005.vcproj +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/libpng/projects/visualc71/zlib_VS2008.vcproj b/ext/libpng/projects/visualc71/zlib_VS2008.vcproj deleted file mode 100644 index f3dbc7a8..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2008.vcproj +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj b/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj deleted file mode 100644 index b02d9be0..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {EC27EB68-C428-4B80-8170-D93F988EA34C} - Win32Proj - zlib - zlib - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2010\$(Configuration)\ - ..\..\..\..\build\VS2010\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj.filters b/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj.filters deleted file mode 100644 index fc76e01f..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2010.vcxproj.filters +++ /dev/null @@ -1,106 +0,0 @@ - - - - - {b4b80c3f-19ca-4a99-b246-9d7425950685} - - - {d0147fb0-ff9b-4e8e-94d2-af58b3a7316e} - - - {067a2703-3d08-4172-9b70-3f64cf7f12d2} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj b/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj deleted file mode 100644 index b730da14..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj +++ /dev/null @@ -1,243 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {EC27EB68-C428-4B80-8170-D93F988EA34C} - Win32Proj - zlib - zlib - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj.filters b/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj.filters deleted file mode 100644 index fc76e01f..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2013.vcxproj.filters +++ /dev/null @@ -1,106 +0,0 @@ - - - - - {b4b80c3f-19ca-4a99-b246-9d7425950685} - - - {d0147fb0-ff9b-4e8e-94d2-af58b3a7316e} - - - {067a2703-3d08-4172-9b70-3f64cf7f12d2} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2017.vcxproj b/ext/libpng/projects/visualc71/zlib_VS2017.vcxproj deleted file mode 100644 index 7f4f1b45..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2017.vcxproj +++ /dev/null @@ -1,244 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {EC27EB68-C428-4B80-8170-D93F988EA34C} - Win32Proj - zlib - zlib - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj b/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj deleted file mode 100644 index ac9ce559..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj +++ /dev/null @@ -1,413 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {EC27EB68-C428-4B80-8170-D93F988EA34C} - Win32Proj - zlib - zlib - 10.0 - - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - true - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - StaticLibrary - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - ..\..\..\..\lib\VS2013\$(Configuration)\ - ..\..\..\..\build\VS2013\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\zlib - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj.user b/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj.user deleted file mode 100644 index 6e2aec7a..00000000 --- a/ext/libpng/projects/visualc71/zlib_VS2019.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ext/zlib/CMakeLists.txt b/ext/zlib/CMakeLists.txt new file mode 100644 index 00000000..0a987afc --- /dev/null +++ b/ext/zlib/CMakeLists.txt @@ -0,0 +1,18 @@ +add_library(zlib +"gzread.c" +"gzlib.c" +"gzclose.c" +"crc32.c" +"zutil.c" +"uncompr.c" +"compress.c" +"inffast.c" +"inflate.c" +"adler32.c" +"infback.c" +"deflate.c" +"gzwrite.c" +"inftrees.c" +"trees.c" +) +target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/gameloop.cpp b/gameloop.cpp index ffea043b..d65f7dae 100644 --- a/gameloop.cpp +++ b/gameloop.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "HelpScreen.h" - #include "Prebattle Interface.h" -#else #include #include #include "sgp.h" @@ -32,7 +27,6 @@ #include "World Items.h"//dnl ch77 191113 #include "Overhead.h" // added by Flugente #include "Ambient Control.h" // sevenfm -#endif #include "SaveLoadScreen.h" diff --git a/gamescreen.cpp b/gamescreen.cpp index 3c5be8e6..7f40bc2c 100644 --- a/gamescreen.cpp +++ b/gamescreen.cpp @@ -1,8 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" - #include "HelpScreen.h" - #include "PreBattle Interface.h" -#else #include "builddefines.h" #include #include @@ -84,7 +79,6 @@ #include "editscreen.h" #include "Scheduling.h" #include "Animated ProgressBar.h" -#endif #include "connect.h" diff --git a/ja2.props b/ja2.props deleted file mode 100644 index 5b5bcae6..00000000 --- a/ja2.props +++ /dev/null @@ -1,51 +0,0 @@ - - - - - JA2 - EN - ENGLISH - - - <_PropertySheetDisplayName>ja2 - $(SolutionDir)\build\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - - - - $(JA2Config) - - - $(JA2LangPrefix) - - - $(JA2Language) - - - - - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - JA2;CINTERFACE;XML_STATIC;VFS_STATIC;VFS_WITH_SLF;VFS_WITH_7ZIP;USE_VFS;_CRT_SECURE_NO_DEPRECATE;$(JA2Language);%(PreprocessorDefinitions) - - - - - JA2MAPS;%(PreprocessorDefinitions) - - - - - JA2UB;%(PreprocessorDefinitions) - - - - - JA2UBMAPS;%(PreprocessorDefinitions) - - - - - JA2EDITOR;JA2BETAVERSION;%(PreprocessorDefinitions) - - - \ No newline at end of file diff --git a/ja2.vsprops b/ja2.vsprops deleted file mode 100644 index 4a7c02ca..00000000 --- a/ja2.vsprops +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/ja2_Debug.props b/ja2_Debug.props deleted file mode 100644 index e4e2325a..00000000 --- a/ja2_Debug.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY;%(PreprocessorDefinitions) - - - - \ No newline at end of file diff --git a/ja2_Debug.vsprops b/ja2_Debug.vsprops deleted file mode 100644 index 90a657fa..00000000 --- a/ja2_Debug.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/ja2_Editor.props b/ja2_Editor.props deleted file mode 100644 index b56ac92c..00000000 --- a/ja2_Editor.props +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - <_PropertySheetDisplayName>ja2_Editor - - - - JA2BETAVERSION;JA2EDITOR;%(PreprocessorDefinitions) - - - - \ No newline at end of file diff --git a/ja2_Editor.vsprops b/ja2_Editor.vsprops deleted file mode 100644 index 8de3b034..00000000 --- a/ja2_Editor.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/ja2_Libs.props b/ja2_Libs.props deleted file mode 100644 index b8020cf7..00000000 --- a/ja2_Libs.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - .\.;Standard Gaming Platform - libexpatMT.lib;mss32.lib;SMACKW32.LIB;binkw32.lib;fmodvc.lib;lua51.lib;VtuneApi.lib;ddraw.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/ja2_Libs.vsprops b/ja2_Libs.vsprops deleted file mode 100644 index e5079ff9..00000000 --- a/ja2_Libs.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_LinkerVS2005.vsprops b/ja2_LinkerVS2005.vsprops deleted file mode 100644 index 119111ee..00000000 --- a/ja2_LinkerVS2005.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_LinkerVS2008.vsprops b/ja2_LinkerVS2008.vsprops deleted file mode 100644 index f862c7d6..00000000 --- a/ja2_LinkerVS2008.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_LinkerVS2010.props b/ja2_LinkerVS2010.props deleted file mode 100644 index 5bd2c604..00000000 --- a/ja2_LinkerVS2010.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - <_PropertySheetDisplayName>ja2_LinkerVS2010 - - - - $(SolutionDir)\lib\VS2010\$(JA2Config)_$(JA2LangPrefix)\$(Configuration);$(SolutionDir)\lib\VS2010\$(Configuration);%(AdditionalLibraryDirectories) - Console.lib;Editor.lib;Laptop.lib;lua.lib;SGP.lib;Strategic.lib;Tactical.lib;TacticalAI.lib;ModularizedTacticalAI.lib;TileEngine.lib;Utils.lib;VFS.lib;7z.lib;libpng.lib;zlib.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/ja2_LinkerVS2013.props b/ja2_LinkerVS2013.props deleted file mode 100644 index 9acc6c37..00000000 --- a/ja2_LinkerVS2013.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - <_PropertySheetDisplayName>ja2_LinkerVS2013 - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration);$(SolutionDir)\lib\VS2013\$(Configuration);%(AdditionalLibraryDirectories) - Console.lib;Editor.lib;Laptop.lib;lua.lib;SGP.lib;Strategic.lib;Tactical.lib;TacticalAI.lib;ModularizedTacticalAI.lib;TileEngine.lib;Utils.lib;VFS.lib;7z.lib;libpng.lib;zlib.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/ja2_LinkerVS2017.props b/ja2_LinkerVS2017.props deleted file mode 100644 index 9acc6c37..00000000 --- a/ja2_LinkerVS2017.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - <_PropertySheetDisplayName>ja2_LinkerVS2013 - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration);$(SolutionDir)\lib\VS2013\$(Configuration);%(AdditionalLibraryDirectories) - Console.lib;Editor.lib;Laptop.lib;lua.lib;SGP.lib;Strategic.lib;Tactical.lib;TacticalAI.lib;ModularizedTacticalAI.lib;TileEngine.lib;Utils.lib;VFS.lib;7z.lib;libpng.lib;zlib.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/ja2_LinkerVS2019.props b/ja2_LinkerVS2019.props deleted file mode 100644 index 9acc6c37..00000000 --- a/ja2_LinkerVS2019.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - <_PropertySheetDisplayName>ja2_LinkerVS2013 - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration);$(SolutionDir)\lib\VS2013\$(Configuration);%(AdditionalLibraryDirectories) - Console.lib;Editor.lib;Laptop.lib;lua.lib;SGP.lib;Strategic.lib;Tactical.lib;TacticalAI.lib;ModularizedTacticalAI.lib;TileEngine.lib;Utils.lib;VFS.lib;7z.lib;libpng.lib;zlib.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/ja2_VS2005.sln b/ja2_VS2005.sln deleted file mode 100644 index c87729a5..00000000 --- a/ja2_VS2005.sln +++ /dev/null @@ -1,301 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2005.vcproj", "{F44669E7-74AC-444B-B75F-F16F4B9F0265}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {5234CD2E-97F1-42FF-828D-CE0A1B46805E} = {5234CD2E-97F1-42FF-828D-CE0A1B46805E} - {F962CFA1-2215-4124-938F-253973A27591} = {F962CFA1-2215-4124-938F-253973A27591} - {60D793F2-90B4-43C9-83B5-221EE11B37E6} = {60D793F2-90B4-43C9-83B5-221EE11B37E6} - {FC1938E8-9253-49A8-AA99-4639BBB46C1B} = {FC1938E8-9253-49A8-AA99-4639BBB46C1B} - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4} = {AB8837DB-0435-40C7-916A-0AACF5CFF1C4} - {A83DA7DA-2C31-45D8-9A69-B4993A885E76} = {A83DA7DA-2C31-45D8-9A69-B4993A885E76} - {27A49DAF-3F5A-4FF2-B943-9559F0B63032} = {27A49DAF-3F5A-4FF2-B943-9559F0B63032} - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096} = {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096} - {6283CE93-2960-4596-8E74-7A6FBA8716FF} = {6283CE93-2960-4596-8E74-7A6FBA8716FF} - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C} = {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C} - {9AD14886-DB5C-4EFF-AE17-35F9BD684692} = {9AD14886-DB5C-4EFF-AE17-35F9BD684692} - {4B544F1A-6188-4255-8877-69FC312D0D2C} = {4B544F1A-6188-4255-8877-69FC312D0D2C} - {C63466D6-49B5-4C54-AA0D-864F6171FD9B} = {C63466D6-49B5-4C54-AA0D-864F6171FD9B} - {A67922A0-0A3F-497F-A724-19B513EFC078} = {A67922A0-0A3F-497F-A724-19B513EFC078} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2005.vcproj", "{60D793F2-90B4-43C9-83B5-221EE11B37E6}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2005.vcproj", "{5234CD2E-97F1-42FF-828D-CE0A1B46805E}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2005.vcproj", "{A83DA7DA-2C31-45D8-9A69-B4993A885E76}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2005.vcproj", "{6283CE93-2960-4596-8E74-7A6FBA8716FF}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2005.vcproj", "{AB8837DB-0435-40C7-916A-0AACF5CFF1C4}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2005.vcproj", "{D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2005.vcproj", "{27A49DAF-3F5A-4FF2-B943-9559F0B63032}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2005.vcproj", "{FC1938E8-9253-49A8-AA99-4639BBB46C1B}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2005.vcproj", "{262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2005.vcproj", "{F962CFA1-2215-4124-938F-253973A27591}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2005.vcproj", "{4B544F1A-6188-4255-8877-69FC312D0D2C}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2005.vcproj", "{A67922A0-0A3F-497F-A724-19B513EFC078}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2005.vcproj", "{C63466D6-49B5-4C54-AA0D-864F6171FD9B}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2005.vcproj", "{3E43B70D-A22F-4240-B00D-32BD14523335}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2005.vcproj", "{9AD14886-DB5C-4EFF-AE17-35F9BD684692}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2005.vcproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" - ProjectSection(WebsiteProperties) = preProject - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.Debug = "False" - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MapEditor|Win32 = MapEditor|Win32 - MapEditorD|Win32 = MapEditorD|Win32 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Debug|Win32.ActiveCfg = Debug|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Debug|Win32.Build.0 = Debug|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Release|Win32.ActiveCfg = Release|Win32 - {F44669E7-74AC-444B-B75F-F16F4B9F0265}.Release|Win32.Build.0 = Release|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Debug|Win32.ActiveCfg = Debug|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Debug|Win32.Build.0 = Debug|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Release|Win32.ActiveCfg = Release|Win32 - {60D793F2-90B4-43C9-83B5-221EE11B37E6}.Release|Win32.Build.0 = Release|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Debug|Win32.ActiveCfg = Debug|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Debug|Win32.Build.0 = Debug|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Release|Win32.ActiveCfg = Release|Win32 - {5234CD2E-97F1-42FF-828D-CE0A1B46805E}.Release|Win32.Build.0 = Release|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Debug|Win32.ActiveCfg = Debug|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Debug|Win32.Build.0 = Debug|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Release|Win32.ActiveCfg = Release|Win32 - {A83DA7DA-2C31-45D8-9A69-B4993A885E76}.Release|Win32.Build.0 = Release|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Debug|Win32.Build.0 = Debug|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Release|Win32.ActiveCfg = Release|Win32 - {6283CE93-2960-4596-8E74-7A6FBA8716FF}.Release|Win32.Build.0 = Release|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Debug|Win32.Build.0 = Debug|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Release|Win32.ActiveCfg = Release|Win32 - {AB8837DB-0435-40C7-916A-0AACF5CFF1C4}.Release|Win32.Build.0 = Release|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Debug|Win32.ActiveCfg = Debug|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Debug|Win32.Build.0 = Debug|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Release|Win32.ActiveCfg = Release|Win32 - {D4BDA6AD-9B61-4953-892D-DA3F8CC7E096}.Release|Win32.Build.0 = Release|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Debug|Win32.ActiveCfg = Debug|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Debug|Win32.Build.0 = Debug|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Release|Win32.ActiveCfg = Release|Win32 - {27A49DAF-3F5A-4FF2-B943-9559F0B63032}.Release|Win32.Build.0 = Release|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Debug|Win32.Build.0 = Debug|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Release|Win32.ActiveCfg = Release|Win32 - {FC1938E8-9253-49A8-AA99-4639BBB46C1B}.Release|Win32.Build.0 = Release|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Debug|Win32.ActiveCfg = Debug|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Debug|Win32.Build.0 = Debug|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Release|Win32.ActiveCfg = Release|Win32 - {262A5F80-0B99-4E8E-A6C7-74CB1FD0A67C}.Release|Win32.Build.0 = Release|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Debug|Win32.ActiveCfg = Debug|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Debug|Win32.Build.0 = Debug|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Release|Win32.ActiveCfg = Release|Win32 - {F962CFA1-2215-4124-938F-253973A27591}.Release|Win32.Build.0 = Release|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Debug|Win32.ActiveCfg = Debug|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Debug|Win32.Build.0 = Debug|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release|Win32.ActiveCfg = Release|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release|Win32.Build.0 = Release|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Debug|Win32.ActiveCfg = Debug|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Debug|Win32.Build.0 = Debug|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release|Win32.ActiveCfg = Release|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release|Win32.Build.0 = Release|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Debug|Win32.ActiveCfg = Debug|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Debug|Win32.Build.0 = Debug|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release|Win32.ActiveCfg = Release|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release|Win32.Build.0 = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.MapEditor|Win32.ActiveCfg = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.MapEditorD|Win32.ActiveCfg = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Release_WithDebugInfo|Win32.ActiveCfg = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Release|Win32.ActiveCfg = Release|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Debug|Win32.ActiveCfg = Debug|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Debug|Win32.Build.0 = Debug|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release|Win32.ActiveCfg = Release|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ja2_VS2005.vcproj b/ja2_VS2005.vcproj deleted file mode 100644 index 70fa9e5b..00000000 --- a/ja2_VS2005.vcproj +++ /dev/null @@ -1,975 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ja2_VS2005Linker.vsprops b/ja2_VS2005Linker.vsprops deleted file mode 100644 index 119111ee..00000000 --- a/ja2_VS2005Linker.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_VS2008.sln b/ja2_VS2008.sln deleted file mode 100644 index 98453d75..00000000 --- a/ja2_VS2008.sln +++ /dev/null @@ -1,233 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2008.vcproj", "{B112F6BA-AF32-489C-B405-916C0F182D10}" - ProjectSection(ProjectDependencies) = postProject - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C} = {0BE7070B-C8C5-409A-82DD-0701D54A1C6C} - {DB40B90D-13F9-4FEC-8F1D-0506CC496586} = {DB40B90D-13F9-4FEC-8F1D-0506CC496586} - {4B544F1A-6188-4255-8877-69FC312D0D2C} = {4B544F1A-6188-4255-8877-69FC312D0D2C} - {40475E2B-AD37-4A99-85A4-1E507010344C} = {40475E2B-AD37-4A99-85A4-1E507010344C} - {8E3BD72D-8791-497B-A38E-D71B255F0A66} = {8E3BD72D-8791-497B-A38E-D71B255F0A66} - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28} = {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28} - {629F0A55-6A19-4107-8B5C-5B08B2B3949C} = {629F0A55-6A19-4107-8B5C-5B08B2B3949C} - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821} = {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821} - {9AD14886-DB5C-4EFF-AE17-35F9BD684692} = {9AD14886-DB5C-4EFF-AE17-35F9BD684692} - {60D5BF89-B609-4A30-A38D-9FE417FB12B6} = {60D5BF89-B609-4A30-A38D-9FE417FB12B6} - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {A67922A0-0A3F-497F-A724-19B513EFC078} = {A67922A0-0A3F-497F-A724-19B513EFC078} - {99341DB1-FD6E-4E87-919B-25C813F08D18} = {99341DB1-FD6E-4E87-919B-25C813F08D18} - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240} = {96FA90B1-2ABD-42E7-9CAB-14804DFD3240} - {C63466D6-49B5-4C54-AA0D-864F6171FD9B} = {C63466D6-49B5-4C54-AA0D-864F6171FD9B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2008.vcproj", "{0BE7070B-C8C5-409A-82DD-0701D54A1C6C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2008.vcproj", "{99341DB1-FD6E-4E87-919B-25C813F08D18}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2008.vcproj", "{4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2008.vcproj", "{60D5BF89-B609-4A30-A38D-9FE417FB12B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2008.vcproj", "{96FA90B1-2ABD-42E7-9CAB-14804DFD3240}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2008.vcproj", "{40475E2B-AD37-4A99-85A4-1E507010344C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2008.vcproj", "{8E3BD72D-8791-497B-A38E-D71B255F0A66}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2008.vcproj", "{DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2008.vcproj", "{629F0A55-6A19-4107-8B5C-5B08B2B3949C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2008.vcproj", "{DB40B90D-13F9-4FEC-8F1D-0506CC496586}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2008.vcproj", "{4B544F1A-6188-4255-8877-69FC312D0D2C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2008.vcproj", "{A67922A0-0A3F-497F-A724-19B513EFC078}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2008.vcproj", "{C63466D6-49B5-4C54-AA0D-864F6171FD9B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2008.vcproj", "{3E43B70D-A22F-4240-B00D-32BD14523335}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2008.vcproj", "{9AD14886-DB5C-4EFF-AE17-35F9BD684692}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2008.vcproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MapEditor|Win32 = MapEditor|Win32 - MapEditorD|Win32 = MapEditorD|Win32 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B112F6BA-AF32-489C-B405-916C0F182D10}.Debug|Win32.ActiveCfg = Debug|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.Debug|Win32.Build.0 = Debug|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.Release|Win32.ActiveCfg = Release|Win32 - {B112F6BA-AF32-489C-B405-916C0F182D10}.Release|Win32.Build.0 = Release|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Debug|Win32.ActiveCfg = Debug|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Debug|Win32.Build.0 = Debug|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Release|Win32.ActiveCfg = Release|Win32 - {0BE7070B-C8C5-409A-82DD-0701D54A1C6C}.Release|Win32.Build.0 = Release|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Debug|Win32.ActiveCfg = Debug|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Debug|Win32.Build.0 = Debug|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Release|Win32.ActiveCfg = Release|Win32 - {99341DB1-FD6E-4E87-919B-25C813F08D18}.Release|Win32.Build.0 = Release|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Debug|Win32.ActiveCfg = Debug|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Debug|Win32.Build.0 = Debug|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Release|Win32.ActiveCfg = Release|Win32 - {4D6F7570-9A1E-4DB0-8FD7-B9D14DD4E821}.Release|Win32.Build.0 = Release|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Debug|Win32.Build.0 = Debug|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Release|Win32.ActiveCfg = Release|Win32 - {60D5BF89-B609-4A30-A38D-9FE417FB12B6}.Release|Win32.Build.0 = Release|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Debug|Win32.ActiveCfg = Debug|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Debug|Win32.Build.0 = Debug|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Release|Win32.ActiveCfg = Release|Win32 - {96FA90B1-2ABD-42E7-9CAB-14804DFD3240}.Release|Win32.Build.0 = Release|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Debug|Win32.ActiveCfg = Debug|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Debug|Win32.Build.0 = Debug|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Release|Win32.ActiveCfg = Release|Win32 - {40475E2B-AD37-4A99-85A4-1E507010344C}.Release|Win32.Build.0 = Release|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Debug|Win32.ActiveCfg = Debug|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Debug|Win32.Build.0 = Debug|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Release|Win32.ActiveCfg = Release|Win32 - {8E3BD72D-8791-497B-A38E-D71B255F0A66}.Release|Win32.Build.0 = Release|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Debug|Win32.Build.0 = Debug|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Release|Win32.ActiveCfg = Release|Win32 - {DF8C5F50-6FB1-4AFE-8EF4-6B7F360D9C28}.Release|Win32.Build.0 = Release|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Debug|Win32.ActiveCfg = Debug|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Debug|Win32.Build.0 = Debug|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Release|Win32.ActiveCfg = Release|Win32 - {629F0A55-6A19-4107-8B5C-5B08B2B3949C}.Release|Win32.Build.0 = Release|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Debug|Win32.Build.0 = Debug|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Release|Win32.ActiveCfg = Release|Win32 - {DB40B90D-13F9-4FEC-8F1D-0506CC496586}.Release|Win32.Build.0 = Release|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Debug|Win32.ActiveCfg = Debug|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Debug|Win32.Build.0 = Debug|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release|Win32.ActiveCfg = Release|Win32 - {4B544F1A-6188-4255-8877-69FC312D0D2C}.Release|Win32.Build.0 = Release|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Debug|Win32.ActiveCfg = Debug|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Debug|Win32.Build.0 = Debug|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release|Win32.ActiveCfg = Release|Win32 - {A67922A0-0A3F-497F-A724-19B513EFC078}.Release|Win32.Build.0 = Release|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Debug|Win32.ActiveCfg = Debug|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Debug|Win32.Build.0 = Debug|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release|Win32.ActiveCfg = Release|Win32 - {C63466D6-49B5-4C54-AA0D-864F6171FD9B}.Release|Win32.Build.0 = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.MapEditor|Win32.ActiveCfg = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.MapEditorD|Win32.ActiveCfg = Debug|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Release_WithDebugInfo|Win32.ActiveCfg = Release|Win32 - {3E43B70D-A22F-4240-B00D-32BD14523335}.Release|Win32.ActiveCfg = Release|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Debug|Win32.ActiveCfg = Debug|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Debug|Win32.Build.0 = Debug|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release|Win32.ActiveCfg = Release|Win32 - {9AD14886-DB5C-4EFF-AE17-35F9BD684692}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ja2_VS2008.vcproj b/ja2_VS2008.vcproj deleted file mode 100644 index 81067948..00000000 --- a/ja2_VS2008.vcproj +++ /dev/null @@ -1,805 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ja2_VS2008.vsprops b/ja2_VS2008.vsprops deleted file mode 100644 index f7ae52de..00000000 --- a/ja2_VS2008.vsprops +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/ja2_VS2008Debug.vsprops b/ja2_VS2008Debug.vsprops deleted file mode 100644 index 90a657fa..00000000 --- a/ja2_VS2008Debug.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/ja2_VS2008Editor.vsprops b/ja2_VS2008Editor.vsprops deleted file mode 100644 index 8de3b034..00000000 --- a/ja2_VS2008Editor.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/ja2_VS2008Libs.vsprops b/ja2_VS2008Libs.vsprops deleted file mode 100644 index e5079ff9..00000000 --- a/ja2_VS2008Libs.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_VS2008Linker.vsprops b/ja2_VS2008Linker.vsprops deleted file mode 100644 index f862c7d6..00000000 --- a/ja2_VS2008Linker.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/ja2_VS2010.sln b/ja2_VS2010.sln deleted file mode 100644 index 0359a25f..00000000 --- a/ja2_VS2010.sln +++ /dev/null @@ -1,244 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2010.vcxproj", "{463CB476-2798-493F-9CE8-CEAC5ECE5664}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2010.vcxproj", "{D027A0E1-C661-4B8C-8159-4E0BF3D163AA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2010.vcxproj", "{B369A125-E62E-46AE-9285-58003D688301}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2010.vcxproj", "{082F6E91-D049-4314-BE9D-D9509E853B01}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2010.vcxproj", "{DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2010.vcxproj", "{1237FA1E-6E76-4AB5-B569-45B01C691FAB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2010.vcxproj", "{9DA9FE0C-B1F2-4E15-9097-A929E203AC28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2010.vcxproj", "{735F8DBF-6646-4713-BE36-394F33E69B57}" - ProjectSection(ProjectDependencies) = postProject - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2010.vcxproj", "{6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2010.vcxproj", "{23EA0500-038A-4EB8-B753-0C709B25470D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2010.vcxproj", "{A32479BF-C284-4C40-99A5-4F6B5933D1C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2010.vcxproj", "{433FBCC4-F612-489C-AA28-CCD6CF27D80C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2010.vcxproj", "{EC27EB68-C428-4B80-8170-D93F988EA34C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2010.vcxproj", "{C0E14A90-2BD1-4866-A684-98C6F6B96C2D}" - ProjectSection(ProjectDependencies) = postProject - {23EA0500-038A-4EB8-B753-0C709B25470D} = {23EA0500-038A-4EB8-B753-0C709B25470D} - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} = {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} = {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - {B369A125-E62E-46AE-9285-58003D688301} = {B369A125-E62E-46AE-9285-58003D688301} - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {082F6E91-D049-4314-BE9D-D9509E853B01} = {082F6E91-D049-4314-BE9D-D9509E853B01} - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} = {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} = {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} = {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} = {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} = {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2010.vcxproj", "{802552D2-B514-42E5-A169-F1E108527678}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2010.vcxproj", "{3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2010.vcxproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MapEditor|Win32 = MapEditor|Win32 - MapEditorD|Win32 = MapEditorD|Win32 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.ActiveCfg = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.Build.0 = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.ActiveCfg = Release|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.Build.0 = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.Build.0 = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.ActiveCfg = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.Build.0 = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.ActiveCfg = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.Build.0 = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.ActiveCfg = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.Build.0 = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.ActiveCfg = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.Build.0 = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.ActiveCfg = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.Build.0 = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.ActiveCfg = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.Build.0 = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.ActiveCfg = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.Build.0 = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.Build.0 = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.ActiveCfg = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.Build.0 = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.Build.0 = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.ActiveCfg = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.Build.0 = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.ActiveCfg = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.Build.0 = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.ActiveCfg = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.Build.0 = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.Build.0 = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.ActiveCfg = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.Build.0 = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.ActiveCfg = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.Build.0 = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.ActiveCfg = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.Build.0 = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.Build.0 = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.ActiveCfg = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.Build.0 = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.ActiveCfg = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.Build.0 = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.ActiveCfg = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.Build.0 = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.Build.0 = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.ActiveCfg = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.Build.0 = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.Build.0 = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.ActiveCfg = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.Build.0 = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Debug|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release_WithDebugInfo|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.Build.0 = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Relese_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Relese_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ja2_VS2010.vcxproj b/ja2_VS2010.vcxproj deleted file mode 100644 index e166add2..00000000 --- a/ja2_VS2010.vcxproj +++ /dev/null @@ -1,333 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D} - Win32Proj - ja2 - ja2 - - - - Application - true - NotSet - - - Application - true - NotSet - - - Application - false - false - NotSet - - - Application - false - false - NotSet - - - Application - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)\bin\VS2010\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - true - $(SolutionDir)\bin\VS2010\ - .exe - MapEditor_$(JA2LangPrefix)_Debug - - - false - $(SolutionDir)\bin\VS2010\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - false - $(SolutionDir)\bin\VS2010\ - MapEditor_$(JA2LangPrefix)_Release - .exe - - - false - $(SolutionDir)\bin\VS2010\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - $(OutDir)\JA2_EN_Debug.exe - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Debug.exe - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - true - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - false - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Release.exe - false - - - - - Level3 - - - Disabled - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - EditAndContinue - - - Windows - true - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {ff0a809e-a370-4640-a301-17b76d7a5b4e} - - - - - - \ No newline at end of file diff --git a/ja2_VS2010.vcxproj.filters b/ja2_VS2010.vcxproj.filters deleted file mode 100644 index c72b50a6..00000000 --- a/ja2_VS2010.vcxproj.filters +++ /dev/null @@ -1,286 +0,0 @@ - - - - - {359f3c3e-57b2-40d7-b083-85c85db31e63} - - - {05dccef7-dd96-43de-9b63-9d7c8919e41a} - - - {f3b2a941-8bd5-415f-bf6f-e5f8a0cf1397} - - - {b90d96e4-cddd-48f9-aa85-407f16af8948} - - - {fee7e775-f3f7-4522-83ca-c6a46499a675} - - - {4174d974-f404-4614-9bc3-d6503ec290da} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Multiplayer\Source Files - - - Multiplayer\Source Files - - - Multiplayer\Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Resource Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ja2_VS2013.sln b/ja2_VS2013.sln deleted file mode 100644 index 1b5fd343..00000000 --- a/ja2_VS2013.sln +++ /dev/null @@ -1,246 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2013.vcxproj", "{463CB476-2798-493F-9CE8-CEAC5ECE5664}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2013.vcxproj", "{D027A0E1-C661-4B8C-8159-4E0BF3D163AA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2013.vcxproj", "{B369A125-E62E-46AE-9285-58003D688301}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2013.vcxproj", "{082F6E91-D049-4314-BE9D-D9509E853B01}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2013.vcxproj", "{DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2013.vcxproj", "{1237FA1E-6E76-4AB5-B569-45B01C691FAB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2013.vcxproj", "{9DA9FE0C-B1F2-4E15-9097-A929E203AC28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2013.vcxproj", "{735F8DBF-6646-4713-BE36-394F33E69B57}" - ProjectSection(ProjectDependencies) = postProject - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2013.vcxproj", "{6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2013.vcxproj", "{23EA0500-038A-4EB8-B753-0C709B25470D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2013.vcxproj", "{A32479BF-C284-4C40-99A5-4F6B5933D1C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2013.vcxproj", "{433FBCC4-F612-489C-AA28-CCD6CF27D80C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2013.vcxproj", "{EC27EB68-C428-4B80-8170-D93F988EA34C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2013.vcxproj", "{C0E14A90-2BD1-4866-A684-98C6F6B96C2D}" - ProjectSection(ProjectDependencies) = postProject - {23EA0500-038A-4EB8-B753-0C709B25470D} = {23EA0500-038A-4EB8-B753-0C709B25470D} - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} = {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} = {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - {B369A125-E62E-46AE-9285-58003D688301} = {B369A125-E62E-46AE-9285-58003D688301} - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {082F6E91-D049-4314-BE9D-D9509E853B01} = {082F6E91-D049-4314-BE9D-D9509E853B01} - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} = {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} = {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} = {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} = {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} = {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2013.vcxproj", "{802552D2-B514-42E5-A169-F1E108527678}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2013.vcxproj", "{3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2013.vcxproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MapEditor|Win32 = MapEditor|Win32 - MapEditorD|Win32 = MapEditorD|Win32 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.ActiveCfg = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.Build.0 = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.ActiveCfg = Release|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.Build.0 = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.Build.0 = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.ActiveCfg = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.Build.0 = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.ActiveCfg = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.Build.0 = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.ActiveCfg = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.Build.0 = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.ActiveCfg = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.Build.0 = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.ActiveCfg = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.Build.0 = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.ActiveCfg = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.Build.0 = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.ActiveCfg = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.Build.0 = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.Build.0 = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.ActiveCfg = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.Build.0 = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.Build.0 = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.ActiveCfg = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.Build.0 = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.ActiveCfg = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.Build.0 = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.ActiveCfg = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.Build.0 = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.Build.0 = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.ActiveCfg = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.Build.0 = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.ActiveCfg = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.Build.0 = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.ActiveCfg = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.Build.0 = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.Build.0 = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.ActiveCfg = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.Build.0 = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.ActiveCfg = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.Build.0 = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.ActiveCfg = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.Build.0 = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.Build.0 = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.ActiveCfg = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.Build.0 = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.Build.0 = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.ActiveCfg = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.Build.0 = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Debug|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release_WithDebugInfo|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.Build.0 = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ja2_VS2013.vcxproj b/ja2_VS2013.vcxproj deleted file mode 100644 index 55d10d4c..00000000 --- a/ja2_VS2013.vcxproj +++ /dev/null @@ -1,347 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D} - Win32Proj - ja2 - ja2 - - - - Application - true - NotSet - v120 - - - Application - true - NotSet - v120 - - - Application - false - false - NotSet - v120 - - - Application - false - false - NotSet - v120 - - - Application - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)\bin\VS2013\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - true - $(SolutionDir)\bin\VS2013\ - .exe - MapEditor_$(JA2LangPrefix)_Debug - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - $(SolutionDir)\bin\VS2013\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - $(SolutionDir)\bin\VS2013\ - MapEditor_$(JA2LangPrefix)_Release - .exe - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - $(SolutionDir)\bin\VS2013\ - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Debug.exe - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - true - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - false - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Release.exe - false - false - - - - - Level3 - - - Disabled - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - EditAndContinue - - - Windows - true - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {ff0a809e-a370-4640-a301-17b76d7a5b4e} - - - - - - \ No newline at end of file diff --git a/ja2_VS2013.vcxproj.filters b/ja2_VS2013.vcxproj.filters deleted file mode 100644 index aeb0eb5d..00000000 --- a/ja2_VS2013.vcxproj.filters +++ /dev/null @@ -1,286 +0,0 @@ - - - - - {359f3c3e-57b2-40d7-b083-85c85db31e63} - - - {05dccef7-dd96-43de-9b63-9d7c8919e41a} - - - {f3b2a941-8bd5-415f-bf6f-e5f8a0cf1397} - - - {b90d96e4-cddd-48f9-aa85-407f16af8948} - - - {fee7e775-f3f7-4522-83ca-c6a46499a675} - - - {4174d974-f404-4614-9bc3-d6503ec290da} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Multiplayer\Source Files - - - Multiplayer\Source Files - - - Multiplayer\Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Resource Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Multiplayer\Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/ja2_VS2017.sln b/ja2_VS2017.sln deleted file mode 100644 index 2eaa699c..00000000 --- a/ja2_VS2017.sln +++ /dev/null @@ -1,246 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2017.vcxproj", "{463CB476-2798-493F-9CE8-CEAC5ECE5664}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2017.vcxproj", "{D027A0E1-C661-4B8C-8159-4E0BF3D163AA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2017.vcxproj", "{B369A125-E62E-46AE-9285-58003D688301}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2017.vcxproj", "{082F6E91-D049-4314-BE9D-D9509E853B01}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2017.vcxproj", "{DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2017.vcxproj", "{1237FA1E-6E76-4AB5-B569-45B01C691FAB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2017.vcxproj", "{9DA9FE0C-B1F2-4E15-9097-A929E203AC28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2017.vcxproj", "{735F8DBF-6646-4713-BE36-394F33E69B57}" - ProjectSection(ProjectDependencies) = postProject - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2017.vcxproj", "{6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2017.vcxproj", "{23EA0500-038A-4EB8-B753-0C709B25470D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2017.vcxproj", "{A32479BF-C284-4C40-99A5-4F6B5933D1C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2017.vcxproj", "{433FBCC4-F612-489C-AA28-CCD6CF27D80C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2017.vcxproj", "{EC27EB68-C428-4B80-8170-D93F988EA34C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2017.vcxproj", "{C0E14A90-2BD1-4866-A684-98C6F6B96C2D}" - ProjectSection(ProjectDependencies) = postProject - {23EA0500-038A-4EB8-B753-0C709B25470D} = {23EA0500-038A-4EB8-B753-0C709B25470D} - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} = {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} = {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - {B369A125-E62E-46AE-9285-58003D688301} = {B369A125-E62E-46AE-9285-58003D688301} - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {082F6E91-D049-4314-BE9D-D9509E853B01} = {082F6E91-D049-4314-BE9D-D9509E853B01} - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} = {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} = {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} = {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} = {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} = {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2017.vcxproj", "{802552D2-B514-42E5-A169-F1E108527678}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2017.vcxproj", "{3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2017.vcxproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MapEditor|Win32 = MapEditor|Win32 - MapEditorD|Win32 = MapEditorD|Win32 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.ActiveCfg = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.Build.0 = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.ActiveCfg = Release|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.Build.0 = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.Build.0 = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.ActiveCfg = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.Build.0 = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.ActiveCfg = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.Build.0 = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.ActiveCfg = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.Build.0 = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.ActiveCfg = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.Build.0 = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.ActiveCfg = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.Build.0 = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.ActiveCfg = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.Build.0 = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.ActiveCfg = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.Build.0 = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.Build.0 = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.ActiveCfg = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.Build.0 = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.Build.0 = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.ActiveCfg = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.Build.0 = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.ActiveCfg = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.Build.0 = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.ActiveCfg = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.Build.0 = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.Build.0 = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.ActiveCfg = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.Build.0 = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.ActiveCfg = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.Build.0 = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.ActiveCfg = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.Build.0 = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.Build.0 = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.ActiveCfg = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.Build.0 = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.ActiveCfg = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.Build.0 = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.ActiveCfg = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.Build.0 = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.Build.0 = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.ActiveCfg = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.Build.0 = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.Build.0 = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.ActiveCfg = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.Build.0 = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Debug|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release_WithDebugInfo|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.Build.0 = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ja2_VS2017.vcxproj b/ja2_VS2017.vcxproj deleted file mode 100644 index f132bc9b..00000000 --- a/ja2_VS2017.vcxproj +++ /dev/null @@ -1,339 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D} - Win32Proj - ja2 - ja2 - 10.0.15063.0 - - - - Application - true - NotSet - v141 - - - Application - true - NotSet - v141 - - - Application - false - false - NotSet - v141 - - - Application - false - false - NotSet - v141 - - - Application - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - true - .exe - MapEditor_$(JA2LangPrefix)_Debug - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - false - MapEditor_$(JA2LangPrefix)_Release - .exe - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration) - .exe - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Debug.exe - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - stdcpp14 - - - Windows - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) - true - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - false - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Release.exe - false - false - - - - - Level3 - - - Disabled - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - EditAndContinue - - - Windows - true - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {ff0a809e-a370-4640-a301-17b76d7a5b4e} - - - - - - \ No newline at end of file diff --git a/ja2_VS2019.sln b/ja2_VS2019.sln deleted file mode 100644 index e9ab6525..00000000 --- a/ja2_VS2019.sln +++ /dev/null @@ -1,411 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.645 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VFS", "ext\VFS\build\VFS_VS2019.vcxproj", "{463CB476-2798-493F-9CE8-CEAC5ECE5664}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TileEngine", "TileEngine\TileEngine_VS2019.vcxproj", "{D027A0E1-C661-4B8C-8159-4E0BF3D163AA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TacticalAI", "TacticalAI\TacticalAI_VS2019.vcxproj", "{B369A125-E62E-46AE-9285-58003D688301}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils_VS2019.vcxproj", "{082F6E91-D049-4314-BE9D-D9509E853B01}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strategic", "Strategic\Strategic_VS2019.vcxproj", "{DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SGP", "Standard Gaming Platform\SGP_VS2019.vcxproj", "{1237FA1E-6E76-4AB5-B569-45B01C691FAB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua_VS2019.vcxproj", "{9DA9FE0C-B1F2-4E15-9097-A929E203AC28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "ext\libpng\projects\visualc71\libpng_VS2019.vcxproj", "{735F8DBF-6646-4713-BE36-394F33E69B57}" - ProjectSection(ProjectDependencies) = postProject - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Laptop", "Laptop\Laptop_VS2019.vcxproj", "{6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor_VS2019.vcxproj", "{23EA0500-038A-4EB8-B753-0C709B25470D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console\Console_VS2019.vcxproj", "{A32479BF-C284-4C40-99A5-4F6B5933D1C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tactical", "Tactical\Tactical_VS2019.vcxproj", "{433FBCC4-F612-489C-AA28-CCD6CF27D80C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "ext\libpng\projects\visualc71\zlib_VS2019.vcxproj", "{EC27EB68-C428-4B80-8170-D93F988EA34C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "ja2_VS2019.vcxproj", "{C0E14A90-2BD1-4866-A684-98C6F6B96C2D}" - ProjectSection(ProjectDependencies) = postProject - {23EA0500-038A-4EB8-B753-0C709B25470D} = {23EA0500-038A-4EB8-B753-0C709B25470D} - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} = {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {1237FA1E-6E76-4AB5-B569-45B01C691FAB} = {1237FA1E-6E76-4AB5-B569-45B01C691FAB} - {B369A125-E62E-46AE-9285-58003D688301} = {B369A125-E62E-46AE-9285-58003D688301} - {EC27EB68-C428-4B80-8170-D93F988EA34C} = {EC27EB68-C428-4B80-8170-D93F988EA34C} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {082F6E91-D049-4314-BE9D-D9509E853B01} = {082F6E91-D049-4314-BE9D-D9509E853B01} - {FF0A809E-A370-4640-A301-17B76D7A5B4E} = {FF0A809E-A370-4640-A301-17B76D7A5B4E} - {A32479BF-C284-4C40-99A5-4F6B5933D1C0} = {A32479BF-C284-4C40-99A5-4F6B5933D1C0} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - {433FBCC4-F612-489C-AA28-CCD6CF27D80C} = {433FBCC4-F612-489C-AA28-CCD6CF27D80C} - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} = {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C} - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} = {D027A0E1-C661-4B8C-8159-4E0BF3D163AA} - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} = {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2export", "ext\export\ja2export_VS2019.vcxproj", "{802552D2-B514-42E5-A169-F1E108527678}" - ProjectSection(ProjectDependencies) = postProject - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} = {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6} - {463CB476-2798-493F-9CE8-CEAC5ECE5664} = {463CB476-2798-493F-9CE8-CEAC5ECE5664} - {735F8DBF-6646-4713-BE36-394F33E69B57} = {735F8DBF-6646-4713-BE36-394F33E69B57} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "ext\VFS\build\7z_VS2019.vcxproj", "{3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ModularizedTacticalAI", "ModularizedTacticalAI\ModularizedTacticalAI_VS2019.vcxproj", "{FF0A809E-A370-4640-A301-17B76D7A5B4E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - MapEditor|Win32 = MapEditor|Win32 - MapEditor|x64 = MapEditor|x64 - MapEditorD|Win32 = MapEditorD|Win32 - MapEditorD|x64 = MapEditorD|x64 - Release_WithDebugInfo|Win32 = Release_WithDebugInfo|Win32 - Release_WithDebugInfo|x64 = Release_WithDebugInfo|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.ActiveCfg = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|Win32.Build.0 = Debug|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|x64.ActiveCfg = Debug|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Debug|x64.Build.0 = Debug|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditor|x64.Build.0 = MapEditor|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.ActiveCfg = Release|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|Win32.Build.0 = Release|Win32 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|x64.ActiveCfg = Release|x64 - {463CB476-2798-493F-9CE8-CEAC5ECE5664}.Release|x64.Build.0 = Release|x64 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|Win32.Build.0 = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Debug|x64.ActiveCfg = Debug|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditor|x64.ActiveCfg = MapEditor|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.MapEditorD|x64.ActiveCfg = MapEditorD|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.ActiveCfg = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|Win32.Build.0 = Release|Win32 - {D027A0E1-C661-4B8C-8159-4E0BF3D163AA}.Release|x64.ActiveCfg = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.ActiveCfg = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|Win32.Build.0 = Debug|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|x64.ActiveCfg = Debug|x64 - {B369A125-E62E-46AE-9285-58003D688301}.Debug|x64.Build.0 = Debug|x64 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditor|x64.Build.0 = MapEditor|x64 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {B369A125-E62E-46AE-9285-58003D688301}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {B369A125-E62E-46AE-9285-58003D688301}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.ActiveCfg = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|Win32.Build.0 = Release|Win32 - {B369A125-E62E-46AE-9285-58003D688301}.Release|x64.ActiveCfg = Release|x64 - {B369A125-E62E-46AE-9285-58003D688301}.Release|x64.Build.0 = Release|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.ActiveCfg = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|Win32.Build.0 = Debug|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|x64.ActiveCfg = Debug|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Debug|x64.Build.0 = Debug|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditor|x64.Build.0 = MapEditor|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.ActiveCfg = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|Win32.Build.0 = Release|Win32 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|x64.ActiveCfg = Release|x64 - {082F6E91-D049-4314-BE9D-D9509E853B01}.Release|x64.Build.0 = Release|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.ActiveCfg = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|Win32.Build.0 = Debug|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|x64.ActiveCfg = Debug|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Debug|x64.Build.0 = Debug|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditor|x64.Build.0 = MapEditor|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.ActiveCfg = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|Win32.Build.0 = Release|Win32 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|x64.ActiveCfg = Release|x64 - {DE9B77CC-7CD5-4951-9B7F-BAC7B4A8169C}.Release|x64.Build.0 = Release|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.ActiveCfg = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|Win32.Build.0 = Debug|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|x64.ActiveCfg = Debug|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Debug|x64.Build.0 = Debug|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditor|x64.Build.0 = MapEditor|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.ActiveCfg = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|Win32.Build.0 = Release|Win32 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|x64.ActiveCfg = Release|x64 - {1237FA1E-6E76-4AB5-B569-45B01C691FAB}.Release|x64.Build.0 = Release|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|Win32.Build.0 = Debug|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|x64.ActiveCfg = Debug|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Debug|x64.Build.0 = Debug|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditor|x64.Build.0 = MapEditor|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.ActiveCfg = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|Win32.Build.0 = Release|Win32 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|x64.ActiveCfg = Release|x64 - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28}.Release|x64.Build.0 = Release|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.ActiveCfg = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|Win32.Build.0 = Debug|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|x64.ActiveCfg = Debug|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Debug|x64.Build.0 = Debug|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditor|x64.Build.0 = MapEditor|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.ActiveCfg = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|Win32.Build.0 = Release|Win32 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|x64.ActiveCfg = Release|x64 - {735F8DBF-6646-4713-BE36-394F33E69B57}.Release|x64.Build.0 = Release|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|Win32.Build.0 = Debug|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|x64.ActiveCfg = Debug|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Debug|x64.Build.0 = Debug|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditor|x64.Build.0 = MapEditor|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.ActiveCfg = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|Win32.Build.0 = Release|Win32 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|x64.ActiveCfg = Release|x64 - {6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}.Release|x64.Build.0 = Release|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.ActiveCfg = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|Win32.Build.0 = Debug|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|x64.ActiveCfg = Debug|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Debug|x64.Build.0 = Debug|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditor|x64.Build.0 = MapEditor|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.ActiveCfg = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|Win32.Build.0 = Release|Win32 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|x64.ActiveCfg = Release|x64 - {23EA0500-038A-4EB8-B753-0C709B25470D}.Release|x64.Build.0 = Release|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|Win32.Build.0 = Debug|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|x64.ActiveCfg = Debug|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Debug|x64.Build.0 = Debug|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditor|x64.Build.0 = MapEditor|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.ActiveCfg = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|Win32.Build.0 = Release|Win32 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|x64.ActiveCfg = Release|x64 - {A32479BF-C284-4C40-99A5-4F6B5933D1C0}.Release|x64.Build.0 = Release|x64 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.ActiveCfg = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|Win32.Build.0 = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Debug|x64.ActiveCfg = Debug|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditor|x64.ActiveCfg = MapEditor|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.MapEditorD|x64.ActiveCfg = MapEditorD|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.ActiveCfg = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|Win32.Build.0 = Release|Win32 - {433FBCC4-F612-489C-AA28-CCD6CF27D80C}.Release|x64.ActiveCfg = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|Win32.Build.0 = Debug|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|x64.ActiveCfg = Debug|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Debug|x64.Build.0 = Debug|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditor|x64.Build.0 = MapEditor|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.ActiveCfg = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|Win32.Build.0 = Release|Win32 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|x64.ActiveCfg = Release|x64 - {EC27EB68-C428-4B80-8170-D93F988EA34C}.Release|x64.Build.0 = Release|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|Win32.Build.0 = Debug|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|x64.ActiveCfg = Debug|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Debug|x64.Build.0 = Debug|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditor|x64.Build.0 = MapEditor|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.ActiveCfg = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|Win32.Build.0 = Release|Win32 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|x64.ActiveCfg = Release|x64 - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D}.Release|x64.Build.0 = Release|x64 - {802552D2-B514-42E5-A169-F1E108527678}.Debug|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Debug|x64.ActiveCfg = Debug|x64 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|x64.ActiveCfg = Release_WithDebugInfo|x64 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditor|x64.Build.0 = Release_WithDebugInfo|x64 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|x64.ActiveCfg = Release_WithDebugInfo|x64 - {802552D2-B514-42E5-A169-F1E108527678}.MapEditorD|x64.Build.0 = Release_WithDebugInfo|x64 - {802552D2-B514-42E5-A169-F1E108527678}.Release_WithDebugInfo|Win32.ActiveCfg = Debug|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {802552D2-B514-42E5-A169-F1E108527678}.Release|Win32.ActiveCfg = Release|Win32 - {802552D2-B514-42E5-A169-F1E108527678}.Release|x64.ActiveCfg = Release|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|Win32.Build.0 = Debug|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|x64.ActiveCfg = Debug|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Debug|x64.Build.0 = Debug|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditor|x64.Build.0 = MapEditor|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.ActiveCfg = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|Win32.Build.0 = Release|Win32 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|x64.ActiveCfg = Release|x64 - {3B7B950D-0DC8-4ADD-9FE2-7DE4297C62F6}.Release|x64.Build.0 = Release|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.ActiveCfg = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|Win32.Build.0 = Debug|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|x64.ActiveCfg = Debug|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Debug|x64.Build.0 = Debug|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.ActiveCfg = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|Win32.Build.0 = MapEditor|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|x64.ActiveCfg = MapEditor|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditor|x64.Build.0 = MapEditor|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.ActiveCfg = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|Win32.Build.0 = MapEditorD|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|x64.ActiveCfg = MapEditorD|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.MapEditorD|x64.Build.0 = MapEditorD|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.ActiveCfg = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|Win32.Build.0 = Release_WithDebugInfo|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|x64.ActiveCfg = Release_WithDebugInfo|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release_WithDebugInfo|x64.Build.0 = Release_WithDebugInfo|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.ActiveCfg = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|Win32.Build.0 = Release|Win32 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|x64.ActiveCfg = Release|x64 - {FF0A809E-A370-4640-A301-17B76D7A5B4E}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4665EE40-FD31-43B3-9DAE-83819523F991} - EndGlobalSection -EndGlobal diff --git a/ja2_VS2019.vcxproj b/ja2_VS2019.vcxproj deleted file mode 100644 index 6140ccaf..00000000 --- a/ja2_VS2019.vcxproj +++ /dev/null @@ -1,579 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - {C0E14A90-2BD1-4866-A684-98C6F6B96C2D} - Win32Proj - ja2 - ja2 - 10.0 - - - - Application - true - NotSet - v142 - - - Application - true - NotSet - v142 - - - Application - true - NotSet - v142 - - - Application - true - NotSet - v142 - - - Application - false - false - NotSet - v142 - false - - - Application - false - true - NotSet - v142 - - - Application - false - false - NotSet - v142 - - - Application - false - false - NotSet - v142 - - - Application - false - false - NotSet - v142 - - - Application - false - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master - .exe - $(SolutionDir)\bin\VS2013\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - true - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master - .exe - - - true - .exe - MapEditor_$(JA2LangPrefix)_Debug_master - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - true - .exe - MapEditor_$(JA2LangPrefix)_Debug_master - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master_VS2019 - .exe - $(SolutionDir)\bin\VS2013\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master - .exe - - - false - MapEditor_$(JA2LangPrefix)_Release_master - .exe - $(SolutionDir)\bin\VS2013\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - MapEditor_$(JA2LangPrefix)_Release_master - .exe - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master - .exe - $(SolutionDir)\bin\VS2013\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - false - $(JA2Config)_$(JA2LangPrefix)_$(Configuration)_master - .exe - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.;.\.;.\ext\VFS\include;..\ext\VFS\include;..\Utils;.\Utils;..\TileEngine;.\TileEngine;..\TacticalAI;.\TacticalAI;..\Tactical;.\Tactical;..\Strategic;.\Strategic;..\Standard Gaming Platform;.\Standard Gaming Platform;..\Res;.\Res;..\lua;.\lua;..\Laptop;.\Laptop;..\Multiplayer;.\Multiplayer;..\Multiplayer\raknet;.\Multiplayer\raknet;..\Editor;.\Editor;..\ModularizedTacticalAI;.\ModularizedTacticalAI;..\Console;.\Console;.\ext\libpng;..\ext\libpng;.\ext\zlib;..\ext\zlib;;$(NOINHERIT) - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Debug.exe - false - false - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebug - - - Windows - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Debug.exe - false - false - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - stdcpp17 - Neither - false - false - NotSet - true - - - Windows - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) - true - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - stdcpp14 - Speed - true - true - AdvancedVectorExtensions2 - true - - - Windows - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) - true - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - false - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Release_master.exe - false - false - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Windows - false - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - $(OutDir)\MapEditor_EN_Release.exe - false - false - - - - - Level3 - - - Disabled - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - EditAndContinue - - - Windows - true - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) - false - false - - - - - Level3 - - - Disabled - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - ProgramDatabase - - - Windows - true - true - true - Multiplayer\raknet;%(AdditionalLibraryDirectories) - Winmm.lib;RakNetLibStatic.lib;ws2_32.lib;DbgHelp.lib;%(AdditionalDependencies) - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {ff0a809e-a370-4640-a301-17b76d7a5b4e} - - - - - - \ No newline at end of file diff --git a/ja2v1.13.png b/ja2v1.13.png new file mode 100644 index 00000000..c34a77f6 Binary files /dev/null and b/ja2v1.13.png differ diff --git a/jascreens.cpp b/jascreens.cpp index 8b0a3f4b..80f5188a 100644 --- a/jascreens.cpp +++ b/jascreens.cpp @@ -1,6 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "JA2 All.h" -#else #include "builddefines.h" #include #include @@ -50,7 +47,6 @@ #include "text.h" #include "Language Defines.h" #include "IniReader.h" -#endif #include "sgp_logger.h" @@ -383,12 +379,10 @@ UINT32 InitScreenHandle(void) SetFontBackground( FONT_MCOLOR_BLACK ); SetFontForeground( FONT_MCOLOR_WHITE ); - //mprintf( 10, 420, zVersionLabel ); - #ifdef _DEBUG - mprintf( 10, 10, L"%s: %s Debug %S %s", pMessageStrings[ MSG_VERSION ], zVersionLabel, czVersionNumber, zRevisionNumber ); + mprintf( 10, 10, L"%s: %s Debug %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation ); #else - mprintf( 10, 10, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zVersionLabel, czVersionNumber, zRevisionNumber ); + mprintf( 10, 10, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation ); #endif #if defined JA2BETAVERSION diff --git a/legion cfg.cpp b/legion cfg.cpp index a0bbc5a7..2004c497 100644 --- a/legion cfg.cpp +++ b/legion cfg.cpp @@ -1,23 +1,4 @@ //legion 2 -#ifdef PRECOMPILEDHEADERS - #include "Types.h" - #include "types.h" - #include "Strategic All.h" - #include "XML.h" - #include "INIReader.h" - #include "GameSettings.h" - #include "Soldier Profile.h" - #include "XML.h" - #include "Item Types.h" - #include "Items.h" - #include "Game Event Hook.h" - #include "faces.h" - #include "Language Defines.h" - #include "Types.h" - #include "Map Screen Interface Map.h" - #include "legion cfg.h" //legion2 - //#include "XMLWriter.h" -#else #include "Types.h" #include "types.h" #include "Random.h" @@ -67,7 +48,6 @@ #include "Items.h" #include "text.h" #include "GameSettings.h" -#endif #ifdef JA2UB #include "Ja25 Strategic Ai.h" diff --git a/local.h b/local.h index 3f59e708..c52e262f 100644 --- a/local.h +++ b/local.h @@ -32,6 +32,7 @@ extern UINT16 SCREEN_HEIGHT; extern int iResolution; // Resolution id from the ini file extern int iPlayIntro; extern int iUseWinFonts; +extern float fTooltipScaleFactor; extern int iDisableMouseScrolling; extern INT16 iScreenWidthOffset; extern INT16 iScreenHeightOffset; @@ -82,17 +83,4 @@ extern BOOLEAN fDisplayOverheadMap; #define PIXEL_DEPTH 16 -// -// These defines are used as MUTEX handles. -// - -#define MAX_MUTEX_HANDLES 32 - -#define REFRESH_THREAD_MUTEX 0 -#define FRAME_BUFFER_MUTEX 1 -#define MOUSE_BUFFER_MUTEX 2 -#define DIRTY_BUFFER_MUTEX 3 -#define SCROLL_MESSAGE_MUTEX 4 - - -#endif \ No newline at end of file +#endif diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt new file mode 100644 index 00000000..9e8f21b6 --- /dev/null +++ b/lua/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(Lua +"lua.cpp" +"lua_class_interface.cpp" +"lua_env.cpp" +"lua_function.cpp" +"lua_state.cpp" +"lua_strategic.cpp" +"lua_table.cpp" +"lua_tactical.cpp" +"lwstring.cpp" +) +target_include_directories(Lua PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/lua/lua_VS2005.vcproj b/lua/lua_VS2005.vcproj deleted file mode 100644 index dca6c1a7..00000000 --- a/lua/lua_VS2005.vcproj +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lua/lua_VS2008.vcproj b/lua/lua_VS2008.vcproj deleted file mode 100644 index d54fa9a6..00000000 --- a/lua/lua_VS2008.vcproj +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lua/lua_VS2010.vcxproj b/lua/lua_VS2010.vcxproj deleted file mode 100644 index e75d1dc9..00000000 --- a/lua/lua_VS2010.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Relese_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - Win32Proj - lua - lua - - - - StaticLibrary - true - NotSet - - - StaticLibrary - true - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - StaticLibrary - false - false - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/lua/lua_VS2010.vcxproj.filters b/lua/lua_VS2010.vcxproj.filters deleted file mode 100644 index bc770525..00000000 --- a/lua/lua_VS2010.vcxproj.filters +++ /dev/null @@ -1,75 +0,0 @@ - - - - - {363547e5-d794-4293-8484-b7cc64b304dd} - - - {ffb119e4-d4fc-4b6b-93ae-2958a9ec49dc} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/lua/lua_VS2013.vcxproj b/lua/lua_VS2013.vcxproj deleted file mode 100644 index 6c0182a8..00000000 --- a/lua/lua_VS2013.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - Win32Proj - lua - lua - - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - true - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - StaticLibrary - false - false - NotSet - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/lua/lua_VS2013.vcxproj.filters b/lua/lua_VS2013.vcxproj.filters deleted file mode 100644 index 72198bfa..00000000 --- a/lua/lua_VS2013.vcxproj.filters +++ /dev/null @@ -1,59 +0,0 @@ - - - - - {363547e5-d794-4293-8484-b7cc64b304dd} - - - {ffb119e4-d4fc-4b6b-93ae-2958a9ec49dc} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - \ No newline at end of file diff --git a/lua/lua_VS2017.vcxproj b/lua/lua_VS2017.vcxproj deleted file mode 100644 index c1a1cf88..00000000 --- a/lua/lua_VS2017.vcxproj +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Debug - Win32 - - - MapEditorD - Win32 - - - MapEditor - Win32 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - Win32Proj - lua - lua - 10.0.15063.0 - - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - true - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - StaticLibrary - false - false - NotSet - v141 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/lua/lua_VS2019.vcxproj b/lua/lua_VS2019.vcxproj deleted file mode 100644 index 863ddc7b..00000000 --- a/lua/lua_VS2019.vcxproj +++ /dev/null @@ -1,415 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - MapEditorD - Win32 - - - MapEditorD - x64 - - - MapEditor - Win32 - - - MapEditor - x64 - - - Release_WithDebugInfo - x64 - - - Release - Win32 - - - Release_WithDebugInfo - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9DA9FE0C-B1F2-4E15-9097-A929E203AC28} - Win32Proj - lua - lua - 10.0 - - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - true - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - StaticLibrary - false - false - NotSet - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - $(SolutionDir)\lib\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(Configuration)\ - $(SolutionDir)\build\VS2013\$(JA2Config)_$(JA2LangPrefix)\$(ProjectName)_$(Configuration)\ - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - EditAndContinue - - - Windows - true - true - true - - - - - Level3 - NotUsing - Disabled - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreaded - - - - - ProgramDatabase - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 57b14dcd..00000000 --- a/readme.txt +++ /dev/null @@ -1,25 +0,0 @@ -Last 1.13 SVN 4721 - -Compilation of UB : - -Set #define JA2UB and #define JA2UBMAPS in file builddefines.h. - -Compilation of JA2 : - -Rem #define JA2UB and #define JA2UBMAPS in file builddefines.h. - - -Example : - -UB : - -#define JA2UB -#define JA2UBMAPS - -JA2 : - -//#define JA2UB -//#define JA2UBMAPS - - -www.legion.zone.zg.pl \ No newline at end of file diff --git a/ub_config.cpp b/ub_config.cpp index 6a6b5775..edf55ca0 100644 --- a/ub_config.cpp +++ b/ub_config.cpp @@ -1,21 +1,3 @@ -#ifdef PRECOMPILEDHEADERS - #include "Types.h" - #include "types.h" - #include "Strategic All.h" - #include "XML.h" - #include "INIReader.h" - #include "GameSettings.h" - #include "Soldier Profile.h" - #include "XML.h" - #include "Item Types.h" - #include "Items.h" - #include "Game Event Hook.h" - #include "faces.h" - #include "Language Defines.h" - #include "Types.h" - #include "Map Screen Interface Map.h" - #include "ub_config.h" //legion2 -#else #include "Types.h" #include "types.h" #include "Random.h" @@ -65,7 +47,6 @@ #include "Items.h" #include "text.h" #include "GameSettings.h" -#endif #ifdef JA2UB #include "Ja25 Strategic Ai.h"