Ejemplo n.º 1
0
int main(void)
{
    {
        setinitmode(INIT_ANIMATION);
        initgraph(LEN, WID);
        setcaption("碰撞小球");
        randomize();
    }
    int i;

    BALL ball[MAXBALL];

    for ( ; is_run(); delay_fps(60))
    {
        dealMouse(ball);

        for(i = 0; i < MAXBALL; ++i)
            ball[i].update();

        cleardevice();

        for(i = 0; i < MAXBALL; ++i)
            ball[i].drawball();

    }

    closegraph();
    return 0;
}
void main()
{
	
	initgraph(640, 480);
	setcaption("贪吃蛇游戏              作者;电子141丶赵磊");
	setfont(100,80,"宋体");
	xyprintf(90,100,"贪吃蛇");
	setfont(20,10,"宋体");
	xyprintf(90,350,"暂停:空格键                      方向:上 下 左 右");
	xyprintf(90,300,"按任意键开始游戏!!!               通关有奖励!!!");
	
	getch();
	closegraph();
	
	
	
	initgraph(640, 480);
	rectangle(10,10,500,470);
	
	gameplay();
	
	
	
	getch();
	closegraph();
}
Ejemplo n.º 3
0
int main()
{
    setinitmode(0);
    JigsawView view;
    view.init(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT);
    setrendermode(RENDER_MANUAL);
    setbkmode(TRANSPARENT);
    setcaption("SpriteGenerator V1.2 by wang yang");
    setfont(20, 10, "宋体");
    for(view.render(); is_run(); )
    {
        view.update();
        if(!view.getSmoothMode())
            delay_fps(60);
        else Sleep(1);
    }
    return 0;
}
Ejemplo n.º 4
0
void startInf()
{
	inf.screen_x=200;
	inf.screen_y=150;
	inf.CS_x = GetSystemMetrics(SM_CXSCREEN)-300;
	inf.CS_y = GetSystemMetrics(SM_CYSCREEN);
	setinitmode(INIT_TOPMOST|INIT_NOBORDER,inf.CS_x,0);
	initgraph(inf.screen_x,inf.screen_y);
	setcaption("easyNote");
	setbkmode(1);
	setbkcolor(YELLOW);
	setfont(20,0,"宋体");
	showmouse(0);
	th[0].num=0;
	inf.page=1;
	inf.box_y=20;
	inf.color_top=YELLOW;
	inf.color_btm=RGB(199,233,131);
	inf.mouse_speed=200;
}