• 大小: 10.66MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-16
  • 语言: C/C++
  • 标签: 三维地形  

资源简介

Visual C++开开发的本维地形显示代码,

资源截图

代码片段和文件信息

/*
 * MegaMek - Copyright (C) 2005 2006 Ben Mazur (bmazur@sev.org)
 *
 *  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.
 */

package megamek;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Properties;
import java.util.Vector;

import megamek.client.ui.IMegaMekGUI;
import megamek.common.preference.PreferenceManager;
import megamek.common.util.AbstractCommandLineParser;
import megamek.server.DedicatedServer;

/**
 * @author mev
 *
 */
public class MegaMek {

    public static String VERSION = “0.32.0“; //$NON-NLS-1$

    public static long TIMESTAMP = new File(PreferenceManager.getClientPreferences().getLogDirectory() + File.separator + “timestamp“).lastModified(); //$NON-NLS-1$

    private static final NumberFormat commafy = NumberFormat.getInstance();

    private static final String INCORRECT_ARGUMENTS_MESSAGE = “Incorrect arguments:“;

    private static final String ARGUMENTS_DEscriptION_MESSAGE = “Arguments syntax:\n\t MegaMek [-log ] [(-gui )|(-dedicated)] []“;

    private static final String UNKNOWN_GUI_MESSAGE = “Unknown GUI:“;

    private static final String GUI_CLASS_NOT_FOUND_MESSAGE = “Couldn‘t find the GUI Class:“;

    private static final String DEFAULT_LOG_FILE_NAME = “megameklog.txt“; //$NON-NLS-1$

    private static String PROPERTIES_FILE = “megamek/MegaMek.properties“;


    public static void main(String[] args) {

        String logFileName = DEFAULT_LOG_FILE_NAME;

        CommandLineParser cp = new CommandLineParser(args);

        try {
            cp.parse(); 
            String lf = cp.getLogFilename(); 
            if (lf != null ) {
                if (lf.equals(“none“) || lf.equals(“off“)) { //$NON-NLS-1$ //$NON-NLS-2$
                    logFileName = null;
                } else {
                    logFileName = lf;
                }
            }

            // Redirect output to logfiles unless turned off.
            if (logFileName != null) {
                redirectOutput(logFileName);
            }

            showInfo();

            String[] restArgs = cp.getRestArgs();
            if (cp.dedicatedServer()) {
                startDedicatedServer(restArgs);
            } else {
                String interfaceName = cp.getGuiName();
                if (interfaceName == null) {
                    interfaceName = PreferenceManager.g

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         351  2006-10-04 17:06  build.bat
     文件       10450  2006-10-04 17:06  build.xml
     文件        6186  2006-10-04 17:05  data\boards\archipelago1.board
     文件        6309  2006-10-04 17:05  data\boards\archipelago2.board
     文件        5172  2006-10-04 17:05  data\boards\battleforce2.board
     文件        4933  2006-10-04 17:05  data\boards\battletech.board
     文件        4795  2006-10-04 17:05  data\boards\boxcanyon.board
     文件       10289  2006-10-04 17:05  data\boards\buildings\city_downtown.board
     文件       10261  2006-10-04 17:05  data\boards\buildings\city_residential.board
     文件       10020  2006-10-04 17:05  data\boards\buildings\city_skyscraper.board
     文件        8905  2006-10-04 17:05  data\boards\buildings\city_suburbs.board
     文件        5992  2006-10-04 17:05  data\boards\buildings\coast1.board
     文件        7959  2006-10-04 17:05  data\boards\buildings\dropport1.board
     文件        8716  2006-10-04 17:05  data\boards\buildings\dropport2.board
     文件        6676  2006-10-04 17:05  data\boards\buildings\militarybase1.board
     文件        7210  2006-10-04 17:05  data\boards\buildings\militarybase2.board
     文件        9650  2006-10-04 17:05  data\boards\buildings\seaport.board
     文件        5743  2006-10-04 17:05  data\boards\cityhillsresidential1.board
     文件        6127  2006-10-04 17:05  data\boards\cityhillsresidential2.board
     文件        5482  2006-10-04 17:05  data\boards\cityruins.board
     文件        5863  2006-10-04 17:05  data\boards\citystreet_grid_park1.board
     文件        6011  2006-10-04 17:05  data\boards\citystreet_grid_park2.board
     文件        5429  2006-10-04 17:05  data\boards\citytech.board
     文件        5199  2006-10-04 17:05  data\boards\coast2.board
     文件        4783  2006-10-04 17:05  data\boards\deepcanyon1.board
     文件        4755  2006-10-04 17:05  data\boards\deepcanyon2.board
     文件        4744  2006-10-04 17:05  data\boards\deserthills.board
     文件        4709  2006-10-04 17:05  data\boards\desertmountain1.board
     文件        4716  2006-10-04 17:05  data\boards\desertmountain2.board
     文件        4882  2006-10-04 17:05  data\boards\desertsinkhole1.board
     文件        4834  2006-10-04 17:05  data\boards\desertsinkhole2.board
............此处省略2854个文件信息

评论

共有 条评论