mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Update to Master
This commit is contained in:
@@ -186,7 +186,6 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: source
|
path: source
|
||||||
@@ -201,6 +200,7 @@ jobs:
|
|||||||
git push --delete origin refs/tags/latest || true
|
git push --delete origin refs/tags/latest || true
|
||||||
git tag latest
|
git tag latest
|
||||||
git push --force origin refs/tags/latest
|
git push --force origin refs/tags/latest
|
||||||
|
sleep 15 # make sure github can find the tag for gh release
|
||||||
gh release create latest ../dist/* \
|
gh release create latest ../dist/* \
|
||||||
--generate-notes \
|
--generate-notes \
|
||||||
--title "Latest (unstable)" \
|
--title "Latest (unstable)" \
|
||||||
@@ -213,7 +213,6 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
working-directory: source
|
working-directory: source
|
||||||
run: |
|
run: |
|
||||||
exit 0
|
|
||||||
gh release upload "$GITHUB_REF_NAME" ../dist/* --clobber
|
gh release upload "$GITHUB_REF_NAME" ../dist/* --clobber
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -54,12 +54,22 @@ jobs:
|
|||||||
sed -i "s|@Build@|${GAME_BUILD:0:255}|" Ja2/GameVersion.cpp
|
sed -i "s|@Build@|${GAME_BUILD:0:255}|" Ja2/GameVersion.cpp
|
||||||
cat Ja2/GameVersion.cpp
|
cat Ja2/GameVersion.cpp
|
||||||
|
|
||||||
|
- name: Turn on link-time optimization?
|
||||||
|
if: fromJSON(inputs.assemble)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
echo "
|
||||||
|
LTO=ON
|
||||||
|
" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Prepare build properties
|
- name: Prepare build properties
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
touch CMakeUserPresets.json
|
touch CMakePresets.json
|
||||||
|
|
||||||
JA2Language=$(echo '${{ inputs.language }}' | tr '[:lower:]' '[:upper:]')
|
JA2Language=$(echo '${{ inputs.language }}' | tr '[:lower:]' '[:upper:]')
|
||||||
JA2Application=$(echo '${{ matrix.application }}' | tr '[:lower:]' '[:upper:]')
|
JA2Application=$(echo '${{ matrix.application }}' | tr '[:lower:]' '[:upper:]')
|
||||||
@@ -77,7 +87,7 @@ jobs:
|
|||||||
arch: x86
|
arch: x86
|
||||||
- name: Prepare build
|
- name: Prepare build
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application"
|
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application" -DLTO_OPTION="$Env:LTO"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake --build build/ -- -v
|
cmake --build build/ -- -v
|
||||||
|
|||||||
+1
-1
@@ -6,6 +6,6 @@
|
|||||||
/.vs/
|
/.vs/
|
||||||
/build/
|
/build/
|
||||||
/out/
|
/out/
|
||||||
|
/CMakePresets.json
|
||||||
/CMakeSettings.json
|
/CMakeSettings.json
|
||||||
/CMakeUserPresets.json
|
|
||||||
/lib/
|
/lib/
|
||||||
|
|||||||
+109
-60
@@ -9,10 +9,25 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
option(LTO_OPTION "Enable link-time optimization if supported by compiler" OFF)
|
||||||
|
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT LinkTimeOptimization OUTPUT IpoError LANGUAGES C CXX)
|
||||||
|
if(LinkTimeOptimization AND LTO_OPTION)
|
||||||
|
message(STATUS "Configuring WITH link-time optimization")
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
else()
|
||||||
|
message(STATUS "Configuring WITHOUT link-time optimization ${IpoError}")
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ADDRESS_SANITIZER OFF)
|
option(ADDRESS_SANITIZER OFF)
|
||||||
if(ADDRESS_SANITIZER)
|
if(ADDRESS_SANITIZER)
|
||||||
message(STATUS "AddressSanitizer ENABLED for non-Release builds")
|
message(STATUS "AddressSanitizer ENABLED for non-Release builds")
|
||||||
add_compile_options($<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,-fsanitize=address,>)
|
add_compile_options($<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,-fsanitize=address,>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_compile_options("/wd4838")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# whether we are using MSBuild as a generator
|
# whether we are using MSBuild as a generator
|
||||||
@@ -23,7 +38,24 @@ set(usingMsBuild $<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>)
|
|||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP _CRT_SECURE_NO_DEPRECATE)
|
add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP _CRT_SECURE_NO_DEPRECATE)
|
||||||
include_directories(Ja2 "ext/VFS/include" Utils TileEngine TacticalAI "ModularizedTacticalAI/include" Tactical Strategic sgp "Ja2/Res" Lua Laptop Multiplayer Editor Console)
|
include_directories(
|
||||||
|
"${CMAKE_SOURCE_DIR}/Ja2"
|
||||||
|
"${CMAKE_SOURCE_DIR}/ext/VFS/include"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Utils"
|
||||||
|
"${CMAKE_SOURCE_DIR}/TileEngine"
|
||||||
|
"${CMAKE_SOURCE_DIR}/TacticalAI"
|
||||||
|
"${CMAKE_SOURCE_DIR}/ModularizedTacticalAI/include"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Tactical"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Strategic"
|
||||||
|
"${CMAKE_SOURCE_DIR}/sgp"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Ja2/Res"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Lua"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Laptop"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Multiplayer"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Editor"
|
||||||
|
"${CMAKE_SOURCE_DIR}/Console"
|
||||||
|
"${CMAKE_SOURCE_DIR}/i18n/include"
|
||||||
|
)
|
||||||
|
|
||||||
# external libraries
|
# external libraries
|
||||||
add_subdirectory("ext/libpng")
|
add_subdirectory("ext/libpng")
|
||||||
@@ -34,32 +66,46 @@ target_link_libraries(bfVFS PRIVATE 7z)
|
|||||||
# ja2export utility
|
# ja2export utility
|
||||||
add_subdirectory("ext/export/src")
|
add_subdirectory("ext/export/src")
|
||||||
|
|
||||||
# static libraries whose source files, header files or header files included
|
# static libraries whose translation units don't rely on Application preprocessor definitions.
|
||||||
# by header files do not rely on Applications or Languages preprocessor definitions,
|
add_subdirectory(lua)
|
||||||
# and therefore only need to be compiled once. Good.
|
|
||||||
add_subdirectory(Lua)
|
|
||||||
add_subdirectory(Multiplayer)
|
add_subdirectory(Multiplayer)
|
||||||
|
add_subdirectory(wine)
|
||||||
|
|
||||||
# static libraries whose source files, header files or header files included
|
set(Ja2_Libraries
|
||||||
# by header files rely on Application and Language preprocessor definitions, and
|
"${CMAKE_SOURCE_DIR}/binkw32.lib"
|
||||||
# therefore need to be compiled multiple times. Very Bad.
|
"${CMAKE_SOURCE_DIR}/libexpatMT.lib"
|
||||||
|
"${CMAKE_SOURCE_DIR}/lua51.lib"
|
||||||
|
"${CMAKE_SOURCE_DIR}/lua51.vc9.lib"
|
||||||
|
"${CMAKE_SOURCE_DIR}/SMACKW32.LIB"
|
||||||
|
"Dbghelp.lib"
|
||||||
|
"Winmm.lib"
|
||||||
|
"ws2_32.lib"
|
||||||
|
bfVFS
|
||||||
|
Lua
|
||||||
|
Multiplayer
|
||||||
|
wine
|
||||||
|
)
|
||||||
|
|
||||||
|
# static libraries whose translation units rely on Application preprocessor definitions.
|
||||||
set(Ja2_Libs
|
set(Ja2_Libs
|
||||||
TileEngine
|
Console
|
||||||
TacticalAI
|
Editor
|
||||||
Utils
|
Ja2
|
||||||
Strategic
|
Laptop
|
||||||
sgp
|
ModularizedTacticalAI
|
||||||
Laptop
|
sgp
|
||||||
Editor
|
Strategic
|
||||||
Console
|
Tactical
|
||||||
Tactical
|
TacticalAI
|
||||||
ModularizedTacticalAI
|
TileEngine
|
||||||
|
Utils
|
||||||
)
|
)
|
||||||
foreach(lib IN LISTS Ja2_Libs)
|
foreach(lib IN LISTS Ja2_Libs)
|
||||||
add_subdirectory(${lib})
|
add_subdirectory(${lib})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_subdirectory(Ja2)
|
# language library relies on Application _and_ Language preprocessor definition. very bad.
|
||||||
|
add_subdirectory(i18n)
|
||||||
|
|
||||||
# simple function to validate Languages and Application choices
|
# simple function to validate Languages and Application choices
|
||||||
include(cmake/ValidateOptions.cmake)
|
include(cmake/ValidateOptions.cmake)
|
||||||
@@ -74,47 +120,50 @@ ValidateOptions("${ValidApplications}" "Applications" "${Applications}" "Applica
|
|||||||
# preprocessor definitions for Debug build, per the legacy MSBuild
|
# preprocessor definitions for Debug build, per the legacy MSBuild
|
||||||
set(debugFlags $<IF:$<CONFIG:Debug>,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>)
|
set(debugFlags $<IF:$<CONFIG:Debug>,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>)
|
||||||
|
|
||||||
# Due to widespread preprocessor definition abuse in the codebase, practically
|
foreach(app IN LISTS ApplicationTargets)
|
||||||
# every library-language-executable combination is its own compilation target
|
set(isEditor $<STREQUAL:${app},JA2MAPEDITOR>)
|
||||||
# TODO: refactor preprocessor usage onto, ideally, a single translation unit
|
set(isUb $<STREQUAL:${app},JA2UB>)
|
||||||
foreach(lang IN LISTS LangTargets)
|
set(isUbEditor $<STREQUAL:${app},JA2UBMAPEDITOR>)
|
||||||
foreach(exe IN LISTS ApplicationTargets)
|
set(compilationFlags
|
||||||
set(Executable ${exe}_${lang})
|
$<IF:${isEditor},JA2EDITOR;JA2BETAVERSION,>
|
||||||
|
$<IF:${isUb},JA2UB;JA2UBMAPS,>
|
||||||
|
$<IF:${isUbEditor},JA2UB;JA2UBMAPS;JA2EDITOR;JA2BETAVERSION,>
|
||||||
|
)
|
||||||
|
|
||||||
# executable for an application/language combination, e.g. JA2_ENGLISH.exe
|
foreach(lib IN LISTS Ja2_Libs)
|
||||||
add_executable(${Executable} WIN32)
|
# library for an application, e.g. JA2UB_sgp
|
||||||
target_sources(${Executable} PRIVATE ${Ja2Src})
|
set(game_library ${app}_${lib})
|
||||||
|
add_library(${game_library})
|
||||||
|
target_sources(${game_library} PRIVATE ${${lib}Src})
|
||||||
|
target_compile_definitions(${game_library} PRIVATE ${compilationFlags} ${debugFlags})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Good libraries have already been built, can be simply linked here
|
foreach(lang IN LISTS LangTargets)
|
||||||
target_link_libraries(${Executable} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
# executable for an application/language combination, e.g. JA2_ENGLISH.exe
|
||||||
target_link_options(${Executable} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
set(exe ${app}_${lang})
|
||||||
|
add_executable(${exe} WIN32
|
||||||
|
sgp/sgp.cpp
|
||||||
|
Ja2/Res/ja2.rc
|
||||||
|
)
|
||||||
|
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
||||||
|
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
||||||
|
target_compile_definitions(${exe} PRIVATE ${compilationFlags} ${debugFlags})
|
||||||
|
|
||||||
# for each app/lang combination, the Very Bad libraries need to be built,
|
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
||||||
# with the appropriate preprocessor definitions
|
set(language_library ${exe}_i18n)
|
||||||
foreach(lib IN LISTS Ja2_Libs)
|
add_library(${language_library})
|
||||||
# syntactic sugar to hopefully make this more readable
|
target_sources(${language_library} PRIVATE ${i18nSrc})
|
||||||
set(VeryBadLib ${Executable}_${lib})
|
target_compile_definitions(${language_library} PRIVATE ${compilationFlags} ${debugFlags} ${lang})
|
||||||
set(isEditor $<STREQUAL:${exe},JA2MAPEDITOR>)
|
target_link_libraries(${exe} PRIVATE ${language_library})
|
||||||
set(isUb $<STREQUAL:${exe},JA2UB>)
|
|
||||||
set(isUbEditor $<STREQUAL:${exe},JA2UBMAPEDITOR>)
|
|
||||||
|
|
||||||
# static library for an app/lang combination, e.g. JA2_ENGLISH_sgp.lib
|
# go through all game libraries again and link them to the app/language executable
|
||||||
add_library(${VeryBadLib})
|
foreach(lib IN LISTS Ja2_Libs)
|
||||||
target_sources(${VeryBadLib} PRIVATE ${${lib}Src})
|
target_link_libraries(${exe} PRIVATE ${app}_${lib})
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
target_compile_definitions(${VeryBadLib} PUBLIC
|
# for SGP only
|
||||||
$<IF:${isEditor},JA2EDITOR;JA2BETAVERSION,>
|
target_link_libraries(${app}_sgp PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib")
|
||||||
$<IF:${isUb},JA2UB;JA2UBMAPS,>
|
target_link_libraries(${app}_sgp PRIVATE libpng)
|
||||||
$<IF:${isUbEditor},JA2UB;JA2UBMAPS;JA2EDITOR;JA2BETAVERSION,>
|
target_compile_definitions(${app}_sgp PRIVATE NO_ZLIB_COMPRESSION)
|
||||||
${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()
|
endforeach()
|
||||||
|
|||||||
@@ -173,7 +173,15 @@ void LoadSaveScreenEntry()
|
|||||||
vfs::CVirtualProfile* prof = it.value();
|
vfs::CVirtualProfile* prof = it.value();
|
||||||
memset(&FileInfo, 0, sizeof(GETFILESTRUCT));
|
memset(&FileInfo, 0, sizeof(GETFILESTRUCT));
|
||||||
strcpy(FileInfo.zFileName, "< ");
|
strcpy(FileInfo.zFileName, "< ");
|
||||||
strcat(FileInfo.zFileName, prof->cName.utf8().c_str());
|
// Cut filename off if it's too long for the buffer
|
||||||
|
if (strlen(prof->cName.utf8().c_str()) > FILENAME_BUFLEN-4)
|
||||||
|
{
|
||||||
|
strncpy(FileInfo.zFileName+1, prof->cName.utf8().c_str(), FILENAME_BUFLEN-4);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcat(FileInfo.zFileName, prof->cName.utf8().c_str());
|
||||||
|
}
|
||||||
strcat(FileInfo.zFileName, " >");
|
strcat(FileInfo.zFileName, " >");
|
||||||
FileInfo.zFileName[FILENAME_BUFLEN] = 0;
|
FileInfo.zFileName[FILENAME_BUFLEN] = 0;
|
||||||
FileInfo.uiFileAttribs = FILE_IS_DIRECTORY;
|
FileInfo.uiFileAttribs = FILE_IS_DIRECTORY;
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#include "BuildDefines.h"
|
#include "BuildDefines.h"
|
||||||
#include "Fileman.h"
|
#include "Fileman.h"
|
||||||
|
|
||||||
#define FILENAME_BUFLEN (20 + 4 + 1)//dnl ch39 190909 +4 is for ".dat", +1 is for '\0' //dnl ch81 021213
|
#define FILENAME_BUFLEN (30 + 4 + 1)//dnl ch39 190909 +4 is for ".dat", +1 is for '\0' //dnl ch81 021213
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
|
|||||||
@@ -403,14 +403,42 @@ void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
|
|||||||
while( gRoadMacros[ i ].sMacroID == iMacroID )
|
while( gRoadMacros[ i ].sMacroID == iMacroID )
|
||||||
{
|
{
|
||||||
// need to recalc MACROSTRUCT::sOffset 'cause it sticked to 160*160 old map size
|
// need to recalc MACROSTRUCT::sOffset 'cause it sticked to 160*160 old map size
|
||||||
INT32 sdX = gRoadMacros[ i ].sOffset % OLD_WORLD_COLS;
|
INT32 sdY = gRoadMacros[ i ].sOffset / (OLD_WORLD_COLS);
|
||||||
INT32 sdY = gRoadMacros[ i ].sOffset / OLD_WORLD_COLS;
|
INT32 sdX = gRoadMacros[ i ].sOffset - (sdY*OLD_WORLD_COLS);
|
||||||
INT32 sOffset = sdY*WORLD_COLS + sdX;
|
|
||||||
|
// Take into account the dfference between old and new row size for tiles that are shifted
|
||||||
|
// by one row due to X offset
|
||||||
|
// For example:
|
||||||
|
// {RBR, 159},
|
||||||
|
//{ RBR, -159 },
|
||||||
//
|
//
|
||||||
AddToUndoList( iMapIndex + sOffset );
|
// Offsets for 160x160 map
|
||||||
RemoveAllObjectsOfTypeRange( iMapIndex + sOffset, ROADPIECES, ROADPIECES );//dnl this was but is very wrong and leading to stacking tilesets, RemoveAllObjectsOfTypeRange( i, ROADPIECES, ROADPIECES );
|
// [] [] [-159]
|
||||||
|
// [] [0] []
|
||||||
|
// [159] [] []
|
||||||
|
//
|
||||||
|
// Converted to 200x200 map
|
||||||
|
// [] [] [-199]
|
||||||
|
// [] [0] []
|
||||||
|
// [199] [] []
|
||||||
|
//
|
||||||
|
// Without this the original conversion would output 159 and -159 for X coordinate
|
||||||
|
if (sdX < -OLD_WORLD_COLS/2)
|
||||||
|
{
|
||||||
|
sdX -= WORLD_COLS - OLD_WORLD_COLS;
|
||||||
|
}
|
||||||
|
else if (sdX > OLD_WORLD_COLS / 2)
|
||||||
|
{
|
||||||
|
sdX += WORLD_COLS - OLD_WORLD_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
INT32 sOffset = sdY*WORLD_COLS + sdX;
|
||||||
|
INT32 newGridNo = iMapIndex + sOffset;
|
||||||
|
|
||||||
|
AddToUndoList( newGridNo );
|
||||||
|
RemoveAllObjectsOfTypeRange( newGridNo, ROADPIECES, ROADPIECES );//dnl this was but is very wrong and leading to stacking tilesets, RemoveAllObjectsOfTypeRange( i, ROADPIECES, ROADPIECES );
|
||||||
GetTileIndexFromTypeSubIndex( ROADPIECES, (UINT16)(i+1) , &usTileIndex );
|
GetTileIndexFromTypeSubIndex( ROADPIECES, (UINT16)(i+1) , &usTileIndex );
|
||||||
AddObjectToHead( iMapIndex + sOffset, usTileIndex );
|
AddObjectToHead( newGridNo, usTileIndex );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-5
@@ -1,4 +1,4 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
@@ -1069,10 +1069,7 @@ void ShowCurrentDrawingMode( void )
|
|||||||
// Set the color for the window's border. Blueish color = Normal, Red = Fake lighting is turned on
|
// Set the color for the window's border. Blueish color = Normal, Red = Fake lighting is turned on
|
||||||
usFillColor = GenericButtonFillColors[0];
|
usFillColor = GenericButtonFillColors[0];
|
||||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
if(gbPixelDepth==16)
|
RectangleDraw( FALSE, iScreenWidthOffset + 0, 2 * iScreenHeightOffset + 400, iScreenWidthOffset + 99, 2 * iScreenHeightOffset + 458, usFillColor, pDestBuf );
|
||||||
RectangleDraw( FALSE, iScreenWidthOffset + 0, 2 * iScreenHeightOffset + 400, iScreenWidthOffset + 99, 2 * iScreenHeightOffset + 458, usFillColor, pDestBuf );
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
RectangleDraw8( FALSE, iScreenWidthOffset + 0, 2 * iScreenHeightOffset + 400, iScreenWidthOffset + 99, 2 * iScreenHeightOffset + 458, usFillColor, pDestBuf );
|
|
||||||
|
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
|
|
||||||
@@ -2954,6 +2951,23 @@ UINT32 WaitForSelectionWindowResponse( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mousewheel scroll
|
||||||
|
if (_WheelValue > 0)
|
||||||
|
{
|
||||||
|
while (_WheelValue--)
|
||||||
|
{
|
||||||
|
ScrollSelWinUp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (_WheelValue++)
|
||||||
|
{
|
||||||
|
ScrollSelWinDown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_WheelValue = 0;
|
||||||
|
|
||||||
if ( DoWindowSelection( ) )
|
if ( DoWindowSelection( ) )
|
||||||
{
|
{
|
||||||
fSelectionWindow = FALSE;
|
fSelectionWindow = FALSE;
|
||||||
|
|||||||
+60
-36
@@ -29,6 +29,16 @@ extern BOOLEAN fDontUseRandom;
|
|||||||
|
|
||||||
extern UINT16 GenericButtonFillColors[40];
|
extern UINT16 GenericButtonFillColors[40];
|
||||||
|
|
||||||
|
struct SelectionWindow
|
||||||
|
{
|
||||||
|
SGPRect window;
|
||||||
|
SGPPoint displayAreaStart; // Area where selectable items are drawn
|
||||||
|
SGPPoint displayAreaEnd;
|
||||||
|
SGPPoint spacing; // For displayed items
|
||||||
|
};
|
||||||
|
|
||||||
|
SelectionWindow gSelection;
|
||||||
|
|
||||||
BOOLEAN gfRenderSquareArea = FALSE;
|
BOOLEAN gfRenderSquareArea = FALSE;
|
||||||
INT16 iStartClickX,iStartClickY;
|
INT16 iStartClickX,iStartClickY;
|
||||||
INT16 iEndClickX,iEndClickY;
|
INT16 iEndClickX,iEndClickY;
|
||||||
@@ -40,7 +50,6 @@ INT32 iSelectWin,iCancelWin,iScrollUp,iScrollDown,iOkWin;
|
|||||||
BOOLEAN fAllDone=FALSE;
|
BOOLEAN fAllDone=FALSE;
|
||||||
BOOLEAN fButtonsPresent=FALSE;
|
BOOLEAN fButtonsPresent=FALSE;
|
||||||
|
|
||||||
SGPPoint SelWinSpacing, SelWinStartPoint, SelWinEndPoint;
|
|
||||||
|
|
||||||
//These definitions help define the start and end of the various wall indices.
|
//These definitions help define the start and end of the various wall indices.
|
||||||
//This needs to be maintained if the walls change.
|
//This needs to be maintained if the walls change.
|
||||||
@@ -172,6 +181,30 @@ UINT16 SelWinHilightFillColor = 0x23BA; //blue, formerly 0x000d a kind of mediu
|
|||||||
//
|
//
|
||||||
void CreateJA2SelectionWindow( INT16 sWhat )
|
void CreateJA2SelectionWindow( INT16 sWhat )
|
||||||
{
|
{
|
||||||
|
auto selectWinWidth = 600;
|
||||||
|
const auto selectWinHeight = SCREEN_HEIGHT - 120; // From top edge to taskbar
|
||||||
|
if (iResolution > _800x600)
|
||||||
|
{
|
||||||
|
selectWinWidth = 900;
|
||||||
|
}
|
||||||
|
auto tlX = 0;
|
||||||
|
auto tlY = 0;
|
||||||
|
auto brX = tlX + selectWinWidth;
|
||||||
|
auto brY = tlY + selectWinHeight;
|
||||||
|
gSelection.window.iLeft = tlX;
|
||||||
|
gSelection.window.iTop = tlY;
|
||||||
|
gSelection.window.iRight = brX;
|
||||||
|
gSelection.window.iBottom = brY;
|
||||||
|
gSelection.displayAreaStart.iX = tlX + 1;
|
||||||
|
gSelection.displayAreaStart.iY = tlY + 15;
|
||||||
|
gSelection.displayAreaEnd.iX = brX - 1;
|
||||||
|
gSelection.displayAreaEnd.iY= brY - 1;
|
||||||
|
gSelection.spacing.iX = 2;
|
||||||
|
gSelection.spacing.iY = 2;
|
||||||
|
|
||||||
|
iTopWinCutOff = gSelection.displayAreaStart.iY;
|
||||||
|
iBotWinCutOff = gSelection.displayAreaEnd.iY;
|
||||||
|
|
||||||
DisplaySpec *pDSpec;
|
DisplaySpec *pDSpec;
|
||||||
UINT16 usNSpecs;
|
UINT16 usNSpecs;
|
||||||
|
|
||||||
@@ -185,32 +218,33 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
|||||||
iButtonIcons[ SEL_WIN_DOWN_ICON ] = LoadGenericButtonIcon( "EDITOR//lgDownArrow.sti" );
|
iButtonIcons[ SEL_WIN_DOWN_ICON ] = LoadGenericButtonIcon( "EDITOR//lgDownArrow.sti" );
|
||||||
iButtonIcons[ SEL_WIN_OK_ICON ] = LoadGenericButtonIcon( "EDITOR//checkmark.sti" );
|
iButtonIcons[ SEL_WIN_OK_ICON ] = LoadGenericButtonIcon( "EDITOR//checkmark.sti" );
|
||||||
|
|
||||||
iSelectWin = CreateHotSpot(0, 0, 600, 360, MSYS_PRIORITY_HIGH,
|
|
||||||
|
iSelectWin = CreateHotSpot(0, 0, selectWinWidth, selectWinHeight, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, SelWinClkCallback);
|
DEFAULT_MOVE_CALLBACK, SelWinClkCallback);
|
||||||
|
|
||||||
iOkWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_OK_ICON], 0,
|
iOkWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_OK_ICON], 0,
|
||||||
BUTTON_USE_DEFAULT, 600, 0,
|
BUTTON_USE_DEFAULT, selectWinWidth, 0,
|
||||||
40, 40, BUTTON_TOGGLE,
|
40, 40, BUTTON_TOGGLE,
|
||||||
MSYS_PRIORITY_HIGH,
|
MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, OkClkCallback);
|
DEFAULT_MOVE_CALLBACK, OkClkCallback);
|
||||||
SetButtonFastHelpText(iOkWin,pDisplaySelectionWindowButtonText[0]);
|
SetButtonFastHelpText(iOkWin,pDisplaySelectionWindowButtonText[0]);
|
||||||
|
|
||||||
iCancelWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_CANCEL_ICON], 0,
|
iCancelWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_CANCEL_ICON], 0,
|
||||||
BUTTON_USE_DEFAULT, 600, 40,
|
BUTTON_USE_DEFAULT, selectWinWidth, 40,
|
||||||
40, 40, BUTTON_TOGGLE,
|
40, 40, BUTTON_TOGGLE,
|
||||||
MSYS_PRIORITY_HIGH,
|
MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, CnclClkCallback);
|
DEFAULT_MOVE_CALLBACK, CnclClkCallback);
|
||||||
SetButtonFastHelpText(iCancelWin,pDisplaySelectionWindowButtonText[1]);
|
SetButtonFastHelpText(iCancelWin,pDisplaySelectionWindowButtonText[1]);
|
||||||
|
|
||||||
iScrollUp = CreateIconButton((INT16)iButtonIcons[SEL_WIN_UP_ICON], 0,
|
iScrollUp = CreateIconButton((INT16)iButtonIcons[SEL_WIN_UP_ICON], 0,
|
||||||
BUTTON_USE_DEFAULT, 600, 80,
|
BUTTON_USE_DEFAULT, selectWinWidth, 80,
|
||||||
40, 160, BUTTON_NO_TOGGLE,
|
40, 160, BUTTON_NO_TOGGLE,
|
||||||
MSYS_PRIORITY_HIGH,
|
MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, UpClkCallback);
|
DEFAULT_MOVE_CALLBACK, UpClkCallback);
|
||||||
SetButtonFastHelpText(iScrollUp,pDisplaySelectionWindowButtonText[2]);
|
SetButtonFastHelpText(iScrollUp,pDisplaySelectionWindowButtonText[2]);
|
||||||
|
|
||||||
iScrollDown = CreateIconButton((INT16)iButtonIcons[SEL_WIN_DOWN_ICON], 0,
|
iScrollDown = CreateIconButton((INT16)iButtonIcons[SEL_WIN_DOWN_ICON], 0,
|
||||||
BUTTON_USE_DEFAULT, 600, 240,
|
BUTTON_USE_DEFAULT, selectWinWidth, 240,
|
||||||
40, 160, BUTTON_NO_TOGGLE,
|
40, 160, BUTTON_NO_TOGGLE,
|
||||||
MSYS_PRIORITY_HIGH,
|
MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, DwnClkCallback);
|
DEFAULT_MOVE_CALLBACK, DwnClkCallback);
|
||||||
@@ -218,18 +252,6 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
|||||||
|
|
||||||
fButtonsPresent = TRUE;
|
fButtonsPresent = TRUE;
|
||||||
|
|
||||||
SelWinSpacing.iX = 2;
|
|
||||||
SelWinSpacing.iY = 2;
|
|
||||||
|
|
||||||
SelWinStartPoint.iX = 1;
|
|
||||||
SelWinStartPoint.iY = 15;
|
|
||||||
|
|
||||||
iTopWinCutOff = 15;
|
|
||||||
|
|
||||||
SelWinEndPoint.iX = 599;
|
|
||||||
SelWinEndPoint.iY = 359;
|
|
||||||
|
|
||||||
iBotWinCutOff = 359;
|
|
||||||
|
|
||||||
switch( sWhat )
|
switch( sWhat )
|
||||||
{
|
{
|
||||||
@@ -347,8 +369,8 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildDisplayWindow( pDSpec, usNSpecs, &pDispList, &SelWinStartPoint, &SelWinEndPoint,
|
BuildDisplayWindow( pDSpec, usNSpecs, &pDispList, &gSelection.displayAreaStart , &gSelection.displayAreaEnd,
|
||||||
&SelWinSpacing, CLEAR_BACKGROUND);
|
&gSelection.spacing, CLEAR_BACKGROUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -849,12 +871,14 @@ void RenderSelectionWindow( void )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER,
|
ColorFillVideoSurfaceArea(FRAME_BUFFER,
|
||||||
0, 0, 600, 400,
|
gSelection.window.iLeft, gSelection.window.iTop, gSelection.window.iRight, gSelection.window.iBottom,
|
||||||
GenericButtonFillColors[0]);
|
GenericButtonFillColors[0]
|
||||||
|
);
|
||||||
DrawSelections( );
|
DrawSelections( );
|
||||||
MarkButtonsDirty();
|
MarkButtonsDirty();
|
||||||
RenderButtons( );
|
RenderButtons( );
|
||||||
|
|
||||||
|
// Draw selection rectangle
|
||||||
if ( gfRenderSquareArea )
|
if ( gfRenderSquareArea )
|
||||||
{
|
{
|
||||||
button = ButtonList[iSelectWin];
|
button = ButtonList[iSelectWin];
|
||||||
@@ -862,7 +886,7 @@ void RenderSelectionWindow( void )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ( (abs( iStartClickX - button->Area.MouseXPos ) > 9) ||
|
if ( (abs( iStartClickX - button->Area.MouseXPos ) > 9) ||
|
||||||
(abs( iStartClickY - (button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY)) > 9) )
|
(abs( iStartClickY - (button->Area.MouseYPos + iTopWinCutOff - (INT16)gSelection.displayAreaStart.iY)) > 9) )
|
||||||
{
|
{
|
||||||
// iSX = (INT32)iStartClickX;
|
// iSX = (INT32)iStartClickX;
|
||||||
// iEX = (INT32)button->Area.MouseXPos;
|
// iEX = (INT32)button->Area.MouseXPos;
|
||||||
@@ -870,7 +894,7 @@ void RenderSelectionWindow( void )
|
|||||||
// iEY = (INT32)(button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY);
|
// iEY = (INT32)(button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY);
|
||||||
|
|
||||||
iSX = iStartClickX;
|
iSX = iStartClickX;
|
||||||
iSY = iStartClickY - iTopWinCutOff + SelWinStartPoint.iY;
|
iSY = iStartClickY - iTopWinCutOff + gSelection.displayAreaStart.iY;
|
||||||
iEX = gusMouseXPos;
|
iEX = gusMouseXPos;
|
||||||
iEY = gusMouseYPos;
|
iEY = gusMouseYPos;
|
||||||
|
|
||||||
@@ -889,10 +913,10 @@ void RenderSelectionWindow( void )
|
|||||||
iEY ^= iSY;
|
iEY ^= iSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
iEX = min( iEX, 600 );
|
iEX = min( gSelection.displayAreaEnd.iX, iEX);
|
||||||
iSY = max( SelWinStartPoint.iY, iSY );
|
iSY = max( gSelection.displayAreaStart.iY, iSY );
|
||||||
iEY = min( 359, iEY );
|
iEY = min( gSelection.displayAreaEnd.iY, iEY );
|
||||||
iEY = max( SelWinStartPoint.iY, iEY );
|
iEY = max( gSelection.displayAreaStart.iY, iEY );
|
||||||
|
|
||||||
usFillColor = Get16BPPColor(FROMRGB(255, usFillGreen, 0));
|
usFillColor = Get16BPPColor(FROMRGB(255, usFillGreen, 0));
|
||||||
usFillGreen += usDir;
|
usFillGreen += usDir;
|
||||||
@@ -928,7 +952,7 @@ void SelWinClkCallback( GUI_BUTTON *button, INT32 reason )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
iClickX = button->Area.MouseXPos;
|
iClickX = button->Area.MouseXPos;
|
||||||
iClickY = button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY;
|
iClickY = button->Area.MouseYPos + iTopWinCutOff - (INT16)gSelection.displayAreaStart.iY;
|
||||||
|
|
||||||
if (reason & MSYS_CALLBACK_REASON_LBUTTON_DWN)
|
if (reason & MSYS_CALLBACK_REASON_LBUTTON_DWN)
|
||||||
{
|
{
|
||||||
@@ -1035,9 +1059,9 @@ void DisplaySelectionWindowGraphicalInformation()
|
|||||||
UINT16 y;
|
UINT16 y;
|
||||||
//Determine if there is a valid picture at cursor position.
|
//Determine if there is a valid picture at cursor position.
|
||||||
//iRelX = gusMouseXPos;
|
//iRelX = gusMouseXPos;
|
||||||
//iRelY = gusMouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY;
|
//iRelY = gusMouseYPos + iTopWinCutOff - (INT16)gSelection.displayAreaStart.iY;
|
||||||
|
|
||||||
y = gusMouseYPos + iTopWinCutOff - (UINT16)SelWinStartPoint.iY;
|
y = gusMouseYPos + iTopWinCutOff - (UINT16)gSelection.displayAreaStart.iY;
|
||||||
pNode = pDispList;
|
pNode = pDispList;
|
||||||
fDone = FALSE;
|
fDone = FALSE;
|
||||||
while( (pNode != NULL) && !fDone )
|
while( (pNode != NULL) && !fDone )
|
||||||
@@ -1470,10 +1494,10 @@ void DrawSelections( void )
|
|||||||
{
|
{
|
||||||
SGPRect ClipRect, NewRect;
|
SGPRect ClipRect, NewRect;
|
||||||
|
|
||||||
NewRect.iLeft = SelWinStartPoint.iX;
|
NewRect.iLeft = gSelection.displayAreaStart.iX;
|
||||||
NewRect.iTop = SelWinStartPoint.iY;
|
NewRect.iTop = gSelection.displayAreaStart.iY;
|
||||||
NewRect.iRight = SelWinEndPoint.iX;
|
NewRect.iRight = gSelection.displayAreaEnd.iX;
|
||||||
NewRect.iBottom = SelWinEndPoint.iY;
|
NewRect.iBottom = gSelection.displayAreaEnd.iY;
|
||||||
|
|
||||||
GetClippingRect(&ClipRect);
|
GetClippingRect(&ClipRect);
|
||||||
SetClippingRect(&NewRect);
|
SetClippingRect(&NewRect);
|
||||||
@@ -1483,7 +1507,7 @@ void DrawSelections( void )
|
|||||||
SetObjectShade( gvoLargeFontType1, 0 );
|
SetObjectShade( gvoLargeFontType1, 0 );
|
||||||
// SetObjectShade( gvoLargeFont, 0 );
|
// SetObjectShade( gvoLargeFont, 0 );
|
||||||
|
|
||||||
DisplayWindowFunc( pDispList, iTopWinCutOff, iBotWinCutOff, &SelWinStartPoint, CLEAR_BACKGROUND );
|
DisplayWindowFunc( pDispList, iTopWinCutOff, iBotWinCutOff, &gSelection.displayAreaStart, CLEAR_BACKGROUND );
|
||||||
|
|
||||||
SetObjectShade( gvoLargeFontType1, 4 );
|
SetObjectShade( gvoLargeFontType1, 4 );
|
||||||
|
|
||||||
|
|||||||
+1
-17
@@ -14,7 +14,6 @@ set(Ja2Src
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/JA2 Splash.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/JA2 Splash.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Ja25Update.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Ja25Update.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/jascreens.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/jascreens.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Language Defines.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Loading Screen.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Loading Screen.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MainMenuScreen.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/MainMenuScreen.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MessageBoxScreen.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/MessageBoxScreen.cpp"
|
||||||
@@ -28,26 +27,11 @@ set(Ja2Src
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/profiler.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/profiler.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadGame.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadGame.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadScreen.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadScreen.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/SCREENS.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Screens.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Sys Globals.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Sys Globals.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/TimeLogging.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/TimeLogging.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/ub_config.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/ub_config.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_DifficultySettings.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_DifficultySettings.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_IntroFiles.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_IntroFiles.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Layout_MainMenu.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Layout_MainMenu.cpp"
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Res/ja2.rc
|
|
||||||
PARENT_SCOPE)
|
|
||||||
|
|
||||||
set(Ja2_Libraries
|
|
||||||
"${CMAKE_SOURCE_DIR}/libexpatMT.lib"
|
|
||||||
"Dbghelp.lib"
|
|
||||||
Lua
|
|
||||||
"${CMAKE_SOURCE_DIR}/lua51.lib"
|
|
||||||
"${CMAKE_SOURCE_DIR}/lua51.vc9.lib"
|
|
||||||
"Winmm.lib"
|
|
||||||
"${CMAKE_SOURCE_DIR}/SMACKW32.LIB"
|
|
||||||
"${CMAKE_SOURCE_DIR}/binkw32.lib"
|
|
||||||
bfVFS
|
|
||||||
"ws2_32.lib"
|
|
||||||
Multiplayer
|
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#ifndef _CHEATS__H_
|
#ifndef _CHEATS__H_
|
||||||
#define _CHEATS__H_
|
#define _CHEATS__H_
|
||||||
|
|
||||||
#include "Language Defines.h"
|
|
||||||
|
|
||||||
extern UINT8 gubCheatLevel;
|
extern UINT8 gubCheatLevel;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|||||||
+3
-7
@@ -681,13 +681,9 @@ BOOLEAN UpdateSaveBufferWithBackbuffer(void)
|
|||||||
pSrcBuf = LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES);
|
||||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||||
// BLIT HERE
|
0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
|
||||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
|
||||||
}
|
|
||||||
|
|
||||||
UnLockVideoSurface(FRAME_BUFFER);
|
UnLockVideoSurface(FRAME_BUFFER);
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Message.h"
|
#include "Message.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Sys Globals.h"
|
#include "Sys Globals.h"
|
||||||
|
|||||||
@@ -1830,7 +1830,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||||
{
|
{
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720)
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
@@ -1850,7 +1850,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
|
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720 )
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "LibraryDataBase.h"
|
#include "LibraryDataBase.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "INIReader.h"
|
#include "INIReader.h"
|
||||||
#include "Shade Table Util.h"
|
#include "Shade Table Util.h"
|
||||||
@@ -45,7 +44,7 @@
|
|||||||
#include <vfs/Core/vfs_file_raii.h>
|
#include <vfs/Core/vfs_file_raii.h>
|
||||||
#include <vfs/Core/File/vfs_file.h>
|
#include <vfs/Core/File/vfs_file.h>
|
||||||
|
|
||||||
#define GAME_SETTINGS_FILE "Ja2_Settings.INI"
|
#define GAME_SETTINGS_FILE "Ja2_Settings.ini"
|
||||||
|
|
||||||
#define FEATURE_FLAGS_FILE "Ja2_Features.ini"
|
#define FEATURE_FLAGS_FILE "Ja2_Features.ini"
|
||||||
|
|
||||||
@@ -1999,6 +1998,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
||||||
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
||||||
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
||||||
|
gGameExternalOptions.fAlwaysFood = iniReader.ReadBoolean("Tactical Food Settings", "ALWAYS_FOOD", FALSE);
|
||||||
|
|
||||||
//################# Disease Settings ##################
|
//################# Disease Settings ##################
|
||||||
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
||||||
@@ -3794,7 +3794,7 @@ void LoadCTHConstants()
|
|||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_WIS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_WIS",1.0, 0.0, 100.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_WIS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_WIS",1.0, 0.0, 100.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AGI = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_AGI",1.0, 0.0, 100.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AGI = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_AGI",1.0, 0.0, 100.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_EXP_LEVEL = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_EXP_LEVEL",2.0, 0.0, 100.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_EXP_LEVEL = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_EXP_LEVEL",2.0, 0.0, 100.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR",2.0, 1.0, 100.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_AUTO_WEAPONS_DIVISOR = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_AUTO_WEAPONS_DIVISOR",2.0, 1.0, 100.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_TRACER_BONUS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_TRACER_BONUS",10.0, -1000.0, 1000.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_TRACER_BONUS = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_TRACER_BONUS",10.0, -1000.0, 1000.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_ANTICIPATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_ANTICIPATION",25.0, -1000.0, 1000.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_ANTICIPATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_ANTICIPATION",25.0, -1000.0, 1000.0);
|
||||||
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_COMPENSATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_COMPENSATION",2.0, 0.0, 5.0);
|
gGameCTHConstants.RECOIL_COUNTER_ACCURACY_COMPENSATION = iniReader.ReadFloat("Shooting Mechanism","RECOIL_COUNTER_ACCURACY_COMPENSATION",2.0, 0.0, 5.0);
|
||||||
|
|||||||
@@ -506,6 +506,7 @@ typedef struct
|
|||||||
FLOAT sFoodDecayModificator;
|
FLOAT sFoodDecayModificator;
|
||||||
|
|
||||||
BOOLEAN fFoodEatingSounds;
|
BOOLEAN fFoodEatingSounds;
|
||||||
|
BOOLEAN fAlwaysFood;
|
||||||
|
|
||||||
// Flugente: disease settings
|
// Flugente: disease settings
|
||||||
BOOLEAN fDisease;
|
BOOLEAN fDisease;
|
||||||
|
|||||||
+2
-1
@@ -23,7 +23,8 @@ extern CHAR16 zBuildInformation[256];
|
|||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
// you will invalidate the saved game file
|
// you will invalidate the saved game file
|
||||||
|
|
||||||
#define INCREASED_TEAMSIZES 185 // Asdow: SOLDIERTYPE ubID changed from UINT8 -> UINT16
|
#define INCREASED_TEAMSIZES 186 // Asdow: SOLDIERTYPE ubID changed from UINT8 -> UINT16
|
||||||
|
#define MERC_PROFILE_INSERTION_DATA 185 // Bigmap support for AddProfileToMap function
|
||||||
#define GROWTH_MODIFIERS 184
|
#define GROWTH_MODIFIERS 184
|
||||||
#define REBELCOMMAND 183
|
#define REBELCOMMAND 183
|
||||||
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
||||||
|
|||||||
+88
-109
@@ -35,7 +35,6 @@
|
|||||||
#include "tile cache.h"
|
#include "tile cache.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "laptop.h"
|
|
||||||
#include "Shade Table Util.h"
|
#include "Shade Table Util.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Summary Info.h"
|
#include "Summary Info.h"
|
||||||
@@ -51,6 +50,7 @@
|
|||||||
#include "Multilingual Text Code Generator.h"
|
#include "Multilingual Text Code Generator.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "Arms Dealer Init.h"
|
#include "Arms Dealer Init.h"
|
||||||
|
#include "Map Screen Interface Bottom.h"
|
||||||
#include "MPXmlTeams.hpp"
|
#include "MPXmlTeams.hpp"
|
||||||
#include "Strategic Mines LUA.h"
|
#include "Strategic Mines LUA.h"
|
||||||
#include "UndergroundInit.h"
|
#include "UndergroundInit.h"
|
||||||
@@ -76,7 +76,8 @@
|
|||||||
#include "AimArchives.h"
|
#include "AimArchives.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "DynamicDialogueWidget.h" // added by Flugente for InitMyBoxes()
|
#include "DynamicDialogueWidget.h" // added by Flugente for InitMyBoxes()
|
||||||
#include "Animation Data.h" // added by Flugente
|
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
extern INT16 APBPConstants[TOTAL_APBP_VALUES] = {0};
|
||||||
extern INT16 gubMaxActionPoints[TOTALBODYTYPES];//MAXBODYTYPES = 28... JUST GETTING IT TO WORK NOW. GOTTHARD 7/2/08
|
extern INT16 gubMaxActionPoints[TOTALBODYTYPES];//MAXBODYTYPES = 28... JUST GETTING IT TO WORK NOW. GOTTHARD 7/2/08
|
||||||
@@ -134,34 +135,6 @@ static void AddLanguagePrefix(STR fileName, const STR language)
|
|||||||
memmove( fileComponent, language, strlen( language) );
|
memmove( fileComponent, language, strlen( language) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static const STR GetLanguagePrefix()
|
|
||||||
{
|
|
||||||
#ifdef ENGLISH
|
|
||||||
return "";
|
|
||||||
#endif
|
|
||||||
#ifdef GERMAN
|
|
||||||
return GERMAN_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef RUSSIAN
|
|
||||||
return RUSSIAN_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef DUTCH
|
|
||||||
return DUTCH_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef POLISH
|
|
||||||
return POLISH_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef FRENCH
|
|
||||||
return FRENCH_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef ITALIAN
|
|
||||||
return ITALIAN_PREFIX;
|
|
||||||
#endif
|
|
||||||
#ifdef CHINESE
|
|
||||||
return CHINESE_PREFIX;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void AddLanguagePrefix(STR fileName)
|
static void AddLanguagePrefix(STR fileName)
|
||||||
{
|
{
|
||||||
AddLanguagePrefix( fileName, GetLanguagePrefix());
|
AddLanguagePrefix( fileName, GetLanguagePrefix());
|
||||||
@@ -254,7 +227,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, AMMOFILENAME);
|
strcat(fileName, AMMOFILENAME);
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
|
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
@@ -268,9 +241,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, AMMOFILENAME);
|
strcat(fileName, AMMOFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
||||||
}
|
}
|
||||||
#else
|
} else {
|
||||||
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Lesh: added this, begin
|
// Lesh: added this, begin
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -294,14 +267,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
|
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
|
||||||
|
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInItemStats(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInItemStats(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
//if(!WriteItemStats())
|
//if(!WriteItemStats())
|
||||||
// return FALSE;
|
// return FALSE;
|
||||||
@@ -366,14 +339,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat( fileName, DISEASEFILENAME );
|
strcat( fileName, DISEASEFILENAME );
|
||||||
SGP_THROW_IFFALSE( ReadInDiseaseStats( fileName,FALSE ), DISEASEFILENAME );
|
SGP_THROW_IFFALSE( ReadInDiseaseStats( fileName,FALSE ), DISEASEFILENAME );
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInDiseaseStats(fileName,TRUE), DISEASEFILENAME);
|
SGP_THROW_IFFALSE(ReadInDiseaseStats(fileName,TRUE), DISEASEFILENAME);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, STRUCTUREDECONSTRUCTFILENAME);
|
strcat(fileName, STRUCTUREDECONSTRUCTFILENAME);
|
||||||
@@ -411,14 +384,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, LOADSCREENHINTSFILENAME);
|
strcat(fileName, LOADSCREENHINTSFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName, FALSE),LOADSCREENHINTSFILENAME);
|
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName, FALSE),LOADSCREENHINTSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, ARMOURSFILENAME);
|
strcat(fileName, ARMOURSFILENAME);
|
||||||
@@ -438,22 +411,24 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
if (isMultiplayer == false)
|
if (isMultiplayer == false)
|
||||||
{
|
{
|
||||||
using namespace LogicalBodyTypes;
|
using namespace LogicalBodyTypes;
|
||||||
SGP_THROW_IFFALSE(Layers::Instance().LoadFromFile(directoryName, LBT_LAYERSFILENAME), LBT_LAYERSFILENAME);
|
CHAR8 errorBuf[512]{"Failed loading LogicalBodyTypes external data!"};
|
||||||
SGP_THROW_IFFALSE(PaletteDB::Instance().LoadFromFile(directoryName, LBT_PALETTESFILENAME), LBT_PALETTESFILENAME);
|
|
||||||
SGP_THROW_IFFALSE(SurfaceDB::Instance().LoadFromFile(directoryName, LBT_ANIMSURFACESFILENAME), LBT_ANIMSURFACESFILENAME);
|
SGP_THROW_IFFALSE(Layers::Instance().LoadFromFile(directoryName, LBT_LAYERSFILENAME, errorBuf), errorBuf);
|
||||||
SGP_THROW_IFFALSE(FilterDB::Instance().LoadFromFile(directoryName, LBT_FILTERSFILENAME), LBT_FILTERSFILENAME);
|
SGP_THROW_IFFALSE(PaletteDB::Instance().LoadFromFile(directoryName, LBT_PALETTESFILENAME, errorBuf), errorBuf);
|
||||||
SGP_THROW_IFFALSE(BodyTypeDB::Instance().LoadFromFile(directoryName, LBT_BODYTYPESFILENAME), LBT_BODYTYPESFILENAME);
|
SGP_THROW_IFFALSE(SurfaceDB::Instance().LoadFromFile(directoryName, LBT_ANIMSURFACESFILENAME, errorBuf), errorBuf);
|
||||||
|
SGP_THROW_IFFALSE(FilterDB::Instance().LoadFromFile(directoryName, LBT_FILTERSFILENAME, errorBuf), errorBuf);
|
||||||
|
SGP_THROW_IFFALSE(BodyTypeDB::Instance().LoadFromFile(directoryName, LBT_BODYTYPESFILENAME, errorBuf), errorBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInLBEPocketStats(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInLBEPocketStats(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// THE_BOB : added for pocket popup definitions
|
// THE_BOB : added for pocket popup definitions
|
||||||
LBEPocketPopup.clear();
|
LBEPocketPopup.clear();
|
||||||
@@ -461,7 +436,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
|
|
||||||
if (FileExists(fileName))
|
if (FileExists(fileName))
|
||||||
@@ -476,10 +451,10 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||||
}
|
}
|
||||||
#else
|
} else {
|
||||||
// WANNE: Load english file
|
// WANNE: Load english file
|
||||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
@@ -495,14 +470,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, MERCSTARTINGGEARFILENAME);
|
strcat(fileName, MERCSTARTINGGEARFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName, FALSE), MERCSTARTINGGEARFILENAME);
|
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName, FALSE), MERCSTARTINGGEARFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -519,14 +494,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, ATTACHMENTSLOTSFILENAME);
|
strcat(fileName, ATTACHMENTSLOTSFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName, FALSE),ATTACHMENTSLOTSFILENAME);
|
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName, FALSE),ATTACHMENTSLOTSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Flugente: created separate gun and item choices for different soldier classes - read in different xmls
|
// Flugente: created separate gun and item choices for different soldier classes - read in different xmls
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -700,14 +675,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, CITYTABLEFILENAME);
|
strcat(fileName, CITYTABLEFILENAME);
|
||||||
SGP_THROW_IFFALSE(ReadInMapStructure(fileName, FALSE),CITYTABLEFILENAME);
|
SGP_THROW_IFFALSE(ReadInMapStructure(fileName, FALSE),CITYTABLEFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInStrategicMapSectorTownNames(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInStrategicMapSectorTownNames(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Lesh: Strategic movement costs will be read in Strategic\Strategic Movement Costs.cpp,
|
// Lesh: Strategic movement costs will be read in Strategic\Strategic Movement Costs.cpp,
|
||||||
// function BOOLEAN InitStrategicMovementCosts();
|
// function BOOLEAN InitStrategicMovementCosts();
|
||||||
@@ -758,14 +733,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, FALSE),SHIPPINGDESTINATIONSFILENAME);
|
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, FALSE),SHIPPINGDESTINATIONSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, TRUE),fileName);
|
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, TRUE),fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, DELIVERYMETHODSFILENAME);
|
strcat(fileName, DELIVERYMETHODSFILENAME);
|
||||||
@@ -778,14 +753,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,FALSE), FACILITYTYPESFILENAME);
|
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,FALSE), FACILITYTYPESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// HEADROCK HAM 3.4: Read in facility locations
|
// HEADROCK HAM 3.4: Read in facility locations
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -799,14 +774,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,0), SECTORNAMESFILENAME);
|
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,0), SECTORNAMESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,TRUE, 0), fileName);
|
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,TRUE, 0), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// HEADROCK HAM 5: Read in Coolness by Sector
|
// HEADROCK HAM 5: Read in Coolness by Sector
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -828,7 +803,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME25);
|
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME25);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -836,7 +811,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
if(!ReadInMercProfiles(fileName,TRUE))
|
if(!ReadInMercProfiles(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -854,14 +829,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME);
|
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// HEADROCK PROFEX: Read in Merc Opinion data to replace PROF.DAT data
|
// HEADROCK PROFEX: Read in Merc Opinion data to replace PROF.DAT data
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -924,14 +899,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEnemyNames(fileName,FALSE), ENEMYNAMESFILENAME);
|
SGP_THROW_IFFALSE(ReadInEnemyNames(fileName,FALSE), ENEMYNAMESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEnemyNames(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInEnemyNames(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -943,14 +918,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInCivGroupNamesStats(fileName,FALSE), CIVGROUPNAMESFILENAME);
|
SGP_THROW_IFFALSE(ReadInCivGroupNamesStats(fileName,FALSE), CIVGROUPNAMESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInCivGroupNamesStats(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInCivGroupNamesStats(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -960,14 +935,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,FALSE), EMAILSENDERNAMELIST);
|
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,FALSE), EMAILSENDERNAMELIST);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
if (gGameExternalOptions.fEnemyRank == TRUE)
|
if (gGameExternalOptions.fEnemyRank == TRUE)
|
||||||
{
|
{
|
||||||
@@ -977,14 +952,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,FALSE), ENEMYRANKFILENAME);
|
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,FALSE), ENEMYRANKFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: backgrounds
|
// Flugente: backgrounds
|
||||||
@@ -993,14 +968,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,FALSE), BACKGROUNDSFILENAME);
|
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,FALSE), BACKGROUNDSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,TRUE), BACKGROUNDSFILENAME);
|
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,TRUE), BACKGROUNDSFILENAME);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Flugente: individual militia
|
// Flugente: individual militia
|
||||||
strcpy( fileName, directoryName );
|
strcpy( fileName, directoryName );
|
||||||
@@ -1014,14 +989,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,FALSE), CAMPAIGNSTATSEVENTSFILENAME);
|
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,FALSE), CAMPAIGNSTATSEVENTSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,TRUE), CAMPAIGNSTATSEVENTSFILENAME);
|
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,TRUE), CAMPAIGNSTATSEVENTSFILENAME);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// WANNE: Only in a singleplayer game...
|
// WANNE: Only in a singleplayer game...
|
||||||
// Externalised taunts
|
// Externalised taunts
|
||||||
@@ -1042,14 +1017,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, FileInfo.zFileName);
|
strcat(fileName, FileInfo.zFileName);
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
while( GetFileNext(&FileInfo) )
|
while( GetFileNext(&FileInfo) )
|
||||||
{
|
{
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1057,14 +1032,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
strcat(fileName, FileInfo.zFileName);
|
strcat(fileName, FileInfo.zFileName);
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
GetFileClose(&FileInfo);
|
GetFileClose(&FileInfo);
|
||||||
}
|
}
|
||||||
@@ -1076,14 +1051,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInHistorys(fileName,FALSE), HISTORYNAMEFILENAME);
|
SGP_THROW_IFFALSE(ReadInHistorys(fileName,FALSE), HISTORYNAMEFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInHistorys(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInHistorys(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// IMP Portraits List by Jazz
|
// IMP Portraits List by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1091,14 +1066,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,FALSE), IMPPORTRAITS);
|
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,FALSE), IMPPORTRAITS);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
LoadIMPPortraitsTEMP( );
|
LoadIMPPortraitsTEMP( );
|
||||||
|
|
||||||
@@ -1183,14 +1158,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
SGP_THROW_IFFALSE(ReadInFaceGear(zNewFaceGear, fileName), FACEGEARFILENAME);
|
SGP_THROW_IFFALSE(ReadInFaceGear(zNewFaceGear, fileName), FACEGEARFILENAME);
|
||||||
//WriteFaceGear();
|
//WriteFaceGear();
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMercAvailability(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInMercAvailability(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
for(i=0; i<NUM_PROFILES; i++)
|
for(i=0; i<NUM_PROFILES; i++)
|
||||||
{
|
{
|
||||||
@@ -1204,14 +1179,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,FALSE), AIMAVAILABILITY);
|
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,FALSE), AIMAVAILABILITY);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
//Main Menu by Jazz
|
//Main Menu by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1224,7 +1199,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInActionItems(fileName,FALSE), ACTIONITEMSFILENAME);
|
SGP_THROW_IFFALSE(ReadInActionItems(fileName,FALSE), ACTIONITEMSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1232,7 +1207,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
|||||||
if(!ReadInActionItems(fileName,TRUE))
|
if(!ReadInActionItems(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
if ( ReadXMLEmail == TRUE )
|
if ( ReadXMLEmail == TRUE )
|
||||||
{
|
{
|
||||||
@@ -1242,7 +1217,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailMercAvailable(fileName,FALSE), EMAILMERCAVAILABLE);
|
SGP_THROW_IFFALSE(ReadInEmailMercAvailable(fileName,FALSE), EMAILMERCAVAILABLE);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1250,7 +1225,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
if(!ReadInEmailMercAvailable(fileName,TRUE))
|
if(!ReadInEmailMercAvailable(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// EMAIL MERC LEVEL UP by Jazz
|
// EMAIL MERC LEVEL UP by Jazz
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1258,7 +1233,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailMercLevelUp(fileName,FALSE), EMAILMERCLEVELUP);
|
SGP_THROW_IFFALSE(ReadInEmailMercLevelUp(fileName,FALSE), EMAILMERCLEVELUP);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1266,7 +1241,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
if(!ReadInEmailMercLevelUp(fileName,TRUE))
|
if(!ReadInEmailMercLevelUp(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// EMAIL OTHER by Jazz
|
// EMAIL OTHER by Jazz
|
||||||
@@ -1275,7 +1250,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInEmailOther(fileName,FALSE), EMAILOTHER);
|
SGP_THROW_IFFALSE(ReadInEmailOther(fileName,FALSE), EMAILOTHER);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1283,7 +1258,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
if(!ReadInEmailOther(fileName,TRUE))
|
if(!ReadInEmailOther(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
*/
|
*/
|
||||||
//new vehicles by Jazz
|
//new vehicles by Jazz
|
||||||
|
|
||||||
@@ -1294,7 +1269,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInNewVehicles(fileName,FALSE), VEHICLESFILENAME);
|
SGP_THROW_IFFALSE(ReadInNewVehicles(fileName,FALSE), VEHICLESFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1302,9 +1277,9 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
if(!ReadInNewVehicles(fileName,TRUE))
|
if(!ReadInNewVehicles(fileName,TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
@@ -1312,7 +1287,7 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
if(!ReadInLanguageLocation(fileName,TRUE,zlanguageText,0))
|
if(!ReadInLanguageLocation(fileName,TRUE,zlanguageText,0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_BRIEFINGROOM
|
#ifdef ENABLE_BRIEFINGROOM
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -1320,14 +1295,14 @@ if ( ReadXMLEmail == TRUE )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,FALSE,gBriefingRoomData, 4), BRIEFINGROOMFILENAME);
|
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,FALSE,gBriefingRoomData, 4), BRIEFINGROOMFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,TRUE,gBriefingRoomData, 4), fileName);
|
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,TRUE,gBriefingRoomData, 4), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
||||||
|
|
||||||
@@ -1339,14 +1314,14 @@ BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMinerals(fileName,FALSE), MINERALSFILENAME);
|
SGP_THROW_IFFALSE(ReadInMinerals(fileName,FALSE), MINERALSFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInMinerals(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInMinerals(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Old AIM Archive
|
// Old AIM Archive
|
||||||
UINT8 p;
|
UINT8 p;
|
||||||
@@ -1360,14 +1335,14 @@ BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,FALSE), OLDAIMARCHIVEFILENAME);
|
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,FALSE), OLDAIMARCHIVEFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
UINT8 emptyslotsinarchives = 0;
|
UINT8 emptyslotsinarchives = 0;
|
||||||
for (p=0;p<NUM_PROFILES;p++)
|
for (p=0;p<NUM_PROFILES;p++)
|
||||||
{
|
{
|
||||||
@@ -1417,14 +1392,14 @@ BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,FALSE), DIFFICULTYFILENAME);
|
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,FALSE), DIFFICULTYFILENAME);
|
||||||
|
|
||||||
#ifndef ENGLISH
|
if( g_lang != i18n::Lang::en ) {
|
||||||
AddLanguagePrefix(fileName);
|
AddLanguagePrefix(fileName);
|
||||||
if ( FileExists(fileName) )
|
if ( FileExists(fileName) )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,TRUE), fileName);
|
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,TRUE), fileName);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
LuaState::INIT(lua::LUA_STATE_STRATEGIC_MINES_AND_UNDERGROUND, true);
|
LuaState::INIT(lua::LUA_STATE_STRATEGIC_MINES_AND_UNDERGROUND, true);
|
||||||
g_luaUnderground.LoadScript(GetLanguagePrefix());
|
g_luaUnderground.LoadScript(GetLanguagePrefix());
|
||||||
@@ -1498,6 +1473,10 @@ UINT32 InitializeJA2(void)
|
|||||||
return( ERROR_SCREEN );
|
return( ERROR_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InitRadarScreenCoords() depend on Mapscreen Interface Bottom coordinates -> need to initiate them first
|
||||||
|
// before calling InitTacticalEngine()
|
||||||
|
InitMapScreenInterfaceBottomCoords();
|
||||||
|
|
||||||
// Init tactical engine
|
// Init tactical engine
|
||||||
if ( !InitTacticalEngine( ) )
|
if ( !InitTacticalEngine( ) )
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-3
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
BOOLEAN Style_JA = TRUE;
|
BOOLEAN Style_JA = TRUE;
|
||||||
extern INT8 Test = 0;
|
extern INT8 Test = 0;
|
||||||
@@ -726,11 +727,11 @@ void DisplaySirtechSplashScreen()
|
|||||||
* (2006-10-10, Sergeant_Kolja)
|
* (2006-10-10, Sergeant_Kolja)
|
||||||
*/
|
*/
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
# if defined(ENGLISH)
|
if( g_lang == i18n::Lang::en ) {
|
||||||
AssertMsg( 0, String( "Wheter English nor German works. May be You built English - but have only German or other foreign Disk?" ) );
|
AssertMsg( 0, String( "Wheter English nor German works. May be You built English - but have only German or other foreign Disk?" ) );
|
||||||
# elif defined(GERMAN)
|
} else if( g_lang == i18n::Lang::de ) {
|
||||||
AssertMsg( 0, String( "Weder Englisch noch Deutsch geht. Deutsche Version kompiliert und mit englischer CDs gestartet? Das geht nicht!" ) );
|
AssertMsg( 0, String( "Weder Englisch noch Deutsch geht. Deutsche Version kompiliert und mit englischer CDs gestartet? Das geht nicht!" ) );
|
||||||
# endif
|
}
|
||||||
#endif
|
#endif
|
||||||
AssertMsg( 0, String( "Failed to load %s", VObjectDesc.ImageFile ) );
|
AssertMsg( 0, String( "Failed to load %s", VObjectDesc.ImageFile ) );
|
||||||
return;
|
return;
|
||||||
|
|||||||
+2
-4
@@ -12,13 +12,11 @@ void StopIntroVideo();
|
|||||||
//enums used for when the intro screen can come up, used with 'gbIntroScreenMode'
|
//enums used for when the intro screen can come up, used with 'gbIntroScreenMode'
|
||||||
enum EIntroType
|
enum EIntroType
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
|
||||||
INTRO_HELI_CRASH,
|
|
||||||
#endif
|
|
||||||
INTRO_BEGINNING, //set when viewing the intro at the begining of the game
|
INTRO_BEGINNING, //set when viewing the intro at the begining of the game
|
||||||
INTRO_ENDING, //set when viewing the end game video.
|
INTRO_ENDING, //set when viewing the end game video.
|
||||||
|
|
||||||
INTRO_SPLASH,
|
INTRO_SPLASH,
|
||||||
|
// Unfinished Business
|
||||||
|
INTRO_HELI_CRASH
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -5,6 +5,7 @@
|
|||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
UINT32 guiSplashFrameFade = 10;
|
UINT32 guiSplashFrameFade = 10;
|
||||||
UINT32 guiSplashStartTime = 0;
|
UINT32 guiSplashStartTime = 0;
|
||||||
@@ -13,10 +14,10 @@ extern HVSURFACE ghFrameBuffer;
|
|||||||
//Simply create videosurface, load image, and draw it to the screen.
|
//Simply create videosurface, load image, and draw it to the screen.
|
||||||
void InitJA2SplashScreen()
|
void InitJA2SplashScreen()
|
||||||
{
|
{
|
||||||
#ifdef ENGLISH
|
if( g_lang == i18n::Lang::en ) {
|
||||||
ClearMainMenu();
|
ClearMainMenu();
|
||||||
|
|
||||||
#else
|
} else {
|
||||||
UINT32 uiLogoID = 0;
|
UINT32 uiLogoID = 0;
|
||||||
HVSURFACE hVSurface; // unused jonathanl // lalien reenabled for international versions
|
HVSURFACE hVSurface; // unused jonathanl // lalien reenabled for international versions
|
||||||
VSURFACE_DESC VSurfaceDesc; //unused jonathanl // lalien reenabled for international versions
|
VSURFACE_DESC VSurfaceDesc; //unused jonathanl // lalien reenabled for international versions
|
||||||
@@ -69,7 +70,7 @@ void InitJA2SplashScreen()
|
|||||||
GetVideoSurface( &hVSurface, uiLogoID );
|
GetVideoSurface( &hVSurface, uiLogoID );
|
||||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL );
|
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL );
|
||||||
DeleteVideoSurfaceFromIndex( uiLogoID );
|
DeleteVideoSurfaceFromIndex( uiLogoID );
|
||||||
#endif // ENGLISH
|
} // ENGLISH
|
||||||
|
|
||||||
InvalidateScreen();
|
InvalidateScreen();
|
||||||
RefreshScreen( NULL );
|
RefreshScreen( NULL );
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#include "Language Defines.h"
|
|
||||||
|
|
||||||
#if defined(ENGLISH)
|
|
||||||
# pragma message(" (Language set to ENGLISH, You'll need english CDs)")
|
|
||||||
#elif defined(GERMAN)
|
|
||||||
# pragma message(" (Language set to GERMAN, You'll need Topware/german CDs)")
|
|
||||||
#elif defined(RUSSIAN)
|
|
||||||
# pragma message(" (Language set to RUSSIAN, You'll need russian CDs)")
|
|
||||||
#elif defined(DUTCH)
|
|
||||||
# pragma message(" (Language set to DUTCH, You'll need dutch CDs)")
|
|
||||||
#elif defined(POLISH)
|
|
||||||
# pragma message(" (Language set to POLISH, You'll need polish CDs)")
|
|
||||||
#elif defined(FRENCH)
|
|
||||||
# pragma message(" (Language set to FRENCH, You'll need french CDs)")
|
|
||||||
#elif defined(ITALIAN)
|
|
||||||
# pragma message(" (Language set to ITALIAN, You'll need italian CDs)")
|
|
||||||
#elif defined(CHINESE)
|
|
||||||
# pragma message(" (Language set to CHINESE, You'll need chinese CDs)")
|
|
||||||
#else
|
|
||||||
# error "At least You have to specify a Language somewhere. See comments above."
|
|
||||||
#endif
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
#ifndef __LANGUAGE_DEFINES_H
|
|
||||||
#define __LANGUAGE_DEFINES_H
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/* ============================================================================
|
|
||||||
* ONLY ONE OF THESE LANGUAGES CAN BE DEFINED AT A TIME!
|
|
||||||
* BUT now You can define it _here_ by uncommenting one _or_ (better):
|
|
||||||
* You can comment them all out and then set it _global_ in "Preprocessor
|
|
||||||
* options" (do it for ALL projects in the workspace and both debug & release)
|
|
||||||
* _or_
|
|
||||||
* give it do Your MAKEFILE, f.i. make ENGLISH, but keep in mind that some
|
|
||||||
* weird make tools will require 'make ENGLISH=1' instead
|
|
||||||
*
|
|
||||||
* using one of the two later methods will keep this SVN file unchanged for the
|
|
||||||
* future, only Your private project files (workspace/solution) will differ
|
|
||||||
* from the SVN stuff.
|
|
||||||
* (2006-10-10, Sergeant_Kolja)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* The recommend approach for VS2010 multi-language builds is to use the command line or the ja2.props file.
|
|
||||||
|
|
||||||
By default the language is ENGLISH and the Language Prefix is EN.
|
|
||||||
|
|
||||||
There are 3 ways you can build the JA2 1.13 executable file:
|
|
||||||
|
|
||||||
// -------------------------------------------------------
|
|
||||||
// 1. Using the command line
|
|
||||||
// -------------------------------------------------------
|
|
||||||
|
|
||||||
For example, where msbuild is located in %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ if not on your path
|
|
||||||
msbuild.exe /p:Configuration=Release ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=PL /p:JA2Language=POLISH ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=DE /p:JA2Language=GERMAN ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=RU /p:JA2Language=RUSSIAN ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=NL /p:JA2Language=DUTCH ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=FR /p:JA2Language=FRENCH ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=IT /p:JA2Language=ITALIAN ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=CN /p:JA2Language=CHINESE ja2_VS2010.sln
|
|
||||||
|
|
||||||
Note: If you want to build "Unfinished Business" version, just append the /p:JA2Config=JA2UB in the command line
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2Config=JA2UB ja2_VS2010.sln
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=DE /p:JA2Language=GERMAN /p:JA2Config=JA2UB ja2_VS2010.sln
|
|
||||||
|
|
||||||
Note2: You can also specify the target output name with the parameter /p:TargetName
|
|
||||||
msbuild.exe /p:Configuration=Release /p:JA2LangPrefix=DE /p:JA2Language=GERMAN /p:JA2Config=JA2UB /p:TargetName="JA2UB_113" ja2_VS2010.sln
|
|
||||||
|
|
||||||
// --------------------------------------------------------
|
|
||||||
// 2. Editing the ja2.props file and then build in VS 2010
|
|
||||||
// -------------------------------------------------------
|
|
||||||
|
|
||||||
1. Open the "ja2.props" file in a text editor and set the <BuildMacro> tags to your likeing.
|
|
||||||
|
|
||||||
For example: If you want to build Russian Version (normal JA2, not UB) then set the following:
|
|
||||||
|
|
||||||
<BuildMacro Include="JA2Config">
|
|
||||||
<Value></Value>
|
|
||||||
</BuildMacro>
|
|
||||||
<BuildMacro Include="JA2LangPrefix">
|
|
||||||
<Value>RU</Value>
|
|
||||||
</BuildMacro>
|
|
||||||
<BuildMacro Include="JA2Language">
|
|
||||||
<Value>RUSSIAN</Value>
|
|
||||||
</BuildMacro>
|
|
||||||
|
|
||||||
2. Save the file
|
|
||||||
3. Build the project in Visual Studio 2010
|
|
||||||
|
|
||||||
// --------------------------------------------------------
|
|
||||||
// 3. The "old" way for building the executable
|
|
||||||
// -------------------------------------------------------
|
|
||||||
|
|
||||||
1. Enable the "#undef ENGLISH" define below, so English will not be used anymore
|
|
||||||
2. Set the desired language below
|
|
||||||
3. If you want to build "Unfinished Business" version, enable "#define JA2UB" and "#define JA2UBMAPS" in builddefines.h"
|
|
||||||
4. Build the executable in VS 2005 / 2008 / 2010
|
|
||||||
5. The output will be placed in the "Build\bin\" folder
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Only enable this "undef", if you use the 3. way of building the executable!
|
|
||||||
#undef ENGLISH
|
|
||||||
|
|
||||||
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(CHINESE)
|
|
||||||
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
|
|
||||||
|
|
||||||
#define ENGLISH
|
|
||||||
//#define GERMAN
|
|
||||||
//#define RUSSIAN
|
|
||||||
//#define DUTCH
|
|
||||||
//#define FRENCH
|
|
||||||
//#define ITALIAN
|
|
||||||
//#define POLISH
|
|
||||||
|
|
||||||
// INFO: For Chinese 1.13 version, you also have to set USE_WINFONTS = 1 in ja2.ini inside your JA2 installation directory!
|
|
||||||
//#define CHINESE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//**ddd direct link libraries
|
|
||||||
#pragma comment (lib, "user32.lib")
|
|
||||||
#pragma comment (lib, "gdi32.lib")
|
|
||||||
#pragma comment (lib, "advapi32.lib")
|
|
||||||
#pragma comment (lib, "shell32.lib")
|
|
||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* Regardless of if we did it Workspace wide or by uncommenting above,
|
|
||||||
* HERE we must see, what language was selected. If one, we
|
|
||||||
*/
|
|
||||||
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(CHINESE)
|
|
||||||
# error "At least You have to specify a Language somewhere. See comments above."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//if the language represents words as single chars
|
|
||||||
/*#ifdef TAIWAN
|
|
||||||
#define SINGLE_CHAR_WORDS
|
|
||||||
#endif*/
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Message.h"
|
#include "Message.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "SmokeEffects.h"
|
#include "SmokeEffects.h"
|
||||||
|
|||||||
+16
-5
@@ -152,6 +152,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
@@ -1466,7 +1467,17 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
|||||||
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(this->usStrategicInsertionData), sizeof(UINT16), numBytesRead);
|
|
||||||
|
if ( guiCurrentSaveGameVersion >= MERC_PROFILE_INSERTION_DATA )
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof( this->usStrategicInsertionData ), sizeof( UINT32 ), numBytesRead );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(UINT16), sizeof(UINT16), numBytesRead);
|
||||||
|
buffer += 4; // To make numBytesRead check match the struct size. 2 bytes from uint32 - uint16 and 2 bytes due to struct memory layout change when usStrategicInsertionData was increased to uint32
|
||||||
|
}
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
@@ -7057,7 +7068,7 @@ BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GERMAN
|
if( g_lang == i18n::Lang::de ) {
|
||||||
// Fix neutral flags
|
// Fix neutral flags
|
||||||
if ( guiCurrentSaveGameVersion < 94 )
|
if ( guiCurrentSaveGameVersion < 94 )
|
||||||
{
|
{
|
||||||
@@ -7067,7 +7078,7 @@ BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
|||||||
Menptr[ cnt].aiData.bNeutral = FALSE;
|
Menptr[ cnt].aiData.bNeutral = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
//#ifdef JA2UB
|
//#ifdef JA2UB
|
||||||
//if the soldier has the NON weapon version of the merc knofe or merc umbrella
|
//if the soldier has the NON weapon version of the merc knofe or merc umbrella
|
||||||
//ConvertWeapons( &Menptr[ cnt ] );
|
//ConvertWeapons( &Menptr[ cnt ] );
|
||||||
@@ -9749,9 +9760,9 @@ UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GERMAN
|
if( g_lang == i18n::Lang::de ) {
|
||||||
uiEncryptionSet *= 11;
|
uiEncryptionSet *= 11;
|
||||||
#endif
|
}
|
||||||
|
|
||||||
uiEncryptionSet = uiEncryptionSet % 10;
|
uiEncryptionSet = uiEncryptionSet % 10;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef _BUILDDEFINES_H
|
#ifndef _BUILDDEFINES_H
|
||||||
#define _BUILDDEFINES_H
|
#define _BUILDDEFINES_H
|
||||||
|
|
||||||
#include "Language Defines.h"
|
|
||||||
|
|
||||||
//----- Briefing Room (Mission based JA2 like in JA/DG) - by Jazz -----
|
//----- Briefing Room (Mission based JA2 like in JA/DG) - by Jazz -----
|
||||||
// Once enabled here and also enabled in the ja2_options.ini (BRIEFING_ROOM),
|
// Once enabled here and also enabled in the ja2_options.ini (BRIEFING_ROOM),
|
||||||
// you can access the briefing room feature from the laptop
|
// you can access the briefing room feature from the laptop
|
||||||
|
|||||||
+6
-8
@@ -45,10 +45,10 @@
|
|||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "IniReader.h"
|
#include "IniReader.h"
|
||||||
|
|
||||||
#include "sgp_logger.h"
|
#include "sgp_logger.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#define _UNICODE
|
#define _UNICODE
|
||||||
// Networking Stuff
|
// Networking Stuff
|
||||||
@@ -332,7 +332,7 @@ UINT32 InitScreenHandle(void)
|
|||||||
|
|
||||||
if ( ubCurrentScreen == 255 )
|
if ( ubCurrentScreen == 255 )
|
||||||
{
|
{
|
||||||
#ifdef ENGLISH
|
if( g_lang == i18n::Lang::en ) {
|
||||||
if( gfDoneWithSplashScreen )
|
if( gfDoneWithSplashScreen )
|
||||||
{
|
{
|
||||||
ubCurrentScreen = 0;
|
ubCurrentScreen = 0;
|
||||||
@@ -342,9 +342,9 @@ UINT32 InitScreenHandle(void)
|
|||||||
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||||
return( INTRO_SCREEN );
|
return( INTRO_SCREEN );
|
||||||
}
|
}
|
||||||
#else
|
} else {
|
||||||
ubCurrentScreen = 0;
|
ubCurrentScreen = 0;
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ubCurrentScreen == 0 )
|
if ( ubCurrentScreen == 0 )
|
||||||
@@ -397,7 +397,7 @@ UINT32 InitScreenHandle(void)
|
|||||||
// Handle queued .ini file error messages
|
// Handle queued .ini file error messages
|
||||||
int y = 40;
|
int y = 40;
|
||||||
sgp::Logger_ID ini_id = sgp::Logger::instance().createLogger();
|
sgp::Logger_ID ini_id = sgp::Logger::instance().createLogger();
|
||||||
sgp::Logger::instance().connectFile(ini_id, L"iniErrorReport.txt", false, sgp::Logger::FLUSH_ON_DELETE);
|
sgp::Logger::instance().connectFile(ini_id, L"iniErrorReport.log", false, sgp::Logger::FLUSH_ON_DELETE);
|
||||||
sgp::Logger::LogInstance logger = sgp::Logger::instance().logger(ini_id);
|
sgp::Logger::LogInstance logger = sgp::Logger::instance().logger(ini_id);
|
||||||
while (! iniErrorMessages.empty()) {
|
while (! iniErrorMessages.empty()) {
|
||||||
static BOOL iniErrorMessage_create_out_file = TRUE;
|
static BOOL iniErrorMessage_create_out_file = TRUE;
|
||||||
@@ -407,7 +407,7 @@ UINT32 InitScreenHandle(void)
|
|||||||
if (iniErrorMessage_create_out_file)
|
if (iniErrorMessage_create_out_file)
|
||||||
{
|
{
|
||||||
y += 25;
|
y += 25;
|
||||||
swprintf( str, L"%S", "Warning: found the following ini errors. iniErrorReport.txt has been created." );
|
swprintf( str, L"%S", "Warning: found the following ini errors. iniErrorReport.log has been created." );
|
||||||
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||||
iniErrorMessage_create_out_file = FALSE;
|
iniErrorMessage_create_out_file = FALSE;
|
||||||
}
|
}
|
||||||
@@ -943,7 +943,6 @@ void DoneFadeOutForDemoExitScreen( void )
|
|||||||
// unused
|
// unused
|
||||||
//extern INT8 gbFadeSpeed;
|
//extern INT8 gbFadeSpeed;
|
||||||
|
|
||||||
#ifdef GERMAN
|
|
||||||
void DisplayTopwareGermanyAddress()
|
void DisplayTopwareGermanyAddress()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC vo_desc;
|
VOBJECT_DESC vo_desc;
|
||||||
@@ -978,7 +977,6 @@ void DisplayTopwareGermanyAddress()
|
|||||||
ExecuteBaseDirtyRectQueue();
|
ExecuteBaseDirtyRectQueue();
|
||||||
EndFrameBufferRender();
|
EndFrameBufferRender();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
UINT32 DemoExitScreenHandle(void)
|
UINT32 DemoExitScreenHandle(void)
|
||||||
{
|
{
|
||||||
|
|||||||
+7
-1
@@ -238,7 +238,8 @@ void LoadGameUBOptions()
|
|||||||
gGameUBOptions.PowergenSectorGridNo3 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_3", 14155);
|
gGameUBOptions.PowergenSectorGridNo3 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_3", 14155);
|
||||||
gGameUBOptions.PowergenSectorGridNo4 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_4", 13980);
|
gGameUBOptions.PowergenSectorGridNo4 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_GRIDNO_4", 13980);
|
||||||
|
|
||||||
gGameUBOptions.PowergenSectorExitgridGridNo = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_EXITGRID_GRIDNO", 19749);
|
gGameUBOptions.PowergenSectorExitgridGridNo = iniReader.ReadInteger( "Unfinished Business Settings", "POWERGEN_SECTOR_EXITGRID_GRIDNO", 19749 );
|
||||||
|
gGameUBOptions.PowergenSectorExitgridSrcGridNo = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_SECTOR_EXITGRID_SRC_GRIDNO", 10979 );
|
||||||
gGameUBOptions.PowergenFanSoundGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_1", 10979);
|
gGameUBOptions.PowergenFanSoundGridNo1 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_1", 10979);
|
||||||
gGameUBOptions.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
gGameUBOptions.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
||||||
gGameUBOptions.StartFanbackupAgainGridNo = iniReader.ReadInteger("Unfinished Business Settings","START_FANBACKUP_AGAIN_GRIDNO", 10980);
|
gGameUBOptions.StartFanbackupAgainGridNo = iniReader.ReadInteger("Unfinished Business Settings","START_FANBACKUP_AGAIN_GRIDNO", 10980);
|
||||||
@@ -356,6 +357,11 @@ void LoadGameUBOptions()
|
|||||||
gGameUBOptions.H10SectorPlayerQuoteZ = iniReader.ReadInteger("Unfinished Business Settings","H10_SECTOR_PLAYER_QUOTE_Z", 0);
|
gGameUBOptions.H10SectorPlayerQuoteZ = iniReader.ReadInteger("Unfinished Business Settings","H10_SECTOR_PLAYER_QUOTE_Z", 0);
|
||||||
|
|
||||||
|
|
||||||
|
gGameUBOptions.BettyBloodCatSectorX = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_X", 10 );
|
||||||
|
gGameUBOptions.BettyBloodCatSectorY = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Y", 9 );
|
||||||
|
gGameUBOptions.BettyBloodCatSectorZ = iniReader.ReadInteger( "Unfinished Business Settings", "BETTY_BLOODCAT_SECTOR_Z", 0 );
|
||||||
|
|
||||||
|
|
||||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||||
gGameUBOptions.InGameHeliCrash = FALSE;
|
gGameUBOptions.InGameHeliCrash = FALSE;
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ typedef struct
|
|||||||
UINT32 PowergenSectorGridNo3;
|
UINT32 PowergenSectorGridNo3;
|
||||||
UINT32 PowergenSectorGridNo4;
|
UINT32 PowergenSectorGridNo4;
|
||||||
UINT32 PowergenSectorExitgridGridNo;
|
UINT32 PowergenSectorExitgridGridNo;
|
||||||
|
UINT32 PowergenSectorExitgridSrcGridNo;
|
||||||
UINT32 PowergenFanSoundGridNo1;
|
UINT32 PowergenFanSoundGridNo1;
|
||||||
UINT32 PowergenFanSoundGridNo2;
|
UINT32 PowergenFanSoundGridNo2;
|
||||||
UINT32 StartFanbackupAgainGridNo;
|
UINT32 StartFanbackupAgainGridNo;
|
||||||
@@ -220,6 +221,9 @@ typedef struct
|
|||||||
|
|
||||||
UINT8 MaxNumberOfMercs;
|
UINT8 MaxNumberOfMercs;
|
||||||
|
|
||||||
|
INT16 BettyBloodCatSectorX;
|
||||||
|
INT16 BettyBloodCatSectorY;
|
||||||
|
INT8 BettyBloodCatSectorZ;
|
||||||
} GAME_UB_OPTIONS;
|
} GAME_UB_OPTIONS;
|
||||||
|
|
||||||
extern GAME_UB_OPTIONS gGameUBOptions;
|
extern GAME_UB_OPTIONS gGameUBOptions;
|
||||||
|
|||||||
+98
-22
@@ -36,7 +36,6 @@
|
|||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "Strategic Merc Handler.h"
|
#include "Strategic Merc Handler.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
@@ -50,6 +49,7 @@
|
|||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
#include "InterfaceItemImages.h"
|
#include "InterfaceItemImages.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
//
|
//
|
||||||
//****** Defines ******
|
//****** Defines ******
|
||||||
@@ -148,10 +148,16 @@
|
|||||||
#define FEE_X PRICE_X + 7
|
#define FEE_X PRICE_X + 7
|
||||||
#define FEE_Y NAME_Y
|
#define FEE_Y NAME_Y
|
||||||
#define FEE_WIDTH 37
|
#define FEE_WIDTH 37
|
||||||
|
#define FEE_X_UB PRICE_X + 40
|
||||||
|
#define FEE_Y_UB STATS_Y + 28
|
||||||
|
#define FEE_Y_UB_NSGI STATS_Y
|
||||||
|
|
||||||
#define AIM_CONTRACT_X PRICE_X + 51
|
#define AIM_CONTRACT_X PRICE_X + 51
|
||||||
#define AIM_CONTRACT_Y FEE_Y
|
#define AIM_CONTRACT_Y FEE_Y
|
||||||
#define AIM_CONTRACT_WIDTH 59
|
#define AIM_CONTRACT_WIDTH 59
|
||||||
|
#define AIM_CONTRACT_X_UB PRICE_X + 19
|
||||||
|
#define AIM_OFFER_X PRICE_X + 3
|
||||||
|
#define AIM_OFFER_WIDTH 110
|
||||||
|
|
||||||
#define ONEDAY_X AIM_CONTRACT_X
|
#define ONEDAY_X AIM_CONTRACT_X
|
||||||
#define ONEWEEK_X AIM_CONTRACT_X
|
#define ONEWEEK_X AIM_CONTRACT_X
|
||||||
@@ -1120,7 +1126,13 @@ BOOLEAN RenderAIMMembers()
|
|||||||
|
|
||||||
UpdateMercInfo();
|
UpdateMercInfo();
|
||||||
|
|
||||||
|
//Display AIM Member text
|
||||||
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X_NSGI, AIM_MEMBER_ACTIVE_TEXT_Y_NSGI, AIM_MEMBER_ACTIVE_TEXT_WIDTH_NSGI, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
//Draw fee & contract
|
//Draw fee & contract
|
||||||
|
#ifdef JA2UB
|
||||||
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_UB_MISSION_FEE], AIM_CONTRACT_X_UB, AIM_CONTRACT_Y_NSGI, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
#else
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X_NSGI, FEE_Y_NSGI, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X_NSGI, FEE_Y_NSGI, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X_NSGI, AIM_CONTRACT_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X_NSGI, AIM_CONTRACT_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
@@ -1129,9 +1141,6 @@ BOOLEAN RenderAIMMembers()
|
|||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X_NSGI, MARKSMAN_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X_NSGI, MARKSMAN_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X_NSGI, MECHANAICAL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X_NSGI, MECHANAICAL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
//Display AIM Member text
|
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X_NSGI, AIM_MEMBER_ACTIVE_TEXT_Y_NSGI, AIM_MEMBER_ACTIVE_TEXT_WIDTH_NSGI, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
|
||||||
|
|
||||||
//Display Option Gear Cost text
|
//Display Option Gear Cost text
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
@@ -1140,6 +1149,7 @@ BOOLEAN RenderAIMMembers()
|
|||||||
InsertDollarSignInToString( wTemp );
|
InsertDollarSignInToString( wTemp );
|
||||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X_NSGI + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_M_FONT_STATIC_TEXT) + 5;
|
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X_NSGI + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||||
DrawTextToScreen(wTemp, AIM_MEMBER_OPTIONAL_GEAR_COST_X_NSGI, EXPLOSIVE_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(wTemp, AIM_MEMBER_OPTIONAL_GEAR_COST_X_NSGI, EXPLOSIVE_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
#endif // JA2UB
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1163,6 +1173,12 @@ BOOLEAN RenderAIMMembers()
|
|||||||
|
|
||||||
UpdateMercInfo();
|
UpdateMercInfo();
|
||||||
|
|
||||||
|
//Display AIM Member text
|
||||||
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X, AIM_MEMBER_ACTIVE_TEXT_Y, AIM_MEMBER_ACTIVE_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_UB_MISSION_FEE], AIM_CONTRACT_X_UB, AIM_CONTRACT_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
#else
|
||||||
//Draw fee & contract
|
//Draw fee & contract
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X, FEE_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X, FEE_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X, AIM_CONTRACT_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X, AIM_CONTRACT_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
@@ -1172,9 +1188,6 @@ BOOLEAN RenderAIMMembers()
|
|||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X, MARKSMAN_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X, MARKSMAN_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X, MECHANAICAL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X, MECHANAICAL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
|
||||||
//Display AIM Member text
|
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_ACTIVE_MEMBERS], AIM_MEMBER_ACTIVE_TEXT_X, AIM_MEMBER_ACTIVE_TEXT_Y, AIM_MEMBER_ACTIVE_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_M_ACTIVE_MEMBER_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
|
||||||
|
|
||||||
//Display Option Gear Cost text
|
//Display Option Gear Cost text
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
@@ -1183,6 +1196,7 @@ BOOLEAN RenderAIMMembers()
|
|||||||
InsertDollarSignInToString( wTemp );
|
InsertDollarSignInToString( wTemp );
|
||||||
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_M_FONT_STATIC_TEXT) + 5;
|
uiPosX = AIM_MEMBER_OPTIONAL_GEAR_X + StringPixLength( CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_M_FONT_STATIC_TEXT) + 5;
|
||||||
DrawTextToScreen(wTemp, uiPosX, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(wTemp, uiPosX, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DisableAimButton();
|
DisableAimButton();
|
||||||
@@ -1309,6 +1323,10 @@ BOOLEAN UpdateMercInfo(void)
|
|||||||
|
|
||||||
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
if(gGameExternalOptions.gfUseNewStartingGearInterface)
|
||||||
{
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X_UB, FEE_Y_UB_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT);
|
||||||
|
DisplayWrappedString(AIM_OFFER_X, AGILITY_Y_NSGI, AIM_OFFER_WIDTH, 2, AIM_M_FONT_DYNAMIC_TEXT, AIM_FONT_MCOLOR_WHITE, zNewTacticalMessages[TACT_MSG__AIMMEMBER_FEE_TEXT], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
#else
|
||||||
//Display the salaries
|
//Display the salaries
|
||||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH_NSGI, FEE_X_NSGI, HEALTH_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH_NSGI, FEE_X_NSGI, HEALTH_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH_NSGI, FEE_X_NSGI, AGILITY_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH_NSGI, FEE_X_NSGI, AGILITY_Y_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||||
@@ -1335,6 +1353,8 @@ BOOLEAN UpdateMercInfo(void)
|
|||||||
else
|
else
|
||||||
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X_NSGI, AIM_MEDICAL_DEPOSIT_Y_NSGI, AIM_MEDICAL_DEPOSIT_WIDTH_NSGI, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X_NSGI, AIM_MEDICAL_DEPOSIT_Y_NSGI, AIM_MEDICAL_DEPOSIT_WIDTH_NSGI, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
if(!g_bUseXML_Strings)
|
if(!g_bUseXML_Strings)
|
||||||
{
|
{
|
||||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||||
@@ -1363,6 +1383,10 @@ BOOLEAN UpdateMercInfo(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X_UB, FEE_Y_UB, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT);
|
||||||
|
DisplayWrappedString(AIM_OFFER_X, AGILITY_Y, AIM_OFFER_WIDTH, 2, AIM_M_FONT_DYNAMIC_TEXT, AIM_FONT_MCOLOR_WHITE, zNewTacticalMessages[TACT_MSG__AIMMEMBER_FEE_TEXT], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
#else
|
||||||
//Display the salaries
|
//Display the salaries
|
||||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X, AGILITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].uiWeeklySalary, FEE_WIDTH, FEE_X, AGILITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||||
@@ -1389,6 +1413,7 @@ BOOLEAN UpdateMercInfo(void)
|
|||||||
else
|
else
|
||||||
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X, AIM_MEDICAL_DEPOSIT_Y, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X, AIM_MEDICAL_DEPOSIT_Y, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if(!g_bUseXML_Strings)
|
if(!g_bUseXML_Strings)
|
||||||
{
|
{
|
||||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||||
@@ -2529,6 +2554,21 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
|||||||
|
|
||||||
DisplayMercChargeAmount();
|
DisplayMercChargeAmount();
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
if (gubVideoConferencingMode == AIM_VIDEO_HIRE_MERC_MODE)
|
||||||
|
{
|
||||||
|
CHAR16 offerText[190];
|
||||||
|
swprintf(offerText, zNewTacticalMessages[TACT_MSG__AIMMEMBER_ONE_TIME_FEE], gMercProfiles[gbCurrentSoldier].zNickname);
|
||||||
|
const auto xCoord = AIM_MEMBER_VIDEO_CONF_TERMINAL_X + 115;
|
||||||
|
const auto yCoord = AIM_MEMBER_VIDEO_CONF_TERMINAL_Y + 45;
|
||||||
|
const auto textAreaWidth = 245;
|
||||||
|
SetFontShadow(AIM_M_VIDEO_NAME_SHADOWCOLOR);
|
||||||
|
DisplayWrappedString(xCoord, yCoord, textAreaWidth, 2, AIM_M_FONT_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, offerText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
SetFontShadow(DEFAULT_SHADOW);
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
|
|
||||||
// if( gfMercIsTalking && !gfIsAnsweringMachineActive)
|
// if( gfMercIsTalking && !gfIsAnsweringMachineActive)
|
||||||
if( gfMercIsTalking && gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
if( gfMercIsTalking && gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
||||||
{
|
{
|
||||||
@@ -2578,6 +2618,9 @@ BOOLEAN DisplayMercsVideoFace()
|
|||||||
|
|
||||||
void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||||
{
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
return;
|
||||||
|
#else
|
||||||
UINT16 i, usPosY, usPosX;
|
UINT16 i, usPosY, usPosX;
|
||||||
|
|
||||||
//First draw the select light for the contract length buttons
|
//First draw the select light for the contract length buttons
|
||||||
@@ -2631,6 +2674,8 @@ void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
|||||||
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
|
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
|
||||||
}
|
}
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
|
|
||||||
|
#endif // JA2UB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2654,7 +2699,10 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
giContractAmount = 0;
|
giContractAmount = 0;
|
||||||
|
|
||||||
//the contract charge amount
|
//the contract charge amount
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Special offer for a limited time! Act fast!
|
||||||
|
giContractAmount = gMercProfiles[gbCurrentSoldier].uiWeeklySalary;
|
||||||
|
#else
|
||||||
// Get the salary rate
|
// Get the salary rate
|
||||||
if( gubContractLength == AIM_CONTRACT_LENGTH_ONE_DAY)
|
if( gubContractLength == AIM_CONTRACT_LENGTH_ONE_DAY)
|
||||||
giContractAmount = gMercProfiles[gbCurrentSoldier].sSalary;
|
giContractAmount = gMercProfiles[gbCurrentSoldier].sSalary;
|
||||||
@@ -2676,6 +2724,7 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
{
|
{
|
||||||
giContractAmount += gMercProfiles[gbCurrentSoldier].usOptionalGearCost;
|
giContractAmount += gMercProfiles[gbCurrentSoldier].usOptionalGearCost;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2686,10 +2735,15 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
//if the merc hasnt just been hired
|
//if the merc hasnt just been hired
|
||||||
// if( FindSoldierByProfileID( gbCurrentSoldier, TRUE ) == NULL )
|
// if( FindSoldierByProfileID( gbCurrentSoldier, TRUE ) == NULL )
|
||||||
{
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Don't even have to pay for medical insurance! What a DEAL!
|
||||||
|
swprintf(wTemp, L"%s", wDollarTemp);
|
||||||
|
#else
|
||||||
if( gMercProfiles[ gbCurrentSoldier ].bMedicalDeposit )
|
if( gMercProfiles[ gbCurrentSoldier ].bMedicalDeposit )
|
||||||
swprintf(wTemp, L"%s %s", wDollarTemp, VideoConfercingText[AIM_MEMBER_WITH_MEDICAL] );
|
swprintf(wTemp, L"%s %s", wDollarTemp, VideoConfercingText[AIM_MEMBER_WITH_MEDICAL] );
|
||||||
else
|
else
|
||||||
swprintf(wTemp, L"%s", wDollarTemp );
|
swprintf(wTemp, L"%s", wDollarTemp );
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
DrawTextToScreen(wTemp, AIM_CONTRACT_CHARGE_AMOUNNT_X+1, AIM_CONTRACT_CHARGE_AMOUNNT_Y+3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(wTemp, AIM_CONTRACT_CHARGE_AMOUNNT_X+1, AIM_CONTRACT_CHARGE_AMOUNNT_Y+3, 0, AIM_M_VIDEO_CONTRACT_AMOUNT_FONT, AIM_M_VIDEO_CONTRACT_AMOUNT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
@@ -3888,14 +3942,14 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
||||||
|
|
||||||
//Enable the ability to click on the BIG face to go to different screen
|
//Enable the ability to click on the BIG face to go to different screen
|
||||||
MSYS_EnableRegion(&gSelectedFaceRegion);
|
MSYS_EnableRegion(&gSelectedFaceRegion);
|
||||||
|
|
||||||
// EnableDisableCurrentVideoConferenceButtons(FALSE);
|
// EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||||
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
||||||
{
|
{
|
||||||
// Enable the current video conference buttons
|
// Enable the current video conference buttons
|
||||||
EnableDisableCurrentVideoConferenceButtons(FALSE);
|
EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fVideoConferenceCreated = FALSE;
|
fVideoConferenceCreated = FALSE;
|
||||||
@@ -4086,6 +4140,22 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
|
|
||||||
// InitVideoFaceTalking(gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT);
|
// InitVideoFaceTalking(gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT);
|
||||||
DelayMercSpeech( gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT, 750, TRUE, FALSE );
|
DelayMercSpeech( gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT, 750, TRUE, FALSE );
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Disable and hide contract length & gear purchase buttons
|
||||||
|
gfBuyEquipment = TRUE;
|
||||||
|
for (size_t i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
DisableButton(giContractLengthButton[i]);
|
||||||
|
HideButton(giContractLengthButton[i]);
|
||||||
|
|
||||||
|
if (i < 2)
|
||||||
|
{
|
||||||
|
DisableButton(giBuyEquipmentButton[i]);
|
||||||
|
HideButton(giBuyEquipmentButton[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5298,11 +5368,17 @@ BOOLEAN DisplayShadedStretchedMercFace( UINT8 ubMercID, UINT16 usPosX, UINT16 us
|
|||||||
void DemoHiringOfMercs( )
|
void DemoHiringOfMercs( )
|
||||||
{
|
{
|
||||||
INT16 i;
|
INT16 i;
|
||||||
#ifdef GERMAN
|
UINT8 MercID[5];
|
||||||
UINT8 MercID[]={ 7, 10, 4, 14, 50 };
|
MercID[0] = 7;
|
||||||
#else
|
MercID[1] = 10;
|
||||||
UINT8 MercID[]={ 7, 10, 4, 42, 33 };
|
MercID[2] = 4;
|
||||||
#endif
|
if( g_lang == i18n::Lang::de ) {
|
||||||
|
MercID[3] = 14;
|
||||||
|
MercID[4] = 50;
|
||||||
|
} else {
|
||||||
|
MercID[3] = 42;
|
||||||
|
MercID[4] = 33;
|
||||||
|
}
|
||||||
MERC_HIRE_STRUCT HireMercStruct;
|
MERC_HIRE_STRUCT HireMercStruct;
|
||||||
static BOOLEAN fHaveCalledBefore=FALSE;
|
static BOOLEAN fHaveCalledBefore=FALSE;
|
||||||
|
|
||||||
@@ -5393,20 +5469,20 @@ void DisplayPopUpBoxExplainingMercArrivalLocationAndTime( )
|
|||||||
//create the string to display to the user, looks like....
|
//create the string to display to the user, looks like....
|
||||||
// L"%s should arrive at the designated drop-off point ( sector %d:%d %s ) on day %d, at approximately %s.", //first %s is mercs name, next is the sector location and name where they will be arriving in, lastely is the day an the time of arrival
|
// L"%s should arrive at the designated drop-off point ( sector %d:%d %s ) on day %d, at approximately %s.", //first %s is mercs name, next is the sector location and name where they will be arriving in, lastely is the day an the time of arrival
|
||||||
|
|
||||||
#ifdef GERMAN
|
if( g_lang == i18n::Lang::de ) {
|
||||||
//Germans version has a different argument order
|
//Germans version has a different argument order
|
||||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||||
zTimeString,
|
zTimeString,
|
||||||
zSectorIDString );
|
zSectorIDString );
|
||||||
#else
|
} else {
|
||||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||||
zSectorIDString,
|
zSectorIDString,
|
||||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||||
zTimeString );
|
zTimeString );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ TestTable::Display( )
|
|||||||
{
|
{
|
||||||
MSYS_DefineRegion( &it->mMouseRegion[i - mFirstEntryShown],
|
MSYS_DefineRegion( &it->mMouseRegion[i - mFirstEntryShown],
|
||||||
usPosX, usPosY, usPosX + it->GetRequiredLength(), usPosY + heightperrow,
|
usPosX, usPosY, usPosX + it->GetRequiredLength(), usPosY + heightperrow,
|
||||||
MSYS_PRIORITY_HIGHEST, CURSOR_WWW,
|
MSYS_PRIORITY_HIGHEST-3, CURSOR_WWW,
|
||||||
MSYS_NO_CALLBACK, ( *it ).RegionClickCallBack );
|
MSYS_NO_CALLBACK, ( *it ).RegionClickCallBack );
|
||||||
MSYS_AddRegion( &it->mMouseRegion[i - mFirstEntryShown] );
|
MSYS_AddRegion( &it->mMouseRegion[i - mFirstEntryShown] );
|
||||||
|
|
||||||
|
|||||||
+10
-9
@@ -20,6 +20,7 @@
|
|||||||
// HEADROCK HAM 4
|
// HEADROCK HAM 4
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item
|
#include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
|
|
||||||
#define BOBBYR_DEFAULT_MENU_COLOR 255
|
#define BOBBYR_DEFAULT_MENU_COLOR 255
|
||||||
@@ -115,11 +116,7 @@
|
|||||||
#define BOBBYR_ITEM_QTY_NUM_X BOBBYR_GRIDLOC_X + 105//BOBBYR_ITEM_COST_TEXT_X + 1
|
#define BOBBYR_ITEM_QTY_NUM_X BOBBYR_GRIDLOC_X + 105//BOBBYR_ITEM_COST_TEXT_X + 1
|
||||||
#define BOBBYR_ITEM_QTY_NUM_Y BOBBYR_ITEM_QTY_TEXT_Y//BOBBYR_ITEM_COST_TEXT_Y + 40
|
#define BOBBYR_ITEM_QTY_NUM_Y BOBBYR_ITEM_QTY_TEXT_Y//BOBBYR_ITEM_COST_TEXT_Y + 40
|
||||||
|
|
||||||
#ifdef CHINESE
|
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
||||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH - 10 //BOBBYR_ITEM_QTY_NUM_X
|
|
||||||
#else
|
|
||||||
#define BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BOBBY_RAY_NOT_PURCHASED 255
|
#define BOBBY_RAY_NOT_PURCHASED 255
|
||||||
#define BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE 200
|
#define BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE 200
|
||||||
@@ -2506,7 +2503,11 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
|||||||
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED)
|
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED)
|
||||||
{
|
{
|
||||||
swprintf(sTemp, L"% 4d", BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased);
|
swprintf(sTemp, L"% 4d", BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased);
|
||||||
DrawTextToScreen(sTemp, BOBBYR_ITEMS_BOUGHT_X, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
auto bobbyRItemsBoughtX{ BOBBYR_ITEMS_BOUGHT_X };
|
||||||
|
if (g_lang == i18n::Lang::zh) {
|
||||||
|
bobbyRItemsBoughtX -= 10;
|
||||||
|
}
|
||||||
|
DrawTextToScreen(sTemp, bobbyRItemsBoughtX, (UINT16)usPosY, 0, FONT14ARIAL, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2516,11 +2517,11 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
|||||||
//if it's a used item, display how damaged the item is
|
//if it's a used item, display how damaged the item is
|
||||||
if( fUsed )
|
if( fUsed )
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if ( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( sTemp, ChineseSpecString2, LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );//zww
|
swprintf( sTemp, ChineseSpecString2, LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );//zww
|
||||||
#else
|
} else {
|
||||||
swprintf( sTemp, L"*%3d%%%%", LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );
|
swprintf( sTemp, L"*%3d%%%%", LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
DrawTextToScreen(sTemp, (UINT16)(BOBBYR_ITEM_NAME_X-2), (UINT16)(usPosY - BOBBYR_ORDER_NUM_Y_OFFSET), BOBBYR_ORDER_NUM_WIDTH, BOBBYR_ITEM_NAME_TEXT_FONT, BOBBYR_ITEM_NAME_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(sTemp, (UINT16)(BOBBYR_ITEM_NAME_X-2), (UINT16)(usPosY - BOBBYR_ORDER_NUM_Y_OFFSET), BOBBYR_ORDER_NUM_WIDTH, BOBBYR_ITEM_NAME_TEXT_FONT, BOBBYR_ITEM_NAME_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
#include <vfs/Core/File/vfs_file.h>
|
#include <vfs/Core/File/vfs_file.h>
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -488,11 +489,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
||||||
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
||||||
//inshy: fix position of text for buttons
|
//inshy: fix position of text for buttons
|
||||||
#ifdef FRENCH
|
if(g_lang == i18n::Lang::fr) {
|
||||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 13, 10, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 13, 10, TRUE );
|
||||||
#else
|
} else {
|
||||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Accept Order button
|
// Accept Order button
|
||||||
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
||||||
@@ -504,11 +505,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
||||||
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
||||||
//inshy: fix position of text for buttons
|
//inshy: fix position of text for buttons
|
||||||
#ifdef FRENCH
|
if(g_lang == i18n::Lang::fr) {
|
||||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 15, 24, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 15, 24, TRUE );
|
||||||
#else
|
} else {
|
||||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
||||||
#endif
|
}
|
||||||
SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
||||||
|
|
||||||
if( gbSelectedCity == -1 )
|
if( gbSelectedCity == -1 )
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
|
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
|
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
|
||||||
#define NICK_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 195
|
#define NICK_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 195
|
||||||
@@ -552,14 +553,14 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
|||||||
//Heinz (18.01.2009): Russian layout
|
//Heinz (18.01.2009): Russian layout
|
||||||
// ViSoR (07.01.2012) : Russian and Belarussian layouts
|
// ViSoR (07.01.2012) : Russian and Belarussian layouts
|
||||||
//
|
//
|
||||||
#if defined(RUSSIAN) || defined(BELARUSSIAN)
|
if(g_lang == i18n::Lang::ru) {
|
||||||
// ViSoR (02.02.2013): Fix for Cyrillic layouts
|
// ViSoR (02.02.2013): Fix for Cyrillic layouts
|
||||||
DWORD threadId = GetWindowThreadProcessId( ghWindow, 0 );
|
DWORD threadId = GetWindowThreadProcessId( ghWindow, 0 );
|
||||||
DWORD layout = (DWORD)GetKeyboardLayout( threadId ) & 0xFFFF;
|
DWORD layout = (DWORD)GetKeyboardLayout( threadId ) & 0xFFFF;
|
||||||
if( layout == 0x419 ) // Russian
|
if( layout == 0x419 ) // Russian
|
||||||
{
|
{
|
||||||
unsigned char TranslationTable[] =
|
unsigned char TranslationTable[] =
|
||||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨";
|
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨ ";
|
||||||
|
|
||||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||||
@@ -567,28 +568,23 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
|||||||
else if( layout == 0x423 ) // Belarussian
|
else if( layout == 0x423 ) // Belarussian
|
||||||
{
|
{
|
||||||
unsigned char TranslationTable[] =
|
unsigned char TranslationTable[] =
|
||||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨";
|
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨ ";
|
||||||
|
|
||||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||||
}
|
}
|
||||||
else if( !CheckIsKeyValid( uiKey ) )
|
else if( !CheckIsKeyValid( uiKey ) )
|
||||||
uiKey = '#';
|
uiKey = '#';
|
||||||
|
}
|
||||||
if( uiKey != '#')
|
if( (g_lang != i18n::Lang::ru &&
|
||||||
#else
|
uiKey >= 'A' && uiKey <= 'Z' ||
|
||||||
#ifndef USE_CODE_PAGE
|
|
||||||
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
|
||||||
uiKey >= 'a' && uiKey <= 'z' ||
|
uiKey >= 'a' && uiKey <= 'z' ||
|
||||||
uiKey >= '0' && uiKey <= '9' ||
|
uiKey >= '0' && uiKey <= '9' ||
|
||||||
uiKey == '_' || uiKey == '.' ||
|
uiKey == '_' || uiKey == '.' ||
|
||||||
uiKey == ' ' || uiKey == '"' ||
|
uiKey == ' ' || uiKey == '"' ||
|
||||||
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
||||||
)
|
) ||
|
||||||
#else
|
uiKey != '#')
|
||||||
if( charSet::IsFromSet( uiKey, charSet::CS_SPACE|charSet::CS_ALPHA_NUM|charSet::CS_SPECIAL_ALPHA ) )
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// if the current string position is at max or great, do nothing
|
// if the current string position is at max or great, do nothing
|
||||||
switch( ubTextEnterMode )
|
switch( ubTextEnterMode )
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#define IMP_SEEK_AMOUNT 5 * 80 * 2
|
#define IMP_SEEK_AMOUNT 5 * 80 * 2
|
||||||
|
|
||||||
@@ -204,18 +205,18 @@ void PrintImpText( void )
|
|||||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_6, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 81, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_6, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||||
|
|
||||||
//inshy (18.01.2009): fix position for russian text
|
//inshy (18.01.2009): fix position for russian text
|
||||||
#ifdef RUSSIAN
|
if( g_lang == i18n::Lang::ru ) {
|
||||||
// male
|
// male
|
||||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 225, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 225, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||||
// female
|
// female
|
||||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 335, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 335, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||||
#else
|
} else {
|
||||||
// male
|
// male
|
||||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 240, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 240, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||||
|
|
||||||
// female
|
// female
|
||||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 360, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 360, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ( IMP_PERSONALITY ):
|
case ( IMP_PERSONALITY ):
|
||||||
|
|||||||
+116
-40
@@ -418,6 +418,34 @@ BOOLEAN EnterMercsFiles()
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TryToHireMERC()
|
||||||
|
{
|
||||||
|
if ( (gMercProfiles[GetAvailableMercIDFromMERCArray( gubCurMercIndex )].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||||
|
{
|
||||||
|
//bought gear before
|
||||||
|
fMercBuyEquipment = 0;
|
||||||
|
MercProcessHireAfterGear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||||
|
{
|
||||||
|
fMercBuyEquipment = 1;
|
||||||
|
MercProcessHireAfterGear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//prompt to buy gear
|
||||||
|
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
//prompt to buy gear
|
||||||
|
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[MERC_FILES_BUY_GEAR], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
||||||
|
#endif // JA2UB
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
{
|
{
|
||||||
if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
|
||||||
@@ -442,15 +470,7 @@ void SelectMercsFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
TryToHireMERC();
|
||||||
{
|
|
||||||
//bought gear before
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
//prompt to buy gear
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -701,15 +721,7 @@ void BtnMercHireButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
TryToHireMERC();
|
||||||
{
|
|
||||||
//bought gear before
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
//prompt to buy gear
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
@@ -1040,14 +1052,25 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
DrawNumeralsToScreen(gMercProfiles[ ubMercID ].bMedical, 3, MERC_STATS_SECOND_NUM_COL_X, usPosY, MERC_STATS_FONT, ubColor);
|
DrawNumeralsToScreen(gMercProfiles[ ubMercID ].bMedical, 3, MERC_STATS_SECOND_NUM_COL_X, usPosY, MERC_STATS_FONT, ubColor);
|
||||||
usPosY += MERC_SPACE_BN_LINES;
|
usPosY += MERC_SPACE_BN_LINES;
|
||||||
|
|
||||||
//Daily Salary
|
//Merc Salary
|
||||||
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
#ifdef JA2UB
|
||||||
|
// One time "Fee" instead of "Salary" per day
|
||||||
|
DrawTextToScreen( CharacterInfo[AIM_MEMBER_FEE], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength(MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT);
|
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( CharacterInfo[AIM_MEMBER_FEE], MERC_NAME_FONT );
|
||||||
swprintf(sString, L"%d", gMercProfiles[ ubMercID ].sSalary);
|
swprintf( sString, L"%d", gMercProfiles[ubMercID].uiWeeklySalary );
|
||||||
InsertCommasForDollarFigure( sString );
|
InsertCommasForDollarFigure( sString );
|
||||||
InsertDollarSignInToString( sString );
|
InsertDollarSignInToString( sString );
|
||||||
swprintf(sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY]);
|
#else
|
||||||
|
DrawTextToScreen( MercInfo[MERC_FILES_SALARY], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( MercInfo[MERC_FILES_SALARY], MERC_NAME_FONT );
|
||||||
|
swprintf( sString, L"%d", gMercProfiles[ubMercID].sSalary );
|
||||||
|
InsertCommasForDollarFigure( sString );
|
||||||
|
InsertDollarSignInToString( sString );
|
||||||
|
swprintf( sTemp, L" %s", MercInfo[MERC_FILES_PER_DAY] );
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
wcscat( sString, sTemp );
|
wcscat( sString, sTemp );
|
||||||
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
DrawTextToScreen( sString, usPosX, usPosY, 95, MERC_NAME_FONT, MERC_DYNAMIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||||
|
|
||||||
@@ -1059,14 +1082,27 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE)
|
if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE)
|
||||||
{
|
{
|
||||||
//Gear Cost
|
//Gear Cost
|
||||||
usPosY = usPosY + 145;
|
usPosY = usPosY + 148;
|
||||||
DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
if ( (gMercProfiles[ ubMercID ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS )
|
if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
|
||||||
&& ( !(gMercProfiles[ ubMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable ) )
|
&& (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) )
|
||||||
|
{
|
||||||
gMercProfiles[ ubMercID ].usOptionalGearCost = 0;
|
gMercProfiles[ ubMercID ].usOptionalGearCost = 0;
|
||||||
|
}
|
||||||
|
#ifdef JA2UB
|
||||||
|
if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer
|
||||||
|
{
|
||||||
|
gMercProfiles[ubMercID].usOptionalGearCost = 0;
|
||||||
|
|
||||||
swprintf(NsString, L"+ ");
|
// Special offer text above the gear cost
|
||||||
|
const auto y = usPosY - MERC_SPACE_BN_LINES + 2;
|
||||||
|
swprintf( NsString, MercInfo[MERC_FILES_SPECIAL_OFFER] );
|
||||||
|
DrawTextToScreen( NsString, usPosX, y, 95, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
|
swprintf( NsString, L"+ " );
|
||||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost);
|
||||||
InsertCommasForDollarFigure( sTemp );
|
InsertCommasForDollarFigure( sTemp );
|
||||||
InsertDollarSignInToString( sTemp );
|
InsertDollarSignInToString( sTemp );
|
||||||
@@ -1078,7 +1114,11 @@ void DisplayMercsStats( UINT8 ubMercID )
|
|||||||
DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
swprintf(N2sString, L"= ");
|
swprintf(N2sString, L"= ");
|
||||||
|
#ifdef JA2UB
|
||||||
|
swprintf( sTemp, L"%d", gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary );
|
||||||
|
#else
|
||||||
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary);
|
||||||
|
#endif
|
||||||
InsertCommasForDollarFigure( sTemp );
|
InsertCommasForDollarFigure( sTemp );
|
||||||
InsertDollarSignInToString( sTemp );
|
InsertDollarSignInToString( sTemp );
|
||||||
wcscat( N2sString, sTemp );
|
wcscat( N2sString, sTemp );
|
||||||
@@ -1175,6 +1215,22 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
|||||||
return(FALSE);//not enough big ones $$$sATMText
|
return(FALSE);//not enough big ones $$$sATMText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JA2UB
|
||||||
|
Namount = 0;
|
||||||
|
Namount += gMercProfiles[ubMercID].uiWeeklySalary;
|
||||||
|
if ( gSelectedMercKit > 0 )
|
||||||
|
{
|
||||||
|
Namount += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( Namount > LaptopSaveInfo.iCurrentBalance )
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, sATMText[4], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return(FALSE);//not enough big ones $$$sATMText
|
||||||
|
}
|
||||||
|
#endif // JA2UB
|
||||||
|
|
||||||
|
|
||||||
bReturnCode = HireMerc( &HireMercStruct );
|
bReturnCode = HireMerc( &HireMercStruct );
|
||||||
|
|
||||||
//already have limit of mercs on the team
|
//already have limit of mercs on the team
|
||||||
@@ -1196,16 +1252,25 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
|||||||
AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), Namount );
|
AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), Namount );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//add an entry in the finacial page for the hiring of the merc
|
//add an entry in the finacial page for the hiring of the merc
|
||||||
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -(INT32)( gMercProfiles[ubMercID].uiWeeklySalary ) );
|
INT32 totalCost = gMercProfiles[ubMercID].uiWeeklySalary;
|
||||||
#endif
|
if ( gSelectedMercKit > 0 ) // First kit is included in the initial fee
|
||||||
|
{
|
||||||
|
totalCost += gMercProfiles[ubMercID].usOptionalGearCost;
|
||||||
|
}
|
||||||
|
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -totalCost );
|
||||||
|
#endif
|
||||||
|
|
||||||
//JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc
|
//JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc
|
||||||
if ( fMercBuyEquipment )
|
if ( fMercBuyEquipment )
|
||||||
{
|
{
|
||||||
gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS;
|
gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS;
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Gear cost gets added to initial hiring fee in UB
|
||||||
|
#else
|
||||||
gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID;
|
gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID;
|
||||||
|
#endif // JA2UB
|
||||||
}
|
}
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -1305,15 +1370,7 @@ void HandleMercsFilesKeyBoardInput( )
|
|||||||
//else try to hire the merc
|
//else try to hire the merc
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//bought gear before
|
TryToHireMERC();
|
||||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
|
||||||
{
|
|
||||||
fMercBuyEquipment = 0;
|
|
||||||
MercProcessHireAfterGear();
|
|
||||||
}
|
|
||||||
//prompt to buy gear
|
|
||||||
else
|
|
||||||
DoLapTopMessageBox( MSG_BOX_BLUE_ON_GREY, MercInfo[ MERC_FILES_BUY_GEAR ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, MercHireButtonGearYesNoCallback );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1783,11 +1840,22 @@ void MercWeaponKitSelectionUpdate(UINT8 selectedInventory)
|
|||||||
void MercHireButtonGearYesNoCallback (UINT8 bExitValue)
|
void MercHireButtonGearYesNoCallback (UINT8 bExitValue)
|
||||||
{
|
{
|
||||||
//yes, buy gear
|
//yes, buy gear
|
||||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
if ( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
|
{
|
||||||
fMercBuyEquipment = 1;
|
fMercBuyEquipment = 1;
|
||||||
|
}
|
||||||
//no, no gear
|
//no, no gear
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
#ifdef JA2UB
|
||||||
|
// Switch to the free, first kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
fMercBuyEquipment = 1;
|
||||||
|
#else
|
||||||
fMercBuyEquipment = 0;
|
fMercBuyEquipment = 0;
|
||||||
|
#endif // JA2UB
|
||||||
|
}
|
||||||
|
|
||||||
MercProcessHireAfterGear();
|
MercProcessHireAfterGear();
|
||||||
}
|
}
|
||||||
@@ -1810,6 +1878,10 @@ void MercProcessHireAfterGear()
|
|||||||
|
|
||||||
void NextMercMember()
|
void NextMercMember()
|
||||||
{
|
{
|
||||||
|
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
|
||||||
if (gfKeyState [ CTRL ])
|
if (gfKeyState [ CTRL ])
|
||||||
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
||||||
else if (gfKeyState [ SHIFT ])
|
else if (gfKeyState [ SHIFT ])
|
||||||
@@ -1840,6 +1912,10 @@ void NextMercMember()
|
|||||||
|
|
||||||
void PrevMercMember()
|
void PrevMercMember()
|
||||||
{
|
{
|
||||||
|
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||||
|
gSelectedMercKit = 0;
|
||||||
|
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||||
|
|
||||||
if (gfKeyState [ CTRL ])
|
if (gfKeyState [ CTRL ])
|
||||||
gubCurMercIndex = 0;
|
gubCurMercIndex = 0;
|
||||||
else if (gfKeyState [ SHIFT ])
|
else if (gfKeyState [ SHIFT ])
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "../../TileEngine/Isometric Utils.h" // defines NOWHERE
|
#include "../../TileEngine/Isometric Utils.h" // defines NOWHERE
|
||||||
#include "../../Utils/Debug Control.h" // LiveMessage
|
#include "../../Utils/Debug Control.h" // LiveMessage
|
||||||
#include "../../Utils/Font Control.h" // ScreenMsg about deadlock
|
#include "../../Utils/Font Control.h" // ScreenMsg about deadlock
|
||||||
#include "../../Utils/Text.h" // Sniper warning
|
#include <Text.h> // Sniper warning
|
||||||
#include "../../Utils/message.h" // ditto
|
#include "../../Utils/message.h" // ditto
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ extern "C" {
|
|||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||||
|
|
||||||
@@ -12802,26 +12803,7 @@ static int l_GetUsedLanguage( lua_State *L )
|
|||||||
{
|
{
|
||||||
if ( lua_gettop( L ) )
|
if ( lua_gettop( L ) )
|
||||||
{
|
{
|
||||||
INT32 val = 0;
|
INT32 val = static_cast<INT32>(g_lang);
|
||||||
|
|
||||||
#if defined(ENGLISH)
|
|
||||||
val = 0;
|
|
||||||
#elif defined(GERMAN)
|
|
||||||
val = 1;
|
|
||||||
#elif defined(RUSSIAN)
|
|
||||||
val = 2;
|
|
||||||
#elif defined(DUTCH)
|
|
||||||
val = 3;
|
|
||||||
#elif defined(POLISH)
|
|
||||||
val = 4;
|
|
||||||
#elif defined(FRENCH)
|
|
||||||
val = 5;
|
|
||||||
#elif defined(ITALIAN)
|
|
||||||
val = 6;
|
|
||||||
#elif defined(CHINESE)
|
|
||||||
val = 7;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lua_pushinteger( L, val );
|
lua_pushinteger( L, val );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1278,8 +1278,7 @@ void LandHelicopter( void )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
Assert( 0 );
|
//No meanwhiles in UB
|
||||||
//No meanwhiles
|
|
||||||
#else
|
#else
|
||||||
// play meanwhile scene if it hasn't been used yet
|
// play meanwhile scene if it hasn't been used yet
|
||||||
HandleKillChopperMeanwhileScene();
|
HandleKillChopperMeanwhileScene();
|
||||||
|
|||||||
@@ -50,11 +50,11 @@
|
|||||||
#include "Ja25 Strategic Ai.h"
|
#include "Ja25 Strategic Ai.h"
|
||||||
#include "MapScreen Quotes.h"
|
#include "MapScreen Quotes.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "strategicmap.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
struct UILayout_BottomButtons
|
struct UILayout_BottomButtons
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,12 +4,6 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Soldier Control.h"
|
#include "Soldier Control.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef CHINESE //zwwoooooo: Chinese fonts relatively high , so to reduce the number of rows
|
|
||||||
#define MAX_MESSAGES_ON_MAP_BOTTOM 6
|
|
||||||
#else
|
|
||||||
#define MAX_MESSAGES_ON_MAP_BOTTOM 9
|
|
||||||
#endif
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
extern INT8 gbExitingMapScreenToWhere;
|
extern INT8 gbExitingMapScreenToWhere;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
#include "MilitiaSquads.h"
|
#include "MilitiaSquads.h"
|
||||||
|
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
// added by Flugente
|
// added by Flugente
|
||||||
extern CHAR16 gzSectorNames[256][4][MAX_SECTOR_NAME_LENGTH];
|
extern CHAR16 gzSectorNames[256][4][MAX_SECTOR_NAME_LENGTH];
|
||||||
@@ -1199,11 +1200,11 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Map Screen1");
|
|||||||
// don't show loyalty string until loyalty tracking for that town has been started
|
// don't show loyalty string until loyalty tracking for that town has been started
|
||||||
if( gTownLoyalty[ bTown ].fStarted && gfTownUsesLoyalty[ bTown ])
|
if( gTownLoyalty[ bTown ].fStarted && gfTownUsesLoyalty[ bTown ])
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if ( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( sStringA, L"%d%£¥%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
swprintf( sStringA, L"%d%£¥%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
||||||
#else
|
} else {
|
||||||
swprintf( sStringA, L"%d%%%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
swprintf( sStringA, L"%d%%%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// if loyalty is too low to train militia, and militia training is allowed here
|
// if loyalty is too low to train militia, and militia training is allowed here
|
||||||
if ( ( gTownLoyalty[ bTown ].ubRating < iMinLoyaltyToTrain ) && MilitiaTrainingAllowedInTown( bTown ) )
|
if ( ( gTownLoyalty[ bTown ].ubRating < iMinLoyaltyToTrain ) && MilitiaTrainingAllowedInTown( bTown ) )
|
||||||
@@ -4873,11 +4874,11 @@ void BlitMineText( INT16 sMapX, INT16 sMapY )
|
|||||||
// if potential is not nil, show percentage of the two
|
// if potential is not nil, show percentage of the two
|
||||||
if (GetMaxPeriodicRemovalFromMine(ubMineIndex) > 0)
|
if (GetMaxPeriodicRemovalFromMine(ubMineIndex) > 0)
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if ( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( wSubString, L" (%d%£¥%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
swprintf( wSubString, L" (%d%£¥%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||||
#else
|
} else {
|
||||||
swprintf( wSubString, L" (%d%%%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
swprintf( wSubString, L" (%d%%%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
wcscat( wString, wSubString );
|
wcscat( wString, wSubString );
|
||||||
}
|
}
|
||||||
@@ -5282,12 +5283,12 @@ BOOLEAN LoadMilitiaPopUpBox( void )
|
|||||||
// load the militia pop up box
|
// load the militia pop up box
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
if (iResolution >= _640x480 && iResolution < _800x600)
|
if ( isWidescreenUI() || iResolution >= _1024x768)
|
||||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||||
else if (iResolution < _1024x768)
|
else if (iResolution >= _800x600)
|
||||||
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
||||||
else
|
else
|
||||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
||||||
|
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ void EndMeanwhile( )
|
|||||||
{
|
{
|
||||||
// We leave this sector open for our POWs to escape!
|
// We leave this sector open for our POWs to escape!
|
||||||
// Set music mode to enemy present!
|
// Set music mode to enemy present!
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
|
|||||||
@@ -342,8 +342,8 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
// Ja25: no loyalty
|
// Ja25: no loyalty
|
||||||
#else
|
#else
|
||||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||||
UpdateAirspaceControl( );
|
|
||||||
#endif
|
#endif
|
||||||
|
UpdateAirspaceControl( );
|
||||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||||
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1070,7 +1070,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
|||||||
//Disable the options button when the auto resolve screen comes up
|
//Disable the options button when the auto resolve screen comes up
|
||||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||||
|
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gubPBSectorX, gubPBSectorY ) ].SoundTacticalTensor[gubPBSectorZ];
|
GlobalSoundID = MusicSoundValues[ SECTOR( gubPBSectorX, gubPBSectorY ) ].SoundTacticalTensor[gubPBSectorZ];
|
||||||
|
|||||||
@@ -3072,7 +3072,7 @@ BOOLEAN CheckPendingNonPlayerTeam( UINT8 usTeam )
|
|||||||
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||||
{
|
{
|
||||||
//if the current sector is the first part of the town
|
//if the current sector is the first part of the town
|
||||||
if( gWorldSectorX == 10 && gWorldSectorY == 9 && gbWorldSectorZ == 0 )
|
if( gWorldSectorX == BETTY_BLOODCAT_SECTOR_X && gWorldSectorY == BETTY_BLOODCAT_SECTOR_Y && gbWorldSectorZ == BETTY_BLOODCAT_SECTOR_Z )
|
||||||
{
|
{
|
||||||
//if ALL the bloodcats are killed
|
//if ALL the bloodcats are killed
|
||||||
if( pSector->bBloodCats == 0 )
|
if( pSector->bBloodCats == 0 )
|
||||||
|
|||||||
+55
-18
@@ -1609,6 +1609,11 @@ void InitStrategicAI()
|
|||||||
case 1:
|
case 1:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
// (0,0) coordinates signify a not used cache sector
|
||||||
|
if ( gModSettings.ubWeaponCache1X == 0 || gModSettings.ubWeaponCache1Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||||
@@ -1627,6 +1632,10 @@ void InitStrategicAI()
|
|||||||
case 2:
|
case 2:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache2X == 0 || gModSettings.ubWeaponCache2Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||||
@@ -1645,6 +1654,10 @@ void InitStrategicAI()
|
|||||||
case 3:
|
case 3:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache3X == 0 || gModSettings.ubWeaponCache3Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||||
@@ -1663,6 +1676,10 @@ void InitStrategicAI()
|
|||||||
case 4:
|
case 4:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache4X == 0 || gModSettings.ubWeaponCache4Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||||
@@ -1681,6 +1698,10 @@ void InitStrategicAI()
|
|||||||
case 5:
|
case 5:
|
||||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||||
{
|
{
|
||||||
|
if ( gModSettings.ubWeaponCache5X == 0 || gModSettings.ubWeaponCache5Y == 0 )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||||
@@ -1705,25 +1726,40 @@ void InitStrategicAI()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
if ( gModSettings.ubWeaponCache1X != 0 && gModSettings.ubWeaponCache1Y != 0 )
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
{
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y )]; //SEC_E11
|
||||||
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
if ( gModSettings.ubWeaponCache2X != 0 && gModSettings.ubWeaponCache2Y != 0 )
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
{
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y )]; //SEC_H5
|
||||||
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
if ( gModSettings.ubWeaponCache3X != 0 && gModSettings.ubWeaponCache3Y != 0 )
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
{
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y )]; //SEC_H10
|
||||||
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
if ( gModSettings.ubWeaponCache4X != 0 && gModSettings.ubWeaponCache4Y != 0 )
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
{
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y )]; //SEC_J12
|
||||||
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
if ( gModSettings.ubWeaponCache5X != 0 && gModSettings.ubWeaponCache5Y != 0 )
|
||||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
{
|
||||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y )]; //SEC_M9
|
||||||
|
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||||
|
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||||
@@ -7113,15 +7149,16 @@ void InitializeGroup( const GROUP_TYPE groupType, const UINT16 groupSize, UINT16
|
|||||||
tankCount++;
|
tankCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||||
{
|
{
|
||||||
troopCount--;
|
troopCount--;
|
||||||
jeepCount++;
|
jeepCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
||||||
{
|
{
|
||||||
const int numRobots = 1 + Random(difficultyMod);
|
// Limit amount of robots, if randomized difficulty bonus would cause us to go over the troopCount amount
|
||||||
|
const int numRobots = min( (1 + Random(difficultyMod)), troopCount);
|
||||||
troopCount -= numRobots;
|
troopCount -= numRobots;
|
||||||
robotCount += numRobots;
|
robotCount += numRobots;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1085,7 +1085,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set music
|
//Set music
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||||
@@ -2639,6 +2639,7 @@ BOOLEAN PossibleToCoordinateSimultaneousGroupArrivals( GROUP *pFirstGroup )
|
|||||||
{
|
{
|
||||||
if ( pGroup != pFirstGroup && (pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && pGroup->fBetweenSectors &&
|
if ( pGroup != pFirstGroup && (pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && pGroup->fBetweenSectors &&
|
||||||
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
||||||
|
pFirstGroup->ubSectorZ == pGroup->ubSectorZ &&
|
||||||
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
||||||
!IsGroupTheHelicopterGroup( pGroup ) )
|
!IsGroupTheHelicopterGroup( pGroup ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "Luaglobal.h"
|
#include "Luaglobal.h"
|
||||||
#include "LuaInitNPCs.h"
|
#include "LuaInitNPCs.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
extern WorldItems gAllWorldItems;
|
extern WorldItems gAllWorldItems;
|
||||||
@@ -1630,12 +1631,12 @@ void AdjustLoyaltyForCivsEatenByMonsters( INT16 sSectorX, INT16 sSectorY, UINT8
|
|||||||
swprintf( str, gpStrategicString[STR_PB_BANDIT_KILLCIVS_IN_SECTOR], ubHowMany, pSectorString );
|
swprintf( str, gpStrategicString[STR_PB_BANDIT_KILLCIVS_IN_SECTOR], ubHowMany, pSectorString );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
//diffrent order of words in Chinese
|
//diffrent order of words in Chinese
|
||||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], pSectorString, ubHowMany );
|
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], pSectorString, ubHowMany );
|
||||||
#else
|
} else {
|
||||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], ubHowMany, pSectorString );
|
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], ubHowMany, pSectorString );
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ BOOLEAN LuaUnderground::InitializeSectorList()
|
|||||||
.TableOpen()
|
.TableOpen()
|
||||||
.TParam("difficultyLevel", int(gGameOptions.ubDifficultyLevel))
|
.TParam("difficultyLevel", int(gGameOptions.ubDifficultyLevel))
|
||||||
.TParam("gameStyle", int(gGameOptions.ubGameStyle))
|
.TParam("gameStyle", int(gGameOptions.ubGameStyle))
|
||||||
|
.TParam("maxTacticalEnemies", int(gGameExternalOptions.ubGameMaximumNumberOfEnemies))
|
||||||
.TableClose();
|
.TableClose();
|
||||||
|
|
||||||
SGP_THROW_IFFALSE(initsectorlist_func.Call(1), "call to lua function BuildUndergroundSectorList failed");
|
SGP_THROW_IFFALSE(initsectorlist_func.Call(1), "call to lua function BuildUndergroundSectorList failed");
|
||||||
|
|||||||
+12
-24
@@ -11,10 +11,8 @@
|
|||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "screens.h"
|
#include "screens.h"
|
||||||
#include "gameloop.h"
|
|
||||||
#include "overhead.h"
|
#include "overhead.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "input.h"
|
|
||||||
#include "Event Pump.h"
|
#include "Event Pump.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
@@ -44,18 +42,15 @@
|
|||||||
#include "PopUpBox.h"
|
#include "PopUpBox.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
#include "vobject.h"
|
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "interface.h"
|
|
||||||
#include "strategic pathing.h"
|
#include "strategic pathing.h"
|
||||||
#include "Map Screen Interface Bottom.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Strategic Pathing.h"
|
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "points.h"
|
#include "points.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
@@ -114,7 +109,7 @@
|
|||||||
|
|
||||||
#include "connect.h" //hayden
|
#include "connect.h" //hayden
|
||||||
#include "InterfaceItemImages.h"
|
#include "InterfaceItemImages.h"
|
||||||
#include "vobject.h"
|
#include <language.hpp>
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
@@ -4795,9 +4790,6 @@ UINT32 MapScreenHandle(void)
|
|||||||
|
|
||||||
InitPreviousPaths();
|
InitPreviousPaths();
|
||||||
|
|
||||||
// HEADROCK HAM 3.6: Init coordinates for new variable-sized message window
|
|
||||||
InitMapScreenInterfaceBottomCoords();
|
|
||||||
|
|
||||||
// if arrival sector is invalid, reset to A9
|
// if arrival sector is invalid, reset to A9
|
||||||
if ( ( gsMercArriveSectorX < 1 ) || ( gsMercArriveSectorY < 1 ) ||
|
if ( ( gsMercArriveSectorX < 1 ) || ( gsMercArriveSectorY < 1 ) ||
|
||||||
( gsMercArriveSectorX > 16 ) || ( gsMercArriveSectorY > 16 ) )
|
( gsMercArriveSectorX > 16 ) || ( gsMercArriveSectorY > 16 ) )
|
||||||
@@ -9065,12 +9057,8 @@ void RenderMapHighlight( INT16 sMapX, INT16 sMapY, UINT16 usLineColor, BOOLEAN f
|
|||||||
// clip to view region
|
// clip to view region
|
||||||
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + UI_MAP.GridSize.iX, sScreenY + UI_MAP.GridSize.iY - 1, usLineColor, pDestBuf );
|
||||||
{
|
InvalidateRegion( sScreenX, sScreenY - 2, sScreenX + UI_MAP.GridSize.iX + 1 + 1, sScreenY + UI_MAP.GridSize.iY + 1 - 1 );
|
||||||
// DB Need to add a radar color for 8-bit
|
|
||||||
RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + UI_MAP.GridSize.iX, sScreenY + UI_MAP.GridSize.iY - 1, usLineColor, pDestBuf );
|
|
||||||
InvalidateRegion( sScreenX, sScreenY - 2, sScreenX + UI_MAP.GridSize.iX + 1 + 1, sScreenY + UI_MAP.GridSize.iY + 1 - 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
RestoreClipRegionToFullScreenForRectangle( uiDestPitchBYTES );
|
RestoreClipRegionToFullScreenForRectangle( uiDestPitchBYTES );
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
@@ -9673,27 +9661,27 @@ void BltCharInvPanel()
|
|||||||
// print armor/weight/camo labels
|
// print armor/weight/camo labels
|
||||||
mprintf(UI_CHARINV.Text.ArmorLabel.iX, UI_CHARINV.Text.ArmorLabel.iY, pInvPanelTitleStrings[ 0 ] );
|
mprintf(UI_CHARINV.Text.ArmorLabel.iX, UI_CHARINV.Text.ArmorLabel.iY, pInvPanelTitleStrings[ 0 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, ChineseSpecString1 );
|
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, L"%%" );
|
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
mprintf(UI_CHARINV.Text.WeightLabel.iX, UI_CHARINV.Text.WeightLabel.iY, pInvPanelTitleStrings[ 1 ] );
|
mprintf(UI_CHARINV.Text.WeightLabel.iX, UI_CHARINV.Text.WeightLabel.iY, pInvPanelTitleStrings[ 1 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, ChineseSpecString1 );
|
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, L"%%" );
|
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
mprintf(UI_CHARINV.Text.CamoLabel.iX, UI_CHARINV.Text.CamoLabel.iY, pInvPanelTitleStrings[ 2 ] );
|
mprintf(UI_CHARINV.Text.CamoLabel.iX, UI_CHARINV.Text.CamoLabel.iY, pInvPanelTitleStrings[ 2 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, ChineseSpecString1 );
|
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, L"%%" );
|
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
const auto width = UI_CHARINV.Text.PercentWidth;
|
const auto width = UI_CHARINV.Text.PercentWidth;
|
||||||
const auto height = UI_CHARINV.Text.PercentHeight;
|
const auto height = UI_CHARINV.Text.PercentHeight;
|
||||||
|
|||||||
+12
-13
@@ -6671,18 +6671,16 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld( )
|
|||||||
|
|
||||||
if ( guiCurrentScreen == AUTORESOLVE_SCREEN )
|
if ( guiCurrentScreen == AUTORESOLVE_SCREEN )
|
||||||
{
|
{
|
||||||
if ( gWorldSectorX == sBattleSectorX && gWorldSectorY == sBattleSectorY && gbWorldSectorZ == sBattleSectorZ )
|
//Yes, this is and looks like a hack. The conditions of this if statement doesn't work inside
|
||||||
{ //Yes, this is and looks like a hack. The conditions of this if statement doesn't work inside
|
//TrashWorld() or more specifically, TacticalRemoveSoldier() from within TrashWorld(). Because
|
||||||
//TrashWorld() or more specifically, TacticalRemoveSoldier() from within TrashWorld(). Because
|
//we are in the autoresolve screen, soldiers are internally created different (from pointers instead of
|
||||||
//we are in the autoresolve screen, soldiers are internally created different (from pointers instead of
|
//the MercPtrs[]). It keys on the fact that we are in the autoresolve screen. So, by switching the
|
||||||
//the MercPtrs[]). It keys on the fact that we are in the autoresolve screen. So, by switching the
|
//screen, it'll delete the soldiers in the loaded world properly, then later on, once autoresolve is
|
||||||
//screen, it'll delete the soldiers in the loaded world properly, then later on, once autoresolve is
|
//complete, it'll delete the autoresolve soldiers properly. As you can now see, the above if conditions
|
||||||
//complete, it'll delete the autoresolve soldiers properly. As you can now see, the above if conditions
|
//don't change throughout this whole process which makes it necessary to do it this way.
|
||||||
//don't change throughout this whole process which makes it necessary to do it this way.
|
guiCurrentScreen = MAP_SCREEN;
|
||||||
guiCurrentScreen = MAP_SCREEN;
|
TrashWorld( );
|
||||||
TrashWorld( );
|
guiCurrentScreen = AUTORESOLVE_SCREEN;
|
||||||
guiCurrentScreen = AUTORESOLVE_SCREEN;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -7786,6 +7784,7 @@ void HandleMovingEnemiesCloseToEntranceInSecondTunnelMap( )
|
|||||||
|
|
||||||
void HandlePowerGenFanSoundModification( )
|
void HandlePowerGenFanSoundModification( )
|
||||||
{
|
{
|
||||||
|
extern UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO;
|
||||||
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
||||||
|
|
||||||
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
||||||
@@ -7794,7 +7793,7 @@ void HandlePowerGenFanSoundModification( )
|
|||||||
HandleAddingPowerGenFanSound( );
|
HandleAddingPowerGenFanSound( );
|
||||||
|
|
||||||
//MAKE SURE the fan does not have an exit grid
|
//MAKE SURE the fan does not have an exit grid
|
||||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PGF__STOPPED:
|
case PGF__STOPPED:
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# stuff that needs doing
|
||||||
|
# priority (LOW,HIGH) and description
|
||||||
|
|
||||||
|
LOW readd the C4838 (https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4838) warning to CMakeLists.txt once they're all fixed in the code
|
||||||
|
HIGH get rid of ENGLISH, GERMAN, etc preprocessor definitions completely. that way i18n can be built just once and language can be changed in the options screen pending game restart (hotloading will likely require more work)
|
||||||
@@ -1015,7 +1015,7 @@ UINT32 GetArmsDealerItemTypeFromItemNumber( UINT16 usItem )
|
|||||||
return( ARMS_DEALER_MEDICAL );
|
return( ARMS_DEALER_MEDICAL );
|
||||||
else if (ItemIsAttachment(usItem))
|
else if (ItemIsAttachment(usItem))
|
||||||
return( ARMS_DEALER_ATTACHMENTS );
|
return( ARMS_DEALER_ATTACHMENTS );
|
||||||
else if (ItemIsDetonator(usItem) || ItemIsRemoteDetonator(usItem) || ItemIsRemoteTrigger(usItem))
|
else if ( IsAttachmentClass( usItem, (AC_DETONATOR | AC_REMOTEDET) ) || ItemIsRemoteTrigger(usItem))
|
||||||
return( ARMS_DEALER_DETONATORS );
|
return( ARMS_DEALER_DETONATORS );
|
||||||
else
|
else
|
||||||
return( ARMS_DEALER_MISC );
|
return( ARMS_DEALER_MISC );
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
|
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
@@ -1344,10 +1345,10 @@ void HandleDialogue( )
|
|||||||
{
|
{
|
||||||
HandleEveryoneDoneTheirEndGameQuotes();
|
HandleEveryoneDoneTheirEndGameQuotes();
|
||||||
}
|
}
|
||||||
else
|
else if ( QItem.uiSpecialEventData & MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH )
|
||||||
{
|
{
|
||||||
// grab soldier ptr from profile ID
|
// grab soldier ptr from profile ID
|
||||||
pSoldier = FindSoldierByProfileID( (UINT8)QItem.uiSpecialEventData, FALSE );
|
pSoldier = FindSoldierByProfileID( (UINT8)QItem.uiSpecialEventData2, FALSE );
|
||||||
|
|
||||||
// FindSoldier was returning a lot of nullptrs which would crash the game very quickly after Jerry gets up. This check is here to circumvent that.
|
// FindSoldier was returning a lot of nullptrs which would crash the game very quickly after Jerry gets up. This check is here to circumvent that.
|
||||||
if (pSoldier != nullptr)
|
if (pSoldier != nullptr)
|
||||||
@@ -2408,8 +2409,8 @@ CHAR8 *GetDialogueDataFilename( UINT8 ubCharacterNum, UINT16 usQuoteNum, BOOLEAN
|
|||||||
{
|
{
|
||||||
if ( fWavFile )
|
if ( fWavFile )
|
||||||
{
|
{
|
||||||
#ifdef RUSSIAN
|
if ( g_lang == i18n::Lang::ru &&
|
||||||
if ( ( gMercProfiles[ubCharacterNum].Type == PROFILETYPE_RPC ||
|
( gMercProfiles[ubCharacterNum].Type == PROFILETYPE_RPC ||
|
||||||
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_NPC ||
|
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_NPC ||
|
||||||
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_VEHICLE ) && gMercProfiles[ ubCharacterNum ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
|
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_VEHICLE ) && gMercProfiles[ ubCharacterNum ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
|
||||||
{
|
{
|
||||||
@@ -2427,7 +2428,7 @@ CHAR8 *GetDialogueDataFilename( UINT8 ubCharacterNum, UINT16 usQuoteNum, BOOLEAN
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// build name of wav file (characternum + quotenum)
|
// build name of wav file (characternum + quotenum)
|
||||||
sprintf( zFileNameHelper, "SPEECH\\%03d_%03d", usVoiceSet, usQuoteNum );
|
sprintf( zFileNameHelper, "SPEECH\\%03d_%03d", usVoiceSet, usQuoteNum );
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ enum DialogQuoteIDs
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x20000000
|
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x20000000
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x10000000
|
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x10000000
|
||||||
|
#define MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH 0x08000000
|
||||||
#else
|
#else
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x00000001
|
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x00000001
|
||||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x00000002
|
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x00000002
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "fresh_header.h"
|
#include "fresh_header.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Explosion Control.h"
|
#include "Explosion Control.h"
|
||||||
@@ -1490,7 +1491,7 @@ void SetDoorString( INT32 sGridNo )
|
|||||||
// ATE: If here, we try to say, opened or closed...
|
// ATE: If here, we try to say, opened or closed...
|
||||||
if ( gfUIIntTileLocation2 == FALSE )
|
if ( gfUIIntTileLocation2 == FALSE )
|
||||||
{
|
{
|
||||||
#ifdef GERMAN
|
if( g_lang == i18n::Lang::de ) {
|
||||||
|
|
||||||
wcscpy( gzIntTileLocation2, TacticalStr[ DOOR_DOOR_MOUSE_DESCRIPTION ] );
|
wcscpy( gzIntTileLocation2, TacticalStr[ DOOR_DOOR_MOUSE_DESCRIPTION ] );
|
||||||
gfUIIntTileLocation2 = TRUE;
|
gfUIIntTileLocation2 = TRUE;
|
||||||
@@ -1533,7 +1534,7 @@ void SetDoorString( INT32 sGridNo )
|
|||||||
gfUIIntTileLocation = TRUE;
|
gfUIIntTileLocation = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
} else {
|
||||||
|
|
||||||
// Try to get doors status here...
|
// Try to get doors status here...
|
||||||
pDoorStatus = GetDoorStatus( sGridNo );
|
pDoorStatus = GetDoorStatus( sGridNo );
|
||||||
@@ -1574,7 +1575,7 @@ void SetDoorString( INT32 sGridNo )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2355,7 +2355,8 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
break;
|
break;
|
||||||
case NPC_ACTION_HAVE_PACOS_FOLLOW:
|
case NPC_ACTION_HAVE_PACOS_FOLLOW:
|
||||||
pSoldier = FindSoldierByProfileID( 114, FALSE );
|
pSoldier = FindSoldierByProfileID( 114, FALSE );
|
||||||
sGridNo = 18193; //dnl!!!
|
sGridNo = 8537; //dnl!!!
|
||||||
|
//kitty: changed gridno from 18193 to 8537, that's at entrance door to rebel basement, where Fatima and Dimitri dialogue happens
|
||||||
if (pSoldier)
|
if (pSoldier)
|
||||||
{
|
{
|
||||||
if (NewOKDestination( pSoldier, sGridNo, TRUE, 0 ) )
|
if (NewOKDestination( pSoldier, sGridNo, TRUE, 0 ) )
|
||||||
@@ -4334,7 +4335,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
|||||||
case NPC_ACTION_PUT_PACOS_IN_BASEMENT:
|
case NPC_ACTION_PUT_PACOS_IN_BASEMENT:
|
||||||
gMercProfiles[ PACOS ].sSectorX = 10;
|
gMercProfiles[ PACOS ].sSectorX = 10;
|
||||||
gMercProfiles[ PACOS ].sSectorY = MAP_ROW_A;
|
gMercProfiles[ PACOS ].sSectorY = MAP_ROW_A;
|
||||||
gMercProfiles[ PACOS ].bSectorZ = 0;
|
gMercProfiles[ PACOS ].bSectorZ = 1; //kitty: fixed - first level underground is 1, not 0
|
||||||
break;
|
break;
|
||||||
case NPC_ACTION_HISTORY_ASSASSIN:
|
case NPC_ACTION_HISTORY_ASSASSIN:
|
||||||
AddHistoryToPlayersLog( HISTORY_ASSASSIN, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
AddHistoryToPlayersLog( HISTORY_ASSASSIN, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
||||||
|
|||||||
+256
-256
File diff suppressed because it is too large
Load Diff
+182
-60
@@ -57,7 +57,6 @@
|
|||||||
#include "game clock.h"
|
#include "game clock.h"
|
||||||
#include "squads.h"
|
#include "squads.h"
|
||||||
#include "MessageBoxScreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Map Screen Interface Map Inventory.h"
|
#include "Map Screen Interface Map Inventory.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
@@ -83,6 +82,7 @@
|
|||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
|
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25_Tactical.h"
|
#include "Ja25_Tactical.h"
|
||||||
@@ -7412,11 +7412,11 @@ void RenderItemDescriptionBox( )
|
|||||||
FindFontRightCoordinates( gODBItemDescRegions[0][0].sLeft, gODBItemDescRegions[0][0].sTop, gODBItemDescRegions[0][0].sRight - gODBItemDescRegions[0][0].sLeft, gODBItemDescRegions[0][0].sBottom - gODBItemDescRegions[0][0].sTop ,pStr, BLOCKFONT2, &usX, &usY);
|
FindFontRightCoordinates( gODBItemDescRegions[0][0].sLeft, gODBItemDescRegions[0][0].sTop, gODBItemDescRegions[0][0].sRight - gODBItemDescRegions[0][0].sLeft, gODBItemDescRegions[0][0].sBottom - gODBItemDescRegions[0][0].sTop ,pStr, BLOCKFONT2, &usX, &usY);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
wcscat( pStr, ChineseSpecString1 );
|
wcscat( pStr, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
wcscat( pStr, L"%%" );
|
wcscat( pStr, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
mprintf( usX, usY, pStr );
|
mprintf( usX, usY, pStr );
|
||||||
}
|
}
|
||||||
@@ -11183,11 +11183,11 @@ void SetupPickupPage( INT8 bPage )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString3, sValue );
|
swprintf( pStr, ChineseSpecString3, sValue );
|
||||||
#else
|
} else {
|
||||||
swprintf( pStr, L"%d%%", sValue );
|
swprintf( pStr, L"%d%%", sValue );
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetRegionFastHelpText( &(gItemPickupMenu.Regions[ cnt - iStart ]), pStr );
|
SetRegionFastHelpText( &(gItemPickupMenu.Regions[ cnt - iStart ]), pStr );
|
||||||
@@ -12285,12 +12285,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
|
|
||||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString11,
|
swprintf( pStr, ChineseSpecString11,
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s (%s) [%d%%(%d%%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
ItemNames[ usItem ],
|
||||||
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||||
sValue,
|
sValue,
|
||||||
@@ -12309,16 +12305,32 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s (%s) [%d%%(%d%%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||||
|
sValue,
|
||||||
|
sThreshold,
|
||||||
|
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||||
|
accuracy,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject),
|
||||||
|
gWeaponStatsDesc[ 10 ], //Range String
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GunRange( pObject, NULL )/10 : GunRange( pObject, NULL ), // SANDRO - added argument //Modified Range
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GetModifiedGunRange(usItem)/10 : GetModifiedGunRange(usItem), //Gun Range
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
(Weapon[ usItem ].ubReadyTime * (100 - GetPercentReadyTimeAPReduction( pObject )) / 100), // Ready AP's
|
||||||
|
apStr, //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString4,
|
swprintf( pStr, ChineseSpecString4,
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
ItemNames[ usItem ],
|
||||||
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||||
sValue,
|
sValue,
|
||||||
@@ -12336,6 +12348,28 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
swprintf( pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||||
|
sValue,
|
||||||
|
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||||
|
accuracy,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject),
|
||||||
|
gWeaponStatsDesc[ 10 ], //Range String
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GunRange( pObject, NULL )/10 : GunRange( pObject, NULL ), // SANDRO - added argument //Modified Range
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GetModifiedGunRange(usItem)/10 : GetModifiedGunRange(usItem), //Gun Range
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
(Weapon[ usItem ].ubReadyTime * (100 - GetPercentReadyTimeAPReduction( pObject )) / 100), // Ready AP's
|
||||||
|
apStr, //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -12384,12 +12418,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
|
|
||||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, L"%s [%d%£¥(%d%£¥)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
swprintf( pStr, L"%s [%d%£¥(%d%£¥)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
ItemNames[ usItem ],
|
||||||
sValue,
|
sValue,
|
||||||
sThreshold,
|
sThreshold,
|
||||||
@@ -12407,15 +12437,31 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
sValue,
|
||||||
|
sThreshold,
|
||||||
|
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||||
|
accuracy,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject),
|
||||||
|
gWeaponStatsDesc[ 10 ], //Range String
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GunRange( pObject, NULL )/10 : GunRange( pObject, NULL ), // SANDRO - added argument //Modified Range
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GetModifiedGunRange(usItem)/10 : GetModifiedGunRange(usItem), //Gun Range
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
(Weapon[ usItem ].ubReadyTime * (100 - GetPercentReadyTimeAPReduction( pObject )) / 100), // Ready AP's
|
||||||
|
apStr, //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, L"%s [%d%£¥]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
swprintf( pStr, L"%s [%d%£¥]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
ItemNames[ usItem ],
|
||||||
sValue,
|
sValue,
|
||||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||||
@@ -12432,6 +12478,25 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
sValue,
|
||||||
|
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||||
|
accuracy,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject),
|
||||||
|
gWeaponStatsDesc[ 10 ], //Range String
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GunRange( pObject, NULL )/10 : GunRange( pObject, NULL ), // SANDRO - added argument //Modified Range
|
||||||
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? GetModifiedGunRange(usItem)/10 : GetModifiedGunRange(usItem), //Gun Range
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
(Weapon[ usItem ].ubReadyTime * (100 - GetPercentReadyTimeAPReduction( pObject )) / 100), // Ready AP's
|
||||||
|
apStr, //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -12442,13 +12507,9 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
{
|
{
|
||||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString9,
|
swprintf( pStr, ChineseSpecString9,
|
||||||
#else
|
ItemNames[ usItem ],
|
||||||
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d\n%s %d\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
|
||||||
sValue,
|
sValue,
|
||||||
sThreshold,
|
sThreshold,
|
||||||
gWeaponStatsDesc[ 11 ], //Damage String
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
@@ -12459,16 +12520,26 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
sValue,
|
||||||
|
sThreshold,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject), //Melee damage
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], pObject, pSoldier ), //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString5,
|
swprintf( pStr, ChineseSpecString5,
|
||||||
#else
|
ItemNames[ usItem ],
|
||||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
|
||||||
sValue,
|
sValue,
|
||||||
gWeaponStatsDesc[ 11 ], //Damage String
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
GetDamage(pObject), //Melee damage
|
GetDamage(pObject), //Melee damage
|
||||||
@@ -12478,6 +12549,19 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
sValue,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
GetDamage(pObject), //Melee damage
|
||||||
|
gWeaponStatsDesc[ 6 ], //AP String
|
||||||
|
BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], pObject, pSoldier ), //AP's
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -12517,13 +12601,9 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
UINT16 explDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubDamage, 0 );
|
UINT16 explDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubDamage, 0 );
|
||||||
UINT16 explStunDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage, 1 );
|
UINT16 explStunDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage, 1 );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString5,
|
swprintf( pStr, ChineseSpecString5,
|
||||||
#else
|
ItemNames[ usItem ],
|
||||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ],
|
|
||||||
sValue,
|
sValue,
|
||||||
gWeaponStatsDesc[ 11 ], //Damage String
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
explDamage,
|
explDamage,
|
||||||
@@ -12533,6 +12613,19 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ],
|
||||||
|
sValue,
|
||||||
|
gWeaponStatsDesc[ 11 ], //Damage String
|
||||||
|
explDamage,
|
||||||
|
gWeaponStatsDesc[ 13 ], //Stun Damage String
|
||||||
|
explStunDamage, //Stun Damage
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -12562,12 +12655,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
|
|
||||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString10,
|
swprintf( pStr, ChineseSpecString10,
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ], //Item long name
|
ItemNames[ usItem ], //Item long name
|
||||||
sValue, //Item condition
|
sValue, //Item condition
|
||||||
sThreshold, //repair threshold
|
sThreshold, //repair threshold
|
||||||
@@ -12581,15 +12670,27 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ], //Item long name
|
||||||
|
sValue, //Item condition
|
||||||
|
sThreshold, //repair threshold
|
||||||
|
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||||
|
iProtection, //Protection rating in % based on best armor
|
||||||
|
Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100,
|
||||||
|
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
|
||||||
|
pInvPanelTitleStrings[ 3 ], //Camo string
|
||||||
|
GetCamoBonus(pObject)+GetUrbanCamoBonus(pObject)+GetDesertCamoBonus(pObject)+GetSnowCamoBonus(pObject), //Camo bonus
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight string
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString6,
|
swprintf( pStr, ChineseSpecString6,
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s [%d%%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ItemNames[ usItem ], //Item long name
|
ItemNames[ usItem ], //Item long name
|
||||||
sValue, //Item condition
|
sValue, //Item condition
|
||||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||||
@@ -12602,6 +12703,21 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ], //Item long name
|
||||||
|
sValue, //Item condition
|
||||||
|
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||||
|
iProtection, //Protection rating in % based on best armor
|
||||||
|
Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100,
|
||||||
|
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
|
||||||
|
pInvPanelTitleStrings[ 3 ], //Camo string
|
||||||
|
GetCamoBonus(pObject)+GetUrbanCamoBonus(pObject)+GetDesertCamoBonus(pObject)+GetSnowCamoBonus(pObject), //Camo bonus
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight string
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -12614,17 +12730,23 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
// The final, and typical case, is that of an item with a percent status
|
// The final, and typical case, is that of an item with a percent status
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
swprintf( pStr, ChineseSpecString7,
|
swprintf( pStr, ChineseSpecString7,
|
||||||
#else
|
|
||||||
swprintf( pStr, L"%s [%d%%]\n%s %1.1f %s",
|
|
||||||
#endif
|
|
||||||
ItemNames[ usItem ], //Item long name
|
ItemNames[ usItem ], //Item long name
|
||||||
sValue, //Item condition
|
sValue, //Item condition
|
||||||
gWeaponStatsDesc[ 12 ], //Weight String
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
fWeight, //Weight
|
fWeight, //Weight
|
||||||
GetWeightUnitString() //Weight units
|
GetWeightUnitString() //Weight units
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
swprintf( pStr, L"%s [%d%%]\n%s %1.1f %s",
|
||||||
|
ItemNames[ usItem ], //Item long name
|
||||||
|
sValue, //Item condition
|
||||||
|
gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
|
fWeight, //Weight
|
||||||
|
GetWeightUnitString() //Weight units
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,8 @@
|
|||||||
|
|
||||||
//legion by Jazz
|
//legion by Jazz
|
||||||
#include "Interface Utils.h"
|
#include "Interface Utils.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
class SOLDIERTYPE;
|
class SOLDIERTYPE;
|
||||||
@@ -2748,27 +2750,27 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
|||||||
|
|
||||||
mprintf( SM_ARMOR_LABEL_X - StringPixLength( pInvPanelTitleStrings[0], BLOCKFONT2 ) / 2, SM_ARMOR_LABEL_Y, pInvPanelTitleStrings[ 0 ] );
|
mprintf( SM_ARMOR_LABEL_X - StringPixLength( pInvPanelTitleStrings[0], BLOCKFONT2 ) / 2, SM_ARMOR_LABEL_Y, pInvPanelTitleStrings[ 0 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf( SM_ARMOR_PERCENT_X, SM_ARMOR_PERCENT_Y, ChineseSpecString1 );
|
mprintf( SM_ARMOR_PERCENT_X, SM_ARMOR_PERCENT_Y, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf( SM_ARMOR_PERCENT_X, SM_ARMOR_PERCENT_Y, L"%%" );
|
mprintf( SM_ARMOR_PERCENT_X, SM_ARMOR_PERCENT_Y, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
mprintf( SM_WEIGHT_LABEL_X - StringPixLength( pInvPanelTitleStrings[1], BLOCKFONT2 ), SM_WEIGHT_LABEL_Y, pInvPanelTitleStrings[ 1 ] );
|
mprintf( SM_WEIGHT_LABEL_X - StringPixLength( pInvPanelTitleStrings[1], BLOCKFONT2 ), SM_WEIGHT_LABEL_Y, pInvPanelTitleStrings[ 1 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf( SM_WEIGHT_PERCENT_X, SM_WEIGHT_PERCENT_Y, ChineseSpecString1 );
|
mprintf( SM_WEIGHT_PERCENT_X, SM_WEIGHT_PERCENT_Y, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf( SM_WEIGHT_PERCENT_X, SM_WEIGHT_PERCENT_Y, L"%%" );
|
mprintf( SM_WEIGHT_PERCENT_X, SM_WEIGHT_PERCENT_Y, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
mprintf( SM_CAMMO_LABEL_X - StringPixLength( pInvPanelTitleStrings[2], BLOCKFONT2 ), SM_CAMMO_LABEL_Y, pInvPanelTitleStrings[ 2 ] );
|
mprintf( SM_CAMMO_LABEL_X - StringPixLength( pInvPanelTitleStrings[2], BLOCKFONT2 ), SM_CAMMO_LABEL_Y, pInvPanelTitleStrings[ 2 ] );
|
||||||
|
|
||||||
#ifdef CHINESE
|
if( g_lang == i18n::Lang::zh ) {
|
||||||
mprintf( SM_CAMMO_PERCENT_X, SM_CAMMO_PERCENT_Y, ChineseSpecString1 );
|
mprintf( SM_CAMMO_PERCENT_X, SM_CAMMO_PERCENT_Y, ChineseSpecString1 );
|
||||||
#else
|
} else {
|
||||||
mprintf( SM_CAMMO_PERCENT_X, SM_CAMMO_PERCENT_Y, L"%%" );
|
mprintf( SM_CAMMO_PERCENT_X, SM_CAMMO_PERCENT_Y, L"%%" );
|
||||||
#endif
|
}
|
||||||
|
|
||||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeAgilityTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & AGIL_INCREASE ? TRUE : FALSE), (BOOLEAN)((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_AGILITY] > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraAgility != 0 ); // SANDRO
|
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeAgilityTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & AGIL_INCREASE ? TRUE : FALSE), (BOOLEAN)((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_AGILITY] > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraAgility != 0 ); // SANDRO
|
||||||
|
|
||||||
|
|||||||
+3
-16
@@ -459,14 +459,7 @@ BOOLEAN InitializeTacticalInterface( )
|
|||||||
|
|
||||||
// failing the CHECKF after this will cause you to lose your mouse
|
// failing the CHECKF after this will cause you to lose your mouse
|
||||||
|
|
||||||
if ( GETPIXELDEPTH() == 8 )
|
strcpy( vs_desc.ImageFile, "INTERFACE\\IN_TEXT.STI" );
|
||||||
{
|
|
||||||
strcpy( vs_desc.ImageFile, "INTERFACE\\IN_TEXT_8.pcx" );
|
|
||||||
}
|
|
||||||
else if ( GETPIXELDEPTH() == 16 )
|
|
||||||
{
|
|
||||||
strcpy( vs_desc.ImageFile, "INTERFACE\\IN_TEXT.STI" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !AddVideoSurface( &vs_desc, &guiINTEXT ) )
|
if( !AddVideoSurface( &vs_desc, &guiINTEXT ) )
|
||||||
AssertMsg( 0, "Missing INTERFACE\\In_text.sti");
|
AssertMsg( 0, "Missing INTERFACE\\In_text.sti");
|
||||||
@@ -3556,10 +3549,7 @@ void DrawBarsInUIBox( SOLDIERTYPE *pSoldier , INT16 sXPos, INT16 sYPos, INT16 sW
|
|||||||
}
|
}
|
||||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||||
{
|
{
|
||||||
if(gbPixelDepth==16)
|
RectangleDraw( TRUE, sXPos+1, sYPos-1, sXPos+sWidth+3, sYPos+1+interval*3, color16, pDestBuf);
|
||||||
RectangleDraw( TRUE, sXPos+1, sYPos-1, sXPos+sWidth+3, sYPos+1+interval*3, color16, pDestBuf);
|
|
||||||
else
|
|
||||||
RectangleDraw8( TRUE, sXPos+1, sYPos-1, sXPos+sWidth+3, sYPos+1+interval*3, color8, pDestBuf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5805,10 +5795,7 @@ void DrawBar( INT32 x, INT32 y, INT32 width, INT32 height, UINT16 color8, UINT16
|
|||||||
{
|
{
|
||||||
for( INT32 i=0; i < height; i++ )
|
for( INT32 i=0; i < height; i++ )
|
||||||
{
|
{
|
||||||
if(gbPixelDepth==16)
|
LineDraw( TRUE, x, y+i, x+width-1, y+i, color16, pDestBuf );
|
||||||
LineDraw( TRUE, x, y+i, x+width-1, y+i, color16, pDestBuf );
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
LineDraw8( TRUE, x, y+i, x+width-1, y+i, color8, pDestBuf );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-27
@@ -738,18 +738,18 @@ extern OBJECTTYPE gTempObject;
|
|||||||
// note that these should not be used to determine what kind of an attachment an item is, that is determined by attachmentclass and the AC_xxx flags above
|
// note that these should not be used to determine what kind of an attachment an item is, that is determined by attachmentclass and the AC_xxx flags above
|
||||||
#define BLOOD_BAG 0x00000001 //1 // this item is a blood bag can can be used to boost surgery
|
#define BLOOD_BAG 0x00000001 //1 // this item is a blood bag can can be used to boost surgery
|
||||||
#define MANPAD 0x00000002 //2 // this item is a MAn-Portable Air-Defense System
|
#define MANPAD 0x00000002 //2 // this item is a MAn-Portable Air-Defense System
|
||||||
#define BEARTRAP 0x00000004 //4 // a mechanical trap that does no explosion, but causes leg damage to whoever activates it
|
#define BEARTRAP 0x00000004 //4 // a mechanical trap that does no explosion, but causes leg damage to whoever activates it
|
||||||
#define CAMERA 0x00000008 //8
|
#define CAMERA 0x00000008 //8
|
||||||
|
|
||||||
#define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in
|
#define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in
|
||||||
#define MEAT_BLOODCAT 0x00000020 //32 // retrieve this by gutting a bloodcat
|
#define MEAT_BLOODCAT 0x00000020 //32 // retrieve this by gutting a bloodcat
|
||||||
#define MEAT_COW 0x00000040 //64 // retrieve this by gutting a cow
|
#define MEAT_COW 0x00000040 //64 // retrieve this by gutting a cow
|
||||||
#define BELT_FED 0x00000080 //128 // item can be fed externally
|
#define BELT_FED 0x00000080 //128 // item can be fed externally
|
||||||
|
|
||||||
#define AMMO_BELT 0x00000100 //256 // this item can be used to feed externally
|
#define AMMO_BELT 0x00000100 //256 // this item can be used to feed externally
|
||||||
#define AMMO_BELT_VEST 0x00000200 //512 // this is a vest that can contain AMMO_BELT items in its medium slots
|
#define AMMO_BELT_VEST 0x00000200 //512 // this is a vest that can contain AMMO_BELT items in its medium slots
|
||||||
#define CAMO_REMOVAL 0x00000400 //1024 // item can be used to remove camo
|
#define CAMO_REMOVAL 0x00000400 //1024 // item can be used to remove camo
|
||||||
#define CLEANING_KIT 0x00000800 //2048 // weapon cleaning kit
|
#define CLEANING_KIT 0x00000800 //2048 // weapon cleaning kit
|
||||||
|
|
||||||
#define ATTENTION_ITEM 0x00001000 //4096 // this item is 'interesting' to the AI. Dumb soldiers may try to pick it up
|
#define ATTENTION_ITEM 0x00001000 //4096 // this item is 'interesting' to the AI. Dumb soldiers may try to pick it up
|
||||||
#define GAROTTE 0x00002000 //8192 // this item is a garotte
|
#define GAROTTE 0x00002000 //8192 // this item is a garotte
|
||||||
@@ -758,18 +758,18 @@ extern OBJECTTYPE gTempObject;
|
|||||||
|
|
||||||
#define SKIN_BLOODCAT 0x00010000 //65536 // retrieve this by skinning (=decapitating) a bloodcat
|
#define SKIN_BLOODCAT 0x00010000 //65536 // retrieve this by skinning (=decapitating) a bloodcat
|
||||||
#define NO_METAL_DETECTION 0x00020000 //131072 // a planted bomb with this flag can NOT be detected via metal detector. Use sparingly!
|
#define NO_METAL_DETECTION 0x00020000 //131072 // a planted bomb with this flag can NOT be detected via metal detector. Use sparingly!
|
||||||
#define JUMP_GRENADE 0x00040000 //262144 // add +25 heigth to explosion, used for bouncing grenades and jumping mines
|
#define JUMP_GRENADE 0x00040000 //262144 // add +25 heigth to explosion, used for bouncing grenades and jumping mines
|
||||||
#define HANDCUFFS 0x00080000 //524288 // item can be used to capture soldiers
|
#define HANDCUFFS 0x00080000 //524288 // item can be used to capture soldiers
|
||||||
|
|
||||||
#define TASER 0x00100000 //1048576 // item is a taser, melee hits with this will drain breath (if batteries are supplied)
|
#define TASER 0x00100000 //1048576 // item is a taser, melee hits with this will drain breath (if batteries are supplied)
|
||||||
#define SCUBA_BOTTLE 0x00200000 //2097152 // item is a scuba gear air bottle
|
#define SCUBA_BOTTLE 0x00200000 //2097152 // item is a scuba gear air bottle
|
||||||
#define SCUBA_MASK 0x00400000 //4194304 // item is a scuba gear breathing mask
|
#define SCUBA_MASK 0x00400000 //4194304 // item is a scuba gear breathing mask
|
||||||
#define SCUBA_FINS 0x00800000 //8388608 // this item speed up swimming, but slows walking and running
|
#define SCUBA_FINS 0x00800000 //8388608 // this item speed up swimming, but slows walking and running
|
||||||
|
|
||||||
#define TRIPWIREROLL 0x01000000 //16777216 // this item is a tripwire roll
|
#define TRIPWIREROLL 0x01000000 //16777216 // this item is a tripwire roll
|
||||||
#define RADIO_SET 0x02000000 //33554432 // item can be used to radio militia/squads in other sectors
|
#define RADIO_SET 0x02000000 //33554432 // item can be used to radio militia/squads in other sectors
|
||||||
#define SIGNAL_SHELL 0x04000000 //67108864 // this is a signal shell that precedes artillery barrages
|
#define SIGNAL_SHELL 0x04000000 //67108864 // this is a signal shell that precedes artillery barrages
|
||||||
#define SODA 0x08000000 //134217728 // item is a can of soda, sold in vending machines
|
#define SODA 0x08000000 //134217728 // item is a can of soda, sold in vending machines
|
||||||
|
|
||||||
#define ROOF_COLLAPSE_ITEM 0x10000000 //268435456 // this item is required in the collapsing of roof tiles. It is used internally and should never be seen by the player
|
#define ROOF_COLLAPSE_ITEM 0x10000000 //268435456 // this item is required in the collapsing of roof tiles. It is used internally and should never be seen by the player
|
||||||
#define DISEASEPROTECTION_1 0x20000000 //536870912 // this item protects us from getting diseases by human contact if kept in inventory
|
#define DISEASEPROTECTION_1 0x20000000 //536870912 // this item protects us from getting diseases by human contact if kept in inventory
|
||||||
@@ -787,40 +787,40 @@ extern OBJECTTYPE gTempObject;
|
|||||||
#define ITEM_sinks 0x0000004000000000
|
#define ITEM_sinks 0x0000004000000000
|
||||||
#define ITEM_showstatus 0x0000008000000000
|
#define ITEM_showstatus 0x0000008000000000
|
||||||
|
|
||||||
#define ITEM_hiddenaddon 0x0000010000000000
|
#define ITEM_hiddenaddon 0x0000010000000000
|
||||||
#define ITEM_twohanded 0x0000020000000000
|
#define ITEM_twohanded 0x0000020000000000
|
||||||
#define ITEM_notbuyable 0x0000040000000000
|
#define ITEM_notbuyable 0x0000040000000000
|
||||||
#define ITEM_attachment 0x0000080000000000
|
#define ITEM_attachment 0x0000080000000000
|
||||||
|
|
||||||
#define ITEM_hiddenattachment 0x0000100000000000
|
#define ITEM_hiddenattachment 0x0000100000000000
|
||||||
#define ITEM_biggunlist 0x0000200000000000
|
#define ITEM_biggunlist 0x0000200000000000
|
||||||
#define ITEM_notineditor 0x0000400000000000
|
#define ITEM_notineditor 0x0000400000000000
|
||||||
#define ITEM_defaultundroppable 0x0000800000000000
|
#define ITEM_defaultundroppable 0x0000800000000000
|
||||||
|
|
||||||
#define ITEM_unaerodynamic 0x0001000000000000
|
#define ITEM_unaerodynamic 0x0001000000000000
|
||||||
#define ITEM_electronic 0x0002000000000000
|
#define ITEM_electronic 0x0002000000000000
|
||||||
#define ITEM_cannon 0x0004000000000000
|
#define ITEM_cannon 0x0004000000000000
|
||||||
#define ITEM_rocketrifle 0x0008000000000000
|
#define ITEM_rocketrifle 0x0008000000000000
|
||||||
|
|
||||||
#define ITEM_fingerprintid 0x0010000000000000
|
#define ITEM_fingerprintid 0x0010000000000000
|
||||||
#define ITEM_metaldetector 0x0020000000000000
|
#define ITEM_metaldetector 0x0020000000000000
|
||||||
#define ITEM_gasmask 0x0040000000000000
|
#define ITEM_gasmask 0x0040000000000000
|
||||||
#define ITEM_lockbomb 0x0080000000000000
|
#define ITEM_lockbomb 0x0080000000000000
|
||||||
|
|
||||||
#define ITEM_flare 0x0100000000000000
|
#define ITEM_flare 0x0100000000000000
|
||||||
#define ITEM_grenadelauncher 0x0200000000000000
|
#define ITEM_grenadelauncher 0x0200000000000000
|
||||||
#define ITEM_mortar 0x0400000000000000
|
#define ITEM_mortar 0x0400000000000000
|
||||||
#define ITEM_duckbill 0x0800000000000000
|
#define ITEM_duckbill 0x0800000000000000
|
||||||
|
|
||||||
#define ITEM_detonator 0x1000000000000000
|
//UNUSED #define ITEM_detonator 0x1000000000000000
|
||||||
#define ITEM_remotedetonator 0x2000000000000000
|
//UNUSED #define ITEM_remotedetonator 0x2000000000000000
|
||||||
#define ITEM_hidemuzzleflash 0x4000000000000000
|
#define ITEM_hidemuzzleflash 0x4000000000000000
|
||||||
#define ITEM_rocketlauncher 0x8000000000000000
|
#define ITEM_rocketlauncher 0x8000000000000000
|
||||||
|
|
||||||
// New UINT64 Item Flag => usItemFlag2
|
// New UINT64 Item Flag => usItemFlag2
|
||||||
#define ITEM_singleshotrocketlauncher 0x00000001
|
#define ITEM_singleshotrocketlauncher 0x00000001
|
||||||
#define ITEM_brassknuckles 0x00000002
|
#define ITEM_brassknuckles 0x00000002
|
||||||
#define ITEM_crowbar 0x00000004
|
#define ITEM_crowbar 0x00000004
|
||||||
#define ITEM_glgrenade 0x00000008
|
#define ITEM_glgrenade 0x00000008
|
||||||
|
|
||||||
#define ITEM_flakjacket 0x00000010
|
#define ITEM_flakjacket 0x00000010
|
||||||
@@ -829,17 +829,17 @@ extern OBJECTTYPE gTempObject;
|
|||||||
#define ITEM_needsbatteries 0x00000080
|
#define ITEM_needsbatteries 0x00000080
|
||||||
|
|
||||||
#define ITEM_xray 0x00000100
|
#define ITEM_xray 0x00000100
|
||||||
#define ITEM_wirecutters 0x00000200
|
#define ITEM_wirecutters 0x00000200
|
||||||
#define ITEM_toolkit 0x00000400
|
#define ITEM_toolkit 0x00000400
|
||||||
#define ITEM_firstaidkit 0x00000800
|
#define ITEM_firstaidkit 0x00000800
|
||||||
|
|
||||||
#define ITEM_medicalkit 0x00001000
|
#define ITEM_medicalkit 0x00001000
|
||||||
#define ITEM_canteen 0x00002000
|
#define ITEM_canteen 0x00002000
|
||||||
#define ITEM_jar 0x00004000
|
#define ITEM_jar 0x00004000
|
||||||
#define ITEM_canandstring 0x00008000
|
#define ITEM_canandstring 0x00008000
|
||||||
|
|
||||||
#define ITEM_marbles 0x00010000
|
#define ITEM_marbles 0x00010000
|
||||||
#define ITEM_walkman 0x00020000
|
#define ITEM_walkman 0x00020000
|
||||||
#define ITEM_remotetrigger 0x00040000
|
#define ITEM_remotetrigger 0x00040000
|
||||||
#define ITEM_robotremotecontrol 0x00080000
|
#define ITEM_robotremotecontrol 0x00080000
|
||||||
|
|
||||||
@@ -849,7 +849,7 @@ extern OBJECTTYPE gTempObject;
|
|||||||
#define ITEM_antitankmine 0x00800000
|
#define ITEM_antitankmine 0x00800000
|
||||||
|
|
||||||
#define ITEM_hardware 0x01000000
|
#define ITEM_hardware 0x01000000
|
||||||
#define ITEM_medical 0x02000000
|
#define ITEM_medical 0x02000000
|
||||||
#define ITEM_gascan 0x04000000
|
#define ITEM_gascan 0x04000000
|
||||||
#define ITEM_containsliquid 0x08000000
|
#define ITEM_containsliquid 0x08000000
|
||||||
|
|
||||||
@@ -863,7 +863,7 @@ extern OBJECTTYPE gTempObject;
|
|||||||
#define ITEM_tripwireactivation 0x0000000400000000 // item (mine) can be activated by nearby tripwire
|
#define ITEM_tripwireactivation 0x0000000400000000 // item (mine) can be activated by nearby tripwire
|
||||||
#define ITEM_tripwire 0x0000000800000000 // item is tripwire
|
#define ITEM_tripwire 0x0000000800000000 // item is tripwire
|
||||||
|
|
||||||
#define ITEM_directional 0x0000001000000000 // item is a directional mine/bomb (actual direction is set upon planting)
|
#define ITEM_directional 0x0000001000000000 // item is a directional mine/bomb (actual direction is set upon planting)
|
||||||
#define ITEM_blockironsight 0x0000002000000000 // if a gun or any attachment have this property, the iron sight won't be usable (if there is at least one other usable sight)
|
#define ITEM_blockironsight 0x0000002000000000 // if a gun or any attachment have this property, the iron sight won't be usable (if there is at least one other usable sight)
|
||||||
#define ITEM_fAllowClimbing 0x0000004000000000 // JMich: BackpackClimb does item allow climbing while wearing it
|
#define ITEM_fAllowClimbing 0x0000004000000000 // JMich: BackpackClimb does item allow climbing while wearing it
|
||||||
#define ITEM_cigarette 0x0000008000000000 // Flugente: this item can be smoked
|
#define ITEM_cigarette 0x0000008000000000 // Flugente: this item can be smoked
|
||||||
|
|||||||
+16
-10
@@ -1271,13 +1271,21 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
|
|||||||
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
|
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// silversurfer: no food items if the food system is off
|
// kitty: players might want food items in game for roleplay reasons, i.e. when interacting with npc-dealer in restaurant, no food might seems odd
|
||||||
if ( !UsingFoodSystem() && Item[ usItemIndex ].foodtype > 0 )
|
// with the option "ALWAYS_FOOD" set TRUE, food items will show even without using the foodsystem
|
||||||
|
// should it be set to FALSE, no food items will be shown without using the foodsystem
|
||||||
|
if (!gGameExternalOptions.fAlwaysFood)
|
||||||
{
|
{
|
||||||
// Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
// silversurfer: no food items if the food system is off
|
||||||
if ( Food[Item[usItemIndex].foodtype].bFoodPoints > 0 )
|
if (!UsingFoodSystem() && Item[usItemIndex].foodtype > 0 )
|
||||||
return FALSE;
|
{
|
||||||
}
|
// silversurfer: Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
||||||
|
// kitty: and only if food isn't a drug at the same time, to make sure using those drugs without food system is possible
|
||||||
|
if (Food[Item[usItemIndex].foodtype].bFoodPoints > 0 && Item[usItemIndex].drugtype == 0 )
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// kitty: no disease items if the disease system is off
|
// kitty: no disease items if the disease system is off
|
||||||
// whether the item is exclusive is defined by tag
|
// whether the item is exclusive is defined by tag
|
||||||
@@ -12075,7 +12083,7 @@ BOOLEAN IsDetonatorAttached( OBJECTTYPE * pObj )
|
|||||||
// return TRUE;
|
// return TRUE;
|
||||||
|
|
||||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
||||||
if (ItemIsDetonator(iter->usItem) && iter->exists() )
|
if ( IsAttachmentClass( iter->usItem, AC_DETONATOR ) && iter->exists() )
|
||||||
{
|
{
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
@@ -12091,7 +12099,7 @@ BOOLEAN IsRemoteDetonatorAttached( OBJECTTYPE * pObj )
|
|||||||
// return TRUE;
|
// return TRUE;
|
||||||
|
|
||||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
||||||
if (ItemIsRemoteDetonator(iter->usItem) && iter->exists() )
|
if ( IsAttachmentClass( iter->usItem, AC_REMOTEDET ) && iter->exists() )
|
||||||
{
|
{
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
@@ -16081,8 +16089,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem) { return HasItemFlag(usItem, ITEM_flare); }
|
|||||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_grenadelauncher); }
|
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_grenadelauncher); }
|
||||||
BOOLEAN ItemIsMortar(UINT16 usItem) { return HasItemFlag(usItem, ITEM_mortar); }
|
BOOLEAN ItemIsMortar(UINT16 usItem) { return HasItemFlag(usItem, ITEM_mortar); }
|
||||||
BOOLEAN ItemIsDuckbill(UINT16 usItem) { return HasItemFlag(usItem, ITEM_duckbill); }
|
BOOLEAN ItemIsDuckbill(UINT16 usItem) { return HasItemFlag(usItem, ITEM_duckbill); }
|
||||||
BOOLEAN ItemIsDetonator(UINT16 usItem) { return HasItemFlag(usItem, ITEM_detonator); }
|
|
||||||
BOOLEAN ItemIsRemoteDetonator(UINT16 usItem) { return HasItemFlag(usItem, ITEM_remotedetonator); }
|
|
||||||
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem) { return HasItemFlag(usItem, ITEM_hidemuzzleflash); }
|
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem) { return HasItemFlag(usItem, ITEM_hidemuzzleflash); }
|
||||||
BOOLEAN ItemIsRocketLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_rocketlauncher); }
|
BOOLEAN ItemIsRocketLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_rocketlauncher); }
|
||||||
// usItemFlag2
|
// usItemFlag2
|
||||||
|
|||||||
@@ -204,8 +204,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem);
|
|||||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem);
|
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem);
|
||||||
BOOLEAN ItemIsMortar(UINT16 usItem);
|
BOOLEAN ItemIsMortar(UINT16 usItem);
|
||||||
BOOLEAN ItemIsDuckbill(UINT16 usItem);
|
BOOLEAN ItemIsDuckbill(UINT16 usItem);
|
||||||
BOOLEAN ItemIsDetonator(UINT16 usItem);
|
|
||||||
BOOLEAN ItemIsRemoteDetonator(UINT16 usItem);
|
|
||||||
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem);
|
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem);
|
||||||
BOOLEAN ItemIsRocketLauncher(UINT16 usItem);
|
BOOLEAN ItemIsRocketLauncher(UINT16 usItem);
|
||||||
BOOLEAN ItemIsSingleShotRocketLauncher(UINT16 usItem);
|
BOOLEAN ItemIsSingleShotRocketLauncher(UINT16 usItem);
|
||||||
|
|||||||
+29
-17
@@ -293,7 +293,8 @@ UINT32 POWERGENSECTOR_GRIDNO1 = 15100;
|
|||||||
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
|
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
|
||||||
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
|
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
|
||||||
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
|
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
|
||||||
UINT32 POWERGENSECTOREXITGRID_GRIDNO1 = 19749;
|
UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO = 10979;
|
||||||
|
UINT32 POWERGENSECTOREXITGRID_DST_GRIDNO = 19749;
|
||||||
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
|
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
|
||||||
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
|
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
|
||||||
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
|
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
|
||||||
@@ -304,17 +305,22 @@ UINT32 SECTOR_LAUNCH_MISSLES_Y = 12;
|
|||||||
UINT32 SECTOR_LAUNCH_MISSLES_Z = 3;
|
UINT32 SECTOR_LAUNCH_MISSLES_Z = 3;
|
||||||
//J13-0
|
//J13-0
|
||||||
UINT32 SECTOR_FAN_X = 13;
|
UINT32 SECTOR_FAN_X = 13;
|
||||||
UINT32 SECTOR_FAN_Z = 10;
|
UINT32 SECTOR_FAN_Y = 10;
|
||||||
UINT32 SECTOR_FAN_Y = 0;
|
UINT32 SECTOR_FAN_Z = 0;
|
||||||
//K14-1
|
//K14-1
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
|
||||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
|
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
|
||||||
|
// Destination sector for fan exitgrid
|
||||||
//J14-1
|
//J14-1
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X = 14;
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = 10;
|
||||||
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1;
|
UINT32 EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = 1;
|
||||||
|
|
||||||
|
INT16 BETTY_BLOODCAT_SECTOR_X = 10;
|
||||||
|
INT16 BETTY_BLOODCAT_SECTOR_Y = 9;
|
||||||
|
INT8 BETTY_BLOODCAT_SECTOR_Z = 0;
|
||||||
|
|
||||||
void InitGridNoUB()
|
void InitGridNoUB()
|
||||||
{
|
{
|
||||||
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
|
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
|
||||||
@@ -326,7 +332,8 @@ void InitGridNoUB()
|
|||||||
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
|
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
|
||||||
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
|
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
|
||||||
POWERGENSECTOR_GRIDNO4 = gGameUBOptions.PowergenSectorGridNo4; //= 13980;
|
POWERGENSECTOR_GRIDNO4 = gGameUBOptions.PowergenSectorGridNo4; //= 13980;
|
||||||
POWERGENSECTOREXITGRID_GRIDNO1 = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749;
|
POWERGENSECTOREXITGRID_SRC_GRIDNO = gGameUBOptions.PowergenSectorExitgridSrcGridNo; //= 10979; // Exitgrid location in the sector it is created in
|
||||||
|
POWERGENSECTOREXITGRID_DST_GRIDNO = gGameUBOptions.PowergenSectorExitgridGridNo; // = 19749; // Exitgrid location in the destination sector
|
||||||
POWERGENFANSOUND_GRIDNO1 = gGameUBOptions.PowergenFanSoundGridNo1; //= 10979;
|
POWERGENFANSOUND_GRIDNO1 = gGameUBOptions.PowergenFanSoundGridNo1; //= 10979;
|
||||||
POWERGENFANSOUND_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
|
POWERGENFANSOUND_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
|
||||||
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
|
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
|
||||||
@@ -338,8 +345,8 @@ void InitGridNoUB()
|
|||||||
SECTOR_LAUNCH_MISSLES_Z = gGameUBOptions.SectorLaunchMisslesZ; //3;
|
SECTOR_LAUNCH_MISSLES_Z = gGameUBOptions.SectorLaunchMisslesZ; //3;
|
||||||
//J13-0
|
//J13-0
|
||||||
SECTOR_FAN_X = gGameUBOptions.SectorFanX; //13;
|
SECTOR_FAN_X = gGameUBOptions.SectorFanX; //13;
|
||||||
SECTOR_FAN_Z = gGameUBOptions.SectorFanY; //10;
|
SECTOR_FAN_Y = gGameUBOptions.SectorFanY; //10;
|
||||||
SECTOR_FAN_Y = gGameUBOptions.SectorFanZ; //0;
|
SECTOR_FAN_Z = gGameUBOptions.SectorFanZ; //0;
|
||||||
//K14-1
|
//K14-1
|
||||||
SECTOR_OPEN_GATE_IN_TUNNEL_X = gGameUBOptions.SectorOpenGateInTunnelX; //14;
|
SECTOR_OPEN_GATE_IN_TUNNEL_X = gGameUBOptions.SectorOpenGateInTunnelX; //14;
|
||||||
SECTOR_OPEN_GATE_IN_TUNNEL_Y = gGameUBOptions.SectorOpenGateInTunnelY; //11;
|
SECTOR_OPEN_GATE_IN_TUNNEL_Y = gGameUBOptions.SectorOpenGateInTunnelY; //11;
|
||||||
@@ -349,6 +356,11 @@ void InitGridNoUB()
|
|||||||
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = gGameUBOptions.ExitForFanToPowerGenSectorY; //10;
|
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y = gGameUBOptions.ExitForFanToPowerGenSectorY; //10;
|
||||||
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = gGameUBOptions.ExitForFanToPowerGenSectorZ; //1;
|
EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z = gGameUBOptions.ExitForFanToPowerGenSectorZ; //1;
|
||||||
|
|
||||||
|
BETTY_BLOODCAT_SECTOR_X = gGameUBOptions.BettyBloodCatSectorX;
|
||||||
|
BETTY_BLOODCAT_SECTOR_Y = gGameUBOptions.BettyBloodCatSectorY;
|
||||||
|
BETTY_BLOODCAT_SECTOR_Z = gGameUBOptions.BettyBloodCatSectorZ;
|
||||||
|
|
||||||
|
|
||||||
MANUEL_UB = gGameUBOptions.ubMANUEL_UB;
|
MANUEL_UB = gGameUBOptions.ubMANUEL_UB;
|
||||||
BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB;
|
BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB;
|
||||||
JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB;
|
JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB;
|
||||||
@@ -646,7 +658,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
|||||||
UINT32 uiPercentEnemiesKilled;
|
UINT32 uiPercentEnemiesKilled;
|
||||||
UINT8 ubSectorID;
|
UINT8 ubSectorID;
|
||||||
|
|
||||||
//if there isnt enemies in the sector
|
//if there isn't enemies in the sector
|
||||||
if( ( gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector + gTacticalStatus.ubArmyGuysKilled ) == 0 )
|
if( ( gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector + gTacticalStatus.ubArmyGuysKilled ) == 0 )
|
||||||
{
|
{
|
||||||
//get out
|
//get out
|
||||||
@@ -663,7 +675,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
|||||||
switch( ubSectorID )
|
switch( ubSectorID )
|
||||||
{
|
{
|
||||||
case SEC_K15:
|
case SEC_K15:
|
||||||
//all enemies are dead and if the quote hasnt been said yet
|
//all enemies are dead and if the quote hasn't been said yet
|
||||||
if( uiPercentEnemiesKilled >= 100 && !( gJa25SaveStruct.uiJa25GeneralFlags & JA_GF__ALL_DEAD_TOP_LEVEL_OF_COMPLEX ) )
|
if( uiPercentEnemiesKilled >= 100 && !( gJa25SaveStruct.uiJa25GeneralFlags & JA_GF__ALL_DEAD_TOP_LEVEL_OF_COMPLEX ) )
|
||||||
{
|
{
|
||||||
INT16 bProfile = RandomProfileIdFromNewMercsOnPlayerTeam();
|
INT16 bProfile = RandomProfileIdFromNewMercsOnPlayerTeam();
|
||||||
@@ -703,7 +715,7 @@ void StopPowerGenFan()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remeber how the player got through
|
//Remember how the player got through
|
||||||
SetJa25GeneralFlag( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
SetJa25GeneralFlag( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
||||||
|
|
||||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__STOPPED;
|
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__STOPPED;
|
||||||
@@ -721,7 +733,7 @@ void StopPowerGenFan()
|
|||||||
//Turn off the power gen fan sound
|
//Turn off the power gen fan sound
|
||||||
HandleRemovingPowerGenFanSound();
|
HandleRemovingPowerGenFanSound();
|
||||||
|
|
||||||
//remeber which turn the fan stopped on
|
//remember which turn the fan stopped on
|
||||||
gJa25SaveStruct.uiTurnPowerGenFanWentDown = gJa25SaveStruct.uiTacticalTurnCounter;
|
gJa25SaveStruct.uiTurnPowerGenFanWentDown = gJa25SaveStruct.uiTacticalTurnCounter;
|
||||||
|
|
||||||
|
|
||||||
@@ -729,7 +741,7 @@ void StopPowerGenFan()
|
|||||||
// Replace the Fan graphic
|
// Replace the Fan graphic
|
||||||
//
|
//
|
||||||
|
|
||||||
// Turn on permenant changes....
|
// Turn on permanent changes....
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
ApplyMapChangesToMapTempFile( TRUE );
|
||||||
|
|
||||||
//Add the exit grid to the power gen fan
|
//Add the exit grid to the power gen fan
|
||||||
@@ -784,7 +796,7 @@ void StartFanBackUpAgain()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remeber how the player got through
|
//Remember how the player got through
|
||||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__RUNNING_NORMALLY;
|
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__RUNNING_NORMALLY;
|
||||||
|
|
||||||
|
|
||||||
@@ -796,7 +808,7 @@ void StartFanBackUpAgain()
|
|||||||
// Replace the Fan graphic
|
// Replace the Fan graphic
|
||||||
//
|
//
|
||||||
|
|
||||||
// Turn on permenant changes....
|
// Turn on permanent changes....
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
ApplyMapChangesToMapTempFile( TRUE );
|
||||||
|
|
||||||
// Remove it!
|
// Remove it!
|
||||||
@@ -821,7 +833,7 @@ void StartFanBackUpAgain()
|
|||||||
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
||||||
|
|
||||||
//Remove the exit grid
|
//Remove the exit grid
|
||||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||||
|
|
||||||
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
||||||
SetRenderFlags(RENDER_FLAG_FULL);
|
SetRenderFlags(RENDER_FLAG_FULL);
|
||||||
@@ -914,7 +926,7 @@ void HandleAddingPowerGenFanSound()
|
|||||||
sGridNo = POWERGENFANSOUND_GRIDNO2;
|
sGridNo = POWERGENFANSOUND_GRIDNO2;
|
||||||
|
|
||||||
//Create the new ambient fan sound
|
//Create the new ambient fan sound
|
||||||
//gJa25SaveStruct.iPowerGenFanPositionSndID = NewPositionSnd( sGridNo, POSITION_SOUND_STATIONATY_OBJECT, 0, POWER_GEN_FAN_SOUND );
|
gJa25SaveStruct.iPowerGenFanPositionSndID = NewPositionSnd( sGridNo, POSITION_SOUND_STATIONATY_OBJECT, 0, POWER_GEN_FAN_SOUND, 30 );
|
||||||
|
|
||||||
SetPositionSndsInActive( );
|
SetPositionSndsInActive( );
|
||||||
SetPositionSndsActive( );
|
SetPositionSndsActive( );
|
||||||
@@ -942,10 +954,10 @@ void AddExitGridForFanToPowerGenSector()
|
|||||||
ExitGrid.ubGotoSectorX = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X; //14;
|
ExitGrid.ubGotoSectorX = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_X; //14;
|
||||||
ExitGrid.ubGotoSectorY = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y; //MAP_ROW_J;
|
ExitGrid.ubGotoSectorY = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Y; //MAP_ROW_J;
|
||||||
ExitGrid.ubGotoSectorZ = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z; //1;
|
ExitGrid.ubGotoSectorZ = EXIT_FOR_FAN_TO_POWER_GEN_SECTOR_Z; //1;
|
||||||
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_GRIDNO1;
|
ExitGrid.usGridNo = POWERGENSECTOREXITGRID_DST_GRIDNO;
|
||||||
|
|
||||||
//Add the exit grid when the fan is either stopped or blown up
|
//Add the exit grid when the fan is either stopped or blown up
|
||||||
AddExitGridToWorld( PGF__FAN_EXIT_GRID_GRIDNO, &ExitGrid );
|
AddExitGridToWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO, &ExitGrid );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )
|
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "MapScreen Quotes.h"
|
#include "MapScreen Quotes.h"
|
||||||
|
|
||||||
#define PGF__FAN_EXIT_GRID_GRIDNO 10979
|
|
||||||
|
|
||||||
#define NUM_MERCS_WITH_NEW_QUOTES 20//7
|
#define NUM_MERCS_WITH_NEW_QUOTES 20//7
|
||||||
|
|
||||||
@@ -144,6 +143,10 @@ extern UINT8 RAUL_UB;
|
|||||||
extern UINT8 MORRIS_UB;
|
extern UINT8 MORRIS_UB;
|
||||||
extern UINT8 RUDY_UB;
|
extern UINT8 RUDY_UB;
|
||||||
|
|
||||||
|
extern INT16 BETTY_BLOODCAT_SECTOR_X;
|
||||||
|
extern INT16 BETTY_BLOODCAT_SECTOR_Y;
|
||||||
|
extern INT8 BETTY_BLOODCAT_SECTOR_Z;
|
||||||
|
|
||||||
extern void Old_UB_Inventory ();
|
extern void Old_UB_Inventory ();
|
||||||
extern void New_UB_Inventory ();
|
extern void New_UB_Inventory ();
|
||||||
|
|
||||||
|
|||||||
@@ -24,14 +24,15 @@ AbstractXMLLoader::ParseData* AbstractXMLLoader::MakeParseData(XML_Parser* parse
|
|||||||
return new ParseData(parser);
|
return new ParseData(parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* fileName) {
|
bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* fileName, CHAR8* errorBuf) {
|
||||||
HWFILE hFile;
|
HWFILE hFile;
|
||||||
UINT32 uiBytesRead;
|
UINT32 uiBytesRead;
|
||||||
UINT32 uiFSize;
|
UINT32 uiFSize;
|
||||||
CHAR8* lpcBuffer;
|
CHAR8* lpcBuffer;
|
||||||
char fileNameFull[MAX_PATH + 1];
|
char fileNameFull[MAX_PATH + 1];
|
||||||
if (strlen(fileName) + strlen(directoryName) >= MAX_PATH) {
|
if (strlen(fileName) + strlen(directoryName) >= MAX_PATH) {
|
||||||
LiveMessage("Can't load file. Concatinated filename too long for buffer!");
|
sprintf(errorBuf, "Can't load file %s%s, Concatenated filename too long for buffer!", directoryName, fileName);
|
||||||
|
LiveMessage(errorBuf);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SetDirectoryName(directoryName);
|
SetDirectoryName(directoryName);
|
||||||
@@ -46,12 +47,14 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
|||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, msg.c_str());
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, msg.c_str());
|
||||||
hFile = FileOpen(fileNameFull, FILE_ACCESS_READ, FALSE);
|
hFile = FileOpen(fileNameFull, FILE_ACCESS_READ, FALSE);
|
||||||
if (!hFile) {
|
if (!hFile) {
|
||||||
|
sprintf(errorBuf, "Can't open %s", fileNameFull);
|
||||||
delete data;
|
delete data;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uiFSize = FileGetSize(hFile);
|
uiFSize = FileGetSize(hFile);
|
||||||
lpcBuffer = (CHAR8*)MemAlloc(uiFSize + 1);
|
lpcBuffer = (CHAR8*)MemAlloc(uiFSize + 1);
|
||||||
if (!FileRead(hFile, lpcBuffer, uiFSize, &uiBytesRead)) {
|
if (!FileRead(hFile, lpcBuffer, uiFSize, &uiBytesRead)) {
|
||||||
|
sprintf(errorBuf, "Error reading %s to buffer", fileNameFull);
|
||||||
MemFree(lpcBuffer);
|
MemFree(lpcBuffer);
|
||||||
delete data;
|
delete data;
|
||||||
return false;
|
return false;
|
||||||
@@ -72,7 +75,6 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (!XML_Parse(parser, lpcBuffer, uiFSize, TRUE)) {
|
if (!XML_Parse(parser, lpcBuffer, uiFSize, TRUE)) {
|
||||||
CHAR8 errorBuf[512];
|
|
||||||
sprintf(errorBuf, "XML Parser Error in %s[%d]: %s", fileNameFull, XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser)));
|
sprintf(errorBuf, "XML Parser Error in %s[%d]: %s", fileNameFull, XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser)));
|
||||||
LiveMessage(errorBuf);
|
LiveMessage(errorBuf);
|
||||||
MemFree(lpcBuffer);
|
MemFree(lpcBuffer);
|
||||||
@@ -80,7 +82,6 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (XMLParseException e) {
|
} catch (XMLParseException e) {
|
||||||
CHAR8 errorBuf[512];
|
|
||||||
sprintf(errorBuf, "XML Parser Exception in %s[%d]: %s", fileNameFull, e._LINE, e.what());
|
sprintf(errorBuf, "XML Parser Exception in %s[%d]: %s", fileNameFull, e._LINE, e.what());
|
||||||
LiveMessage(errorBuf);
|
LiveMessage(errorBuf);
|
||||||
MemFree(lpcBuffer);
|
MemFree(lpcBuffer);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
AbstractXMLLoader(XML_StartElementHandler startHandler, XML_EndElementHandler endHandler, XML_CharacterDataHandler charHandler, ParseDataFactoryFunc parseDataFactF = MakeParseData);
|
AbstractXMLLoader(XML_StartElementHandler startHandler, XML_EndElementHandler endHandler, XML_CharacterDataHandler charHandler, ParseDataFactoryFunc parseDataFactF = MakeParseData);
|
||||||
~AbstractXMLLoader(void);
|
~AbstractXMLLoader(void);
|
||||||
bool LoadFromFile(const char* directoryName, const char* fileName);
|
bool LoadFromFile(const char* directoryName, const char* fileName, CHAR8* errorBuf);
|
||||||
const char* GetFileName();
|
const char* GetFileName();
|
||||||
const char* GetDirectoryName();
|
const char* GetDirectoryName();
|
||||||
void SetFileName(const char* fileName);
|
void SetFileName(const char* fileName);
|
||||||
|
|||||||
@@ -258,6 +258,18 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) {
|
|||||||
case REQ_LEGPOSATTACHMENT3:
|
case REQ_LEGPOSATTACHMENT3:
|
||||||
cmp_val = CompareAttachment(pSoldier, LEGPOS, 3);
|
cmp_val = CompareAttachment(pSoldier, LEGPOS, 3);
|
||||||
break;
|
break;
|
||||||
|
case REQ_VESTPOSATTACHMENT0:
|
||||||
|
cmp_val = CompareAttachment( pSoldier, VESTPOS, 0 );
|
||||||
|
break;
|
||||||
|
case REQ_VESTPOSATTACHMENT1:
|
||||||
|
cmp_val = CompareAttachment( pSoldier, VESTPOS, 1 );
|
||||||
|
break;
|
||||||
|
case REQ_VESTPOSATTACHMENT2:
|
||||||
|
cmp_val = CompareAttachment( pSoldier, VESTPOS, 2 );
|
||||||
|
break;
|
||||||
|
case REQ_VESTPOSATTACHMENT3:
|
||||||
|
cmp_val = CompareAttachment( pSoldier, VESTPOS, 3 );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (q < NUM_REQTYPESINV) {
|
if (q < NUM_REQTYPESINV) {
|
||||||
cmp_val = pSoldier->inv[q].usItem;
|
cmp_val = pSoldier->inv[q].usItem;
|
||||||
|
|||||||
@@ -75,6 +75,10 @@ public:
|
|||||||
REQ_LEGPOSATTACHMENT1,
|
REQ_LEGPOSATTACHMENT1,
|
||||||
REQ_LEGPOSATTACHMENT2,
|
REQ_LEGPOSATTACHMENT2,
|
||||||
REQ_LEGPOSATTACHMENT3,
|
REQ_LEGPOSATTACHMENT3,
|
||||||
|
REQ_VESTPOSATTACHMENT0,
|
||||||
|
REQ_VESTPOSATTACHMENT1,
|
||||||
|
REQ_VESTPOSATTACHMENT2,
|
||||||
|
REQ_VESTPOSATTACHMENT3,
|
||||||
NUM_REQTYPES,
|
NUM_REQTYPES,
|
||||||
// 3rd byte is for operator flags
|
// 3rd byte is for operator flags
|
||||||
_REQ_BTWN = 0x20000,
|
_REQ_BTWN = 0x20000,
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ namespace LogicalBodyTypes {
|
|||||||
/*****************************************
|
/*****************************************
|
||||||
Filter enum criterion types
|
Filter enum criterion types
|
||||||
******************************************/
|
******************************************/
|
||||||
LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 43,
|
LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 47,
|
||||||
Filter::REQ_HELMETPOS,
|
Filter::REQ_HELMETPOS,
|
||||||
Filter::REQ_VESTPOS,
|
Filter::REQ_VESTPOS,
|
||||||
Filter::REQ_LEGPOS,
|
Filter::REQ_LEGPOS,
|
||||||
@@ -313,7 +313,11 @@ namespace LogicalBodyTypes {
|
|||||||
Filter::REQ_LEGPOSATTACHMENT0,
|
Filter::REQ_LEGPOSATTACHMENT0,
|
||||||
Filter::REQ_LEGPOSATTACHMENT1,
|
Filter::REQ_LEGPOSATTACHMENT1,
|
||||||
Filter::REQ_LEGPOSATTACHMENT2,
|
Filter::REQ_LEGPOSATTACHMENT2,
|
||||||
Filter::REQ_LEGPOSATTACHMENT3
|
Filter::REQ_LEGPOSATTACHMENT3,
|
||||||
|
Filter::REQ_VESTPOSATTACHMENT0,
|
||||||
|
Filter::REQ_VESTPOSATTACHMENT1,
|
||||||
|
Filter::REQ_VESTPOSATTACHMENT2,
|
||||||
|
Filter::REQ_VESTPOSATTACHMENT3
|
||||||
);
|
);
|
||||||
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
|
|||||||
@@ -991,7 +991,7 @@ void HandleFirstHeliDropOfGame( )
|
|||||||
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||||
|
|
||||||
// Start music
|
// Start music
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||||
|
|||||||
+60
-60
@@ -1037,78 +1037,78 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
|||||||
|
|
||||||
void UpdateJerryMiloInInitialSector()
|
void UpdateJerryMiloInInitialSector()
|
||||||
{
|
{
|
||||||
SOLDIERTYPE *pSoldier = NULL;
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
SOLDIERTYPE *pJerrySoldier=NULL;
|
SOLDIERTYPE *pJerrySoldier = NULL;
|
||||||
|
|
||||||
|
|
||||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
|
||||||
SectorInfo[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fSurfaceWasEverPlayerControlled = TRUE;
|
|
||||||
//SectorInfo[ SEC_H7 ].ubNumAdmins = 2;
|
|
||||||
StrategicMap[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fEnemyControlled = FALSE;
|
|
||||||
|
|
||||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
|
||||||
return; //AA
|
|
||||||
|
|
||||||
if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
|
||||||
{
|
|
||||||
//if it is the first sector we are loading up, place Jerry in the map
|
|
||||||
if( !gfFirstTimeInGameHeliCrash )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( gGameUBOptions.InJerry == TRUE )
|
|
||||||
{
|
|
||||||
pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); //JERRY
|
|
||||||
if( pSoldier == NULL )
|
|
||||||
{
|
|
||||||
Assert( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//the internet part of the laptop isnt working. It gets broken in the heli crash.
|
|
||||||
if ( gGameUBOptions.LaptopQuestEnabled == TRUE )
|
|
||||||
StartQuest( QUEST_FIX_LAPTOP, -1, -1 );
|
|
||||||
|
|
||||||
//Record the initial sector as ours
|
|
||||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
SectorInfo[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fSurfaceWasEverPlayerControlled = TRUE;
|
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
StrategicMap[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fEnemyControlled = FALSE;
|
//SectorInfo[ SEC_H7 ].ubNumAdmins = 2;
|
||||||
|
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||||
|
|
||||||
if ( gGameUBOptions.InJerry == TRUE )
|
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||||
|
return; //AA
|
||||||
|
|
||||||
|
if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||||
{
|
{
|
||||||
//Set some variable so Jerry will be on the ground
|
//if it is the first sector we are loading up, place Jerry in the map
|
||||||
pSoldier->fWaitingToGetupFromJA25Start = TRUE;
|
if ( !gfFirstTimeInGameHeliCrash )
|
||||||
pSoldier->fIgnoreGetupFromCollapseCheck = TRUE;
|
return;
|
||||||
|
|
||||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; //to by³o wy³¹czone
|
if ( gGameUBOptions.InJerry == TRUE )
|
||||||
//pSoldier->usStrategicInsertionData = GetInitialHeliGridNo( ); //to by³o wy³¹czone
|
{
|
||||||
|
pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); //JERRY
|
||||||
|
if ( pSoldier == NULL )
|
||||||
|
{
|
||||||
|
Assert( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
RESETTIMECOUNTER( pSoldier->GetupFromJA25StartCounter, gsInitialHeliRandomTimes[ 6 ] + 800 + Random( 400 ) );
|
}
|
||||||
|
|
||||||
//should we be on our back or tummy
|
//the internet part of the laptop isnt working. It gets broken in the heli crash.
|
||||||
if( Random( 100 ) < 50 )
|
if ( gGameUBOptions.LaptopQuestEnabled == TRUE )
|
||||||
pSoldier->EVENT_InitNewSoldierAnim( STAND_FALLFORWARD_STOP, 1, TRUE );
|
StartQuest( QUEST_FIX_LAPTOP, -1, -1 );
|
||||||
else
|
|
||||||
pSoldier->EVENT_InitNewSoldierAnim( FALLBACKHIT_STOP, 1, TRUE );
|
|
||||||
}
|
|
||||||
|
|
||||||
//Wont work cause it gets reset every frame
|
//Record the initial sector as ours
|
||||||
//make sure we can see Jerry
|
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
|
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
||||||
|
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||||
|
|
||||||
if ( gGameUBOptions.InJerry == TRUE )
|
if ( gGameUBOptions.InJerry == TRUE )
|
||||||
{
|
{
|
||||||
pJerrySoldier = FindSoldierByProfileID(JERRY_MILO_UB, FALSE );//JERRY
|
//Set some variable so Jerry will be on the ground
|
||||||
if( pJerrySoldier != NULL )
|
pSoldier->fWaitingToGetupFromJA25Start = TRUE;
|
||||||
{
|
pSoldier->fIgnoreGetupFromCollapseCheck = TRUE;
|
||||||
//Make sure we can see the pilot
|
|
||||||
gbPublicOpplist[OUR_TEAM][ pJerrySoldier->ubID ] = SEEN_CURRENTLY;
|
|
||||||
pJerrySoldier->bVisible = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; //to by³o wy³¹czone
|
||||||
|
//pSoldier->usStrategicInsertionData = GetInitialHeliGridNo( ); //to by³o wy³¹czone
|
||||||
|
|
||||||
//Lock the interface
|
RESETTIMECOUNTER( pSoldier->GetupFromJA25StartCounter, gsInitialHeliRandomTimes[6] + 800 + Random( 400 ) );
|
||||||
guiPendingOverrideEvent = LU_BEGINUILOCK;
|
|
||||||
|
//should we be on our back or tummy
|
||||||
|
if ( Random( 100 ) < 50 )
|
||||||
|
pSoldier->EVENT_InitNewSoldierAnim( STAND_FALLFORWARD_STOP, 1, TRUE );
|
||||||
|
else
|
||||||
|
pSoldier->EVENT_InitNewSoldierAnim( FALLBACKHIT_STOP, 1, TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
//Wont work cause it gets reset every frame
|
||||||
|
//make sure we can see Jerry
|
||||||
|
|
||||||
|
if ( gGameUBOptions.InJerry == TRUE )
|
||||||
|
{
|
||||||
|
pJerrySoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE );//JERRY
|
||||||
|
if ( pJerrySoldier != NULL )
|
||||||
|
{
|
||||||
|
//Make sure we can see the pilot
|
||||||
|
gbPublicOpplist[OUR_TEAM][pJerrySoldier->ubID] = SEEN_CURRENTLY;
|
||||||
|
pJerrySoldier->bVisible = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Lock the interface
|
||||||
|
guiPendingOverrideEvent = LU_BEGINUILOCK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+44
-45
@@ -1074,7 +1074,7 @@ BOOLEAN ExecuteOverhead( )
|
|||||||
pSoldier->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
pSoldier->DoMercBattleSound( BATTLE_SOUND_CURSE1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_MULTIPURPOSE, pSoldier->ubProfile, 0, 0, pSoldier->iFaceIndex, 0 );
|
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_MULTIPURPOSE, MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH, pSoldier->ubProfile, 0, pSoldier->iFaceIndex, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -6646,7 +6646,7 @@ void ExitCombatMode( )
|
|||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
|
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||||
@@ -6688,63 +6688,62 @@ void ExitCombatMode( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetEnemyPresence( )
|
void SetEnemyPresence()
|
||||||
{
|
{
|
||||||
// We have an ememy present....
|
// We have an ememy present....
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence"));
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "SetEnemyPresence" ) );
|
||||||
|
|
||||||
// Check if we previously had no enemys present and we are in a virgin secotr ( no enemys spotted yet )
|
// Check if we previously had no enemys present and we are in a virgin secotr ( no enemys spotted yet )
|
||||||
if ( !gTacticalStatus.fEnemyInSector && gTacticalStatus.fVirginSector )
|
if ( !gTacticalStatus.fEnemyInSector && gTacticalStatus.fVirginSector )
|
||||||
{
|
{
|
||||||
// If we have a guy selected, say quote!
|
// If we have a guy selected, say quote!
|
||||||
// For now, display ono status message
|
// For now, display ono status message
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ ENEMY_IN_SECTOR_STR ] );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ENEMY_IN_SECTOR_STR] );
|
||||||
|
|
||||||
// Change music modes..
|
// Change music modes..
|
||||||
|
|
||||||
// If we are just starting game, don't do this!
|
// If we are just starting game, don't do this!
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//Ja25: no meanwhiles
|
//Ja25: no meanwhiles
|
||||||
if ( !DidGameJustStart() )
|
if ( !DidGameJustStart() )
|
||||||
#else
|
#else
|
||||||
if ( !DidGameJustStart() && !AreInMeanwhile( ) )
|
if ( !DidGameJustStart() && !AreInMeanwhile() )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
GlobalSoundID = MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ];
|
||||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
if ( MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ] );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "SetEnemyPresence: warnings = false" ) );
|
||||||
sniperwarning = FALSE;
|
sniperwarning = FALSE;
|
||||||
biggunwarning = FALSE;
|
biggunwarning = FALSE;
|
||||||
gogglewarning = FALSE;
|
gogglewarning = FALSE;
|
||||||
checkBonusMilitia = TRUE;
|
checkBonusMilitia = TRUE;
|
||||||
// airstrikeavailable = TRUE;
|
// airstrikeavailable = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = true"));
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "SetEnemyPresence: warnings = true" ) );
|
||||||
sniperwarning = TRUE;
|
sniperwarning = TRUE;
|
||||||
biggunwarning = TRUE;
|
biggunwarning = TRUE;
|
||||||
//gogglewarning = TRUE;
|
//gogglewarning = TRUE;
|
||||||
// airstrikeavailable = FALSE;
|
// airstrikeavailable = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Say quote...
|
// Say quote...
|
||||||
//SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
//SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||||
|
|
||||||
gTacticalStatus.fEnemyInSector = TRUE;
|
gTacticalStatus.fEnemyInSector = TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7057,7 +7056,7 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
|||||||
// Begin tense music....
|
// Begin tense music....
|
||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
UseCreatureMusic(HostileZombiesPresent());
|
CheckForZombieMusic();
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||||
@@ -7889,7 +7888,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
|||||||
if ( CheckFact( FACT_FIRST_BATTLE_BEING_FOUGHT, 0 ) )
|
if ( CheckFact( FACT_FIRST_BATTLE_BEING_FOUGHT, 0 ) )
|
||||||
{
|
{
|
||||||
// ATE: Need to trigger record for this event .... for NPC scripting
|
// ATE: Need to trigger record for this event .... for NPC scripting
|
||||||
TriggerNPCRecord( PACOS, 18 );
|
TriggerNPCRecord( PACOS, 20 );
|
||||||
|
|
||||||
// this is our first battle... and we won!
|
// this is our first battle... and we won!
|
||||||
SetFactTrue( FACT_FIRST_BATTLE_FOUGHT );
|
SetFactTrue( FACT_FIRST_BATTLE_FOUGHT );
|
||||||
|
|||||||
@@ -3259,3 +3259,26 @@ FLOAT GetCorpseRotFactor( ROTTING_CORPSE* pCorpse )
|
|||||||
|
|
||||||
return (FLOAT)(min(gGameExternalOptions.usCorpseDelayUntilRotting, GetWorldTotalMin() - pCorpse->def.uiTimeOfDeath)) / gGameExternalOptions.usCorpseDelayUntilRotting;
|
return (FLOAT)(min(gGameExternalOptions.usCorpseDelayUntilRotting, GetWorldTotalMin() - pCorpse->def.uiTimeOfDeath)) / gGameExternalOptions.usCorpseDelayUntilRotting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckForZombieMusic()
|
||||||
|
{
|
||||||
|
extern UINT8 LightGetColors( SGPPaletteEntry * pPal );
|
||||||
|
|
||||||
|
if ( gGameSettings.fOptions[TOPTION_ZOMBIES] )
|
||||||
|
{
|
||||||
|
SGPPaletteEntry LColors[3];
|
||||||
|
LightGetColors( LColors );
|
||||||
|
|
||||||
|
// If we're underground in the creature caves, use creepy music based on the cave light colors.
|
||||||
|
// Without this, the crepitus cave music is not working correctly as these checks override the original musicmode choice
|
||||||
|
// See PrepareCreaturesForBattle() in Creature Spreading.cpp
|
||||||
|
if ( gbWorldSectorZ )
|
||||||
|
{
|
||||||
|
UseCreatureMusic( LColors->peBlue || HostileZombiesPresent() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UseCreatureMusic( HostileZombiesPresent() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -242,4 +242,6 @@ BOOLEAN CorpseOkToDress( ROTTING_CORPSE* pCorpse );
|
|||||||
// Flugente: how rotten is this corpse? values from 0 to 1, 1 as soon as it is rotting
|
// Flugente: how rotten is this corpse? values from 0 to 1, 1 as soon as it is rotting
|
||||||
FLOAT GetCorpseRotFactor( ROTTING_CORPSE* pCorpse );
|
FLOAT GetCorpseRotFactor( ROTTING_CORPSE* pCorpse );
|
||||||
|
|
||||||
|
void CheckForZombieMusic();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -909,7 +909,9 @@ DragSelection::Setup( UINT32 aVal )
|
|||||||
|
|
||||||
if ( xmlentry >= 0 )
|
if ( xmlentry >= 0 )
|
||||||
{
|
{
|
||||||
swprintf( pStr, L"%hs (%s)", gStructureMovePossible[xmlentry].szTileSetDisplayName, FaceDirs[gOneCDirection[ubDirection]] );
|
WCHAR buf[256];
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, gStructureMovePossible[xmlentry].szTileSetDisplayName, -1, buf, 256);
|
||||||
|
swprintf(pStr, L"%s (%s)", buf, FaceDirs[gOneCDirection[ubDirection]]);
|
||||||
|
|
||||||
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
||||||
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
||||||
|
|||||||
@@ -1199,7 +1199,14 @@ BOOLEAN InternalAddSoldierToSector(SoldierID ubID, BOOLEAN fCalculateDirection,
|
|||||||
if( fCalculateDirection )
|
if( fCalculateDirection )
|
||||||
ubDirection = ubCalculatedDirection;
|
ubDirection = ubCalculatedDirection;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// Override calculated direction if we were told to....
|
||||||
|
if ( pSoldier->ubInsertionDirection >= 100 )
|
||||||
|
{
|
||||||
|
pSoldier->ubInsertionDirection -= 100;
|
||||||
|
}
|
||||||
ubDirection = pSoldier->ubInsertionDirection;
|
ubDirection = pSoldier->ubInsertionDirection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2461,7 +2461,7 @@ BOOLEAN SOLDIERTYPE::CreateSoldierCommon( UINT8 ubBodyType, SoldierID usSoldierI
|
|||||||
|
|
||||||
if ( this->ubBodyType == QUEENMONSTER )
|
if ( this->ubBodyType == QUEENMONSTER )
|
||||||
{
|
{
|
||||||
this->iPositionSndID = NewPositionSnd( NOWHERE, POSITION_SOUND_FROM_SOLDIER, (UINT32)this, QUEEN_AMBIENT_NOISE );
|
this->iPositionSndID = NewPositionSnd( NOWHERE, POSITION_SOUND_FROM_SOLDIER, (UINT32)this, QUEEN_AMBIENT_NOISE, 15 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -419,6 +419,7 @@ SOLDIERCREATE_STRUCT::~SOLDIERCREATE_STRUCT() {
|
|||||||
// Note that the constructor does this automatically.
|
// Note that the constructor does this automatically.
|
||||||
void SOLDIERCREATE_STRUCT::initialize() {
|
void SOLDIERCREATE_STRUCT::initialize() {
|
||||||
memset( this, 0, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
memset( this, 0, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||||
|
this->bAIMorale = MORALE_NORMAL;
|
||||||
Inv.clear();
|
Inv.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9964,10 +9964,6 @@ BOOLEAN IsGunBurstCapable(OBJECTTYPE* pObject, BOOLEAN fNotify, SOLDIERTYPE* pSo
|
|||||||
fCapable = TRUE;
|
fCapable = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Weapon[pObject->usItem].fBurstOnlyByFanTheHammer)
|
|
||||||
{
|
|
||||||
fCapable = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,14 +58,6 @@ typedef PARSE_STAGE;
|
|||||||
#define TABLEDATA_DIRECTORY "TableData\\"
|
#define TABLEDATA_DIRECTORY "TableData\\"
|
||||||
#define TABLEDATA_LAPTOP_DIRECTORY "Laptop\\"
|
#define TABLEDATA_LAPTOP_DIRECTORY "Laptop\\"
|
||||||
|
|
||||||
#define GERMAN_PREFIX "German."
|
|
||||||
#define RUSSIAN_PREFIX "Russian."
|
|
||||||
#define DUTCH_PREFIX "Dutch."
|
|
||||||
#define POLISH_PREFIX "Polish."
|
|
||||||
#define FRENCH_PREFIX "French."
|
|
||||||
#define ITALIAN_PREFIX "Italian."
|
|
||||||
#define CHINESE_PREFIX "Chinese."
|
|
||||||
|
|
||||||
#define ATTACHMENTSFILENAME "Items\\Attachments.xml"
|
#define ATTACHMENTSFILENAME "Items\\Attachments.xml"
|
||||||
#define ATTACHMENTINFOFILENAME "Items\\AttachmentInfo.xml"
|
#define ATTACHMENTINFOFILENAME "Items\\AttachmentInfo.xml"
|
||||||
#define ITEMSFILENAME "Items\\Items.xml"
|
#define ITEMSFILENAME "Items\\Items.xml"
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ public:
|
|||||||
UINT8 ubLastDateSpokenTo;
|
UINT8 ubLastDateSpokenTo;
|
||||||
UINT8 bLastQuoteSaidWasSpecial;
|
UINT8 bLastQuoteSaidWasSpecial;
|
||||||
INT8 bSectorZ;
|
INT8 bSectorZ;
|
||||||
UINT16 usStrategicInsertionData;
|
UINT32 usStrategicInsertionData;
|
||||||
INT8 bFriendlyOrDirectDefaultResponseUsedRecently;
|
INT8 bFriendlyOrDirectDefaultResponseUsedRecently;
|
||||||
INT8 bRecruitDefaultResponseUsedRecently;
|
INT8 bRecruitDefaultResponseUsedRecently;
|
||||||
INT8 bThreatenDefaultResponseUsedRecently;
|
INT8 bThreatenDefaultResponseUsedRecently;
|
||||||
|
|||||||
@@ -2784,7 +2784,7 @@ INT16 RoamingRange(SOLDIERTYPE *pSoldier, INT32 * pusFromGridNo)
|
|||||||
BOOL OppPosKnown = FALSE;
|
BOOL OppPosKnown = FALSE;
|
||||||
if (CREATURE_OR_BLOODCAT(pSoldier))
|
if (CREATURE_OR_BLOODCAT(pSoldier))
|
||||||
{
|
{
|
||||||
if (pSoldier->aiData.bAlertStatus == STATUS_BLACK)
|
if (pSoldier->aiData.bAlertStatus > STATUS_YELLOW)
|
||||||
{
|
{
|
||||||
*pusFromGridNo = pSoldier->sGridNo; // from current position!
|
*pusFromGridNo = pSoldier->sGridNo; // from current position!
|
||||||
return(MAX_ROAMING_RANGE);
|
return(MAX_ROAMING_RANGE);
|
||||||
|
|||||||
+36
-27
@@ -2548,32 +2548,35 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we're an alerted enemy, and there are panic bombs or a trigger around
|
// if we're an alerted enemy, and there are panic bombs or a trigger around
|
||||||
if ( (!PTR_CIVILIAN || pSoldier->ubProfile == WARDEN) && ( ( gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition || (pSoldier->ubID == gTacticalStatus.ubTheChosenOne) || (pSoldier->ubProfile == WARDEN) ) &&
|
if ( !ENEMYROBOT(pSoldier) )
|
||||||
(gTacticalStatus.fPanicFlags & (PANIC_BOMBS_HERE | PANIC_TRIGGERS_HERE ) ) ) )
|
|
||||||
{
|
{
|
||||||
if ( pSoldier->ubProfile == WARDEN && gTacticalStatus.ubTheChosenOne == NOBODY )
|
if ( (!PTR_CIVILIAN || pSoldier->ubProfile == WARDEN) && ( ( gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition || (pSoldier->ubID == gTacticalStatus.ubTheChosenOne) || (pSoldier->ubProfile == WARDEN) ) &&
|
||||||
|
(gTacticalStatus.fPanicFlags & (PANIC_BOMBS_HERE | PANIC_TRIGGERS_HERE ) ) ) )
|
||||||
{
|
{
|
||||||
PossiblyMakeThisEnemyChosenOne( pSoldier );
|
if ( pSoldier->ubProfile == WARDEN && gTacticalStatus.ubTheChosenOne == NOBODY )
|
||||||
|
{
|
||||||
|
PossiblyMakeThisEnemyChosenOne( pSoldier );
|
||||||
|
}
|
||||||
|
|
||||||
|
// do some special panic AI decision making
|
||||||
|
bActionReturned = PanicAI(pSoldier,ubCanMove);
|
||||||
|
|
||||||
|
// if we decided on an action while in there, we're done
|
||||||
|
if (bActionReturned != -1)
|
||||||
|
return(bActionReturned);
|
||||||
}
|
}
|
||||||
|
|
||||||
// do some special panic AI decision making
|
if ( pSoldier->ubProfile != NO_PROFILE )
|
||||||
bActionReturned = PanicAI(pSoldier,ubCanMove);
|
|
||||||
|
|
||||||
// if we decided on an action while in there, we're done
|
|
||||||
if (bActionReturned != -1)
|
|
||||||
return(bActionReturned);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( pSoldier->ubProfile != NO_PROFILE )
|
|
||||||
{
|
|
||||||
if ( (pSoldier->ubProfile == QUEEN || pSoldier->ubProfile == JOE) && ubCanMove )
|
|
||||||
{
|
{
|
||||||
if ( gWorldSectorX == 3 && gWorldSectorY == MAP_ROW_P && gbWorldSectorZ == 0 && !gfUseAlternateQueenPosition )
|
if ( (pSoldier->ubProfile == QUEEN || pSoldier->ubProfile == JOE) && ubCanMove )
|
||||||
{
|
{
|
||||||
bActionReturned = HeadForTheStairCase( pSoldier );
|
if ( gWorldSectorX == 3 && gWorldSectorY == MAP_ROW_P && gbWorldSectorZ == 0 && !gfUseAlternateQueenPosition )
|
||||||
if ( bActionReturned != AI_ACTION_NONE )
|
|
||||||
{
|
{
|
||||||
return( bActionReturned );
|
bActionReturned = HeadForTheStairCase( pSoldier );
|
||||||
|
if ( bActionReturned != AI_ACTION_NONE )
|
||||||
|
{
|
||||||
|
return( bActionReturned );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5160,13 +5163,16 @@ INT16 ubMinAPCost;
|
|||||||
|
|
||||||
// offer surrender?
|
// offer surrender?
|
||||||
#ifndef JA2UB
|
#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 ( !is_networked ) // No surrender in multiplayer
|
||||||
{
|
{
|
||||||
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 )
|
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 (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 )
|
||||||
{
|
{
|
||||||
return( AI_ACTION_OFFER_SURRENDER );
|
if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
||||||
|
{
|
||||||
|
return( AI_ACTION_OFFER_SURRENDER );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9576,13 +9582,16 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier )
|
|||||||
|
|
||||||
// offer surrender?
|
// offer surrender?
|
||||||
#ifndef JA2UB
|
#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 ( !is_networked ) // No surrender in multiplayer
|
||||||
{
|
{
|
||||||
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector( ) < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector( ) * 3 )
|
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 (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector() * 3 )
|
||||||
{
|
{
|
||||||
return(AI_ACTION_OFFER_SURRENDER);
|
if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED )
|
||||||
|
{
|
||||||
|
return(AI_ACTION_OFFER_SURRENDER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-7
@@ -516,13 +516,18 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
|
|||||||
#ifdef DEBUGDECISIONS
|
#ifdef DEBUGDECISIONS
|
||||||
AIPopMessage("destination Grid # itself not valid, looking around it");
|
AIPopMessage("destination Grid # itself not valid, looking around it");
|
||||||
#endif
|
#endif
|
||||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
// Commented out this branch for now because bloodcats are constantly failing to find a legal destination in the previous call to legalNPCDestination
|
||||||
{
|
// Following the function calls deep enough ( GoAsFarAsPossibleTowards -> InternalGoAsFarAsPossibleTowards -> LegalNPCDestination -> NewOKDestination -> InternalOkayToAddStructureToWorld -> OkayToAddStructureToTile) shows that the last one fails when checking if we can add bloodcat's structure onto the tile our merc is
|
||||||
// we tried to get close, failed; abort!
|
// This then results them freezing and staying in place even if they can see our mercs
|
||||||
pSoldier->pathing.usPathIndex = pSoldier->pathing.usPathDataSize = 0;
|
// The reason I'm leaving the code here instead of simply removing it is because this and the check for adding structures to a tile are really old code,
|
||||||
return( NOWHERE );
|
// which has definitely worked fine at some point. As I'm right now unable to find the real reason for this breaking, I'm just circumventing the issue for now. -Asdow
|
||||||
}
|
//if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||||
else
|
//{
|
||||||
|
// // we tried to get close, failed; abort!
|
||||||
|
// pSoldier->pathing.usPathIndex = pSoldier->pathing.usPathDataSize = 0;
|
||||||
|
// return( NOWHERE );
|
||||||
|
//}
|
||||||
|
//else
|
||||||
{
|
{
|
||||||
// else look at the 8 nearest gridnos to sDesGrid for a valid destination
|
// else look at the 8 nearest gridnos to sDesGrid for a valid destination
|
||||||
|
|
||||||
|
|||||||
+71
-94
@@ -493,30 +493,21 @@ void RenderRadarScreen( )
|
|||||||
|
|
||||||
if( !( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
|
if( !( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
|
||||||
{
|
{
|
||||||
if(gbPixelDepth==16)
|
// WANNE: Correct radar rectangle size if it is too large to fit in radar screen [2007-05-14]
|
||||||
|
if (fAllowRadarMovementHor == FALSE)
|
||||||
{
|
{
|
||||||
// WANNE: Correct radar rectangle size if it is too large to fit in radar screen [2007-05-14]
|
sRadarTLX = RADAR_WINDOW_TM_X;
|
||||||
if (fAllowRadarMovementHor == FALSE)
|
sRadarBRX = RADAR_WINDOW_TM_X + RADAR_WINDOW_WIDTH;
|
||||||
{
|
|
||||||
sRadarTLX = RADAR_WINDOW_TM_X;
|
|
||||||
sRadarBRX = RADAR_WINDOW_TM_X + RADAR_WINDOW_WIDTH;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fAllowRadarMovementVer == FALSE)
|
|
||||||
{
|
|
||||||
sRadarTLY = RADAR_WINDOW_TM_Y;
|
|
||||||
sRadarBRY = RADAR_WINDOW_TM_Y + RADAR_WINDOW_HEIGHT;
|
|
||||||
}
|
|
||||||
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
|
||||||
RectangleDraw( TRUE, sRadarTLX, sRadarTLY, sRadarBRX, sRadarBRY - 1, usLineColor, pDestBuf );
|
|
||||||
}
|
}
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
|
if (fAllowRadarMovementVer == FALSE)
|
||||||
{
|
{
|
||||||
// DB Need to change this to a color from the 8-but standard palette
|
sRadarTLY = RADAR_WINDOW_TM_Y;
|
||||||
usLineColor = COLOR_GREEN;
|
sRadarBRY = RADAR_WINDOW_TM_Y + RADAR_WINDOW_HEIGHT;
|
||||||
RectangleDraw8( TRUE, sRadarTLX + 1, sRadarTLY + 1, sRadarBRX + 1, sRadarBRY + 1, usLineColor, pDestBuf );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||||
|
RectangleDraw( TRUE, sRadarTLX, sRadarTLY, sRadarBRX, sRadarBRY - 1, usLineColor, pDestBuf );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cycle fFlash variable
|
// Cycle fFlash variable
|
||||||
@@ -556,24 +547,20 @@ void RenderRadarScreen( )
|
|||||||
sXSoldRadar += RADAR_WINDOW_TM_X;
|
sXSoldRadar += RADAR_WINDOW_TM_X;
|
||||||
sYSoldRadar += gsRadarY;
|
sYSoldRadar += gsRadarY;
|
||||||
|
|
||||||
// if we are in 16 bit mode....kind of redundant
|
if( ( fFlashHighLightInventoryItemOnradarMap ) )
|
||||||
if(gbPixelDepth==16)
|
|
||||||
{
|
{
|
||||||
if( ( fFlashHighLightInventoryItemOnradarMap ) )
|
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||||
{
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// DB Need to add a radar color for 8-bit
|
// DB Need to add a radar color for 8-bit
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 255, 255, 255 ) );
|
usLineColor = Get16BPPColor( FROMRGB( 255, 255, 255 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( iCurrentlyHighLightedItem == iCounter )
|
if( iCurrentlyHighLightedItem == iCounter )
|
||||||
{
|
{
|
||||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar + 1, sYSoldRadar + 1, usLineColor, pDestBuf );
|
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar + 1, sYSoldRadar + 1, usLineColor, pDestBuf );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -632,77 +619,67 @@ void RenderRadarScreen( )
|
|||||||
sXSoldRadar += gsRadarX;
|
sXSoldRadar += gsRadarX;
|
||||||
sYSoldRadar += gsRadarY;
|
sYSoldRadar += gsRadarY;
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
|
||||||
{
|
|
||||||
// DB Need to add a radar color for 8-bit
|
|
||||||
|
|
||||||
// Are we a selected guy?
|
// Are we a selected guy?
|
||||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||||
|
{
|
||||||
|
if ( gfRadarCurrentGuyFlash )
|
||||||
{
|
{
|
||||||
if ( gfRadarCurrentGuyFlash )
|
usLineColor = 0;
|
||||||
{
|
|
||||||
usLineColor = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If on roof, make darker....
|
|
||||||
if ( pSoldier->pathing.bLevel > 0 )
|
|
||||||
{
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
|
||||||
|
|
||||||
if ( pSoldier->bTeam == CIV_TEAM )
|
|
||||||
{
|
|
||||||
// Override civ team with red if hostile...
|
|
||||||
if ( pSoldier->bSide != gbPlayerNum && !pSoldier->aiData.bNeutral )
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 255, 0, 0 ) );
|
|
||||||
// if uncovered, different colour (so the player doesn't have to search for us)
|
|
||||||
else if ( gGameExternalOptions.fKnownNPCsUseDifferentColour && pSoldier->ubProfile != NO_PROFILE && !zHiddenNames[pSoldier->ubProfile].Hidden )
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 0, 0, 255 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flugente 18-04-15: observed an odd bug: if we play with a release build and see a creature for the first time, their overhead/radar map pins do not have the correct colour.
|
|
||||||
// Bizarrely enough, the issue seems dependent on the colour value (pink, RGB: 255/0/255) itself.
|
|
||||||
// Saving and reloading solves the issue, but I am not sure why. As a fix we now use a slightly dampened pink.
|
|
||||||
if ( pSoldier->bTeam == CREATURE_TEAM )
|
|
||||||
{
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 247, 0, 247 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flugente: if we are a (still covert) enemy assassin, colour us like militia, so that the player wont notice us
|
|
||||||
if ( pSoldier->usSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->usSoldierFlagMask & SOLDIER_COVERT_SOLDIER )
|
|
||||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ MILITIA_TEAM ].RadarColor );
|
|
||||||
|
|
||||||
// Render different color if an enemy and he's unconscious
|
|
||||||
if ( pSoldier->bTeam != gbPlayerNum && pSoldier->stats.bLife < OKLIFE )
|
|
||||||
{
|
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 128, 128, 128 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// If on roof, make darker....
|
// If on roof, make darker....
|
||||||
if ( pSoldier->bTeam == gbPlayerNum && pSoldier->pathing.bLevel > 0 )
|
if ( pSoldier->pathing.bLevel > 0 )
|
||||||
{
|
{
|
||||||
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||||
|
|
||||||
|
if ( pSoldier->bTeam == CIV_TEAM )
|
||||||
|
{
|
||||||
|
// Override civ team with red if hostile...
|
||||||
|
if ( pSoldier->bSide != gbPlayerNum && !pSoldier->aiData.bNeutral )
|
||||||
|
usLineColor = Get16BPPColor( FROMRGB( 255, 0, 0 ) );
|
||||||
|
// if uncovered, different colour (so the player doesn't have to search for us)
|
||||||
|
else if ( gGameExternalOptions.fKnownNPCsUseDifferentColour && pSoldier->ubProfile != NO_PROFILE && !zHiddenNames[pSoldier->ubProfile].Hidden )
|
||||||
|
usLineColor = Get16BPPColor( FROMRGB( 0, 0, 255 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
// Flugente 18-04-15: observed an odd bug: if we play with a release build and see a creature for the first time, their overhead/radar map pins do not have the correct colour.
|
||||||
}
|
// Bizarrely enough, the issue seems dependent on the colour value (pink, RGB: 255/0/255) itself.
|
||||||
else if(gbPixelDepth==8)
|
// Saving and reloading solves the issue, but I am not sure why. As a fix we now use a slightly dampened pink.
|
||||||
{
|
if ( pSoldier->bTeam == CREATURE_TEAM )
|
||||||
// DB Need to change this to a color from the 8-but standard palette
|
{
|
||||||
usLineColor = COLOR_BLUE;
|
usLineColor = Get16BPPColor( FROMRGB( 247, 0, 247 ) );
|
||||||
RectangleDraw8( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
}
|
||||||
|
|
||||||
|
// Flugente: if we are a (still covert) enemy assassin, colour us like militia, so that the player wont notice us
|
||||||
|
if ( pSoldier->usSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->usSoldierFlagMask & SOLDIER_COVERT_SOLDIER )
|
||||||
|
usLineColor = Get16BPPColor( gTacticalStatus.Team[ MILITIA_TEAM ].RadarColor );
|
||||||
|
|
||||||
|
// Render different color if an enemy and he's unconscious
|
||||||
|
if ( pSoldier->bTeam != gbPlayerNum && pSoldier->stats.bLife < OKLIFE )
|
||||||
|
{
|
||||||
|
usLineColor = Get16BPPColor( FROMRGB( 128, 128, 128 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// If on roof, make darker....
|
||||||
|
if ( pSoldier->bTeam == gbPlayerNum && pSoldier->pathing.bLevel > 0 )
|
||||||
|
{
|
||||||
|
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-74
@@ -604,20 +604,9 @@ BOOLEAN UpdateSaveBuffer(void)
|
|||||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||||
// BLIT HERE
|
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, ( gsVIEWPORT_WINDOW_END_Y - gsVIEWPORT_WINDOW_START_Y ) );
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
|
||||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, ( gsVIEWPORT_WINDOW_END_Y - gsVIEWPORT_WINDOW_START_Y ) );
|
|
||||||
}
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
{
|
|
||||||
// BLIT HERE
|
|
||||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
|
||||||
pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, gsVIEWPORT_WINDOW_END_Y );
|
|
||||||
}
|
|
||||||
|
|
||||||
UnLockVideoSurface(guiRENDERBUFFER);
|
UnLockVideoSurface(guiRENDERBUFFER);
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
@@ -643,22 +632,11 @@ BOOLEAN RestoreExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT1
|
|||||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
sLeft , sTop,
|
||||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
sLeft , sTop,
|
||||||
sLeft , sTop,
|
sWidth, sHeight);
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
{
|
|
||||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
|
||||||
pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
sLeft , sTop,
|
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
UnLockVideoSurface(guiRENDERBUFFER);
|
UnLockVideoSurface(guiRENDERBUFFER);
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
|
|
||||||
@@ -695,22 +673,11 @@ BOOLEAN RestoreExternBackgroundRectGivenID( INT32 iBack )
|
|||||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
sLeft , sTop,
|
||||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
sLeft , sTop,
|
||||||
sLeft , sTop,
|
sWidth, sHeight);
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
{
|
|
||||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
|
||||||
pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
sLeft , sTop,
|
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
UnLockVideoSurface(guiRENDERBUFFER);
|
UnLockVideoSurface(guiRENDERBUFFER);
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
|
|
||||||
@@ -730,22 +697,11 @@ BOOLEAN CopyExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 s
|
|||||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
sLeft , sTop,
|
||||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
sLeft , sTop,
|
||||||
sLeft , sTop,
|
sWidth, sHeight);
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
{
|
|
||||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
|
||||||
pSrcBuf, uiSrcPitchBYTES,
|
|
||||||
sLeft , sTop,
|
|
||||||
sLeft , sTop,
|
|
||||||
sWidth, sHeight);
|
|
||||||
}
|
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
UnLockVideoSurface(guiRENDERBUFFER);
|
UnLockVideoSurface(guiRENDERBUFFER);
|
||||||
|
|
||||||
@@ -1342,18 +1298,11 @@ BOOLEAN RestoreShiftedVideoOverlays( INT16 sShiftX, INT16 sShiftY )
|
|||||||
usHeight = sBottom - sTop;
|
usHeight = sBottom - sTop;
|
||||||
usWidth = sRight - sLeft;
|
usWidth = sRight - sLeft;
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
Blt16BPPTo16BPP((UINT16 *)(UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||||
{
|
(UINT16 *)gVideoOverlays[uiCount].pSaveArea, gBackSaves[ iBackIndex ].sWidth*2,
|
||||||
|
sLeft, sTop,
|
||||||
Blt16BPPTo16BPP((UINT16 *)(UINT16 *)pDestBuf, uiDestPitchBYTES,
|
uiLeftSkip, uiTopSkip,
|
||||||
(UINT16 *)gVideoOverlays[uiCount].pSaveArea, gBackSaves[ iBackIndex ].sWidth*2,
|
usWidth, usHeight );
|
||||||
sLeft, sTop,
|
|
||||||
uiLeftSkip, uiTopSkip,
|
|
||||||
usWidth, usHeight );
|
|
||||||
}
|
|
||||||
else if(gbPixelDepth==8)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Once done, check for pending deletion
|
// Once done, check for pending deletion
|
||||||
if ( gVideoOverlays[uiCount].fDeletionPending )
|
if ( gVideoOverlays[uiCount].fDeletionPending )
|
||||||
|
|||||||
+19
-19
@@ -460,36 +460,36 @@ UINT16 usNumNodes;
|
|||||||
***************************************************************************************/
|
***************************************************************************************/
|
||||||
BOOLEAN LightTileBlocked(INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
BOOLEAN LightTileBlocked(INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
||||||
{
|
{
|
||||||
UINT16 usTileNo, usSrcTileNo;
|
UINT32 uiTileNo, uiSrcTileNo;
|
||||||
|
|
||||||
Assert(gpWorldLevelData!=NULL);
|
Assert(gpWorldLevelData!=NULL);
|
||||||
|
|
||||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||||
|
|
||||||
if (TileIsOutOfBounds(usTileNo))
|
if (TileIsOutOfBounds(uiTileNo))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TileIsOutOfBounds(usSrcTileNo))
|
if (TileIsOutOfBounds(uiSrcTileNo))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gpWorldLevelData[ usTileNo ].sHeight > gpWorldLevelData[ usSrcTileNo ].sHeight)
|
if(gpWorldLevelData[ uiTileNo ].sHeight > gpWorldLevelData[ uiSrcTileNo ].sHeight)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
{
|
{
|
||||||
UINT16 usTileNo;
|
UINT32 uiTileNo;
|
||||||
LEVELNODE *pStruct;
|
LEVELNODE *pStruct;
|
||||||
|
|
||||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||||
|
|
||||||
pStruct = gpWorldLevelData[ usTileNo ].pStructHead;
|
pStruct = gpWorldLevelData[ uiTileNo ].pStructHead;
|
||||||
if ( pStruct != NULL )
|
if ( pStruct != NULL )
|
||||||
{
|
{
|
||||||
// IF WE ARE A WINDOW, DO NOT BLOCK!
|
// IF WE ARE A WINDOW, DO NOT BLOCK!
|
||||||
if ( FindStructure( usTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
if ( FindStructure( uiTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
@@ -509,8 +509,8 @@ BOOLEAN LightTileHasWall( INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
|||||||
{
|
{
|
||||||
//LEVELNODE *pStruct;
|
//LEVELNODE *pStruct;
|
||||||
//UINT32 uiType;
|
//UINT32 uiType;
|
||||||
UINT16 usTileNo;
|
UINT32 uiTileNo;
|
||||||
UINT16 usSrcTileNo;
|
UINT32 uiSrcTileNo;
|
||||||
INT8 bDirection;
|
INT8 bDirection;
|
||||||
UINT8 ubTravelCost;
|
UINT8 ubTravelCost;
|
||||||
//INT8 bWallCount = 0;
|
//INT8 bWallCount = 0;
|
||||||
@@ -518,20 +518,20 @@ UINT8 ubTravelCost;
|
|||||||
|
|
||||||
Assert(gpWorldLevelData!=NULL);
|
Assert(gpWorldLevelData!=NULL);
|
||||||
|
|
||||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||||
|
|
||||||
if ( usTileNo == usSrcTileNo )
|
if ( uiTileNo == uiSrcTileNo )
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( TileIsOutOfBounds(usTileNo))
|
if ( TileIsOutOfBounds(uiTileNo))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( TileIsOutOfBounds(usSrcTileNo))
|
if ( TileIsOutOfBounds(uiSrcTileNo))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
@@ -541,7 +541,7 @@ UINT8 ubTravelCost;
|
|||||||
bDirection = atan8( iSrcX, iSrcY, iX, iY );
|
bDirection = atan8( iSrcX, iSrcY, iX, iY );
|
||||||
|
|
||||||
|
|
||||||
ubTravelCost = gubWorldMovementCosts[ usTileNo ][ bDirection ][ 0 ];
|
ubTravelCost = gubWorldMovementCosts[ uiTileNo ][ bDirection ][ 0 ];
|
||||||
|
|
||||||
if ( ubTravelCost == TRAVELCOST_WALL )
|
if ( ubTravelCost == TRAVELCOST_WALL )
|
||||||
{
|
{
|
||||||
@@ -550,7 +550,7 @@ UINT8 ubTravelCost;
|
|||||||
|
|
||||||
if ( IS_TRAVELCOST_DOOR( ubTravelCost ) )
|
if ( IS_TRAVELCOST_DOOR( ubTravelCost ) )
|
||||||
{
|
{
|
||||||
ubTravelCost = DoorTravelCost( NULL, usTileNo, ubTravelCost, TRUE, NULL );
|
ubTravelCost = DoorTravelCost( NULL, uiTileNo, ubTravelCost, TRUE, NULL );
|
||||||
|
|
||||||
if ( ubTravelCost == TRAVELCOST_OBSTACLE || ubTravelCost == TRAVELCOST_DOOR )
|
if ( ubTravelCost == TRAVELCOST_OBSTACLE || ubTravelCost == TRAVELCOST_DOOR )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1367,8 +1367,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
|||||||
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
||||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||||
if(gbPixelDepth == 16)// BLIT HERE
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, usWidth, usHeight);
|
||||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, usWidth, usHeight);
|
|
||||||
UnLockVideoSurface(guiRENDERBUFFER);
|
UnLockVideoSurface(guiRENDERBUFFER);
|
||||||
UnLockVideoSurface(guiSAVEBUFFER);
|
UnLockVideoSurface(guiSAVEBUFFER);
|
||||||
}
|
}
|
||||||
|
|||||||
+480
-569
File diff suppressed because it is too large
Load Diff
@@ -2929,7 +2929,7 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
|
|||||||
SetWorldSize(iRowSize, iColSize);
|
SetWorldSize(iRowSize, iColSize);
|
||||||
|
|
||||||
// We still have the "normal" map size AND the map is saved in vanilla format
|
// We still have the "normal" map size AND the map is saved in vanilla format
|
||||||
if ((iRowSize <= OLD_WORLD_ROWS && iRowSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
if ((iRowSize <= OLD_WORLD_ROWS && iColSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
||||||
{
|
{
|
||||||
// Check "vanilla map saving"
|
// Check "vanilla map saving"
|
||||||
gfVanillaMode = TRUE;//dnl ch74 191013
|
gfVanillaMode = TRUE;//dnl ch74 191013
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ set(UtilsSrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Event Pump.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}/Font Control.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/ImportStrings.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/ImportStrings.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/INIReader.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/INIReader.cpp"
|
||||||
@@ -16,7 +15,6 @@ set(UtilsSrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MapUtility.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/MapUtility.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/MercTextBox.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/MercTextBox.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/message.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}/Multilingual Text Code Generator.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Music Control.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Music Control.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/PopUpBox.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/PopUpBox.cpp"
|
||||||
@@ -37,20 +35,4 @@ set(UtilsSrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Items.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Items.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Language.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Language.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_SenderNameList.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)
|
PARENT_SCOPE)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
|
|
||||||
#include "Language Defines.h"
|
|
||||||
// anv: for selecting random line
|
// anv: for selecting random line
|
||||||
#include "Random.h"
|
#include "Random.h"
|
||||||
|
|
||||||
|
|||||||
+11
-6
@@ -5,6 +5,7 @@
|
|||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "wcheck.h"
|
#include "wcheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
INT32 giCurWinFont = 0;
|
INT32 giCurWinFont = 0;
|
||||||
//BOOLEAN gfUseWinFonts = FALSE;
|
//BOOLEAN gfUseWinFonts = FALSE;
|
||||||
@@ -77,8 +78,8 @@ HVOBJECT gvoBlockFontNarrow;
|
|||||||
INT32 gp14PointHumanist;
|
INT32 gp14PointHumanist;
|
||||||
HVOBJECT gvo14PointHumanist;
|
HVOBJECT gvo14PointHumanist;
|
||||||
|
|
||||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
#if defined( JA2EDITOR )
|
||||||
INT32 gpHugeFont;
|
INT32 gpHugeFont;
|
||||||
HVOBJECT gvoHugeFont;
|
HVOBJECT gvoHugeFont;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -94,8 +95,8 @@ UINT16 CreateFontPaletteTables(HVOBJECT pObj );
|
|||||||
extern UINT16 gzFontName[32];
|
extern UINT16 gzFontName[32];
|
||||||
|
|
||||||
auto GetHugeFont() -> INT32 {
|
auto GetHugeFont() -> INT32 {
|
||||||
#if defined(JA2EDITOR) && defined(ENGLISH)
|
#if defined(JA2EDITOR)
|
||||||
return gpHugeFont;
|
return g_lang == i18n::Lang::en ? gpHugeFont : gp16PointArial;
|
||||||
#else
|
#else
|
||||||
return gp16PointArial;
|
return gp16PointArial;
|
||||||
#endif
|
#endif
|
||||||
@@ -216,10 +217,12 @@ BOOLEAN InitializeFonts( )
|
|||||||
gvo14PointHumanist = GetFontObject( gp14PointHumanist );
|
gvo14PointHumanist = GetFontObject( gp14PointHumanist );
|
||||||
CHECKF( CreateFontPaletteTables( gvo14PointHumanist ) );
|
CHECKF( CreateFontPaletteTables( gvo14PointHumanist ) );
|
||||||
|
|
||||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
#if defined( JA2EDITOR )
|
||||||
|
if(g_lang == i18n::Lang::en) {
|
||||||
gpHugeFont = LoadFontFile( "FONTS\\HUGEFONT.sti" );
|
gpHugeFont = LoadFontFile( "FONTS\\HUGEFONT.sti" );
|
||||||
gvoHugeFont = GetFontObject( gpHugeFont );
|
gvoHugeFont = GetFontObject( gpHugeFont );
|
||||||
CHECKF( CreateFontPaletteTables( gvoHugeFont ) );
|
CHECKF( CreateFontPaletteTables( gvoHugeFont ) );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set default for font system
|
// Set default for font system
|
||||||
@@ -254,8 +257,10 @@ void ShutdownFonts( )
|
|||||||
UnloadFont( gp14PointArial);
|
UnloadFont( gp14PointArial);
|
||||||
UnloadFont( gpBlockyFont);
|
UnloadFont( gpBlockyFont);
|
||||||
UnloadFont( gp12PointArialFixedFont );
|
UnloadFont( gp12PointArialFixedFont );
|
||||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
#if defined( JA2EDITOR )
|
||||||
|
if(g_lang == i18n::Lang::en) {
|
||||||
UnloadFont( gpHugeFont );
|
UnloadFont( gpHugeFont );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ATE: Shutdown any win fonts
|
// ATE: Shutdown any win fonts
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "ImportStrings.h"
|
#include "ImportStrings.h"
|
||||||
#include "LocalizedStrings.h"
|
#include "LocalizedStrings.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
|
|
||||||
#include <vfs/Tools/vfs_tools.h>
|
#include <vfs/Tools/vfs_tools.h>
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ CREATED: Feb 16, 1999
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Language Defines.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "Fileman.h"
|
#include "Fileman.h"
|
||||||
|
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MusicPlay(MusicLists[mode][songIndex]);
|
return MusicPlay(MusicLists[mode][songIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************************************
|
//********************************************************************************
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user