Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
GameEndWnd.c
Package: pfly523.rar [view]
Upload User: shyhai1508
Upload Date: 2007-06-11
Package Size: 48k
Code Size: 2k
Category:
BREW
Development Platform:
Visual C++
- #include "GameEndWnd.h"
- #include "pfly.h"
- #include "pfly_res.h"
- #include "commondef.h"
- #include "GameWnd.h"
- #include "ScoreListWnd.h"
- static void GameEndWnd_Update(GameEndWnd* pthis);
- static boolean GameEndWnd_HandleKeyEvent(GameEndWnd* pthis, AEEEvent eCode, uint16 wParam);
- boolean GameEndWnd_New(GameEndWnd *pthis, PflyApp* pMe)
- {
- pthis->pMe = pMe;
- return TRUE;
- }
- boolean GameEndWnd_Open(GameEndWnd *pthis)
- {
- pthis->isSucceed = ScoreListWnd_AddToList(&pthis->pMe->score, pthis->pMe->game.layer);
- GameEndWnd_Update(pthis);
- return TRUE;
- }
- void GameEndWnd_Close(GameEndWnd *pthis)
- {
- }
- boolean GameEndWnd_HandleEvent(GameEndWnd* pthis, AEEEvent eCode, uint16 wParam, uint32 dwParam)
- {
- switch (eCode) {
- case EVT_APP_SUSPEND:
- return TRUE;
- case EVT_APP_RESUME:
- GameEndWnd_Update(pthis);
- return TRUE;
- default:
- return GameEndWnd_HandleKeyEvent(pthis, eCode, wParam);
- }
- }
- void GameEndWnd_Free(GameEndWnd* pthis)
- {
- }
- static void GameEndWnd_Update(GameEndWnd* pthis)
- {
- IDisplay *m_pIDisplay = pthis->pMe->a.m_pIDisplay;
- IShell *m_pIShell = pthis->pMe->a.m_pIShell;
- AECHAR cat[MAX_STRING_SIZE];
- AECHAR str[MAX_STRING_SIZE];
- char temp[MAX_STRING_SIZE];
- IDISPLAY_ClearScreen(m_pIDisplay);
- IDISPLAY_FillRect(m_pIDisplay, NULL, MAKE_RGB(128,138,238));
- ISHELL_LoadResString(m_pIShell, PFLY_RES_FILE, IDS_HINTSTR, str, MAX_STRING_SIZE);
- SPRINTF(temp, "%d", pthis->pMe->game.layer);
- STRTOWSTR(temp, cat, MAX_STRING_SIZE);
- WSTRCAT(str, cat);
- IDISPLAY_DrawText(m_pIDisplay, AEE_FONT_NORMAL, str, -1, 0,
- 30, NULL, IDF_ALIGN_CENTER | IDF_TEXT_TRANSPARENT);
- if(pthis->isSucceed) {
- ISHELL_LoadResString(m_pIShell, PFLY_RES_FILE, IDS_SUCCSTR, str, MAX_STRING_SIZE);
- } else {
- ISHELL_LoadResString(m_pIShell, PFLY_RES_FILE, IDS_LOSTSTR, str, MAX_STRING_SIZE);
- }
- IDISPLAY_DrawText(m_pIDisplay, AEE_FONT_NORMAL, str, -1, 0,
- 70, NULL, IDF_ALIGN_CENTER | IDF_TEXT_TRANSPARENT);
- IDISPLAY_Update (m_pIDisplay);
- }
- static boolean GameEndWnd_HandleKeyEvent(GameEndWnd* pthis, AEEEvent eCode, uint16 wParam)
- {
- if( eCode == EVT_KEY) {
- switch(wParam) {
- case AVK_END:
- //此处不处理
- break;
- default:
- Pfly_SetActiveWnd(pthis->pMe, IDW_MAINMENU);
- return TRUE;
- }
- }
- return FALSE;
- }