mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Update to Master
This commit is contained in:
@@ -186,7 +186,6 @@ jobs:
|
||||
merge-multiple: true
|
||||
|
||||
- name: Checkout Repo
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: source
|
||||
@@ -201,6 +200,7 @@ jobs:
|
||||
git push --delete origin refs/tags/latest || true
|
||||
git tag 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/* \
|
||||
--generate-notes \
|
||||
--title "Latest (unstable)" \
|
||||
@@ -213,7 +213,6 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
working-directory: source
|
||||
run: |
|
||||
exit 0
|
||||
gh release upload "$GITHUB_REF_NAME" ../dist/* --clobber
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -54,12 +54,22 @@ jobs:
|
||||
sed -i "s|@Build@|${GAME_BUILD:0:255}|" 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
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
|
||||
touch CMakeUserPresets.json
|
||||
touch CMakePresets.json
|
||||
|
||||
JA2Language=$(echo '${{ inputs.language }}' | tr '[:lower:]' '[:upper:]')
|
||||
JA2Application=$(echo '${{ matrix.application }}' | tr '[:lower:]' '[:upper:]')
|
||||
@@ -77,7 +87,7 @@ jobs:
|
||||
arch: x86
|
||||
- name: Prepare build
|
||||
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
|
||||
run: |
|
||||
cmake --build build/ -- -v
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@
|
||||
/.vs/
|
||||
/build/
|
||||
/out/
|
||||
/CMakePresets.json
|
||||
/CMakeSettings.json
|
||||
/CMakeUserPresets.json
|
||||
/lib/
|
||||
|
||||
+104
-55
@@ -9,12 +9,27 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
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)
|
||||
if(ADDRESS_SANITIZER)
|
||||
message(STATUS "AddressSanitizer ENABLED for non-Release builds")
|
||||
add_compile_options($<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,-fsanitize=address,>)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options("/wd4838")
|
||||
endif()
|
||||
|
||||
# whether we are using MSBuild as a generator
|
||||
set(usingMsBuild $<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>)
|
||||
|
||||
@@ -23,7 +38,24 @@ set(usingMsBuild $<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>)
|
||||
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)
|
||||
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
|
||||
add_subdirectory("ext/libpng")
|
||||
@@ -34,32 +66,46 @@ target_link_libraries(bfVFS PRIVATE 7z)
|
||||
# ja2export utility
|
||||
add_subdirectory("ext/export/src")
|
||||
|
||||
# static libraries whose source files, header files or header files included
|
||||
# by header files do not rely on Applications or Languages preprocessor definitions,
|
||||
# and therefore only need to be compiled once. Good.
|
||||
add_subdirectory(Lua)
|
||||
# static libraries whose translation units don't rely on Application preprocessor definitions.
|
||||
add_subdirectory(lua)
|
||||
add_subdirectory(Multiplayer)
|
||||
add_subdirectory(wine)
|
||||
|
||||
# static libraries whose source files, header files or header files included
|
||||
# by header files rely on Application and Language preprocessor definitions, and
|
||||
# therefore need to be compiled multiple times. Very Bad.
|
||||
set(Ja2_Libraries
|
||||
"${CMAKE_SOURCE_DIR}/binkw32.lib"
|
||||
"${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
|
||||
TileEngine
|
||||
TacticalAI
|
||||
Utils
|
||||
Strategic
|
||||
sgp
|
||||
Laptop
|
||||
Editor
|
||||
Console
|
||||
Tactical
|
||||
ModularizedTacticalAI
|
||||
Console
|
||||
Editor
|
||||
Ja2
|
||||
Laptop
|
||||
ModularizedTacticalAI
|
||||
sgp
|
||||
Strategic
|
||||
Tactical
|
||||
TacticalAI
|
||||
TileEngine
|
||||
Utils
|
||||
)
|
||||
foreach(lib IN LISTS Ja2_Libs)
|
||||
add_subdirectory(${lib})
|
||||
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
|
||||
include(cmake/ValidateOptions.cmake)
|
||||
@@ -74,47 +120,50 @@ ValidateOptions("${ValidApplications}" "Applications" "${Applications}" "Applica
|
||||
# preprocessor definitions for Debug build, per the legacy MSBuild
|
||||
set(debugFlags $<IF:$<CONFIG:Debug>,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>)
|
||||
|
||||
# Due to widespread preprocessor definition abuse in the codebase, practically
|
||||
# every library-language-executable combination is its own compilation target
|
||||
# TODO: refactor preprocessor usage onto, ideally, a single translation unit
|
||||
foreach(lang IN LISTS LangTargets)
|
||||
foreach(exe IN LISTS ApplicationTargets)
|
||||
set(Executable ${exe}_${lang})
|
||||
|
||||
# executable for an application/language combination, e.g. JA2_ENGLISH.exe
|
||||
add_executable(${Executable} WIN32)
|
||||
target_sources(${Executable} PRIVATE ${Ja2Src})
|
||||
|
||||
# Good libraries have already been built, can be simply linked here
|
||||
target_link_libraries(${Executable} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
||||
target_link_options(${Executable} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
||||
|
||||
# for each app/lang combination, the Very Bad libraries need to be built,
|
||||
# with the appropriate preprocessor definitions
|
||||
foreach(lib IN LISTS Ja2_Libs)
|
||||
# syntactic sugar to hopefully make this more readable
|
||||
set(VeryBadLib ${Executable}_${lib})
|
||||
set(isEditor $<STREQUAL:${exe},JA2MAPEDITOR>)
|
||||
set(isUb $<STREQUAL:${exe},JA2UB>)
|
||||
set(isUbEditor $<STREQUAL:${exe},JA2UBMAPEDITOR>)
|
||||
|
||||
# static library for an app/lang combination, e.g. JA2_ENGLISH_sgp.lib
|
||||
add_library(${VeryBadLib})
|
||||
target_sources(${VeryBadLib} PRIVATE ${${lib}Src})
|
||||
|
||||
target_compile_definitions(${VeryBadLib} PUBLIC
|
||||
foreach(app IN LISTS ApplicationTargets)
|
||||
set(isEditor $<STREQUAL:${app},JA2MAPEDITOR>)
|
||||
set(isUb $<STREQUAL:${app},JA2UB>)
|
||||
set(isUbEditor $<STREQUAL:${app},JA2UBMAPEDITOR>)
|
||||
set(compilationFlags
|
||||
$<IF:${isEditor},JA2EDITOR;JA2BETAVERSION,>
|
||||
$<IF:${isUb},JA2UB;JA2UBMAPS,>
|
||||
$<IF:${isUbEditor},JA2UB;JA2UBMAPS;JA2EDITOR;JA2BETAVERSION,>
|
||||
${debugFlags}
|
||||
${lang}
|
||||
)
|
||||
target_link_libraries(${Executable} PUBLIC ${VeryBadLib})
|
||||
|
||||
foreach(lib IN LISTS Ja2_Libs)
|
||||
# library for an application, e.g. JA2UB_sgp
|
||||
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()
|
||||
|
||||
# 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)
|
||||
foreach(lang IN LISTS LangTargets)
|
||||
# executable for an application/language combination, e.g. JA2_ENGLISH.exe
|
||||
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})
|
||||
|
||||
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
||||
set(language_library ${exe}_i18n)
|
||||
add_library(${language_library})
|
||||
target_sources(${language_library} PRIVATE ${i18nSrc})
|
||||
target_compile_definitions(${language_library} PRIVATE ${compilationFlags} ${debugFlags} ${lang})
|
||||
target_link_libraries(${exe} PRIVATE ${language_library})
|
||||
|
||||
# go through all game libraries again and link them to the app/language executable
|
||||
foreach(lib IN LISTS Ja2_Libs)
|
||||
target_link_libraries(${exe} PRIVATE ${app}_${lib})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# for SGP only
|
||||
target_link_libraries(${app}_sgp PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib")
|
||||
target_link_libraries(${app}_sgp PRIVATE libpng)
|
||||
target_compile_definitions(${app}_sgp PRIVATE NO_ZLIB_COMPRESSION)
|
||||
endforeach()
|
||||
|
||||
@@ -173,7 +173,15 @@ void LoadSaveScreenEntry()
|
||||
vfs::CVirtualProfile* prof = it.value();
|
||||
memset(&FileInfo, 0, sizeof(GETFILESTRUCT));
|
||||
strcpy(FileInfo.zFileName, "< ");
|
||||
// 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, " >");
|
||||
FileInfo.zFileName[FILENAME_BUFLEN] = 0;
|
||||
FileInfo.uiFileAttribs = FILE_IS_DIRECTORY;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "BuildDefines.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
|
||||
|
||||
|
||||
@@ -403,14 +403,42 @@ void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
|
||||
while( gRoadMacros[ i ].sMacroID == iMacroID )
|
||||
{
|
||||
// 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 sOffset = sdY*WORLD_COLS + sdX;
|
||||
INT32 sdY = gRoadMacros[ i ].sOffset / (OLD_WORLD_COLS);
|
||||
INT32 sdX = gRoadMacros[ i ].sOffset - (sdY*OLD_WORLD_COLS);
|
||||
|
||||
// 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 );
|
||||
RemoveAllObjectsOfTypeRange( iMapIndex + sOffset, ROADPIECES, ROADPIECES );//dnl this was but is very wrong and leading to stacking tilesets, RemoveAllObjectsOfTypeRange( i, ROADPIECES, ROADPIECES );
|
||||
// Offsets for 160x160 map
|
||||
// [] [] [-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 );
|
||||
AddObjectToHead( iMapIndex + sOffset, usTileIndex );
|
||||
AddObjectToHead( newGridNo, usTileIndex );
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
+18
-4
@@ -1,4 +1,4 @@
|
||||
#include "builddefines.h"
|
||||
#include "builddefines.h"
|
||||
|
||||
#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
|
||||
usFillColor = GenericButtonFillColors[0];
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
if(gbPixelDepth==16)
|
||||
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 );
|
||||
|
||||
@@ -2954,6 +2951,23 @@ UINT32 WaitForSelectionWindowResponse( void )
|
||||
}
|
||||
}
|
||||
|
||||
// Mousewheel scroll
|
||||
if (_WheelValue > 0)
|
||||
{
|
||||
while (_WheelValue--)
|
||||
{
|
||||
ScrollSelWinUp();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (_WheelValue++)
|
||||
{
|
||||
ScrollSelWinDown();
|
||||
}
|
||||
}
|
||||
_WheelValue = 0;
|
||||
|
||||
if ( DoWindowSelection( ) )
|
||||
{
|
||||
fSelectionWindow = FALSE;
|
||||
|
||||
+60
-36
@@ -29,6 +29,16 @@ extern BOOLEAN fDontUseRandom;
|
||||
|
||||
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;
|
||||
INT16 iStartClickX,iStartClickY;
|
||||
INT16 iEndClickX,iEndClickY;
|
||||
@@ -40,7 +50,6 @@ INT32 iSelectWin,iCancelWin,iScrollUp,iScrollDown,iOkWin;
|
||||
BOOLEAN fAllDone=FALSE;
|
||||
BOOLEAN fButtonsPresent=FALSE;
|
||||
|
||||
SGPPoint SelWinSpacing, SelWinStartPoint, SelWinEndPoint;
|
||||
|
||||
//These definitions help define the start and end of the various wall indices.
|
||||
//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 )
|
||||
{
|
||||
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;
|
||||
UINT16 usNSpecs;
|
||||
|
||||
@@ -185,32 +218,33 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
||||
iButtonIcons[ SEL_WIN_DOWN_ICON ] = LoadGenericButtonIcon( "EDITOR//lgDownArrow.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);
|
||||
|
||||
iOkWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_OK_ICON], 0,
|
||||
BUTTON_USE_DEFAULT, 600, 0,
|
||||
BUTTON_USE_DEFAULT, selectWinWidth, 0,
|
||||
40, 40, BUTTON_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, OkClkCallback);
|
||||
SetButtonFastHelpText(iOkWin,pDisplaySelectionWindowButtonText[0]);
|
||||
|
||||
iCancelWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_CANCEL_ICON], 0,
|
||||
BUTTON_USE_DEFAULT, 600, 40,
|
||||
BUTTON_USE_DEFAULT, selectWinWidth, 40,
|
||||
40, 40, BUTTON_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, CnclClkCallback);
|
||||
SetButtonFastHelpText(iCancelWin,pDisplaySelectionWindowButtonText[1]);
|
||||
|
||||
iScrollUp = CreateIconButton((INT16)iButtonIcons[SEL_WIN_UP_ICON], 0,
|
||||
BUTTON_USE_DEFAULT, 600, 80,
|
||||
BUTTON_USE_DEFAULT, selectWinWidth, 80,
|
||||
40, 160, BUTTON_NO_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, UpClkCallback);
|
||||
SetButtonFastHelpText(iScrollUp,pDisplaySelectionWindowButtonText[2]);
|
||||
|
||||
iScrollDown = CreateIconButton((INT16)iButtonIcons[SEL_WIN_DOWN_ICON], 0,
|
||||
BUTTON_USE_DEFAULT, 600, 240,
|
||||
BUTTON_USE_DEFAULT, selectWinWidth, 240,
|
||||
40, 160, BUTTON_NO_TOGGLE,
|
||||
MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, DwnClkCallback);
|
||||
@@ -218,18 +252,6 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
||||
|
||||
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 )
|
||||
{
|
||||
@@ -347,8 +369,8 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
||||
return;
|
||||
}
|
||||
|
||||
BuildDisplayWindow( pDSpec, usNSpecs, &pDispList, &SelWinStartPoint, &SelWinEndPoint,
|
||||
&SelWinSpacing, CLEAR_BACKGROUND);
|
||||
BuildDisplayWindow( pDSpec, usNSpecs, &pDispList, &gSelection.displayAreaStart , &gSelection.displayAreaEnd,
|
||||
&gSelection.spacing, CLEAR_BACKGROUND);
|
||||
}
|
||||
|
||||
|
||||
@@ -849,12 +871,14 @@ void RenderSelectionWindow( void )
|
||||
return;
|
||||
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER,
|
||||
0, 0, 600, 400,
|
||||
GenericButtonFillColors[0]);
|
||||
gSelection.window.iLeft, gSelection.window.iTop, gSelection.window.iRight, gSelection.window.iBottom,
|
||||
GenericButtonFillColors[0]
|
||||
);
|
||||
DrawSelections( );
|
||||
MarkButtonsDirty();
|
||||
RenderButtons( );
|
||||
|
||||
// Draw selection rectangle
|
||||
if ( gfRenderSquareArea )
|
||||
{
|
||||
button = ButtonList[iSelectWin];
|
||||
@@ -862,7 +886,7 @@ void RenderSelectionWindow( void )
|
||||
return;
|
||||
|
||||
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;
|
||||
// iEX = (INT32)button->Area.MouseXPos;
|
||||
@@ -870,7 +894,7 @@ void RenderSelectionWindow( void )
|
||||
// iEY = (INT32)(button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY);
|
||||
|
||||
iSX = iStartClickX;
|
||||
iSY = iStartClickY - iTopWinCutOff + SelWinStartPoint.iY;
|
||||
iSY = iStartClickY - iTopWinCutOff + gSelection.displayAreaStart.iY;
|
||||
iEX = gusMouseXPos;
|
||||
iEY = gusMouseYPos;
|
||||
|
||||
@@ -889,10 +913,10 @@ void RenderSelectionWindow( void )
|
||||
iEY ^= iSY;
|
||||
}
|
||||
|
||||
iEX = min( iEX, 600 );
|
||||
iSY = max( SelWinStartPoint.iY, iSY );
|
||||
iEY = min( 359, iEY );
|
||||
iEY = max( SelWinStartPoint.iY, iEY );
|
||||
iEX = min( gSelection.displayAreaEnd.iX, iEX);
|
||||
iSY = max( gSelection.displayAreaStart.iY, iSY );
|
||||
iEY = min( gSelection.displayAreaEnd.iY, iEY );
|
||||
iEY = max( gSelection.displayAreaStart.iY, iEY );
|
||||
|
||||
usFillColor = Get16BPPColor(FROMRGB(255, usFillGreen, 0));
|
||||
usFillGreen += usDir;
|
||||
@@ -928,7 +952,7 @@ void SelWinClkCallback( GUI_BUTTON *button, INT32 reason )
|
||||
return;
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -1035,9 +1059,9 @@ void DisplaySelectionWindowGraphicalInformation()
|
||||
UINT16 y;
|
||||
//Determine if there is a valid picture at cursor position.
|
||||
//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;
|
||||
fDone = FALSE;
|
||||
while( (pNode != NULL) && !fDone )
|
||||
@@ -1470,10 +1494,10 @@ void DrawSelections( void )
|
||||
{
|
||||
SGPRect ClipRect, NewRect;
|
||||
|
||||
NewRect.iLeft = SelWinStartPoint.iX;
|
||||
NewRect.iTop = SelWinStartPoint.iY;
|
||||
NewRect.iRight = SelWinEndPoint.iX;
|
||||
NewRect.iBottom = SelWinEndPoint.iY;
|
||||
NewRect.iLeft = gSelection.displayAreaStart.iX;
|
||||
NewRect.iTop = gSelection.displayAreaStart.iY;
|
||||
NewRect.iRight = gSelection.displayAreaEnd.iX;
|
||||
NewRect.iBottom = gSelection.displayAreaEnd.iY;
|
||||
|
||||
GetClippingRect(&ClipRect);
|
||||
SetClippingRect(&NewRect);
|
||||
@@ -1483,7 +1507,7 @@ void DrawSelections( void )
|
||||
SetObjectShade( gvoLargeFontType1, 0 );
|
||||
// SetObjectShade( gvoLargeFont, 0 );
|
||||
|
||||
DisplayWindowFunc( pDispList, iTopWinCutOff, iBotWinCutOff, &SelWinStartPoint, CLEAR_BACKGROUND );
|
||||
DisplayWindowFunc( pDispList, iTopWinCutOff, iBotWinCutOff, &gSelection.displayAreaStart, CLEAR_BACKGROUND );
|
||||
|
||||
SetObjectShade( gvoLargeFontType1, 4 );
|
||||
|
||||
|
||||
+1
-17
@@ -14,7 +14,6 @@ set(Ja2Src
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/JA2 Splash.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Ja25Update.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}/MainMenuScreen.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/MessageBoxScreen.cpp"
|
||||
@@ -28,26 +27,11 @@ set(Ja2Src
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/profiler.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadGame.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}/TimeLogging.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ub_config.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_DifficultySettings.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_IntroFiles.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)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef _CHEATS__H_
|
||||
#define _CHEATS__H_
|
||||
|
||||
#include "Language Defines.h"
|
||||
|
||||
extern UINT8 gubCheatLevel;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "Types.h"
|
||||
#include "Credits.h"
|
||||
#include "Language Defines.h"
|
||||
#include "vsurface.h"
|
||||
#include "mousesystem.h"
|
||||
#include "Text.h"
|
||||
|
||||
@@ -681,13 +681,9 @@ BOOLEAN UpdateSaveBufferWithBackbuffer(void)
|
||||
pSrcBuf = LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES);
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// BLIT HERE
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
}
|
||||
|
||||
UnLockVideoSurface(FRAME_BUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "Text.h"
|
||||
#include "Interface Control.h"
|
||||
#include "Message.h"
|
||||
#include "Language Defines.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include "Map Information.h"
|
||||
#include "Sys Globals.h"
|
||||
|
||||
@@ -1830,7 +1830,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||
{
|
||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
||||
if (iResolution >= _800x600 && iResolution < _1280x720)
|
||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||
|
||||
if ( iCurrentSquadSize < maxSquadSize )
|
||||
@@ -1850,7 +1850,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
||||
if (iResolution >= _800x600 && iResolution < _1280x720 )
|
||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||
|
||||
if ( iCurrentSquadSize < maxSquadSize )
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "GameVersion.h"
|
||||
#include "LibraryDataBase.h"
|
||||
#include "Debug.h"
|
||||
#include "Language Defines.h"
|
||||
#include "HelpScreen.h"
|
||||
#include "INIReader.h"
|
||||
#include "Shade Table Util.h"
|
||||
@@ -45,7 +44,7 @@
|
||||
#include <vfs/Core/vfs_file_raii.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"
|
||||
|
||||
@@ -1999,6 +1998,7 @@ void LoadGameExternalOptions()
|
||||
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.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
||||
gGameExternalOptions.fAlwaysFood = iniReader.ReadBoolean("Tactical Food Settings", "ALWAYS_FOOD", FALSE);
|
||||
|
||||
//################# Disease Settings ##################
|
||||
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_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_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_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);
|
||||
|
||||
@@ -506,6 +506,7 @@ typedef struct
|
||||
FLOAT sFoodDecayModificator;
|
||||
|
||||
BOOLEAN fFoodEatingSounds;
|
||||
BOOLEAN fAlwaysFood;
|
||||
|
||||
// Flugente: disease settings
|
||||
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
|
||||
// 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 REBELCOMMAND 183
|
||||
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
||||
|
||||
+88
-109
@@ -35,7 +35,6 @@
|
||||
#include "tile cache.h"
|
||||
#include "strategicmap.h"
|
||||
#include "Map Information.h"
|
||||
#include "laptop.h"
|
||||
#include "Shade Table Util.h"
|
||||
#include "Exit Grids.h"
|
||||
#include "Summary Info.h"
|
||||
@@ -51,6 +50,7 @@
|
||||
#include "Multilingual Text Code Generator.h"
|
||||
#include "editscreen.h"
|
||||
#include "Arms Dealer Init.h"
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "MPXmlTeams.hpp"
|
||||
#include "Strategic Mines LUA.h"
|
||||
#include "UndergroundInit.h"
|
||||
@@ -76,7 +76,8 @@
|
||||
#include "AimArchives.h"
|
||||
#include "connect.h"
|
||||
#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 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) );
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
AddLanguagePrefix( fileName, GetLanguagePrefix());
|
||||
@@ -254,7 +227,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, AMMOFILENAME);
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
|
||||
if ( FileExists(fileName) )
|
||||
@@ -268,9 +241,9 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, AMMOFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
||||
}
|
||||
#else
|
||||
} else {
|
||||
SGP_THROW_IFFALSE(ReadInAmmoStats(fileName),AMMOFILENAME);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Lesh: added this, begin
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -294,14 +267,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
|
||||
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInItemStats(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//if(!WriteItemStats())
|
||||
// return FALSE;
|
||||
@@ -366,14 +339,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat( fileName, DISEASEFILENAME );
|
||||
SGP_THROW_IFFALSE( ReadInDiseaseStats( fileName,FALSE ), DISEASEFILENAME );
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInDiseaseStats(fileName,TRUE), DISEASEFILENAME);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, STRUCTUREDECONSTRUCTFILENAME);
|
||||
@@ -411,14 +384,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, LOADSCREENHINTSFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName, FALSE),LOADSCREENHINTSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInLoadScreenHints(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, ARMOURSFILENAME);
|
||||
@@ -438,22 +411,24 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
if (isMultiplayer == false)
|
||||
{
|
||||
using namespace LogicalBodyTypes;
|
||||
SGP_THROW_IFFALSE(Layers::Instance().LoadFromFile(directoryName, LBT_LAYERSFILENAME), LBT_LAYERSFILENAME);
|
||||
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(FilterDB::Instance().LoadFromFile(directoryName, LBT_FILTERSFILENAME), LBT_FILTERSFILENAME);
|
||||
SGP_THROW_IFFALSE(BodyTypeDB::Instance().LoadFromFile(directoryName, LBT_BODYTYPESFILENAME), LBT_BODYTYPESFILENAME);
|
||||
CHAR8 errorBuf[512]{"Failed loading LogicalBodyTypes external data!"};
|
||||
|
||||
SGP_THROW_IFFALSE(Layers::Instance().LoadFromFile(directoryName, LBT_LAYERSFILENAME, errorBuf), errorBuf);
|
||||
SGP_THROW_IFFALSE(PaletteDB::Instance().LoadFromFile(directoryName, LBT_PALETTESFILENAME, errorBuf), errorBuf);
|
||||
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);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInLBEPocketStats(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// THE_BOB : added for pocket popup definitions
|
||||
LBEPocketPopup.clear();
|
||||
@@ -461,7 +436,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
|
||||
if (FileExists(fileName))
|
||||
@@ -476,10 +451,10 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, LBEPOCKETPOPUPFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||
}
|
||||
#else
|
||||
} else {
|
||||
// WANNE: Load english file
|
||||
SGP_THROW_IFFALSE(ReadInLBEPocketPopups(fileName),LBEPOCKETPOPUPFILENAME);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
@@ -495,14 +470,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, MERCSTARTINGGEARFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName, FALSE), MERCSTARTINGGEARFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMercStartingGearStats(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -519,14 +494,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, ATTACHMENTSLOTSFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName, FALSE),ATTACHMENTSLOTSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Flugente: created separate gun and item choices for different soldier classes - read in different xmls
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -700,14 +675,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, CITYTABLEFILENAME);
|
||||
SGP_THROW_IFFALSE(ReadInMapStructure(fileName, FALSE),CITYTABLEFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInStrategicMapSectorTownNames(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Lesh: Strategic movement costs will be read in Strategic\Strategic Movement Costs.cpp,
|
||||
// function BOOLEAN InitStrategicMovementCosts();
|
||||
@@ -758,14 +733,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, FALSE),SHIPPINGDESTINATIONSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInShippingDestinations(fileName, TRUE),fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, DELIVERYMETHODSFILENAME);
|
||||
@@ -778,14 +753,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,FALSE), FACILITYTYPESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInFacilityTypes(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.4: Read in facility locations
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -799,14 +774,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,0), SECTORNAMESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInSectorNames(fileName,TRUE, 0), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// HEADROCK HAM 5: Read in Coolness by Sector
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -828,7 +803,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME25);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -836,7 +811,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
if(!ReadInMercProfiles(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -854,14 +829,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName, FALSE), MERCPROFILESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMercProfiles(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// HEADROCK PROFEX: Read in Merc Opinion data to replace PROF.DAT data
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -924,14 +899,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInEnemyNames(fileName,FALSE), ENEMYNAMESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", 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));
|
||||
SGP_THROW_IFFALSE(ReadInCivGroupNamesStats(fileName,FALSE), CIVGROUPNAMESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", 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));
|
||||
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,FALSE), EMAILSENDERNAMELIST);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInSenderNameList(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
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));
|
||||
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,FALSE), ENEMYRANKFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInEnemyRank(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: backgrounds
|
||||
@@ -993,14 +968,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,FALSE), BACKGROUNDSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,TRUE), BACKGROUNDSFILENAME);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Flugente: individual militia
|
||||
strcpy( fileName, directoryName );
|
||||
@@ -1014,14 +989,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,FALSE), CAMPAIGNSTATSEVENTSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInCampaignStatsEvents(fileName,TRUE), CAMPAIGNSTATSEVENTSFILENAME);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// WANNE: Only in a singleplayer game...
|
||||
// Externalised taunts
|
||||
@@ -1042,14 +1017,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, FileInfo.zFileName);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
while( GetFileNext(&FileInfo) )
|
||||
{
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -1057,14 +1032,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
strcat(fileName, FileInfo.zFileName);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), fileName);
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
GetFileClose(&FileInfo);
|
||||
}
|
||||
@@ -1076,14 +1051,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInHistorys(fileName,FALSE), HISTORYNAMEFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInHistorys(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// IMP Portraits List by Jazz
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -1091,14 +1066,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,FALSE), IMPPORTRAITS);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInIMPPortraits(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LoadIMPPortraitsTEMP( );
|
||||
|
||||
@@ -1183,14 +1158,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
SGP_THROW_IFFALSE(ReadInFaceGear(zNewFaceGear, fileName), FACEGEARFILENAME);
|
||||
//WriteFaceGear();
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMercAvailability(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
UINT32 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));
|
||||
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,FALSE), AIMAVAILABILITY);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInAimAvailability(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//Main Menu by Jazz
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -1224,7 +1199,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInActionItems(fileName,FALSE), ACTIONITEMSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1232,7 +1207,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName, BOOLEAN isMultiplayer)
|
||||
if(!ReadInActionItems(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( ReadXMLEmail == TRUE )
|
||||
{
|
||||
@@ -1242,7 +1217,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInEmailMercAvailable(fileName,FALSE), EMAILMERCAVAILABLE);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1250,7 +1225,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
if(!ReadInEmailMercAvailable(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// EMAIL MERC LEVEL UP by Jazz
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -1258,7 +1233,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInEmailMercLevelUp(fileName,FALSE), EMAILMERCLEVELUP);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1266,7 +1241,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
if(!ReadInEmailMercLevelUp(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/*
|
||||
// EMAIL OTHER by Jazz
|
||||
@@ -1275,7 +1250,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInEmailOther(fileName,FALSE), EMAILOTHER);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1283,7 +1258,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
if(!ReadInEmailOther(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
//new vehicles by Jazz
|
||||
|
||||
@@ -1294,7 +1269,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInNewVehicles(fileName,FALSE), VEHICLESFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1302,9 +1277,9 @@ if ( ReadXMLEmail == TRUE )
|
||||
if(!ReadInNewVehicles(fileName,TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
@@ -1312,7 +1287,7 @@ if ( ReadXMLEmail == TRUE )
|
||||
if(!ReadInLanguageLocation(fileName,TRUE,zlanguageText,0))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_BRIEFINGROOM
|
||||
strcpy(fileName, directoryName);
|
||||
@@ -1320,14 +1295,14 @@ if ( ReadXMLEmail == TRUE )
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,FALSE,gBriefingRoomData, 4), BRIEFINGROOMFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInBriefingRoom(fileName,TRUE,gBriefingRoomData, 4), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
||||
|
||||
@@ -1339,14 +1314,14 @@ BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMinerals(fileName,FALSE), MINERALSFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInMinerals(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Old AIM Archive
|
||||
UINT8 p;
|
||||
@@ -1360,14 +1335,14 @@ BackupBRandEncyclopedia ( gBriefingRoomData, gBriefingRoomDataBackup, 0);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,FALSE), OLDAIMARCHIVEFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInAimOldArchive(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
UINT8 emptyslotsinarchives = 0;
|
||||
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));
|
||||
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,FALSE), DIFFICULTYFILENAME);
|
||||
|
||||
#ifndef ENGLISH
|
||||
if( g_lang != i18n::Lang::en ) {
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
SGP_THROW_IFFALSE(ReadInDifficultySettings(fileName,TRUE), fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LuaState::INIT(lua::LUA_STATE_STRATEGIC_MINES_AND_UNDERGROUND, true);
|
||||
g_luaUnderground.LoadScript(GetLanguagePrefix());
|
||||
@@ -1498,6 +1473,10 @@ UINT32 InitializeJA2(void)
|
||||
return( ERROR_SCREEN );
|
||||
}
|
||||
|
||||
// InitRadarScreenCoords() depend on Mapscreen Interface Bottom coordinates -> need to initiate them first
|
||||
// before calling InitTacticalEngine()
|
||||
InitMapScreenInterfaceBottomCoords();
|
||||
|
||||
// Init tactical engine
|
||||
if ( !InitTacticalEngine( ) )
|
||||
{
|
||||
|
||||
+4
-3
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "LuaInitNPCs.h"
|
||||
#include "XML.h"
|
||||
#include <language.hpp>
|
||||
|
||||
BOOLEAN Style_JA = TRUE;
|
||||
extern INT8 Test = 0;
|
||||
@@ -726,11 +727,11 @@ void DisplaySirtechSplashScreen()
|
||||
* (2006-10-10, Sergeant_Kolja)
|
||||
*/
|
||||
#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?" ) );
|
||||
# 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!" ) );
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
AssertMsg( 0, String( "Failed to load %s", VObjectDesc.ImageFile ) );
|
||||
return;
|
||||
|
||||
+2
-4
@@ -12,13 +12,11 @@ void StopIntroVideo();
|
||||
//enums used for when the intro screen can come up, used with 'gbIntroScreenMode'
|
||||
enum EIntroType
|
||||
{
|
||||
#ifdef JA2UB
|
||||
INTRO_HELI_CRASH,
|
||||
#endif
|
||||
INTRO_BEGINNING, //set when viewing the intro at the begining of the game
|
||||
INTRO_ENDING, //set when viewing the end game video.
|
||||
|
||||
INTRO_SPLASH,
|
||||
// Unfinished Business
|
||||
INTRO_HELI_CRASH
|
||||
};
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -5,6 +5,7 @@
|
||||
#include "Timer Control.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include <stdio.h>
|
||||
#include <language.hpp>
|
||||
|
||||
UINT32 guiSplashFrameFade = 10;
|
||||
UINT32 guiSplashStartTime = 0;
|
||||
@@ -13,10 +14,10 @@ extern HVSURFACE ghFrameBuffer;
|
||||
//Simply create videosurface, load image, and draw it to the screen.
|
||||
void InitJA2SplashScreen()
|
||||
{
|
||||
#ifdef ENGLISH
|
||||
if( g_lang == i18n::Lang::en ) {
|
||||
ClearMainMenu();
|
||||
|
||||
#else
|
||||
} else {
|
||||
UINT32 uiLogoID = 0;
|
||||
HVSURFACE hVSurface; // 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 );
|
||||
BltVideoSurfaceToVideoSurface( ghFrameBuffer, hVSurface, 0, iScreenWidthOffset, iScreenHeightOffset, 0, NULL );
|
||||
DeleteVideoSurfaceFromIndex( uiLogoID );
|
||||
#endif // ENGLISH
|
||||
} // ENGLISH
|
||||
|
||||
InvalidateScreen();
|
||||
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 "Interface Control.h"
|
||||
#include "Message.h"
|
||||
#include "Language Defines.h"
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include "Map Information.h"
|
||||
#include "SmokeEffects.h"
|
||||
|
||||
+16
-5
@@ -152,6 +152,7 @@
|
||||
#endif
|
||||
|
||||
#include "LuaInitNPCs.h"
|
||||
#include <language.hpp>
|
||||
|
||||
|
||||
#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->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), 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->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), 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
|
||||
if ( guiCurrentSaveGameVersion < 94 )
|
||||
{
|
||||
@@ -7067,7 +7078,7 @@ BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
||||
Menptr[ cnt].aiData.bNeutral = FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//#ifdef JA2UB
|
||||
//if the soldier has the NON weapon version of the merc knofe or merc umbrella
|
||||
//ConvertWeapons( &Menptr[ cnt ] );
|
||||
@@ -9749,9 +9760,9 @@ UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader )
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GERMAN
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
uiEncryptionSet *= 11;
|
||||
#endif
|
||||
}
|
||||
|
||||
uiEncryptionSet = uiEncryptionSet % 10;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef _BUILDDEFINES_H
|
||||
#define _BUILDDEFINES_H
|
||||
|
||||
#include "Language Defines.h"
|
||||
|
||||
//----- Briefing Room (Mission based JA2 like in JA/DG) - by Jazz -----
|
||||
// Once enabled here and also enabled in the ja2_options.ini (BRIEFING_ROOM),
|
||||
// you can access the briefing room feature from the laptop
|
||||
|
||||
+6
-8
@@ -45,10 +45,10 @@
|
||||
#include "Sound Control.h"
|
||||
#include "WordWrap.h"
|
||||
#include "text.h"
|
||||
#include "Language Defines.h"
|
||||
#include "IniReader.h"
|
||||
|
||||
#include "sgp_logger.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#define _UNICODE
|
||||
// Networking Stuff
|
||||
@@ -332,7 +332,7 @@ UINT32 InitScreenHandle(void)
|
||||
|
||||
if ( ubCurrentScreen == 255 )
|
||||
{
|
||||
#ifdef ENGLISH
|
||||
if( g_lang == i18n::Lang::en ) {
|
||||
if( gfDoneWithSplashScreen )
|
||||
{
|
||||
ubCurrentScreen = 0;
|
||||
@@ -342,9 +342,9 @@ UINT32 InitScreenHandle(void)
|
||||
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
|
||||
return( INTRO_SCREEN );
|
||||
}
|
||||
#else
|
||||
} else {
|
||||
ubCurrentScreen = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if ( ubCurrentScreen == 0 )
|
||||
@@ -397,7 +397,7 @@ UINT32 InitScreenHandle(void)
|
||||
// Handle queued .ini file error messages
|
||||
int y = 40;
|
||||
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);
|
||||
while (! iniErrorMessages.empty()) {
|
||||
static BOOL iniErrorMessage_create_out_file = TRUE;
|
||||
@@ -407,7 +407,7 @@ UINT32 InitScreenHandle(void)
|
||||
if (iniErrorMessage_create_out_file)
|
||||
{
|
||||
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 );
|
||||
iniErrorMessage_create_out_file = FALSE;
|
||||
}
|
||||
@@ -943,7 +943,6 @@ void DoneFadeOutForDemoExitScreen( void )
|
||||
// unused
|
||||
//extern INT8 gbFadeSpeed;
|
||||
|
||||
#ifdef GERMAN
|
||||
void DisplayTopwareGermanyAddress()
|
||||
{
|
||||
VOBJECT_DESC vo_desc;
|
||||
@@ -978,7 +977,6 @@ void DisplayTopwareGermanyAddress()
|
||||
ExecuteBaseDirtyRectQueue();
|
||||
EndFrameBufferRender();
|
||||
}
|
||||
#endif
|
||||
|
||||
UINT32 DemoExitScreenHandle(void)
|
||||
{
|
||||
|
||||
+7
-1
@@ -238,7 +238,8 @@ void LoadGameUBOptions()
|
||||
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.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.PowergenFanSoundGridNo2 = iniReader.ReadInteger("Unfinished Business Settings","POWERGEN_FAN_SOUND_GRIDNO_2", 19749);
|
||||
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.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 )
|
||||
gGameUBOptions.InGameHeliCrash = FALSE;
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ typedef struct
|
||||
UINT32 PowergenSectorGridNo3;
|
||||
UINT32 PowergenSectorGridNo4;
|
||||
UINT32 PowergenSectorExitgridGridNo;
|
||||
UINT32 PowergenSectorExitgridSrcGridNo;
|
||||
UINT32 PowergenFanSoundGridNo1;
|
||||
UINT32 PowergenFanSoundGridNo2;
|
||||
UINT32 StartFanbackupAgainGridNo;
|
||||
@@ -220,6 +221,9 @@ typedef struct
|
||||
|
||||
UINT8 MaxNumberOfMercs;
|
||||
|
||||
INT16 BettyBloodCatSectorX;
|
||||
INT16 BettyBloodCatSectorY;
|
||||
INT8 BettyBloodCatSectorZ;
|
||||
} GAME_UB_OPTIONS;
|
||||
|
||||
extern GAME_UB_OPTIONS gGameUBOptions;
|
||||
|
||||
+92
-16
@@ -36,7 +36,6 @@
|
||||
#include "Strategic Status.h"
|
||||
#include "Merc Contract.h"
|
||||
#include "Strategic Merc Handler.h"
|
||||
#include "Language Defines.h"
|
||||
#include "Assignments.h"
|
||||
#include "Sound Control.h"
|
||||
#include "Quests.h"
|
||||
@@ -50,6 +49,7 @@
|
||||
#include "Encrypted File.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#include <sstream>
|
||||
#include <language.hpp>
|
||||
|
||||
//
|
||||
//****** Defines ******
|
||||
@@ -148,10 +148,16 @@
|
||||
#define FEE_X PRICE_X + 7
|
||||
#define FEE_Y NAME_Y
|
||||
#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_Y FEE_Y
|
||||
#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 ONEWEEK_X AIM_CONTRACT_X
|
||||
@@ -1120,7 +1126,13 @@ BOOLEAN RenderAIMMembers()
|
||||
|
||||
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
|
||||
#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_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_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
|
||||
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 );
|
||||
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 );
|
||||
#endif // JA2UB
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1163,6 +1173,12 @@ BOOLEAN RenderAIMMembers()
|
||||
|
||||
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
|
||||
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 );
|
||||
@@ -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_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
|
||||
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 );
|
||||
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 );
|
||||
#endif
|
||||
}
|
||||
|
||||
DisableAimButton();
|
||||
@@ -1309,6 +1323,10 @@ BOOLEAN UpdateMercInfo(void)
|
||||
|
||||
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
|
||||
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 );
|
||||
@@ -1335,6 +1353,8 @@ BOOLEAN UpdateMercInfo(void)
|
||||
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);
|
||||
}
|
||||
#endif // JA2UB
|
||||
|
||||
if(!g_bUseXML_Strings)
|
||||
{
|
||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||
@@ -1363,6 +1383,10 @@ BOOLEAN UpdateMercInfo(void)
|
||||
}
|
||||
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
|
||||
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 );
|
||||
@@ -1389,6 +1413,7 @@ BOOLEAN UpdateMercInfo(void)
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
if(!g_bUseXML_Strings)
|
||||
{
|
||||
// LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||
@@ -2529,6 +2554,21 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
||||
|
||||
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 && gGameSettings.fOptions[ TOPTION_SUBTITLES ] )
|
||||
{
|
||||
@@ -2578,6 +2618,9 @@ BOOLEAN DisplayMercsVideoFace()
|
||||
|
||||
void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
||||
{
|
||||
#ifdef JA2UB
|
||||
return;
|
||||
#else
|
||||
UINT16 i, usPosY, usPosX;
|
||||
|
||||
//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;
|
||||
}
|
||||
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;
|
||||
|
||||
//the contract charge amount
|
||||
|
||||
#ifdef JA2UB
|
||||
// Special offer for a limited time! Act fast!
|
||||
giContractAmount = gMercProfiles[gbCurrentSoldier].uiWeeklySalary;
|
||||
#else
|
||||
// Get the salary rate
|
||||
if( gubContractLength == AIM_CONTRACT_LENGTH_ONE_DAY)
|
||||
giContractAmount = gMercProfiles[gbCurrentSoldier].sSalary;
|
||||
@@ -2676,6 +2724,7 @@ UINT32 DisplayMercChargeAmount()
|
||||
{
|
||||
giContractAmount += gMercProfiles[gbCurrentSoldier].usOptionalGearCost;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2686,10 +2735,15 @@ UINT32 DisplayMercChargeAmount()
|
||||
//if the merc hasnt just been hired
|
||||
// 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 )
|
||||
swprintf(wTemp, L"%s %s", wDollarTemp, VideoConfercingText[AIM_MEMBER_WITH_MEDICAL] );
|
||||
else
|
||||
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);
|
||||
}
|
||||
@@ -4086,6 +4140,22 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
||||
|
||||
// InitVideoFaceTalking(gbCurrentSoldier, QUOTE_LENGTH_OF_CONTRACT);
|
||||
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( )
|
||||
{
|
||||
INT16 i;
|
||||
#ifdef GERMAN
|
||||
UINT8 MercID[]={ 7, 10, 4, 14, 50 };
|
||||
#else
|
||||
UINT8 MercID[]={ 7, 10, 4, 42, 33 };
|
||||
#endif
|
||||
UINT8 MercID[5];
|
||||
MercID[0] = 7;
|
||||
MercID[1] = 10;
|
||||
MercID[2] = 4;
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
MercID[3] = 14;
|
||||
MercID[4] = 50;
|
||||
} else {
|
||||
MercID[3] = 42;
|
||||
MercID[4] = 33;
|
||||
}
|
||||
MERC_HIRE_STRUCT HireMercStruct;
|
||||
static BOOLEAN fHaveCalledBefore=FALSE;
|
||||
|
||||
@@ -5393,20 +5469,20 @@ void DisplayPopUpBoxExplainingMercArrivalLocationAndTime( )
|
||||
//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
|
||||
|
||||
#ifdef GERMAN
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
//Germans version has a different argument order
|
||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||
zTimeString,
|
||||
zSectorIDString );
|
||||
#else
|
||||
} else {
|
||||
swprintf( szLocAndTime, pMessageStrings[ MSG_JUST_HIRED_MERC_ARRIVAL_LOCATION_POPUP ],
|
||||
gMercProfiles[ pSoldier->ubProfile ].zNickname,
|
||||
zSectorIDString,
|
||||
LaptopSaveInfo.sLastHiredMerc.uiArrivalTime / 1440,
|
||||
zTimeString );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ TestTable::Display( )
|
||||
{
|
||||
MSYS_DefineRegion( &it->mMouseRegion[i - mFirstEntryShown],
|
||||
usPosX, usPosY, usPosX + it->GetRequiredLength(), usPosY + heightperrow,
|
||||
MSYS_PRIORITY_HIGHEST, CURSOR_WWW,
|
||||
MSYS_PRIORITY_HIGHEST-3, CURSOR_WWW,
|
||||
MSYS_NO_CALLBACK, ( *it ).RegionClickCallBack );
|
||||
MSYS_AddRegion( &it->mMouseRegion[i - mFirstEntryShown] );
|
||||
|
||||
|
||||
+10
-9
@@ -20,6 +20,7 @@
|
||||
// HEADROCK HAM 4
|
||||
#include "input.h"
|
||||
#include "Encyclopedia_new.h" //update encyclopedia item visibility when viewing that item
|
||||
#include <language.hpp>
|
||||
|
||||
|
||||
#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_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 - 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 BOBBYR_ITEMS_BOUGHT_X BOBBYR_GRIDLOC_X + 105 - BOBBYR_ORDER_NUM_WIDTH//BOBBYR_ITEM_QTY_NUM_X
|
||||
|
||||
#define BOBBY_RAY_NOT_PURCHASED 255
|
||||
#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)
|
||||
{
|
||||
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( fUsed )
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( sTemp, ChineseSpecString2, LaptopSaveInfo.BobbyRayUsedInventory[ usBobbyIndex ].ubItemQuality );//zww
|
||||
#else
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "GameSettings.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
#include <vfs/Core/File/vfs_file.h>
|
||||
#include <language.hpp>
|
||||
|
||||
/*
|
||||
typedef struct
|
||||
@@ -488,11 +489,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
||||
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
||||
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
||||
//inshy: fix position of text for buttons
|
||||
#ifdef FRENCH
|
||||
if(g_lang == i18n::Lang::fr) {
|
||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 13, 10, TRUE );
|
||||
#else
|
||||
} else {
|
||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Accept Order button
|
||||
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
||||
@@ -504,11 +505,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
||||
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
||||
//inshy: fix position of text for buttons
|
||||
#ifdef FRENCH
|
||||
if(g_lang == i18n::Lang::fr) {
|
||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 15, 24, TRUE );
|
||||
#else
|
||||
} else {
|
||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
||||
#endif
|
||||
}
|
||||
SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
||||
|
||||
if( gbSelectedCity == -1 )
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "text.h"
|
||||
#include "LaptopSave.h"
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
|
||||
#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
|
||||
// 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
|
||||
DWORD threadId = GetWindowThreadProcessId( ghWindow, 0 );
|
||||
DWORD layout = (DWORD)GetKeyboardLayout( threadId ) & 0xFFFF;
|
||||
if( layout == 0x419 ) // Russian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#ÔÈÑÂÓÀÏÐØÎËÄÜÒÙÇÉÊÛÅÃÌÖ×Íßõ#ú#_¸ôèñâóàïðøîëäüòùçéêûåãìö÷íÿÕ#Ú¨ ";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
@@ -567,28 +568,23 @@ void HandleBeginScreenTextEvent( UINT32 uiKey )
|
||||
else if( layout == 0x423 ) // Belarussian
|
||||
{
|
||||
unsigned char TranslationTable[] =
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨";
|
||||
" #Ý####ý####á-þ.0123456789ÆæÁ#Þ,#Ô²ÑÂÓÀÏÐØÎËÄÜÒ¡ÇÉÊÛÅÃÌÖ×Íßõ#'#_¸ô³ñâóàïðøîëäüò¢çéêûåãìö÷íÿÕ#'¨ ";
|
||||
|
||||
uiKey = TranslateKey( uiKey, TranslationTable );
|
||||
uiKey = GetCyrillicUnicodeChar( uiKey );
|
||||
}
|
||||
else if( !CheckIsKeyValid( uiKey ) )
|
||||
uiKey = '#';
|
||||
|
||||
if( uiKey != '#')
|
||||
#else
|
||||
#ifndef USE_CODE_PAGE
|
||||
if( uiKey >= 'A' && uiKey <= 'Z' ||
|
||||
}
|
||||
if( (g_lang != i18n::Lang::ru &&
|
||||
uiKey >= 'A' && uiKey <= 'Z' ||
|
||||
uiKey >= 'a' && uiKey <= 'z' ||
|
||||
uiKey >= '0' && uiKey <= '9' ||
|
||||
uiKey == '_' || uiKey == '.' ||
|
||||
uiKey == ' ' || uiKey == '"' ||
|
||||
uiKey == 39 // This is ' which cannot be written explicitly here of course
|
||||
)
|
||||
#else
|
||||
if( charSet::IsFromSet( uiKey, charSet::CS_SPACE|charSet::CS_ALPHA_NUM|charSet::CS_SPECIAL_ALPHA ) )
|
||||
#endif
|
||||
#endif
|
||||
) ||
|
||||
uiKey != '#')
|
||||
{
|
||||
// if the current string position is at max or great, do nothing
|
||||
switch( ubTextEnterMode )
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "GameSettings.h"
|
||||
#endif
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
#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);
|
||||
|
||||
//inshy (18.01.2009): fix position for russian text
|
||||
#ifdef RUSSIAN
|
||||
if( g_lang == i18n::Lang::ru ) {
|
||||
// male
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 225, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
// female
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 335, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
#else
|
||||
} else {
|
||||
// male
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 240, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_10, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
|
||||
// female
|
||||
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 360, LAPTOP_SCREEN_WEB_UL_Y + 259, ( 640 ), IMP_BEGIN_11, FONT14ARIAL, FONT_BLACK, FALSE, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
case ( IMP_PERSONALITY ):
|
||||
|
||||
+116
-40
@@ -418,6 +418,34 @@ BOOLEAN EnterMercsFiles()
|
||||
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 )
|
||||
{
|
||||
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
|
||||
{
|
||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
//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 );
|
||||
TryToHireMERC();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,15 +721,7 @@ void BtnMercHireButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
//else try to hire the merc
|
||||
else
|
||||
{
|
||||
if ( (gMercProfiles[ GetAvailableMercIDFromMERCArray( gubCurMercIndex ) ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) && !gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
//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 );
|
||||
TryToHireMERC();
|
||||
}
|
||||
|
||||
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);
|
||||
usPosY += MERC_SPACE_BN_LINES;
|
||||
|
||||
//Daily 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);
|
||||
//Merc Salary
|
||||
#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);
|
||||
swprintf(sString, L"%d", gMercProfiles[ ubMercID ].sSalary);
|
||||
usPosX = MERC_STATS_SECOND_COL_X + StringPixLength( CharacterInfo[AIM_MEMBER_FEE], MERC_NAME_FONT );
|
||||
swprintf( sString, L"%d", gMercProfiles[ubMercID].uiWeeklySalary );
|
||||
InsertCommasForDollarFigure( 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 );
|
||||
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)
|
||||
{
|
||||
//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);
|
||||
|
||||
if ( (gMercProfiles[ ubMercID ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS )
|
||||
&& ( !(gMercProfiles[ ubMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable ) )
|
||||
if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)
|
||||
&& (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) )
|
||||
{
|
||||
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);
|
||||
InsertCommasForDollarFigure( 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);
|
||||
|
||||
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);
|
||||
#endif
|
||||
InsertCommasForDollarFigure( sTemp );
|
||||
InsertDollarSignInToString( sTemp );
|
||||
wcscat( N2sString, sTemp );
|
||||
@@ -1175,6 +1215,22 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
||||
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 );
|
||||
|
||||
//already have limit of mercs on the team
|
||||
@@ -1196,16 +1252,25 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID)
|
||||
AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), Namount );
|
||||
}
|
||||
|
||||
#ifdef JA2UB
|
||||
#ifdef JA2UB
|
||||
//add an entry in the finacial page for the hiring of the merc
|
||||
AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -(INT32)( gMercProfiles[ubMercID].uiWeeklySalary ) );
|
||||
#endif
|
||||
INT32 totalCost = gMercProfiles[ubMercID].uiWeeklySalary;
|
||||
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
|
||||
if ( fMercBuyEquipment )
|
||||
{
|
||||
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;
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
@@ -1305,15 +1370,7 @@ void HandleMercsFilesKeyBoardInput( )
|
||||
//else try to hire the merc
|
||||
else
|
||||
{
|
||||
//bought gear before
|
||||
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 );
|
||||
TryToHireMERC();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1783,11 +1840,22 @@ void MercWeaponKitSelectionUpdate(UINT8 selectedInventory)
|
||||
void MercHireButtonGearYesNoCallback (UINT8 bExitValue)
|
||||
{
|
||||
//yes, buy gear
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
if ( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
fMercBuyEquipment = 1;
|
||||
}
|
||||
//no, no gear
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
// Switch to the free, first kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
fMercBuyEquipment = 1;
|
||||
#else
|
||||
fMercBuyEquipment = 0;
|
||||
#endif // JA2UB
|
||||
}
|
||||
|
||||
MercProcessHireAfterGear();
|
||||
}
|
||||
@@ -1810,6 +1878,10 @@ void MercProcessHireAfterGear()
|
||||
|
||||
void NextMercMember()
|
||||
{
|
||||
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
|
||||
if (gfKeyState [ CTRL ])
|
||||
gubCurMercIndex = LaptopSaveInfo.gubLastMercIndex;
|
||||
else if (gfKeyState [ SHIFT ])
|
||||
@@ -1840,6 +1912,10 @@ void NextMercMember()
|
||||
|
||||
void PrevMercMember()
|
||||
{
|
||||
// Reset selected kit, cannot assume next merc has more than 1 kit
|
||||
gSelectedMercKit = 0;
|
||||
MercWeaponKitSelectionUpdate( gSelectedMercKit );
|
||||
|
||||
if (gfKeyState [ CTRL ])
|
||||
gubCurMercIndex = 0;
|
||||
else if (gfKeyState [ SHIFT ])
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "../../TileEngine/Isometric Utils.h" // defines NOWHERE
|
||||
#include "../../Utils/Debug Control.h" // LiveMessage
|
||||
#include "../../Utils/Font Control.h" // ScreenMsg about deadlock
|
||||
#include "../../Utils/Text.h" // Sniper warning
|
||||
#include <Text.h> // Sniper warning
|
||||
#include "../../Utils/message.h" // ditto
|
||||
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ extern "C" {
|
||||
#include "Merc Contract.h"
|
||||
#include "message.h"
|
||||
#include "Town Militia.h"
|
||||
#include <language.hpp>
|
||||
|
||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||
|
||||
@@ -12802,26 +12803,7 @@ static int l_GetUsedLanguage( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) )
|
||||
{
|
||||
INT32 val = 0;
|
||||
|
||||
#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
|
||||
|
||||
INT32 val = static_cast<INT32>(g_lang);
|
||||
lua_pushinteger( L, val );
|
||||
}
|
||||
|
||||
|
||||
@@ -1278,8 +1278,7 @@ void LandHelicopter( void )
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
Assert( 0 );
|
||||
//No meanwhiles
|
||||
//No meanwhiles in UB
|
||||
#else
|
||||
// play meanwhile scene if it hasn't been used yet
|
||||
HandleKillChopperMeanwhileScene();
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "SaveLoadGame.h"
|
||||
#include "strategicmap.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
struct UILayout_BottomButtons
|
||||
{
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
#include "types.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
|
||||
extern INT8 gbExitingMapScreenToWhere;
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
#include "LaptopSave.h"
|
||||
#include <language.hpp>
|
||||
|
||||
// added by Flugente
|
||||
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
|
||||
if( gTownLoyalty[ bTown ].fStarted && gfTownUsesLoyalty[ bTown ])
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( sStringA, L"%d%£¥%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
||||
#else
|
||||
} else {
|
||||
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 ( ( 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 (GetMaxPeriodicRemovalFromMine(ubMineIndex) > 0)
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( wSubString, L" (%d%£¥%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||
#else
|
||||
} else {
|
||||
swprintf( wSubString, L" (%d%%%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||
#endif
|
||||
}
|
||||
|
||||
wcscat( wString, wSubString );
|
||||
}
|
||||
@@ -5282,12 +5283,12 @@ BOOLEAN LoadMilitiaPopUpBox( void )
|
||||
// load the militia pop up box
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||
else if (iResolution < _1024x768)
|
||||
if ( isWidescreenUI() || iResolution >= _1024x768)
|
||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||
else if (iResolution >= _800x600)
|
||||
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
||||
else
|
||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
||||
|
||||
|
||||
@@ -864,7 +864,7 @@ void EndMeanwhile( )
|
||||
{
|
||||
// We leave this sector open for our POWs to escape!
|
||||
// Set music mode to enemy present!
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
|
||||
@@ -342,8 +342,8 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
// Ja25: no loyalty
|
||||
#else
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||
UpdateAirspaceControl( );
|
||||
#endif
|
||||
UpdateAirspaceControl( );
|
||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||
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
|
||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gubPBSectorX, gubPBSectorY ) ].SoundTacticalTensor[gubPBSectorZ];
|
||||
|
||||
@@ -3072,7 +3072,7 @@ BOOLEAN CheckPendingNonPlayerTeam( UINT8 usTeam )
|
||||
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||
{
|
||||
//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( pSector->bBloodCats == 0 )
|
||||
|
||||
@@ -1609,6 +1609,11 @@ void InitStrategicAI()
|
||||
case 1:
|
||||
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->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||
@@ -1627,6 +1632,10 @@ void InitStrategicAI()
|
||||
case 2:
|
||||
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->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||
@@ -1645,6 +1654,10 @@ void InitStrategicAI()
|
||||
case 3:
|
||||
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->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||
@@ -1663,6 +1676,10 @@ void InitStrategicAI()
|
||||
case 4:
|
||||
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->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||
@@ -1681,6 +1698,10 @@ void InitStrategicAI()
|
||||
case 5:
|
||||
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->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||
@@ -1705,25 +1726,40 @@ void InitStrategicAI()
|
||||
}
|
||||
else
|
||||
{
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||
if ( gModSettings.ubWeaponCache1X != 0 && gModSettings.ubWeaponCache1Y != 0 )
|
||||
{
|
||||
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 = &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 = &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 = &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 = &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
|
||||
@@ -7113,15 +7149,16 @@ void InitializeGroup( const GROUP_TYPE groupType, const UINT16 groupSize, UINT16
|
||||
tankCount++;
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||
{
|
||||
troopCount--;
|
||||
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;
|
||||
robotCount += numRobots;
|
||||
}
|
||||
|
||||
@@ -1085,7 +1085,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
||||
}
|
||||
|
||||
//Set music
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
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 &&
|
||||
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
||||
pFirstGroup->ubSectorZ == pGroup->ubSectorZ &&
|
||||
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
||||
!IsGroupTheHelicopterGroup( pGroup ) )
|
||||
{
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "Luaglobal.h"
|
||||
#include "LuaInitNPCs.h"
|
||||
#include "Interface.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#include "GameInitOptionsScreen.h"
|
||||
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 );
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
//diffrent order of words in Chinese
|
||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], pSectorString, ubHowMany );
|
||||
#else
|
||||
} else {
|
||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], ubHowMany, pSectorString );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
|
||||
@@ -79,6 +79,7 @@ BOOLEAN LuaUnderground::InitializeSectorList()
|
||||
.TableOpen()
|
||||
.TParam("difficultyLevel", int(gGameOptions.ubDifficultyLevel))
|
||||
.TParam("gameStyle", int(gGameOptions.ubGameStyle))
|
||||
.TParam("maxTacticalEnemies", int(gGameExternalOptions.ubGameMaximumNumberOfEnemies))
|
||||
.TableClose();
|
||||
|
||||
SGP_THROW_IFFALSE(initsectorlist_func.Call(1), "call to lua function BuildUndergroundSectorList failed");
|
||||
|
||||
+10
-22
@@ -11,10 +11,8 @@
|
||||
#include "font.h"
|
||||
#include "screenids.h"
|
||||
#include "screens.h"
|
||||
#include "gameloop.h"
|
||||
#include "overhead.h"
|
||||
#include "sysutil.h"
|
||||
#include "input.h"
|
||||
#include "Event Pump.h"
|
||||
#include "Font Control.h"
|
||||
#include "Timer Control.h"
|
||||
@@ -44,18 +42,15 @@
|
||||
#include "PopUpBox.h"
|
||||
#include "Game Clock.h"
|
||||
#include "items.h"
|
||||
#include "vobject.h"
|
||||
#include "Cursor Control.h"
|
||||
#include "text.h"
|
||||
#include "strategic.h"
|
||||
#include "strategicmap.h"
|
||||
#include "interface.h"
|
||||
#include "strategic pathing.h"
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Map Screen Interface Border.h"
|
||||
#include "Map Screen Interface Map.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#include "Strategic Pathing.h"
|
||||
#include "Assignments.h"
|
||||
#include "points.h"
|
||||
#include "Squads.h"
|
||||
@@ -114,7 +109,7 @@
|
||||
|
||||
#include "connect.h" //hayden
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "vobject.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "laptop.h"
|
||||
@@ -4795,9 +4790,6 @@ UINT32 MapScreenHandle(void)
|
||||
|
||||
InitPreviousPaths();
|
||||
|
||||
// HEADROCK HAM 3.6: Init coordinates for new variable-sized message window
|
||||
InitMapScreenInterfaceBottomCoords();
|
||||
|
||||
// if arrival sector is invalid, reset to A9
|
||||
if ( ( gsMercArriveSectorX < 1 ) || ( gsMercArriveSectorY < 1 ) ||
|
||||
( gsMercArriveSectorX > 16 ) || ( gsMercArriveSectorY > 16 ) )
|
||||
@@ -9065,12 +9057,8 @@ void RenderMapHighlight( INT16 sMapX, INT16 sMapY, UINT16 usLineColor, BOOLEAN f
|
||||
// clip to view region
|
||||
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// 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 );
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
@@ -9673,27 +9661,27 @@ void BltCharInvPanel()
|
||||
// print armor/weight/camo labels
|
||||
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 );
|
||||
#else
|
||||
} else {
|
||||
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 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
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"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
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 );
|
||||
#else
|
||||
} else {
|
||||
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, L"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
const auto width = UI_CHARINV.Text.PercentWidth;
|
||||
const auto height = UI_CHARINV.Text.PercentHeight;
|
||||
|
||||
@@ -6671,8 +6671,7 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld( )
|
||||
|
||||
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
|
||||
//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
|
||||
@@ -6683,7 +6682,6 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld( )
|
||||
TrashWorld( );
|
||||
guiCurrentScreen = AUTORESOLVE_SCREEN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TrashWorld( );
|
||||
@@ -7786,6 +7784,7 @@ void HandleMovingEnemiesCloseToEntranceInSecondTunnelMap( )
|
||||
|
||||
void HandlePowerGenFanSoundModification( )
|
||||
{
|
||||
extern UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO;
|
||||
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
||||
|
||||
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
||||
@@ -7794,7 +7793,7 @@ void HandlePowerGenFanSoundModification( )
|
||||
HandleAddingPowerGenFanSound( );
|
||||
|
||||
//MAKE SURE the fan does not have an exit grid
|
||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
||||
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||
break;
|
||||
|
||||
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 );
|
||||
else if (ItemIsAttachment(usItem))
|
||||
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 );
|
||||
else
|
||||
return( ARMS_DEALER_MISC );
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "ub_config.h"
|
||||
|
||||
#include "history.h"
|
||||
#include <language.hpp>
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -1344,10 +1345,10 @@ void HandleDialogue( )
|
||||
{
|
||||
HandleEveryoneDoneTheirEndGameQuotes();
|
||||
}
|
||||
else
|
||||
else if ( QItem.uiSpecialEventData & MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH )
|
||||
{
|
||||
// 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.
|
||||
if (pSoldier != nullptr)
|
||||
@@ -2408,8 +2409,8 @@ CHAR8 *GetDialogueDataFilename( UINT8 ubCharacterNum, UINT16 usQuoteNum, BOOLEAN
|
||||
{
|
||||
if ( fWavFile )
|
||||
{
|
||||
#ifdef RUSSIAN
|
||||
if ( ( gMercProfiles[ubCharacterNum].Type == PROFILETYPE_RPC ||
|
||||
if ( g_lang == i18n::Lang::ru &&
|
||||
( gMercProfiles[ubCharacterNum].Type == PROFILETYPE_RPC ||
|
||||
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_NPC ||
|
||||
gMercProfiles[ubCharacterNum].Type == PROFILETYPE_VEHICLE ) && gMercProfiles[ ubCharacterNum ].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED )
|
||||
{
|
||||
@@ -2427,7 +2428,7 @@ CHAR8 *GetDialogueDataFilename( UINT8 ubCharacterNum, UINT16 usQuoteNum, BOOLEAN
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
{
|
||||
// build name of wav file (characternum + quotenum)
|
||||
sprintf( zFileNameHelper, "SPEECH\\%03d_%03d", usVoiceSet, usQuoteNum );
|
||||
|
||||
@@ -262,6 +262,7 @@ enum DialogQuoteIDs
|
||||
#ifdef JA2UB
|
||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x20000000
|
||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x10000000
|
||||
#define MULTIPURPOSE_SPECIAL_EVENT_GETUP_AFTER_HELI_CRASH 0x08000000
|
||||
#else
|
||||
#define MULTIPURPOSE_SPECIAL_EVENT_DONE_KILLING_DEIDRANNA 0x00000001
|
||||
#define MULTIPURPOSE_SPECIAL_EVENT_TEAM_MEMBERS_DONE_TALKING 0x00000002
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "GameSettings.h"
|
||||
#include "fresh_header.h"
|
||||
#include "connect.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "Explosion Control.h"
|
||||
@@ -1490,7 +1491,7 @@ void SetDoorString( INT32 sGridNo )
|
||||
// ATE: If here, we try to say, opened or closed...
|
||||
if ( gfUIIntTileLocation2 == FALSE )
|
||||
{
|
||||
#ifdef GERMAN
|
||||
if( g_lang == i18n::Lang::de ) {
|
||||
|
||||
wcscpy( gzIntTileLocation2, TacticalStr[ DOOR_DOOR_MOUSE_DESCRIPTION ] );
|
||||
gfUIIntTileLocation2 = TRUE;
|
||||
@@ -1533,7 +1534,7 @@ void SetDoorString( INT32 sGridNo )
|
||||
gfUIIntTileLocation = TRUE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
} else {
|
||||
|
||||
// Try to get doors status here...
|
||||
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;
|
||||
case NPC_ACTION_HAVE_PACOS_FOLLOW:
|
||||
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 (NewOKDestination( pSoldier, sGridNo, TRUE, 0 ) )
|
||||
@@ -4334,7 +4335,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
||||
case NPC_ACTION_PUT_PACOS_IN_BASEMENT:
|
||||
gMercProfiles[ PACOS ].sSectorX = 10;
|
||||
gMercProfiles[ PACOS ].sSectorY = MAP_ROW_A;
|
||||
gMercProfiles[ PACOS ].bSectorZ = 0;
|
||||
gMercProfiles[ PACOS ].bSectorZ = 1; //kitty: fixed - first level underground is 1, not 0
|
||||
break;
|
||||
case NPC_ACTION_HISTORY_ASSASSIN:
|
||||
AddHistoryToPlayersLog( HISTORY_ASSASSIN, 0, GetWorldTotalMin(), gWorldSectorX, gWorldSectorY );
|
||||
|
||||
+256
-256
File diff suppressed because it is too large
Load Diff
+174
-52
@@ -57,7 +57,6 @@
|
||||
#include "game clock.h"
|
||||
#include "squads.h"
|
||||
#include "MessageBoxScreen.h"
|
||||
#include "Language Defines.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Map Screen Interface Map Inventory.h"
|
||||
#include "Quests.h"
|
||||
@@ -83,6 +82,7 @@
|
||||
#include "Sound Control.h"
|
||||
|
||||
#include "Multi Language Graphic Utils.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#ifdef JA2UB
|
||||
#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);
|
||||
}
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
wcscat( pStr, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
wcscat( pStr, L"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
@@ -11183,11 +11183,11 @@ void SetupPickupPage( INT8 bPage )
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString3, sValue );
|
||||
#else
|
||||
} else {
|
||||
swprintf( pStr, L"%d%%", sValue );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
SetRegionFastHelpText( &(gItemPickupMenu.Regions[ cnt - iStart ]), pStr );
|
||||
@@ -12285,12 +12285,28 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
|
||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString11,
|
||||
#else
|
||||
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 {
|
||||
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 ],
|
||||
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||
sValue,
|
||||
@@ -12310,15 +12326,11 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
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 ],
|
||||
AmmoCaliber[ Weapon[ usItem ].ubCalibre ],
|
||||
sValue,
|
||||
@@ -12336,6 +12348,28 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
fWeight, //Weight
|
||||
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;
|
||||
@@ -12384,12 +12418,27 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
|
||||
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",
|
||||
#else
|
||||
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 {
|
||||
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 ],
|
||||
sValue,
|
||||
sThreshold,
|
||||
@@ -12408,14 +12457,11 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
}
|
||||
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",
|
||||
#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 ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 9 ], //Accuracy String
|
||||
@@ -12432,6 +12478,25 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
fWeight, //Weight
|
||||
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;
|
||||
@@ -12442,12 +12507,21 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
{
|
||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString9,
|
||||
#else
|
||||
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 {
|
||||
swprintf( pStr, L"%s [%d%%(%d%%)]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
#endif
|
||||
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
sThreshold,
|
||||
@@ -12460,14 +12534,11 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString5,
|
||||
#else
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
#endif
|
||||
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
@@ -12478,6 +12549,19 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
fWeight, //Weight
|
||||
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;
|
||||
@@ -12517,12 +12601,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
UINT16 explDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubDamage, 0 );
|
||||
UINT16 explStunDamage = (UINT16) GetModifiedExplosiveDamage( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage, 1 );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString5,
|
||||
#else
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s",
|
||||
#endif
|
||||
|
||||
ItemNames[ usItem ],
|
||||
sValue,
|
||||
gWeaponStatsDesc[ 11 ], //Damage String
|
||||
@@ -12533,6 +12613,19 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
fWeight, //Weight
|
||||
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;
|
||||
|
||||
@@ -12562,12 +12655,23 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
|
||||
if ( gGameExternalOptions.fAdvRepairSystem && sThreshold < 100 )
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString10,
|
||||
#else
|
||||
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 {
|
||||
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
|
||||
sValue, //Item condition
|
||||
sThreshold, //repair threshold
|
||||
@@ -12582,14 +12686,25 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
GetWeightUnitString() //Weight units
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( pStr, ChineseSpecString6,
|
||||
#else
|
||||
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
|
||||
);
|
||||
} 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
|
||||
sValue, //Item condition
|
||||
pInvPanelTitleStrings[ 4 ], //Protection string
|
||||
@@ -12604,6 +12719,7 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -12614,17 +12730,23 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
|
||||
default:
|
||||
{
|
||||
// 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,
|
||||
#else
|
||||
swprintf( pStr, L"%s [%d%%]\n%s %1.1f %s",
|
||||
#endif
|
||||
ItemNames[ usItem ], //Item long name
|
||||
sValue, //Item condition
|
||||
gWeaponStatsDesc[ 12 ], //Weight String
|
||||
fWeight, //Weight
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
//legion by Jazz
|
||||
#include "Interface Utils.h"
|
||||
#include <language.hpp>
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
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 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf( SM_ARMOR_PERCENT_X, SM_ARMOR_PERCENT_Y, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
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 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf( SM_WEIGHT_PERCENT_X, SM_WEIGHT_PERCENT_Y, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
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 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf( SM_CAMMO_PERCENT_X, SM_CAMMO_PERCENT_Y, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
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
|
||||
|
||||
|
||||
@@ -459,14 +459,7 @@ BOOLEAN InitializeTacticalInterface( )
|
||||
|
||||
// failing the CHECKF after this will cause you to lose your mouse
|
||||
|
||||
if ( GETPIXELDEPTH() == 8 )
|
||||
{
|
||||
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 ) )
|
||||
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(gbPixelDepth==16)
|
||||
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++ )
|
||||
{
|
||||
if(gbPixelDepth==16)
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -812,8 +812,8 @@ extern OBJECTTYPE gTempObject;
|
||||
#define ITEM_mortar 0x0400000000000000
|
||||
#define ITEM_duckbill 0x0800000000000000
|
||||
|
||||
#define ITEM_detonator 0x1000000000000000
|
||||
#define ITEM_remotedetonator 0x2000000000000000
|
||||
//UNUSED #define ITEM_detonator 0x1000000000000000
|
||||
//UNUSED #define ITEM_remotedetonator 0x2000000000000000
|
||||
#define ITEM_hidemuzzleflash 0x4000000000000000
|
||||
#define ITEM_rocketlauncher 0x8000000000000000
|
||||
|
||||
|
||||
+14
-8
@@ -1271,13 +1271,21 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
|
||||
if ( Item[usItemIndex].ubCoolness == 0 && !fIgnoreCoolness )
|
||||
return FALSE;
|
||||
|
||||
// silversurfer: no food items if the food system is off
|
||||
if ( !UsingFoodSystem() && Item[ usItemIndex ].foodtype > 0 )
|
||||
// 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
|
||||
// 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.
|
||||
if ( Food[Item[usItemIndex].foodtype].bFoodPoints > 0 )
|
||||
// silversurfer: no food items if the food system is off
|
||||
if (!UsingFoodSystem() && Item[usItemIndex].foodtype > 0 )
|
||||
{
|
||||
// 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
|
||||
// whether the item is exclusive is defined by tag
|
||||
@@ -12075,7 +12083,7 @@ BOOLEAN IsDetonatorAttached( OBJECTTYPE * pObj )
|
||||
// return TRUE;
|
||||
|
||||
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 );
|
||||
}
|
||||
@@ -12091,7 +12099,7 @@ BOOLEAN IsRemoteDetonatorAttached( OBJECTTYPE * pObj )
|
||||
// return TRUE;
|
||||
|
||||
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 );
|
||||
}
|
||||
@@ -16081,8 +16089,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem) { return HasItemFlag(usItem, ITEM_flare); }
|
||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_grenadelauncher); }
|
||||
BOOLEAN ItemIsMortar(UINT16 usItem) { return HasItemFlag(usItem, ITEM_mortar); }
|
||||
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 ItemIsRocketLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_rocketlauncher); }
|
||||
// usItemFlag2
|
||||
|
||||
@@ -204,8 +204,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem);
|
||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem);
|
||||
BOOLEAN ItemIsMortar(UINT16 usItem);
|
||||
BOOLEAN ItemIsDuckbill(UINT16 usItem);
|
||||
BOOLEAN ItemIsDetonator(UINT16 usItem);
|
||||
BOOLEAN ItemIsRemoteDetonator(UINT16 usItem);
|
||||
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem);
|
||||
BOOLEAN ItemIsRocketLauncher(UINT16 usItem);
|
||||
BOOLEAN ItemIsSingleShotRocketLauncher(UINT16 usItem);
|
||||
|
||||
+29
-17
@@ -293,7 +293,8 @@ UINT32 POWERGENSECTOR_GRIDNO1 = 15100;
|
||||
UINT32 POWERGENSECTOR_GRIDNO2 = 12220;
|
||||
UINT32 POWERGENSECTOR_GRIDNO3 = 14155;
|
||||
UINT32 POWERGENSECTOR_GRIDNO4 = 13980;
|
||||
UINT32 POWERGENSECTOREXITGRID_GRIDNO1 = 19749;
|
||||
UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO = 10979;
|
||||
UINT32 POWERGENSECTOREXITGRID_DST_GRIDNO = 19749;
|
||||
UINT32 POWERGENFANSOUND_GRIDNO1 = 10979;
|
||||
UINT32 POWERGENFANSOUND_GRIDNO2 = 19749;
|
||||
UINT32 STARTFANBACKUPAGAIN_GRIDNO = 10980;
|
||||
@@ -304,17 +305,22 @@ UINT32 SECTOR_LAUNCH_MISSLES_Y = 12;
|
||||
UINT32 SECTOR_LAUNCH_MISSLES_Z = 3;
|
||||
//J13-0
|
||||
UINT32 SECTOR_FAN_X = 13;
|
||||
UINT32 SECTOR_FAN_Z = 10;
|
||||
UINT32 SECTOR_FAN_Y = 0;
|
||||
UINT32 SECTOR_FAN_Y = 10;
|
||||
UINT32 SECTOR_FAN_Z = 0;
|
||||
//K14-1
|
||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
|
||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
|
||||
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
|
||||
// Destination sector for fan exitgrid
|
||||
//J14-1
|
||||
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_Z = 1;
|
||||
|
||||
INT16 BETTY_BLOODCAT_SECTOR_X = 10;
|
||||
INT16 BETTY_BLOODCAT_SECTOR_Y = 9;
|
||||
INT8 BETTY_BLOODCAT_SECTOR_Z = 0;
|
||||
|
||||
void InitGridNoUB()
|
||||
{
|
||||
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
|
||||
@@ -326,7 +332,8 @@ void InitGridNoUB()
|
||||
POWERGENSECTOR_GRIDNO2 = gGameUBOptions.PowergenSectorGridNo2; //= 12220;
|
||||
POWERGENSECTOR_GRIDNO3 = gGameUBOptions.PowergenSectorGridNo3; //= 14155;
|
||||
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_GRIDNO2 = gGameUBOptions.PowergenFanSoundGridNo2; //= 19749;
|
||||
STARTFANBACKUPAGAIN_GRIDNO = gGameUBOptions.StartFanbackupAgainGridNo; //= 10980;
|
||||
@@ -338,8 +345,8 @@ void InitGridNoUB()
|
||||
SECTOR_LAUNCH_MISSLES_Z = gGameUBOptions.SectorLaunchMisslesZ; //3;
|
||||
//J13-0
|
||||
SECTOR_FAN_X = gGameUBOptions.SectorFanX; //13;
|
||||
SECTOR_FAN_Z = gGameUBOptions.SectorFanY; //10;
|
||||
SECTOR_FAN_Y = gGameUBOptions.SectorFanZ; //0;
|
||||
SECTOR_FAN_Y = gGameUBOptions.SectorFanY; //10;
|
||||
SECTOR_FAN_Z = gGameUBOptions.SectorFanZ; //0;
|
||||
//K14-1
|
||||
SECTOR_OPEN_GATE_IN_TUNNEL_X = gGameUBOptions.SectorOpenGateInTunnelX; //14;
|
||||
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_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;
|
||||
BIGGENS_UB = gGameUBOptions.ubBIGGENS_UB;
|
||||
JOHN_K_UB = gGameUBOptions.ubJOHN_K_UB;
|
||||
@@ -646,7 +658,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
||||
UINT32 uiPercentEnemiesKilled;
|
||||
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 )
|
||||
{
|
||||
//get out
|
||||
@@ -663,7 +675,7 @@ void HandleWhenCertainPercentageOfEnemiesDie()
|
||||
switch( ubSectorID )
|
||||
{
|
||||
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 ) )
|
||||
{
|
||||
INT16 bProfile = RandomProfileIdFromNewMercsOnPlayerTeam();
|
||||
@@ -703,7 +715,7 @@ void StopPowerGenFan()
|
||||
return;
|
||||
}
|
||||
|
||||
//Remeber how the player got through
|
||||
//Remember how the player got through
|
||||
SetJa25GeneralFlag( JA_GF__POWER_GEN_FAN_HAS_BEEN_STOPPED );
|
||||
|
||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__STOPPED;
|
||||
@@ -721,7 +733,7 @@ void StopPowerGenFan()
|
||||
//Turn off the power gen fan sound
|
||||
HandleRemovingPowerGenFanSound();
|
||||
|
||||
//remeber which turn the fan stopped on
|
||||
//remember which turn the fan stopped on
|
||||
gJa25SaveStruct.uiTurnPowerGenFanWentDown = gJa25SaveStruct.uiTacticalTurnCounter;
|
||||
|
||||
|
||||
@@ -729,7 +741,7 @@ void StopPowerGenFan()
|
||||
// Replace the Fan graphic
|
||||
//
|
||||
|
||||
// Turn on permenant changes....
|
||||
// Turn on permanent changes....
|
||||
ApplyMapChangesToMapTempFile( TRUE );
|
||||
|
||||
//Add the exit grid to the power gen fan
|
||||
@@ -784,7 +796,7 @@ void StartFanBackUpAgain()
|
||||
return;
|
||||
}
|
||||
|
||||
//Remeber how the player got through
|
||||
//Remember how the player got through
|
||||
gJa25SaveStruct.ubStateOfFanInPowerGenSector = PGF__RUNNING_NORMALLY;
|
||||
|
||||
|
||||
@@ -796,7 +808,7 @@ void StartFanBackUpAgain()
|
||||
// Replace the Fan graphic
|
||||
//
|
||||
|
||||
// Turn on permenant changes....
|
||||
// Turn on permanent changes....
|
||||
ApplyMapChangesToMapTempFile( TRUE );
|
||||
|
||||
// Remove it!
|
||||
@@ -821,7 +833,7 @@ void StartFanBackUpAgain()
|
||||
gTacticalStatus.uiFlags |= NOHIDE_REDUNDENCY;
|
||||
|
||||
//Remove the exit grid
|
||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
||||
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||
|
||||
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
||||
SetRenderFlags(RENDER_FLAG_FULL);
|
||||
@@ -914,7 +926,7 @@ void HandleAddingPowerGenFanSound()
|
||||
sGridNo = POWERGENFANSOUND_GRIDNO2;
|
||||
|
||||
//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( );
|
||||
SetPositionSndsActive( );
|
||||
@@ -942,10 +954,10 @@ void AddExitGridForFanToPowerGenSector()
|
||||
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.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
|
||||
AddExitGridToWorld( PGF__FAN_EXIT_GRID_GRIDNO, &ExitGrid );
|
||||
AddExitGridToWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO, &ExitGrid );
|
||||
}
|
||||
|
||||
BOOLEAN HandlePlayerSayingQuoteWhenFailingToOpenGateInTunnel( SOLDIERTYPE *pSoldierAtDoor, BOOLEAN fSayQuoteOnlyOnce )
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "MapScreen Quotes.h"
|
||||
|
||||
#define PGF__FAN_EXIT_GRID_GRIDNO 10979
|
||||
|
||||
#define NUM_MERCS_WITH_NEW_QUOTES 20//7
|
||||
|
||||
@@ -144,6 +143,10 @@ extern UINT8 RAUL_UB;
|
||||
extern UINT8 MORRIS_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 New_UB_Inventory ();
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ AbstractXMLLoader::ParseData* AbstractXMLLoader::MakeParseData(XML_Parser* parse
|
||||
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;
|
||||
UINT32 uiBytesRead;
|
||||
UINT32 uiFSize;
|
||||
CHAR8* lpcBuffer;
|
||||
char fileNameFull[MAX_PATH + 1];
|
||||
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;
|
||||
}
|
||||
SetDirectoryName(directoryName);
|
||||
@@ -46,12 +47,14 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, msg.c_str());
|
||||
hFile = FileOpen(fileNameFull, FILE_ACCESS_READ, FALSE);
|
||||
if (!hFile) {
|
||||
sprintf(errorBuf, "Can't open %s", fileNameFull);
|
||||
delete data;
|
||||
return false;
|
||||
}
|
||||
uiFSize = FileGetSize(hFile);
|
||||
lpcBuffer = (CHAR8*)MemAlloc(uiFSize + 1);
|
||||
if (!FileRead(hFile, lpcBuffer, uiFSize, &uiBytesRead)) {
|
||||
sprintf(errorBuf, "Error reading %s to buffer", fileNameFull);
|
||||
MemFree(lpcBuffer);
|
||||
delete data;
|
||||
return false;
|
||||
@@ -72,7 +75,6 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
||||
|
||||
try {
|
||||
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)));
|
||||
LiveMessage(errorBuf);
|
||||
MemFree(lpcBuffer);
|
||||
@@ -80,7 +82,6 @@ bool AbstractXMLLoader::LoadFromFile(const char* directoryName, const char* file
|
||||
return false;
|
||||
}
|
||||
} catch (XMLParseException e) {
|
||||
CHAR8 errorBuf[512];
|
||||
sprintf(errorBuf, "XML Parser Exception in %s[%d]: %s", fileNameFull, e._LINE, e.what());
|
||||
LiveMessage(errorBuf);
|
||||
MemFree(lpcBuffer);
|
||||
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
public:
|
||||
AbstractXMLLoader(XML_StartElementHandler startHandler, XML_EndElementHandler endHandler, XML_CharacterDataHandler charHandler, ParseDataFactoryFunc parseDataFactF = MakeParseData);
|
||||
~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* GetDirectoryName();
|
||||
void SetFileName(const char* fileName);
|
||||
|
||||
@@ -258,6 +258,18 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) {
|
||||
case REQ_LEGPOSATTACHMENT3:
|
||||
cmp_val = CompareAttachment(pSoldier, LEGPOS, 3);
|
||||
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:
|
||||
if (q < NUM_REQTYPESINV) {
|
||||
cmp_val = pSoldier->inv[q].usItem;
|
||||
|
||||
@@ -75,6 +75,10 @@ public:
|
||||
REQ_LEGPOSATTACHMENT1,
|
||||
REQ_LEGPOSATTACHMENT2,
|
||||
REQ_LEGPOSATTACHMENT3,
|
||||
REQ_VESTPOSATTACHMENT0,
|
||||
REQ_VESTPOSATTACHMENT1,
|
||||
REQ_VESTPOSATTACHMENT2,
|
||||
REQ_VESTPOSATTACHMENT3,
|
||||
NUM_REQTYPES,
|
||||
// 3rd byte is for operator flags
|
||||
_REQ_BTWN = 0x20000,
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace LogicalBodyTypes {
|
||||
/*****************************************
|
||||
Filter enum criterion types
|
||||
******************************************/
|
||||
LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 43,
|
||||
LOGBT_ENUMDB_ADD("IntegerFilterCriterionTypes", 47,
|
||||
Filter::REQ_HELMETPOS,
|
||||
Filter::REQ_VESTPOS,
|
||||
Filter::REQ_LEGPOS,
|
||||
@@ -313,7 +313,11 @@ namespace LogicalBodyTypes {
|
||||
Filter::REQ_LEGPOSATTACHMENT0,
|
||||
Filter::REQ_LEGPOSATTACHMENT1,
|
||||
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 );
|
||||
|
||||
// Start music
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
|
||||
+15
-15
@@ -1038,27 +1038,27 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
void UpdateJerryMiloInInitialSector()
|
||||
{
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
SOLDIERTYPE *pJerrySoldier=NULL;
|
||||
SOLDIERTYPE *pJerrySoldier = NULL;
|
||||
|
||||
|
||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||
SectorInfo[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].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;
|
||||
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||
|
||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||
if ( gGameUBOptions.InGameHeli == TRUE )
|
||||
return; //AA
|
||||
|
||||
if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
{
|
||||
//if it is the first sector we are loading up, place Jerry in the map
|
||||
if( !gfFirstTimeInGameHeliCrash )
|
||||
if ( !gfFirstTimeInGameHeliCrash )
|
||||
return;
|
||||
|
||||
if ( gGameUBOptions.InJerry == TRUE )
|
||||
{
|
||||
pSoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE ); //JERRY
|
||||
if( pSoldier == NULL )
|
||||
if ( pSoldier == NULL )
|
||||
{
|
||||
Assert( 0 );
|
||||
}
|
||||
@@ -1071,8 +1071,8 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
|
||||
//Record the initial sector as ours
|
||||
//SectorInfo[ SEC_H7 ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||
SectorInfo[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fSurfaceWasEverPlayerControlled = TRUE;
|
||||
StrategicMap[ (UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY ) ].fEnemyControlled = FALSE;
|
||||
SectorInfo[(UINT8)SECTOR( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fSurfaceWasEverPlayerControlled = TRUE;
|
||||
StrategicMap[CALCULATE_STRATEGIC_INDEX( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY )].fEnemyControlled = FALSE;
|
||||
|
||||
if ( gGameUBOptions.InJerry == TRUE )
|
||||
{
|
||||
@@ -1083,25 +1083,25 @@ if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO; //to by³o wy³¹czone
|
||||
//pSoldier->usStrategicInsertionData = GetInitialHeliGridNo( ); //to by³o wy³¹czone
|
||||
|
||||
RESETTIMECOUNTER( pSoldier->GetupFromJA25StartCounter, gsInitialHeliRandomTimes[ 6 ] + 800 + Random( 400 ) );
|
||||
RESETTIMECOUNTER( pSoldier->GetupFromJA25StartCounter, gsInitialHeliRandomTimes[6] + 800 + Random( 400 ) );
|
||||
|
||||
//should we be on our back or tummy
|
||||
if( Random( 100 ) < 50 )
|
||||
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
|
||||
//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 )
|
||||
pJerrySoldier = FindSoldierByProfileID( JERRY_MILO_UB, FALSE );//JERRY
|
||||
if ( pJerrySoldier != NULL )
|
||||
{
|
||||
//Make sure we can see the pilot
|
||||
gbPublicOpplist[OUR_TEAM][ pJerrySoldier->ubID ] = SEEN_CURRENTLY;
|
||||
gbPublicOpplist[OUR_TEAM][pJerrySoldier->ubID] = SEEN_CURRENTLY;
|
||||
pJerrySoldier->bVisible = TRUE;
|
||||
}
|
||||
|
||||
|
||||
+14
-15
@@ -1074,7 +1074,7 @@ BOOLEAN ExecuteOverhead( )
|
||||
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
|
||||
@@ -6646,7 +6646,7 @@ void ExitCombatMode( )
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
@@ -6688,17 +6688,17 @@ void ExitCombatMode( )
|
||||
}
|
||||
|
||||
|
||||
void SetEnemyPresence( )
|
||||
void SetEnemyPresence()
|
||||
{
|
||||
// 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 )
|
||||
if ( !gTacticalStatus.fEnemyInSector && gTacticalStatus.fVirginSector )
|
||||
{
|
||||
// If we have a guy selected, say quote!
|
||||
// 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..
|
||||
|
||||
@@ -6708,22 +6708,21 @@ void SetEnemyPresence( )
|
||||
//Ja25: no meanwhiles
|
||||
if ( !DidGameJustStart() )
|
||||
#else
|
||||
if ( !DidGameJustStart() && !AreInMeanwhile( ) )
|
||||
|
||||
if ( !DidGameJustStart() && !AreInMeanwhile() )
|
||||
#endif
|
||||
{
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
GlobalSoundID = MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ];
|
||||
if ( MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ] != -1 )
|
||||
SetMusicModeID( MUSIC_TACTICAL_ENEMYPRESENT, MusicSoundValues[SECTOR( gWorldSectorX, gWorldSectorY )].SoundTacticalTensor[gbWorldSectorZ] );
|
||||
else
|
||||
#endif
|
||||
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;
|
||||
biggunwarning = FALSE;
|
||||
gogglewarning = FALSE;
|
||||
@@ -6732,7 +6731,7 @@ void SetEnemyPresence( )
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = true"));
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "SetEnemyPresence: warnings = true" ) );
|
||||
sniperwarning = TRUE;
|
||||
biggunwarning = TRUE;
|
||||
//gogglewarning = TRUE;
|
||||
@@ -7057,7 +7056,7 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
// Begin tense music....
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
@@ -7889,7 +7888,7 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
if ( CheckFact( FACT_FIRST_BATTLE_BEING_FOUGHT, 0 ) )
|
||||
{
|
||||
// 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!
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
FLOAT GetCorpseRotFactor( ROTTING_CORPSE* pCorpse );
|
||||
|
||||
void CheckForZombieMusic();
|
||||
|
||||
#endif
|
||||
@@ -909,7 +909,9 @@ DragSelection::Setup( UINT32 aVal )
|
||||
|
||||
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
|
||||
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
||||
|
||||
@@ -1199,8 +1199,15 @@ BOOLEAN InternalAddSoldierToSector(SoldierID ubID, BOOLEAN fCalculateDirection,
|
||||
if( fCalculateDirection )
|
||||
ubDirection = ubCalculatedDirection;
|
||||
else
|
||||
{
|
||||
// Override calculated direction if we were told to....
|
||||
if ( pSoldier->ubInsertionDirection >= 100 )
|
||||
{
|
||||
pSoldier->ubInsertionDirection -= 100;
|
||||
}
|
||||
ubDirection = pSoldier->ubInsertionDirection;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(TileIsOutOfBounds(pSoldier->sInsertionGridNo))
|
||||
|
||||
@@ -2461,7 +2461,7 @@ BOOLEAN SOLDIERTYPE::CreateSoldierCommon( UINT8 ubBodyType, SoldierID usSoldierI
|
||||
|
||||
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.
|
||||
void SOLDIERCREATE_STRUCT::initialize() {
|
||||
memset( this, 0, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||
this->bAIMorale = MORALE_NORMAL;
|
||||
Inv.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -9964,10 +9964,6 @@ BOOLEAN IsGunBurstCapable(OBJECTTYPE* pObject, BOOLEAN fNotify, SOLDIERTYPE* pSo
|
||||
fCapable = TRUE;
|
||||
}
|
||||
}
|
||||
else if (Weapon[pObject->usItem].fBurstOnlyByFanTheHammer)
|
||||
{
|
||||
fCapable = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,14 +58,6 @@ typedef PARSE_STAGE;
|
||||
#define TABLEDATA_DIRECTORY "TableData\\"
|
||||
#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 ATTACHMENTINFOFILENAME "Items\\AttachmentInfo.xml"
|
||||
#define ITEMSFILENAME "Items\\Items.xml"
|
||||
|
||||
@@ -934,7 +934,7 @@ public:
|
||||
UINT8 ubLastDateSpokenTo;
|
||||
UINT8 bLastQuoteSaidWasSpecial;
|
||||
INT8 bSectorZ;
|
||||
UINT16 usStrategicInsertionData;
|
||||
UINT32 usStrategicInsertionData;
|
||||
INT8 bFriendlyOrDirectDefaultResponseUsedRecently;
|
||||
INT8 bRecruitDefaultResponseUsedRecently;
|
||||
INT8 bThreatenDefaultResponseUsedRecently;
|
||||
|
||||
@@ -2784,7 +2784,7 @@ INT16 RoamingRange(SOLDIERTYPE *pSoldier, INT32 * pusFromGridNo)
|
||||
BOOL OppPosKnown = FALSE;
|
||||
if (CREATURE_OR_BLOODCAT(pSoldier))
|
||||
{
|
||||
if (pSoldier->aiData.bAlertStatus == STATUS_BLACK)
|
||||
if (pSoldier->aiData.bAlertStatus > STATUS_YELLOW)
|
||||
{
|
||||
*pusFromGridNo = pSoldier->sGridNo; // from current position!
|
||||
return(MAX_ROAMING_RANGE);
|
||||
|
||||
@@ -2548,6 +2548,8 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
|
||||
// if we're an alerted enemy, and there are panic bombs or a trigger around
|
||||
if ( !ENEMYROBOT(pSoldier) )
|
||||
{
|
||||
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 ) ) ) )
|
||||
{
|
||||
@@ -2578,6 +2580,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// determine if we happen to be in water (in which case we're in BIG trouble!)
|
||||
@@ -5160,6 +5163,8 @@ INT16 ubMinAPCost;
|
||||
|
||||
// offer surrender?
|
||||
#ifndef JA2UB
|
||||
if ( !is_networked ) // No surrender in multiplayer
|
||||
{
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
||||
{
|
||||
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 && gTacticalStatus.Team[ CREATURE_TEAM ].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector >= NumPCsInSector() * 3 )
|
||||
@@ -5170,6 +5175,7 @@ INT16 ubMinAPCost;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -9576,16 +9582,19 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier )
|
||||
|
||||
// offer surrender?
|
||||
#ifndef JA2UB
|
||||
if ( !is_networked ) // No surrender in multiplayer
|
||||
{
|
||||
if ( pSoldier->bTeam == ENEMY_TEAM && pSoldier->bVisible == TRUE && !(gTacticalStatus.fEnemyFlags & ENEMY_OFFERED_SURRENDER) && pSoldier->stats.bLife >= pSoldier->stats.bLifeMax / 2 && !ARMED_VEHICLE( pSoldier ) && !ENEMYROBOT( pSoldier ) )
|
||||
{
|
||||
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector( ) < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector( ) * 3 )
|
||||
if ( gTacticalStatus.Team[MILITIA_TEAM].bMenInSector == 0 && gTacticalStatus.Team[CREATURE_TEAM].bMenInSector == 0 && NumPCsInSector() < 4 && gTacticalStatus.Team[ENEMY_TEAM].bMenInSector >= NumPCsInSector() * 3 )
|
||||
{
|
||||
if (gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED)
|
||||
if ( gubQuest[QUEST_HELD_IN_ALMA] == QUESTNOTSTARTED || gubQuest[QUEST_HELD_IN_TIXA] == QUESTNOTSTARTED || gubQuest[QUEST_INTERROGATION] == QUESTNOTSTARTED )
|
||||
{
|
||||
return(AI_ACTION_OFFER_SURRENDER);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+12
-7
@@ -516,13 +516,18 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
|
||||
#ifdef DEBUGDECISIONS
|
||||
AIPopMessage("destination Grid # itself not valid, looking around it");
|
||||
#endif
|
||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||
{
|
||||
// we tried to get close, failed; abort!
|
||||
pSoldier->pathing.usPathIndex = pSoldier->pathing.usPathDataSize = 0;
|
||||
return( NOWHERE );
|
||||
}
|
||||
else
|
||||
// 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
|
||||
// This then results them freezing and staying in place even if they can see our mercs
|
||||
// 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,
|
||||
// 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 ) )
|
||||
//{
|
||||
// // 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
|
||||
|
||||
|
||||
@@ -492,8 +492,6 @@ void RenderRadarScreen( )
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, gsRadarX, gsRadarY, ( gsRadarX + RADAR_WINDOW_WIDTH - 1 ), ( gsRadarY + RADAR_WINDOW_HEIGHT - 1 ) );
|
||||
|
||||
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)
|
||||
@@ -511,13 +509,6 @@ void RenderRadarScreen( )
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
RectangleDraw( TRUE, sRadarTLX, sRadarTLY, sRadarBRX, sRadarBRY - 1, usLineColor, pDestBuf );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
// DB Need to change this to a color from the 8-but standard palette
|
||||
usLineColor = COLOR_GREEN;
|
||||
RectangleDraw8( TRUE, sRadarTLX + 1, sRadarTLY + 1, sRadarBRX + 1, sRadarBRY + 1, usLineColor, pDestBuf );
|
||||
}
|
||||
}
|
||||
|
||||
// Cycle fFlash variable
|
||||
if ( COUNTERDONE( RADAR_MAP_BLINK ) )
|
||||
@@ -556,9 +547,6 @@ void RenderRadarScreen( )
|
||||
sXSoldRadar += RADAR_WINDOW_TM_X;
|
||||
sYSoldRadar += gsRadarY;
|
||||
|
||||
// if we are in 16 bit mode....kind of redundant
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
if( ( fFlashHighLightInventoryItemOnradarMap ) )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
@@ -576,7 +564,6 @@ void RenderRadarScreen( )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
|
||||
{
|
||||
@@ -632,9 +619,6 @@ void RenderRadarScreen( )
|
||||
sXSoldRadar += gsRadarX;
|
||||
sYSoldRadar += gsRadarY;
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
|
||||
// Are we a selected guy?
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
@@ -697,13 +681,6 @@ void RenderRadarScreen( )
|
||||
|
||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
// DB Need to change this to a color from the 8-but standard palette
|
||||
usLineColor = COLOR_BLUE;
|
||||
RectangleDraw8( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -604,20 +604,9 @@ BOOLEAN UpdateSaveBuffer(void)
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// BLIT HERE
|
||||
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(guiSAVEBUFFER);
|
||||
@@ -643,22 +632,11 @@ BOOLEAN RestoreExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT1
|
||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -695,22 +673,11 @@ BOOLEAN RestoreExternBackgroundRectGivenID( INT32 iBack )
|
||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -730,22 +697,11 @@ BOOLEAN CopyExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 s
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
|
||||
@@ -1342,18 +1298,11 @@ BOOLEAN RestoreShiftedVideoOverlays( INT16 sShiftX, INT16 sShiftY )
|
||||
usHeight = sBottom - sTop;
|
||||
usWidth = sRight - sLeft;
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
|
||||
Blt16BPPTo16BPP((UINT16 *)(UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)gVideoOverlays[uiCount].pSaveArea, gBackSaves[ iBackIndex ].sWidth*2,
|
||||
sLeft, sTop,
|
||||
uiLeftSkip, uiTopSkip,
|
||||
usWidth, usHeight );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
}
|
||||
|
||||
// Once done, check for pending deletion
|
||||
if ( gVideoOverlays[uiCount].fDeletionPending )
|
||||
|
||||
+19
-19
@@ -460,36 +460,36 @@ UINT16 usNumNodes;
|
||||
***************************************************************************************/
|
||||
BOOLEAN LightTileBlocked(INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
||||
{
|
||||
UINT16 usTileNo, usSrcTileNo;
|
||||
UINT32 uiTileNo, uiSrcTileNo;
|
||||
|
||||
Assert(gpWorldLevelData!=NULL);
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
|
||||
if (TileIsOutOfBounds(usTileNo))
|
||||
if (TileIsOutOfBounds(uiTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if (TileIsOutOfBounds(usSrcTileNo))
|
||||
if (TileIsOutOfBounds(uiSrcTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if(gpWorldLevelData[ usTileNo ].sHeight > gpWorldLevelData[ usSrcTileNo ].sHeight)
|
||||
if(gpWorldLevelData[ uiTileNo ].sHeight > gpWorldLevelData[ uiSrcTileNo ].sHeight)
|
||||
return(TRUE);
|
||||
{
|
||||
UINT16 usTileNo;
|
||||
UINT32 uiTileNo;
|
||||
LEVELNODE *pStruct;
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
|
||||
pStruct = gpWorldLevelData[ usTileNo ].pStructHead;
|
||||
pStruct = gpWorldLevelData[ uiTileNo ].pStructHead;
|
||||
if ( pStruct != NULL )
|
||||
{
|
||||
// IF WE ARE A WINDOW, DO NOT BLOCK!
|
||||
if ( FindStructure( usTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||
if ( FindStructure( uiTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -509,8 +509,8 @@ BOOLEAN LightTileHasWall( INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
||||
{
|
||||
//LEVELNODE *pStruct;
|
||||
//UINT32 uiType;
|
||||
UINT16 usTileNo;
|
||||
UINT16 usSrcTileNo;
|
||||
UINT32 uiTileNo;
|
||||
UINT32 uiSrcTileNo;
|
||||
INT8 bDirection;
|
||||
UINT8 ubTravelCost;
|
||||
//INT8 bWallCount = 0;
|
||||
@@ -518,20 +518,20 @@ UINT8 ubTravelCost;
|
||||
|
||||
Assert(gpWorldLevelData!=NULL);
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
|
||||
if ( usTileNo == usSrcTileNo )
|
||||
if ( uiTileNo == uiSrcTileNo )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if ( TileIsOutOfBounds(usTileNo))
|
||||
if ( TileIsOutOfBounds(uiTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if ( TileIsOutOfBounds(usSrcTileNo))
|
||||
if ( TileIsOutOfBounds(uiSrcTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -541,7 +541,7 @@ UINT8 ubTravelCost;
|
||||
bDirection = atan8( iSrcX, iSrcY, iX, iY );
|
||||
|
||||
|
||||
ubTravelCost = gubWorldMovementCosts[ usTileNo ][ bDirection ][ 0 ];
|
||||
ubTravelCost = gubWorldMovementCosts[ uiTileNo ][ bDirection ][ 0 ];
|
||||
|
||||
if ( ubTravelCost == TRAVELCOST_WALL )
|
||||
{
|
||||
@@ -550,7 +550,7 @@ UINT8 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 )
|
||||
{
|
||||
|
||||
@@ -1367,7 +1367,6 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
||||
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
if(gbPixelDepth == 16)// BLIT HERE
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, usWidth, usHeight);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -2397,8 +2397,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gbPixelDepth == 16)
|
||||
{
|
||||
/*if(fConvertTo16)
|
||||
{
|
||||
@@ -2924,93 +2922,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sXPos, sYPos, usImageIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // 8bpp section
|
||||
{
|
||||
if (fPixelate)
|
||||
{
|
||||
if (fZWrite)
|
||||
Blt8BPPDataTo8BPPBufferTransZClipPixelate((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferTransZNBClipPixelate((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
}
|
||||
else if (BltIsClipped(hVObject, sXPos, sYPos, usImageIndex, &gClippingRect))
|
||||
{
|
||||
if (fMerc)
|
||||
{
|
||||
Blt8BPPDataTo8BPPBufferTransShadowZNBClip((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel,
|
||||
hVObject,
|
||||
sXPos, sYPos,
|
||||
usImageIndex,
|
||||
&gClippingRect,
|
||||
pShadeTable);
|
||||
}
|
||||
else if (fShadowBlitter)
|
||||
if (fZWrite)
|
||||
Blt8BPPDataTo8BPPBufferShadowZClip((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferShadowZClip((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
|
||||
else if (fZBlitter)
|
||||
{
|
||||
if (fZWrite)
|
||||
Blt8BPPDataTo8BPPBufferTransZClip((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferTransZNBClip((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
}
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sXPos, sYPos, usImageIndex, &gClippingRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fMerc)
|
||||
{
|
||||
|
||||
// why to 16BPP here??
|
||||
if (hVObjectAlpha != NULL)
|
||||
{
|
||||
Blt8BPPDataTo16BPPBufferTransShadowZNBObscuredAlpha((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel,
|
||||
hVObject,
|
||||
hVObjectAlpha,
|
||||
sXPos, sYPos,
|
||||
usImageIndex,
|
||||
pShadeTable,
|
||||
fIgnoreShadows);
|
||||
}
|
||||
else
|
||||
{
|
||||
Blt8BPPDataTo16BPPBufferTransShadowZNBObscured((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel,
|
||||
hVObject,
|
||||
sXPos, sYPos,
|
||||
usImageIndex,
|
||||
pShadeTable,
|
||||
fIgnoreShadows);
|
||||
}
|
||||
|
||||
// Blt8BPPDataTo8BPPBufferTransShadowZNB( (UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel,
|
||||
// hVObject,
|
||||
// sXPos, sYPos,
|
||||
// usImageIndex,
|
||||
// pShadeTable);
|
||||
}
|
||||
else if (fShadowBlitter)
|
||||
{
|
||||
if (fZWrite)
|
||||
Blt8BPPDataTo8BPPBufferShadowZ((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex);
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferShadowZNB((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex);
|
||||
}
|
||||
else if (fZBlitter)
|
||||
{
|
||||
if (fZWrite)
|
||||
Blt8BPPDataTo8BPPBufferTransZ((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex);
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferTransZNB((UINT16*)pDestBuf, uiDestPitchBYTES, gpZBuffer, sZLevel, hVObject, sXPos, sYPos, usImageIndex);
|
||||
}
|
||||
else
|
||||
Blt8BPPDataTo8BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sXPos, sYPos, usImageIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: additional decals
|
||||
if ( fWallTile )
|
||||
|
||||
@@ -2929,7 +2929,7 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
|
||||
SetWorldSize(iRowSize, iColSize);
|
||||
|
||||
// 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"
|
||||
gfVanillaMode = TRUE;//dnl ch74 191013
|
||||
|
||||
@@ -7,7 +7,6 @@ set(UtilsSrc
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Event Pump.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ExportStrings.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Font Control.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ImportStrings.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/INIReader.cpp"
|
||||
@@ -16,7 +15,6 @@ set(UtilsSrc
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/MapUtility.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/MercTextBox.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/message.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Multi Language Graphic Utils.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Multilingual Text Code Generator.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Music Control.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/PopUpBox.cpp"
|
||||
@@ -37,20 +35,4 @@ set(UtilsSrc
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Items.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Language.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/XML_SenderNameList.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_ChineseText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_DutchText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_EnglishText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_FrenchText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_GermanText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_ItalianText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ChineseText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25DutchText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25EnglishText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25FrenchText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25GermanText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ItalianText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25PolishText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25RussianText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_PolishText.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/_RussianText.cpp"
|
||||
PARENT_SCOPE)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "FileMan.h"
|
||||
#include "Debug.h"
|
||||
|
||||
#include "Language Defines.h"
|
||||
// anv: for selecting random line
|
||||
#include "Random.h"
|
||||
|
||||
|
||||
+10
-5
@@ -5,6 +5,7 @@
|
||||
#include "vsurface.h"
|
||||
#include "wcheck.h"
|
||||
#include "Font Control.h"
|
||||
#include <language.hpp>
|
||||
|
||||
INT32 giCurWinFont = 0;
|
||||
//BOOLEAN gfUseWinFonts = FALSE;
|
||||
@@ -77,7 +78,7 @@ HVOBJECT gvoBlockFontNarrow;
|
||||
INT32 gp14PointHumanist;
|
||||
HVOBJECT gvo14PointHumanist;
|
||||
|
||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
||||
#if defined( JA2EDITOR )
|
||||
INT32 gpHugeFont;
|
||||
HVOBJECT gvoHugeFont;
|
||||
#endif
|
||||
@@ -94,8 +95,8 @@ UINT16 CreateFontPaletteTables(HVOBJECT pObj );
|
||||
extern UINT16 gzFontName[32];
|
||||
|
||||
auto GetHugeFont() -> INT32 {
|
||||
#if defined(JA2EDITOR) && defined(ENGLISH)
|
||||
return gpHugeFont;
|
||||
#if defined(JA2EDITOR)
|
||||
return g_lang == i18n::Lang::en ? gpHugeFont : gp16PointArial;
|
||||
#else
|
||||
return gp16PointArial;
|
||||
#endif
|
||||
@@ -216,10 +217,12 @@ BOOLEAN InitializeFonts( )
|
||||
gvo14PointHumanist = GetFontObject( gp14PointHumanist );
|
||||
CHECKF( CreateFontPaletteTables( gvo14PointHumanist ) );
|
||||
|
||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
||||
#if defined( JA2EDITOR )
|
||||
if(g_lang == i18n::Lang::en) {
|
||||
gpHugeFont = LoadFontFile( "FONTS\\HUGEFONT.sti" );
|
||||
gvoHugeFont = GetFontObject( gpHugeFont );
|
||||
CHECKF( CreateFontPaletteTables( gvoHugeFont ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set default for font system
|
||||
@@ -254,8 +257,10 @@ void ShutdownFonts( )
|
||||
UnloadFont( gp14PointArial);
|
||||
UnloadFont( gpBlockyFont);
|
||||
UnloadFont( gp12PointArialFixedFont );
|
||||
#if defined( JA2EDITOR ) && defined( ENGLISH )
|
||||
#if defined( JA2EDITOR )
|
||||
if(g_lang == i18n::Lang::en) {
|
||||
UnloadFont( gpHugeFont );
|
||||
}
|
||||
#endif
|
||||
|
||||
// ATE: Shutdown any win fonts
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "ImportStrings.h"
|
||||
#include "LocalizedStrings.h"
|
||||
#include "Language Defines.h"
|
||||
|
||||
#include <vfs/Tools/vfs_tools.h>
|
||||
#include <vfs/Core/vfs.h>
|
||||
|
||||
@@ -32,7 +32,6 @@ CREATED: Feb 16, 1999
|
||||
#include "builddefines.h"
|
||||
#include <stdio.h>
|
||||
#include "types.h"
|
||||
#include "Language Defines.h"
|
||||
#include "debug.h"
|
||||
#include "Fileman.h"
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex)
|
||||
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