📄 fbxmove_mask.c
字号:
/* fbxmove_mask.c - Tests the fb_move_object and fb_draw_masked_image functions. * * By Michael Bourgeous * * $Id: fbxmove_mask.c,v 1.2 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_mask.ppm"); for(radians = 0.0; radians < (PI * 64.0); radians += (PI / 128.0)) { fb_move_object(speed, radians, &x, &y); fb_draw_masked_image(object, fb_screen, (int)x, (int)y, object->width, object->height); speed = (sin(0.125 * radians) + 1.25); } fb_cleanup(); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -