mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix GetAllForticationGridNo (#259)
It was still returning gridnos as 16-bit integers.
This commit is contained in:
@@ -1717,10 +1717,10 @@ BOOLEAN TrackerTileHasAdjTile( const INT32& ubX, const INT32& ubY, const INT32&
|
|||||||
void CalculateFortify( )
|
void CalculateFortify( )
|
||||||
{
|
{
|
||||||
// simply get all fortified gridnos and colour them
|
// simply get all fortified gridnos and colour them
|
||||||
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > vec = GetAllForticationGridNo( );
|
auto vec = GetAllForticationGridNo();
|
||||||
|
|
||||||
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > >::iterator itend = vec.end( );
|
auto itend = vec.end();
|
||||||
for ( std::vector< std::pair<INT16, std::pair<UINT8, INT8> > >::iterator it = vec.begin( ); it != itend; ++it )
|
for (auto it = vec.begin(); it != itend; ++it)
|
||||||
{
|
{
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
ConvertGridNoToXY( (*it).first, &sX, &sY );
|
ConvertGridNoToXY( (*it).first, &sX, &sY );
|
||||||
|
|||||||
@@ -8713,9 +8713,9 @@ void AddFortificationPlanNode( INT32 sGridNo, INT8 sLevel, INT16 sFortificationS
|
|||||||
UpdateFortificationPossibleAmount();
|
UpdateFortificationPossibleAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > GetAllForticationGridNo( )
|
GetAllForticationGridNoResult GetAllForticationGridNo()
|
||||||
{
|
{
|
||||||
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > gridnovector;
|
GetAllForticationGridNoResult gridnovector;
|
||||||
|
|
||||||
if ( !gWorldSectorX || !gWorldSectorY )
|
if ( !gWorldSectorX || !gWorldSectorY )
|
||||||
return gridnovector;
|
return gridnovector;
|
||||||
|
|||||||
@@ -320,7 +320,8 @@ void AddFortificationPlanNode( INT32 sGridNo, INT8 sLevel, INT16 sFortificationS
|
|||||||
void LoadSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
|
void LoadSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
|
||||||
void SaveSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
|
void SaveSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
|
||||||
|
|
||||||
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > GetAllForticationGridNo( );
|
using GetAllForticationGridNoResult = std::vector< std::pair<INT32, std::pair<UINT8, INT8> > >;
|
||||||
|
GetAllForticationGridNoResult GetAllForticationGridNo();
|
||||||
|
|
||||||
INT32 GetFirstObjectInSectorPosition( UINT16 ausItem );
|
INT32 GetFirstObjectInSectorPosition( UINT16 ausItem );
|
||||||
|
|
||||||
@@ -334,4 +335,4 @@ BOOLEAN SpendMoney( SOLDIERTYPE *pSoldier, UINT32 aAmount ); // character spen
|
|||||||
// Flugente: intel
|
// Flugente: intel
|
||||||
void TakePhoto( SOLDIERTYPE* pSoldier, INT32 sGridNo, INT8 bLevel );
|
void TakePhoto( SOLDIERTYPE* pSoldier, INT32 sGridNo, INT8 bLevel );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user