mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
remove now unused functions
we use a single function to turn a number into a money formatted string now
This commit is contained in:
committed by
majcosta
parent
1088ffc5b2
commit
049981b35f
@@ -1910,96 +1910,6 @@ BOOLEAN LoadInRecords( UINT32 uiPage )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
void InsertCommasForDollarFigure( STR16 pString )
|
|
||||||
{
|
|
||||||
INT16 sCounter =0;
|
|
||||||
INT16 sZeroCount =0;
|
|
||||||
INT16 sTempCounter = 0;
|
|
||||||
INT16 sEndPosition = 0;
|
|
||||||
|
|
||||||
// go to end of dollar figure
|
|
||||||
while( pString[ sCounter ] != 0 )
|
|
||||||
{
|
|
||||||
sCounter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// negative?
|
|
||||||
if( pString[0] == '-' )
|
|
||||||
{
|
|
||||||
// stop one slot in advance of normal
|
|
||||||
sEndPosition = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// is there under $1,000?
|
|
||||||
if( sCounter < 4 )
|
|
||||||
{
|
|
||||||
// can't do anything, return
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// at end, start backing up until beginning
|
|
||||||
while( sCounter > sEndPosition )
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
// enough for a comma?
|
|
||||||
if( sZeroCount==3 )
|
|
||||||
{
|
|
||||||
// reset count
|
|
||||||
sZeroCount =0;
|
|
||||||
// set tempcounter to current counter
|
|
||||||
sTempCounter = sCounter;
|
|
||||||
|
|
||||||
// run until end
|
|
||||||
while( pString[ sTempCounter ] != 0 )
|
|
||||||
{
|
|
||||||
sTempCounter++;
|
|
||||||
}
|
|
||||||
// now shift everything over ot the right one place until sTempCounter = sCounter
|
|
||||||
while( sTempCounter >= sCounter )
|
|
||||||
{
|
|
||||||
pString[ sTempCounter+1 ] = pString[ sTempCounter ];
|
|
||||||
sTempCounter--;
|
|
||||||
}
|
|
||||||
// now insert comma
|
|
||||||
pString[ sCounter ]=L',';
|
|
||||||
}
|
|
||||||
|
|
||||||
// increment count of digits
|
|
||||||
sZeroCount++;
|
|
||||||
|
|
||||||
// decrement counter
|
|
||||||
sCounter--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void InsertDollarSignInToString( STR16 pString )
|
|
||||||
{
|
|
||||||
// run to end of string, copy everything in string 2 places right, insert a space at pString[ 1 ] and a L'$' at pString[ 0 ]
|
|
||||||
|
|
||||||
INT32 iCounter =0;
|
|
||||||
|
|
||||||
// run to end of string
|
|
||||||
while( pString[ iCounter ] != 0 )
|
|
||||||
{
|
|
||||||
iCounter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// now copy over
|
|
||||||
while( iCounter >= 0 )
|
|
||||||
{
|
|
||||||
pString[ iCounter + 1] = pString[ iCounter ];
|
|
||||||
iCounter--;
|
|
||||||
}
|
|
||||||
|
|
||||||
pString[ 0 ] = L'$';
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 GetPreviousBalanceToDate( void )
|
INT32 GetPreviousBalanceToDate( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ typedef struct finance *FinanceUnitPtr;
|
|||||||
extern FinanceUnitPtr pFinanceListHead;
|
extern FinanceUnitPtr pFinanceListHead;
|
||||||
//extern INT32 iCurrentBalance;
|
//extern INT32 iCurrentBalance;
|
||||||
UINT32 AddTransactionToPlayersBook(UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiDate, INT32 iAmount);
|
UINT32 AddTransactionToPlayersBook(UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiDate, INT32 iAmount);
|
||||||
void InsertDollarSignInToString( STR16 pString );
|
|
||||||
void InsertCommasForDollarFigure( STR16 pString );
|
|
||||||
INT32 GetTodaysDaysIncome( void );
|
INT32 GetTodaysDaysIncome( void );
|
||||||
INT32 GetProjectedTotalDailyIncome( void );
|
INT32 GetProjectedTotalDailyIncome( void );
|
||||||
INT32 GetProjectedExpenses( void ); // HEADROCK HAM 3.6: Projected daily expenses.
|
INT32 GetProjectedExpenses( void ); // HEADROCK HAM 3.6: Projected daily expenses.
|
||||||
|
|||||||
Reference in New Issue
Block a user