用键盘控制地图左右移动

这是一个使用C++实现的程序,通过键盘控制地图在窗口中左右移动。程序使用了SexyAppBase库,图像加载和绘制功能,以及键盘事件处理来实现地图的滚动效果。源代码包括了一个主程序和一个自定义的Widget类,Widget类负责绘制和更新地图位置。
摘要由CSDN通过智能技术生成


源代码下载地址:

http://cid-620792b9d0909341.skydrive.live.com/self.aspx/.Public/src/%e7%94%a8%e9%94%ae%e7%9b%98%e6%8e%a7%e5%88%b6%e5%9c%b0%e5%9b%be%e5%b7%a6%e5%8f%b3%e7%a7%bb%e5%8a%a8.rar

 

 

//

// main.cpp

// 用键盘控制地图左右移动

 

#include <SexyAppBase.h>

#include <WidgetManager.h>

#include <ResourceManager.h>

#include <Widget.h>

#include <Image.h>

 

#define ASSERT(value) if (!(value)) { _asm{int 3};}

 

using   namespace       Sexy;

 

#pragma comment( lib, "winmm.lib" )

#pragma comment( lib, "wsock32.lib" )

 

#ifdef  _DEBUG

#pragma comment( lib, "SexyAppFramework_D.lib" )

#else

#pragma comment( lib, "SexyAppFramework.lib" )

#endif

 

 

const int Img_Width = 800;

const int Img_Hight = 2400;

 

const int LevelWidth = 700;

const int LevelHeight = 3000;

 

const int G_WINDOW_WIDTH = 550;

const int G_WINDOW_HEIGHT &#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值