登录
首页 » C/C++ » FlappyBird2

FlappyBird2

于 2019-06-17 发布
0 79
下载积分: 1 下载次数: 1

代码说明:

说明:  大致思路说说,就是在外部SRAM里面做了一个大数组[320][240]做了一帧缓冲,所有屏幕相关操作都是在这一帧上面实现的,使用DMA直接丢数据到FSMC接口上,比I/O快多了,然后就是资源的去背问题,所有的图片都是我从手机版上面截图下来的,然后背景色都是0X4DF9,然后因为jpg转换软件的关系,蓝色的背景色会有偏差所以直接判断把0x4df9不显示不可行,后来想到可以用RGB颜色来入手,虽然不是0x4df9但是还是蓝色,所以蓝色分量肯定比红色多,所以做了一个阈值判断(Roughly speaking, a large array [320] [240] is made in the external SRAM to do a frame buffer. All screen-related operations are implemented on this frame. Using DMA to drop data directly to the FSMC interface is much faster than I/O. Then it is the problem of resource backtracking. All the pictures are taken from the top of the mobile version, and then the background color is 0X4DF9. Later, because of the relationship between JPG conversion software, the blue background color will be biased, so it is not feasible to directly judge that 0x4df9 is not displayed. Later, I thought that RGB color can be used to start with. Although it is not 0x4df9, it is still blue, so the blue component must be more than red, so I made a threshold judgment, and then it is the transition between scene and scene.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104271会员总数
  • 57今日下载