Pol  Revision:cb584c9
tiplstwn.cpp
Go to the documentation of this file.
1 
7 #include <string>
8 
9 #include "../clib/dirlist.h"
10 #include "globals/uvars.h"
11 
12 namespace Pol
13 {
14 namespace Core
15 {
16 void load_tips()
17 {
18  gamestate.tipfilenames.clear();
19 
20  for ( Clib::DirList dl( "tips/" ); !dl.at_end(); dl.next() )
21  {
22  std::string name = dl.name();
23  if ( name[0] == '.' )
24  continue;
25  if ( name.find( ".txt" ) != std::string::npos )
26  {
27  gamestate.tipfilenames.push_back( name.c_str() );
28  }
29  }
30 }
31 }
32 }
bool at_end() const
Definition: dirlist.cpp:102
std::vector< std::string > tipfilenames
Definition: uvars.h:192
void load_tips()
Definition: tiplstwn.cpp:16
GameState gamestate
Definition: uvars.cpp:74
std::string name
Definition: osmod.cpp:943
Definition: berror.cpp:12