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

📄 fbxmove.c

📁 libfxb是linux下只写操作framebuffer的一个轻量级的库。
💻 C
字号:
/* fbxmove.c - Tests the fb_move_object and fb_draw_image functions. * * By Michael Bourgeous * * $Id: fbxmove.c,v 1.10 2001/02/25 20:40:07 lethal Exp $ */#include <libfbx/libfbx.h>#include <math.h>#include <config.h>int main(){	float speed = 0.125;	float radians = 0.0;	float x = 160.0;	float y = 120.0;	fb_surface *object;	fb_init();	fb_handle_signals();	object = fb_load_ppm(IMAGEDIR "/smiley.ppm");	fb_cls();		for(radians = 0.0; radians < (PI * 64.0); radians += (PI / 512.0))	{		fb_move_object(speed, radians, &x, &y);		fb_draw_image(object, fb_screen, (int)x, (int)y);		speed = 0.1 * (sin(0.125 * radians) + 1.25);	}	fb_cleanup();	return 0;}

⌨️ 快捷键说明

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