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

📄 main.cpp

📁 linux 下的 仿联众版俄罗斯方块游戏。qt3 实现。 具有 人机交互功能。 具有 对战模式。 喜欢玩俄罗斯方块的朋友们
💻 CPP
字号:
/*********************************************************************** * * *    linux版仿联众俄罗斯方块 v1.0 *    该软件在GPL(GNU通用公共许可证)下发布 * *    Copyright (C)   <codeky@126.com> * *   This source code is licensed under the GNU General Public License * ************************************************************************/#include <qapplication.h>#include <stdlib.h>#include <unistd.h>#include "qmainwidget.h"char curPath[PATH_MAX];int main( int argc, char **argv ){	QApplication app( argc, argv );	int rt = readlink("/proc/self/exe", curPath, PATH_MAX);	if(rt< 0||rt >=PATH_MAX){		rt =0;	}	curPath[rt] = '\0';	int pos = strlen(curPath)-1;	while(pos>=0){		if(curPath[pos]=='/'){			break;		}		pos--;	}	curPath[pos+1]='\0';	QMainWidget w;	app.setMainWidget( &w );	w.setCaption("linux-tetris -- Codekey@126.com");	w.show();	return app.exec();}

⌨️ 快捷键说明

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