mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+105
-115
@@ -40,7 +40,7 @@
|
||||
|
||||
#define MAX_MEANWHILE_PROFILES 10
|
||||
|
||||
INT8 gzMeanwhileStr[][30] =
|
||||
INT8 gzMeanwhileStr[][30] =
|
||||
{
|
||||
"End of player's first battle",
|
||||
"Drassen Lib. ",
|
||||
@@ -63,7 +63,7 @@ INT8 gzMeanwhileStr[][30] =
|
||||
|
||||
|
||||
// the snap to grid nos for meanwhile scenes
|
||||
UINT16 gusMeanWhileGridNo[]=
|
||||
INT16 gsMeanWhileGridNo[]=
|
||||
{
|
||||
12248,
|
||||
12248,
|
||||
@@ -96,7 +96,7 @@ typedef struct
|
||||
} NPC_SAVE_INFO;
|
||||
|
||||
|
||||
// BEGIN SERALIZATION
|
||||
// BEGIN SERALIZATION
|
||||
MEANWHILE_DEFINITION gCurrentMeanwhileDef;
|
||||
MEANWHILE_DEFINITION gMeanwhileDef[NUM_MEANWHILES];
|
||||
BOOLEAN gfMeanwhileTryingToStart = FALSE;
|
||||
@@ -113,7 +113,7 @@ UINT32 guiOldScreen;
|
||||
NPC_SAVE_INFO gNPCSaveData[ MAX_MEANWHILE_PROFILES ];
|
||||
UINT32 guiNumNPCSaves = 0;
|
||||
BOOLEAN gfReloadingScreenFromMeanwhile = FALSE;
|
||||
INT16 gsOldCurInterfacePanel = 0;
|
||||
INT16 gsOldCurInterfacePanel = 0;
|
||||
BOOLEAN gfWorldWasLoaded = FALSE;
|
||||
UINT8 ubCurrentMeanWhileId = 0;
|
||||
|
||||
@@ -142,10 +142,10 @@ UINT32 uiMeanWhileFlags = 0;
|
||||
#define KILL_CHOPPER_FLAG 0x00001000
|
||||
#define AWOL_SCIENTIST_FLAG 0x00002000
|
||||
#define OUTSKIRTS_MEDUNA_FLAG 0x00004000
|
||||
#define INTERROGATION_FLAG 0x00008000
|
||||
#define INTERROGATION_FLAG 0x00008000
|
||||
#define BALIME_LIBERATED_FLAG 0x00010000
|
||||
|
||||
extern void InternalLocateGridNo( UINT16 sGridNo, BOOLEAN fForce );
|
||||
extern void InternalLocateGridNo( INT16 sGridNo, BOOLEAN fForce );
|
||||
|
||||
|
||||
void ProcessImplicationsOfMeanwhile( void );
|
||||
@@ -318,7 +318,7 @@ void ScheduleMeanwhileEvent( MEANWHILE_DEFINITION *pMeanwhileDef, UINT32 uiTime
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// set the meanwhile flag for this event
|
||||
SetMeanWhileFlag( pMeanwhileDef->ubMeanwhileID );
|
||||
|
||||
@@ -328,14 +328,14 @@ void ScheduleMeanwhileEvent( MEANWHILE_DEFINITION *pMeanwhileDef, UINT32 uiTime
|
||||
// Copy definiaiotn structure into position in global array....
|
||||
memcpy( &(gMeanwhileDef[pMeanwhileDef->ubMeanwhileID]), pMeanwhileDef, sizeof( MEANWHILE_DEFINITION ) );
|
||||
|
||||
// A meanwhile.. poor elliot!
|
||||
// increment his slapped count...
|
||||
// A meanwhile.. poor elliot!
|
||||
// increment his slapped count...
|
||||
|
||||
// We need to do it here 'cause they may skip it...
|
||||
if ( gMercProfiles[ ELLIOT ].bNPCData != 17 )
|
||||
{
|
||||
gMercProfiles[ ELLIOT ].bNPCData++;
|
||||
}
|
||||
// We need to do it here 'cause they may skip it...
|
||||
if ( gMercProfiles[ ELLIOT ].bNPCData != 17 )
|
||||
{
|
||||
gMercProfiles[ ELLIOT ].bNPCData++;
|
||||
}
|
||||
|
||||
AddStrategicEvent( EVENT_MEANWHILE, uiTime, pMeanwhileDef->ubMeanwhileID );
|
||||
}
|
||||
@@ -403,25 +403,25 @@ void CheckForMeanwhileOKStart( )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !DialogueQueueIsEmptyOrSomebodyTalkingNow( ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( !DialogueQueueIsEmptyOrSomebodyTalkingNow( ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gfMeanwhileTryingToStart = FALSE;
|
||||
|
||||
guiOldScreen = guiCurrentScreen;
|
||||
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
LeaveTacticalScreen( GAME_SCREEN );
|
||||
}
|
||||
if ( guiCurrentScreen == GAME_SCREEN )
|
||||
{
|
||||
LeaveTacticalScreen( GAME_SCREEN );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// We need to make sure we have no item - at least in tactical
|
||||
// In mapscreen, time is paused when manipulating items...
|
||||
CancelItemPointer( );
|
||||
// We need to make sure we have no item - at least in tactical
|
||||
// In mapscreen, time is paused when manipulating items...
|
||||
CancelItemPointer( );
|
||||
|
||||
BringupMeanwhileBox( );
|
||||
}
|
||||
@@ -430,7 +430,6 @@ void CheckForMeanwhileOKStart( )
|
||||
void StartMeanwhile( )
|
||||
{
|
||||
INT32 iIndex;
|
||||
INT8 bNumDone = 0;
|
||||
|
||||
// OK, save old position...
|
||||
if ( gfWorldLoaded )
|
||||
@@ -447,14 +446,14 @@ void StartMeanwhile( )
|
||||
gfInMeanwhile = TRUE;
|
||||
|
||||
// ATE: Change music before load
|
||||
SetMusicMode( MUSIC_MAIN_MENU );
|
||||
SetMusicMode( MUSIC_MAIN_MENU );
|
||||
|
||||
|
||||
gfWorldWasLoaded = gfWorldLoaded;
|
||||
|
||||
// OK, we have been told to start.....
|
||||
SetCurrentInterfacePanel( (UINT8)TEAM_PANEL );
|
||||
|
||||
|
||||
// Setup NPC locations, depending on meanwhile type...
|
||||
switch( gCurrentMeanwhileDef.ubMeanwhileID )
|
||||
{
|
||||
@@ -464,7 +463,7 @@ void StartMeanwhile( )
|
||||
case ALMA_LIBERATED:
|
||||
case GRUMM_LIBERATED:
|
||||
case CHITZENA_LIBERATED:
|
||||
case BALIME_LIBERATED:
|
||||
case BALIME_LIBERATED:
|
||||
case NW_SAM:
|
||||
case NE_SAM:
|
||||
case CENTRAL_SAM:
|
||||
@@ -480,10 +479,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = QUEEN;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ QUEEN ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ QUEEN ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ QUEEN ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ QUEEN ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ QUEEN ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ QUEEN ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ QUEEN ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ QUEEN ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( QUEEN );
|
||||
@@ -496,10 +495,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = ELLIOT;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ ELLIOT ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ ELLIOT ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ ELLIOT ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ ELLIOT ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ ELLIOT ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ ELLIOT ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ ELLIOT ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ ELLIOT ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( ELLIOT );
|
||||
@@ -514,10 +513,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = JOE;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ JOE ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ JOE ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ JOE ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ JOE ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ JOE ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ JOE ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ JOE ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ JOE ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( JOE );
|
||||
@@ -536,10 +535,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = QUEEN;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ QUEEN ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ QUEEN ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ QUEEN ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ QUEEN ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ QUEEN ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ QUEEN ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ QUEEN ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ QUEEN ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( QUEEN );
|
||||
@@ -552,10 +551,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = ELLIOT;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ ELLIOT ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ ELLIOT ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ ELLIOT ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ ELLIOT ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ ELLIOT ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ ELLIOT ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ ELLIOT ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ ELLIOT ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( ELLIOT );
|
||||
@@ -568,10 +567,10 @@ void StartMeanwhile( )
|
||||
if ( iIndex != -1 )
|
||||
{
|
||||
gNPCSaveData[ iIndex ].ubProfile = JOE;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ JOE ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ JOE ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ JOE ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ JOE ].sGridNo;
|
||||
gNPCSaveData[ iIndex ].sX = gMercProfiles[ JOE ].sSectorX;
|
||||
gNPCSaveData[ iIndex ].sY = gMercProfiles[ JOE ].sSectorY;
|
||||
gNPCSaveData[ iIndex ].sZ = gMercProfiles[ JOE ].bSectorZ;
|
||||
gNPCSaveData[ iIndex ].sGridNo = gMercProfiles[ JOE ].sGridNo;
|
||||
|
||||
// Force reload of NPC files...
|
||||
ReloadQuoteFile( JOE );
|
||||
@@ -597,7 +596,7 @@ void StartMeanwhile( )
|
||||
void DoneFadeOutMeanwhile( )
|
||||
{
|
||||
// OK, insertion data found, enter sector!
|
||||
|
||||
|
||||
SetCurrentWorldSector( gCurrentMeanwhileDef.sSectorX, gCurrentMeanwhileDef.sSectorY, 0 );
|
||||
|
||||
//LocateToMeanwhileCharacter( );
|
||||
@@ -653,8 +652,8 @@ BOOLEAN AreInMeanwhile( )
|
||||
{
|
||||
STRATEGICEVENT *curr;
|
||||
|
||||
//KM: April 6, 1999
|
||||
//Tactical traversal needs to take precedence over meanwhile events. When tactically traversing, we
|
||||
//KM: April 6, 1999
|
||||
//Tactical traversal needs to take precedence over meanwhile events. When tactically traversing, we
|
||||
//expect to make it to the other side without interruption.
|
||||
if( gfTacticalTraversal )
|
||||
{
|
||||
@@ -665,7 +664,7 @@ BOOLEAN AreInMeanwhile( )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
//Check to make sure a meanwhile scene isn't in the event list occurring at the exact same time as this call. Meanwhile
|
||||
//Check to make sure a meanwhile scene isn't in the event list occurring at the exact same time as this call. Meanwhile
|
||||
//scenes have precedence over a new battle if they occur in the same second.
|
||||
curr = gpEventList;
|
||||
while( curr )
|
||||
@@ -726,12 +725,12 @@ void ProcessImplicationsOfMeanwhile( void )
|
||||
//HandleNPCDoAction( QUEEN, NPC_ACTION_SEND_SOLDIERS_TO_DRASSEN, 0 );
|
||||
ExecuteStrategicAIAction( NPC_ACTION_SEND_SOLDIERS_TO_DRASSEN, 13, 4 );
|
||||
break;
|
||||
|
||||
|
||||
case CREATURES:
|
||||
// add Rat
|
||||
HandleNPCDoAction( QUEEN, NPC_ACTION_ADD_RAT, 0 );
|
||||
break;
|
||||
|
||||
|
||||
case AWOL_SCIENTIST:
|
||||
{
|
||||
INT16 sSectorX, sSectorY;
|
||||
@@ -781,7 +780,7 @@ void ProcessImplicationsOfMeanwhile( void )
|
||||
case CENTRAL_SAM:
|
||||
ExecuteStrategicAIAction( NPC_ACTION_SEND_TROOPS_TO_SAM, SAM_3_X, SAM_3_X );
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -804,8 +803,8 @@ void EndMeanwhile( )
|
||||
UnLockPauseState();
|
||||
UnPauseGame();
|
||||
|
||||
// ATE: Make sure!
|
||||
TurnOffSectorLocator();
|
||||
// ATE: Make sure!
|
||||
TurnOffSectorLocator();
|
||||
|
||||
if ( gCurrentMeanwhileDef.ubMeanwhileID != INTERROGATION )
|
||||
{
|
||||
@@ -823,23 +822,23 @@ void EndMeanwhile( )
|
||||
// Set music mode to enemy present!
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
// ATE: Restore people to saved positions...
|
||||
// OK, restore NPC save info...
|
||||
for ( cnt = 0; cnt < guiNumNPCSaves; cnt++ )
|
||||
{
|
||||
ubProfile = gNPCSaveData[ cnt ].ubProfile;
|
||||
// ATE: Restore people to saved positions...
|
||||
// OK, restore NPC save info...
|
||||
for ( cnt = 0; cnt < guiNumNPCSaves; cnt++ )
|
||||
{
|
||||
ubProfile = gNPCSaveData[ cnt ].ubProfile;
|
||||
|
||||
if ( ubProfile != NO_PROFILE )
|
||||
{
|
||||
gMercProfiles[ ubProfile ].sSectorX = gNPCSaveData[ cnt ].sX;
|
||||
gMercProfiles[ ubProfile ].sSectorY = gNPCSaveData[ cnt ].sY;
|
||||
gMercProfiles[ ubProfile ].bSectorZ = (INT8)gNPCSaveData[ cnt ].sZ;
|
||||
gMercProfiles[ ubProfile ].sGridNo = (INT8)gNPCSaveData[ cnt ].sGridNo;
|
||||
if ( ubProfile != NO_PROFILE )
|
||||
{
|
||||
gMercProfiles[ ubProfile ].sSectorX = gNPCSaveData[ cnt ].sX;
|
||||
gMercProfiles[ ubProfile ].sSectorY = gNPCSaveData[ cnt ].sY;
|
||||
gMercProfiles[ ubProfile ].bSectorZ = (INT8)gNPCSaveData[ cnt ].sZ;
|
||||
gMercProfiles[ ubProfile ].sGridNo = (INT8)gNPCSaveData[ cnt ].sGridNo;
|
||||
|
||||
// Ensure NPC files loaded...
|
||||
ReloadQuoteFile( ubProfile );
|
||||
}
|
||||
}
|
||||
// Ensure NPC files loaded...
|
||||
ReloadQuoteFile( ubProfile );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -853,13 +852,13 @@ void DoneFadeOutMeanwhileOnceDone( )
|
||||
// OK, insertion data found, enter sector!
|
||||
gfReloadingScreenFromMeanwhile = TRUE;
|
||||
|
||||
|
||||
|
||||
if( gfWorldWasLoaded )
|
||||
{
|
||||
SetCurrentWorldSector( gsOldSectorX, gsOldSectorY, (INT8)gsOldSectorZ );
|
||||
|
||||
ExamineCurrentSquadLights( );
|
||||
}
|
||||
ExamineCurrentSquadLights( );
|
||||
}
|
||||
else
|
||||
{
|
||||
TrashWorld( );
|
||||
@@ -883,7 +882,7 @@ void DoneFadeOutMeanwhileOnceDone( )
|
||||
gMercProfiles[ ubProfile ].sSectorX = gNPCSaveData[ cnt ].sX;
|
||||
gMercProfiles[ ubProfile ].sSectorY = gNPCSaveData[ cnt ].sY;
|
||||
gMercProfiles[ ubProfile ].bSectorZ = (INT8)gNPCSaveData[ cnt ].sZ;
|
||||
gMercProfiles[ ubProfile ].sGridNo = (INT8)gNPCSaveData[ cnt ].sGridNo;
|
||||
gMercProfiles[ ubProfile ].sGridNo = (INT8)gNPCSaveData[ cnt ].sGridNo;
|
||||
|
||||
// Ensure NPC files loaded...
|
||||
ReloadQuoteFile( ubProfile );
|
||||
@@ -912,7 +911,7 @@ void DoneFadeOutMeanwhileOnceDone( )
|
||||
|
||||
void DoneFadeInMeanwhileOnceDone( )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void LocateMeanWhileGrid( void )
|
||||
@@ -920,7 +919,7 @@ void LocateMeanWhileGrid( void )
|
||||
INT16 sGridNo = 0;
|
||||
|
||||
// go to the approp. gridno
|
||||
sGridNo = gusMeanWhileGridNo[ ubCurrentMeanWhileId ];
|
||||
sGridNo = gsMeanWhileGridNo[ ubCurrentMeanWhileId ];
|
||||
|
||||
InternalLocateGridNo( sGridNo, TRUE );
|
||||
|
||||
@@ -958,14 +957,14 @@ void HandleCreatureRelease( void )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
|
||||
|
||||
MeanwhileDef.sSectorX = 3;
|
||||
MeanwhileDef.sSectorY = 16;
|
||||
MeanwhileDef.ubNPCNumber = QUEEN;
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = CREATURES;
|
||||
|
||||
// schedule the event
|
||||
@@ -987,7 +986,7 @@ void HandleMeanWhileEventPostingForTownLiberation( UINT8 bTownId )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
// which town iberated?
|
||||
switch( bTownId )
|
||||
{
|
||||
@@ -1024,10 +1023,10 @@ void HandleMeanWhileEventPostingForTownLiberation( UINT8 bTownId )
|
||||
// schedule the event
|
||||
ScheduleMeanwhileEvent( &MeanwhileDef, uiTime );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleMeanWhileEventPostingForTownLoss( UINT8 bTownId )
|
||||
{
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
|
||||
@@ -1043,7 +1042,7 @@ void HandleMeanWhileEventPostingForTownLoss( UINT8 bTownId )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = LOST_TOWN;
|
||||
|
||||
// schedule the event
|
||||
@@ -1072,9 +1071,9 @@ void HandleMeanWhileEventPostingForSAMLiberation( INT8 bSamId )
|
||||
MeanwhileDef.sSectorY = 16;
|
||||
MeanwhileDef.ubNPCNumber = QUEEN;
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
// which SAM iberated?
|
||||
switch( bSamId )
|
||||
{
|
||||
@@ -1103,15 +1102,13 @@ void HandleMeanWhileEventPostingForSAMLiberation( INT8 bSamId )
|
||||
ScheduleMeanwhileEvent( &MeanwhileDef, uiTime );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void HandleFlowersMeanwhileScene( INT8 bTimeCode )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
UINT8 ubId = 0;
|
||||
|
||||
// make sure scene hasn't been used before
|
||||
if ( GetMeanWhileFlag( FLOWERS ) )
|
||||
{
|
||||
@@ -1134,7 +1131,7 @@ void HandleFlowersMeanwhileScene( INT8 bTimeCode )
|
||||
// 2-4 days later
|
||||
uiTime = GetWorldTotalMin() + 60 * ( 24 + Random( 48 ) );
|
||||
}
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = FLOWERS;
|
||||
|
||||
// schedule the event
|
||||
@@ -1145,8 +1142,6 @@ void HandleOutskirtsOfMedunaMeanwhileScene( void )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
UINT8 ubId = 0;
|
||||
|
||||
// make sure scene hasn't been used before
|
||||
if ( GetMeanWhileFlag( OUTSKIRTS_MEDUNA ) )
|
||||
{
|
||||
@@ -1159,7 +1154,7 @@ void HandleOutskirtsOfMedunaMeanwhileScene( void )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = OUTSKIRTS_MEDUNA;
|
||||
|
||||
// schedule the event
|
||||
@@ -1170,8 +1165,6 @@ void HandleKillChopperMeanwhileScene( void )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
UINT8 ubId = 0;
|
||||
|
||||
// make sure scene hasn't been used before
|
||||
if ( GetMeanWhileFlag( KILL_CHOPPER ) )
|
||||
{
|
||||
@@ -1184,7 +1177,7 @@ void HandleKillChopperMeanwhileScene( void )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 55 + Random( 10 );
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = KILL_CHOPPER;
|
||||
|
||||
// schedule the event
|
||||
@@ -1195,8 +1188,6 @@ void HandleScientistAWOLMeanwhileScene( void )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
UINT8 ubId = 0;
|
||||
|
||||
// make sure scene hasn't been used before
|
||||
if ( GetMeanWhileFlag( AWOL_SCIENTIST ) )
|
||||
{
|
||||
@@ -1209,7 +1200,7 @@ void HandleScientistAWOLMeanwhileScene( void )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = AWOL_SCIENTIST;
|
||||
|
||||
// schedule the event
|
||||
@@ -1218,10 +1209,8 @@ void HandleScientistAWOLMeanwhileScene( void )
|
||||
|
||||
void HandleInterrogationMeanwhileScene( void )
|
||||
{
|
||||
UINT32 uiTime = 0;
|
||||
UINT32 uiTime = 0;
|
||||
MEANWHILE_DEFINITION MeanwhileDef;
|
||||
UINT8 ubId = 0;
|
||||
|
||||
// make sure scene hasn't been used before
|
||||
if ( GetMeanWhileFlag( INTERROGATION ) )
|
||||
{
|
||||
@@ -1234,7 +1223,7 @@ void HandleInterrogationMeanwhileScene( void )
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 60;
|
||||
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = INTERROGATION;
|
||||
|
||||
// schedule the event
|
||||
@@ -1251,14 +1240,14 @@ void HandleFirstBattleVictory( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MeanwhileDef.sSectorX = 3;
|
||||
MeanwhileDef.sSectorY = 16;
|
||||
MeanwhileDef.ubNPCNumber = QUEEN;
|
||||
MeanwhileDef.usTriggerEvent = 0;
|
||||
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
ubId = END_OF_PLAYERS_FIRST_BATTLE;
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = ubId;
|
||||
@@ -1279,7 +1268,7 @@ void HandleDelayedFirstBattleVictory( void )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MeanwhileDef.sSectorX = 3;
|
||||
MeanwhileDef.sSectorY = 16;
|
||||
MeanwhileDef.ubNPCNumber = QUEEN;
|
||||
@@ -1287,11 +1276,11 @@ void HandleDelayedFirstBattleVictory( void )
|
||||
|
||||
/*
|
||||
//It is theoretically impossible to liberate a town within 60 minutes of the first battle (which is supposed to
|
||||
//occur outside of a town in this scenario). The delay is attributed to the info taking longer to reach the queen.
|
||||
//occur outside of a town in this scenario). The delay is attributed to the info taking longer to reach the queen.
|
||||
uiTime = GetWorldTotalMin() + 60;
|
||||
*/
|
||||
uiTime = GetWorldTotalMin() + 5;
|
||||
|
||||
|
||||
ubId = END_OF_PLAYERS_FIRST_BATTLE;
|
||||
|
||||
MeanwhileDef.ubMeanwhileID = ubId;
|
||||
@@ -1313,7 +1302,7 @@ void HandleFirstBattleEndingWhileInTown( INT16 sSectorX, INT16 sSectorY, INT16 b
|
||||
}
|
||||
|
||||
// if this is in fact a town and it is the first battle, then set gfFirstBattleMeanwhileScenePending true
|
||||
// if is true then this is the end of the second battle, post the first meanwhile OR, on call to trash world, that
|
||||
// if is true then this is the end of the second battle, post the first meanwhile OR, on call to trash world, that
|
||||
// means player is leaving sector
|
||||
|
||||
// grab sector value
|
||||
@@ -1357,6 +1346,7 @@ void HandleFirstMeanWhileSetUpWithTrashWorld( void )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user