摘要: void InitGraphMode(); //初始化图形驱动   void CloseGraphMode();   void Foot(int,int);   void Head(int,int);   void CreateFrame(); //完成整个游戏框架的绘制   void CreateSnake(); //创建一条两个节点的蛇,蛇的每一节是队列中的一个节点   bool PlayGame(); //游戏的主体函数,   int Hit(int,int); //判断是否越界,或者撞到自身,两个参数分别是新的头接点的x,y坐标   bool GameOver(); / 阅读全文
posted @ 2010-01-02 20:08 clara 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1.create file on floopy disk and write contents: -> pdev=fdDevCreate(0,0,0,0) /* A:,1.44M,whole disk,offset */ -> dosFsMkfs("/fd0",pdev) -> fd=creat("/fd0/myfile",2) or -> fp=fopen("/fd0/myfile","w") -> buf="what you want to write to file" -> write(fd,buf,strlen(buf)+1) or -> fprintf(fp,buf) -> close(fd) or -> fclose(fp) 阅读全文
posted @ 2010-01-02 19:01 clara 阅读(3151) 评论(0) 推荐(0) 编辑