(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.

This commit is contained in:
rubidium
2007-07-26 16:51:10 +00:00
parent 5bd241eb5b
commit d624f66c79
23 changed files with 274 additions and 246 deletions

View File

@@ -50,7 +50,13 @@ enum Sprites {
OPENTTD_SPRITES_COUNT = 112, // number of gfx-sprites in openttd.grf
SPR_SIGNALS_BASE = 4896,
SPR_CANALS_BASE = SPR_SIGNALS_BASE + 486,
SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
SPR_SLOPES_INCLINED_OFFSET = 15,
SPR_SLOPES_VIRTUAL_BASE = SPR_SLOPES_BASE - SPR_SLOPES_INCLINED_OFFSET, // The original foundations (see SPR_FOUNDATION_BASE below) are mapped before the additional foundations.
SPR_SLOPES_NO_FOUNDATION_NW_OFFSET = 22, // no wall on the NW edge of the tile.
SPR_SLOPES_NO_FOUNDATION_NE_OFFSET = 44, // no wall on the NE edge of the tile.
SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
SPR_ELRAIL_BASE = SPR_AUTORAIL_BASE + 55,
SPR_2CCMAP_BASE = SPR_ELRAIL_BASE + 53,