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

📄 main.cpp

📁 with vxworks we can develope a group of control software for industry.
💻 CPP
字号:
/*    BladeMaster 2, a text, rougelike(kinda), arena combat simulation game.   Copyright (C) 2002 Blademaster 2 Team, see CREDITS   Clone of BladeMaster by Logicom, Inc. Copyright(C) 1990/1993   In no means affliated with the original Blademaster or the original   Blademaster creators/programmers.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.      You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   Useful contact information:       Website: blademaster2.sourceforge.net       Project page: www.sf.net/projects/blademaster2/   Project Lead (see CREDITS for other members of the developement team)       E-Mail: ilswyn@users.sourceforge.net       AIM: ilswyn*/// Standard Libraries#include <ncurses.h> // Text library#include <time.h> // used for srand()#include <cstdlib> // srand()#include <string>// Custom Libraries#include "arena.h"#include "items.h"#include "players.h" // Contains player classes#include "shops.h"#include "globals.h"#include "main.h"#include "textgfx.h" // Graphical functions, menus, etc.// Contains all menu initialization and menu command processing#include "menus.h"int main(){  init_ncurses(); // Initialize ncurses  init(); // Initialize various things  srand(time(NULL)); // Seed rand() so it is really random  main_menu_loop(); // Start main menu  endwin(); // End ncurses mode}// Ncurses initializationvoid init_ncurses(){  initscr(); // Start curses mode  keypad(stdscr, TRUE); // Enables reading of directional keys  start_color(); // Enable color  noecho(); // Disable echoing by getch()  curs_set(0); // Invisible cursor  check_colors(); // Check if terminal is color-capable  // Color pairs  init_pair(1, COLOR_WHITE, COLOR_BLUE);  init_pair(2, COLOR_YELLOW, COLOR_BLUE);  init_pair(3, COLOR_CYAN, COLOR_BLUE);  init_pair(4, COLOR_WHITE, COLOR_BLACK);  init_pair(5, COLOR_GREEN, COLOR_BLUE);}void init(){  // Boundaries for the arena, so you cant walk out of the arena  arena_boundary.setPos_X(49);  arena_boundary.setPos_Y(16);}

⌨️ 快捷键说明

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