~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/autoslope.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: autoslope.h 11818 2008-01-12 14:10:35Z rubidium $ */
 
1
/* $Id: autoslope.h 15027 2009-01-12 17:11:45Z truebrain $ */
2
2
 
3
 
/** @file autoslope.h */
 
3
/** @file autoslope.h Functions related to autoslope. */
4
4
 
5
5
#ifndef AUTOSLOPE_H
6
6
#define AUTOSLOPE_H
7
7
 
8
 
#include "depot.h"
9
8
#include "settings_type.h"
10
 
#include "player_func.h"
 
9
#include "company_func.h"
 
10
#include "depot_func.h"
11
11
 
12
12
/**
13
13
 * Autoslope check for tiles with an entrance on an edge.
30
30
}
31
31
 
32
32
/**
33
 
 * Tests if autoslope is enabled for _current_player.
 
33
 * Tests if autoslope is enabled for _current_company.
34
34
 *
35
 
 * Autoslope is disabled for town/industry construction and old ai players.
 
35
 * Autoslope is disabled for town/industry construction.
36
36
 *
37
37
 * @return true iff autoslope is enabled.
38
38
 */
39
39
static inline bool AutoslopeEnabled()
40
40
{
41
 
        return (_patches.autoslope &&
42
 
                ((IsValidPlayer(_current_player) && !_is_old_ai_player) ||
43
 
                 (_current_player == OWNER_NONE && _game_mode == GM_EDITOR)));
 
41
        return (_settings_game.construction.autoslope &&
 
42
                (_current_company < MAX_COMPANIES ||
 
43
                 (_current_company == OWNER_NONE && _game_mode == GM_EDITOR)));
44
44
}
45
45
 
46
46
#endif /* AUTOSLOPE_H */