Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 16 additions & 47 deletions Laptop/personnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5688,29 +5688,27 @@ BOOLEAN RenderAtmPanel( void )
UINT32 uiBox = 0;
HVOBJECT hHandle;

// just show basic panel
// bounding
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("LAPTOP\\AtmButtons.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &uiBox));

{
// just show basic panel
// bounding
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("LAPTOP\\AtmButtons.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &uiBox));
GetVideoObject(&hHandle, uiBox);
BltVideoObject(FRAME_BUFFER, hHandle, 0,( INT16 ) ( ATM_UL_X ), ( INT16 ) ( ATM_UL_Y ), VO_BLT_SRCTRANSPARENCY,NULL);

GetVideoObject(&hHandle, uiBox);
BltVideoObject(FRAME_BUFFER, hHandle, 0,( INT16 ) ( ATM_UL_X ), ( INT16 ) ( ATM_UL_Y ), VO_BLT_SRCTRANSPARENCY,NULL);
// blit it
GetVideoObject(&hHandle, uiBox);
BltVideoObject(FRAME_BUFFER, hHandle, 1,( INT16 ) ( ATM_UL_X + 1 ), ( INT16 ) ( ATM_UL_Y + 18), VO_BLT_SRCTRANSPARENCY,NULL);

// blit it
GetVideoObject(&hHandle, uiBox);
BltVideoObject(FRAME_BUFFER, hHandle, 1,( INT16 ) ( ATM_UL_X + 1 ), ( INT16 ) ( ATM_UL_Y + 18), VO_BLT_SRCTRANSPARENCY,NULL);

DeleteVideoObjectFromIndex( uiBox );

DeleteVideoObjectFromIndex( uiBox );
//DisplayAmountOnCurrentMerc( );

//DisplayAmountOnCurrentMerc( );
// create destroy
CreateDestroyStartATMButton( );

// create destroy
CreateDestroyStartATMButton( );
}
return( TRUE );
}

Expand All @@ -5720,22 +5718,6 @@ void CreateDestroyStartATMButton( void )

if( ( fCreated == FALSE ) && showPersonnelButtons )
{
// not created, must create

/*
// the ATM start button
giPersonnelATMStartButtonImage[ 0 ]= LoadButtonImage( "LAPTOP\\AtmButtons.sti" ,-1,2,-1,3,-1 );
giPersonnelATMStartButton[ 0 ] = QuickCreateButton( giPersonnelATMStartButtonImage[ 0 ] , 519,87,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)ATMStartButtonCallback );

// set text and what not
SpecifyButtonText( giPersonnelATMStartButton[ 0 ] ,gsAtmStartButtonText[ 0 ] );
SpecifyButtonUpTextColors( giPersonnelATMStartButton[ 0 ], FONT_BLACK, FONT_BLACK );
SpecifyButtonFont( giPersonnelATMStartButton[ 0 ], PERS_FONT );
SetButtonCursor(giPersonnelATMStartButton[ 0 ], CURSOR_LAPTOP_SCREEN);
*/

INT16 x = iScreenWidthOffset + 519;
INT16 y = iScreenHeightOffset + 74;

Expand Down Expand Up @@ -6014,36 +5996,23 @@ void UpDateStateOfStartButton( void )
ButtonList[giPersonnelATMStartButton[gubPersonnelInfoState]]->uiFlags |= BUTTON_CLICKED_ON;

// if in current mercs and the currently selected guy is valid, enable button, else disable it
if (fCurrentTeamMode)
if (fCurrentTeamMode && currentTeamIndex != -1)
{
// is the current guy valid
if (currentTeamIndex != -1)
{
for ( int i = 0; i < PERSONNEL_NUM_BTN; ++i )
EnableButton( giPersonnelATMStartButton[ i ] );

SoldierID iId = currentTeamList[currentTeamIndex];

if (iId != NOBODY)
if (iId != NOBODY && iId->bAssignment == ASSIGNMENT_POW )
{
if ( iId->bAssignment == ASSIGNMENT_POW )
{
DisableButton( giPersonnelATMStartButton[ PERSONNEL_INV_BTN ] );

if ( gubPersonnelInfoState == PERSONNEL_INV_BTN )
{
gubPersonnelInfoState = PERSONNEL_STAT_BTN;
fPausedReDrawScreenFlag = TRUE;
}
}
}
}
else
{
// not valid, disable
for ( int i = 0; i < PERSONNEL_NUM_BTN; ++i )
DisableButton( giPersonnelATMStartButton[ i ] );
}
}
else
{
Expand Down