Externalize fan exitgrid location in the source sector

This commit is contained in:
Asdow
2025-06-24 22:54:44 +03:00
parent d9391de58a
commit a1bb85ca95
5 changed files with 15 additions and 9 deletions
+2 -1
View File
@@ -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);
+1
View File
@@ -67,6 +67,7 @@ typedef struct
UINT32 PowergenSectorGridNo3;
UINT32 PowergenSectorGridNo4;
UINT32 PowergenSectorExitgridGridNo;
UINT32 PowergenSectorExitgridSrcGridNo;
UINT32 PowergenFanSoundGridNo1;
UINT32 PowergenFanSoundGridNo2;
UINT32 StartFanbackupAgainGridNo;
+2 -1
View File
@@ -7778,6 +7778,7 @@ void HandleMovingEnemiesCloseToEntranceInSecondTunnelMap( )
void HandlePowerGenFanSoundModification( )
{
extern UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO;
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
@@ -7786,7 +7787,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:
+10 -6
View File
@@ -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;
@@ -310,11 +311,13 @@ UINT32 SECTOR_FAN_Y = 0;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_X = 14;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Y = 11;
UINT32 SECTOR_OPEN_GATE_IN_TUNNEL_Z = 1;
//J14-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;
void InitGridNoUB()
{
SWITCHINMORRISAREA_GRIDNO = gGameUBOptions.SwitchInMorrisAreaGridNo; //= 15231;
@@ -326,7 +329,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;
@@ -821,7 +825,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);
@@ -942,10 +946,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 )
-1
View File
@@ -5,7 +5,6 @@
#include "MapScreen Quotes.h"
#define PGF__FAN_EXIT_GRID_GRIDNO 10979
#define NUM_MERCS_WITH_NEW_QUOTES 20//7