Esempio n. 1
0
/*
 * MakeLog - make the log file
 */
void MakeLog( ExceptDlgInfo *faultinfo )
{
    bool    wasfault;

    wasfault = ( faultinfo != NULL );
    RefreshCostlyInfo();
    if( startLogFile() ) {
        char    err_buf[ _MAX_PATH + 100 ];

        RCsprintf( err_buf, STR_CANT_OPEN_LOG, LogData.logname );
        MessageBox( NULL, err_buf, AppName, MB_OK | MB_ICONEXCLAMATION | MB_SETFOREGROUND );
        return;
    }
    logSysInfo( wasfault );
    notesAdded = FALSE;
    if( LogData.query_notes ) {
        AnotateLog( MainHwnd, Instance, NotePrint );
    }
    if( wasfault ) {
        logFaultInfo( faultinfo );
    }
    if( LogData.log_process ) {
        logProcessList();
    }
    logStrPrintf( logLine );
    finishLogFile();
}
Esempio n. 2
0
//-----------------------------------------------------------------------------
LLEmotionProcessor::LLEmotionProcessor()
{
	// initial Mood
	m_sPAD.p = 0.0f;
	m_sPAD.a = 0.0f;
	m_sPAD.d = 0.0f;

	// Personality
	m_sPersonality.p = 0.0f;
	m_sPersonality.a = 0.0f;
	m_sPersonality.d = 0.0f;

	// initial mood: same as personality
	// this initialization is for blending with targetMood
	m_sMood = m_sPersonality;

	// evaluatino co-efficient
	m_fPrimaryFactor = 0.5f;
	m_fSecondaryFactor = 0.25f;

	m_iEmotion = -1;
	memset(m_fEmotions, 0, sizeof(float)*8);

	//-------------------------------------------------------------------------
	// Emotion PAD value from Zhang 2010 (Table8 Original PAD of emotion words)
	//-------------------------------------------------------------------------
	// Angry			(-0.40 0.22 0.12)
	// Contempt			missing
	// Disgust			(-0.36 0.08 0.13)
	// Fear (Scared)	(-0.19 0.26 -0.13)
	// Happy			(0.55 0.24 0.28)
	// Sad				(-0.18 0.03 -0.14)
	// Surprise			(0.34 0.34 0.04)

	//-------------------------------------------------------------------------
	// TODO: this needs some adjustments
	//-------------------------------------------------------------------------
	// Emotion center coordinate
	// angry(-80,80,100)
	m_sEmotion[0].p = -0.8f;
	m_sEmotion[0].a = 0.8f;
	m_sEmotion[0].d = 1.0f;
	m_sEmotion[0].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[0].dspand = false;

	// comtempt	missing
	m_sEmotion[1].p = 0.0f;
	m_sEmotion[1].a = 0.0f;
	m_sEmotion[1].d = 0.0f;
	m_sEmotion[1].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[1].dspand = false;

	// disgust	missing: this is just my own
	m_sEmotion[2].p = -0.4f;
	m_sEmotion[2].a = 0.1f;
	m_sEmotion[2].d = 0.1f;
	m_sEmotion[2].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[2].dspand = false;

	// fear(-80,80,-100)
	m_sEmotion[3].p = -0.8f;
	m_sEmotion[3].a = 0.8f;
	m_sEmotion[3].d = -1.0f;
	m_sEmotion[3].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[3].dspand = false;

	// happy1(80,80,+/-100) (50,0,+/-100)
	m_sEmotion[4].p = 0.8f;
	m_sEmotion[4].a = 0.8f;
	//m_sEmotion[4].d = 0.0f;
	m_sEmotion[4].d = 0.2f;
	m_sEmotion[4].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[4].dspand = true;

	// sad(-50,0,+/-100)
	m_sEmotion[5].p = -0.5f;
	//m_sEmotion[5].a = 0.0f;
	m_sEmotion[5].a = -0.2f;
	//m_sEmotion[5].d = 0.0f;
	m_sEmotion[5].d = -0.3f;
	m_sEmotion[5].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[5].dspand = true;

	// surprise(10,80,+/-100)
	//m_sEmotion[6].p = 0.1f;
	m_sEmotion[6].p = 0.2f;
	m_sEmotion[6].a = 0.8f;
	//m_sEmotion[6].d = 0.0f;
	m_sEmotion[6].d = 0.1f;
	m_sEmotion[6].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[6].dspand = true;

	// happy2(50,0,+/-100)
	m_sEmotion[7].p = 0.5f;
	m_sEmotion[7].a = 0.0f;
	m_sEmotion[7].d = 0.0f;
	m_sEmotion[7].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[7].dspand = true;

	// pain(-80,30,50), this is guess work
	m_sEmotion[8].p = -0.8f;
	m_sEmotion[8].a = 0.3f;
	m_sEmotion[8].d = 0.5f;
	m_sEmotion[8].radius = 0.5f;	// categorical boundary radius
	m_sEmotion[8].dspand = true;

	// emotion name to id mapping utility
	m_mEmotionMap["ANGRY"] = 0;
	m_mEmotionMap["CONTEMPT"] = 1;
	m_mEmotionMap["DISGUST"] = 2;
	m_mEmotionMap["FEAR"] = 3;
	m_mEmotionMap["HAPPY"] = 4;
	m_mEmotionMap["SADNESS"] = 5;
	m_mEmotionMap["SAD"] = 5;
	m_mEmotionMap["SURPRISE"] = 6;
	m_mEmotionMap["PAIN"] = 8;

	//
	m_logFile = NULL;
	startLogFile();

	// control case
	m_bUseEmotionalExpression = true;
	m_bActive = true;
}