diff --git a/GameVersion.cpp b/GameVersion.cpp index fc5a3c97..5ec2ad99 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -15,9 +15,9 @@ #ifdef JA2EDITOR #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8561 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8561 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8561 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8561 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8561 (Development Build)" }; #endif #elif defined CRIPPLED_VERSION @@ -46,16 +46,16 @@ //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8561 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8561 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8554 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8561 (Development Build)" }; #endif #endif -CHAR8 czVersionNumber[16] = { "Build 18.04.15" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 18.05.14" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Standard Gaming Platform/vobject.cpp b/Standard Gaming Platform/vobject.cpp index 70f92929..8d91b5e7 100644 --- a/Standard Gaming Platform/vobject.cpp +++ b/Standard Gaming Platform/vobject.cpp @@ -1842,4 +1842,32 @@ void PerformVideoInfoDumpIntoFile( const STR8 filename, BOOLEAN fAppend ) #endif +// Flugente: retrieve width and height of video object +void GetVideoObjectDimensions( HVOBJECT hSrcVObject, UINT16 usIndex, UINT16& rusWidth, UINT16& rusHeight ) +{ + rusWidth = 0; + rusHeight = 0; + if ( hSrcVObject == NULL ) + return; + + switch ( hSrcVObject->ubBitDepth ) + { + case 32: + case 16: + if ( usIndex < hSrcVObject->usNumberOf16BPPObjects ) + { + rusWidth = hSrcVObject->p16BPPObject[usIndex].usWidth; + rusHeight = hSrcVObject->p16BPPObject[usIndex].usHeight; + } + break; + + case 8: + if ( usIndex < hSrcVObject->usNumberOfObjects ) + { + rusWidth = hSrcVObject->pETRLEObject[usIndex].usWidth; + rusHeight = hSrcVObject->pETRLEObject[usIndex].usHeight; + } + break; + } +} diff --git a/Standard Gaming Platform/vobject.h b/Standard Gaming Platform/vobject.h index 54a0a3be..8c97ec93 100644 --- a/Standard Gaming Platform/vobject.h +++ b/Standard Gaming Platform/vobject.h @@ -271,6 +271,9 @@ BOOLEAN BltVideoObjectOutlineShadowFromIndex(UINT32 uiDestVSurface, UINT32 uiSrc BOOLEAN BltVideoObjectOutlineShadow(UINT32 uiDestVSurface, HVOBJECT hSrcVObject, UINT16 usIndex, INT32 iDestX, INT32 iDestY ); BOOLEAN PixelateVideoObjectRect( UINT32 uiDestVSurface, INT32 X1, INT32 Y1, INT32 X2, INT32 Y2); +// Flugente: retrieve width and height of video object +void GetVideoObjectDimensions( HVOBJECT hSrcVObject, UINT16 usIndex, UINT16& rusWidth, UINT16& rusHeight ); + /* #ifdef __cplusplus } diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 3896b523..d1affbfe 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -7683,6 +7683,7 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ ) // - position of enemy helis // - position of POWs // - position of terrorists +// - position and time of raids (bloodcats/zombies/bandits) // - position of possible RPCs (Manuel, Maddog...) // // There are always up to INTELINFO_MAXNUMBER different informations available at a time. Every x hours these change. @@ -7742,6 +7743,53 @@ void BuildIntelInfoArray() if ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW && !( pSoldier->usSoldierFlagMask2 & SOLDIER_MERC_POW_LOCATIONKNOWN ) ) intelarray[i] = ubID; } + // next 6: terrorist locations + else if ( i < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ) + { + int cnt = i - ( 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID ); + + int profile = SLAY; + if ( cnt == 1 ) profile = ANNIE; + else if ( cnt == 2 ) profile = CHRIS; + else if ( cnt == 3 ) profile = TIFFANY; + else if ( cnt == 4 ) profile = T_REX; + else if ( cnt == 5 ) profile = DRUGGIST; + + if ( !( gMercProfiles[profile].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED ) && + gMercProfiles[profile].bMercStatus != MERC_IS_DEAD && + gMercProfiles[profile].sSectorX > 0 && + gMercProfiles[profile].sSectorY > 0 && + !CheckFact( FACT_TERRORIST_LOCATION_KNOWN_SLAY + cnt, 0 ) && + CheckFact( FACT_CARMEN_EXPLAINED_DEAL, 0) && + gubQuest[QUEST_KILL_TERRORISTS] == QUESTINPROGRESS ) + { + intelarray[i] = cnt; + } + } + // next 3: raids + else if ( i < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 + 3 ) + { + int raidtype = i - ( 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ); + + if ( raidtype == 0 ) + { + if ( !gGameExternalOptions.gRaid_Bloodcats ) + continue; + } + else if ( raidtype == 1 ) + { + if ( !gGameExternalOptions.gRaid_Zombies || !gGameSettings.fOptions[TOPTION_ZOMBIES] ) + continue; + } + else if ( raidtype == 2 ) + { + if ( !gGameExternalOptions.gRaid_Bandits ) + continue; + } + + if ( !CheckFact( FACT_RAID_KNOWN_BLOODCATS + raidtype, 0 ) ) + intelarray[i] = raidtype; + } // and so on... } @@ -7754,7 +7802,7 @@ void CalcIntelInfoOfferings() int prime = 163; int iteratornumber = 0; int safetycounter = 0; - int maxchecks = min( 20, INTEL_MAXINFO ); // we only do this until a certain point - so it is possible to not get a result + int maxchecks = min( 45, INTEL_MAXINFO ); // we only do this until a certain point - so it is possible to not get a result int checkcounter = 0; for ( int i = 0; i < INTELINFO_MAXNUMBER; ++i ) @@ -7804,29 +7852,56 @@ void GetIntelInfoOfferings( int aInfo[] ) void GetIntelInfoTextAndPrice(int aInfoNumber, STR16 aString, int& arIntelCost ) { - wcscpy( aString, L"No data found" ); + wcscpy( aString, szIntelText[6] ); arIntelCost = 0; if ( aInfoNumber < 0 ) { - wcscpy( aString, L"Data no longer eligible." ); + wcscpy( aString, szIntelText[7] ); arIntelCost = 0; } else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal ) { - wcscpy( aString, L"Whereabouts of a high-ranking officer of the royal army." ); + wcscpy( aString, szIntelText[8] ); arIntelCost = 50; } else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() ) { - wcscpy( aString, L"Flight plans of a airforce helicopter." ); + wcscpy( aString, szIntelText[9] ); arIntelCost = 30; } else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID ) { - wcscpy( aString, L"Coordinates of a recently imprisoned member of your force." ); + wcscpy( aString, szIntelText[10] ); arIntelCost = 30; } + // next 6: terrorist locations + else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ) + { + wcscpy( aString, szIntelText[11] ); + arIntelCost = 20; + } + // next 3: raids + else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 + 3 ) + { + int raidtype = aInfoNumber - ( 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ); + + if ( raidtype == 0 ) + { + wcscpy( aString, szIntelText[12] ); + arIntelCost = 15; + } + else if ( raidtype == 1 ) + { + wcscpy( aString, szIntelText[13] ); + arIntelCost = 15; + } + else if ( raidtype == 2 ) + { + wcscpy( aString, szIntelText[14] ); + arIntelCost = 15; + } + } } void BuyIntelInfo( int aInfoNumber ) @@ -7853,6 +7928,20 @@ void BuyIntelInfo( int aInfoNumber ) if ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) pSoldier->usSoldierFlagMask2 |= SOLDIER_MERC_POW_LOCATIONKNOWN; } + // next 6: terrorist locations + else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ) + { + int cnt = aInfoNumber - ( 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID ); + + SetFactTrue( FACT_TERRORIST_LOCATION_KNOWN_SLAY + cnt ); + } + // next 3: raids + else if ( aInfoNumber < 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 + 3 ) + { + int raidtype = aInfoNumber - ( 0 + gStrategicStatus.usVIPsTotal + gEnemyHeliVector.size() + gTacticalStatus.Team[gbPlayerNum].bLastID - gTacticalStatus.Team[gbPlayerNum].bFirstID + 6 ); + + SetFactTrue( FACT_RAID_KNOWN_BLOODCATS + raidtype ); + } // and so on... intelarray[aInfoNumber] = -1; diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 4ecd48b1..3fcc6d7c 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -1932,6 +1932,9 @@ void RenderAutoResolve() yp = iScreenHeightOffset + 290 + gpAR->bVerticalOffset; SetFontForeground( FONT_YELLOW ); mprintf( xp, yp, str ); + + // Flugente: in any case, reset creature attack variables + ResetCreatureAttackVariables(); } MarkButtonsDirty(); diff --git a/Strategic/Game Event Hook.h b/Strategic/Game Event Hook.h index 6bf86724..3c0315a5 100644 --- a/Strategic/Game Event Hook.h +++ b/Strategic/Game Event Hook.h @@ -208,4 +208,7 @@ BOOLEAN DeleteStrategicEvent( UINT8 ubCallbackID, UINT32 uiParam ); void DeleteAllStrategicEventsOfType( UINT8 ubCallbackID ); void DeleteAllStrategicEvents(); +// Flugente: return vector of all events of type ubCallbackID with time and param +std::vector< std::pair > GetAllStrategicEventsOfType( UINT8 ubCallbackID ); + #endif \ No newline at end of file diff --git a/Strategic/Game Events.cpp b/Strategic/Game Events.cpp index 397b2c1a..f593a852 100644 --- a/Strategic/Game Events.cpp +++ b/Strategic/Game Events.cpp @@ -666,7 +666,23 @@ BOOLEAN DeleteStrategicEvent( UINT8 ubCallbackID, UINT32 uiParam ) return FALSE; } +std::vector< std::pair > GetAllStrategicEventsOfType( UINT8 ubCallbackID ) +{ + std::vector< std::pair > vec; + STRATEGICEVENT* curr = gpEventList; + while ( curr ) + { + if ( curr->ubCallbackID == ubCallbackID ) + { + vec.push_back( std::pair( curr->uiTimeStamp, curr->uiParam ) ); + } + + curr = curr->next; + } + + return vec; +} //part of the game.sav files (not map files) BOOLEAN SaveStrategicEventsToSavedGame( HWFILE hFile ) diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index 1e295adc..16516602 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -876,6 +876,8 @@ static int l_AddArmsDealerAdditionalIntelDataItem( lua_State *L ); static int l_SetPhotoFactLaptopData( lua_State *L ); static int l_GetNumHostilesInSector( lua_State *L ); +static int l_SetIntelAndQuestMapDataForSector( lua_State *L ); + using namespace std; UINT16 idProfil; @@ -1758,6 +1760,8 @@ void IniFunction(lua_State *L, BOOLEAN bQuests ) lua_register( L, "SetPhotoFactLaptopData", l_SetPhotoFactLaptopData ); lua_register( L, "GetNumHostilesInSector", l_GetNumHostilesInSector ); + + lua_register( L, "SetIntelAndQuestMapDataForSector", l_SetIntelAndQuestMapDataForSector ); } #ifdef NEWMUSIC BOOLEAN LetLuaMusicControl(UINT8 Init) @@ -13435,3 +13439,61 @@ static int l_GetNumHostilesInSector( lua_State *L ) return 1; } + + +void LuaGetIntelAndQuestMapData( INT32 aLevel ) +{ + const char* filename = "scripts\\strategicmap.lua"; + + LuaScopeState _LS( true ); + + IniFunction( _LS.L(), TRUE ); + IniGlobalGameSetting( _LS.L() ); + + SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget ); + + LuaFunction( _LS.L, "GetIntelAndQuestMapData" ).Param( aLevel ).Call( 1 ); +} + +extern void AddIntelAndQuestMapDataForSector( INT16 sSectorX, INT16 sSectorY, UINT8 ausMapColour, int asSymbol, STR16 aText, STR16 aText_Short ); + +static int l_SetIntelAndQuestMapDataForSector( lua_State *L ) +{ + int n = lua_gettop( L ); + + if ( n >= 4 ) + { + INT16 sectorx = lua_tointeger( L, 1 ); + INT16 sectory = lua_tointeger( L, 2 ); + UINT8 mapcolour = lua_tointeger( L, 3 ); + int symbol = lua_tointeger( L, 4 ); + + CHAR16 w_str[1024]; + w_str[0] = '\0'; + + CHAR16 w_str_short[128]; + w_str_short[0] = '\0'; + + if ( n >= 5 ) + { + size_t len = 0; + const char* str = lua_tolstring( L, 5, &len ); + + MultiByteToWideChar( CP_UTF8, 0, str, -1, w_str, sizeof( w_str ) / sizeof( w_str[0] ) ); + w_str[sizeof( w_str ) / sizeof( w_str[0] ) - 1] = '\0'; + + if ( n >= 6 ) + { + size_t len_short = 0; + const char* str_short = lua_tolstring( L, 6, &len_short ); + + MultiByteToWideChar( CP_UTF8, 0, str_short, -1, w_str_short, sizeof( w_str_short ) / sizeof( w_str_short[0] ) ); + w_str_short[sizeof( w_str_short ) / sizeof( w_str_short[0] ) - 1] = '\0'; + } + } + + AddIntelAndQuestMapDataForSector( sectorx, sectory, mapcolour, symbol, w_str, w_str_short ); + } + + return 0; +} diff --git a/Strategic/LuaInitNPCs.h b/Strategic/LuaInitNPCs.h index 780e7639..912c3869 100644 --- a/Strategic/LuaInitNPCs.h +++ b/Strategic/LuaInitNPCs.h @@ -98,4 +98,5 @@ void LuaAddPhotoData( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, INT32 sGrid void LuaGetPhotoData( UINT8 aType ); void LuaSetPhotoState( INT16 asIndex, UINT8 aState ); void LuaVerifyPhotoState( INT16 asIndex ); +void LuaGetIntelAndQuestMapData( INT32 aLevel ); #endif diff --git a/Strategic/Map Screen Interface Border.cpp b/Strategic/Map Screen Interface Border.cpp index 70b7c6b5..d9f4ae63 100644 --- a/Strategic/Map Screen Interface Border.cpp +++ b/Strategic/Map Screen Interface Border.cpp @@ -56,6 +56,8 @@ UINT16 MAP_BORDER_DISEASE_BTN_X; // Flugente: disease UINT16 MAP_BORDER_DISEASE_BTN_Y; UINT16 MAP_BORDER_WEATHER_BTN_X; // Flugente: weather UINT16 MAP_BORDER_WEATHER_BTN_Y; +UINT16 MAP_BORDER_INTEL_BTN_X; // Flugente: intel +UINT16 MAP_BORDER_INTEL_BTN_Y; UINT16 MAP_LEVEL_MARKER_X; UINT16 MAP_LEVEL_MARKER_Y; @@ -101,8 +103,8 @@ extern int CLOCK_Y_START; // buttons & button images // HEADROCK HAM 4: Increase both arrays by one to accomodate new Mobile Restrictions button -INT32 giMapBorderButtons[ NUM_MAP_BORDER_BTNS ] = { -1, -1, -1, -1, -1, -1, -1, -1 }; -INT32 giMapBorderButtonsImage[ NUM_MAP_BORDER_BTNS ] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +INT32 giMapBorderButtons[ NUM_MAP_BORDER_BTNS ] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; +INT32 giMapBorderButtonsImage[ NUM_MAP_BORDER_BTNS ] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; void DeleteMapBorderButtons( void ); BOOLEAN CreateButtonsForMapBorder( void ); @@ -125,11 +127,10 @@ void BtnAircraftCallback(GUI_BUTTON *btn,INT32 reason); void BtnTeamCallback(GUI_BUTTON *btn,INT32 reason); void BtnMilitiaCallback(GUI_BUTTON *btn,INT32 reason); -// Flugente: disease +// Flugente: more callbacks void BtnDiseaseCallback(GUI_BUTTON *btn,INT32 reason); - -// Flugente: weather void BtnWeatherCallback( GUI_BUTTON *btn, INT32 reason ); +void BtnIntelCallback( GUI_BUTTON *btn, INT32 reason ); void LevelMarkerBtnCallback(MOUSE_REGION * pRegion, INT32 iReason ); @@ -254,8 +255,7 @@ BOOLEAN CreateButtonsForMapBorder( void ) giMapBorderButtons[ MAP_BORDER_TOWN_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_TOWN_BTN ], MAP_BORDER_TOWN_BTN_X, MAP_BORDER_TOWN_BTN_Y, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, (GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnTownCallback); - - + // mines giMapBorderButtonsImage[ MAP_BORDER_MINE_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,4,-1,13,-1 ); giMapBorderButtons[ MAP_BORDER_MINE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MINE_BTN ], MAP_BORDER_MINE_BTN_X, MAP_BORDER_MINE_BTN_Y, @@ -341,6 +341,28 @@ BOOLEAN CreateButtonsForMapBorder( void ) SetButtonCursor( giMapBorderButtons[MAP_BORDER_WEATHER_BTN], MSYS_NO_CURSOR ); } + // Flugente: intel + if ( TRUE ) + { + giMapBorderButtonsImage[MAP_BORDER_INTEL_BTN] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti", -1, 39, -1, 40, -1 ); + + // if the button image cannot be created, this is likely to a custom sti replacement that isn't up to date to this feature - just use some other images then + if ( giMapBorderButtonsImage[MAP_BORDER_INTEL_BTN] < 0 ) + giMapBorderButtonsImage[MAP_BORDER_INTEL_BTN] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti", -1, 2, -1, 11, -1 ); + + INT16 x = MAP_BORDER_INTEL_BTN_X; + if ( giMapBorderButtonsImage[MAP_BORDER_WEATHER_BTN] < 0 ) + x = MAP_BORDER_WEATHER_BTN_X; + + giMapBorderButtons[MAP_BORDER_INTEL_BTN] = QuickCreateButton( giMapBorderButtonsImage[MAP_BORDER_INTEL_BTN], x, MAP_BORDER_INTEL_BTN_Y, + BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH, + (GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnIntelCallback ); + + SetButtonFastHelpText( giMapBorderButtons[MAP_BORDER_INTEL_BTN], pMapScreenBorderButtonHelpText[MAP_BORDER_INTEL_BTN] ); + + SetButtonCursor( giMapBorderButtons[MAP_BORDER_INTEL_BTN], MSYS_NO_CURSOR ); + } + #ifdef JA2UB //EnableButton @@ -400,16 +422,17 @@ BOOLEAN CreateButtonsForMapBorder( void ) #endif #ifdef JA113DEMO - DisableButton( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_MINE_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_DISEASE_BTN ]); - DisableButton( giMapBorderButtons[ MAP_BORDER_WEATHER_BTN ]); - - fShowTownFlag = FALSE; + DisableButton( giMapBorderButtons[ MAP_BORDER_TOWN_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_MINE_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_ITEM_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_DISEASE_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_WEATHER_BTN ]); + DisableButton( giMapBorderButtons[ MAP_BORDER_INTEL_BTN ] ); + + fShowTownFlag = FALSE; #endif InitializeMapBorderButtonStates( ); @@ -544,6 +567,21 @@ void BtnWeatherCallback( GUI_BUTTON *btn, INT32 reason ) } } +// Flugente: intel +void BtnIntelCallback( GUI_BUTTON *btn, INT32 reason ) +{ + if ( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN ) + { + CommonBtnCallbackBtnDownChecks(); + + ToggleIntelFilter(); + } + else if ( reason & MSYS_CALLBACK_REASON_RBUTTON_DWN ) + { + CommonBtnCallbackBtnDownChecks(); + } +} + void ToggleShowTownsMode( void ) { if( fShowTownFlag == TRUE ) @@ -780,6 +818,27 @@ void ToggleWeatherFilter( void ) } } +// Flugente: intel +void ToggleIntelFilter() +{ + if ( gusMapDisplayColourMode == MAP_DISPLAY_INTEL ) + { + gusMapDisplayColourMode = MAP_DISPLAY_NORMAL; + + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); + + // dirty regions + fMapPanelDirty = TRUE; + fTeamPanelDirty = TRUE; + fCharacterInfoPanelDirty = TRUE; + } + else + { + // turn ON + TurnOnIntelFilterMode(); + } +} + void DisplayCurrentLevelMarker( void ) { // display the current level marker on the map border @@ -881,6 +940,7 @@ void TurnOnAirSpaceMode( void ) MapBorderButtonOn( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); // Turn off towns & mines (mostly because town/mine names overlap SAM site names) if( fShowTownFlag ) @@ -1007,6 +1067,7 @@ void TurnOnDiseaseFilterMode( void ) MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOn( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); if( fShowItemsFlag == TRUE ) { @@ -1072,6 +1133,7 @@ void TurnOnWeatherFilterMode() MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOn( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); if ( fShowItemsFlag == TRUE ) { @@ -1129,6 +1191,74 @@ void TurnOnWeatherFilterMode() } } +void TurnOnIntelFilterMode() +{ + // if mode already on, leave, else set and redraw + if ( gusMapDisplayColourMode != MAP_DISPLAY_INTEL ) + { + gusMapDisplayColourMode = MAP_DISPLAY_INTEL; + + MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); + MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); + MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOn( MAP_BORDER_INTEL_BTN ); + + if ( fShowItemsFlag ) + { + fShowItemsFlag = FALSE; + MapBorderButtonOff( MAP_BORDER_ITEM_BTN ); + } + + // Turn off towns, mines, teams, militia & airspace if any are on + if ( fShowTownFlag ) + { + fShowTownFlag = FALSE; + MapBorderButtonOff( MAP_BORDER_TOWN_BTN ); + } + + if ( fShowMineFlag ) + { + fShowMineFlag = FALSE; + MapBorderButtonOff( MAP_BORDER_MINE_BTN ); + } + + if ( fShowTeamFlag ) + { + fShowTeamFlag = FALSE; + MapBorderButtonOff( MAP_BORDER_TEAMS_BTN ); + } + + if ( fShowMilitia ) + { + fShowMilitia = FALSE; + MapBorderButtonOff( MAP_BORDER_MILITIA_BTN ); + } + + if ( ( bSelectedDestChar != -1 ) || fPlotForHelicopter || fPlotForMilitia ) + { + AbortMovementPlottingMode(); + } + else if ( gfInChangeArrivalSectorMode ) + { + CancelChangeArrivalSectorMode(); + } + + // Flugente: basically only show this message the first time every session + static BOOLEAN sIntelViewed = FALSE; + if ( !sIntelViewed ) + { + MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, zMarksMapScreenText[27] ); + + sIntelViewed = TRUE; + } + + // dirty regions + fMapPanelDirty = TRUE; + fTeamPanelDirty = TRUE; + fCharacterInfoPanelDirty = TRUE; + } +} + void InitializeMapBorderButtonStates( void ) { if( fShowItemsFlag ) @@ -1183,18 +1313,28 @@ void InitializeMapBorderButtonStates( void ) MapBorderButtonOn( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); break; case MAP_DISPLAY_DISEASE: MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOn( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); break; case MAP_DISPLAY_WEATHER: MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); MapBorderButtonOn( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOff( MAP_BORDER_INTEL_BTN ); + break; + + case MAP_DISPLAY_INTEL: + MapBorderButtonOff( MAP_BORDER_AIRSPACE_BTN ); + MapBorderButtonOff( MAP_BORDER_DISEASE_BTN ); + MapBorderButtonOff( MAP_BORDER_WEATHER_BTN ); + MapBorderButtonOn( MAP_BORDER_INTEL_BTN ); break; } } @@ -1307,6 +1447,8 @@ void InitMapBorderButtonCoordinates() MAP_BORDER_DISEASE_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset); MAP_BORDER_WEATHER_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 233; MAP_BORDER_WEATHER_BTN_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset); + MAP_BORDER_INTEL_BTN_X = xResOffset + MAP_BORDER_X + ( ( SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset ) / 2 ) + 276; + MAP_BORDER_INTEL_BTN_Y = ( SCREEN_HEIGHT - yResOffset - buttonOffset ); MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 114; MAP_LEVEL_MARKER_Y = (SCREEN_HEIGHT - yResOffset - buttonOffset); diff --git a/Strategic/Map Screen Interface Border.h b/Strategic/Map Screen Interface Border.h index dfc86a4a..2c0465f0 100644 --- a/Strategic/Map Screen Interface Border.h +++ b/Strategic/Map Screen Interface Border.h @@ -29,6 +29,7 @@ enum{ MAP_BORDER_MILITIA_BTN, MAP_BORDER_DISEASE_BTN, // Flugente: toggle disease views MAP_BORDER_WEATHER_BTN, // Flugente: toggle weather display + MAP_BORDER_INTEL_BTN, // Flugente: intel display NUM_MAP_BORDER_BTNS, // end enumeration marker }; @@ -53,6 +54,7 @@ enum MAP_DISPLAY_AIRSPACE_COLOURED_SAMS, MAP_DISPLAY_DISEASE, MAP_DISPLAY_WEATHER, + MAP_DISPLAY_INTEL, }; extern UINT8 gusMapDisplayColourMode; @@ -72,21 +74,19 @@ void ToggleShowTeamsMode( void ); void ToggleAirspaceMode( void ); void ToggleItemsFilter( void ); -// Flugente: disease +// Flugente: more filters void ToggleDiseaseFilter( ); - -// Flugente: weather void ToggleWeatherFilter( ); +void ToggleIntelFilter(); void TurnOnShowTeamsMode( void ); void TurnOnAirSpaceMode( void ); void TurnOnItemFilterMode( void ); -// Flugente: disease +// Flugente: more modes void TurnOnDiseaseFilterMode(); - -// Flugente: weather void TurnOnWeatherFilterMode( ); +void TurnOnIntelFilterMode(); // create/destroy buttons for map border region void DeleteMapBorderButtons( void ); diff --git a/Strategic/Map Screen Interface Map.cpp b/Strategic/Map Screen Interface Map.cpp index 4e14f759..128fbfbe 100644 --- a/Strategic/Map Screen Interface Map.cpp +++ b/Strategic/Map Screen Interface Map.cpp @@ -47,6 +47,8 @@ #include "ASD.h" // added by Flugente #include "MilitiaIndividual.h" // added by Flugente #include "Map Screen Interface Map Inventory.h" // added by Flugente + #include "LuaInitNPCs.h" // added by Flugente + #include "Game Event Hook.h" // added by Flugente #endif #include "Quests.h" @@ -294,6 +296,9 @@ UINT32 guiCHARICONS; // the merc arrival sector landing zone icon UINT32 guiBULLSEYE; +// Flugente: symbols indicating various things on the intel map +UINT32 guiINTEL; + UINT16 MAP_MILITIA_BOX_POS_X; UINT16 MAP_MILITIA_BOX_POS_Y; @@ -572,6 +577,7 @@ BOOLEAN CanMilitiaAutoDistribute( void ); void ShowItemsOnMap( void ); void ShowDiseaseOnMap( ); +void ShowIntelOnMap(); void DrawMapBoxIcon( HVOBJECT hIconHandle, UINT16 usVOIndex, INT16 sMapX, INT16 sMapY, UINT8 ubIconPosition ); void DisplayDestinationOfHelicopter( void ); void DrawOrta(); @@ -693,6 +699,88 @@ void HandleShowingOfEnemiesWithMilitiaOn( void ) } } +// colour for a sector on the map +// aType = 0: disease +// aType = 1: weather +// aType = 2: intel +INT32 GetMapColour( INT16 sX, INT16 sY, UINT8 aType ) +{ + if ( aType == 0 ) + { + UINT16 population = GetSectorPopulation( sX, sY ); + + if ( population ) + { + UINT8 sector = SECTOR( sX, sY ); + + SECTORINFO *pSectorInfo = &( SectorInfo[sector] ); + + // display sector information only if we know about infection there + if ( pSectorInfo && ( ( pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_PLAYER ) || ( gubFact[FACT_DISEASE_WHODATA_ACCESS] && pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_WHO ) ) ) + { + FLOAT infectedpercentage = (FLOAT)pSectorInfo->usInfected / (FLOAT)( population ); + + if ( infectedpercentage < 0.2f ) + return MAP_SHADE_DK_GREEN; + else if ( infectedpercentage < 0.3f ) + return MAP_SHADE_MD_GREEN; + else if ( infectedpercentage < 0.4f ) + return MAP_SHADE_LT_GREEN; + else if ( infectedpercentage < 0.5f ) + return MAP_SHADE_DK_YELLOW; + else if ( infectedpercentage < 0.6f ) + return MAP_SHADE_MD_YELLOW; + else if ( infectedpercentage < 0.7f ) + return MAP_SHADE_LT_YELLOW; + else if ( infectedpercentage < 0.8f ) + return MAP_SHADE_DK_RED; + else if ( infectedpercentage < 0.9f ) + return MAP_SHADE_MD_RED; + else + return MAP_SHADE_LT_RED; + } + } + } + else if ( aType == 1 ) + { + UINT8 sector = SECTOR( sX, sY ); + + SECTORINFO *pSectorInfo = &( SectorInfo[sector] ); + + // display sector information only if we know about infection there + if ( pSectorInfo ) + { + switch ( pSectorInfo->usWeather ) + { + case WEATHER_FORECAST_RAIN: + return MAP_SHADE_LT_CYAN; + break; + case WEATHER_FORECAST_THUNDERSHOWERS: + return MAP_SHADE_LT_BLUE; + break; + case WEATHER_FORECAST_SANDSTORM: + return MAP_SHADE_ORANGE; + break; + case WEATHER_FORECAST_SNOW: + return MAP_SHADE_LT_GREY; + break; + case WEATHER_FORECAST_NORMAL: + default: + return MAP_SHADE_BLACK; + break; + } + } + } + else if ( aType == 2 ) + { + UINT8 sector = SECTOR( sX, sY ); + + return gMapIntelData[sector].mapcolour; + } + + return MAP_SHADE_DK_GREY; +} + UINT32 DrawMap( void ) { HVSURFACE hSrcVSurface; @@ -715,6 +803,14 @@ UINT32 DrawMap( void ) //MapScreenRect={ (MAP_VIEW_START_X+MAP_GRID_X - 2), ( MAP_VIEW_START_Y+MAP_GRID_Y - 1), MAP_VIEW_START_X + MAP_VIEW_WIDTH - 1 + MAP_GRID_X , MAP_VIEW_START_Y+MAP_VIEW_HEIGHT-10+MAP_GRID_Y}; + if ( gusMapDisplayColourMode == MAP_DISPLAY_INTEL ) + { + extern void DetermineMapIntelData(INT32 asSectorZ); + + // This is the location where we should call lua and refill our intel data + DetermineMapIntelData( iCurrentMapSectorZ ); + } + if( !iCurrentMapSectorZ ) { pDestBuf = (UINT16*)LockVideoSurface( guiSAVEBUFFER, &uiDestPitchBYTES); @@ -851,6 +947,10 @@ UINT32 DrawMap( void ) ShadeMapElem( cnt, cnt2, GetMapColour( cnt, cnt2, 1 ) ); break; + case MAP_DISPLAY_INTEL: + ShadeMapElem( cnt, cnt2, GetMapColour( cnt, cnt2, 2 ) ); + break; + case MAP_DISPLAY_NORMAL: default: if ( GetSectorFlagStatus( cnt, cnt2, (UINT8)iCurrentMapSectorZ, SF_ALREADY_VISITED ) == FALSE ) @@ -1397,48 +1497,6 @@ void ShowUncertainNumberEnemiesInSector( INT16 sSectorX, INT16 sSectorY ) InvalidateRegion( sXPosition ,sYPosition, sXPosition + DMAP_GRID_X, sYPosition + DMAP_GRID_Y ); } -void ShowVIPSymbol( INT16 sSectorX, INT16 sSectorY ) -{ - INT16 sXPosition = 0, sYPosition = 0; - HVOBJECT hIconHandle; - - UINT8 iconOffsetX = 0; - UINT8 iconOffsetY = 0; - - if ( iResolution >= _640x480 && iResolution < _800x600 ) - { - iconOffsetX = 2; - iconOffsetY = 9; - } - else if ( iResolution < _1024x768 ) - { - iconOffsetX = 8; - iconOffsetY = 12; - } - else - { - iconOffsetX = 12; - iconOffsetY = 13; - } - - // grab the x and y postions - sXPosition = sSectorX; - sYPosition = sSectorY; - - // get the video object - GetVideoObject( &hIconHandle, guiCHARICONS ); - - // check if we are zoomed in...need to offset in case for scrolling purposes - sXPosition = (INT16)(iconOffsetX + ( MAP_VIEW_START_X + (sSectorX * MAP_GRID_X + 1)) - 1); - sYPosition = (INT16)(((iconOffsetY + ( yResOffset + sSectorY * MAP_GRID_Y ) + 1))); - sYPosition -= 2; - - // small VIP symbol - BltVideoObject( guiSAVEBUFFER, hIconHandle, VIP_SYMBOL, sXPosition, sYPosition, VO_BLT_SRCTRANSPARENCY, NULL ); - InvalidateRegion( sXPosition, sYPosition, sXPosition + DMAP_GRID_X, sYPosition + DMAP_GRID_Y ); -} - - void ShowTeamAndVehicles(INT32 fShowFlags) { // go through each sector, display the on duty, assigned, and vehicles @@ -6755,11 +6813,7 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS { return; } - - // Flugente: note if we have detected a VIP here - if ( PlayerKnowsAboutVIP( sSectorX, sSectorY ) ) - ShowVIPSymbol( sSectorX, sSectorY ); - + // Flugente: show militia in motion if ( NumNonPlayerTeamMembersInSector( sSectorX, sSectorY, MILITIA_TEAM ) ) { @@ -8283,3 +8337,165 @@ void DisplayMilitiaGroupBox() pGroup = pGroup->next; } } + +// Flugente: intel display + +InqMapInfo gMapIntelData[256]; + +void AddIntelAndQuestMapDataForSector( INT16 sSectorX, INT16 sSectorY, UINT8 ausMapColour, int asSymbol, STR16 aText, STR16 aText_Short ) +{ + if ( sSectorX > 0 && sSectorX < 17 && sSectorY > 0 && sSectorY < 17 ) + { + int sector = SECTOR( sSectorX, sSectorY ); + + if ( ausMapColour < MAP_SHADE_MAX ) + gMapIntelData[sector].mapcolour = ausMapColour; + + if ( asSymbol >= 0 ) + gMapIntelData[sector].symbols.push_back( asSymbol ); + + if ( wcsnlen( aText, 1024 ) > 0 ) + swprintf( gMapIntelData[sector].text, L"%s%s\n", gMapIntelData[sector].text, aText ); + + if ( wcsnlen( aText_Short, 128 ) > 0 ) + swprintf( gMapIntelData[sector].shorttext, L"%s", aText_Short ); + } +} + +void DetermineMapIntelData( INT32 asSectorZ ) +{ + // clear data + for ( int i = 0; i < 256; ++i ) + { + gMapIntelData[i].mapcolour = MAP_SHADE_BLACK; + gMapIntelData[i].text[0] = '\0'; + gMapIntelData[i].shorttext[0] = '\0'; + gMapIntelData[i].symbols.clear(); + } + + // add data + if ( !asSectorZ ) + { + // enemy VIPS we know of + for ( int sector = 0; sector < 256; ++sector ) + { + if ( PlayerKnowsAboutVIP( SECTORX( sector ), SECTORY( sector ) ) ) + { + AddIntelAndQuestMapDataForSector( SECTORX( sector ), SECTORY( sector ), MAP_SHADE_LT_RED, 5, szIntelText[3], L"" ); + } + } + + // uncovered terrorists we know of + for ( int cnt = 0; cnt < 6; ++cnt ) + { + int profile = SLAY; + if ( cnt == 1 ) profile = ANNIE; + else if ( cnt == 2 ) profile = CHRIS; + else if ( cnt == 3 ) profile = TIFFANY; + else if ( cnt == 4 ) profile = T_REX; + else if ( cnt == 5 ) profile = DRUGGIST; + + if ( !(gMercProfiles[profile].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED) && + gMercProfiles[profile].bMercStatus != MERC_IS_DEAD && + gMercProfiles[profile].sSectorX > 0 && + gMercProfiles[profile].sSectorY > 0 && + CheckFact( FACT_TERRORIST_LOCATION_KNOWN_SLAY + cnt, 0 ) ) + { + SECTOR( gMercProfiles[profile].sSectorX, gMercProfiles[profile].sSectorY ); + + AddIntelAndQuestMapDataForSector( gMercProfiles[profile].sSectorX, gMercProfiles[profile].sSectorY, -1, 3, szIntelText[4], L"" ); + } + } + + // raids we know of + for ( int raidtype = 0; raidtype < 3; ++raidtype ) + { + if ( CheckFact( FACT_RAID_KNOWN_BLOODCATS + raidtype, 0 ) ) + { + std::vector< std::pair > vec = GetAllStrategicEventsOfType( EVENT_BLOODCAT_ATTACK + raidtype ); + + for ( std::vector< std::pair >::iterator it = vec.begin(); it != vec.end(); ++it ) + { + if ( ( *it ).second < 256 ) + { + UINT32 seconds = ( *it ).first; + UINT32 minutes = seconds / 60; + UINT32 hours = minutes / 60; + + CHAR16 str[128]; + swprintf( str, szIntelText[5], gpStrategicString[STR_PB_BLOODCATRAID_HEADER + raidtype], hours % 24, minutes % 60 ); + + AddIntelAndQuestMapDataForSector( SECTORX( ( *it ).second ), SECTORY( ( *it ).second ), MAP_SHADE_LT_PINK, raidtype, str, L"" ); + } + } + } + } + } + + // add lua data + LuaGetIntelAndQuestMapData( asSectorZ ); +} + +void ShowIntelOnMap() +{ + INT16 usXPos, usYPos; + CHAR16 sString[256]; + + INT32 MapItemsFont; + if ( iResolution <= _800x600 ) + { + MapItemsFont = MAP_FONT; + } + else + { + MapItemsFont = FONT12ARIAL; + } + + SetFont( MapItemsFont ); + SetFontForeground( FONT_MCOLOR_WHITE ); + SetFontBackground( FONT_MCOLOR_BLACK ); + + UINT32 x, y, x0, y0; + HVOBJECT hHandle; + + GetVideoObject( &hHandle, guiINTEL ); + + for (int sector = 0; sector < 256; ++sector ) + { + UINT8 sector_x = SECTORX( sector ); + UINT8 sector_y = SECTORY( sector ); + + // grab min and max locations to interpolate sub sector position + x0 = MAP_VIEW_START_X + MAP_GRID_X * ( sector_x ); + y0 = MAP_VIEW_START_Y + MAP_GRID_Y * ( sector_y ); + + AssertMsg( ( x0 >= 0 ) && ( x0 < SCREEN_WIDTH ), String( "ShowIntelOnMap: Invalid minX = %d", x0 ) ); + AssertMsg( ( y0 >= 0 ) && ( y0 < SCREEN_HEIGHT ), String( "ShowIntelOnMap: Invalid minY = %d", y0 ) ); + + // clip blits to mapscreen region + ClipBlitsToMapViewRegion(); + + x = x0; + y = y0; + + for ( std::vector::iterator symbolit = gMapIntelData[sector].symbols.begin(); symbolit != gMapIntelData[sector].symbols.end(); ++symbolit ) + { + BltVideoObject( FRAME_BUFFER, hHandle, (*symbolit), x, y, VO_BLT_SRCTRANSPARENCY, NULL ); + + // Flugente: retrieve width and height of video object + UINT16 width, height; + GetVideoObjectDimensions( hHandle, ( *symbolit ), width, height ); + + // symbols overlap a bit, so that there is a bit of space + x += width * 0.6; + y += height * 0.6; + } + + // restore clip blits + RestoreClipRegionToFullScreen(); + + FindFontCenterCoordinates( x0, y0, MAP_GRID_X, MAP_GRID_Y, gMapIntelData[sector].shorttext, MapItemsFont, &usXPos, &usYPos ); + + mprintf( usXPos, usYPos, gMapIntelData[sector].shorttext ); + } +} diff --git a/Strategic/Map Screen Interface Map.h b/Strategic/Map Screen Interface Map.h index 67d74070..70a06e79 100644 --- a/Strategic/Map Screen Interface Map.h +++ b/Strategic/Map Screen Interface Map.h @@ -93,6 +93,18 @@ extern ICON_FILE gHiddenIcon[ 256 ]; extern UINT32 guiIcon2[256]; +typedef struct InqMapInfo +{ + UINT8 mapcolour; // map sector will get this colour + + CHAR16 text[1024]; // texts to appear in the infobox, \n start a new line + CHAR16 shorttext[128]; // this text will appear on the map itself + + std::vector symbols; // all the symbols we have to display +} InqMapInfo; + +extern InqMapInfo gMapIntelData[256]; + extern BOOLEAN LoadHiddenTownFromLoadGameFile( HWFILE hFile ); extern BOOLEAN SaveHiddenTownToSaveGameFile( HWFILE hFile ); @@ -354,6 +366,9 @@ extern UINT32 guiCHARICONS; // the merc arrival sector landing zone icon extern UINT32 guiBULLSEYE; +// Flugente: symbols indicating various things on the intel map +extern UINT32 guiINTEL; + // character between sector icons extern UINT32 guiCHARBETWEENSECTORICONS; // HEADROCK HAM 5: Enemies Between Sectors icons diff --git a/Strategic/Map Screen Interface TownMine Info.cpp b/Strategic/Map Screen Interface TownMine Info.cpp index d7038cf5..31a05010 100644 --- a/Strategic/Map Screen Interface TownMine Info.cpp +++ b/Strategic/Map Screen Interface TownMine Info.cpp @@ -84,6 +84,9 @@ void AddCommonInfoToBox(void); void AddItemsInSectorToBox(void); +// Flugente: additional intel/lua-based text +void AddIntelAndQuestTextToBox(); + // position town/mine info box on the screen void PositionTownMineInfoBox( void ); @@ -173,6 +176,9 @@ void CreateDestroyTownInfoBox( void ) AddItemsInSectorToBox(); + // Flugente: quests, intel or a modder might add additional info on a sector + AddIntelAndQuestTextToBox(); + // set font type SetBoxFont(ghTownMineBox, BLOCKFONT2); @@ -951,6 +957,38 @@ void AddItemsInSectorToBox(void) AddSecondColumnMonoString( &hStringHandle, wString ); } +// Flugente: additional intel/lua-based text +void AddIntelAndQuestTextToBox() +{ + CHAR16 wString[128]; + UINT32 hStringHandle = 0; + + CHAR16 line[1024]; // copy of the input + + wcscpy( line, gMapIntelData[SECTOR( bCurrentTownMineSectorX, bCurrentTownMineSectorY )].text ); + + BOOLEAN first = TRUE; + + CHAR16* subString = wcstok ( line, L"\n\0" ); + + while ( subString != NULL ) + { + if ( first ) + { + swprintf( wString, L"%s:", pwMiscSectorStrings[8] ); + AddMonoString( &hStringHandle, wString ); + } + else + AddMonoString( &hStringHandle, L"" ); + + AddSecondColumnMonoString( &hStringHandle, subString ); + + subString = wcstok ( NULL, L"\n\0" ); + + first = FALSE; + } +} + void PositionTownMineInfoBox( void ) { diff --git a/Strategic/PreBattle Interface.cpp b/Strategic/PreBattle Interface.cpp index 36a77f82..d1064aa5 100644 --- a/Strategic/PreBattle Interface.cpp +++ b/Strategic/PreBattle Interface.cpp @@ -1607,6 +1607,10 @@ void AutoResolveBattleCallback( GUI_BUTTON *btn, INT32 reason ) KillPreBattleInterface(); StopTimeCompression(); SetMusicMode( MUSIC_TACTICAL_NOTHING ); + + // Flugente: in any case, reset creature attack variables + ResetCreatureAttackVariables(); + return; } gfEnterAutoResolveMode = TRUE; @@ -1644,6 +1648,10 @@ void GoToSectorCallback( GUI_BUTTON *btn, INT32 reason ) KillPreBattleInterface(); StopTimeCompression(); SetMusicMode( MUSIC_TACTICAL_NOTHING ); + + // Flugente: in any case, reset creature attack variables + ResetCreatureAttackVariables(); + return; } diff --git a/Strategic/Quests.h b/Strategic/Quests.h index b2f2acf4..100319ad 100644 --- a/Strategic/Quests.h +++ b/Strategic/Quests.h @@ -566,7 +566,24 @@ enum Facts FACT_BOUNTYHUNTER_SECTOR_2, FACT_BOUNTYHUNTER_KILLED_1, FACT_BOUNTYHUNTER_KILLED_2, - + + // Flugente: for safety reasons, remember if we've already had an offensive + FACT_GLOBAL_OFFENSIVE_1_ORDERED, + FACT_GLOBAL_OFFENSIVE_2_ORDERED, + + // Flugente: do we know of today's raids? + FACT_RAID_KNOWN_BLOODCATS, + FACT_RAID_KNOWN_ZOMBIES, + FACT_RAID_KNOWN_BANDITS, + + // Flugente: do we know of the location of the terrorists? + FACT_TERRORIST_LOCATION_KNOWN_SLAY, + FACT_TERRORIST_LOCATION_KNOWN_ANNIE, + FACT_TERRORIST_LOCATION_KNOWN_CHRIS, + FACT_TERRORIST_LOCATION_KNOWN_TIFFANY, + FACT_TERRORIST_LOCATION_KNOWN_T_REX, + FACT_TERRORIST_LOCATION_KNOWN_DRUGGIST, + #ifdef JA2UB //Ja25 UB FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD = 400, @@ -595,10 +612,7 @@ enum Facts FACT_BIGGENS_ON_TEAM_AND_FAN_STOPPED,// 423 FACT_PLAYER_KNOWS_ABOUT_FAN_STOPPING,// 424 #endif - - // Flugente: for safety reasons, remember if we've already had an offensive - FACT_GLOBAL_OFFENSIVE_1_ORDERED, - FACT_GLOBAL_OFFENSIVE_2_ORDERED, + } ; //** END FACTS ************************* @@ -685,7 +699,6 @@ extern BOOLEAN CheckNPCCowering( UINT8 ubProfileID ); extern BOOLEAN CheckNPCIsUnderFire( UINT8 ubProfileID ); extern BOOLEAN NPCHeardShot( UINT8 ubProfileID ); extern BOOLEAN InTownSectorWithTrainingLoyalty( INT16 sSectorX, INT16 sSectorY ); -extern BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID ); extern BOOLEAN CheckNPCIsRPC( UINT8 ubProfileID ); extern BOOLEAN CheckTalkerStrong( void ); extern BOOLEAN CheckForNewShipment( void ); diff --git a/Strategic/Strategic Event Handler.cpp b/Strategic/Strategic Event Handler.cpp index f94177bc..8fe06f28 100644 --- a/Strategic/Strategic Event Handler.cpp +++ b/Strategic/Strategic Event Handler.cpp @@ -1109,6 +1109,9 @@ void HandleRaidEventPlanning() // the raid order is bloodcats/zombies/bandits for ( int raidtype = 0; raidtype < 3; ++raidtype ) { + // reset knowledge of these raids - if the player wants to know, they will have to buy anew + SetFactFalse( FACT_RAID_KNOWN_BLOODCATS + raidtype ); + personnelgain[raidtype] = 0; if ( raidtype == 0 ) diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index e7bcb835..91970eb8 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -4916,6 +4916,10 @@ UINT32 MapScreenHandle(void) VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; FilenameForBPP("INTERFACE\\incross.sti", VObjectDesc.ImageFile); CHECKF(AddVideoObject(&VObjectDesc, &guiCROSS)); + + VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; + FilenameForBPP( "INTERFACE\\IntelMapSymbols.sti", VObjectDesc.ImageFile ); + CHECKF( AddVideoObject( &VObjectDesc, &guiINTEL ) ); VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; if (iResolution >= _640x480 && iResolution < _800x600) @@ -5659,6 +5663,13 @@ UINT32 MapScreenHandle(void) { DisplayPositionOfEnemyHelicopter(); } + // Flugente: intel + else if ( gusMapDisplayColourMode == MAP_DISPLAY_INTEL && !fShowMapInventoryPool ) + { + extern void ShowIntelOnMap(); + + ShowIntelOnMap(); + } // display town info DisplayTownInfo( sSelMapX, sSelMapY, ( INT8 ) iCurrentMapSectorZ ); @@ -7564,13 +7575,18 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) break; case 'd': - #ifdef JA2TESTVERSION +#ifdef JA2TESTVERSION if( fAlt ) { // prints out a text file in C:\TEMP telling you how many stat change chances/successes each profile merc got TestDumpStatChanges(); } - #endif + else +#endif + if ( !fShowMapInventoryPool ) + { + ToggleDiseaseFilter(); + } break; case 'D': @@ -7985,7 +8001,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) break; case 'q': - #ifdef JA2TESTVERSION +#ifdef JA2TESTVERSION if( fAlt ) { // initialize miners if not already done so (fakes entering Drassen mine first) @@ -7993,7 +8009,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) // test miner quote system IssueHeadMinerQuote( (INT8) (1 + Random(MAX_NUMBER_OF_MINES - 1)), (UINT8) (1 + Random(2))); } - #endif + else +#endif + if ( !fShowMapInventoryPool ) + { + ToggleIntelFilter(); + } break; case 'Q'://dnl ch75 021113 #ifdef _DEBUG @@ -8018,6 +8039,10 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) { //activate autoresolve in prebattle interface. ActivatePreBattleRetreatAction(); } + else if ( !fShowMapInventoryPool ) + { + ToggleWeatherFilter(); + } break; case 's': if( fAlt ) @@ -8615,6 +8640,7 @@ INT32 iCounter2 = 0; //DeleteVideoObjectFromIndex(guiPOPUPBORDERS); DeleteVideoObjectFromIndex(guiCHARINFO); DeleteVideoObjectFromIndex(guiCHARICONS); + DeleteVideoObjectFromIndex( guiINTEL ); DeleteVideoObjectFromIndex(guiCROSS); DeleteVideoSurfaceFromIndex(guiBIGMAP); // DeleteVideoSurfaceFromIndex(guiPOPUPTEX); @@ -13448,6 +13474,7 @@ void HandleRemovalOfPreLoadedMapGraphics( void ) // DeleteVideoObjectFromIndex(guiPOPUPBORDERS); DeleteVideoObjectFromIndex(guiCHARINFO); DeleteVideoObjectFromIndex(guiCHARICONS); + DeleteVideoObjectFromIndex( guiINTEL ); DeleteVideoObjectFromIndex(guiCROSS); DeleteVideoSurfaceFromIndex(guiBIGMAP); DeleteVideoObjectFromIndex(guiSubLevel1); diff --git a/Tactical/Disease.cpp b/Tactical/Disease.cpp index c069de85..d4a8a066 100644 --- a/Tactical/Disease.cpp +++ b/Tactical/Disease.cpp @@ -503,81 +503,6 @@ UINT16 GetSectorPopulation( INT16 sX, INT16 sY, BOOLEAN fWithMilitary ) return population; } -// colour for a sector on the map -// aType = 0: disease -// aType = 1: weather -INT32 GetMapColour( INT16 sX, INT16 sY, UINT8 aType ) -{ - if ( aType == 0 ) - { - UINT16 population = GetSectorPopulation( sX, sY ); - - if ( population ) - { - UINT8 sector = SECTOR( sX, sY ); - - SECTORINFO *pSectorInfo = &(SectorInfo[sector]); - - // display sector information only if we know about infection there - if ( pSectorInfo && ((pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_PLAYER) || (gubFact[FACT_DISEASE_WHODATA_ACCESS] && pSectorInfo->usInfectionFlag & SECTORDISEASE_DIAGNOSED_WHO)) ) - { - FLOAT infectedpercentage = (FLOAT)pSectorInfo->usInfected / (FLOAT)(population); - - if ( infectedpercentage < 0.2f ) - return MAP_SHADE_DK_GREEN; - else if ( infectedpercentage < 0.3f ) - return MAP_SHADE_MD_GREEN; - else if ( infectedpercentage < 0.4f ) - return MAP_SHADE_LT_GREEN; - else if ( infectedpercentage < 0.5f ) - return MAP_SHADE_DK_YELLOW; - else if ( infectedpercentage < 0.6f ) - return MAP_SHADE_MD_YELLOW; - else if ( infectedpercentage < 0.7f ) - return MAP_SHADE_LT_YELLOW; - else if ( infectedpercentage < 0.8f ) - return MAP_SHADE_DK_RED; - else if ( infectedpercentage < 0.9f ) - return MAP_SHADE_MD_RED; - else - return MAP_SHADE_LT_RED; - } - } - } - else if ( aType == 1 ) - { - UINT8 sector = SECTOR( sX, sY ); - - SECTORINFO *pSectorInfo = &(SectorInfo[sector]); - - // display sector information only if we know about infection there - if ( pSectorInfo ) - { - switch ( pSectorInfo->usWeather ) - { - case WEATHER_FORECAST_RAIN: - return MAP_SHADE_LT_CYAN; - break; - case WEATHER_FORECAST_THUNDERSHOWERS: - return MAP_SHADE_LT_BLUE; - break; - case WEATHER_FORECAST_SANDSTORM: - return MAP_SHADE_ORANGE; - break; - case WEATHER_FORECAST_SNOW: - return MAP_SHADE_LT_GREY; - break; - case WEATHER_FORECAST_NORMAL: - default: - return MAP_SHADE_BLACK; - break; - } - } - } - - return MAP_SHADE_DK_GREY; -} - // handle infection redistribution if people move from A to B (set sXB and sYB to negative values to simply remove infected people in A) void PopulationMove( INT16 sXA, INT16 sYA, INT16 sXB, INT16 sYB, UINT16 usAmount ) { diff --git a/Tactical/Disease.h b/Tactical/Disease.h index d1ded664..4268c918 100644 --- a/Tactical/Disease.h +++ b/Tactical/Disease.h @@ -137,11 +137,6 @@ INT16 GetAdjacentSector( UINT8 sector, UINT8 spdir ); // get a sector population (not the tactical one - we use an xml estimation + troops present) UINT16 GetSectorPopulation( INT16 sX, INT16 sY, BOOLEAN fWithMilitary = TRUE ); -// colour for a sector on the map -// aType = 0: disease -// aType = 1: weather -INT32 GetMapColour( INT16 sX, INT16 sY, UINT8 aType ); - // handle infection redistribution if people move from A to B (set sXB and sYB to negative values to simply remove infected people in A) void PopulationMove( INT16 sXA, INT16 sYA, INT16 sXB, INT16 sYB, UINT16 usAmount ); diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index b04ff21b..28921ca5 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -4294,6 +4294,8 @@ STR16 pwMiscSectorStrings[] = L"是", L"否", L"状态/软件状态:", //L"Status/Software status:", + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4363,8 +4365,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"显示领空 (|A)", L"显示物品 (|I)", L"显示民兵和敌人 (|Z)", - L"显示疾病消息", //L"Show Disease Data", - L"显示天气", // L"Show Weather", + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6249,6 +6252,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"这个视图显示了目前的天气。没有颜色=晴天。青色为雨天。蓝色为雷暴。橙色为沙尘暴。白色为下雪",//L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11374,6 +11380,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 04803a12..59e13b02 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -4297,6 +4297,8 @@ STR16 pwMiscSectorStrings[] = L"Ja", L"Nee", L"Status/Software status:", // TODO.Translate + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4366,8 +4368,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Toon Luchtruim (|A)", L"Toon |Items", L"Toon Milities & Vijanden (|Z)", - L"Show Disease Data", // TODO.Translate - L"Show Weather", // TODO.Translate + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6257,6 +6260,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", // TODO.Translate + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11392,6 +11398,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 35311b84..7fb18484 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -4295,6 +4295,8 @@ STR16 pwMiscSectorStrings[] = L"Yes", L"No", L"Status/Software status:", + + L"Additional Intel", }; // error strings for inventory @@ -4364,8 +4366,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Show |Airspace", L"Show |Items", L"Show Militia & Enemies (|Z)", - L"Show Disease Data", - L"Show Weather", + L"Show |Disease Data", + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6250,6 +6253,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", }; @@ -11376,6 +11382,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 1d764b1e..df3f7fed 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -4301,6 +4301,8 @@ STR16 pwMiscSectorStrings[] = L"Oui", L"Non", L"Status/Software status:", // TODO.Translate + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4370,8 +4372,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Espace aérien (|A)", L"Objets (|I)", L"Milice & Ennemis (|Z)", - L"Show Disease Data", // TODO.Translate - L"Show Weather", // TODO.Translate + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6262,6 +6265,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", // TODO.Translate + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11374,6 +11380,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 05f3822c..04bc19db 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -4293,6 +4293,8 @@ STR16 pwMiscSectorStrings[] = L"Ja", L"Nein", L"Status/Software Status:", + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4356,8 +4358,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Luftr|aum zeigen", L"Gegenstände zeigen (|I)", L"Mili|z & Feinde zeigen", - L"Show Disease Data", // TODO.Translate - L"Zeige Wetter", + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6102,6 +6105,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", // TODO.Translate + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; STR16 pLandMarkInSectorString[] = @@ -11204,6 +11210,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 02307a63..45d478c0 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -4291,6 +4291,8 @@ STR16 pwMiscSectorStrings[] = L"Sì", L"No", L"Status/Software status:", // TODO.Translate + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4360,8 +4362,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Mostra spazio |aereo", L"Mostra oggett|i", L"Mostra esercito & nemici (|Z)", - L"Show Disease Data", // TODO.Translate - L"Show Weather", // TODO.Translate + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6240,6 +6243,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", // TODO.Translate + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11383,6 +11389,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 58f30366..b79ae44c 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -4302,6 +4302,8 @@ STR16 pwMiscSectorStrings[] = L"Tak", L"Nie", L"Status/Software status:", // TODO.Translate + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4371,8 +4373,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Pokaż przestrzeń powietrzną (|A)", L"Pokaż przedmioty (|I)", L"Pokaż samoobronę i wrogów (|Z)", - L"Show Disease Data", // TODO.Translate - L"Show Weather", // TODO.Translate + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6258,6 +6261,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"This view shows current weather. No colour=Sunny. CYAN=Rain. BLUE=Thunderstorm. ORANGE=Sandstorm. WHITE=Snow.", // TODO.Translate + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11396,6 +11402,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 20020fb1..96d5ce6b 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -4295,6 +4295,8 @@ STR16 pwMiscSectorStrings[] = L"Да", L"Нет", L"Status/Software status:", // TODO.Translate + + L"Additional Intel", // TODO:Translate }; // error strings for inventory @@ -4364,8 +4366,9 @@ STR16 pMapScreenBorderButtonHelpText[] = L"Карта воздушного пространства (|A)", L"Вещи (|I)", L"Ополчение и враги (|Z)", - L"Очаги заболеваний", - L"Погода", + L"Show |Disease Data", // TODO.Translate + L"Show Weathe|r", + L"Show |Quests & Intel", }; STR16 pMapScreenInvenButtonHelpText[] = @@ -6250,6 +6253,9 @@ STR16 zMarksMapScreenText[] = // Flugente: weather texts describing what a map view does L"Здесь паказана актуальная погода. Без цвета=солнечно, зеленый=дождь, Синий=Гроза, Оранжевый=песчаная буря, Белый=снег.", + + // Flugente: describe what intel map view does + L"This view shows which sectors relevant what ongoing quests. Some data bought with intel is also shown here.", // TODO.Translate }; @@ -11376,6 +11382,21 @@ STR16 szIntelText[] = L"No more enemies present, %s is no longer in hiding!", L"%s has been discovered and goes into hiding for %d hours.", L"%s has been discovered, going to sector!", + L"Enemy general present\n", + + L"Terrorist present\n", + L"%s on %02d:%02d\n", + L"No data found", + L"Data no longer eligible.", + + L"Whereabouts of a high-ranking officer of the royal army.", + L"Flight plans of an airforce helicopter.", + L"Coordinates of a recently imprisoned member of your force.", + L"Location of a high-value fugitive.", + + L"Information on possible bloodcat attacks against settlements.", + L"Time and place of possible zombie attacks against settlements.", + L"Information on planned bandit raids.", }; STR16 szChatTextSpy[] =