gAILog Class Reference

Collaboration diagram for gAILog:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 gAILog ()
void DeleteEntry ()
gAILogEntryNextEntry ()
void Print ()

Public Attributes

gAILogEntry entries [ENTRIES+1]
int current
int del


Detailed Description

Definition at line 1965 of file gAIBase.cpp.


Constructor & Destructor Documentation

gAILog::gAILog (  )  [inline]

Definition at line 1971 of file gAIBase.cpp.

01971 :current(0), del(0){}


Member Function Documentation

void gAILog::DeleteEntry (  )  [inline]

Definition at line 1973 of file gAIBase.cpp.

Referenced by gAIPlayer::EmergencySurvive().

01974     {
01975         del = 1;
01976         if (current > 0)
01977             current--;
01978     }

Here is the caller graph for this function:

gAILogEntry& gAILog::NextEntry (  )  [inline]

Definition at line 1980 of file gAIBase.cpp.

References ENTRIES, se_GameTime(), and gAILogEntry::time.

Referenced by gAIPlayer::EmergencySurvive().

01981     {
01982         del = 0;
01983 
01984         if (current >= ENTRIES)
01985         {
01986             for (int i=1; i<ENTRIES; i++)
01987                 entries[i-1] = entries[i];
01988         }
01989         else
01990             current++;
01991 
01992         gAILogEntry& ret = entries[current-1];
01993         ret.time = se_GameTime();
01994         return ret;
01995     }

Here is the call graph for this function:

Here is the caller graph for this function:

void gAILog::Print (  )  [inline]

Definition at line 1997 of file gAIBase.cpp.

References con, and DANGERLEVELS.

Referenced by gAIPlayer::EmergencySurvive(), gAIPlayer::RightBeforeDeath(), and gAIPlayer::Think().

01998     {
01999 #ifdef DEBUG
02000         con << "Log:\n";
02001         for (int i = current + del - 1; i>=0; i--)
02002         {
02003             for (int j=0; j < DANGERLEVELS; j++)
02004             {
02005                 con << entries[i].sideDanger[j][0] << ' ';
02006                 con << entries[i].frontDanger[j]   << ' ';
02007                 con << entries[i].sideDanger[j][1] << "    ";
02008             }
02009             con << entries[i].turn << ", " << entries[i].tries << "\n";
02010         }
02011 #ifndef DEDICATED
02012         //              se_PauseGameTimer(true);
02013 #endif
02014 #endif
02015     }

Here is the caller graph for this function:


Member Data Documentation

gAILogEntry gAILog::entries[ENTRIES+1]

Definition at line 1967 of file gAIBase.cpp.

Referenced by gAIPlayer::EmergencySurvive().

int gAILog::current

Definition at line 1968 of file gAIBase.cpp.

Referenced by gAIPlayer::EmergencySurvive().

int gAILog::del

Definition at line 1969 of file gAIBase.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:32:43 2008 for Armagetron Advanced by  doxygen 1.5.4