⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interfac.cpp

📁 赤壁之战(游戏原码)
💻 CPP
📖 第 1 页 / 共 5 页
字号:
	//fscanf( fp, "%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight );
	if( !sRight.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;

	////////////////////////////////////
	//		to preload system button
	////////////////////////////////////
// preload the bitmap
	// to preload the area block of main interface frame
	// to preload the command unit area block
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight));
	if( ! bmCommandArea.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;
	// to preload the prompt area block
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight));
	if( !bmPromptArea.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;
	// to preload the background of the command button when it show in prompt region
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight));
	if( ! bmButtonBackground.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;
	// to preload the background of the general head picture when it show in prompt region
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight));
	if( !bmGeneralBackground.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &OneBitmapWidth, &OneBitmapHeight, &nState));
	if( !FACE_GeneralFace.PreLoad( BitmapFileId, pShow.x, pShow.y, OneBitmapWidth, OneBitmapHeight) )
		return FALSE;
	FACE_GeneralFace.SetState(nState);

/////////////////////////////////////////////
//	process bar veriable
/////////////////////////////////////////////

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &FrameWidth, &ColorId));
	FACE_Stone.PreLoad( BitmapFileId, pShow.x, pShow.y, FrameWidth, ColorId );

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d",&BitmapFileId, &pShow.x, &pShow.y, &FrameWidth, &ColorId));
	FACE_Power.PreLoad( BitmapFileId, pShow.x, pShow.y, FrameWidth, ColorId );

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &FrameWidth, &ColorId));
	FACE_Blood.PreLoad( BitmapFileId, pShow.x, pShow.y, FrameWidth, ColorId );

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &FrameWidth, &ColorId));
	FACE_Process.PreLoad( BitmapFileId, pShow.x, pShow.y, FrameWidth, ColorId);
	
// to preload all bitmap on interface . eg : weather, time, wind ...
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nState));
	if( !tq.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	tq.SetState(nState);

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nState));
	if( !fx.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	fx.SetState(nState);

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nState));
	if( !sz.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	sz.SetState(nState);

//////////////////////////////////////////////////////////////////////////
//	to open the prompt information file for you to preload the prompt text
//////////////////////////////////////////////////////////////////////////
	// to open the prompt information file
	strcpy( pfname, "set\\prompt.exp" );
	FSCANP.scan_open (pfname);

// begin to set the prompt string
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID));
	if( !zt.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	zt.SetID(nID);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	zt.SetPromptString( PromptString );
	if( GAME_bNetwork == TRUE )
		zt.SetState( BUTTON_DISABLE ) ;
////////////////////////////////////////////
//	to preload the system menu button
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nWidth, &nHeight, &nID, &nState));
	if( !systemenu.PreLoad( BitmapFileId, pShow.x, pShow.y, nWidth, nHeight) )
		return FALSE;
	systemenu.SetID(nID);
	systemenu.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	systemenu.SetPromptString( PromptString );
/////////////////////////////////////////////
//		to preload the number button
////////////////////////////////////////////
	// to pre load the number arrow button
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_arr.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_arr.SetID(nID);
	num_arr.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_arr.SetPromptString( PromptString );
	/////////////////////////////////////////////////
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_01.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_01.SetID(nID);
	num_01.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_01.SetPromptString( PromptString );

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_02.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_02.SetID(nID);
	num_02.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_02.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_03.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_03.SetID(nID);
	num_03.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_03.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_04.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_04.SetID(nID);
	num_04.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_04.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_05.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_05.SetID(nID);
	num_05.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_05.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_06.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_06.SetID(nID);
	num_06.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_06.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_07.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_07.SetID(nID);
	num_07.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_07.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_08.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_08.SetID(nID);
	num_08.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_08.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_09.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_09.SetID(nID);
	num_09.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_09.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_10.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_10.SetID(nID);
	num_10.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_10.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_11.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_11.SetID(nID);
	num_11.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_11.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_12.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_12.SetID(nID);
	num_12.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_12.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_13.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_13.SetID(nID);
	num_13.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_13.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf, "%d%d%d%d%d",&BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_14.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_14.SetID(nID);
	num_14.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_14.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_15.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_15.SetID(nID);
	num_15.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_15.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_16.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_16.SetID(nID);
	num_16.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_16.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_17.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_17.SetID(nID);
	num_17.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_17.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_18.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_18.SetID(nID);
	num_18.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_18.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_19.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_19.SetID(nID);
	num_19.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_19.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d%d",&BitmapFileId, &pShow.x, &pShow.y, &nID, &nState));
	if( !num_20.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	num_20.SetID(nID);
	num_20.SetState(nState);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	num_20.SetPromptString( PromptString );

////////////////////////////////////////////
//		to preload the command button
////////////////////////////////////////////
//	to open the prompt.set file to read the prompt string for every command button

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID));
	if( !ml_Cancel.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	ml_Cancel.SetID(nID);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	ml_Cancel.SetPromptString( PromptString );

	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID));
	if( !ml_Move.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	ml_Move.SetID(nID);
	ml_Move.SetPromptString("go to hell");
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	ml_Move.SetPromptString( PromptString );
	
	FSCAN.l_scan(sscanf (FSCAN.expand_buf,"%d%d%d%d", &BitmapFileId, &pShow.x, &pShow.y, &nID));
	if( !ml_Attack.PreLoad( BitmapFileId, pShow.x, pShow.y) )
		return FALSE;
	ml_Attack.SetID(nID);
	FSCANP.l_scan(sscanf (FSCANP.expand_buf,"%s", PromptString ));
	ml_Attack.SetPromptString( PromptString );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -