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

📄 brutalfighting.c

📁 很好的韩国游戏
💻 C
📖 第 1 页 / 共 5 页
字号:
	if (NULL != pMe->m_pfhFile)
	{
		IFILE_Release(pMe->m_pfhFile);
		pMe->m_pfhFile = NULL;
	}
	if (SUCCESS == IFILEMGR_Test(pMe->m_pfmFileMgr, "record.dat"));
	{
		pMe->m_pfFile = IFILEMGR_OpenFile (pMe->m_pfmFileMgr, "record.dat", _OFM_READWRITE);
		IFILE_Write(pMe->m_pfFile, &pMe->istruHistory, sizeof(pMe->istruHistory));	
	}
	if(NULL != pMe->m_pfFile)
	{
		IFILE_Release(pMe->m_pfFile);
		pMe->m_pfFile = NULL;
	}
	if(NULL != pMe->m_pfmFileMgr)
	{
		IFILEMGR_Release(pMe->m_pfmFileMgr);
		pMe->m_pfmFileMgr = NULL;
	}
//	if (NULL != pMe->m_pISound) 
//	{
//		ISOUND_Release(pMe->m_pISound);
//		pMe->m_pISound = NULL;
// 	}
	if (NULL != pMe->m_pIMedia)
	{
		IMEDIA_Release(pMe->m_pIMedia);
		pMe->m_pIMedia = NULL;
	}
	if(NULL != pMe->pIGraphics)
	{
		IGRAPHICS_Release(pMe->pIGraphics);
		pMe->pIGraphics = NULL;
	}
	if (NULL != pMe->m_stMainMenu.m_pImgTitle)
	{
		IIMAGE_Release(pMe->m_stMainMenu.m_pImgTitle);
		pMe->m_stMainMenu.m_pImgTitle = NULL;
	}
	for (loop = 0 ;loop < 2;loop ++)
	{
		if (NULL != pMe->m_pImageMenu[loop])
		{
			IIMAGE_Release(pMe->m_pImageMenu[loop]);
			pMe->m_pImageMenu[loop] = NULL;
		}
		if (NULL != pMe->m_pImageNext[loop])
		{
			IIMAGE_Release(pMe->m_pImageNext[loop]);
			pMe->m_pImageNext[loop] = NULL;
		}
		if (NULL != pMe->m_pImagePrevious[loop])
		{
			IIMAGE_Release(pMe->m_pImagePrevious[loop]);
			pMe->m_pImagePrevious[loop] = NULL;
		}
	}
	if (NULL != pMe->m_pImageZero)
	{
		IIMAGE_Release(pMe->m_pImageZero);
		pMe->m_pImageZero = NULL;
	}
	for (loop = 0 ;loop < 3;loop++)
	{
		if (NULL != pMe->m_pImageDodge[loop])
		{
			IIMAGE_Release(pMe->m_pImageDodge[loop]);
			pMe->m_pImageDodge[loop] = NULL;
		}
		if (NULL != pMe->m_pImageUL[loop])
		{
			IIMAGE_Release(pMe->m_pImageUL[loop]);
			pMe->m_pImageUL[loop] = NULL;
		}
		if (NULL != pMe->m_pImageUR[loop])
		{
			IIMAGE_Release(pMe->m_pImageUR[loop]);
			pMe->m_pImageUR[loop] = NULL;
		}
		if (NULL != pMe->m_pImageNormal[loop])
		{
			IIMAGE_Release(pMe->m_pImageNormal[loop]);
			pMe->m_pImageNormal[loop] = NULL;
		}
	}
	
	if (NULL != pMe->m_pImageG1)
	{
		IIMAGE_Release(pMe->m_pImageG1);
		pMe->m_pImageG1 = NULL;
	}
	if (NULL != pMe->m_pImageGuardl)
	{
		IIMAGE_Release(pMe->m_pImageGuardl);
		pMe->m_pImageGuardl = NULL;
	}
	if (NULL != pMe->m_pImageGuardr)
	{
		IIMAGE_Release(pMe->m_pImageGuardr);
		pMe->m_pImageGuardr = NULL;
	}
	if (NULL != pMe->m_pImagePUL)
	{
		IIMAGE_Release(pMe->m_pImagePUL);
		pMe->m_pImagePUL = NULL;
	}
	if (NULL != pMe->m_pImagePUNCHL)
	{
		IIMAGE_Release(pMe->m_pImagePUNCHL);
		pMe->m_pImagePUNCHL = NULL;
	}
	if (NULL != pMe->m_pImagePUNCHR)
	{
		IIMAGE_Release(pMe->m_pImagePUNCHR);
		pMe->m_pImagePUNCHR = NULL;
	}
	if (NULL != pMe->m_pImagePUNCHU)
	{
		IIMAGE_Release(pMe->m_pImagePUNCHU);
		pMe->m_pImagePUNCHU = NULL;
	}
	if (NULL != pMe->m_pImagePUR)
	{
		IIMAGE_Release(pMe->m_pImagePUR);
		pMe->m_pImagePUR = NULL;
	}
	if (NULL != pMe->m_pImageSetupBG)
	{
		IIMAGE_Release(pMe->m_pImageSetupBG);
		pMe->m_pImageSetupBG = NULL;
	}
	if (NULL != pMe->m_pHtml)
	{
		IHTMLVIEWER_Release(pMe->m_pHtml);
		pMe->m_pHtml = NULL;
	}

	if (NULL != pMe->m_strSoundOFF)
	{
		FREE(pMe->m_strSoundOFF);
		pMe->m_strSoundOFF = NULL;
	}
	if (NULL != pMe->m_strSoundON)
	{
		FREE(pMe->m_strSoundON);
		pMe->m_strSoundON = NULL;
	}
	if (NULL != pMe->m_strVibractionOFF)
	{
		FREE(pMe->m_strVibractionOFF);
		pMe->m_strVibractionOFF = NULL;
	}
	if (NULL != pMe->m_strVibractionON)
	{
		FREE(pMe->m_strVibractionON);
		pMe->m_strVibractionON = NULL;
	}
	if (NULL != pMe->m_strStrength) 
	{
		FREE(pMe->m_strStrength);
		pMe->m_strStrength = NULL;
	}
	if (NULL != pMe->m_strFlee) 
	{
		FREE(pMe->m_strFlee);
		pMe->m_strFlee = NULL;
	}
	if (NULL != pMe->m_strRecord)
	{
		FREE(pMe->m_strRecord);
		pMe->m_strRecord = NULL;
	}
	if (NULL != pMe->m_strLevel) 
	{
		FREE(pMe->m_strLevel);
		pMe->m_strLevel = NULL;
	}
	if (NULL != pMe->m_strCoustom)
	{
		FREE(pMe->m_strCoustom);
		pMe->m_strCoustom = NULL;
	}
	if (NULL != pMe->m_strYouLost)
	{
		FREE(pMe->m_strYouLost);
		pMe->m_strYouLost = NULL;
	}
	if (NULL != pMe->m_strYouWin)
	{
		FREE(pMe->m_strYouWin);
		pMe->m_strYouWin = NULL; 
	}
	if (NULL != pMe->m_strHighScore)
	{
		FREE(pMe->m_strHighScore);
		pMe->m_strHighScore = NULL;
	}
	if (NULL != pMe->m_strColon) 
	{
		FREE(pMe->m_strColon);
		pMe->m_strColon = NULL;
	}
	if (NULL != pMe->m_strZero) 
	{
		FREE(pMe->m_strZero);
		pMe->m_strZero = NULL;
	}
	if (NULL != pMe->m_strTryAgain) 
	{
		FREE(pMe->m_strTryAgain);
		pMe->m_strTryAgain = NULL;
	}
	if (NULL != pMe->m_strDiagonal) 
	{
		FREE(pMe->m_strDiagonal);
		pMe->m_strDiagonal = NULL;
	}
	if (NULL != pMe->m_strC)
	{
		FREE(pMe->m_strC);
		pMe->m_strC = NULL;
	}
	if (NULL != pMe->m_strBuy)
	{
		FREE(pMe->m_strBuy);
		pMe->m_strBuy = NULL;
	}
	if (NULL != pMe->m_strBuy0)
	{
		FREE(pMe->m_strBuy0);
		pMe->m_strBuy0 = NULL;
	}
	if ( NULL != pMe->m_buff)
	{
		FREE(pMe->m_buff);
		pMe->m_buff = NULL;
	}
	if ( NULL != pMe->m_buff2)
	{
		FREE(pMe->m_buff2);
		pMe->m_buff = NULL;
	}
	if (NULL != pMe->m_pHtml)
	{
		IHTMLVIEWER_Release(pMe->m_pHtml);
	}
	if (NULL != pMe->m_pabout)
	{
		IHTMLVIEWER_Release(pMe->m_pabout);
	}
	if (NULL != pMe->szText)
	{
		FREE(pMe->m_pHtml);
		pMe->m_pHtml = NULL;
	}
	if (NULL != pMe->m_pILicense)
	{
		ILICENSE_Release(pMe->m_pILicense);
		pMe->m_pILicense = NULL;
	}
}
/****************************************************************************************
*	 Name				:   DrawStringC										
*	 Description		:	DrawText  Center									
*	 Parameter			:	AECHAR *Text			[IN]
*                           int y					[IN]
*                           BrutalFighting* pMe		[IN]						  			
*	 Return Value		:	NULL													
****************************************************************************************/
void DrawStringC(AECHAR *Text,int y,BrutalFighting* pMe)
{
	int length=0;
	length=IDISPLAY_MeasureText(pMe->pIDisplay,NULL,Text);
    IDISPLAY_DrawText(pMe->pIDisplay,AEE_FONT_NORMAL,Text,-1,pMe->DeviceInfo.cxScreen/2-length/2,y,NULL,IDF_TEXT_TRANSPARENT);
}
/****************************************************************************************
*	 Name				:   DrawStringL										
*	 Description		:	DrawText  Left									
*	 Parameter			:	AECHAR *Text			[IN]
*                           int y					[IN]
*                           BrutalFighting* pMe		[IN]						  			
*	 Return Value		:	NULL													
****************************************************************************************/
void DrawStringL(AECHAR *Text,int y, BrutalFighting* pMe)
{
	IDISPLAY_DrawText(pMe->pIDisplay,AEE_FONT_NORMAL,Text,-1,0,y+2,NULL,IDF_TEXT_TRANSPARENT);
}
/****************************************************************************************
*	 Name				:   DrawStringR										
*	 Description		:	DrawText  ritht									
*	 Parameter			:	AECHAR *Text			[IN]
*                           int x					[IN]
*                           BrutalFighting* pMe		[IN]						  			
*	 Return Value		:	NULL													
****************************************************************************************/
void DrawStringR(AECHAR *Text,int x,  BrutalFighting* pMe)
{
	int length = 0;
	length= IDISPLAY_MeasureText(pMe->pIDisplay,NULL,Text);
	IDISPLAY_DrawText(pMe->pIDisplay,AEE_FONT_NORMAL,Text,-1,pMe->DeviceInfo.cxScreen-length -4,x,NULL,IDF_TEXT_TRANSPARENT);
}
/****************************************************************************************
*	 Name				:   Main_Loop										
*	 Description		:	Main loop									
*	 Parameter			:   BrutalFighting* pMe		[IN]						  			
*	 Return Value		:	NULL													
****************************************************************************************/
void Main_Loop(BrutalFighting* pMe)
{
//	ISHELL_PostEvent(pMe->pIShell, AEECLSID_APPLET, EVT_APP_NO_SLEEP, 0, 0 );
	switch(pMe->m_emGameState)
	{
		case WIN_ID_MENU:
			BrutalFighting_MenuRender(pMe);
      		break;
		case WIN_ID_SETUP:
			BrutalFighting_SetUpRender(pMe);
			break;
		case WIN_ID_SELECT:
			Select_Enemy(pMe);
			BrutalFighting_SelectRender(pMe);

			break;
		case WIN_ID_GAME :
			PlayGame_Footwork(pMe);
			BrutalFighting_GameRender(pMe);	

			break;
		case WIN_ID_HIGHSCORE :
			BrutalFighting_RecordRender(pMe);

			break;
		case WIN_ID_STOP  :
			BrutalFighting_StopRender(pMe);

			break;
		case WIN_ID_NOSPACE  :
			NoSpaceRender(pMe);

			break;
		case WIN_ID_DEMO  :
			BrutalFighting_DemoRender(pMe);

			break;
		default:
		break;
	}
	
	IDISPLAY_Update(pMe->pIDisplay);
	/*if (pMe->m_bGameSound)
	{
		pMe->m_iSoundCount +=100;
	}*/
	
	ISHELL_SetTimerEx(pMe->pIShell , 150, &pMe->m_cbMainTimer);
}
/****************************************************************************************
*	 Name				:   Menu_HandleEvent									    	*
*	 Description		:	Handle events during in the WIN_ID_MENU status				*
*	 Parameter			:	BrutalFighting* pMe		[IN]                                *

⌨️ 快捷键说明

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