ballfield.h
来自「一段linux 下用sdl显示3d精灵的小程序」· C头文件 代码 · 共 62 行
H
62 行
/* * "Ballfield" * * (C) David Olofson <david@olofson.net>, 2002 * * This software is released under the terms of the GPL. * * Contact author for permission if you want to use this * software, or work derived from it, under other terms. */#ifndef _BALLFIELD_H_#define _BALLFIELD_H_#include "SDL.h"/*---------------------------------------------------------- Definitions...----------------------------------------------------------*/#define BALLS 200#define COLORS 2typedef struct{ Sint32 x, y, z; /* Position */ Uint32 c; /* Color */} point_t;/* * Ballfield */typedef struct{ point_t points[BALLS]; SDL_Rect *frames; SDL_Surface *gfx[COLORS]; int use_alpha;} ballfield_t;/* * Size of the screen in pixels */#define SCREEN_W 320#define SCREEN_H 240/* * Size of the biggest ball image in pixels * * Balls are scaled down and *packed*, one pixel * smaller for each frame down to 1x1. The actual * image width is (obviously...) the same as the * width of the first frame. */#define BALL_W 32#define BALL_H 32#endif /* _BALLFIELD_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?