~ubuntu-branches/ubuntu/precise/lordsawar/precise

« back to all changes in this revision

Viewing changes to src/File.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2007-10-29 15:38:06 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071029153806-z2j47adhmdjc7wae
Tags: 0.0.4-1
* New upstream release
* Add desktop file and simple manpage for new binary lordsawar-army-editor
* Syntax fixes on manpages
* Move manpages to correct section (6)

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
{
111
111
    string path = Configuration::s_dataPath + "/army/";
112
112
 
113
 
    std::list<std::string> retlist = get_xml_files(path);
 
113
    std::list<std::string> retlist = get_xml_files_in_immediate_subdirs(path);
114
114
 
115
115
    if (retlist.empty())
116
116
    {
117
 
        cerr << _("Couldn't find a single armyset!") << endl;
 
117
        cerr << _("Couldn't find any armysets!") << endl;
118
118
        cerr << _("Please check the path settings in /etc/lordsawarrc or ~/.lordsawarrc") << endl;
119
119
        cerr << _("Exiting!") << endl;
120
120
        exit(-1);
126
126
 
127
127
string File::getArmyset(string armysetname)
128
128
{
129
 
    return Configuration::s_dataPath + "/army/" + armysetname + ".xml";
 
129
    return Configuration::s_dataPath + "/army/" + armysetname + "/" + 
 
130
      armysetname + ".xml";
130
131
}
131
132
 
132
133
SDL_Surface* File::getArmyPicture(string armysetname, string pic)
179
180
}
180
181
 
181
182
 
182
 
SDL_Surface* File::getBorderPic(std::string filename)
183
 
{
184
 
    return loadImage(Configuration::s_dataPath + "/various/borders/" + filename + ".png");
185
 
}
186
 
 
187
 
 
188
183
std::string File::getEditorFile(std::string filename)
189
184
{
190
185
    return Configuration::s_dataPath + "/various/editor/" + filename + ".png";
212
207
    
213
208
    if (retlist.empty())
214
209
    {
215
 
        cerr << _("Couldn't find a single tileset!") << endl;
 
210
        cerr << _("Couldn't find any tilesets!") << endl;
216
211
        cerr << _("Please check the path settings in /etc/lordsawarrc or ~/.lordsawarrc") << endl;
217
212
        cerr << _("Exiting!") << endl;
218
213
        exit(-1);