Пример #1
0
void InitEditorRegions()
{
	INT32 x;

	//By doing this, all of the buttons underneath are blanketed and can't be used anymore.
	//Any new buttons will cover this up as well.  Think of it as a barrier between the editor buttons,
	//and the game's interface panel buttons and regions.
	MSYS_DefineRegion( &EditorRegion, 0, 360, 640, 480, MSYS_PRIORITY_NORMAL, 0, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );

	//Create the regions for the terrain tile selections
	for( x = 0; x < NUM_TERRAIN_TILE_REGIONS; x++ )
	{
		MSYS_DefineRegion(&TerrainTileButtonRegion[x],(INT16)(261+x*42),369,(INT16)(303+x*42),391,
			MSYS_PRIORITY_NORMAL, 0, MSYS_NO_CALLBACK,(MOUSE_CALLBACK)TerrainTileButtonRegionCallback);
		MSYS_SetRegionUserData( &TerrainTileButtonRegion[x], 0, x );
		MSYS_DisableRegion( &TerrainTileButtonRegion[x] );
	}
	gfShowTerrainTileButtons=FALSE;

	//Create the region for the items selection window.
	MSYS_DefineRegion( &ItemsRegion, 100, 360, 540, 440, MSYS_PRIORITY_NORMAL, 0, 
		(MOUSE_CALLBACK)MouseMovedInItemsRegion, (MOUSE_CALLBACK)MouseClickedInItemsRegion );
	MSYS_DisableRegion( &ItemsRegion );

	//Create the region for the merc inventory panel.
	MSYS_DefineRegion( &MercRegion, 175, 361, 450, 460, MSYS_PRIORITY_NORMAL, 0, 
		MouseMovedInMercRegion, MouseClickedInMercRegion );
	MSYS_DisableRegion( &MercRegion );
}
Пример #2
0
void DisableEditorRegion( INT8	bRegionID )
{
	switch( bRegionID )
	{
		case BASE_TERRAIN_TILE_REGION_ID:
		case 1: case 2: case 3: case 4: case 5: case 6: case 7:
			MSYS_DisableRegion( &TerrainTileButtonRegion[ bRegionID ] );
			break;
		case ITEM_REGION_ID:
			MSYS_DisableRegion( &ItemsRegion );
			break;
		case MERC_REGION_ID:
			MSYS_DisableRegion( &MercRegion );
			break;
	}
}
Пример #3
0
void
DropDownBase::Destroy_Drop()
{
	if( !mfMouseRegionsCreated_Drop )
		return;

	UINT8 i;
	for( i=0; i< DROPDOWN_REGIONS; ++i)
		MSYS_RemoveRegion( &mDropDownRegion[i]);
	
	//destroy the scroll bar arrow regions
	for( i=0; i< 2; ++i)
		MSYS_RemoveRegion( &mgSelectedUpDownArrowOnScrollAreaRegion[i]);

	//destroy the scroll bar regions
	for( i=0; i<DROPDOWN_REGIONS; ++i)
		MSYS_RemoveRegion( &mSelectedScrollAreaDropDownRegion[i]);

	//disable the close region
	MSYS_DisableRegion(&mSelectedCloseDropDownRegion);
	
	mfMouseRegionsCreated_Drop	= FALSE;

	SetRefresh();
}
Пример #4
0
void
DropDownBase::Create(UINT16 sX, UINT16 sY)
{
	Destroy();

	Init(sX, sY);

	VOBJECT_DESC	VObjectDesc;

	// Gold Arrow for the scroll area
	VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
	FilenameForBPP( "LAPTOP\\GoldArrows.sti", VObjectDesc.ImageFile );
	if ( !AddVideoObject( &VObjectDesc, &muiGoldArrowImages ) )
		return;

	gDropObj = (void*) this;
	
	MSYS_DefineRegion( &mSelectedOpenDropDownRegion, musStartX + musWidth, musStartY, musStartX + musWidth + musArrowWidth, musStartY + DEF_SCROLL_ARROW_HEIGHT, MSYS_PRIORITY_HIGH,
							CURSOR_WWW, MSYS_NO_CALLBACK, CallBackWrapper((void*) this, DROPDOWN_OPEN, &DropDownBase::Dummyfunc) );	
	MSYS_AddRegion(&mSelectedOpenDropDownRegion);

	//click anywhere on the screen to close the window( only when the drop down window is active)
	MSYS_DefineRegion( &mSelectedCloseDropDownRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y , LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
							CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, CallBackWrapper((void*) this, DROPDOWN_CLOSE, &DropDownBase::Dummyfunc) );
	MSYS_AddRegion(&mSelectedCloseDropDownRegion);
	MSYS_DisableRegion(&mSelectedCloseDropDownRegion);

	MSYS_DefineRegion( &mBubbleHelpRegion, musStartX, musStartY, musStartX + musWidth, musStartY + DEF_SCROLL_ARROW_HEIGHT, MSYS_PRIORITY_HIGH,
							CURSOR_WWW, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );	
	MSYS_AddRegion(&mBubbleHelpRegion);
			
	mfMouseRegionsCreated = TRUE;
}
Пример #5
0
void UpDateIMPMainPageButtons( void )
{
	// update mainpage button states
  INT32 iCount = 0;

	// disable all
  for( iCount = 2; iCount < 6; iCount++)
	{
		DisableButton( giIMPMainPageButton[ iCount ] );
	}

	for( iCount = 0; iCount < 4; iCount++ )
	{
		MSYS_DisableRegion( &pIMPMainPageMouseRegions[ iCount ]);
	}
	// enable 
  switch(  iCurrentProfileMode )
	{
		case 0:
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
		break;
		case( 1 ):
		 EnableButton( giIMPMainPageButton[2] );
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
		break;
		case( 2 ):
		  EnableButton( giIMPMainPageButton[3] );
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		  MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		  MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
		break;
		case( 3 ):
			EnableButton( giIMPMainPageButton[3] );
		  EnableButton( giIMPMainPageButton[4] );
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		  //MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		  MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);

		break;
		case( 4 ):
		 //MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		 MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		 EnableButton( giIMPMainPageButton[3] );
		 EnableButton( giIMPMainPageButton[4] );
	   EnableButton( giIMPMainPageButton[5] );
		break;
	}

	return;
}
Пример #6
0
void EnableDisableChatLogScrollButtonsAndRegions( void )
{
	UINT8 ubNumMessages;

	ubNumMessages = GetRangeOfChatLogMessages();

	// if no scrolling required, or already showing the topmost message
	if( ( ubNumMessages <= MAX_CHATLOG_MESSAGES ) || ( gubFirstChatLogMessageIndex == 0 ) )
	{
		DisableButton( guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_UP ] );
		ButtonList[ guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_UP ] ]->uiFlags &= ~( BUTTON_CLICKED_ON );
	}
	else
	{
		EnableButton( guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_UP ] );
	}

	// if no scrolling required, or already showing the last message
	if( ( ubNumMessages <= MAX_CHATLOG_MESSAGES ) ||
			( ( gubFirstChatLogMessageIndex + MAX_CHATLOG_MESSAGES ) >= ubNumMessages ) )
	{
		DisableButton( guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_DOWN ] );
		ButtonList[ guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_DOWN ] ]->uiFlags &= ~( BUTTON_CLICKED_ON );
	}
	else
	{
		EnableButton( guiChatLogScrollButtons[ CHAT_SCROLL_MESSAGE_DOWN ] );
	}

	if( ubNumMessages <= MAX_CHATLOG_MESSAGES )
	{
		MSYS_DisableRegion( &gChatLogScrollBarRegion );
	}
	else
	{
		MSYS_EnableRegion( &gChatLogScrollBarRegion );
	}

	if (cGameType==MP_TYPE_TEAMDEATMATCH)
	{
		// Only enable Allies toggle for team deathmatch
		EnableButton( guiChatToggles[1] );
	}
	else
	{
		gbChatSendToAll = true;
		DisableButton( guiChatToggles[1] );
	}
}
Пример #7
0
void EnableDisableMessageScrollButtonsAndRegions( void )
{
	UINT8 ubNumMessages;

  ubNumMessages = GetRangeOfMapScreenMessages();

	// if no scrolling required, or already showing the topmost message
	if( ( ubNumMessages <= MAX_MESSAGES_ON_MAP_BOTTOM ) || ( gubFirstMapscreenMessageIndex == 0 ) )
	{
		DisableButton( guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] );
		ButtonList[ guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] ]->uiFlags &= ~( BUTTON_CLICKED_ON );
	}
	else
	{
		EnableButton( guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] );
	}

	// if no scrolling required, or already showing the last message
	if( ( ubNumMessages <= MAX_MESSAGES_ON_MAP_BOTTOM ) ||
			( ( gubFirstMapscreenMessageIndex + MAX_MESSAGES_ON_MAP_BOTTOM ) >= ubNumMessages ) )
	{
		DisableButton( guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] );
		ButtonList[ guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] ]->uiFlags &= ~( BUTTON_CLICKED_ON );
	}
	else
	{
		EnableButton( guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] );
	}

	if( ubNumMessages <= MAX_MESSAGES_ON_MAP_BOTTOM )
	{
		MSYS_DisableRegion( &gMapMessageScrollBarRegion );
	}
	else
	{
		MSYS_EnableRegion( &gMapMessageScrollBarRegion );
	}
}
Пример #8
0
void InitPopupMenu( INT32 iButtonID, UINT8 ubPopupMenuID, UINT8 ubDirection )
{
	UINT16 usX, usY;
	UINT16 usMenuHeight;
	UINT16 usMenuWidth = 0;
	UINT16 usCurrStrWidth;
	UINT8 ubColumn, ubEntry;
	UINT8 ubCounter;
	GUI_BUTTON *button;
	//calculate the location of the menu based on the button position.
	//This also calculates the menu's direction based on position.

	gPopup.usFont = (UINT16)SMALLFONT1;
	gusEntryHeight = GetFontHeight( gPopup.usFont );

	button = ButtonList[ iButtonID ];
	MSYS_DisableRegion( &gBottomPanalRegion );

	switch( ubDirection )
	{
		case DIR_UPRIGHT:
			usX = button->Area.RegionTopLeftX;
			usY = button->Area.RegionTopLeftY;
			break;
		case DIR_UPLEFT:
			usX = button->Area.RegionBottomRightX;
			usY = button->Area.RegionTopLeftY;
			break;
		case DIR_DOWNRIGHT:
			usX = button->Area.RegionTopLeftX;
			usY = button->Area.RegionBottomRightY;
			break;
		case DIR_DOWNLEFT:
			usX = button->Area.RegionBottomRightX;
			usY = button->Area.RegionBottomRightY;
			break;
	}

	//Decipher the popupMenuID
	switch( ubPopupMenuID )
	{
		case CHANGETSET_POPUP:	//change tileset
			gPopup.ubNumEntries = NUM_TILESETS;
			break;
		case OWNERSHIPGROUP_POPUP:
		case CHANGECIVGROUP_POPUP:
			gPopup.ubNumEntries = NUM_CIV_GROUPS;
			break;
		case SCHEDULEACTION_POPUP:
			gPopup.ubNumEntries = NUM_SCHEDULE_ACTIONS;
			break;
		case ACTIONITEM_POPUP:
			gPopup.ubNumEntries = NUM_ACTIONITEMS;
			break;
		default:
			return;
	}

	gPopup.usFont = (UINT16)SMALLFONT1;
	gusEntryHeight = GetFontHeight( gPopup.usFont );

	button = ButtonList[ iButtonID ];
	MSYS_DisableRegion( &gBottomPanalRegion );

	gPopup.ubPopupMenuID = ubPopupMenuID;
	gPopup.ubSelectedIndex = 0;
	gPopup.ubActiveType = POPUP_ACTIVETYPE_NOT_YET_DETERMINED;
	gPopup.fActive = TRUE;
	fWaitingForLButtonRelease = FALSE;
	gPopup.fUseKeyboardInfoUntilMouseMoves = FALSE;
	//Initialize the last mouse position to be out of bounds.
	gPopup.usLastMouseX = 1000;
	gPopup.usLastMouseY = 1000;
	//clear the column widths.
	for( ubColumn = 0; ubColumn < MAX_COLUMNS; ubColumn++ )
		gPopup.ubColumnWidth[ ubColumn ] = 0;

	//1) Calc total entry height of the popup region.
	gPopup.ubColumns = 1;
	gPopup.ubMaxEntriesPerColumn = gPopup.ubNumEntries;
	usMenuHeight = gPopup.ubNumEntries * gusEntryHeight + 3;
	while( usMenuHeight >= usY && ( ubDirection == DIR_UPLEFT || ubDirection == DIR_UPRIGHT ) ||
				 480-usMenuHeight >= usY && ( ubDirection == DIR_DOWNLEFT || ubDirection == DIR_DOWNRIGHT ) )
	{ //menu has too many entries.  Increase the number of columns until the height is
		//less than the max height.
		gPopup.ubMaxEntriesPerColumn = (gPopup.ubNumEntries+gPopup.ubColumns)/(gPopup.ubColumns+1);
		usMenuHeight = gPopup.ubMaxEntriesPerColumn * gusEntryHeight + 3;
		gPopup.ubColumns++;
	}
	//now we have the number of columns as well as the max number of entries per column, and
	//the total menu height.  

	//We now calculate the total width of the menu as well as the max width of each column.
	ubCounter = 0;
	usMenuWidth = 0;
	for( ubColumn = 0; ubColumn < gPopup.ubColumns; ubColumn++ )
	{
		for( ubEntry = 0; ubEntry < gPopup.ubMaxEntriesPerColumn; ubEntry++ )
		{
			if( ubCounter >= gPopup.ubNumEntries )
				break; //done (don't want to process undefined entries...)
			usCurrStrWidth = 16 + StringPixLength( GetPopupMenuString( ubCounter ) , gPopup.usFont );
			if( usCurrStrWidth > gPopup.ubColumnWidth[ ubColumn ] )
			{
				gPopup.ubColumnWidth[ ubColumn ] = (UINT8)usCurrStrWidth;
			}
			ubCounter++;
		}
		usMenuWidth += gPopup.ubColumnWidth[ ubColumn ];
	}
	
	//Calculate popup menu boundaries based on direction from argument point.
	switch( ubDirection )
	{
		case DIR_UPRIGHT:
			gPopup.usLeft = usX;
			gPopup.usTop = usY - usMenuHeight - 1;
			gPopup.usRight = usX + usMenuWidth;
			gPopup.usBottom = usY - 1;
			break;
		case DIR_UPLEFT:
			gPopup.usLeft = usX - usMenuWidth;
			gPopup.usTop = usY - usMenuHeight - 1; 
			gPopup.usRight = usX; 
			gPopup.usBottom = usY - 1;
			break;
		case DIR_DOWNRIGHT:
			gPopup.usLeft = usX;
			gPopup.usTop = usY + 1;
			gPopup.usRight = usX + usMenuWidth;
			gPopup.usBottom = usY + usMenuHeight + 1;
			break;
		case DIR_DOWNLEFT:
			gPopup.usLeft = usX - usMenuWidth;
			gPopup.usTop = usY + 1; 
			gPopup.usRight = usX; 
			gPopup.usBottom = usY + usMenuHeight + 1;
			break;
	}
	MSYS_DefineRegion( &popupRegion, 0, 0, 640, 480, MSYS_PRIORITY_HIGHEST,
						 CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK ); 

	RenderPopupMenu();
}
Пример #9
0
void UpDateIMPMainPageButtons( void )
{
	// update mainpage button states
	INT32 iCount = 0;

	// disable all
	for( iCount = 2; iCount < 6; iCount++)
	{
		DisableButton( giIMPMainPageButton[ iCount ] );
	}

	for( iCount = 0; iCount < 4; iCount++ )
	{
		MSYS_DisableRegion( &pIMPMainPageMouseRegions[ iCount ]);
	}
	// enable
	switch(	iCurrentProfileMode )
	{
		//begin
		case IMP__REGISTRY:
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
		break;

		//Personality ( 3RD BUTTON )
		case IMP__PERSONALITY:
			EnableButton( giIMPMainPageButton[2] );
			EnableButton( giIMPMainPageButton[4] );
			EnableButton( giIMPMainPageButton[5] );

//			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
//			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
		EnableButton( giIMPMainPageButton[2] );
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
		break;

		//Attributes ( 4th button )
		case IMP__ATTRIBUTES:
			EnableButton( giIMPMainPageButton[2] );
			EnableButton( giIMPMainPageButton[4] );
			EnableButton( giIMPMainPageButton[5] );
		EnableButton( giIMPMainPageButton[3] );

//			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
//		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
//		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
/*
		EnableButton( giIMPMainPageButton[3] );
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
		break;

		//Portrait ( ist button
		case IMP__PORTRAIT:
//			EnableButton( giIMPMainPageButton[3] );
		EnableButton( giIMPMainPageButton[4] );
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
			EnableButton( giIMPMainPageButton[3] );
		EnableButton( giIMPMainPageButton[4] );
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
		break;

		//Voice ( 2nd button )
		case IMP__VOICE:
			EnableButton( giIMPMainPageButton[4] );
			EnableButton( giIMPMainPageButton[5] );

//			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
			MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
		//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
		MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
		EnableButton( giIMPMainPageButton[3] );
		EnableButton( giIMPMainPageButton[4] );
	EnableButton( giIMPMainPageButton[5] );
*/
		break;
	}

	return;
}
Пример #10
0
void HandleAdAndWarningArea( BOOLEAN fInit, BOOLEAN fRedraw )
{
	static UINT8 ubPreviousAdvertisment;

	if( fInit )
		gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
	else
	{
		if( ubPreviousAdvertisment == AIM_AD_DONE )
		{
			gubCurrentAdvertisment = GetNextAimAd( gubCurrentAdvertisment );

			fInit = TRUE;

/*
			UINT32	uiDay = GetWorldDay();
			BOOLEAN	fSkip=FALSE;
			gubCurrentAdvertisment++;

			//if the add should be for Bobby rays
			if( gubCurrentAdvertisment == AIM_AD_BOBBY_RAY_AD )
			{
				//if the player has NOT ever been to drassen
				if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
				{
					//advance to the next add
					gubCurrentAdvertisment++;
				}
				else
				{
					fSkip = TRUE;
					fInit = TRUE;
				}
			}
			else
				fSkip = FALSE;


			if( !fSkip )
			{
				//if the current ad is not supposed to be available, loop back to the first ad
				switch( gubCurrentAdvertisment )
				{
					case AIM_AD_FUNERAL_ADS:
						if( uiDay < AIM_AD_DAY_FUNERAL_AD_STARTS )
							gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
						break;

					case AIM_AD_FLOWER_SHOP:
						if( uiDay < AIM_AD_DAY_FLOWER_AD_STARTS )
							gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
						break;

					case AIM_AD_INSURANCE_AD:
						if( uiDay < AIM_AD_DAY_INSURANCE_AD_STARTS )
							gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
						break;
				}
				fInit = TRUE;
			}
*/
		}

		if( gubCurrentAdvertisment >= AIM_AD_LAST_AD)
		{
			gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
		}
	}

	switch( gubCurrentAdvertisment )
	{
		case 	AIM_AD_WARNING_BOX:
			MSYS_DisableRegion(&gSelectedBannerRegion); 
			ubPreviousAdvertisment = DrawWarningBox( fInit, fRedraw );
			break;

		case AIM_AD_FLOWER_SHOP:
			ubPreviousAdvertisment = DisplayFlowerAd( fInit, fRedraw );
			break;

		case AIM_AD_FOR_ADS:
			// disable the region because only certain banners will be 'clickable'
			MSYS_DisableRegion(&gSelectedBannerRegion); 
			ubPreviousAdvertisment = DisplayAd( fInit, fRedraw, AIM_AD_FOR_ADS_DELAY, AIM_AD_FOR_ADS__NUM_SUBIMAGES, guiAdForAdsImages );
			break;

		case AIM_AD_INSURANCE_AD:
		  MSYS_EnableRegion(&gSelectedBannerRegion);
			ubPreviousAdvertisment = DisplayAd( fInit, fRedraw, AIM_AD_INSURANCE_AD_DELAY, AIM_AD_INSURANCE_AD__NUM_SUBIMAGES, guiInsuranceAdImages );
			break;

		case AIM_AD_FUNERAL_ADS:
		  MSYS_EnableRegion(&gSelectedBannerRegion);
			ubPreviousAdvertisment = DisplayAd( fInit, fRedraw, AIM_AD_FUNERAL_AD_DELAY, AIM_AD_FUNERAL_AD__NUM_SUBIMAGES, guiFuneralAdImages );
			break;

/*
JA25  No Bobbyr in exp
		case AIM_AD_BOBBY_RAY_AD:
		  MSYS_EnableRegion(&gSelectedBannerRegion);
			ubPreviousAdvertisment = DisplayBobbyRAd( fInit, fRedraw );		
			break;
*/
	}
}
Пример #11
0
BOOLEAN EnterAIM()
{
  VOBJECT_DESC    VObjectDesc;

	gubWarningTimer = 0;
	gubCurrentAdvertisment = AIM_AD_WARNING_BOX;
	LaptopInitAim();

	InitAimDefaults();

	// load the MemberShipcard graphic and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	FilenameForBPP("LAPTOP\\membercard.sti", VObjectDesc.ImageFile);
	CHECKF(AddVideoObject(&VObjectDesc, &guiMemberCard));

	// load the Policies graphic and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	FilenameForBPP("LAPTOP\\Policies.sti", VObjectDesc.ImageFile);
	CHECKF(AddVideoObject(&VObjectDesc, &guiPolicies));

	// load the Links graphic and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	FilenameForBPP("LAPTOP\\Links.sti", VObjectDesc.ImageFile);
	CHECKF(AddVideoObject(&VObjectDesc, &guiLinks));

	// load the History graphic and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_HISTORY );
	CHECKF(AddVideoObject(&VObjectDesc, &guiHistory));

	// load the Wanring graphic and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_WARNING );
	CHECKF(AddVideoObject(&VObjectDesc, &guiWarning));

	// load the flower advertisment and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	FilenameForBPP("LAPTOP\\flowerad_16.sti", VObjectDesc.ImageFile);
	CHECKF(AddVideoObject(&VObjectDesc, &guiFlowerAdvertisement));

	// load the your ad advertisment and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_YOURAD13 );
	CHECKF(AddVideoObject(&VObjectDesc, &guiAdForAdsImages));

	// load the insurance advertisment and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_INSURANCEAD10 );
	CHECKF(AddVideoObject(&VObjectDesc, &guiInsuranceAdImages));

	// load the funeral advertisment and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_FUNERALAD9 );
	CHECKF(AddVideoObject(&VObjectDesc, &guiFuneralAdImages));

/*
JA25  No Bobbyr in exp
	// load the funeral advertisment and add it
	VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
	GetMLGFilename( VObjectDesc.ImageFile, MLG_BOBBYRAYAD21 );
	CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRAdImages ));
*/
	

	//** Mouse Regions **

	//Mouse region for the MebershipCard
	MSYS_DefineRegion( &gSelectedMemberCardRegion, MEMBERCARD_X, MEMBERCARD_Y , (MEMBERCARD_X + LINK_SIZE_X), (MEMBERCARD_Y + LINK_SIZE_Y), MSYS_PRIORITY_HIGH,
							 CURSOR_WWW, MSYS_NO_CALLBACK, SelectMemberCardRegionCallBack ); 
  MSYS_AddRegion(&gSelectedMemberCardRegion); 

	//Mouse region for the Policies
	MSYS_DefineRegion( &gSelectedPoliciesRegion, POLICIES_X, POLICIES_Y , (POLICIES_X + LINK_SIZE_X), (POLICIES_Y + LINK_SIZE_Y), MSYS_PRIORITY_HIGH,
							 CURSOR_WWW, MSYS_NO_CALLBACK, SelectPoliciesRegionCallBack ); 
  MSYS_AddRegion(&gSelectedPoliciesRegion); 

	//Mouse region for the History
	MSYS_DefineRegion( &gSelectedHistoryRegion, HISTORY_X, HISTORY_Y , (HISTORY_X + LINK_SIZE_X), (HISTORY_Y + LINK_SIZE_Y), MSYS_PRIORITY_HIGH,
							 CURSOR_WWW, MSYS_NO_CALLBACK, SelectHistoryRegionCallBack ); 
  MSYS_AddRegion(&gSelectedHistoryRegion); 

	//Mouse region for the Links
	MSYS_DefineRegion( &gSelectedLinksRegion, LINKS_X, LINKS_Y , (LINKS_X + LINK_SIZE_X), (LINKS_Y + LINK_SIZE_Y), MSYS_PRIORITY_HIGH,
							 CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinksRegionCallBack ); 
  MSYS_AddRegion(&gSelectedLinksRegion); 

	//Mouse region for the Links
	MSYS_DefineRegion( &gSelectedBannerRegion, AIM_AD_TOP_LEFT_X, AIM_AD_TOP_LEFT_Y, AIM_AD_BOTTOM_RIGHT_X, AIM_AD_BOTTOM_RIGHT_Y, MSYS_PRIORITY_HIGH,
							 CURSOR_WWW, MSYS_NO_CALLBACK, SelectBannerRegionCallBack); 
  MSYS_AddRegion(&gSelectedBannerRegion); 

	// disable the region because only certain banners will be 'clickable'
  MSYS_DisableRegion(&gSelectedBannerRegion); 

	gubAimMenuButtonDown=255;

	fFirstTimeIn = FALSE;
	RenderAIM();

	return( TRUE );
}