#include "global.h" /* ----------------------------------------------------------------------------- Class: PlayerAI Desc: See header. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "PlayerAI.h" #include "RageUtil.h" #include "IniFile.h" #include "RageException.h" #include "GameState.h" #include struct TapScoreDistribution { float fCumulativeProbability[NUM_TAP_NOTE_SCORES]; TapNoteScore GetTapNoteScore() { float fRand = randomf(0,1); for( int i=TNS_MISS; i<=TNS_MARVELOUS; i++ ) if( fRand <= fCumulativeProbability[i] ) return (TapNoteScore)i; ASSERT(0); // the last probability must be 1.0, so we should never get here! return TNS_MARVELOUS; } }; TapScoreDistribution g_Distributions[NUM_SKILL_LEVELS]; void PlayerAI::InitFromDisk() { IniFile ini; ini.SetPath( "AI.ini" ); ini.ReadFile(); for( int i=0; i=0 && iCpuSkill