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

📄 alpha.cpp

📁 手机游戏绘图类
💻 CPP
字号:
 //////////////////////////////////////////////////////////////////////////////
//
// PocketFrog - The Game Library for Pocket PC Devices
// Copyright 2002  Thierry Tremblay
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all copies and
// that both that copyright notice and this permission notice appear
// in supporting documentation.  Thierry Tremblay makes no representations
// about the suitability of this software for any purpose.
// It is provided "as is" without express or implied warranty.
//
//////////////////////////////////////////////////////////////////////////////

#include "alpha.h"
#include "resource.h"

using namespace Frog;


//////////////////////////////////////////////////////////////////////////////
//
// _Module : This is needed to use ATL Windows
//
//////////////////////////////////////////////////////////////////////////////

CComModule _Module;


//////////////////////////////////////////////////////////////////////////////
//
// alphaSample
//
//////////////////////////////////////////////////////////////////////////////

alphaSample::alphaSample()
{
    m_config.szWindowName = _T("Alpha Sample");
    m_config.orientation  = ORIENTATION_NORMAL;
}


bool alphaSample::GameInit() { 
	Display* display = GetDisplay();
    display->Clear(0);
    m_picture = LoadImage(display, IDB_PICTURE); 
	this->fadeValue = 0;
  return true;
}


void alphaSample::GameEnd() {
	delete m_picture;
}


void alphaSample::GameLoop() {
	Display* display = GetDisplay();
	display->SetBlending(this->fadeValue);
  display->Blit(0, 0, m_picture); 
#if defined(FROG_HPC)
    display->Blit(320, 0, m_picture);
#endif
	display->Update();
	Sleep(10);
	if (this->fadeValue < 255) { 
		this->fadeValue++;
	}
}


void alphaSample::StylusUp(Point stylus) {
	this->GameEnd();
}


//////////////////////////////////////////////////////////////////////////////
//
// WinMain - Entry point
//
//////////////////////////////////////////////////////////////////////////////

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int) {
	_Module.Init(0, hInstance); 
  alphaSample game;
  game.Run();
  return 0;
}

⌨️ 快捷键说明

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