diff --git a/Strategic/Campaign Types.h b/Strategic/Campaign Types.h index d2d07723..b4005c62 100644 --- a/Strategic/Campaign Types.h +++ b/Strategic/Campaign Types.h @@ -380,6 +380,7 @@ enum DRASSEN_AIRPORT_SITE, MEDUNA_AIRPORT_SITE, SAM_SITE, + REFUEL_SITE, REBEL_HIDEOUT, TIXA_DUNGEON, diff --git a/Strategic/Map Screen Helicopter.cpp b/Strategic/Map Screen Helicopter.cpp index 248d0299..9f3ca0fd 100644 --- a/Strategic/Map Screen Helicopter.cpp +++ b/Strategic/Map Screen Helicopter.cpp @@ -91,7 +91,7 @@ extern UINT8 ubSAMControlledSectors[ MAP_WORLD_Y ][ MAP_WORLD_X ]; extern INT8 SquadMovementGroups[ ]; -// whether helicopted variables have been set up +// whether helicopter variables have been set up BOOLEAN fSkyRiderSetUp = FALSE; // plotting for a helicopter @@ -207,11 +207,12 @@ void HandleSkyRiderMonologueAboutEstoniRefuel( UINT32 uiSpecialCode ); // refueling sites externalization stuff UINT8 NUMBER_OF_REFUEL_SITES; -// coordinates X,Y of sam sites on strategic map +// coordinates X,Y of refuel sites on strategic map INT16 sRefuelSectorX[ MAX_NUMBER_OF_REFUEL_SITES ]; INT16 sRefuelSectorY[ MAX_NUMBER_OF_REFUEL_SITES ]; -BOOLEAN fRefuelingSiteHidden[ MAX_NUMBER_OF_REFUEL_SITES ]; +// refuel sites known on game start +BOOLEAN fRefuelingSiteKnown[ MAX_NUMBER_OF_REFUEL_SITES ]; // heli tile index no in tileset INT32 iRefuelHeliTileIndex[ MAX_NUMBER_OF_REFUEL_SITES ]; @@ -283,7 +284,7 @@ helisiteStartElementHandle(void *userData, const XML_Char *name, const XML_Char memset( sRefuelSectorX, 0, sizeof(sRefuelSectorX) ); memset( sRefuelSectorY, 0, sizeof(sRefuelSectorY) ); - memset( fRefuelingSiteHidden, 0, sizeof(fRefuelingSiteHidden) ); + memset( fRefuelingSiteKnown, 0, sizeof(fRefuelingSiteKnown) ); memset( iRefuelHeliTileIndex, 0, sizeof(iRefuelHeliTileIndex) ); memset( iRefuelHeliGridNo, 0, sizeof(iRefuelHeliGridNo) ); memset( iRefuelSkyriderGridNo, 0, sizeof(iRefuelSkyriderGridNo) ); @@ -381,7 +382,7 @@ helisiteEndElementHandle(void *userData, const XML_Char *name) pData->curHeliInfo.uiIndex--; sRefuelSectorX [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelSectorX; sRefuelSectorY [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelSectorY; - fRefuelingSiteHidden [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelHidden; + fRefuelingSiteKnown [ pData->curHeliInfo.uiIndex ] = !pData->curHeliInfo.refuelHidden; iRefuelHeliTileIndex [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelHeliTileIndex; iRefuelHeliGridNo [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelHeliGridNo; iRefuelSkyriderGridNo [ pData->curHeliInfo.uiIndex ] = pData->curHeliInfo.refuelSkyriderGridNo; @@ -537,7 +538,7 @@ BOOLEAN WriteInInfo(STR fileName) FilePrintf(hFile,"\t\t\t\t%d\r\n",sRefuelSectorY[cnt]); FilePrintf(hFile,"\t\t\t\r\n"); - FilePrintf(hFile,"\t\t\t%d\r\n", fRefuelingSiteHidden[cnt] ); + FilePrintf(hFile,"\t\t\t%d\r\n", !fRefuelingSiteKnown[cnt] ); FilePrintf(hFile,"\t\t\t%d\r\n", iRefuelHeliTileIndex[cnt] ); diff --git a/Strategic/Map Screen Helicopter.h b/Strategic/Map Screen Helicopter.h index 4056a112..f683d953 100644 --- a/Strategic/Map Screen Helicopter.h +++ b/Strategic/Map Screen Helicopter.h @@ -137,9 +137,12 @@ extern BOOLEAN fShowCambriaHospitalHighLight; extern INT32 iTotalAccumulatedCostByPlayer; extern UINT32 guiTimeOfLastSkyriderMonologue; extern BOOLEAN fSkyRiderSetUp; + extern UINT8 NUMBER_OF_REFUEL_SITES; +extern INT16 sRefuelSectorX[ MAX_NUMBER_OF_REFUEL_SITES ]; +extern INT16 sRefuelSectorY[ MAX_NUMBER_OF_REFUEL_SITES ]; extern BOOLEAN fRefuelingSiteAvailable[ MAX_NUMBER_OF_REFUEL_SITES ]; -extern BOOLEAN fRefuelingSiteHidden[ MAX_NUMBER_OF_REFUEL_SITES ]; +extern BOOLEAN fRefuelingSiteKnown[ MAX_NUMBER_OF_REFUEL_SITES ]; extern UINT8 gubHelicopterHitsTaken; extern UINT8 gubHelicopterHoursToRepair; diff --git a/Strategic/Map Screen Interface Map.cpp b/Strategic/Map Screen Interface Map.cpp index 67063d16..dcf97d4d 100644 --- a/Strategic/Map Screen Interface Map.cpp +++ b/Strategic/Map Screen Interface Map.cpp @@ -6478,6 +6478,7 @@ void ShowSAMSitesOnStrategicMap( void ) BlitSAMGridMarkers( ); } + // sam site text for( iCounter = 0; iCounter < NUMBER_OF_SAMS; iCounter++ ) { // has the sam site here been found? @@ -6553,6 +6554,86 @@ void ShowSAMSitesOnStrategicMap( void ) } } + // refuel site text + for( iCounter = 0; iCounter < NUMBER_OF_REFUEL_SITES; iCounter++ ) + { + // has the refuel site here been known or found? + if( !fRefuelingSiteKnown[ iCounter ] && !GetSectorFlagStatus( sRefuelSectorX[ iCounter ], sRefuelSectorY[ iCounter ], 0, SF_ALREADY_VISITED ) ) + { + continue; + } + + // get the sector x and y + sSectorX = sRefuelSectorX[ iCounter ]; + sSectorY = sRefuelSectorY[ iCounter ]; + + GetScreenXYFromMapXY( sSectorX, sSectorY, &sX, &sY ); + sX += 5; + sY += 3; + + if( fShowAircraftFlag ) + { + // write "Refuel Site" centered underneath + + // HEADROCK HAM 5: Font size is now dynamic. + + INT32 MapHeliSiteFont; + if (iResolution <= _800x600 ) + { + MapHeliSiteFont = MAP_FONT; + } + else + { + MapHeliSiteFont = FONT14ARIAL; + } + + INT16 sLabelX = sX + (MAP_GRID_X / 2); + INT16 sLabelY; + if ( IsThisSectorASAMSector( sSectorX, sSectorY, 0 ) ) + { + if (iResolution <= _800x600 ) + sLabelY = sY + MAP_GRID_Y + 10; + else + sLabelY = sY + MAP_GRID_Y + 16; + } + else + sLabelY = sY + MAP_GRID_Y + 2; + + wcscpy( wString, pLandTypeStrings[ REFUEL_SITE ] ); + + // we're CENTERING the first string AROUND sX, so calculate the starting X value + sLabelX -= StringPixLength( wString, MapHeliSiteFont) / 2; + + // if within view region...render, else don't + if( ( sLabelX > MAP_VIEW_START_X + MAP_VIEW_WIDTH ) || ( sLabelX < MAP_VIEW_START_X ) || + ( sLabelY > MAP_VIEW_START_Y + MAP_VIEW_HEIGHT ) || ( sLabelY < MAP_VIEW_START_Y ) ) + { + continue; + } + + + SetFontDestBuffer( guiSAVEBUFFER, MapScreenRect.iLeft + 2, MapScreenRect.iTop, MapScreenRect.iRight, MapScreenRect.iBottom, FALSE ); + + // clip blits to mapscreen region + ClipBlitsToMapViewRegion( ); + + SetFont(MapHeliSiteFont); + // Green on green doesn't contrast well, use Yellow + if ( fRefuelingSiteAvailable[ iCounter ] ) + SetFontForeground(FONT_MCOLOR_LTYELLOW); + else + SetFontForeground(FONT_MCOLOR_LTGRAY); + SetFontBackground(FONT_MCOLOR_BLACK); + + // draw the text + gprintfdirty( sLabelX, sLabelY, wString ); + mprintf( sLabelX, sLabelY, wString); + + // restore clip blits + RestoreClipRegionToFullScreen( ); + } + } + return; } @@ -6576,6 +6657,7 @@ void BlitSAMGridMarkers( void ) // clip to view region ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES ); + // sam site rectangles for( iCounter = 0; iCounter < NUMBER_OF_SAMS; iCounter++ ) { // has the sam site here been found? @@ -6593,6 +6675,24 @@ void BlitSAMGridMarkers( void ) RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + sWidth, sScreenY + sHeight - 1, usColor, pDestBuf ); } + // refuel site rectangles + for( iCounter = 0; iCounter < NUMBER_OF_REFUEL_SITES; iCounter++ ) + { + // has the refuel site here been known or found? + if( !fRefuelingSiteKnown[ iCounter ] && !GetSectorFlagStatus( sRefuelSectorX[ iCounter ], sRefuelSectorY[ iCounter ], 0, SF_ALREADY_VISITED ) ) + { + continue; + } + + // get location on screen + GetScreenXYFromMapXY( sRefuelSectorX[ iCounter ], sRefuelSectorY[ iCounter ], &sScreenX, &sScreenY ); + sWidth = MAP_GRID_X; + sHeight= MAP_GRID_Y; + + // draw rectangle + RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + sWidth, sScreenY + sHeight - 1, usColor, pDestBuf ); + } + // restore clips RestoreClipRegionToFullScreenForRectangle( uiDestPitchBYTES ); diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index ff088b20..26b2e9d3 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -2539,6 +2539,7 @@ STR16 pLandTypeStrings[] = L"Drassen机场", L"Meduna机场", L"SAM导弹基地", + L"Refuel site", // TODO.Translate L"抵抗军隐蔽处",//The rebel base underground in sector A10 L"Tixa地牢",//The basement of the Tixa Prison (J9) L"异形巢穴",//Any mine sector with creatures in it @@ -3300,12 +3301,14 @@ STR16 pHelicopterEtaStrings[] = L"总价: ", // total cost of trip by helicopter L"耗时: ", // ETA is an acronym for "estimated time of arrival" L"直升机油量不够,必须在敌占区着陆。", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"乘客: ", - L"选择Skyrider还是“着陆点”?", - L"Skyrider", - L"着陆点", - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"乘客: ", + L"选择Skyrider还是“着陆点”?", + L"Skyrider", + L"着陆点", + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> + L"Helicopter will now return straight to base, do you want to drop down passengers before?", + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 7e6d8892..9aeefb04 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -2533,6 +2533,7 @@ STR16 pLandTypeStrings[] = L"Drassen Vliegveld", L"Meduna Vliegveld", L"SAM-stelling", + L"Refuel site", // TODO.Translate L"Schuilplaats Rebellen", //The rebel base underground in sector A10 L"Tixa Kerker", //The basement of the Tixa Prison (J9) L"Hol Beest", //Any mine sector with creatures in it @@ -3299,8 +3300,10 @@ STR16 pHelicopterEtaStrings[] = L"Selecteer Skyrider of Aanvoer Drop-plaats?", // L"Select Skyrider or the Arrivals Drop-off?", L"Skyrider", L"Aanvoer", // L"Arrivals", - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> // TODO.Translate + L"Helicopter will now return straight to base, do you want to drop down passengers before?" // TODO.Translate + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 5a3598df..53c4823f 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -2539,6 +2539,7 @@ STR16 pLandTypeStrings[] = L"Drassen Airport", L"Meduna Airport", L"SAM site", + L"Refuel site", L"Rebel Hideout", //The rebel base underground in sector A10 L"Tixa Dungeon", //The basement of the Tixa Prison (J9) L"Creature Lair", //Any mine sector with creatures in it diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 6e35f6e7..73195ff5 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -2543,6 +2543,7 @@ STR16 pLandTypeStrings[] = L"Aéroport Drassen", L"Aéroport Meduna", L"Site SAM", + L"Refuel site", // TODO.Translate L"Base rebelle", //The rebel base underground in sector A10 L"Prison Tixa", //The basement of the Tixa Prison (J9) L"Repaire créatures", //Any mine sector with creatures in it @@ -3309,7 +3310,9 @@ STR16 pHelicopterEtaStrings[] = L"Skyrider", L"Arrivée", L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> // TODO.Translate - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Helicopter will now return straight to base, do you want to drop down passengers before?" // TODO.Translate + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= // TODO.Translate diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index e361df1c..c0637d83 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -2541,6 +2541,7 @@ STR16 pLandTypeStrings[] = L"Drassen Flugplatz", L"Meduna Flugplatz", L"Raketen", + L"Tankstelle", // refuel site L"Rebellenlager", //The rebel base underground in sector A10 L"Tixa, Keller", //The basement of the Tixa Prison (J9) L"Monsterhöhle", //Any mine sector with creatures in it @@ -3299,8 +3300,10 @@ STR16 pHelicopterEtaStrings[] = L"Skyrider oder Absprungsort auswählen?", L"Skyrider", L"Absprung", //make sure length doesn't exceed 8 characters (used to be "Absprungsort") - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> // TODO.Translate + L"Helicopter will now return straight to base, do you want to drop down passengers before?", // TODO.Translate + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 826286a0..bdd7ead5 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -2529,6 +2529,7 @@ STR16 pLandTypeStrings[] = L"Aeroporto di Drassen", L"Aeroporto di Meduna", L"Postazione SAM", + L"Refuel site", // TODO.Translate L"Nascondiglio ribelli", //The rebel base underground in sector A10 L"Prigione sotterranea di Tixa", //The basement of the Tixa Prison (J9) L"Tana della creatura", //Any mine sector with creatures in it @@ -3290,12 +3291,14 @@ STR16 pHelicopterEtaStrings[] = L"Costo totale: ", // total cost of trip by helicopter L"TPA: ", // ETA is an acronym for "estimated time of arrival" L"L'elicottero ha poco carburante e deve atterrare in territorio nemico!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Passeggeri: ", - L"Seleziona Skyrider o gli Arrivi Drop-off?", - L"Skyrider", - L"Arrivi", - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Passeggeri: ", + L"Seleziona Skyrider o gli Arrivi Drop-off?", + L"Skyrider", + L"Arrivi", + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> // TODO.Translate + L"Helicopter will now return straight to base, do you want to drop down passengers before?" // TODO.Translate + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 56f88174..22df5b2e 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -2545,6 +2545,7 @@ STR16 pLandTypeStrings[] = L"Lotnisko w Drassen", L"Lotnisko w Medunie", L"Rakiety Z-P", + L"Refuel site", // TODO.Translate L"Kryjówka rebeliantów", //The rebel base underground in sector A10 L"Tixa - Lochy", //The basement of the Tixa Prison (J9) L"Gniazdo stworzeń", //Any mine sector with creatures in it @@ -3312,7 +3313,8 @@ STR16 pHelicopterEtaStrings[] = L"Pasażerowie", L"Helikopter został poważnie uszkodzony i musi wylądować na terenie wroga!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> L"Helikopter powróci teraz wprost do bazy, czy chcesz najpierw wysadzić pasażerów?" - + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index f9c583da..def26d70 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -2536,6 +2536,7 @@ STR16 pLandTypeStrings[] = L"Аэропорт Драссена", L"Аэропорт Медуны", L"База ПВО", + L"Refuel site", // TODO.Translate L"Убежище повстанцев", //The rebel base underground in sector A10 L"Подвалы Тиксы", //The basement of the Tixa Prison (J9) L"Логово тварей", //Any mine sector with creatures in it @@ -3297,12 +3298,14 @@ STR16 pHelicopterEtaStrings[] = L"Итого:", // total cost of trip by helicopter L"ОВП:", // ETA is an acronym for "estimated time of arrival" L"У вертолета закончилось топливо. Придется совершить посадку на вражеской территории!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Пассажиры:", - L"Выбрать вертолет или точку высадки?", - L"Вертолёт", - L"Высадка", - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Пассажиры:", + L"Выбрать вертолет или точку высадки?", + L"Вертолёт", + L"Высадка", + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> // TODO.Translate + L"Helicopter will now return straight to base, do you want to drop down passengers before?" // TODO.Translate + L"Remaining Fuel:", // TODO.Translate + L"Dist. To Refuel Site:", // TODO.Translate }; STR16 pHelicopterRepairRefuelStrings[]= diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index 0db034e7..5c910369 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -2539,6 +2539,7 @@ STR16 pLandTypeStrings[] = L"Drassen Airport", L"Meduna Airport", L"SAM site", + L"Refuel site", L"Rebel Hideout", //The rebel base underground in sector A10 L"Tixa Dungeon", //The basement of the Tixa Prison (J9) L"Creature Lair", //Any mine sector with creatures in it @@ -3301,12 +3302,14 @@ STR16 pHelicopterEtaStrings[] = L"Total Cost: ", // total cost of trip by helicopter L"ETA: ", // ETA is an acronym for "estimated time of arrival" L"Helicopter is low on fuel and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Passengers: ", - L"Select Skyrider or the Arrivals Drop-off?", - L"Skyrider", - L"Arrivals", - L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> - L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Passengers: ", + L"Select Skyrider or the Arrivals Drop-off?", + L"Skyrider", + L"Arrivals", + L"Helicopter is seriously damaged and must land in hostile territory!", // warning that the sector the helicopter is going to use for refueling is under enemy control -> + L"Helicopter will now return straight to base, do you want to drop down passengers before?" + L"Remaining Fuel:", + L"Dist. To Refuel Site:", }; STR16 pHelicopterRepairRefuelStrings[]=