sprite_simpledolphins.c

来自「ucgu最新版本 4.14」· C语言 代码 · 共 361 行 · 第 1/5 页

C
361
字号
/*********************************************************************
*                SEGGER MICROCONTROLLER SYSTEME GmbH                 *
*        Solutions for real time microcontroller applications        *
**********************************************************************
*                                                                    *
*        (c) 1996 - 2007  SEGGER Microcontroller Systeme GmbH        *
*                                                                    *
*        Internet: www.segger.com    Support:  support@segger.com    *
*                                                                    *
**********************************************************************

** emWin V4.14 - Graphical user interface for embedded applications **
emWin is protected by international copyright laws.   Knowledge of the
source code may not be used to write a similar product.  This file may
only be used in accordance with a license and should not be re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File        : SPRITE_SimpleDolphins.c
Purpose     : Shows how to use sprites
----------------------------------------------------------------------
*/

#include "GUI.h"
#include "LCDConf.h" /* Required for config check */

/*********************************************************************
*
*       Configuration check
*
**********************************************************************
*/
#if   (LCD_BITSPERPIXEL <= 8)
  #define REQUIRED_SIZE 14000
#elif (LCD_BITSPERPIXEL <= 16)
  #define REQUIRED_SIZE 28000
#else
  #define REQUIRED_SIZE 56000
#endif

#if (GUI_ALLOC_SIZE < REQUIRED_SIZE)
  #error This sample requires more RAM! Please increase GUI_ALLOC_SIZE in GUIConf.h!
#endif

/*********************************************************************
*
*       Types
*
**********************************************************************
*/
/*********************************************************************
*
*       SPRITE
*/
typedef struct {
  int xPos;                                 /* X-position of sprite */
  int yPos;                                 /* Y-position of sprite */
  int dx;                                   /* X-step */
  int dy;                                   /* Y-step */
  int NumImages;                            /* Number of images in apImages */
  GUI_CONST_STORAGE GUI_BITMAP ** apImages; /* Pointer to images */
  GUI_HSPRITE hSprite;                      /* Handle of sprite */
  int Index;                                /* Index of currently used bitmap */
} SPRITE;

/*********************************************************************
*
*       Static data
*
**********************************************************************
*/
/*********************************************************************
*
*       SeggerLogoLarge

⌨️ 快捷键说明

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