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

📄 ballfield.h

📁 一段linux 下用sdl显示3d精灵的小程序
💻 H
字号:
/* * "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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -