mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Code for "new way to progress" (visiting sectors)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@843 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -55,6 +55,7 @@ STR16 wDebugStatStrings[]={
|
||||
|
||||
// local prototypes
|
||||
UINT8 CalcImportantSectorControl( void );
|
||||
UINT16 CountSurfaceSectorsVisited( void );
|
||||
|
||||
|
||||
|
||||
@@ -1254,6 +1255,7 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
UINT8 ubKillsPerPoint;
|
||||
UINT16 usKillsProgress;
|
||||
UINT16 usControlProgress;
|
||||
UINT16 usVisitProgress;
|
||||
|
||||
|
||||
if( gfEditMode )
|
||||
@@ -1323,6 +1325,13 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
// add control progress
|
||||
ubCurrentProgress += usControlProgress;
|
||||
|
||||
// WDS: Adding more ways to progress in the game
|
||||
// Get a ratio of sectors visited to the total number of sectors
|
||||
usVisitProgress = CountSurfaceSectorsVisited() * gGameExternalOptions.ubGameProgressPortionVisited / ((MAP_WORLD_X - 2) * (MAP_WORLD_Y - 2));
|
||||
|
||||
// add control progress
|
||||
ubCurrentProgress += usVisitProgress;
|
||||
|
||||
return(ubCurrentProgress);
|
||||
}
|
||||
|
||||
@@ -1574,6 +1583,26 @@ UINT8 CalcImportantSectorControl( void )
|
||||
}
|
||||
|
||||
|
||||
// WDS: Adding more ways to progress in the game
|
||||
// Count how many surface sectors the player has visited
|
||||
UINT16 CountSurfaceSectorsVisited( void )
|
||||
{
|
||||
UINT8 ubMapX, ubMapY;
|
||||
UINT16 ubSectorsVisited = 0;
|
||||
|
||||
|
||||
for ( ubMapX = 1; ubMapX < MAP_WORLD_X - 1; ubMapX++ )
|
||||
{
|
||||
for ( ubMapY = 1; ubMapY < MAP_WORLD_Y - 1; ubMapY++ )
|
||||
{
|
||||
if( GetSectorFlagStatus( ubMapX, ubMapY, 0, SF_ALREADY_VISITED ) == TRUE )
|
||||
++ubSectorsVisited;
|
||||
}
|
||||
}
|
||||
|
||||
return( ubSectorsVisited );
|
||||
}
|
||||
|
||||
void MERCMercWentUpALevelSendEmail( UINT8 ubMercMercIdValue )
|
||||
{
|
||||
UINT8 ubEmailOffset = 0;
|
||||
|
||||
Reference in New Issue
Block a user