• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ InitColors函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中InitColors函数的典型用法代码示例。如果您正苦于以下问题:C++ InitColors函数的具体用法?C++ InitColors怎么用?C++ InitColors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了InitColors函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: fopen

void Log::Initialize()
{
    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        logfile = fopen(logfn.c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmlogfile = fopen(gmlogname.c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberlogfile = fopen(dberlogname.c_str(), "a");
    }

    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;

}
开发者ID:elitak,项目名称:noxserver,代码行数:30,代码来源:Log.cpp


示例2: initInstance

static bool initInstance( void )
{
    // OLE2Init();
    InitFonts();
    InitColors();
    return( true );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:7,代码来源:main.c


示例3: initInstance

static BOOL initInstance( void )
{
    // OLE2Init();
    InitFonts();
    InitColors();
    return( TRUE );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:7,代码来源:main.c


示例4: InitColors

void CSynBCGPEditCtrl::OnSysColorChange()
{
	CWnd::OnSysColorChange();

	InitColors ();
	RedrawWindow ();
}
开发者ID:kaffeel,项目名称:coolformat3.2,代码行数:7,代码来源:SynBCGPEditCtrl.cpp


示例5: InitColors

//*****************************************************************************************
void CBCGPListCtrl::OnSysColorChange() 
{
	CListCtrl::OnSysColorChange();
	
	InitColors ();
	RedrawWindow ();
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:8,代码来源:BCGPListCtrl.cpp


示例6: I2X

void CAutomap::Init (void)
{
m_nWidth = 640;
m_nHeight = 480;
m_bFull = false;
m_bDisplay = 0;
m_data.bCheat = 0;
m_data.bHires = 1;
m_data.nViewDist = 0;
m_data.nMaxDist = I2X (2000);
m_data.nZoom = 0x9000;
m_data.viewPos.SetZero ();
m_data.viewTarget.SetZero ();
m_data.viewMatrix = CFixMatrix::IDENTITY;
for (int i = 0; i < 2; i++) {
	if (!m_visited [i].Buffer ())
		m_visited [i].Create (MAX_SEGMENTS_D2X);
	m_visited [i].Clear ();
	}
if (!m_visible.Buffer ())
	m_visible.Create (MAX_SEGMENTS_D2X);
m_visible.Clear ();
m_nEdges = 0;
m_nMaxEdges = MAX_EDGES;
m_nLastEdge = -1;
m_edges.Create (MAX_EDGES);
m_brightEdges.Create (MAX_EDGES);
InitColors ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:29,代码来源:automap.cpp


示例7: BasicInit

void BasicInit()
#ifdef MAC
{
	void InitColors();
#if MACB4CARBON  
	short i;
	Ptr stackTop;
	// JLMextern _DataInit();
	
	stackTop = GetApplLimit();
	
	
	SetApplLimit((void *)(stackTop - (Ptr)30000));
	// SetApplLimit((void *)(*(long *)csb - 30000));
	MaxApplZone();
	for (i = 1 ; i <= 16 ; i++) MoreMasters();
	
	InitGraf(&qd.thePort);
	InitFonts();
	InitWindows();
	InitMenus();
	TEInit();
	InitDialogs(nil);
	FlushEvents(everyEvent, 0);
#endif
	InitCursor();
	
	InitColors();
}
开发者ID:NOAA-ORR-ERD,项目名称:PyGnome,代码行数:29,代码来源:CROSS.CPP


示例8: InitColors

Draw::Draw(HDC hdc) {
	DrawLock __;
	native = 0;
	InitColors();
	InitFonts();
	Reset();
	Attach(hdc);
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,代码来源:DrawWin32.cpp


示例9: Appender

AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<char const*> extraArgs)
    : Appender(id, name, level, flags), _colored(false)
{
    for (uint8 i = 0; i < NUM_ENABLED_LOG_LEVELS; ++i)
        _colors[i] = ColorTypes(MaxColors);

    if (!extraArgs.empty())
        InitColors(extraArgs[0]);
}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:9,代码来源:AppenderConsole.cpp


示例10: Appender

AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, ExtraAppenderArgs extraArgs)
    : Appender(id, name, level, flags), _colored(false)
{
    for (uint8 i = 0; i < MaxLogLevels; ++i)
        _colors[i] = ColorTypes(MaxColors);

    if (!extraArgs.empty())
        InitColors(extraArgs[0]);
}
开发者ID:joinjold,项目名称:TrinityCore,代码行数:9,代码来源:AppenderConsole.cpp


示例11: GetTimestampStr

void Log::Initialize()
{
    std::string logsDir = sConfig.GetStringDefault("LogsDir","");

    if(!logsDir.empty())
    {
        if((logsDir.at(logsDir.length()-1)!='/') && (logsDir.at(logsDir.length()-1)!='\\'))
            logsDir.append("/");
    }

    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        if(sConfig.GetIntDefault("LogTimestamp",0))
        {
            std::string logTimestamp = sConfig.GetIntDefault("LogTimestamp",0) ? GetTimestampStr() : "";
            logTimestamp.insert(0,"_");
            size_t dot_pos = logfn.find_last_of(".");
            if(dot_pos!=logfn.npos)
                logfn.insert(dot_pos,logTimestamp);
            else
                logfn += logTimestamp;
        }

        logfile = fopen((logsDir+logfn).c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmLogfile = fopen((logsDir+gmlogname).c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberLogfile = fopen((logsDir+dberlogname).c_str(), "a");
    }
    std::string ralogname = sConfig.GetStringDefault("RaLogFile", "");
    if(ralogname!="")
    {
        raLogfile = fopen((logsDir+ralogname).c_str(), "a");
    }
    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    m_logFilter = 0;

    if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetIntDefault("LogFilter_VisibilityChanges", 0)!=0)
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:56,代码来源:Log.cpp


示例12: glClearColor

void SceneBase::Init(string vertexShader, string fragmentShader)
{
	// Debug
	m_bShowDebug = false;

	// Simulation Speed
	m_speed = 1.0f;

	// Dark Blue Background
	glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
	// Enable depth test
	glEnable(GL_DEPTH_TEST);
	// Accept fragment if it closer to the camera than the former one
	glDepthFunc(GL_LESS);

	// Face Culling
	glEnable(GL_CULL_FACE);
	m_bCull = true;

	// Filled/Wireframe Mode
	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
	m_bWireframe = false;

	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

	glGenVertexArrays(1, &m_vertexArrayID);
	glBindVertexArray(m_vertexArrayID);

	Math::InitRNG();
	InitShadersAndLights(vertexShader, fragmentShader);
	InitFog();


	/*
	* Resource Initialization
	*/
	// Colors
	InitColors();
	// Materials
	InitMaterials();
	// Textures
	InitTextures();
	// Meshes
	InitMeshes();

	// Projection matrix : 45° Field of View, 4:3 ratio, display range : 0.1 unit <-> 1000 units
	Mtx44 perspective;
	perspective.SetToPerspective(45.0f, 4.0f / 3.0f, 0.1f, 12000.0f);
	//perspective.SetToOrtho(-80, 80, -60, 60, -1000, 1000);
	projectionStack.LoadMatrix(perspective);

	bLightEnabled = true;
}
开发者ID:Pycorax,项目名称:GDevFramework,代码行数:54,代码来源:SceneBase.cpp


示例13: DrawBoard

/* 
 * Function: DrawBoard
 * -------------------
 * Exported function to draw a new board.  Sets up named colors, draws the yellow
 * border, draws the empty cubes, the labels on the scoreboard, and resets scores
 * to zero and words lists to empty.
 */
void DrawBoard(int numRows, int numCols)
{
    if (numRows < 0 || numRows > MAX_DIMENSION || numCols < 0 || numCols > MAX_DIMENSION)
	Error("DrawBoard called with invalid dimensions.");
		
    SetWindowTitle("Welcome to Boggle!");
    InitColors();
    CalculateGeometry(numRows, numCols);
	
    // Draws a filled rect underneath cubes in the oh-so-familiar yellow color
    FillBox(gState.board.x, gState.board.y, gState.board.w, gState.board.h, 0.5, "Board Color");
    DrawEmptyCubes();
    DrawPlayerLabel(Human, "Me");
    DrawPlayerLabel(Computer, "Computer");
}
开发者ID:sunil3loq,项目名称:cpptrials,代码行数:22,代码来源:gboggle.cpp


示例14: SetPaintBackgroundEnabled

void CEditorRoot::ApplySchemeSettings(vgui::IScheme *pScheme)
{
	BaseClass::ApplySchemeSettings(pScheme);

	SetPaintBackgroundEnabled(true);
	SetPaintBorderEnabled(false);
	SetPaintEnabled(true);
	SetCloseButtonVisible(false);
	SetSizeable(false);
	SetMoveable(false);

	InitColors();

	SetTitle( "", true );
	SetTitleBarVisible( false );
	m_pLabelTitle->SetText( GetEditorTitle() );
	m_pLabelTitle->SetFont( pScheme->GetFont( "UiBold", false ) );

	SetPaintBackgroundType( 0 );
	OnShaderNameChanged();
	GenerateFonts(pScheme);
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:22,代码来源:veditorroot.cpp


示例15: wxOwnerDrawnComboBox

    : wxOwnerDrawnComboBox(parent, id, wxEmptyString, wxDefaultPosition,
                           wxDefaultSize, wxArrayString(), wxCB_READONLY)
#endif
{
    // If the ctrl is too small the color box gets messed up in wxOSX
    SetMinSize(wxSize(GetCharWidth() * 22, -1));
    s_ctrls.push_back(this);
    // Make sure we have a list of colors
    if (s_colors.empty())
        InitColors();
    else
        UpdateCtrls();
    // Set the initial value
    SetColor(color.IsOk() ? color : *wxWHITE);
    // Connect the event handler
#ifndef __WXOSX__
    Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
#else
    Connect(wxEVT_COMMAND_CHOICE_SELECTED,
#endif
            wxCommandEventHandler(ColorChoice::OnSelection));
}
开发者ID:oeuftete,项目名称:wx-xword,代码行数:22,代码来源:colorchoice.cpp


示例16: fopen

void Log::Initialize()
{
    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        logfile = fopen(logfn.c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmlogfile = fopen(gmlogname.c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberlogfile = fopen(dberlogname.c_str(), "a");
    }

    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:24,代码来源:Log.cpp


示例17: setup

int setup(int ParentPeriod, int ChildPeriod)
{

  int iDistance;
  int j; 
  unsigned int denominator;
  double InternalAngle;
  
  printf("setup\n");

  denominator = ChildPeriod;
  InternalAngle = 1.0/((double) denominator);

  c = GiveC(InternalAngle, 1.0, ParentPeriod) ; // internal radius= 1.0 gives root point = parabolic parameter 
  Cx=creal(c);
  Cy=cimag(c);
  alfa = GiveAlfaFixedPoint(c);
  dAlfaX = creal(alfa);
  dAlfaY = cimag(alfa);
  iAlfaX = (dAlfaX- ZxMin)/PixelWidth; 
  iAlfaY = (ZyMax - dAlfaY)/PixelHeight; // inverse Y axis 
  
  

  /* 2D array ranges */
  if (!(iHeight % 2)) iHeight+=1; // it sholud be even number (variable % 2) or (variable & 1)
  iWidth = iHeight;
  iSize = iWidth*iHeight; // size = number of points in array 
  // iy
  iyMax = iHeight - 1 ; // Indexes of array starts from 0 not 1 so the highest elements of an array is = array_name[size-1].
  //ix
  
  ixMax = iWidth - 1;

  /* 1D array ranges */
  // i1Dsize = i2Dsize; // 1D array with the same size as 2D array
  iMax = iSize-1; // Indexes of array starts from 0 not 1 so the highest elements of an array is = array_name[size-1].


  /* Pixel sizes */
  PixelWidth = (ZxMax-ZxMin)/ixMax; //  ixMax = (iWidth-1)  step between pixels in world coordinate 
  PixelHeight = (ZyMax-ZyMin)/iyMax;
  ratio = ((ZxMax-ZxMin)/(ZyMax-ZyMin))/((float)iWidth/(float)iHeight); // it should be 1.000 ...
  
  

  // for numerical optimisation in iteration
  ER2 = ER * ER;
  iMaxDistance2Alfa2 =iMaxDistance2Alfa * iMaxDistance2Alfa;
  dMaxDistance2Alfa2 = iMaxDistance2Alfa2*PixelWidth*PixelWidth; // dMaxDistance2Alfa^2
  dMaxDistance2Alfa = sqrt(dMaxDistance2Alfa2); // maybe it should be in reversed order ??
    
  
  /* create dynamic 1D arrays for colors ( shades of gray ) */
  data = malloc( iSize * sizeof(unsigned char) );
  rays = malloc( iSize * sizeof(unsigned char) );
  edge = malloc( iSize * sizeof(unsigned char) );

  if (rays == NULL || edge== NULL || data == NULL)
    {
      fprintf(stderr," Could not allocate memory");
      getchar(); 
      return 1;
    }

  // fill array g with negative number 
  for (iDistance=0; iDistance<iMaxDistance2Alfa; ++iDistance)
    for (j=0; j<iPeriodChild; ++j)
      RaysTurns[iDistance][j]=-1.0;

  // fill array iColorsOfInterior with iPeriodChild colors ( shades of gray )
  InitColors(iPeriodChild, iColorsOfInterior);


 
  

  
   
  
  printf(" end of setup \n");
  
  return 0;

} // ;;;;;;;;;;;;;;;;;;;;;;;;; end of the setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
开发者ID:adammaj1,项目名称:c,代码行数:85,代码来源:t.c


示例18: GetTimestampStr

void Log::Initialize()
{
    /// Common log files data
    m_logsDir = sConfig.GetStringDefault("LogsDir","");
    if(!m_logsDir.empty())
    {
        if((m_logsDir.at(m_logsDir.length()-1)!='/') && (m_logsDir.at(m_logsDir.length()-1)!='\\'))
            m_logsDir.append("/");
    }

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    logfile = openLogFile("LogFile","LogTimestamp","w");

    m_gmlog_per_account = sConfig.GetBoolDefault("GmLogPerAccount",false);
    if(!m_gmlog_per_account)
        gmLogfile = openLogFile("GMLogFile","GmLogTimestamp","a");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig.GetStringDefault("GMLogFile", "");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig.GetBoolDefault("GmLogTimestamp",false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos,m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos,"_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    charLogfile = openLogFile("CharLogFile","CharLogTimestamp","a");
    dberLogfile = openLogFile("DBErrorLogFile",NULL,"a");
    raLogfile = openLogFile("RaLogFile",NULL,"a");
    worldLogfile = openLogFile("WorldLogFile","WorldLogTimestamp","a");

    // Main log file settings
    m_includeTime  = sConfig.GetBoolDefault("LogTime", false);
    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    m_logFilter = 0;

    if(sConfig.GetBoolDefault("LogFilter_TransportMoves", true))
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_CreatureMoves", true))
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
    if(sConfig.GetBoolDefault("LogFilter_AchievementUpdates", true))
        m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;

    // Char log settings
    m_charLog_Dump = sConfig.GetBoolDefault("CharLogDump", false);
}
开发者ID:FLaM666,项目名称:evo-X,代码行数:71,代码来源:Log.cpp


示例19: SetRealmID

void Log::Initialize()
{
    /// Check whether we'll log GM commands/RA events/character outputs/chat stuffs
    m_dbChar = sConfig->GetBoolDefault("LogDB.Char", false);
    m_dbRA = sConfig->GetBoolDefault("LogDB.RA", false);
    m_dbGM = sConfig->GetBoolDefault("LogDB.GM", false);
    m_dbChat = sConfig->GetBoolDefault("LogDB.Chat", false);

    /// Realm must be 0 by default
    SetRealmID(0);

    /// Common log files data
    m_logsDir = sConfig->GetStringDefault("LogsDir","");
    if (!m_logsDir.empty())
        if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\'))
            m_logsDir.append("/");

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    logfile = openLogFile("LogFile","LogTimestamp","w");
    InitColors(sConfig->GetStringDefault("LogColors", ""));

    m_gmlog_per_account = sConfig->GetBoolDefault("GmLogPerAccount",false);
    if(!m_gmlog_per_account)
        gmLogfile = openLogFile("GMLogFile","GmLogTimestamp","a");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig->GetStringDefault("GMLogFile", "");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig->GetBoolDefault("GmLogTimestamp",false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos,m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos,"_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    charLogfile = openLogFile("CharLogFile", "CharLogTimestamp", "a");
    dberLogfile = openLogFile("DBErrorLogFile", NULL, "a");
    raLogfile = openLogFile("RaLogFile", NULL, "a");
    chatLogfile = openLogFile("ChatLogFile", "ChatLogTimestamp", "a");
    arenaLogFile = openLogFile("ArenaLogFile", NULL,"a");
    sqlLogFile = openLogFile("SQLDriverLogFile", NULL, "a");

    // Main log file settings
    m_logLevel     = sConfig->GetIntDefault("LogLevel", LOGL_NORMAL);
    m_logFileLevel = sConfig->GetIntDefault("LogFileLevel", LOGL_NORMAL);
    m_dbLogLevel   = sConfig->GetIntDefault("DBLogLevel", LOGL_NORMAL);
    m_sqlDriverQueryLogging  = sConfig->GetBoolDefault("SQLDriverQueryLogging", false);

    m_logFilter = 0;

    if(sConfig->GetBoolDefault("LogFilter_TransportMoves", true))
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig->GetBoolDefault("LogFilter_CreatureMoves", true))
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig->GetBoolDefault("LogFilter_VisibilityChanges", true))
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
    if(sConfig->GetBoolDefault("LogFilter_AchievementUpdates", true))
        m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;

    // Char log settings
    m_charLog_Dump = sConfig->GetBoolDefault("CharLogDump", false);
    m_charLog_Dump_Separate = sConfig->GetBoolDefault("CharLogDump.Separate", false);
    if (m_charLog_Dump_Separate)
    {
        m_dumpsDir = sConfig->GetStringDefault("CharLogDump.SeparateDir", "");
        if (!m_dumpsDir.empty())
            if ((m_dumpsDir.at(m_dumpsDir.length() - 1) != '/') && (m_dumpsDir.at(m_dumpsDir.length() - 1) != '\\'))
                m_dumpsDir.append("/");
    }
}
开发者ID:thecampster,项目名称:SkyFireEMU,代码行数:89,代码来源:Log.cpp


示例20: doInitializeEditor

/*
 * doInitializeEditor - do just that
 */
static void doInitializeEditor( int argc, char *argv[] )
{
    int         i, arg, cnt, ocnt, startcnt = 0;
    srcline     sline;
    int         k, j;
    char        tmp[FILENAME_MAX], c[1];
    char        buff[MAX_STR], file[MAX_STR], **list;
    char        cmd[MAX_STR * 2];
    char        *parm;
    char        *startup[MAX_STARTUP];
    char        *startup_parms[MAX_STARTUP];
    vi_rc       rc;
    vi_rc       rc1;

    /*
     * Make sure WATCOM is setup and if it is not, make a best guess.
     */
    watcom_setup_env();

    /*
     * If EDPATH is not set, use system default %WATCOM%\EDDAT.
     */
    if( getenv( "EDPATH" ) == NULL ) {
        char *watcom;

        watcom = getenv( "WATCOM" );
        if( watcom != NULL ) {
            char edpath[FILENAME_MAX];

            sprintf( edpath, "%s%c%s", watcom, FILE_SEP, "eddat" );

            if( setenv( "EDPATH", edpath, 0 ) != 0 ) {
                /*
                 * Bail out silently on error, as we will get error message later on.
                 */
            }
        }
    }

    /*
     * misc. set up
     */
    MaxMemFree = MemSize();
    StaticStart();
    FTSInit();
    BoundDataInit();
    EditFlags.Starting = true;
    InitCommandLine();
    ChkExtendedKbd();
    SSInitBeforeConfig();

    GetCWD1( &HomeDirectory );
    GetCWD1( &CurrentDirectory );
    SetCWD( HomeDirectory );
    if( cfgFN == NULL ){
        cfgFN = DupString( CFG_NAME );
    }

    checkFlags( &argc, argv, startup, startup_parms, &startcnt );
    ScreenInit();
    SetWindowSizes();
    EditFlags.ClockActive = false;
    SetInterrupts();
#ifdef __WIN__
    InitClrPick();
    InitFtPick();
    SubclassGenericInit();
    CursorOp( COP_INIT );
#else
    InitColors();
#endif
    InitSavebufs();
    InitKeyMaps();

    /*
     * initial configuration
     */
    EditVars.Majick = MemStrDup( "()[email protected]" );
    EditVars.FileEndString = MemStrDup( "[END_OF_FILE]" );
    MatchInit();
    SetGadgetString( NULL );
    WorkLine = MemAlloc( sizeof( line ) + EditVars.MaxLine + 2 );
    WorkLine->len = -1;

    sline = 0;
    if( cfgFN[0] != 0 ) {
        c[0] = 0;
        rc = Source( cfgFN, c, &sline );
        if( rc == ERR_FILE_NOT_FOUND ) {
#ifdef __WIN__
            CloseStartupDialog();
            MessageBox( (HWND)NULLHANDLE, "Could not locate configuration information; please make sure your EDPATH environment variable is set correctly",
                        EditorName, MB_OK );
            ExitEditor( -1 );
#else
            rc = ERR_NO_ERR;
#endif
//.........这里部分代码省略.........
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:101,代码来源:init.c



注:本文中的InitColors函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InitCommon函数代码示例发布时间:2022-05-30
下一篇:
C++ InitBuffer函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap